/* GeneratorCostCheck — design system
   Fonts: Space Grotesk (headings, numbers), Inter (body). Load from Google Fonts. */
:root {
  /* Brand */
  --navy: #1F2A44;          /* text, header */
  --navy-2: #2B3858;        /* header hover / deep panels */
  --amber: #F2A900;         /* buttons, logo, highlights */
  --amber-hover: #FFB81A;
  --amber-soft: #FFF3CC;    /* callouts */
  --bg: #F7F7F2;            /* off-white page */
  /* Neutrals */
  --card: #FFFFFF;
  --ink: #1F2A44;
  --muted: #5B6275;
  --faint: #8A90A0;
  --line: #E5E4DB;
  --track: #ECEBE3;
  /* Meaning (never color alone — always paired with words) */
  --low: #2E7D5B;   --low-soft: #E3F2EA;   /* quote below typical */
  --mid: #1F2A44;                          /* typical */
  --high: #B4561D;  --high-soft: #FBE9DD;  /* quote above typical */
  --warn: #8A6100;
  /* Shape */
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(31,42,68,.05), 0 6px 20px rgba(31,42,68,.06);
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font-body); }
a { color: var(--navy); text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3, .num { font-family: var(--font-head); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.08; font-weight: 700; margin: .25em 0 .35em; }
h2 { font-size: 1.35rem; line-height: 1.2; font-weight: 700; margin: 0 0 .7rem; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .4rem; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

/* Header */
.top { background: var(--navy); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 700 1.15rem var(--font-head); white-space: nowrap; }
.logo img { width: 28px; height: 28px; }
.logo .word b { color: var(--amber); font-weight: 700; }
.top nav a { color: #D5DAE6; text-decoration: none; margin-left: 20px; font-weight: 500; font-size: .95rem; }
.top nav a:hover, .top nav a[aria-current] { color: #fff; }
.top nav .btn, .top nav .btn:hover { white-space: nowrap; margin-left: 20px; padding: 9px 16px; font-size: .9rem; color: var(--navy); }

/* Hero */
.hero { background: var(--navy); color: #fff; padding: 44px 0 72px; }
.hero h1 { color: #fff; max-width: 820px; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lede { color: #C9D0DF; font-size: 1.12rem; max-width: 640px; margin: 0 0 8px; }
.eyebrow { font: 600 .78rem var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: var(--amber); margin: 0; }
.hero-pull { margin-top: -48px; } /* card overlapping hero */

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
section.block { padding: 28px 0; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .tiny { font-size: .78rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--amber); color: var(--navy); border: 0; border-radius: 10px; padding: 13px 22px; font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--amber-hover); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.btn.secondary { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn.secondary:hover { background: var(--navy); color: #fff; }
.btn.sm { padding: 7px 12px; font-size: .85rem; border-radius: 8px; }
.btn.ghost { background: #EEF0F4; color: var(--navy); }
.btn.danger { background: #FBE3E0; color: #8E2A1E; }
.btn.block { width: 100%; justify-content: center; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid.cols-5 { grid-template-columns: 1fr 1fr 1.2fr 1.4fr 1fr; align-items: end; }
.form-grid .span-2 { grid-column: span 2; }
label { display: block; font-size: .85rem; font-weight: 600; }
label .opt { font-weight: 400; color: var(--faint); }
.hint { display: block; font-weight: 400; color: var(--faint); font-size: .78rem; margin-top: 4px; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; font: 400 1rem var(--font-body); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; }
input:hover, select:hover, textarea:hover { border-color: #CFCDBF; }
.affix { position: relative; display: block; }
.affix .pre, .affix .suf { position: absolute; top: 50%; transform: translateY(-50%); margin-top: 3px; color: var(--faint); font-weight: 500; pointer-events: none; }
.affix .pre { left: 12px; } .affix .suf { right: 12px; }
input.has-pre { padding-left: 26px; } input.has-suf { padding-right: 34px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font: 700 1.05rem var(--font-head); margin-bottom: 10px; padding: 0; }
.seg { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: 110px; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; font-weight: 500; font-size: .92rem; padding: 10px 8px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.seg input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.code-input { display: flex; gap: 8px; }
.code-input input { width: 52px; text-align: center; font: 700 1.4rem var(--font-head); padding: 10px 0; }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .85rem; font-weight: 600; color: var(--faint); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li::before { content: attr(data-n); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--track); color: var(--muted); font-size: .75rem; }
.steps li.on { color: var(--navy); } .steps li.on::before { background: var(--amber); color: var(--navy); }
.steps li.done::before { content: "✓"; background: var(--navy); color: #fff; }
.steps li + li::after { content: none; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat .num { display: block; font-size: 1.75rem; font-weight: 700; line-height: 1.15; }
.stat .num.sm { font-size: 1.3rem; padding: 4px 0 3px; }
.stat .lbl { color: var(--muted); font-size: .82rem; }
.stat.feature { background: var(--navy); border-color: var(--navy); color: #fff; }
.stat.feature .lbl { color: #C9D0DF; } .stat.feature .num { color: var(--amber); }

/* Tags */
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #EEF0F4; color: var(--navy); vertical-align: middle; }
.tag.amber { background: var(--amber-soft); color: var(--warn); }
.tag.low { background: var(--low-soft); color: var(--low); }
.tag.high { background: var(--high-soft); color: var(--high); }

/* Cost breakdown table with range bars */
.tbl-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--navy); border-bottom: 0; }
.tbl .num { font-weight: 600; }
.rangebar { position: relative; height: 10px; background: var(--track); border-radius: 999px; min-width: 120px; }
.rangebar .band { position: absolute; top: 0; bottom: 0; background: #C8CEDB; border-radius: 999px; }
.rangebar .med { position: absolute; top: -3px; width: 4px; height: 16px; background: var(--navy); border-radius: 2px; transform: translateX(-2px); }
.rangebar .you { position: absolute; top: -6px; width: 14px; height: 22px; transform: translateX(-7px); }
.rangebar .you::before { content: ""; position: absolute; inset: 0; background: var(--amber); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; background: #C8CEDB; margin-right: 6px; vertical-align: middle; }
.legend i.m { width: 4px; height: 14px; background: var(--navy); border-radius: 2px; }
.legend i.y { width: 12px; height: 12px; background: var(--amber); clip-path: polygon(50% 100%, 0 0, 100% 0); border-radius: 0; }

/* Big percentile gauge (quote checker) */
.gauge { margin: 20px 0 8px; }
.gauge .track { position: relative; height: 18px; border-radius: 999px; background: linear-gradient(90deg, var(--low-soft) 0 25%, #EEF0F4 25% 75%, var(--high-soft) 75% 100%); border: 1px solid var(--line); }
.gauge .marker { position: absolute; top: -12px; transform: translateX(-50%); text-align: center; }
.gauge .marker b { display: block; width: 4px; height: 42px; background: var(--navy); margin: 0 auto; border-radius: 2px; }
.gauge .marker span { display: inline-block; margin-top: 4px; font: 700 .85rem var(--font-head); background: var(--navy); color: #fff; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.gauge .scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: 40px; }
.verdict { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); }
.verdict.typical { background: #EEF0F4; } .verdict.low { background: var(--low-soft); } .verdict.high { background: var(--high-soft); }
.verdict .icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 1.1rem var(--font-head); background: var(--navy); color: #fff; }
.verdict p { margin: 2px 0 0; }

/* Callouts */
.callout { background: var(--amber-soft); border: 1px solid #F3DC8D; border-radius: var(--radius-sm); padding: 14px 16px; }
.callout.info { background: #EEF0F4; border-color: #DADFE8; }
.empty { text-align: center; padding: 28px 20px; border: 2px dashed #D9D7C9; border-radius: var(--radius); background: #FBFBF7; }
.empty h3 { font-size: 1.2rem; }

/* Sources list */
.sources { list-style: none; padding: 0; margin: 0; }
.sources li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sources li:last-child { border-bottom: 0; }
.sources .range { font: 700 1.05rem var(--font-head); text-align: right; }
.sources .src { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary .opt { font-weight: 400; color: var(--faint); margin-left: 6px; }
summary::after { content: "+"; font: 700 1.2rem var(--font-head); color: var(--amber); }
details[open] summary::after { content: "–"; }
summary::-webkit-details-marker { display: none; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Breadcrumb */
.crumbs { font-size: .82rem; color: #C9D0DF; margin: 0 0 6px; }
.crumbs a { color: #C9D0DF; text-decoration: none; } .crumbs a:hover { color: #fff; }

/* Location chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 500; }
.chip:hover { border-color: var(--navy); }
.chip small { color: var(--faint); margin-left: 4px; }

/* How it works */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how .n { font: 700 1.6rem var(--font-head); color: var(--amber); }

/* Admin */
.admin-top { background: var(--navy-2); }
.queue-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.queue-tabs a { padding: 7px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .88rem; background: #fff; border: 1px solid var(--line); }
.queue-tabs a[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.report { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; }
.report + .report { margin-top: 14px; }
.report dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px; margin: 10px 0 0; font-size: .88rem; }
.report dt { color: var(--faint); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.report dd { margin: 0; font-weight: 500; }
.report .actions { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.dupe { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--high-soft); color: var(--high); font-size: .85rem; }

/* Footer */
.foot { margin-top: 48px; background: var(--navy); color: #C9D0DF; padding: 32px 0; font-size: .86rem; }
.foot a { color: #fff; }
.foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.foot h4 { color: #fff; font: 600 .9rem var(--font-head); margin: 0 0 8px; }
.foot ul { list-style: none; padding: 0; margin: 0; } .foot li { margin: 4px 0; }
.foot .legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 16px; font-size: .8rem; }

/* Responsive */
@media (max-width: 900px) {
  .grid-2, .how, .foot .cols { grid-template-columns: 1fr; }
  .form-grid.cols-5 { grid-template-columns: 1fr 1fr; }
  .form-grid.cols-5 .btn { grid-column: span 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .report { grid-template-columns: 1fr; } .report .actions { flex-direction: row; flex-wrap: wrap; }
  .report dl { grid-template-columns: repeat(2, 1fr); }
  .top nav a:not(.btn) { display: none; }
}
@media (max-width: 520px) {
  .top nav .btn { padding: 8px 12px; font-size: .82rem; margin-left: 0; }
  .logo { font-size: 1rem; } .logo img { width: 24px; height: 24px; }
  .tbl { font-size: .86rem; } .tbl th, .tbl td { padding-left: 4px; padding-right: 4px; } .tbl th { font-size: .66rem; letter-spacing: .04em; }
  .card { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; }
  .tbl .hide-sm { display: none; }
  .code-input input { width: 44px; }
}

/* Build additions */
.updated { color: rgba(255,255,255,.7); font-size: .85rem; margin-top: 8px; }
.err { color: var(--high); font-size: .82rem; font-weight: 600; }
.alert { background: var(--high-soft); color: var(--high); border-radius: 10px; padding: 10px 14px; font-weight: 600; margin-bottom: 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
input.code { font: 700 1.6rem var(--font-head); letter-spacing: .5em; text-align: center; max-width: 260px; }
.prose { max-width: 760px; }
.prose p, .prose li { line-height: 1.65; }
.prose h2 { margin-top: 32px; }
.fig { white-space: nowrap; font-weight: 600; }
.cite { font-size: .78rem; font-weight: 500; vertical-align: super; margin-left: 2px; }
.srclist { font-size: .88rem; color: var(--muted); }
.srclist li { margin-bottom: 6px; }
.bars { display: grid; gap: 8px; }
.bars .row { display: grid; grid-template-columns: 140px 1fr 90px; gap: 10px; align-items: center; font-size: .9rem; }
.bars .bar { height: 12px; background: var(--amber); border-radius: 999px; }
