/* Growth Stall Breakdown: only what shell.css lacks. Palette, faces and the 16px gutter come from the shell.
   Look: "A1, paper and blobs" (BUILD-NOTES.md, "A1 restyle 2026-12-03"). */

/* Each pair of Earlier and Later fields with its help line underneath. */
.gsb-group + .gsb-group { margin-top: 24px; }
.form-section__title + .gsb-group, .field-grid + .gsb-group { margin-top: 24px; }
.gsb-group > .field-help { margin-top: 8px; }

/* Live figures under each column: the period name, then one figure per line, on a Soft Mint tile. Cool Gray fails
   4.5:1 on mint, so the figures take Deep Plum there. */
.gsb-derived { margin-top: 24px; }
.gsb-derived .field-derived {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--soft-mint); border-radius: var(--radius-tile); padding: 14px 16px; color: var(--deep-plum);
}
.gsb-derived .field-derived:empty { display: none; }
.gsb-derived__head { font-weight: 500; color: var(--deep-plum); }

/* Charts: a column of 44px row icons beside the shell's waterfall. The shell draws every row 54px tall from the top
   of the SVG, so each icon slot is 54px tall and the icon sits level with the row's label and bar. */
.gsb-chart-rows { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: start; }
.gsb-row-icons { display: flex; flex-direction: column; }
.gsb-row-icon { display: flex; align-items: flex-start; height: 54px; }
.gsb-row-icon img { width: 44px; height: 44px; }

/* Results: tables and their note. Row labels keep a readable width. On a phone the share column and its note drop
   out and the cells tighten, so the dollar effect stays on screen; anything left over scrolls sideways. */
.gsb-table th[scope="row"] { min-width: 11rem; }
.gsb-table-note { margin-top: 10px; max-width: 48rem; }
.table-scroll:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: 6px; }
.results .card > .table-scroll + .gsb-table-note { margin-top: 14px; }

/* What to do next: one section per lever inside the white card, its explanations as Soft Mint tiles. */
.gsb-next .next-steps > * + * { margin-top: 0; }
.gsb-next-intro { max-width: 48rem; margin: 0; }
.gsb-step + .gsb-next-intro, .gsb-next-intro + .gsb-step { margin-top: 24px; }
.gsb-step + .gsb-step, .gsb-step + .gsb-next-intro { margin-top: 28px; padding-top: 28px; border-top: 1px solid rgba(188, 182, 206, 0.6); }
.gsb-step__title { font-size: 1.25rem; line-height: 1.25; margin-bottom: 10px; }
.gsb-why { margin-bottom: 16px; }
.gsb-why__head { font-weight: 500; }
.gsb-subhead { font-family: var(--font-text); font-weight: 500; font-size: 1rem; margin: 20px 0 10px; color: var(--deep-plum); }
.gsb-expl { margin: 0; }
.gsb-expl__title { font-size: 1.125rem; }
.gsb-expl__settle { display: block; font-size: 1rem; color: var(--deep-plum); }
.gsb-questions { margin-bottom: 0; }
.gsb-next .handoff:not(:empty) { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(188, 182, 206, 0.6); flex-direction: column; align-items: flex-start; gap: 4px; }
/* The Market Saturation Test link inside the core-market explanation tile (2026-12-04). */
.gsb-next .gsb-expl__handoff:not(:empty) { margin-top: 10px; padding-top: 0; border-top: 0; }

/* Tablet widths: the six-column lever table fits its card with no sideways scroll. Column heads wrap onto two lines,
   the row labels take a narrower minimum and the cells a little less side padding; the figures stay on one line. */
@media (max-width: 1000px) {
  .gsb-table thead th, .gsb-table thead th.num { white-space: normal; }
  .gsb-table th[scope="row"] { min-width: 8rem; }
  .gsb-table td, .gsb-table th { padding-left: 8px; padding-right: 8px; }
  .gsb-table th:first-child, .gsb-table td:first-child { padding-left: 0; }
  .gsb-table th:last-child, .gsb-table td:last-child { padding-right: 0; }
}
@media (max-width: 760px) {
  .gsb-table { font-size: 0.875rem; }
  .gsb-table th[scope="row"] { min-width: 6rem; }
}

@media (max-width: 640px) {
  .gsb-table { font-size: 0.8125rem; }
  .gsb-table th[scope="row"] { min-width: 5rem; }
  /* The table cards take a slimmer side padding so the dollar effect column stays in view at 390 to 430px. */
  .results .card[data-slot="levers"], .results .card[data-slot="spend"] { padding-inline: 16px; }
  .gsb-table thead th, .gsb-table thead th.num { white-space: normal; font-size: 0.8125rem; }
  .gsb-table td, .gsb-table th { padding-left: 4px; padding-right: 4px; }
  .gsb-table th:last-child, .gsb-table td:last-child { padding-right: 0; }
  .gsb-table th:first-child { padding-left: 0; }
  .gsb-table .gsb-phone-hide, .gsb-table-note { display: none; }
  /* Narrow chart: a slimmer icon column leaves the bars more room. */
  .gsb-chart-rows { grid-template-columns: 42px minmax(0, 1fr); }
  .gsb-row-icon img { width: 34px; height: 34px; margin-top: 4px; }
}

/* Small phones: a notch smaller again so the lever table fits at 430 and 390 with money figures of any length. */
@media screen and (max-width: 480px) {
  .results .card[data-slot="levers"], .results .card[data-slot="spend"] { padding-inline: 12px; }
  .gsb-table { font-size: 0.75rem; }
  .gsb-table th[scope="row"] { min-width: 0; }
  .gsb-table thead th, .gsb-table thead th.num { font-size: 0.6875rem; }
  .gsb-table td, .gsb-table th { padding-left: 3px; padding-right: 3px; overflow-wrap: anywhere; }
}

@media print {
  .gsb-derived { display: none; }
  /* One page: verdict, key numbers, the main chart and a compact What to do next (why it matters plus the
     explanation titles; the settling numbers and questions are marked data-print="hide"). */
  .gsb-row-icons { display: none; }
  .gsb-chart-rows { display: block; }
  .gsb-next .card-head { margin-bottom: 4pt; }
  .gsb-step + .gsb-step, .gsb-step + .gsb-next-intro { margin-top: 6pt; padding-top: 6pt; }
  .gsb-next-intro + .gsb-step { margin-top: 4pt; }
  .gsb-step__title { margin-bottom: 2pt; font-size: 10.5pt; }
  .gsb-next-intro { margin: 0 0 4pt; max-width: none; }
  .gsb-why { margin-bottom: 3pt; }
  .gsb-subhead { font-size: 9.5pt; margin: 4pt 0 2pt; }
  .gsb-expl, .gsb-expl.tile-grid { display: block; }
  .gsb-expl li, .gsb-expl li.tile { display: inline; padding: 0; background: none; border-radius: 0; }
  .gsb-expl__title, .gsb-expl__title.tile__title { display: inline; font-weight: 400; font-size: inherit; }
  .gsb-expl li:not(:last-child) .gsb-expl__title::after { content: " \00B7  "; } /* the space after a CSS hex escape ends it, so the second space is the one that shows */
  /* The bar labels on the main chart already carry every value, so its data table stays off the printed page. */
  [data-slot="chart1"] .chart-table { display: none !important; }
}
