/* The Business Plan Generator (App\Businesses\WorkKind::PLAN): its form's own questions
   (marketing/tools/business-plan-fields), a plan (works/kinds/business_plan), printed too, its card in the
   dashboard's Documents (works/cards/business_plan) and the example on its page
   (marketing/tools/business-plan-generator). Loaded after app.css and works.css, whose tokens it uses.
   Everything is under .bp-: app.css already has .plan-* (the pricing page's plans). */

.bp-doc,.bp-card,.bp-fields{--bp-tone:#2F5D8A;--bp-tone-soft:#E0EAF5}

/* The form's own questions, in the site builder's box */
.bp-fields{display:grid;gap:14px;padding-top:14px;border-top:1px solid var(--line-soft)}
.bp-fields-intro{margin:0;color:var(--subtle);font-size:14px}
.bp-stage{margin:0;padding:0;border:0;min-width:0}
.bp-stage legend{margin:0 0 8px;padding:0;color:var(--muted);font-size:13px;font-weight:600;letter-spacing:.02em}
.bp-stage-options{display:flex;flex-wrap:wrap;gap:8px}
.prompt .bp-chip{position:relative;display:inline-flex;color:var(--ink);font-size:15px;font-weight:500;letter-spacing:0;cursor:pointer}
.bp-chip input{position:absolute;inset:0;margin:0;opacity:0;cursor:pointer}
.bp-chip span{padding:7px 14px;border:1px solid var(--line);border-radius:999px;background:var(--paper);transition:border-color .15s ease,background-color .15s ease}
.bp-chip:hover span{border-color:#CFC7B8}
.bp-chip input:checked+span{border-color:var(--bp-tone);background:var(--bp-tone-soft);color:var(--bp-tone);font-weight:600}
.bp-chip input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.bp-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
.prompt .bp-input{display:flex;flex-direction:column;gap:6px;min-width:0}
.bp-input input{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);font:400 16px/1.4 var(--body);letter-spacing:0}
.bp-input input::placeholder{color:#9A948A}
.bp-input input:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:transparent}
.bp-input input[aria-invalid="true"]{border-color:#C0392B}
@media (max-width:640px){.bp-inputs{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.bp-chip span{transition:none}}

/* A plan: the document */
.bp{display:grid;gap:16px}
.bp-toolbar{display:flex;flex-wrap:wrap;gap:10px}
.bp-doc{padding:clamp(22px,5vw,56px);background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 1px 2px rgba(26,26,23,.04),0 18px 40px rgba(26,26,23,.06);color:var(--ink);font-size:16.5px;line-height:1.65;overflow-wrap:break-word}
.bp-cover{padding-bottom:26px;border-bottom:1px solid var(--line)}
.bp-eyebrow{margin:0;color:var(--bp-tone);font-size:13px;font-weight:700;letter-spacing:.09em;text-transform:uppercase}
.bp-title{margin:10px 0 0;font:400 clamp(34px,5vw,54px)/1.04 var(--display);letter-spacing:-.028em;font-variation-settings:"SOFT" 50;text-wrap:balance}
.bp-meta{display:flex;flex-wrap:wrap;margin:14px 0 0;color:var(--muted);font-size:.88em;line-height:1.5}
.bp-meta span+span::before{content:"·";margin:0 10px;color:var(--subtle)}
.bp-note{margin:28px 0 0;padding:16px 18px;border-left:3px solid var(--accent);border-radius:0 12px 12px 0;background:var(--warn-soft);font-size:.91em;line-height:1.55}
.bp-note b{display:block;margin-bottom:4px;color:var(--warn-ink)}
.bp-note p{margin:0}
.bp-contents{margin:28px 0 0;padding:20px 22px;background:var(--paper);border-radius:14px}
.bp-contents h3{margin:0 0 10px;color:var(--subtle);font:700 .76em/1.2 var(--body);letter-spacing:.09em;text-transform:uppercase}
.bp-contents ol{margin:0;padding:0;list-style:none;columns:2;column-gap:32px;counter-reset:bp-contents}
.bp-contents li{padding:3px 0;counter-increment:bp-contents;break-inside:avoid}
.bp-contents a{display:flex;gap:12px;color:var(--ink);font-size:.91em;line-height:1.45;text-decoration:none}
.bp-contents a::before{content:counter(bp-contents);min-width:18px;color:var(--bp-tone);font-weight:700;font-variant-numeric:tabular-nums}
.bp-contents a:hover{color:var(--accent-hover)}

.bp-section{margin-top:52px;scroll-margin-top:24px}
.bp-section h3{display:flex;align-items:baseline;gap:14px;margin:0 0 18px;padding-bottom:12px;border-bottom:1px solid var(--line);font:400 clamp(24px,3vw,31px)/1.2 var(--display);letter-spacing:-.015em;text-wrap:balance}
.bp-n{display:inline-grid;flex:none;place-items:center;min-width:30px;height:30px;padding:0 7px;border-radius:9px;background:var(--bp-tone-soft);color:var(--bp-tone);font:700 14px/1 var(--body);letter-spacing:0;transform:translateY(-3px)}
.bp-section h4{margin:30px 0 10px;font:700 .94em/1.35 var(--body)}
.bp-section p{margin:0 0 14px}
.bp-section p:last-child{margin-bottom:0}
.bp-lead{font-size:1.12em;line-height:1.6}
.bp-points{display:grid;gap:9px;margin:0;padding:0;list-style:none}
.bp-points li{position:relative;padding-left:22px}
.bp-points li::before{content:"";position:absolute;top:.7em;left:4px;width:7px;height:7px;border-radius:50%;background:var(--accent)}
.bp-muted{color:var(--subtle);font-size:.91em}
.bp-section .bp-small{margin-top:12px;color:var(--subtle);font-size:.85em}
.bp-tag{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;line-height:1.5;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}
.bp-tag.is-suggested{background:var(--warn-soft);color:var(--warn-ink)}
.bp-tag.is-yours{background:var(--ok-soft);color:var(--ok)}
.bp-tag.is-idea{margin-left:8px;background:var(--bp-tone-soft);color:var(--bp-tone);vertical-align:2px}

/* What you offer */
.bp-offer{margin:0;padding:0;list-style:none;border-top:1px solid var(--line-soft)}
.bp-offer li{display:flex;justify-content:space-between;gap:28px;padding:16px 0;border-bottom:1px solid var(--line-soft)}
.bp-offer-what b{font-size:1.03em;line-height:1.35}
.bp-section .bp-offer-what p{margin:4px 0 0;color:var(--muted);font-size:.94em;line-height:1.55}
.bp-offer-price{display:flex;flex:none;flex-direction:column;align-items:flex-end;gap:6px;max-width:40%;text-align:right}
.bp-offer-price b{font:400 1.27em/1.2 var(--display);font-variant-numeric:tabular-nums}

/* Your customers */
.bp-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.bp-group{padding:18px 18px 16px;background:var(--paper);border:1px solid var(--line-soft);border-radius:14px}
.bp-section .bp-group h4{margin:0 0 6px}
.bp-section .bp-group p{margin:0 0 12px;font-size:.94em;line-height:1.55}
.bp-section .bp-reach{margin:0;color:var(--muted);font-size:.88em}
.bp-reach b{display:block;margin-bottom:2px;color:var(--ink);font-size:11.5px;letter-spacing:.07em;text-transform:uppercase}

/* Tables: competition, channels, costs, milestones, risks */
.bp-table-wrap{margin:4px 0 0}
.bp-table{width:100%;border-collapse:collapse;font-size:.94em;line-height:1.5}
.bp-table th,.bp-table td{padding:11px 16px 11px 0;border-bottom:1px solid var(--line-soft);text-align:left;vertical-align:top}
.bp-table th:last-child,.bp-table td:last-child{padding-right:0}
.bp-table thead th{padding-top:0;padding-bottom:9px;border-bottom:1.5px solid var(--ink);color:var(--subtle);font-size:11.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase}
.bp-table tbody th{width:32%;font-weight:600}
.bp-table .bp-amount{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.bp-table tfoot th,.bp-table tfoot td{border-top:1.5px solid var(--ink);border-bottom:0;font-weight:700}
.bp-costs tbody td:not(.bp-amount){color:var(--muted)}
/* Fixed columns, so a section's two tables line up */
.bp-costs,.bp-milestones{table-layout:fixed}
.bp-costs thead th:first-child{width:30%}
.bp-costs thead th:last-child{width:17%}
.bp-milestones thead th:first-child{width:17%}
.bp-milestones thead th:nth-child(2){width:44%}
.bp-milestones tbody th{color:var(--bp-tone);white-space:nowrap}
.bp-milestones tbody td:last-child{color:var(--muted)}

/* From enquiry to sale; before you rely on it */
.bp-steps,.bp-checks{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.bp-steps{counter-reset:bp-step}
.bp-steps li{display:flex;gap:12px;counter-increment:bp-step}
.bp-steps li::before{content:counter(bp-step);display:grid;flex:none;place-items:center;width:26px;height:26px;margin-top:1px;border:1.5px solid var(--ink);border-radius:50%;font-size:13px;font-weight:700;line-height:1}
.bp-checks li{display:flex;gap:12px}
.bp-checks li::before{content:"";flex:none;width:18px;height:18px;margin-top:4px;border:1.5px solid var(--ink);border-radius:5px}

/* Operations */
.bp-areas{margin:0;border-top:1px solid var(--line-soft)}
.bp-areas div{display:grid;grid-template-columns:minmax(120px,30%) minmax(0,1fr);gap:18px;padding:13px 0;border-bottom:1px solid var(--line-soft)}
.bp-areas dt{font-weight:600;line-height:1.5}
.bp-areas dd{margin:0;line-height:1.6}

/* Costs and break-even */
.bp-section .bp-estimates{display:flex;align-items:baseline;gap:10px;margin:0 0 4px;padding:12px 14px;background:var(--paper);border-radius:12px;color:var(--muted);font-size:.88em;line-height:1.5}
.bp-estimates .bp-tag{flex:none}
.bp-even{padding:20px;background:var(--paper);border:1px solid var(--line);border-radius:16px}
.bp-even-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);gap:10px;align-items:stretch}
.bp-even-row+.bp-even-row{margin-top:10px}
.bp-stat{display:flex;flex-direction:column;gap:3px;padding:12px 14px;background:var(--surface);border:1px solid var(--line-soft);border-radius:12px}
.bp-stat small{min-height:2.6em;color:var(--subtle);font-size:11.5px;font-weight:700;line-height:1.3;letter-spacing:.05em;text-transform:uppercase}
.bp-stat b{font:400 27px/1.15 var(--display);letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.bp-stat span{color:var(--muted);font-size:13px;line-height:1.35}
.bp-stat.is-result{background:var(--bp-tone-soft);border-color:transparent}
.bp-stat.is-result small{color:var(--bp-tone)}
.bp-stat.is-goal{background:var(--ink);border-color:var(--ink);color:#fff}
.bp-stat.is-goal small{color:#D6D1C7}
.bp-op{align-self:center;color:var(--subtle);font:300 26px/1 var(--display);text-align:center}
.bp-section .bp-even-words{margin:16px 0 0;font-size:.94em;line-height:1.55}
.bp-even-words.is-warning{color:#9F1D1D;font-weight:600}

.bp-footer{margin-top:52px;padding-top:16px;border-top:1px solid var(--line);color:var(--subtle);font-size:.82em;line-height:1.5}

/* Phones: tables become stacked rows, and the break-even reads top to bottom */
@media (max-width:640px){
  .bp-doc{font-size:16px;border-radius:16px}
  .bp-contents ol{columns:1}
  .bp-meta{flex-direction:column;gap:2px}
  .bp-meta span+span::before{content:none}
  .bp-section{margin-top:40px}
  .bp-offer li{flex-direction:column;gap:8px}
  .bp-offer-price{flex-direction:row;align-items:center;max-width:none;text-align:left}
  .bp-table thead{display:none}
  .bp-table,.bp-table tbody,.bp-table tfoot,.bp-table tr,.bp-table th,.bp-table td{display:block;width:auto}
  .bp-table tr{padding:12px 0;border-bottom:1px solid var(--line-soft)}
  .bp-table tbody tr:first-child{border-top:1.5px solid var(--ink)}
  .bp-table th,.bp-table td,.bp-table tbody th,.bp-milestones tbody th{width:auto;padding:0;border:0;white-space:normal}
  .bp-table tbody th{margin-bottom:3px}
  .bp-costs tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 14px}
  .bp-costs tbody td:not(.bp-amount){grid-column:1/-1;font-size:.94em}
  .bp-costs td.bp-amount{grid-row:1;grid-column:2}
  .bp-table tfoot tr{border-top:1.5px solid var(--ink);border-bottom:0}
  .bp-table tfoot th,.bp-table tfoot td{border:0}
  .bp-milestones tbody th{font-size:12.5px;letter-spacing:.05em;text-transform:uppercase}
  .bp-milestones tbody td:last-child{margin-top:4px;font-size:.94em}
  .bp-areas div{grid-template-columns:1fr;gap:3px}
  .bp-even{padding:14px}
  .bp-even-row{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);row-gap:8px}
  .bp-even-row .bp-stat:last-child{grid-column:1/-1}
  .bp-even-row .bp-op:nth-of-type(2){grid-column:1/-1;font-size:20px;line-height:.8}
  .bp-stat b{font-size:23px}
}

/* Printed (or saved as a PDF): the document alone, a cover page, then the sections */
@media print{
  @page{margin:16mm 16mm 18mm}
  html,body{background:#fff !important}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  /* Only on a plan's page: this sheet also loads on the tool's page and in Documents, which print as they are */
  body:has(.work-page .bp)>:not(.work-page){display:none !important}
  .work-page{padding:0 !important}
  .work-page>.container{max-width:none;padding:0}
  .work-layout{display:block}
  .work-aside,.work-main>:not(.bp),.bp-toolbar{display:none !important}
  .bp{display:block}
  .bp-doc{padding:0;border:0;border-radius:0;box-shadow:none;font-size:10.5pt;line-height:1.55}
  .bp-cover{padding-top:38mm;padding-bottom:10mm}
  .bp-title{font-size:34pt}
  .bp-contents{break-after:page}
  .bp-contents ol{columns:1}
  .bp-meta{flex-direction:column;gap:2px}
  .bp-meta span+span::before{content:none}
  a{color:inherit;text-decoration:none}
  .bp-section{margin-top:22pt}
  .bp-section h3{font-size:18pt;break-after:avoid}
  .bp-section h4{margin-top:16pt;font-size:11pt;break-after:avoid}
  .bp-table thead{display:table-header-group}
  .bp-table tr,.bp-offer li,.bp-group,.bp-areas div,.bp-even,.bp-note,.bp-steps li,.bp-checks li,.bp-points li,.bp-estimates{break-inside:avoid}
  .bp-groups{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bp-stat b{font-size:17pt}
  .bp-footer{margin-top:28pt}
}

/* Its card in the dashboard's Documents */
.bp-card{position:relative}
.bp-card .work-card-kind,.bp-card>b{padding-right:46px}
.bp-card-page{position:absolute;top:14px;right:14px;display:flex;flex-direction:column;gap:4px;width:32px;height:40px;padding:8px 6px;background:var(--surface);border:1px solid var(--line);border-radius:4px 10px 4px 4px;box-shadow:0 2px 6px rgba(26,26,23,.06)}
.bp-card-page i{height:2px;border-radius:2px;background:#CBD7E6}
.bp-card-page i:first-child{width:62%;background:var(--bp-tone)}
.bp-card-page i:last-child{width:70%}
.bp-card-summary{display:-webkit-box;overflow:hidden;color:var(--muted);font-size:14px;line-height:1.45;-webkit-line-clamp:3;-webkit-box-orient:vertical}
.bp-card-figures{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.bp-card-figures span{padding:2px 9px;border-radius:999px;background:var(--chip);color:var(--muted);font-size:12px;font-weight:600;line-height:1.6}

/* The example on the tool's page */
.bp-sample{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,7fr);gap:48px;align-items:start}
.bp-sample .band-head{position:sticky;top:24px;margin-bottom:0}
.bp-sample-text{margin:16px 0 0;color:var(--muted);font-size:17px;line-height:1.55}
.bp-sample-doc{font-size:16px}
.bp-sample-head{display:flex;justify-content:space-between;gap:12px;margin:0;padding-bottom:12px;border-bottom:1px solid var(--line-soft);color:var(--subtle);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.bp-sample-doc .bp-section:first-of-type{margin-top:28px}
.bp-sample-doc .bp-section{margin-top:40px}
@media (max-width:900px){.bp-sample{grid-template-columns:1fr;gap:28px}.bp-sample .band-head{position:static}}
