/* zeuscoffer.com: shared look for the homepage, Learn and Support. Colours are the app's Zeus Illustrated tokens
   (mobile/src/components/olympus.tsx and theme/accents.ts, Sky accent). Light and dark follow the visitor's setting;
   .night forces the dark set, for bands that show the app. */
:root {
  --bg: #F4F6FB; --surface: #FFFFFF; --raised: #EAEFF9; --line: rgba(11,16,32,.09); --line-strong: rgba(11,16,32,.16);
  --ink: #0B1020; --muted: #4F5872; --faint: #626A80;
  --accent: #00729B; --accent-ink: #FFFFFF; --accent-soft: #D4EFFE;
  --gold: #8A5F00; --mint: #13865C; --coral: #C9442F; --cobalt: #2F55D4;
  --night-1: #121A3A; --night-2: #0B1128;
  --shadow: 0 1px 2px rgba(11,16,32,.05), 0 8px 24px rgba(11,16,32,.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --r: 18px; --gutter: 20px; --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070B18; --surface: #0E1428; --raised: #151C35; --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.16);
    --ink: #F4F6FB; --muted: #A3ACC6; --faint: #8A93AE;
    --accent: #05A6DE; --accent-ink: #00121C; --accent-soft: #013145;
    --gold: #FFC93C; --mint: #5FD6A8; --coral: #FF8E7E; --cobalt: #7D97FF;
    --shadow: 0 0 0 transparent; color-scheme: dark;
  }
}
:root[data-theme="dark"], .night {
  --bg: #070B18; --surface: #0E1428; --raised: #151C35; --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.16);
  --ink: #F4F6FB; --muted: #A3ACC6; --faint: #8A93AE;
  --accent: #05A6DE; --accent-ink: #00121C; --accent-soft: #013145;
  --gold: #FFC93C; --mint: #5FD6A8; --coral: #FF8E7E; --cobalt: #7D97FF;
  --shadow: 0 0 0 transparent; color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
.night { background: var(--bg); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Wordmark: the app header's Georgia bold with the gold bolt after it (zeus-wordmark.tsx). */
.mark { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--ink); text-decoration: none; font: 700 21px/1 var(--serif); letter-spacing: -.04em; }
.mark { gap: 9px; }
.mark svg { width: 28px; height: 28px; flex: none; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, border-color .15s ease; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--ink); }
.soon { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; font-size: 15px; }
.soon .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 22%, transparent); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.site-head { transition: box-shadow .3s, background-color .3s; }
.site-head.scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.45); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--cobalt)); transform-origin: left; transform: scaleX(0); display: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress { display: block; animation: progress linear both; animation-timeline: scroll(root); }
    @keyframes progress { to { transform: scaleX(1); } }
  }
}
.btn { position: relative; overflow: hidden; }
.btn-primary { box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); }
@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover::after { transform: translateX(120%); transition: transform .7s cubic-bezier(.2,.8,.2,1); }
  .btn:hover { transform: translateY(-1px); }
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--raised); }
.head-cta { display: flex; align-items: center; gap: 6px; }
.head-cta .signin { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; }
.head-cta .btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; height: 22px; }
.menu[open] summary .i-open, .menu:not([open]) summary .i-close { display: none; }
.menu-sheet { position: fixed; inset: 64px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; display: grid; gap: 2px; box-shadow: 0 24px 40px rgba(0,0,0,.18); }
.menu-sheet a { color: var(--ink); text-decoration: none; font-size: 19px; font-weight: 600; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.menu-sheet a:last-child { border: 0; }
/* Six nav items plus the button need about 1,080 px; below that the menu takes over. */
@media (max-width: 1080px) {
  .site-nav, .head-cta { display: none; }
  .menu { display: block; }
}

/* Sections */
.band { padding: 104px 0; }
.band + .band { border-top: 1px solid var(--line); }
.band.tint { background: var(--surface); }
.head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 48px; }
.head h2 { font-size: clamp(32px, 4.4vw, 50px); }
.head p { color: var(--muted); font-size: 19px; }
.kick { color: var(--accent); font-size: 14px; font-weight: 650; letter-spacing: .02em; }
@media (max-width: 720px) { .band { padding: 72px 0; } .head { margin-bottom: 32px; } .head p { font-size: 17px; } }

/* Cards used by Learn lists */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.card .thumb { display: block; width: calc(100% + 48px); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: -24px -24px 8px; border-radius: var(--r) var(--r) 0 0; border-bottom: 1px solid var(--line); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.card { overflow: hidden; }
.card:hover .thumb { transform: scale(1.03); }
.card .topic { color: var(--accent); font-size: 13px; font-weight: 650; }
.card h3 { font-size: 21px; letter-spacing: -.015em; }
.card p { color: var(--muted); font-size: 15px; }
.card .meta { margin-top: auto; padding-top: 8px; color: var(--faint); font-size: 13px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
/* Phones: the homepage's guides and "Keep reading" become one swipeable row, with the next card peeking in. */
@media (max-width: 640px) {
  .swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 14px;
    scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .swipe::-webkit-scrollbar { display: none; }
  .swipe > .card { flex: 0 0 82%; scroll-snap-align: start; }
  .swipe > .card p { display: none; }
  .swipe > .card h3 { font-size: 19px; }
  .swipe > .card .meta { padding-top: 4px; }
  .swipe > .card:hover { transform: none; }
}

/* Footer */
.site-foot { padding: 64px 0 40px; border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 28px; }
@media (max-width: 1100px) { .foot-grid { grid-template-columns: repeat(5, 1fr); } .foot-grid .foot-about { grid-column: 1 / -1; } }
.foot-grid h2 { font-size: 14px; letter-spacing: 0; color: var(--ink); margin-bottom: 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.foot-grid a { color: var(--muted); text-decoration: none; display: inline-block; padding: 4px 0; }
.foot-grid a:hover { color: var(--ink); }
.foot-grid .mark { display: inline-flex; color: var(--ink); padding: 0; }
.foot-about p { margin-top: 12px; max-width: 320px; }
.foot-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 13px; color: var(--faint); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } .foot-grid a { padding: 8px 0; } }

/* Long-form pages (articles, support) */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--faint); font-size: 14px; margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.page-head { padding: 56px 0 8px; }
.page-head .wrap, .prose-wrap { max-width: 760px; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); }
.page-head .dek { color: var(--muted); font-size: 20px; margin-top: 16px; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 22px; color: var(--faint); font-size: 14px; }
.byline .who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.byline .who img { width: 28px; height: 28px; border-radius: 50%; background: var(--raised); }
.hero-img { margin: 32px 0 0; }
.hero-img img { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--line); background: #0B1128; }
.hero-img figcaption { margin-top: 10px; color: var(--faint); font-size: 14px; }
.answer { margin: 28px 0 0; padding: 18px 22px; border-radius: var(--r); background: var(--accent-soft); font-size: 18px; }
.answer strong { font-weight: 650; }
.box { margin: 28px 0; padding: 22px 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.box h2 { font-size: 15px; letter-spacing: 0; margin-bottom: 10px; }
.box ul, .box ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.box.take { border-left: 4px solid var(--accent); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.prose { padding-bottom: 40px; }
.prose h2 { font-size: 28px; margin: 48px 0 14px; }
.prose h3 { font-size: 21px; margin: 32px 0 10px; letter-spacing: -.015em; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { font-weight: 650; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 15px; font-variant-numeric: tabular-nums; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; font-size: 14px; }
.prose td:last-child, .prose th:last-child { text-align: right; }
.prose blockquote { margin: 24px 0; padding: 18px 22px; border-radius: 14px; background: var(--accent-soft); border: 0; }
.prose blockquote p:last-child { margin: 0; }
.prose .sources { font-size: 15px; color: var(--muted); }
.prose .sources a { word-break: break-word; }
.try { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center; margin: 40px 0; padding: 22px; border-radius: var(--r); color: var(--ink);
  background: linear-gradient(150deg, var(--night-1), var(--night-2)); --ink: #F4F6FB; --muted: #A3ACC6; }
.try img { width: 72px; height: 72px; }
.try h2 { font-size: 20px; margin: 0 0 6px; color: #F4F6FB; }
.try p { color: #A3ACC6; font-size: 15px; margin: 0; }
.try .plus { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); font-size: 12px; font-weight: 600; color: #FFC93C; vertical-align: 2px; }
.note { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.related { padding: 56px 0 96px; border-top: 1px solid var(--line); }
.related h2 { font-size: 24px; margin-bottom: 20px; }

/* Feature pages and free tools (scripts/build-site.py › product_page) */
.plus-tag { display: inline-block; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 650; letter-spacing: .04em; color: var(--gold); vertical-align: 2px; }
.product .page-head .kick { display: inline-block; margin-bottom: 12px; }
.points { list-style: none; padding: 0; margin: 28px 0 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.points li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 16px; }
.points svg { width: 20px; height: 20px; margin-top: 3px; color: var(--accent); }
.points strong { font-weight: 650; }
@media (max-width: 640px) { .points { grid-template-columns: 1fr; } }
.hub-list { padding-top: 24px; padding-bottom: 96px; }
.prose .figure { margin: 8px 0 28px; }
.prose .freq { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.prose .freq li { margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.prose .freq b { font-weight: 650; }
/* Dark example panels on light pages, like the homepage's payday rail. Figures are examples. */
.demo { margin: 8px 0 28px; padding: 24px; border-radius: 22px; background: linear-gradient(162deg, var(--night-1), var(--night-2)); color: #F4F6FB; border: 1px solid rgba(255,255,255,.08); font-variant-numeric: tabular-nums; }
.demo h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: 0; color: #A3ACC6; font-weight: 600; }
.demo .ex { margin: 14px 0 0; color: #8A93AE; font-size: 13px; }
.demo .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.demo .row:last-of-type { border-bottom: 0; }
.demo .row span small { display: block; color: #A3ACC6; font-size: 13px; }
.demo .in { color: #5FD6A8; } .demo .out { color: #A3ACC6; } .demo .gold { color: #FFC93C; }
.demo .total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.demo .total b { font-size: 20px; }
.demo .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.demo .col { padding: 16px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.demo .col .row { padding: 7px 0; font-size: 15px; }
.demo .bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.08); margin: 12px 0 8px; }
.demo .bar i { display: block; height: 100%; }
@media (max-width: 640px) { .demo { padding: 18px; } .demo .cols { grid-template-columns: 1fr; } }
.product .prose td:last-child, .product .prose th:last-child { text-align: left; }
.product .prose td:first-child { font-weight: 600; }

/* Free tools: the calculator card (content/tools/*.html) */
.calc { margin: 28px 0 8px; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.calc .calc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.calc .calc-head h2 { font-size: 22px; letter-spacing: -.015em; }
.calc .stamp { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 13px; font-weight: 600; }
.calc .seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--raised); margin-bottom: 18px; max-width: 100%; }
.calc .seg label { position: relative; }
.calc .seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.calc .seg span { display: block; padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.calc .seg input:checked + span { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.calc .seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 1px; }
.calc .fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.calc .field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); min-width: 0; }
.calc .field.wide { grid-column: span 2; }
.calc .field input, .calc .field select { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
  font: 500 17px var(--font); font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; }
.calc .field select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding: 0 28px 0 12px; font-size: 16px; }
.calc .field input:focus, .calc .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.calc .money { position: relative; display: block; }
.calc .money .cur { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 17px; pointer-events: none; }
.calc .money input { padding-left: 30px; }
.calc .money.suffix .cur { left: auto; right: 14px; }
.calc .money.suffix input { padding-left: 14px; padding-right: 34px; }
.calc .hint { margin-top: 10px; color: var(--faint); font-size: 14px; }
.calc .hint:empty { display: none; }
#amount-hint { color: var(--coral); }
.calc .calc-out { margin-top: 20px; padding: 22px; border-radius: 18px; background: linear-gradient(162deg, var(--night-1), var(--night-2)); color: #F4F6FB; font-variant-numeric: tabular-nums; }
.calc .calc-out .big { display: grid; gap: 4px; }
.calc .calc-out .big span { color: #A3ACC6; font-size: 15px; font-weight: 600; }
.calc .calc-out .big b { font-size: clamp(36px, 7vw, 48px); letter-spacing: -.03em; line-height: 1.1; }
.calc .calc-out .big small { color: #A3ACC6; font-size: 14px; }
.calc .keep { height: 8px; border-radius: 4px; background: rgba(255,135,120,.35); overflow: hidden; margin: 16px 0 6px; }
.calc .keep i { display: block; height: 100%; background: #5FD6A8; border-radius: 4px; transition: width .4s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) { .calc .keep i { transition: none; } }
.calc .lines { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
.calc .lines th, .calc .lines td { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; font-weight: 500; }
.calc .lines th { color: #A3ACC6; }
.calc .lines td { text-align: right; }
.calc .lines tr:first-child td { color: #F4F6FB; font-weight: 600; }
.calc .totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.calc .totals div { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); display: grid; gap: 2px; }
.calc .totals span { color: #A3ACC6; font-size: 13px; }
.calc .totals b { font-size: 20px; }
.calc .calc-note { margin-top: 14px; color: #A3ACC6; font-size: 14px; }
.calc .private { display: flex; gap: 8px; align-items: center; margin-top: 14px; color: var(--faint); font-size: 14px; }
.calc .private svg { width: 16px; height: 16px; flex: none; color: var(--mint); }
@media (max-width: 640px) {
  .calc { padding: 18px; margin-left: calc(-1 * var(--gutter) + 8px); margin-right: calc(-1 * var(--gutter) + 8px); }
  .calc .fields { grid-template-columns: 1fr 1fr; }
  .calc .field.wide { grid-column: 1 / -1; }
  .calc .calc-out { padding: 18px; }
}
/* Biweekly budget calculator */
.calc .bills { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.calc .bills legend { padding: 0; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.calc .bill-head, .calc .bill { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 76px 40px; gap: 8px; align-items: center; }
.calc .bill-head { font-size: 13px; color: var(--faint); margin-bottom: 6px; }
.calc .bill { margin-bottom: 8px; }
.calc .bill input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 500 16px var(--font); font-variant-numeric: tabular-nums; }
.calc .bill .money input { padding-left: 26px; }
.calc .bill .money .cur { left: 12px; font-size: 16px; }
.calc .bill input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.calc .bill .remove { width: 40px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: 400 24px/1 var(--font); cursor: pointer; }
.calc .bill .remove:hover { background: var(--raised); color: var(--ink); }
.calc .add-bill { min-height: 42px; margin-top: 4px; font-size: 15px; }
.calc .totals.top { margin: 0 0 16px; }
.calc .totals small { color: #8A93AE; font-size: 12px; }
.calc .paychecks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calc .check { padding: 16px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.calc .check.short { border-color: rgba(255,142,126,.5); }
.check-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 6px; }
.check-top em { display: block; font-style: normal; color: #FFC93C; font-size: 12px; font-weight: 600; }
.calc .check .row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.calc .check .row span { color: #A3ACC6; }
.calc .check .row small { display: block; color: #8A93AE; font-size: 12px; }
.calc .check .in { color: #5FD6A8; } .calc .check .out { color: #A3ACC6; font-weight: 500; }
.calc .check .bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 12px 0 8px; background: rgba(255,255,255,.08); }
.calc .check .bar i { display: block; height: 100%; }
.calc .check .total { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: #A3ACC6; }
.calc .check .total b { color: #F4F6FB; font-size: 17px; }
.calc .check .total b.neg { color: #FF8E7E; }
@media (max-width: 640px) { .calc .paychecks { grid-template-columns: 1fr; } .calc .bill-head, .calc .bill { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 58px 36px; gap: 6px; } .calc .bill .remove { width: 36px; } }
/* Three-paycheck month finder */
.calc .months { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.calc .month { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); display: grid; gap: 8px; align-content: start; }
.calc .month.hit { background: rgba(255,201,60,.10); border-color: rgba(255,201,60,.45); }
.calc .month .mname { font-weight: 650; font-size: 15px; }
.calc .month .days { display: flex; flex-wrap: wrap; gap: 4px; }
.calc .month .days i { font-style: normal; min-width: 28px; padding: 3px 6px; border-radius: 8px; background: rgba(255,255,255,.07); text-align: center; font-size: 13px; color: #C9D0E4; }
.calc .month.hit .days i { background: rgba(255,201,60,.18); color: #FFE3A0; }
.calc .month .tag { font-size: 12px; font-weight: 600; color: #FFC93C; }
@media (max-width: 640px) { .calc .months { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Date fields: Safari draws the value at the top and no icon once appearance is off, so centre it and draw our own icon.
   Chrome's own picker button stays clickable, invisible, over the icon. */
.calc .field input[type="date"] { min-width: 0; max-width: 100%; display: block; height: 48px; line-height: 46px; padding: 0 44px 0 14px; position: relative;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A93AE' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='3'/%3E%3Cpath d='M4 10h16M9 3v4M15 3v4'/%3E%3C/svg%3E") no-repeat right 14px center / 20px 20px; }
.calc .field input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; line-height: 46px; min-height: 46px; }
.calc .field input[type="date"]::-webkit-datetime-edit { padding: 0; line-height: 46px; }
.calc .field input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.calc .field input, .calc .field select { height: 48px; }
@media (max-width: 640px) { .calc .fields .field.date { grid-column: 1 / -1; } }

/* Date picker (public/tools/date-field.js): the site's own calendar instead of the browser's. */
.calc .dp { position: relative; }
.calc .dp-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.calc .dp-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 500 17px var(--font); font-variant-numeric: tabular-nums; text-align: left; cursor: pointer; }
.calc .dp-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc .dp-btn svg { width: 20px; height: 20px; flex: none; color: var(--muted); transition: color .15s; }
.calc .dp-btn:hover svg, .calc .dp.open .dp-btn svg { color: var(--accent); }
.calc .dp.open .dp-btn, .calc .dp-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.calc .dp-pop { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 320px; max-width: calc(100vw - 2 * var(--gutter)); padding: 14px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.12); font-variant-numeric: tabular-nums; }
.calc .dp-pop.up { top: auto; bottom: calc(100% + 8px); }
@media (prefers-reduced-motion: no-preference) {
  .calc .dp-pop:not([hidden]) { animation: dp-in .18s cubic-bezier(.2,.8,.2,1); }
  @keyframes dp-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-title { font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.dp-nav { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--raised); color: var(--ink); cursor: pointer; }
.dp-nav svg { width: 18px; height: 18px; }
.dp-nav:hover { background: var(--accent-soft); color: var(--accent); }
.dp-week, .dp-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.dp-week span { text-align: center; font-size: 12px; font-weight: 600; color: var(--faint); padding: 4px 0 6px; }
.dp-row span { display: grid; place-items: center; padding: 2px 0; }
.dp-day { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font: 500 15px var(--font); font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .12s; }
.dp-day:hover { background: var(--raised); }
.dp-day.out { color: var(--faint); opacity: .6; }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); font-weight: 650; }
.dp-day.on { background: var(--accent); color: var(--accent-ink); font-weight: 650; box-shadow: none; }
.dp-day:focus-visible, .dp-nav:focus-visible, .dp-foot button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-foot button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--accent); font: 600 15px var(--font); cursor: pointer; }
.dp-foot button:hover { background: var(--accent-soft); }
.dp-foot .dp-close { color: var(--ink); }
@media (max-width: 640px) { .calc .dp-pop { width: 100%; } }
/* List picker (pickers.js): same field and card as the date picker. */
.calc .sp { position: relative; }
.calc .sp-btn svg { width: 18px; height: 18px; transition: transform .2s ease, color .15s; }
.calc .sp.open .sp-btn svg { transform: rotate(180deg); }
.calc .sp-pop { width: auto; min-width: 100%; max-width: min(360px, calc(100vw - 2 * var(--gutter))); max-height: 320px; overflow-y: auto; padding: 6px; display: grid; gap: 2px; overscroll-behavior: contain; }
.calc .sp-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent;
  color: var(--ink); font: 500 16px var(--font); text-align: left; white-space: nowrap; cursor: pointer; }
.calc .sp-pop.end { left: auto; right: 0; }
.calc .sp-opt:hover { background: var(--raised); }
.calc .sp-opt[aria-selected="true"] { color: var(--accent); font-weight: 650; background: var(--accent-soft); }
.calc .sp-opt svg { width: 18px; height: 18px; flex: none; }
.calc .sp-opt:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (max-width: 640px) { .calc .sp-pop { max-width: calc(100vw - 2 * var(--gutter)); } }
@media (max-width: 640px) { .calc .dp-btn { padding: 0 12px; gap: 6px; font-size: 16px; } .calc .sp-btn svg { width: 16px; height: 16px; } }
@media (max-width: 360px) { .calc .fields, .calc .totals { grid-template-columns: 1fr; } }
