/* Growth Plan Review: what shell.css lacks. Palette, faces and the 16px gutter come from the shell.
   A1 look: each item or idea is a Soft Mint tile inside the white inputs card, as in the Growth Team Coverage Map. */

/* ---------- Form: mode, budget, item rows ---------- */
.gpc-mode { margin-bottom: 20px; }
.gpc-bud { margin-top: 4px; }
.gpc-intro { max-width: 48rem; margin-bottom: 20px; }

.gpc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.gpc-rows > li + li { margin-top: 0; }
.gpc-row { border-radius: var(--radius-tile); padding: 20px 24px 24px; background: var(--soft-mint); }
/* On mint a checked pill keeps a white fill and a Deep Teal edge, so the choice still stands out. */
.gpc-row .choice input:checked + span { background: var(--white); box-shadow: inset 0 0 0 1px var(--deep-teal); }
/* A failed run scrolls the first problem in under the 140px sticky header. */
.gpc-row, .inputs-card .field { scroll-margin-top: 140px; }
.gpc-row-error { margin: -6px 0 16px; }
.gpc-row__head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.gpc-row__num {
  flex: none; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--white);
  font-weight: 500; font-size: 0.9375rem; font-variant-numeric: tabular-nums;
}
.gpc-row__name { flex: 1 1 auto; margin: 0; }
.gpc-row__name-input { font-weight: 500; }
.gpc-remove { flex: none; font-size: 0.9375rem; margin-bottom: 12px; }

/* Three columns on a desktop; the measure, the "What it moves" choices and the estimates take a full line. */
.gpc-row__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; }
.gpc-row__fields > .field { margin: 0; }
.gpc-row__mode { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--cool-gray); }
.gpc-span { grid-column: 1 / -1; }
.gpc-f > label, .gpc-f > legend { font-size: 0.9375rem; }
.gpc-f--x, .gpc-f--ot { align-self: start; margin-top: 30px; }
.gpc-f--x, .gpc-f--ot { grid-column: span 2; }
.gpc-levers { display: flex; flex-wrap: wrap; gap: 8px; }
.gpc-est__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.gpc-est__pair > .field { margin: 0; }
.gpc-est .field-help { margin-top: 8px; }
/* Help text on the mint tile reads in Deep Plum (Cool Gray falls under 4.5:1 there). */
.gpc-row .field-help { color: var(--deep-plum); }

.gpc-add { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-top: 16px; }
.gpc-add .field-help { margin: 0; }

/* ---------- Results ---------- */
.gpc-card-intro { color: var(--cool-gray); font-size: 0.9375rem; margin-bottom: 16px; }
.gpc-chart { margin-top: 20px; }
.gpc-note { font-size: 0.9375rem; color: var(--cool-gray); margin: 12px 0 0; }
.gpc-steps { list-style: none; padding: 0; margin: 0; }
.gpc-steps .next-step p { margin: 0; }
.gpc-handoff { display: grid; gap: 10px; }
/* A wrapped hand-off link keeps its arrow right after the last word (the shell's inline-flex pushes it to the far edge). */
.gpc-handoff .link-action { display: block; justify-self: start; }
.gpc-next .handoff:not(:empty) { margin-top: 20px; }
.gpc-handoff__note { margin: 0; }

/* Seven columns in a card body of 760px or more (review 2026-12-04: nine wrapped the status to four lines). Owner,
   live-by month and measure share one cell in plan mode; rank and "What it moves" sit in the idea's cell in rank
   mode. Below 890px the table turns into stacked cards, so it never scrolls sideways. */
.gpc-items { min-width: 760px; font-size: 0.875rem; }
.gpc-items th, .gpc-items td { vertical-align: top; padding-left: 8px; padding-right: 8px; }
.gpc-items thead th { white-space: normal; font-size: 0.8125rem; }
.gpc-items th:first-child, .gpc-items td:first-child { padding-left: 0; }
.gpc-items th:last-child, .gpc-items td:last-child { padding-right: 0; }
.gpc-items__name { min-width: 130px; font-weight: 500; }
/* Plan widths, measured at a 788px table (a 900px window): every dollar figure on one line, "Figure against /
   break-even" and each status on two lines at most. */
.gpc-items--plan .gpc-items__name { min-width: 112px; }
.gpc-items--plan td.num { white-space: nowrap; }
.gpc-items--plan td:nth-child(5) { min-width: 92px; }
.gpc-items--plan .gpc-items__who { min-width: 168px; }
.gpc-items--plan td:last-child { min-width: 112px; }
.gpc-items--rank td:last-child { min-width: 124px; }
.gpc-idea { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; align-items: start; }
/* Ranges ("+$75,000 to +$210,000") break at their spaces; a single dollar figure never splits. */
.data-table.gpc-items .num { white-space: normal; }
.gpc-items__rank {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: -1px;
  border-radius: 50%; background: var(--soft-mint); font-weight: 700; font-size: 0.8125rem; font-variant-numeric: tabular-nums;
}
.gpc-items__title { display: block; }
.gpc-items__lever { display: block; font-weight: 400; color: var(--deep-plum); font-size: 0.8125rem; margin-top: 2px; }
.gpc-who { display: block; }
.gpc-who + .gpc-who { margin-top: 4px; }
.gpc-who__k { color: var(--deep-plum); font-size: 0.8125rem; }
.gpc-who > .gpc-chip:first-child { margin-top: 0; }
.gpc-soft { color: var(--cool-gray); }
.gpc-status { display: block; }
/* Chips (spec section 4): small Deep Plum text on Soft Mint; a caution chip adds an Amber dot before its words,
   as the caution verdict does. The words carry the meaning; colour only repeats it. */
.gpc-chip {
  display: inline-block; margin: 4px 6px 0 0; padding: 2px 10px; border-radius: 10px;
  font-size: 0.8125rem; line-height: 1.45; background: var(--soft-mint); color: var(--deep-plum);
}
.gpc-chip--warn::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px 0; border-radius: 50%;
  background: var(--amber); vertical-align: middle;
}

/* ---------- Narrow tablet ---------- */
@media (max-width: 760px) {
  .gpc-row__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpc-f--x, .gpc-f--ot { grid-column: auto; }
}

/* Plan mode shows five key numbers: three then two wider, every row filled (as Core Business Check does), so the
   tiles keep the shell's 26px value and padding (a row of five needed 20px type and 14px padding; 2026-12-04). */
@media screen and (min-width: 1000px) {
  [data-slot="numbers"] .key-numbers:has(> :nth-child(5)):not(:has(> :nth-child(6))) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  [data-slot="numbers"] .key-numbers:has(> :nth-child(5)):not(:has(> :nth-child(6))) > .stat { grid-column: span 2; }
  [data-slot="numbers"] .key-numbers:has(> :nth-child(5)):not(:has(> :nth-child(6))) > .stat:nth-child(n+4) { grid-column: span 3; }
}

@media screen and (min-width: 641px) and (max-width: 760px) {
  [data-slot="numbers"] .key-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Phone: one column per tile ---------- */
@media (max-width: 640px) {
  .gpc-row { padding: 16px; }
  .gpc-row__head { flex-wrap: wrap; align-items: center; gap: 10px 12px; }
  .gpc-row__num { margin-bottom: 0; }
  .gpc-row__name { order: 3; flex-basis: 100%; }
  .gpc-remove { margin: 0 0 0 auto; min-height: 32px; padding: 0; }
  .gpc-row .choice span { padding: 8px 14px; }
  .gpc-row__fields, .gpc-est__pair { grid-template-columns: minmax(0, 1fr); }
  .gpc-f--x, .gpc-f--ot, .gpc-span { grid-column: auto; }
  .gpc-f--x, .gpc-f--ot { margin-top: 0; }
}

/* ---------- The item table becomes one stacked card per row below 890px (spec said 560; review 2026-12-04) ---------- */
@media screen and (max-width: 889px) {
  .gpc-items { min-width: 0; }
  .gpc-items, .gpc-items tbody, .gpc-items tr, .gpc-items th, .gpc-items td { display: block; width: auto; }
  .gpc-items caption { display: block; text-align: left; }
  .gpc-items thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .gpc-items tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px;
    padding: 14px 0; border-bottom: 1px solid rgba(188, 182, 206, 0.6);
  }
  .gpc-items tbody th, .gpc-items tbody td:last-child { grid-column: 1 / -1; }
  .gpc-items tbody th, .gpc-items tbody td { border: 0; padding: 3px 0; text-align: left; white-space: normal; }
  .gpc-items tbody th { font-size: 1.0625rem; margin-bottom: 4px; min-width: 0; }
  .gpc-items tbody td::before {
    content: attr(data-label); display: block; font-size: 0.8125rem; font-weight: 400; color: var(--deep-plum);
  }
  .data-table.gpc-items .num { text-align: left; }
  .gpc-items--plan .gpc-items__who { min-width: 0; grid-column: 1 / -1; }
  .gpc-chip { white-space: normal; }
}

/* ---------- Print: verdict, key numbers, chart, questions and next steps on one page (the item table hides) ---------- */
@media print {
  .card-head__icon { display: none; }
  .card-head { margin-bottom: 4pt; }
  .card-title { font-size: 11pt; margin-bottom: 0; }
  .gpc-card-intro, .gpc-note { font-size: 8pt; margin-bottom: 3pt; }
  .gpc-chart { margin-top: 4pt; }
  /* The chart's own table prints the same figures (and the gap), so the drawing stays on screen only. */
  .gpc-chart .chart-svg, .gpc-chart .chart-title, .gpc-questions .gpc-card-intro { display: none; }
  .gpc-chart-card .card-head, .gpc-questions .card-head { margin-bottom: 2pt; }
  .gpc-chart .chart-table { margin-top: 0 !important; }
  .gpc-chart .data-table th, .gpc-chart .data-table td { padding: 1.5pt 6pt; }
  [data-slot="numbers"] .key-numbers:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .gpc-qs { gap: 3pt; }
  .gpc-qs .flag { font-size: 8.5pt; line-height: 1.3; padding: 2pt 6pt; border-radius: 6pt; }
  .verdict__headline { font-size: 13pt; }
  .gpc-chart .chart-table caption { margin-bottom: 2pt; }
  .gpc-steps .next-step { padding: 4pt 7pt; }
  .gpc-steps .next-step p { font-size: 8.5pt; line-height: 1.35; margin: 0; }
  .gpc-handoff { display: none; }
  /* The item table prints only for the no-figures and no-estimates verdicts (growth-plan-review.js renderItems). */
  .gpc-items { min-width: 0; font-size: 7.5pt; line-height: 1.3; }
  .gpc-items caption { font-size: 8pt; margin-bottom: 2pt; }
  .gpc-items thead th { font-size: 7.5pt; }
  .gpc-items th, .gpc-items td { padding: 2pt 4pt; }
  .gpc-items__name, .gpc-items--plan .gpc-items__who { min-width: 0; }
  .gpc-items__rank { width: 12pt; height: 12pt; margin-top: 0; font-size: 7pt; }
  .gpc-idea { gap: 0 4pt; }
  .gpc-items__lever, .gpc-who__k { font-size: 7pt; }
  .gpc-who + .gpc-who { margin-top: 1pt; }
  .gpc-chip { font-size: 7pt; padding: 0 4pt; margin: 1pt 3pt 0 0; }
  .verdict__sub { font-size: 9pt; }
  .verdict__sub + .verdict__sub { margin-top: 2pt; }
  .results-body > * + * { margin-top: 4pt; }
  .key-numbers .stat { padding: 4pt 7pt; }
  .key-numbers .stat__label { font-size: 7.5pt; line-height: 1.3; }
  .results-body > .card { padding: 7pt 10pt; }
  .verdict { padding: 6pt 12pt; }
  .verdict__sub { font-size: 8.5pt; }
  .key-numbers .stat__value { font-size: 11pt; }
  .limits p { font-size: 7.5pt; line-height: 1.35; }
  main > * + * { margin-top: 6pt; }
}
