/* ==========================================================================
   Maxwise – stylesheet
   Edit the design tokens in :root to re-skin the whole site.
   Breakpoints used below (mobile-first):  480px · 720px · 900px · 1100px
   ========================================================================== */

:root {
  /* Brand */
  --ink: #0f1713;
  --brand: #1f7a4f;
  --brand-strong: #14573a;
  --volt: #d4ff5c;

  /* Surfaces */
  --bg: #f4f3ee;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --line: #e3e1d8;
  --line-strong: #c9c7bb;

  /* Text */
  --text: #18211c;
  --text-2: #424d47;
  --text-3: #5b665f;

  /* Feedback */
  --danger: #b42318;
  --warn-bg: #fff4d6;
  --warn-text: #6b4300;

  /* Spacing, radius, shadow */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px;
  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --shadow: 0 1px 2px rgba(15, 23, 19, .05), 0 8px 24px rgba(15, 23, 19, .06);
  --wrap: 1160px;

  /* Type */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; color: var(--ink); }
p { margin: 0 0 var(--s-3); }
a { color: var(--brand-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.hero-result :focus-visible, .site-footer :focus-visible { outline-color: var(--volt); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-4); }
@media (min-width: 720px) { .wrap { padding-inline: var(--s-5); } }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: var(--s-3); top: -60px; background: var(--ink); color: #fff; padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); z-index: 50; }
.skip:focus { top: var(--s-3); }
.i { flex: none; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: var(--s-4); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); place-items: center; }
.js .nav-toggle { display: grid; }
@media (min-width: 900px) { .js .nav-toggle { display: none; } }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.site-nav a, .more summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3); border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; cursor: pointer; list-style: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.site-nav a:hover, .more summary:hover { background: rgba(15, 23, 19, .06); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.more { position: relative; }
.more-list { display: grid; padding: var(--s-2); }
@media (min-width: 900px) {
  .more-list { position: absolute; top: 100%; left: 0; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); }
}
@media (max-width: 899px) {
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--s-2) var(--s-4) var(--s-4); box-shadow: var(--shadow); }
  .js .site-nav.is-open { display: flex; }
  .more-list { padding-left: var(--s-4); }
}

/* ---------- Hero ---------- */
.hero { padding-top: var(--s-5); padding-bottom: var(--s-4); }
.hero h1 { font-size: clamp(1.7rem, 1.15rem + 2.6vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; max-width: 22ch; text-wrap: balance; }
.lede { margin: var(--s-3) 0 0; color: var(--text-2); max-width: 64ch; font-size: .98rem; }
@media (min-width: 720px) { .hero { padding-top: var(--s-6); } .lede { font-size: 1.08rem; } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }

/* ---------- Calculator layout ---------- */
.calc { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 900px) { .calc { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-5); } }
.form { padding: var(--s-4); display: grid; gap: var(--s-4); align-content: start; }
@media (min-width: 720px) { .form { padding: var(--s-5); } }

.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field-head label, legend { font-weight: 700; font-size: .95rem; color: var(--ink); }
legend { padding: 0; margin-bottom: var(--s-2); }
.opt { font-weight: 500; color: var(--text-3); font-size: .85rem; margin-left: 4px; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); min-height: 44px; }
.hint { font-size: .88rem; color: var(--text-3); margin: var(--s-2) 0 0; }
.error { color: var(--danger); font-size: .9rem; font-weight: 600; margin: var(--s-2) 0 0; }
.error[hidden] { display: none; }

/* Segmented radio control */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg label { display: grid; place-items: center; min-height: 44px; padding: 0 var(--s-2); border-radius: 10px; font-weight: 650; font-size: .92rem; color: var(--text-2); cursor: pointer; user-select: none; text-align: center; transition: background .15s, color .15s; }
.seg label:hover { background: rgba(15, 23, 19, .05); }
.seg input:checked + label { background: var(--ink); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.seg input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; }
.seg-sm label { min-height: 44px; padding: 0 var(--s-5); }

/* Number input with steppers */
.num-input { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: var(--s-2); }
.step { height: 56px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--ink); transition: background .15s, border-color .15s, transform .1s; }
.step:hover { background: var(--surface-2); border-color: var(--ink); }
.step:active { transform: scale(.96); }
.num-wrap { position: relative; }
.num-wrap input { width: 100%; height: 56px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); padding: 0 62px 0 var(--s-4); font-size: 1.5rem; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.num-wrap input:hover { border-color: var(--ink); }
.num-wrap input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 122, 79, .18); }
.num-wrap input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(180, 35, 24, .12); }
.suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-weight: 650; font-size: .95rem; pointer-events: none; }

/* Selects */
select {
  width: 100%; height: 48px; padding: 0 40px 0 var(--s-3); border: 1.5px solid var(--line-strong); border-radius: 12px; background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2318211c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; appearance: none; -webkit-appearance: none; font-weight: 600; color: var(--ink); cursor: pointer;
}
select:hover { border-color: var(--ink); }
select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 122, 79, .18); }
.effort { margin-top: var(--s-3); }
.effort[hidden] { display: none; }

.adv { border-top: 1px solid var(--line); padding-top: var(--s-3); }
.adv summary { cursor: pointer; font-weight: 650; font-size: .93rem; color: var(--text-2); min-height: 32px; display: flex; align-items: center; }
.adv .field { margin-top: var(--s-3); display: grid; gap: 6px; }

/* Buttons */
.form-actions { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 52px; padding: 0 var(--s-5); border-radius: 14px; border: 1.5px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; transition: background .15s, transform .1s, border-color .15s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-primary .i { color: var(--volt); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); padding: 0 var(--s-4); }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface-2); }

/* ---------- Headline result (dark) ---------- */
.hero-result {
  background: radial-gradient(110% 80% at 100% 0%, rgba(212, 255, 92, .16), transparent 58%), var(--ink);
  color: #fff; border-color: transparent; padding: var(--s-5) var(--s-4) var(--s-4);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4); min-height: 360px;
}
@media (min-width: 720px) { .hero-result { padding: var(--s-6) var(--s-6) var(--s-5); } }
.eyebrow { margin: 0 0 var(--s-2); font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .68); }
.big { margin: 0; display: flex; align-items: baseline; gap: var(--s-2); line-height: 1; }
.big-num { font-size: clamp(3.6rem, 2.3rem + 6.5vw, 6rem); font-weight: 800; letter-spacing: -.045em; color: var(--volt); font-variant-numeric: tabular-nums; }
.big-unit { font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem); font-weight: 700; color: rgba(255, 255, 255, .8); }
.alt { margin: var(--s-2) 0 0; color: rgba(255, 255, 255, .78); font-weight: 600; font-variant-numeric: tabular-nums; }
.basis { margin: var(--s-3) 0 0; font-size: .92rem; color: rgba(255, 255, 255, .78); max-width: 52ch; }
.range { position: relative; height: 22px; margin: var(--s-5) 0 var(--s-1); }
.track { position: absolute; left: 0; right: 0; top: 50%; height: 6px; transform: translateY(-50%); border-radius: 6px; background: rgba(255, 255, 255, .18); }
.dot { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: rgba(255, 255, 255, .8); }
.dot-main { width: 22px; height: 22px; margin: -11px 0 0 -11px; background: var(--volt); box-shadow: 0 0 0 5px rgba(212, 255, 92, .25); }
.range-labels { display: flex; justify-content: space-between; margin: 0; font-size: .82rem; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
.agree { margin: var(--s-4) 0 0; color: rgba(255, 255, 255, .8); font-size: .92rem; }
.warn { display: flex; gap: var(--s-2); align-items: flex-start; margin: var(--s-4) 0 0; padding: 10px var(--s-3); border-radius: var(--r-sm); background: rgba(255, 205, 96, .14); color: #ffe7b0; font-size: .88rem; line-height: 1.45; }
.warn .i { margin-top: 2px; }
.empty { padding: var(--s-4) 0; }
.empty-msg { font-size: 1.25rem; font-weight: 650; max-width: 30ch; color: rgba(255, 255, 255, .92); line-height: 1.35; }
.headline.pulse .big-num { animation: pop .35s ease-out; }
@keyframes pop { from { opacity: .55; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: var(--s-2); }
.btn-solid { min-height: 46px; padding: 0 var(--s-3); font-size: .92rem; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.btn-solid:hover:not(:disabled) { background: rgba(255, 255, 255, .2); }
.btn-solid:disabled { opacity: .4; cursor: not-allowed; }
.disclaimer-s { margin: 0; font-size: .8rem; color: rgba(255, 255, 255, .6); }

/* ---------- Results grid ---------- */
.results { display: grid; gap: var(--s-4); margin-top: var(--s-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .results { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-5); }
  .block { grid-column: span 6; }
  .block-wide { grid-column: 1 / -1; }
  #h-tm, .block:has(#h-tm) { }
  .block.tm-card { grid-column: span 5; }
  .block.warm-card { grid-column: span 7; }
}
.block { padding: var(--s-4); container-type: inline-size; }
@media (min-width: 720px) { .block { padding: var(--s-5); } }
.block h2 { font-size: 1.35rem; margin-bottom: var(--s-2); }
.intro { color: var(--text-2); font-size: .95rem; margin-bottom: var(--s-4); max-width: 70ch; }
.foot { color: var(--text-3); font-size: .88rem; margin: var(--s-3) 0 0; }
.results.is-stale .table-scroll, .results.is-stale .tm { opacity: .4; filter: grayscale(.6); pointer-events: none; }

.field-row { display: grid; gap: var(--s-3); margin-bottom: var(--s-3); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field.inline { display: grid; gap: 6px; margin-bottom: var(--s-3); }
.field.inline label { font-weight: 700; font-size: .9rem; }

/* Tables */
.table-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .98rem; }
.tbl th, .tbl td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 750; white-space: nowrap; }
.tbl tbody th, .tbl tfoot th { font-weight: 650; color: var(--ink); }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl .strong { font-weight: 750; color: var(--ink); }
.tbl .u { font-weight: 500; color: var(--text-3); font-size: .85em; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot th, .tbl tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 12px; font-weight: 750; }
.is-yours { background: rgba(212, 255, 92, .3); }
.is-yours th { border-radius: 8px 0 0 8px; }
.tag { margin-left: var(--s-2); padding: 2px 8px; border-radius: 99px; background: var(--ink); color: var(--volt); font-size: .68rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.is-top th, .is-top td { background: rgba(212, 255, 92, .3); font-weight: 750; }
.zone-col { display: none; color: var(--text-2); }
.zone-inline { display: block; font-size: .75rem; font-weight: 500; color: var(--text-3); }
@container (min-width: 500px) {
  .zone-col { display: table-cell; }
  .zone-inline { display: none; }
}
.tbl .zone-col { font-size: .9rem; }

/* Formula table */
.formulas { min-width: 300px; }
.formulas .delta { color: var(--text-2); font-size: .92rem; }
.formulas .tog { width: 52px; text-align: right; padding-right: 0; }
.f-row.is-off .num { opacity: .5; }
.f-row.is-off .fname { color: var(--text-3); }
.check { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-strong); background: var(--surface); flex: none; display: grid; place-items: center; transition: background .12s, border-color .12s; }
.check input:checked + .box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .box::after { content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.check input:focus-visible + .box { outline: 3px solid var(--brand); outline-offset: 2px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; color: var(--ink); }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn .i { transition: transform .2s; }
.icon-btn[aria-expanded="true"] .i { transform: rotate(180deg); }
.math-row td { background: var(--surface-2); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.math-row[hidden] { display: none; }
.math-row p { margin: 0 0 var(--s-2); font-size: .92rem; }
.math-row p:last-child { margin: 0; }
.math-row code { font-family: var(--font-mono); font-size: .86rem; background: var(--surface); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.where { color: var(--text-3); font-size: .85rem; }
.fnote { color: var(--text-2); }

/* Training max */
.tm { padding: var(--s-4); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.tm-num { margin: 0; font-size: 3rem; line-height: 1.05; font-weight: 800; letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tm-num .u { font-size: 1.2rem; font-weight: 650; color: var(--text-3); letter-spacing: 0; }
.tm-sub { margin: var(--s-2) 0 0; color: var(--text-2); font-size: .93rem; }
.tm-use { margin: var(--s-4) 0 0; padding-left: 1.1em; color: var(--text-2); font-size: .93rem; }
.tm-use li { margin-bottom: 6px; }

/* ---------- Content ---------- */
.ad-slot { display: none; }
.ads-on .ad-slot { display: block; min-height: 280px; margin-block: var(--s-5); text-align: center; }

.prose { padding-block: var(--s-7) var(--s-4); max-width: 820px; margin-inline: auto; }
.prose h2, .tools h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem); margin-bottom: var(--s-4); }
.prose p { color: var(--text-2); }
.steps { counter-reset: s; list-style: none; margin: var(--s-5) 0; padding: 0; display: grid; gap: var(--s-4); }
.steps li { counter-increment: s; position: relative; padding-left: 52px; color: var(--text-2); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 12px; background: var(--ink); color: var(--volt); display: grid; place-items: center; font-weight: 800; }
.steps strong { color: var(--ink); }
.note-box { background: var(--warn-bg); color: var(--warn-text); border-radius: var(--r); padding: var(--s-4); border: 1px solid #f0dca4; }
.tools { padding-block: var(--s-6) var(--s-8); }
.tool-grid { display: grid; gap: var(--s-3); }
@media (min-width: 720px) { .tool-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); } }
.tool-card { display: grid; gap: 6px; padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--ink); }
.tool-card .t { font-weight: 750; font-size: 1.1rem; }
.tool-card .d { color: var(--text-2); font-size: .93rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .8); padding-top: var(--s-7); }
.site-footer .brand { color: #fff; }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: var(--volt); text-decoration: underline; }
.foot-grid { display: grid; gap: var(--s-5); grid-template-columns: 1fr 1fr; }
.foot-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .foot-grid > div:first-child { grid-column: auto; } }
.foot-grid nav { display: grid; gap: 2px; align-content: start; }
.foot-grid nav a { display: block; padding: 6px 0; min-height: 36px; }
.foot-grid h2 { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: var(--s-2); }
.fine { margin-top: var(--s-3); font-size: .93rem; max-width: 34ch; }
.legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: var(--s-6); padding-block: var(--s-4) var(--s-5); font-size: .85rem; color: rgba(255, 255, 255, .6); }
.legal p { margin: 0; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 99px; font-weight: 650; font-size: .93rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.print-only { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 380px) {
  .num-input { grid-template-columns: 48px minmax(0, 1fr) 48px; }
  .step { height: 52px; }
  .num-wrap input { height: 52px; font-size: 1.35rem; padding-right: 54px; }
  .seg label { font-size: .85rem; padding: 0 4px; }
  .tbl th, .tbl td { padding: 10px 5px; }
  .tbl { font-size: .93rem; }
}

/* ---------- Print / Save as PDF ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .skip, .hero, .form, .actions, .disclaimer-s, .ad-slot, .toast, .prose, .tools,
  .step, .tog, .field.inline, .field-row, .intro, .nav-toggle, .tm-use { display: none !important; }
  .calc { display: block; }
  .card { box-shadow: none; border: 1px solid #999; border-radius: 8px; break-inside: avoid; margin-bottom: 10mm; }
  .hero-result { background: #fff !important; color: #000; min-height: 0; padding: 8mm; }
  .big-num, .big-unit, .eyebrow, .alt, .basis, .range-labels { color: #000 !important; }
  .range { display: none; }
  .results { display: block; margin: 0; }
  .block { padding: 6mm; }
  .math-row { display: none !important; }
  .check .box { display: none; }
  .print-only { display: block; white-space: pre-wrap; font: 9.5pt/1.4 var(--font-mono); border-top: 1px solid #999; padding-top: 6mm; margin: 0 var(--s-4) 8mm; }
  .zone-col { display: table-cell; } .zone-inline { display: none; }
  .is-yours, .is-top th, .is-top td { background: #eee !important; }
}
