/* gstcalculator.co.nz styles. House rule: no em dashes or en dashes anywhere.
   BRAND TOKENS (17 November 2026, from the chosen logo pack brand/README.txt): every colour on the site comes from these
   tokens. Violet #4F3BD1 primary, Deep violet #3D2BB0 pressed, Mint #7FE0B8 accent (GST figures and highlights, always with
   Ink text, never white text on mint and never mint text on a light background), Lilac #A99BFF dark-mode primary, Ink
   #15132B, Slate #5D5B73, Line #E4E2F0, Mist #F5F4FB, Night #0F0E1A, Night card #1B1930. Contrast of every text pair is
   checked in both themes (WCAG AA). */
:root {
  --brand: #4F3BD1;          /* Violet: buttons, links, active states (white text 7.3:1) */
  --brand-strong: #3D2BB0;   /* Deep violet: hover, pressed */
  --brand-ink: #FFFFFF;      /* text on --brand */
  --brand-soft: #ECE9FC;     /* violet tint */
  --brand-softer: #F5F4FB;   /* Mist */
  --mint: #7FE0B8;           /* Accent: GST figures and highlights, with Ink text */
  --mint-soft: #DDF6EB;
  --mint-ink: #15132B;
  --accent: #7FE0B8; --accent-soft: #DDF6EB;
  --ink: #15132B; --ink-2: #34324B; --muted: #5D5B73; --faint: #8B89A1;
  --bg: #F8F7FC; --surface: #FFFFFF; --surface-2: #F5F4FB; --surface-3: #ECEAF6;
  --line: #E4E2F0; --line-strong: #CDCAE2; --field-border: #8A87A4;
  --good: #11704A; --good-soft: #DDF6EB; --warn: #8F5200; --warn-soft: #FFF3DD; --bad: #B3261E; --bad-soft: #FDECEA;
  --focus: #3D2BB0;
  --foot-bg: #4F3BD1; --foot-ink: #FFFFFF; --foot-muted: rgba(255, 255, 255, .82); --foot-line: rgba(255, 255, 255, .22);
  --shadow-sm: 0 1px 2px rgba(21, 19, 43, .06), 0 1px 1px rgba(21, 19, 43, .04);
  --shadow: 0 1px 2px rgba(21, 19, 43, .05), 0 8px 24px -8px rgba(21, 19, 43, .14);
  --shadow-lg: 0 2px 4px rgba(21, 19, 43, .04), 0 24px 60px -20px rgba(41, 30, 120, .30);
  --hero-glow: radial-gradient(1200px 520px at 78% -10%, rgba(79, 59, 209, .14), transparent 60%), radial-gradient(800px 420px at 0% 0%, rgba(127, 224, 184, .16), transparent 60%);
  --radius: 14px; --radius-sm: 10px; --radius-lg: 20px;
  --font: "Plus Jakarta Sans", "Plus Jakarta Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #A99BFF; --brand-strong: #C4BAFF; --brand-ink: #15132B; --brand-soft: rgba(169, 155, 255, .16); --brand-softer: rgba(169, 155, 255, .08);
    --mint: #7FE0B8; --mint-soft: rgba(127, 224, 184, .14); --mint-ink: #15132B; --accent: #7FE0B8; --accent-soft: rgba(127, 224, 184, .14);
    --ink: #EEECFA; --ink-2: #D0CDE6; --muted: #A9A6C2; --faint: #7E7B99;
    --bg: #0F0E1A; --surface: #1B1930; --surface-2: #221F3B; --surface-3: #2A2747; --line: #2E2B4A; --line-strong: #403C66; --field-border: #6F6B96;
    --good: #7FE0B8; --good-soft: rgba(127, 224, 184, .13); --warn: #F2B65A; --warn-soft: rgba(242, 182, 90, .13); --bad: #FF8A80; --bad-soft: rgba(255, 138, 128, .13); --focus: #C4BAFF;
    --foot-bg: #1B1930; --foot-ink: #FFFFFF; --foot-muted: rgba(255, 255, 255, .78); --foot-line: rgba(255, 255, 255, .14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px -10px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .75);
    --hero-glow: radial-gradient(1200px 520px at 78% -10%, rgba(169, 155, 255, .16), transparent 60%), radial-gradient(800px 420px at 0% 0%, rgba(127, 224, 184, .07), transparent 60%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #A99BFF; --brand-strong: #C4BAFF; --brand-ink: #15132B; --brand-soft: rgba(169, 155, 255, .16); --brand-softer: rgba(169, 155, 255, .08);
  --mint: #7FE0B8; --mint-soft: rgba(127, 224, 184, .14); --mint-ink: #15132B; --accent: #7FE0B8; --accent-soft: rgba(127, 224, 184, .14);
  --ink: #EEECFA; --ink-2: #D0CDE6; --muted: #A9A6C2; --faint: #7E7B99;
  --bg: #0F0E1A; --surface: #1B1930; --surface-2: #221F3B; --surface-3: #2A2747; --line: #2E2B4A; --line-strong: #403C66; --field-border: #6F6B96;
  --good: #7FE0B8; --good-soft: rgba(127, 224, 184, .13); --warn: #F2B65A; --warn-soft: rgba(242, 182, 90, .13); --bad: #FF8A80; --bad-soft: rgba(255, 138, 128, .13); --focus: #C4BAFF;
  --foot-bg: #1B1930; --foot-ink: #FFFFFF; --foot-muted: rgba(255, 255, 255, .78); --foot-line: rgba(255, 255, 255, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px -10px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .75);
  --hero-glow: radial-gradient(1200px 520px at 78% -10%, rgba(169, 155, 255, .16), transparent 60%), radial-gradient(800px 420px at 0% 0%, rgba(127, 224, 184, .07), transparent 60%);
  color-scheme: dark;
}

/* Plus Jakarta Sans (SIL OFL 1.1), self-hosted variable font, weights 400 to 700: latin, and latin-ext for te reo macrons.
   The fallback is Arial with metrics adjusted to Plus Jakarta Sans, so the swap does not shift the layout. */
@font-face { font-family: "Plus Jakarta Sans"; src: url(/fonts/plus-jakarta-sans-latin.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(/fonts/plus-jakarta-sans-latin-ext.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans Fallback"; src: local("Arial"); size-adjust: 104%; ascent-override: 98%; descent-override: 21%; line-gap-override: 0%; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:lang(zh) body, body:lang(zh) { font-family: var(--font), "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(hi) body, body:lang(hi) { font-family: var(--font), "Nirmala UI", "Noto Sans Devanagari", sans-serif; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { text-wrap: balance; line-height: 1.15; letter-spacing: -.022em; margin: 0 0 .5em; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); letter-spacing: -.035em; font-weight: 750; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); }
h3 { font-size: 1.1rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
small { font-size: .85em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.tnum, .fig strong, table td, .steps b, .amount-input input { font-variant-numeric: tabular-nums; }
.js .no-js, .js-only, .js-only-flex, .js-only-block { display: none !important; }
.js .js-only { display: inline-flex !important; } .js .js-only-flex { display: flex !important; } .js .js-only-block { display: block !important; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .9rem; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin: 0 0 10px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, var(--shadow-sm); }
.btn:hover { background: var(--brand-strong); color: var(--brand-ink); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .92rem; border-radius: 10px; }
.btn.link { background: none; border: 0; box-shadow: none; color: var(--brand); padding: 0 4px; }
.btn svg { flex: none; }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.12rem; letter-spacing: -.025em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small { font-weight: 500; color: var(--muted); font-size: .82em; margin-left: 2px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; padding: 8px 11px; border-radius: 9px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.head-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--brand); border-color: var(--line-strong); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; } :root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .sun { display: none; } :root:not([data-theme="light"]) .theme-toggle .moon { display: block; } }
.lang summary, .menu summary { list-style: none; cursor: pointer; }
.lang summary::-webkit-details-marker, .menu summary::-webkit-details-marker { display: none; }
.lang { position: relative; }
.lang summary { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.lang > div, .menu-panel { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; min-width: 190px; z-index: 50; }
.lang > div a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang > div a:hover, .lang > div a[aria-current] { background: var(--brand-soft); }
.menu { position: relative; }
.menu summary { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; background: var(--surface); }
.bars { display: grid; gap: 4px; } .bars i { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.menu-panel { width: min(560px, calc(100vw - 32px)); display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 14px; max-height: calc(100vh - 90px); overflow: auto; }
.menu-panel a { display: block; padding: 7px 10px; color: var(--ink); text-decoration: none; border-radius: 8px; font-size: .95rem; }
.menu-panel a:hover, .menu-panel a[aria-current] { background: var(--brand-soft); }
.menu-h { margin: 10px 10px 4px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.review { background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: .88rem; padding: 8px 0; color: var(--ink-2); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; background: var(--hero-glow), var(--bg); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(700px 380px at 75% 20%, #000, transparent 75%); -webkit-mask-image: radial-gradient(700px 380px at 75% 20%, #000, transparent 75%); opacity: .45; pointer-events: none; }
.hero > .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 52px; align-items: start; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { margin-bottom: 18px; }
.hero h1 .line2 { display: block; color: var(--brand); font-size: .62em; letter-spacing: -.03em; line-height: 1.15; margin-top: 10px; font-weight: 700; }
.hero-copy, .hero-app { min-width: 0; }
.hero .lead { font-size: 1.16rem; color: var(--ink-2); max-width: 34em; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .8rem; white-space: nowrap; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.points { list-style: none; padding: 0; margin: 30px 0 0; border-top: 1px solid var(--line); }
.points li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 15px 0 0; }
.points .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--brand); box-shadow: var(--shadow-sm); }
.points b { display: block; font-size: 1rem; }
.points span { color: var(--muted); font-size: .94rem; }
.trustline { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .88rem; margin-top: 22px; }

/* ---------- The app window ---------- */
.appwin { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.appwin-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.appwin-bar .dots { display: flex; gap: 6px; } .appwin-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.appwin-bar .addr { font-size: .78rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; }
.appwin-bar .grow { flex: 1; }
.tabs { display: flex; gap: 6px; padding: 12px 14px 0; }
.tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-weight: 650; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.tab:hover { border-color: var(--line-strong); color: var(--ink); }
.tab[aria-selected="true"], .tab.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
:root[data-theme="dark"] .tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); } }
.tab .tdot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .55; }
.panel-body { padding: 16px 18px 18px; }
.amount-input { position: relative; display: block; }
.amount-input > span.lbl { display: block; font-size: .82rem; font-weight: 650; color: var(--muted); margin: 0 0 6px; letter-spacing: .02em; }
.amount-input .box { display: flex; align-items: center; gap: 4px; border: 1.5px solid var(--line-strong); border-radius: 16px; background: var(--surface); padding: 0 16px; transition: border-color .15s, box-shadow .15s; }
.amount-input .box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.amount-input .cur { font-size: 2rem; font-weight: 600; color: var(--faint); }
.amount-input input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: clamp(2rem, 1.6rem + 1.6vw, 2.7rem); font-weight: 700; letter-spacing: -.03em; padding: 10px 0; }
.amount-input .clear { border: 0; background: var(--surface-2); color: var(--muted); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.quick-chips button { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.quick-chips button:hover { border-color: var(--brand); color: var(--brand); }
.history { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--muted); font-weight: 650; }
.history-head button { border: 0; background: none; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.history ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.history li button, .history li a { display: inline-flex; gap: 8px; align-items: baseline; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 6px 10px; font: inherit; font-size: .84rem; color: var(--ink); cursor: pointer; text-decoration: none; }
.history li button:hover, .history li a:hover { border-color: var(--brand); }
.history li small { color: var(--muted); }
.history .empty { font-size: .84rem; color: var(--faint); }

/* ---------- Results ---------- */
.result { position: relative; }
.result-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.result-head b { font-size: 1.15rem; letter-spacing: -.015em; }
.result-head span { color: var(--muted); font-size: .9rem; }
.halves { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.half { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: linear-gradient(180deg, var(--surface-2), var(--surface) 70%); animation: rise .35s ease both; }
.half.remove { animation-delay: .04s; }
.half header { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 8px; }
.half header small { color: var(--muted); font-size: .82rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.half.remove .pill { background: var(--mint); color: var(--mint-ink); }
.fig { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.half .fig:first-of-type, .figs .fig { border-top: 0; }
.fig small { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; font-weight: 600; }
.fig strong { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; }
.fig.big strong { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); letter-spacing: -.035em; line-height: 1.1; }
.half.add .fig.big strong { color: var(--brand); }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0 0 14px; }
.figs .fig { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.figs .fig.big { background: var(--brand-softer); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.figs .fig.big strong { color: var(--brand); font-size: clamp(1.45rem, 1.1rem + .9vw, 1.85rem); }
.fig strong { overflow-wrap: normal; word-break: normal; }
.figs .fig { min-width: 0; }
.copy { display: none; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 9px; padding: 0; width: 34px; height: 34px; font: inherit; font-size: .8rem; font-weight: 650; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.js .copy { display: inline-flex; }
.copy span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.copy.done svg { display: none; } .copy.done::after { content: "¹3"; font-weight: 800; }
.copy:hover { color: var(--brand); border-color: var(--brand); }
.copy.done { background: var(--good-soft); color: var(--good); border-color: transparent; }
.working h3, .how summary { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.how summary { cursor: pointer; margin: 10px 0 0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .92rem; counter-increment: s; }
.steps li > span { color: var(--ink-2); }
.steps li > b { font-weight: 650; text-align: right; }
.steps li > em { grid-column: 1 / -1; font-style: normal; font-size: .78rem; }
.steps li.total > span, .steps li.total > b { font-weight: 750; color: var(--ink); }
.ref { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--faint); }
.ref:hover { color: var(--brand); }
.exactnote { font-size: .82rem; color: var(--muted); margin: 8px 0 0; }
.notes { margin: 14px 0 0; padding: 12px 14px 12px 30px; background: var(--surface-2); border-radius: 12px; font-size: .88rem; color: var(--ink-2); }
.notes li + li { margin-top: 6px; }
.callout { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--brand-softer); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); font-size: .92rem; }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, var(--line)); }
.callout ul { margin: 6px 0; padding-left: 20px; } .callout small { display: block; color: var(--muted); margin-top: 6px; }
.verdict { font-size: 1.02rem; font-weight: 550; }
.result.good .result-head b { color: var(--good); } .result.warn .result-head b { color: var(--warn); }
.is-error { border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--bad-soft); border-radius: 12px; padding: 12px 14px; }
.err-lead { font-weight: 650; color: var(--bad); margin: 0 0 4px; } .err-list { margin: 0; padding-left: 20px; font-size: .92rem; }
.field-err { display: block; color: var(--bad); font-size: .84rem; font-weight: 600; margin-top: 4px; }
[aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-soft) !important; }
.meter { position: relative; height: 12px; border-radius: 999px; background: var(--surface-3); overflow: visible; margin: 14px 0 4px; }
.meter span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .4s ease; }
.meter-l { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin: 0 0 12px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.mini { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 10px 0 0; }
table.mini th { text-align: left; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.mini td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.mini td small { display: block; color: var(--muted); }
table.mini tr.hit td { background: var(--brand-softer); font-weight: 650; }
table.mini tr.total td { font-weight: 750; border-top: 2px solid var(--ink); }
table.mini tr.sub td { font-weight: 650; background: var(--surface-2); }
table.mini tr.muted td { color: var(--muted); }
table.mini td:last-child, table.mini th:last-child { text-align: right; }
table.boxes td:first-child { width: 2.5em; color: var(--brand); }

/* ---------- Calculator pages ---------- */
.page-hero { background: var(--hero-glow), var(--bg); border-bottom: 1px solid var(--line); }
.page-hero .wrap { padding-top: 28px; padding-bottom: 36px; }
.page-hero h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); max-width: 22em; }
.page-hero .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 46em; }
.crumbs { font-size: .86rem; color: var(--muted); padding-top: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--brand); }
.tool { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0; margin-top: 22px; }
.tool > form { padding: 20px; border-right: 1px solid var(--line); }
.tool > .out { padding: 20px; background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.tool .out-inner { position: sticky; top: 90px; }
.tool-wide { grid-template-columns: 1fr; } .tool-wide > form { border-right: 0; border-bottom: 1px solid var(--line); }
.answer { margin: 18px 0 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; max-width: 60em; box-shadow: var(--shadow-sm); }
.answer p { margin: 0; } .answer .eyebrow { margin-bottom: 4px; }
.example-tag { font-size: .82rem; color: var(--muted); margin: 0 0 10px; }
.result-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Fields */
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 6px; color: var(--ink); }
.field > small { display: block; color: var(--muted); font-size: .82rem; margin-top: 5px; }
.field input, .field select, .field textarea, .cell input, .cell select { width: 100%; min-height: 46px; border: 1.5px solid var(--line-strong); border-radius: 11px; padding: 10px 12px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 130px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }
.field input:focus, .field select:focus, .field textarea:focus, .cell input:focus, .cell select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.money { position: relative; display: block; }
.money::before { content: "$"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); font-weight: 600; pointer-events: none; }
.money input { padding-left: 26px; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; } .row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 10px; }
.radios { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.radios legend { font-weight: 600; font-size: .92rem; margin: 0 0 6px; padding: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg label { flex: 1 1 auto; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 8px 12px; border-radius: 9px; font-size: .9rem; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); outline: 1px solid var(--line); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: .95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.sub { font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
details.more { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin: 0 0 14px; background: var(--surface-2); }
details.more > summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: .92rem; }
.privacy-note { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); margin: 6px 0 0; }

/* Repeating rows (invoice lines, transactions, periods) */
.lines { display: grid; gap: 8px; margin: 0 0 10px; }
.line { display: grid; gap: 6px; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.5fr) 36px; align-items: end; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); animation: rise .25s ease both; }
.line.tx { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1.4fr) minmax(0, .9fr) 36px; }
.line.per { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
.cell { display: block; min-width: 0; }
.cell > span { display: block; font-size: .72rem; font-weight: 650; color: var(--muted); margin: 0 0 3px; text-transform: uppercase; letter-spacing: .04em; }
.cell input, .cell select { min-height: 40px; padding: 7px 9px; font-size: .95rem; border-width: 1px; border-radius: 9px; }
.cell.money::before { top: auto; bottom: 10px; transform: none; left: 10px; }
.cell.money input { padding-left: 21px; }
.cell .field-err { font-size: .74rem; }
.rm { width: 36px; height: 40px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 9px; cursor: pointer; font-size: 1.1rem; }
.rm:hover { color: var(--bad); border-color: var(--bad); }
.row-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }

/* Bulk CSV */
.drop { display: grid; place-items: center; text-align: center; gap: 6px; padding: 26px 16px; border: 2px dashed var(--line-strong); border-radius: 16px; background: var(--surface-2); color: var(--muted); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--brand); background: var(--brand-softer); }
.drop b { color: var(--ink); }
.preview { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.preview table { margin: 0; } .preview th { position: sticky; top: 0; background: var(--surface); }
.preview td.new { background: var(--brand-softer); font-weight: 600; }
.preview td.bad { background: var(--bad-soft); }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

/* ---------- Sections and cards ---------- */
section.band { padding: 64px 0; }
section.band.soft { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.tight { padding: 32px 0; }
.section-head { max-width: 46em; margin: 0 0 28px; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); color: var(--ink); }
.card h3 { margin: 0; font-size: 1.04rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.card .go { font-size: .88rem; font-weight: 650; color: var(--brand); margin-top: 6px; }
.card .ci { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 6px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 40px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip > :first-child { order: 2; }
.feature h2 { font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.2rem); letter-spacing: -.03em; }
.feature p { color: var(--ink-2); font-size: 1.06rem; }
.feature .mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px; }
.mock .mock-h { display: flex; justify-content: space-between; align-items: baseline; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.mock .bigline { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--brand-softer); margin-top: 10px; font-weight: 700; }
.mock .bigline strong { font-size: 1.4rem; color: var(--brand); letter-spacing: -.02em; }
.phone { width: 230px; margin: 0 auto; border: 10px solid var(--ink); border-radius: 36px; background: var(--surface); box-shadow: var(--shadow-lg); padding: 16px 12px; aspect-ratio: 9 / 17.5; display: flex; flex-direction: column; gap: 10px; }
.phone .ph-top { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.phone .ph-top img { width: 26px; height: 26px; border-radius: 7px; }
.phone .ph-amt { border: 1.5px solid var(--brand); border-radius: 12px; padding: 8px 10px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }
.phone .ph-row { display: flex; justify-content: space-between; font-size: .85rem; padding: 6px 0; border-bottom: 1px solid var(--line); }
.phone .ph-row b { color: var(--brand); }
.phone .ph-off { margin-top: auto; text-align: center; font-size: .75rem; color: var(--good); font-weight: 650; background: var(--good-soft); border-radius: 999px; padding: 4px; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.strip > div { padding: 20px 22px; }
.strip > div + div { border-left: 1px solid var(--line); }
.strip strong { display: block; font-size: 1.7rem; letter-spacing: -.03em; color: var(--ink); }
.strip span { color: var(--muted); font-size: .9rem; }
.formula { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.formula > div { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.formula code { display: block; font-size: 1.35rem; font-weight: 700; padding: 10px 12px; margin: 10px 0; background: var(--surface-2); border-radius: 10px; }
.faq { display: grid; gap: 10px; max-width: 900px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details > div { padding: 0 0 14px; color: var(--ink-2); }

/* ---------- Prose, guides, reference ---------- */
.page-head { background: var(--hero-glow), var(--bg); border-bottom: 1px solid var(--line); padding: 8px 0 34px; }
.page-head h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.7rem); max-width: 24em; margin-top: 10px; }
.page-head .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 46em; }
.byline { color: var(--muted); font-size: .92rem; }
.inshort { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 14px 16px; max-width: 52em; box-shadow: var(--shadow-sm); }
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.8em; } .prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li + li { margin-top: .35em; }
.prose table { width: 100%; }
.guide { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-top: 32px; padding-bottom: 48px; }
.aside { position: sticky; top: 90px; align-self: start; display: grid; gap: 14px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.box h3 { margin-top: 0; }
.toc { background: var(--surface-2); border-radius: 12px; padding: 14px 18px; margin: 0 0 24px; font-size: .94rem; }
.toc ol { margin: 6px 0 0; padding-left: 1.2em; }
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .94rem; margin: 10px 0 16px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--surface-2); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.st-pass { color: var(--good); font-weight: 700; } .st-fail { color: var(--bad); font-weight: 700; }
.src { font-size: .86rem; color: var(--muted); }
.sources, .sources-line { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.sources h2, .sources-line h2 { font-size: 1.1rem; }
.sources ul, .sources-line ul { padding-left: 1.2em; font-size: .92rem; }
.tag-notlaw { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; padding: 2px 8px; border-radius: 6px; background: var(--bad-soft); color: var(--bad); vertical-align: middle; white-space: nowrap; }
.status { border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line)); background: var(--surface); border-radius: var(--radius); padding: 16px 18px; margin: 20px 0; }
.status h2 { font-size: 1.2rem; margin-top: 0; }
.status ul { padding-left: 1.2em; }
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.bigrate { display: grid; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 0 0 20px; }
.bigrate strong { font-size: 2rem; letter-spacing: -.03em; color: var(--brand); }
.ad-slot { display: none; }

/* ---------- Footer ---------- */
.site-foot { background: var(--foot-bg); color: var(--foot-muted); margin-top: 0; padding: 48px 0 28px; }
.site-foot a { color: var(--foot-ink); text-decoration: none; } .site-foot a:hover { color: var(--foot-ink); text-decoration: underline; }
.site-foot .brand { color: var(--foot-ink); } .site-foot .lockup { display: block; width: 236px; height: auto; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--foot-muted); margin: 4px 0 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: .93rem; }
.foot-grid p { font-size: .92rem; }
.fine { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--foot-line); margin-top: 32px; padding-top: 18px; font-size: .84rem; color: var(--foot-muted); }

/* ---------- Toast, result bar, install ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.result-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .25); font-size: .92rem; font-weight: 600; }
.result-bar a { white-space: nowrap; }
.js .install, .install { display: none !important; }
.js .install.on { display: inline-flex !important; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--brand-soft); } 100% { box-shadow: 0 0 0 10px transparent; } }
.flash { animation: pulse .6s ease; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero > .wrap, .tool, .feature, .guide { grid-template-columns: minmax(0, 1fr) !important; }
  .nav { display: none; }
  .head-tools { margin-left: auto; }
  .hero > .wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 26px; padding-bottom: 36px; }
  .hero .hero-copy .points, .hero .hero-copy .trustline { display: none; }
  .hero-points-mobile { display: block !important; }
  .feature { grid-template-columns: 1fr; gap: 24px; } .feature.flip > :first-child { order: 0; }
  .guide { grid-template-columns: 1fr; } .aside { position: static; }
  .tool { grid-template-columns: 1fr; } .tool > form { border-right: 0; border-bottom: 1px solid var(--line); } .tool .out-inner { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .strip { grid-template-columns: 1fr 1fr; } .strip > div:nth-child(3) { border-left: 0; } .strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.hero-points-mobile { display: none; }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  body { font-size: 15.5px; }
  .site-head .wrap { min-height: 58px; gap: 10px; }
  .brand { font-size: 1.02rem; } .brand small { display: none; }
  .lang summary { padding: 0 8px; } .lang summary .lname { display: none; }
  .hero h1 { font-size: 2rem; margin-bottom: 10px; }
  .hero .lead { font-size: 1rem; margin-bottom: 0; }
  .badge-row { display: none; }
  .appwin { border-radius: 16px; margin: 0 -4px; }
  .appwin-bar { display: none; }
  .tabs { padding: 10px 10px 0; gap: 4px; } .tab { font-size: .86rem; min-height: 40px; padding: 0 6px; } .tab .tdot { display: none; }
  .panel-body { padding: 12px; }
  .halves { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .half { padding: 10px; } .half header small { display: none; } .pill { font-size: .66rem; padding: 3px 7px; }
  .fig small { font-size: .74rem; }
  .steps li { font-size: .8rem; grid-template-columns: minmax(0, 1fr) auto; }
  .install.on span { display: none; } .js .install.on { padding: 0 10px; }
  .head-tools { gap: 4px; } .icon-btn, .menu summary { width: 38px; height: 38px; } .lang summary { height: 38px; }
  .hero h1 .line2 { font-size: .7em; }
  .quick-chips button:nth-of-type(n+5) { display: none; }
  .amount-input .cur { font-size: 1.6rem; }
  .row2, .row3, .row4 { grid-template-columns: 1fr; }
  .row2.keep { grid-template-columns: 1fr 1fr; }
  .line { grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr) minmax(0, 1fr) 34px; } .line .c-desc { grid-column: 1 / -1; }
  .line.tx { grid-template-columns: 1fr 1fr; } .line.tx .c-type { grid-column: 1 / -1; } .line.tx .rm { justify-self: end; grid-column: 2; }
  .rm { width: 34px; }
  .line.per { grid-template-columns: 1fr 1fr 36px; }
  .menu-panel { grid-template-columns: 1fr; position: fixed; left: 12px; right: 12px; width: auto; top: 66px; }
  .formula, .split2 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  section.band { padding: 44px 0; }
  .feature { padding: 28px 0; }
  .strip strong { font-size: 1.35rem; } .strip > div { padding: 14px; }
  .js .result-bar.show { display: flex; }
  .seg span { padding: 8px 8px; white-space: normal; }
  .tool > form, .tool > .out { padding: 14px; }
  .page-hero .wrap { padding-top: 14px; padding-bottom: 20px; } .page-hero .lead { font-size: 1rem; margin-bottom: .6em; } .answer { margin-top: 10px; padding: 10px 12px; } .answer p { font-size: .92rem; } .answer .eyebrow { font-size: .7rem; }
  section.tight { padding: 18px 0; }
  table.mini { font-size: .82rem; }
}

/* ---------- Print: the result and its working only ---------- */
@media print {
  .site-head, .site-foot, .crumbs, .tool > form, .result-tools, .copy, .ad-slot, .band, .faq, .result-bar, .toast, .explain, .more-tools, .history, .tabs, .appwin-bar, .install, .review { display: none !important; }
  body { background: #fff; color: #000; }
  .tool { display: block; } .tool > .out { background: none; padding: 0; }
  .appwin, .figs .fig, .half { box-shadow: none; border-color: #999; }
  a { color: #000; text-decoration: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.quick-chips > span { white-space: nowrap; }

/* ---------- Review fixes (17 Nov 2026) ---------- */
/* Money never clips: each figure scales with its own tile (container query units), and the headline gets a full row */
.fig { container-type: inline-size; }
.fig strong { white-space: nowrap; font-size: min(1.25rem, 8.5cqi); overflow: visible; }
.fig.big strong { font-size: min(2.3rem, 11.5cqi); }
.figs .fig.big strong { font-size: min(2.1rem, 10.5cqi); }
.half .fig.big strong { font-size: min(2.3rem, 13cqi); }
.figs { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.figs .fig.big { grid-column: 1 / -1; }
.figs.three .fig.big, .figs:has(.fig + .fig + .fig) .fig.big { grid-column: 1 / -1; }
.result-head b { overflow-wrap: anywhere; }
/* Empty amount box: a quiet prompt, never an error */
.is-empty { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 18px 16px; color: var(--muted); background: var(--surface-2); }
.empty-prompt { margin: 0; }
.working-h { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
/* Inner calculator pages: title and short answer side by side, tool higher */
.hero-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
.hero-split .answer { margin-top: 6px; }
.byline-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.byline-chips .chip { font-size: .76rem; padding: 4px 10px; box-shadow: none; }
.page-hero .wrap.hero-split { padding-top: 18px; padding-bottom: 22px; }
.page-hero h1 { margin-bottom: 10px; }
.tool-sec { padding-top: 18px; }
.appwin.inner { box-shadow: var(--shadow); }
/* Home tabs: a real tablist plus a separate link */
.tabs { align-items: stretch; }
.tablist { display: flex; gap: 6px; flex: 2; }
.tablist .tab { flex: 1; }
.tab-link { flex: 1; background: transparent; border-style: dashed; }
/* Ad slots: invisible until ads are live; then space is reserved so filling never shifts the page */
.ad-slot { display: none; }
.ads-live .ad-slot { display: block; min-height: 280px; margin: 24px auto; position: relative; }
.ads-live .ad-slot::before { content: "Advertisement"; position: absolute; top: -18px; left: 0; font-size: .72rem; color: var(--faint); }
@media (min-width: 900px) { .ads-live .ad-slot { min-height: 250px; } }
/* Offline chip and install */
.offline-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .78rem; font-weight: 700; white-space: nowrap; }
/* Language switcher: a language's home page when this page is not translated */
.lang a[data-home]::after { content: " (home page)"; color: var(--muted); font-size: .85em; }
/* Toast sits above the phone result bar */
.toast.above-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
/* Footer links in text are underlined (contrast in a block of text) */
.fine a, .foot-grid p a { text-decoration: underline; text-underline-offset: 3px; }
/* Remove-row button lines up with the inputs */
.line .rm { align-self: end; height: 40px; }
/* Invoice: printable document preview */
.doc-wrap { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px 14px; background: var(--surface); }
.doc-wrap > summary { cursor: pointer; padding: 12px 0; font-weight: 650; }
.invoice-doc { background: #FFFFFF; color: #111; border: 1px solid #DDD; border-radius: 8px; padding: 22px; font-size: .9rem; }
.invoice-doc p { margin: 0 0 2px; }
.invoice-doc .ph { color: #999; font-style: italic; }
.doc-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.doc-biz { font-weight: 750; font-size: 1.1rem; }
.doc-meta { text-align: right; }
.doc-title { font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; }
.doc-to { margin-bottom: 14px; } .doc-l { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #666; }
.doc-lines, .doc-totals { width: 100%; border-collapse: collapse; }
.doc-lines th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #555; border-bottom: 2px solid #111; padding: 6px 4px; }
.doc-lines td { border-bottom: 1px solid #E5E5E5; padding: 7px 4px; vertical-align: top; }
.doc-lines .n, .doc-totals .n { text-align: right; white-space: nowrap; }
.doc-totals { width: auto; margin: 12px 0 0 auto; min-width: 260px; } .doc-totals td { padding: 4px; } .doc-totals .grand td { font-weight: 800; border-top: 2px solid #111; }
.doc-note { margin-top: 10px !important; color: #444; }
/* Larger touch targets for fingers and gloves */
@media (pointer: coarse) {
  .copy { width: 44px; height: 44px; }
  .quick-chips button { min-height: 42px; padding: 0 14px; }
  .amount-input .clear { width: 44px; height: 44px; }
  .how summary, .doc-wrap > summary, details.more > summary { min-height: 44px; display: flex; align-items: center; }
  .rm { width: 44px; height: 44px; }
  .history li button, .history li a { min-height: 44px; }
}
@media (max-width: 1080px) { .hero-split { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
@media (max-width: 640px) {
  .quick-chips { flex-wrap: wrap; }
  .tabs { flex-wrap: wrap; } .tablist { flex: 1 1 100%; } .tab-link { flex: 1 1 100%; min-height: 38px; }
  .figs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* Invoice lines table: one card per line instead of six columns */
  table.stack thead { display: none; }
  table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: 2px 0; text-align: left !important; }
  table.stack td::before { content: attr(data-l); display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  table.stack td:first-child { grid-column: 1 / -1; font-weight: 650; }
  .doc-meta { text-align: left; }
  .offline-chip { display: none; }
}
/* Printing an invoice or quote: only the document */
@media print {
  .print-doc body * { visibility: hidden; }
  .print-doc .invoice-doc, .print-doc .invoice-doc * { visibility: visible; }
  .print-doc .invoice-doc { position: absolute; left: 0; top: 0; width: 100%; border: 0; padding: 0; }
  .print-doc .doc-wrap { border: 0; }
}
@media (max-width: 640px) { .offline-chip { display: inline-flex; position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; box-shadow: var(--shadow); } .offline-chip[hidden] { display: none; } }
.field textarea[name="notes"] { min-height: 64px; font-family: inherit; font-size: 1rem; }
@media print { .print-doc .result, .print-doc .out-inner, .print-doc .out, .print-doc .tool, .print-doc .appwin, .print-doc .doc-wrap, .print-doc section, .print-doc main { position: static !important; transform: none !important; } .print-doc .invoice-doc { top: 0 !important; } }
.phone .ph-off { color: var(--brand-strong); font-weight: 750; }

/* Brand (17 Nov 2026): mint marks the GST figures (Ink text on a mint highlight, never mint text on white) */
.half .fig:not(.big) strong, .figs .fig.gst strong { justify-self: start; background: linear-gradient(transparent 60%, var(--mint) 60%, var(--mint) 88%, transparent 88%); background-size: 100% 100%; padding: 0 3px; color: var(--ink); }
:root[data-theme="dark"] .half .fig:not(.big) strong { background: linear-gradient(transparent 82%, var(--mint) 82%, var(--mint) 94%, transparent 94%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .half .fig:not(.big) strong { background: linear-gradient(transparent 82%, var(--mint) 82%, var(--mint) 94%, transparent 94%); } }
.chip .dot { background: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
.meter span { background: linear-gradient(90deg, var(--brand), var(--mint)); }
.brand-name { font-weight: 700; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-weight: 700; }
h1, h2, h3, .brand { font-weight: 700; }
body { font-weight: 500; }
.lead, .prose p, .faq details > div { font-weight: 400; }
.fig strong, .steps b, table td, .amount-input input, .strip strong, .bigrate strong { font-variant-numeric: tabular-nums lining-nums; }
.phone { border-color: #15132B; }

/* Form fields: an outline of at least 3:1 against the card (WCAG 1.4.11) */
.field input, .field select, .field textarea, .cell input, .cell select, .amount-input .box { border-color: var(--field-border); }
.seg { border-color: var(--field-border); }
.seg input:checked + span { background: var(--surface); color: var(--ink); outline: 1.5px solid var(--brand); box-shadow: var(--shadow-sm); }
