/* ==========================================================================
   SwiftSums — calculator page layer ("Faceted Focus")

   PHASE 2, STAGE 2. Loaded AFTER ss-tokens.css and never alongside
   tokens.css/app.css. ss-tokens.css supplies the palette, reset, header,
   brand, locale switch, saved menu, save control, proof row and footer;
   this file supplies everything specific to a calculator page.

   Structure this expects:

     .ss-dark                     one navy band, containing:
       .ss-topbar                   the shared header
       .ss-calc-hero                crumbs, title, lead, save
       .ss-calc                     the calculator card, sitting ON the band
     main                         light ground from here down
       .ss-section                  how it works / example / FAQ / related

   Putting the card inside the dark band is the point of the layout: the
   answer lands against navy rather than being one more pale panel on a pale
   page, and the reader has somewhere to look before the prose starts.

   NAMES OWNED BY core.js — do not rename:
     .chip .segmented         built by buildChips()
     .input-shell--invalid    toggled by showError()
     .save-btn                wired by ui.wireSaveButton()
   ========================================================================== */

/* Hero -------------------------------------------------------------------- */
.ss-calc-hero { padding: 40px 0 8px; }

.ss-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  color: rgba(246,244,238,.72); font: 11px var(--font-mono);
}
.ss-crumbs a { transition: color .2s ease; }
.ss-crumbs a:hover { color: var(--mint); }
.ss-crumbs span[aria-hidden] { opacity: .5; }
.ss-crumbs [aria-current] { color: var(--cream); }

.ss-eyebrow {
  display: block; margin-top: 26px; color: var(--mint);
  font: 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}
.ss-calc-hero h1 {
  max-width: 15ch; margin-top: 14px; font-family: var(--font-display);
  font-size: clamp(44px, 5.6vw, 74px); font-weight: 700;
  /* word-spacing pairs with the negative tracking: letter-spacing applies to
     the space character too, so without it the words collide. */
  letter-spacing: -.08em; word-spacing: .13em; line-height: .95;
}
.ss-calc-hero h1 span { display: block; color: var(--mint); }
.ss-calc-lead {
  max-width: 540px; margin-top: 22px;
  color: rgba(246,244,238,.78); font-size: 16px; line-height: 1.7;
}
.ss-calc-hero .ss-save { margin-top: 26px; }

/* The calculator card ----------------------------------------------------- */
/* The hard offset shadow reads as a printed card lifted off the navy; the
   soft one underneath gives it depth. Both are tuned for a dark ground and
   would be far too heavy on cream. */
/* A note that belongs in the hero, on the dark band — used by the pages that
   exist once per locale to point at their sibling. The .ss-note treatment
   would disappear into the navy, so this one is mint-on-dark. */
.ss-hero-note {
  display: flex; align-items: flex-start; gap: 11px;
  max-width: 64ch; margin-top: 20px; padding: 13px 16px; border-radius: 12px;
  border: 1px solid rgba(159,224,198,.3); background: rgba(159,224,198,.09);
  color: rgba(246,244,238,.92); font-size: 13px; line-height: 1.6;
}
.ss-hero-note .ss-icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--mint); }
.ss-hero-note a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.ss-hero-note a:hover { text-decoration-thickness: 2px; }

.ss-calc {
  margin-top: 44px; padding: 34px;
  border: 1px solid rgba(255,255,255,.75); border-radius: 22px;
  background: linear-gradient(145deg, #fffef9 0%, #f0f5ef 100%);
  color: var(--ink);
  box-shadow: 0 30px 0 rgba(5,28,48,.13), 0 38px 70px rgba(3,22,39,.34),
              inset 0 1px 0 #fff, inset 0 -1px 0 rgba(23,59,93,.08);
}
.ss-calc-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding-bottom: 26px; border-bottom: 1px solid var(--line);
}
.ss-kicker {
  display: block; color: var(--muted);
  font: 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}
.ss-calc-head h2 {
  margin-top: 9px; font-family: var(--font-display);
  font-size: clamp(26px, 2.7vw, 34px); font-weight: 700;
  letter-spacing: -.055em; word-spacing: .1em; line-height: 1.04;
}
.ss-reset {
  flex: none; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--cream);
  color: var(--muted); font-size: 11px; font-weight: 700;
  transition: border-color .2s ease, color .2s ease;
}
.ss-reset:hover { border-color: rgba(23,59,93,.4); color: var(--ink); }

.ss-calc-main {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 36px; padding-top: 30px;
}

/* Inputs ------------------------------------------------------------------ */
.ss-inputs { display: grid; align-content: start; gap: 20px; }
.ss-field > label, .ss-field-label {
  display: block; margin-bottom: 8px;
  color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .03em;
}
/* `.ss-field > label` above is (0,1,1) and outranks `.ss-switch` (0,1,0), so it
   silently forced the toggle label to display:block. That collapsed the flex
   row, which un-blockified .ss-switch-track back to an inline span — and an
   inline box ignores its width/height, so the 46x27 pill rendered as a
   full-width strip below its own label. Restore flex at matching specificity;
   the generic rule's typography still applies. Affects every page pairing
   .ss-switch with .ss-field. */
.ss-field > label.ss-switch { display: flex; }

.ss-field-note {
  display: block; margin-top: 3px;
  color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0;
}

/* .input-shell keeps its app.css name because core.js toggles
   .input-shell--invalid on it by name. */
.input-shell {
  display: flex; align-items: center; gap: 4px; min-height: 62px; padding: 0 16px;
  border: 1px solid rgba(23,59,93,.23); border-radius: 14px; background: var(--cream);
  box-shadow: 0 6px 0 rgba(23,59,93,.045), inset 0 1px 0 #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input-shell:focus-within {
  border-color: rgba(126,211,198,.95);
  box-shadow: 0 6px 0 rgba(23,59,93,.045), inset 0 1px 0 #fff, 0 0 0 3px rgba(126,211,198,.4);
}
.input-shell--invalid { border-color: #b23c33; box-shadow: 0 6px 0 rgba(178,60,51,.08), inset 0 1px 0 #fff; }
.input-shell input {
  flex: 1; min-width: 0; width: 100%; border: 0; background: none; color: var(--ink);
  font-family: var(--font-mono); font-size: 20px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.input-shell input:focus-visible { outline: none; }
/* Native spinners fight the custom stepper, and appear on hover in Chrome. */
.input-shell input::-webkit-outer-spin-button,
.input-shell input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-shell input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
/* Date fields (archetype F) keep the native picker — it is better than
   anything hand-rolled on a phone — but the indicator needs toning down to
   sit inside a cream shell. */
.input-shell input[type="date"] { font-size: 18px; }
.input-shell input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: .5; transition: opacity .2s ease;
}
.input-shell input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

.input-shell__prefix, .input-shell__suffix {
  flex: none; color: var(--muted); font: 13px var(--font-mono); white-space: nowrap;
}

/* Two fields that share a unit and are read as a pair — length × width on the
   quantity pages. Collapses to one column with the rest of the layout. */
.ss-field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.ss-field-row { display: flex; align-items: center; gap: 10px; }
.ss-field-row .input-shell { flex: 1; min-width: 0; }
.ss-stepper { flex: none; display: grid; gap: 5px; }
.ss-stepper button {
  width: 38px; height: 28px; display: grid; place-items: center;
  border: 1px solid rgba(23,59,93,.2); border-radius: 8px; background: var(--cream);
  color: #1f6aab;
  transition: border-color .2s ease, background .2s ease;
}
.ss-stepper button:hover { border-color: #1f6aab; background: var(--sea); }
.ss-stepper svg { width: 13px; height: 13px; }

/* Tip chips. core.js's buildChips() creates button.chip inside .segmented. */
.segmented { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 9px 14px; border: 1px solid rgba(23,59,93,.2); border-radius: 999px;
  background: var(--cream); color: var(--ink);
  font: 600 13px var(--font-ui); font-variant-numeric: tabular-nums;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.chip:hover { border-color: rgba(23,59,93,.42); }
/* #1f6aab, not --blue: --blue is 4.35:1 on cream, which clears AA for the
   result figure but not for 13px chip text reversed out of it. */
.chip[aria-pressed="true"] { border-color: #1f6aab; background: #1f6aab; color: #fff; }

/* Round-up switch */
.ss-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.ss-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ss-switch-track {
  flex: none; width: 46px; height: 27px; padding: 3px; border-radius: 999px;
  background: rgba(23,59,93,.22); transition: background .2s ease;
}
.ss-switch-track::after {
  content: ""; display: block; width: 21px; height: 21px; border-radius: 50%;
  background: var(--cream); box-shadow: 0 1px 3px rgba(23,59,93,.3);
  transition: transform .2s ease;
}
.ss-switch input:checked + .ss-switch-track { background: #2f8f7d; }
.ss-switch input:checked + .ss-switch-track::after { transform: translateX(19px); }
.ss-switch input:focus-visible + .ss-switch-track { outline: 3px solid rgba(242,216,108,.9); outline-offset: 3px; }

/* Dataset input (archetype E). Mono and tabular, because what goes in is a
   column of figures — often pasted straight out of a spreadsheet. */
.ss-listinput {
  display: block; width: 100%; min-height: 136px; padding: 14px 16px; resize: vertical;
  border: 1px solid rgba(23,59,93,.23); border-radius: 14px; background: var(--cream);
  box-shadow: 0 6px 0 rgba(23,59,93,.045), inset 0 1px 0 #fff;
  color: var(--ink); font: 500 15px/1.75 var(--font-mono); font-variant-numeric: tabular-nums;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ss-listinput::placeholder { color: var(--muted); opacity: .7; }
.ss-listinput:focus-visible {
  outline: none; border-color: rgba(126,211,198,.95);
  box-shadow: 0 6px 0 rgba(23,59,93,.045), inset 0 1px 0 #fff, 0 0 0 3px rgba(126,211,198,.4);
}
.ss-listinput.input-shell--invalid {
  border-color: #b23c33; box-shadow: 0 6px 0 rgba(178,60,51,.08), inset 0 1px 0 #fff;
}

.ss-error { margin-top: 9px; color: #a8362d; font-size: 12px; line-height: 1.5; }
.ss-error[hidden] { display: none; }

.ss-note {
  display: flex; gap: 11px; padding: 15px 16px; border-radius: 14px;
  background: var(--sea); color: #3d6660; font-size: 12px; line-height: 1.65;
}
.ss-note[hidden] { display: none; }
.ss-note .ss-icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* Result ------------------------------------------------------------------ */
.ss-result {
  align-self: start; padding: 28px;
  border: 1px solid rgba(23,59,93,.12); border-radius: 16px; background: var(--cream);
  box-shadow: 0 10px 22px rgba(23,59,93,.09), inset 0 1px 0 #fff;
}
.ss-result-label {
  display: block; color: #2f6a72;
  font: 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}
.ss-result-value {
  display: block; margin-top: 11px; color: var(--blue);
  font-family: var(--font-mono); font-size: clamp(40px, 4.6vw, 54px); font-weight: 500;
  letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums;
  /* Unwrappable mono figures size an auto track to max-content, which drags
     the page sideways on a phone once someone types a seven-figure bill. */
  overflow-wrap: anywhere;
}
.ss-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px;
}
/* Two stats in a three-column track leaves a hole on the right; four wrap to
   a lone item on the second row. Both want their own column count. */
.ss-stats--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ss-stats--quad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ss-stat { border-top: 1px solid var(--line); padding-top: 13px; }
.ss-stat dt {
  color: var(--muted); font: 10px var(--font-mono);
  letter-spacing: .1em; text-transform: uppercase;
}
.ss-stat dd {
  margin: 6px 0 0; font: 500 18px var(--font-mono);
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}

/* Composite result (archetype G). Several derived figures that are all part
   of one answer — targets, zones, splits — listed rather than gridded, so the
   labels stay readable at any width. */
.ss-composite { margin-top: 22px; border-top: 1px solid var(--line); }
.ss-composite-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.ss-composite-row dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.ss-composite-row dd {
  margin: 0; font: 500 16px var(--font-mono);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* A caution that belongs beside the answer rather than beside the inputs —
   amber, so it reads as "take care", not as "you made a mistake". */
.ss-notice {
  display: flex; gap: 11px; margin-top: 20px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid rgba(150,107,20,.28); background: #fdf4dd;
  color: #6d4f14; font-size: 12px; line-height: 1.65;
}
.ss-notice[hidden] { display: none; }
.ss-notice svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.ss-formula {
  margin-top: 24px; padding: 17px 18px; border-radius: 12px;
  border: 1px solid rgba(23,59,93,.1); background: var(--mist);
  color: #4e6e7b; font: 12px/1.85 var(--font-mono);
  overflow-wrap: anywhere;
}
.ss-formula b { color: var(--ink); font-weight: 500; }

/* Copy takes the numbers, Share takes a link and a rendered card of them -
   two different jobs, so both stay. Identical styling: a second colour on
   the pair was tried and the teal did not sit with the palette. */
.ss-result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.ss-copy, .ss-share {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 16px; border-radius: 12px;
  background: var(--ink); color: var(--cream);
  font-size: 13px; font-weight: 700;
  transition: background .2s ease;
}
.ss-copy:hover, .ss-share:hover { background: #102941; }
.ss-share .ss-icon { width: 16px; height: 16px; flex: none; }

.ss-calc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 22px; color: var(--muted); font-size: 11px;
}

/* Clears the calculator card's 30px hard offset shadow, which is now the
   last thing in the band. Padding rather than a margin on the card:
   .ss-dark has no padding or border of its own, so a bottom margin on its
   last child would collapse straight through and add no space at all. */
.ss-dark { padding-bottom: 62px; }

/* Schedule + chart (archetype D) ------------------------------------------
   The chart and the table are the same data twice: the shape first, then the
   numbers for anyone who came for a specific year. */
.ss-chart {
  margin-top: 24px; padding: 20px 20px 14px;
  border: 1px solid rgba(23,59,93,.12); border-radius: 16px; background: var(--cream);
  box-shadow: 0 10px 22px rgba(23,59,93,.07), inset 0 1px 0 #fff;
}
.ss-chart svg { display: block; width: 100%; height: auto; }
/* core.js's chart.areaChart() writes these three class names into the SVG it
   builds, so they are named by it, not chosen here. */
.chart__grid { stroke: rgba(23,59,93,.13); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart__area { fill: rgba(47,143,125,.15); stroke: none; }
.chart__line { fill: none; stroke: #2f8f7d; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ss-chart-legend {
  margin-top: 12px; color: var(--muted);
  font: 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
}

/* A schedule runs to 40 rows. The head sticks and the table scrolls inside
   its own box, so a long term never turns the page into a scroll marathon
   and the mono columns never drag the layout sideways. */
.ss-table-wrap {
  margin-top: 18px; max-height: 430px; overflow: auto;
  border: 1px solid rgba(23,59,93,.12); border-radius: 16px; background: var(--cream);
  -webkit-overflow-scrolling: touch;
}
.ss-table { width: 100%; border-collapse: collapse; }
.ss-table th, .ss-table td {
  padding: 11px 18px; text-align: right; white-space: nowrap;
  font: 13px var(--font-mono); font-variant-numeric: tabular-nums;
}
.ss-table th:first-child, .ss-table td:first-child { text-align: left; }
.ss-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--mist); color: var(--muted);
  font: 10px var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid rgba(23,59,93,.14);
}
.ss-table tbody td { color: var(--ink); }
.ss-table tbody tr:not(:last-child) td { border-bottom: 1px solid var(--line); }
.ss-table tbody tr:hover td { background: var(--sea); }

/* Content sections -------------------------------------------------------- */
main { padding-bottom: 96px; }
.ss-section { margin-top: 76px; }
.ss-section h2 {
  font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 700;
  letter-spacing: -.07em; word-spacing: .12em; line-height: 1;
}
.ss-prose { max-width: 68ch; margin-top: 20px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.ss-prose p + p { margin-top: 15px; }
.ss-prose strong { color: var(--ink); font-weight: 700; }

/* The standalone formula block in the prose is the same visual object as the
   one in the result panel, so the page teaches its own notation once. */
.ss-section .ss-formula { max-width: 68ch; font-size: 13px; }

.ss-example-card {
  max-width: 620px; margin-top: 24px; padding: 26px 28px;
  border: 1px solid rgba(23,59,93,.15); border-radius: 18px;
  background: linear-gradient(145deg, #eff8f2, #e5f2ed);
  box-shadow: 10px 12px 0 rgba(23,59,93,.08), 0 18px 30px rgba(23,59,93,.1),
              inset 0 1px 0 rgba(255,255,255,.85);
}
.ss-example-card dl {
  display: grid; grid-template-columns: auto 1fr; gap: 11px 22px; margin: 18px 0 0;
}
.ss-example-card dt {
  color: var(--muted); font: 11px var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase;
}
.ss-example-card dd { margin: 0; font: 500 14px var(--font-mono); font-variant-numeric: tabular-nums; }
/* Numbered working, for archetypes that show a sequence rather than a set
   of labelled figures. */
.ss-steps {
  margin: 18px 0 0; padding: 0 0 0 22px; display: grid; gap: 9px;
  list-style: decimal; font-size: 14px; line-height: 1.6;
}
.ss-steps::marker, .ss-steps li::marker { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.ss-steps b { font-family: var(--font-mono); font-weight: 500; }

.ss-example-answer {
  margin-top: 20px; padding-top: 17px; border-top: 1px solid rgba(23,59,93,.14);
  font-size: 15px; line-height: 1.6;
}
.ss-example-answer b { font-family: var(--font-mono); font-weight: 500; }

.ss-faq { max-width: 780px; margin-top: 26px; display: grid; gap: 11px; }
.ss-faq details {
  border: 1px solid var(--line); border-radius: 14px; background: var(--cream);
  box-shadow: 0 4px 0 rgba(23,59,93,.04);
}
.ss-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; cursor: pointer;
  font-size: 15px; font-weight: 700; list-style: none;
}
.ss-faq summary::-webkit-details-marker { display: none; }
.ss-faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
.ss-faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.ss-faq .ss-prose { margin: 0; padding: 0 20px 20px; }

.ss-related {
  margin-top: 24px; display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.ss-related a {
  display: grid; align-content: space-between; gap: 18px; min-height: 118px; padding: 20px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--cream);
  box-shadow: 0 6px 0 rgba(23,59,93,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ss-related a:hover {
  transform: translateY(-3px); border-color: rgba(23,59,93,.3);
  box-shadow: 0 10px 0 rgba(23,59,93,.06), 0 16px 26px rgba(23,59,93,.1);
}
.ss-related strong { font-size: 15px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.ss-related small {
  color: #2f6a72; font: 10px var(--font-mono);
  letter-spacing: .1em; text-transform: uppercase;
}

.ss-disclaimer { max-width: 68ch; margin-top: 58px; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* Mobile result bar ------------------------------------------------------- */
/* Follows the reader once the result panel scrolls off the top, so the answer
   is never more than a glance away on a phone. */
.ss-result-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: none; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 18px calc(13px + env(safe-area-inset-bottom));
  background: rgba(23,59,93,.97); color: var(--cream);
  box-shadow: 0 -8px 24px rgba(3,22,39,.28);
}
.ss-result-bar span:first-child {
  font: 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; opacity: .82;
}
.ss-result-bar span:last-child { font: 500 22px var(--font-mono); font-variant-numeric: tabular-nums; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1000px) {
  /* The two-column split stops paying for itself once the result panel is
     narrower than the figure it has to hold. */
  .ss-calc-main { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .ss-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .ss-calc-hero { padding: 32px 0 4px; }
  .ss-calc { margin-top: 34px; padding: 24px 20px; border-radius: 18px; }
  .ss-calc-main { padding-top: 24px; }
  .ss-section { margin-top: 58px; }
}
@media (max-width: 560px) {
  .ss-calc-hero h1 { max-width: none; }
  /* A 20px mono figure plus its unit suffix will not sit twice across a
     phone's input column. */
  .ss-field-pair { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  /* Four currency columns need the horizontal scroll its wrapper already
     provides; squeezing the padding first buys most of them back. */
  .ss-table th, .ss-table td { padding-left: 12px; padding-right: 12px; }
  .ss-chart { padding: 14px 12px 10px; }
  .ss-calc { padding: 20px 16px; }
  .ss-result { padding: 22px 18px; }
  .ss-stats { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  /* Two 13px labels will not sit side by side in a 211px panel. */
  .ss-result-actions { grid-template-columns: minmax(0, 1fr); }
  .ss-related { grid-template-columns: minmax(0, 1fr); }
  .ss-related a { min-height: 0; gap: 12px; }
  .ss-example-card { padding: 20px 18px; }
  .ss-example-card dl { grid-template-columns: minmax(0, 1fr); gap: 3px 0; }
  .ss-example-card dd + dt { margin-top: 11px; }
  .ss-result-bar { display: flex; }
  /* Clears the fixed bar so the last line of the page is never under it. */
  main { padding-bottom: 108px; }
}

/* Ad slots. Space is reserved before AdSense serves anything, so ads arrive
   into a fixed box instead of pushing content down after paint. The min-height
   values match AdSense's standard responsive unit heights. Do not remove the
   reservation when ads go live — it is the reservation that prevents CLS. */
.ss-ad { display: block; contain: layout; }
.ss-ad ins { display: block; width: 100%; }
.ss-ad ins:not([data-ad-slot=""]) { min-height: 280px; margin: 24px 0; }
@media (min-width: 768px) {
  .ss-ad ins:not([data-ad-slot=""]) { min-height: 90px; }
}

/* WCAG 2.5.3 Label in Name: the locale-switch button's accessible name must
   contain its visible text. This reuses the .locale__label text node rather
   than duplicating it, so it stays locale-reactive for free. Copied verbatim
   from assets/css/app.css:55. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
