:root {
  --bg: #f7f4ee; --surface: #ffffff; --sunk: #efeadf; --ink: #15201c; --muted: #58645d; --line: #e2dccf;
  --accent: #204038; --accent-hi: #2c5a4e; --on-accent: #ffffff; --amber: #f5a524; --amber-ink: #7a4f00; --amber-soft: #fdf0d6;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --shadow: 0 1px 2px rgba(21,32,28,.06), 0 6px 20px rgba(21,32,28,.06);
  --display: "Fraunces", Georgia, serif; --text: "Manrope", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1513; --surface: #161e1b; --sunk: #1c2622; --ink: #e9ede9; --muted: #a2ada6; --line: #2a3631;
    --accent: #7cc4ad; --accent-hi: #9ad6c2; --on-accent: #0f1513; --amber: #f5a524; --amber-ink: #f8c46a; --amber-soft: #2b2414;
    --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--text); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hi); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font: 600 clamp(2rem, 4.5vw, 3.1rem)/1.1 var(--display); letter-spacing: -.01em; }
h2 { font: 600 1.5rem/1.25 var(--display); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.block { padding: 40px 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.fine { font-size: .8rem; color: var(--muted); padding-top: 12px; padding-bottom: 32px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-ink); margin: 0 0 .6em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.ico { width: 22px; height: 22px; flex: none; } .ico.big { width: 34px; height: 34px; color: var(--accent); } .ico.huge { width: 56px; height: 56px; color: var(--accent); }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.mark { background: var(--accent); color: var(--on-accent); font: 600 .8rem/1 var(--text); letter-spacing: .06em; padding: 8px 7px; border-radius: var(--r-sm); box-shadow: inset 0 -3px 0 var(--amber); }
.word { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; padding: 8px 10px; border-radius: var(--r-sm); }
.nav a:hover { background: var(--sunk); }
.nav .nav-tools { background: var(--amber-soft); color: var(--amber-ink); }
.menu { display: none; margin-left: auto; font: 600 .9rem var(--text); background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; color: var(--ink); }
@media (max-width: 900px) {
  .menu { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 16px; }
  .nav.open { display: flex; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 700; padding: 12px 18px; border-radius: var(--r-md); border: 1px solid var(--accent); font-size: .95rem; cursor: pointer; }
.btn:hover { background: var(--accent-hi); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--sunk); }

/* hero */
.hero { background: radial-gradient(1200px 400px at 85% -10%, var(--amber-soft), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.hero-in { padding: 64px 16px 48px; }
.hero h1 { max-width: 18ch; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 32px; }
.stats { display: flex; gap: 40px; flex-wrap: wrap; margin: 0; }
.stats dt { font: 600 1.8rem/1 var(--display); color: var(--accent); }
.stats dd { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.sec { margin-top: 8px; }

/* cards */
.tgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 16px 0 32px; }
.tgrid.slim { margin: 24px 0; }
.tcard { display: flex; gap: 14px; align-items: flex-start; padding: 20px; background: var(--accent); color: var(--on-accent); border-radius: var(--r-lg); text-decoration: none; box-shadow: var(--shadow); }
.tcard:hover { background: var(--accent-hi); color: var(--on-accent); }
.tcard strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.tcard .muted { color: inherit; opacity: .82; font-size: .9rem; }
.tcard .ico { color: var(--amber); width: 28px; height: 28px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.dcard { display: flex; flex-direction: column; gap: 6px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); }
.dcard:hover { border-color: var(--accent); }
.dname { font: 600 1.35rem var(--display); margin-top: 8px; }
.dcount { font-size: .82rem; font-weight: 700; color: var(--amber-ink); margin-top: auto; padding-top: 8px; }
.glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 32px; }
.gcard { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.gcard:hover { border-color: var(--accent); }
.gcard.soon { background: transparent; border-style: dashed; }
.gcard.soon .gtitle { color: var(--muted); }
.gmeta { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.gcard.soon .gmeta { color: var(--muted); }
.gtitle { font-weight: 600; line-height: 1.35; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.split .glist { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.note { background: var(--amber-soft); border-radius: var(--r-lg); padding: 24px; margin: 32px 0; }
.note h3 { font-family: var(--display); font-size: 1.2rem; }

/* department */
.dhero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 0 40px; }
.dhero-in { display: flex; gap: 20px; align-items: flex-start; margin-top: 24px; }
@media (max-width: 600px) { .dhero-in { flex-direction: column; } }
.crumbs { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; padding-top: 16px; }
.crumbs a { color: var(--muted); }

/* guide */
.ghead { padding: 24px 0 8px; }
.byline { color: var(--muted); font-size: .9rem; }
.quick { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 16px 0 32px; }
.quick h2 { font-size: 1.15rem; }
.tablewrap { overflow-x: auto; margin: 16px 0; }
.qt { width: 100%; border-collapse: collapse; font-size: .93rem; }
.qt th, .qt td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.qt th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.qt .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; background: var(--amber-soft); color: var(--amber-ink); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.pick { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .pick { grid-template-columns: 1fr; } .pimg { aspect-ratio: auto; height: 240px; } }
.pimg { background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); aspect-ratio: 1; display: grid; place-items: center; padding: 12px; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: contain; }
.pnum { font: 600 1rem var(--display); color: var(--accent); margin-bottom: 4px; }
.pick h3 { font-size: 1.15rem; }
.pfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.price { font: 600 1.4rem var(--display); }
.price s { font: 400 .95rem var(--text); color: var(--muted); }
.soonbox { background: var(--sunk); border-radius: var(--r-md); padding: 18px 20px; margin: 16px 0; }
.bench { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: var(--r-md); padding: 20px; margin: 16px 0 24px; }
.ticks { padding-left: 0; list-style: none; }
.ticks li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.prose h2 { margin-top: 1.4em; }

/* calculators */
.tool-head { max-width: 820px; }
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; margin: 16px 0 56px; align-items: start; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.panel.result { position: sticky; top: 84px; }
@media (max-width: 900px) { .panel.result { position: static; } }
.field { margin-bottom: 18px; }
.field > label, .field > .lbl { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
input[type=number], input[type=text], select { width: 100%; font: 500 1rem var(--text); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; font: 600 .9rem var(--text); background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; margin-bottom: 8px; }
.check input { margin-top: 4px; accent-color: var(--accent); }
.total { font: 600 clamp(2.2rem, 5vw, 3rem)/1 var(--display); color: var(--accent); margin: 4px 0; }
.sub { color: var(--muted); font-size: .92rem; }
.lines { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .93rem; }
.lines td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; padding-left: 12px; }
.lines .what { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
.lines a { font-weight: 600; }
.flag { border-radius: var(--r-md); padding: 12px 14px; font-size: .9rem; margin: 12px 0; }
.flag.ok { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.flag.warn { background: var(--amber-soft); color: var(--amber-ink); }
.foot { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 16px; }
.foot-in h3 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.foot-in a:not(.brand) { display: block; color: var(--ink); text-decoration: none; font-size: .92rem; padding: 3px 0; }
.foot-in a:hover { color: var(--accent); }
@media (max-width: 800px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-in > div:first-child { grid-column: 1 / -1; } }
code { background: var(--sunk); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

/* chips, filters, faq */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 16px 0 4px; }
.chips-h { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.chip { display: inline-flex; gap: 6px; align-items: center; font: 600 .85rem var(--text); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip.soon { border-style: dashed; color: var(--muted); }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; margin: 0 0 8px; }
.fgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.fl { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); width: 56px; }
.fcount { margin: 6px 0 0; min-height: 1em; }
[hidden] { display: none !important; }
.dfilter { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.dfilter input[type=search] { max-width: 460px; flex: 1 1 260px; }
.dfilter .check { margin: 0; }
.dgroup { scroll-margin-top: 80px; }
.pick.text { grid-template-columns: 1fr; }
.price.sm { font-size: 1.05rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 0; }

.answer { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-md); padding: 16px 20px; margin: 8px 0 20px; }
.answer p:last-child { margin-bottom: 0; }

.partner { background: var(--amber-soft); border-radius: var(--r-lg); padding: 20px 22px; margin: 32px 0; }
.partner-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.partner .btn.ghost { background: var(--surface); }
