/* duty242 — production stylesheet (self-contained, no external fonts/scripts).
   Mobile-first. Light + OS-preference dark. Generated from the redesign. */
:root { color-scheme: light dark; }
html, body { margin: 0; }
/* duty242 — refreshed, self-contained (no external fonts/scripts).
   Mobile-first. Light + dark. Vars scoped to .site-root so a data-theme
   toggle works; production can move these back to :root + prefers-color-scheme. */

:root {
  /* palette */
  --ink: #0f1b26;
  --ink-2: #33475b;
  --muted: #5f7185;
  --line: #e3e9f0;
  --line-2: #eef3f8;
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --brand: #0e8a6a;
  --brand-2: #0aa47c;
  --brand-ink: #0a6b53;
  --brand-soft: #e2f4ee;
  --gold: #ffc72c;
  --hero-grad: linear-gradient(135deg, #0b3b4c 0%, #0d5c55 55%, #0e8a6a 100%);
  --btn-grad: linear-gradient(135deg, #0e8a6a, #0aa47c);
  --good: #0e8a6a;
  --good-soft: #e2f4ee;
  --bad: #c2453a;
  --bad-soft: #fdecea;
  --warn: #8a6d00;
  --warn-soft: #fff3cd;
  /* geometry */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-1: 0 1px 2px rgba(15,27,38,.05), 0 4px 16px rgba(15,27,38,.06);
  --shadow-2: 0 4px 10px rgba(15,27,38,.08), 0 12px 32px rgba(15,27,38,.10);
  --shadow-3: 0 10px 24px rgba(15,27,38,.10), 0 30px 60px rgba(11,59,76,.14);
  --ring: 0 0 0 3px rgba(14,138,106,.28);
  --max: 84rem;
}
body {
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
a {
  color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 2px;
}
a:hover { color: var(--brand); }
/* Product title links to Amazon — reads as a heading, signals the link on hover. */
a.title-link { color: inherit; text-decoration: none; }
a.title-link:hover { color: var(--brand); text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.narrow { max-width: 52rem; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-top: .7rem; padding-bottom: .7rem;
}

/* logo lockup: icon + wordmark */
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--btn-grad); position: relative;
  display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: 0 2px 6px rgba(14,138,106,.35);
}
.brand-icon span { color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: -.02em; line-height: 1; }
.brand-icon::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 6px;
  height: 2.5px; border-radius: 2px; background: var(--gold);
}
.brand-word { font-weight: 800; font-size: 1.28rem; letter-spacing: -.03em; color: var(--ink); }
.brand-word b { font-weight: 800; color: var(--brand); }

nav.main { display: flex; gap: .1rem; flex-wrap: wrap; font-size: .9rem; margin-left: auto; align-items: center; }
nav.main a {
  text-decoration: none; color: var(--ink-2); font-weight: 500;
  padding: .38rem .7rem; border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
nav.main a:hover { background: var(--brand-soft); color: var(--brand-ink); }
nav.main a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
nav.main a.cta {
  background: var(--btn-grad); color: #fff; font-weight: 600;
  box-shadow: var(--shadow-1); margin-left: .3rem;
}
nav.main a.cta:hover { filter: brightness(1.06); color: #fff; }

/* ---------- structure & type ---------- */
main.site { display: block; padding: 2rem 0 4rem; }
h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.5rem); line-height: 1.12;
  letter-spacing: -.03em; margin: .2rem 0 .9rem; font-weight: 800;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem); letter-spacing: -.02em;
  margin: 2.6rem 0 1rem; font-weight: 750; text-wrap: balance;
}
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .3rem; }
p { text-wrap: pretty; }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 46rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--brand-ink);
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .2rem; }
.section-head a { font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------- hero ---------- */
.hero {
  background: var(--hero-grad); color: #f2fbf7;
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4.5vw, 3.2rem);
  margin-bottom: 2.4rem; box-shadow: var(--shadow-3);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60rem 24rem at 108% -30%, rgba(255,255,255,.16), transparent 60%);
}
.hero > * { position: relative; }
.hero .eyebrow { color: #9fe8cf; }
.hero h1 { color: #fff; margin-top: .4rem; max-width: 20ch; }
.hero p { color: #cfeadf; max-width: 42rem; font-size: 1.08rem; }

.searchbox {
  display: flex; gap: .5rem; margin-top: 1.4rem; max-width: 38rem;
  background: #fff; border-radius: 999px; padding: .35rem .35rem .35rem .35rem;
  box-shadow: var(--shadow-2);
}
.searchbox input {
  flex: 1; min-width: 0; font-size: 1rem;
  padding: .7rem 1rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink);
}
.searchbox input:focus { outline: none; }
.searchbox:focus-within { box-shadow: var(--ring), var(--shadow-2); }
.hero-actions { display: flex; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.2rem; font-size: .86rem; color: #b9ddcf; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.hero-note b { color: #fff; font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 0; cursor: pointer; text-decoration: none;
  font-size: 1rem; font-weight: 650; color: #fff;
  background: var(--btn-grad); padding: .72rem 1.4rem; border-radius: 999px;
  box-shadow: var(--shadow-1);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); filter: brightness(1.05); color: #fff; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow-1); }
.btn.secondary { background: var(--surface); color: var(--brand-ink); border: 1px solid var(--line); box-shadow: none; }
.btn.secondary:hover { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.btn.small { padding: .5rem 1rem; font-size: .9rem; }
.btn.block { width: 100%; }
.hero .btn.secondary {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(4px);
}
.hero .btn.secondary:hover { background: rgba(255,255,255,.22); }

/* ---------- cards & product grid ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 1rem 0;
  box-shadow: var(--shadow-1);
}
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.pcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .85rem; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pcard:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-2);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}
.pcard .thumb {
  position: relative; height: 9.5rem; border-radius: var(--radius-sm);
  background: var(--surface-2); overflow: hidden; margin-bottom: .7rem;
  display: grid; place-items: center;
}
.pcard .thumb img { max-width: 82%; max-height: 82%; object-fit: contain; }
.pcard .thumb .ph {
  font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em;
  color: color-mix(in srgb, var(--brand) 55%, var(--muted));
}
.pcard .thumb .badge { position: absolute; top: .5rem; left: .5rem; }
.pcard .title {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35; margin-bottom: .5rem;
}
.pcard .title:hover { color: var(--brand-ink); }
.pcard .foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding-top: .4rem; }
.pcard .price { font-size: .85rem; color: var(--muted); }
.pcard .duty { font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pcard .duty.free { color: var(--good); }

/* ---------- tables / breakdown ---------- */
.table-scroll {
  overflow-x: auto; margin: 1rem 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
}
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); background: var(--surface-2);
}
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th a { color: inherit; text-decoration: none; }
th.sorted a::after { content: " ↓"; color: var(--brand); }
.delta-good { color: var(--good); font-weight: 700; }
.delta-bad { color: var(--bad); font-weight: 700; }

/* the breakdown as a hero object */
.breakdown {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: hidden;
}
.breakdown .row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.3rem; border-bottom: 1px solid var(--line-2);
}
.breakdown .row .lbl { color: var(--ink-2); }
.breakdown .row .lbl small { display: block; color: var(--muted); font-size: .78rem; }
.breakdown .row .val { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.breakdown .row.sub .lbl, .breakdown .row.sub .val { color: var(--muted); font-weight: 500; }
.breakdown .row.total {
  background: var(--brand-soft); border-bottom: 0; padding: 1.1rem 1.3rem;
}
.breakdown .row.total .lbl { color: var(--brand-ink); font-weight: 750; font-size: 1.05rem; }
.breakdown .row.total .val { color: var(--brand-ink); font-weight: 850; font-size: 1.5rem; letter-spacing: -.02em; }
.breakdown .row.grand { background: var(--btn-grad); border-bottom: 0; padding: 1.1rem 1.3rem; }
.breakdown .row.grand .lbl { color: #eafaf4; font-weight: 700; }
.breakdown .row.grand .val { color: #fff; font-weight: 850; font-size: 1.4rem; letter-spacing: -.02em; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .01em; vertical-align: middle;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.high, .badge.free { background: var(--brand-soft); color: var(--brand-ink); }
.badge.medium { background: var(--warn-soft); color: var(--warn); }
.badge.low { background: var(--bad-soft); color: var(--bad); }
.badge.plain::before { display: none; }

/* ---------- compare & callouts ---------- */
.compare { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.4rem 0; }
@media (min-width: 640px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.15rem 1.3rem; box-shadow: var(--shadow-1);
  position: relative;
}
.compare .box .cap { font-size: .82rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.compare .box .amount { font-size: 2.2rem; font-weight: 850; letter-spacing: -.03em; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.compare .box.deposit { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: color-mix(in srgb, var(--bad-soft) 55%, var(--surface)); }
.compare .box.deposit .amount { color: var(--bad); }
.compare .box.deposit .cap { color: var(--bad); }
.compare .box.actual { border-color: transparent; color: #fff; background: var(--btn-grad); box-shadow: var(--shadow-2); }
.compare .box.actual .cap, .compare .box.actual .small { color: #d6ece3; }
.compare .box.actual .amount { color: #fff; }

.callout {
  display: flex; gap: .6rem; align-items: flex-start;
  background: var(--brand-soft); color: var(--brand-ink);
  border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  padding: .9rem 1.1rem; margin: 1rem 0; font-weight: 600;
}
.callout .amt { font-weight: 850; }
.callout.over { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 22%, transparent); }
.field-msg { background: var(--warn-soft); color: #6b5500; border-radius: var(--radius-sm); padding: .85rem 1.05rem; font-weight: 500; }

/* class line under product title */
.classline {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  font-size: .95rem; color: var(--ink-2);
}
.classline code {
  font: 600 .92em ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--surface-2); padding: .12rem .45rem; border-radius: 6px; color: var(--brand-ink);
}

/* product hero layout */
.product-hero { display: grid; gap: 1.6rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .product-hero { grid-template-columns: 15rem 1fr; } }
.product-hero .media {
  height: 15rem; border-radius: var(--radius); background: var(--surface-2);
  border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
}
.product-hero .media img { max-width: 86%; max-height: 86%; object-fit: contain; }
.product-hero .media .ph { font-weight: 800; font-size: 2rem; color: color-mix(in srgb, var(--brand) 55%, var(--muted)); }

/* ---------- forms ---------- */
form.stack label { display: block; font-weight: 650; margin: 1.1rem 0 .35rem; }
form.stack label:first-child { margin-top: 0; }
form.stack input, form.stack select {
  width: 100%; padding: .72rem .9rem; font-size: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
form.stack input:focus, form.stack select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
form.stack .hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.calc-layout { display: grid; gap: 1.4rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 820px) { .calc-layout { grid-template-columns: 22rem 1fr; } }
.result-empty {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); background: var(--surface);
}

/* ---------- extension landing ---------- */
.tiles { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.4rem 0; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-1);
}
.tile .n {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; margin-bottom: .8rem;
}
/* on-page badge mocks — one per marketplace, side by side until they don't fit */
.mock-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; }
.mock-row .store-mock { flex: 1 1 20rem; }
.store-mock {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-2); overflow: hidden; max-width: 30rem;
}
/* The bar stands in for each store's chrome: Amazon navy, eBay's four colours. */
.store-mock .bar { height: 8px; background: linear-gradient(90deg, #232f3e, #37475a); }
.store-mock.ebay .bar { background: linear-gradient(90deg, #e53238 25%, #0064d2 25% 50%, #f5af02 50% 75%, #86b817 75%); }
.store-mock .inner { padding: 1.1rem 1.2rem; }
.store-mock .price { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.store-mock .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.store-mock .d242 {
  margin-top: .9rem; border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: var(--radius-sm); background: var(--brand-soft); padding: .8rem .9rem;
  display: flex; align-items: center; gap: .7rem;
}
.store-mock .d242 .tag { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--btn-grad); padding: .2rem .5rem; border-radius: 6px; }
.store-mock .d242 .big { font-weight: 800; font-size: 1.1rem; color: var(--brand-ink); font-variant-numeric: tabular-nums; }

/* ---------- ad slot ---------- */
.ad-slot { margin: 1.6rem 0; text-align: center; }
.ad-slot .ad-label { display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.mock-ad {
  position: relative; display: flex; align-items: center; gap: .9rem; text-align: left;
  max-width: 46rem; margin: 0 auto; padding: .9rem 1rem;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: repeating-linear-gradient(-45deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1);
}
.mock-ad:hover { color: var(--ink); box-shadow: var(--shadow-2); }
.mock-ad-icon {
  width: 2.6rem; height: 2.6rem; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); font-weight: 800; color: var(--brand-ink);
}
.mock-ad-copy { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.mock-ad-brand { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mock-ad-title { font-weight: 700; color: var(--brand-ink); }
.mock-ad-body { font-size: .85rem; color: var(--ink-2); }
.mock-ad-cta { margin-left: auto; flex: 0 0 auto; align-self: center; white-space: nowrap; font-size: .8rem; font-weight: 650; color: #fff; background: var(--btn-grad); padding: .45rem .85rem; border-radius: 999px; }
.mock-ad-flag { position: absolute; top: .3rem; right: .4rem; font-size: .58rem; color: var(--muted); background: var(--surface); padding: 0 .3rem; border-radius: 4px; }
@media (max-width: 34rem) { .mock-ad { flex-wrap: wrap; } .mock-ad-cta { margin-left: 0; } }

/* ---------- loading overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
  backdrop-filter: blur(3px); animation: d242-fade .18s ease;
}
.overlay[hidden] { display: none; }
.overlay-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-3); padding: 1.9rem 2.3rem; text-align: center; max-width: 22rem; margin: 1rem; }
.overlay-card p { margin: .5rem 0 0; font-weight: 650; }
.spinner {
  width: 46px; height: 46px; margin: 0 auto .6rem; border-radius: 50%;
  border: 4px solid var(--brand-soft); border-top-color: var(--brand);
  animation: d242-spin .8s linear infinite;
}
@keyframes d242-spin { to { transform: rotate(360deg); } }
@keyframes d242-fade { from { opacity: 0; } }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); background: var(--surface); padding: 2rem 0 2.8rem; font-size: .85rem; color: var(--muted); }
footer.site nav { display: flex; gap: .4rem 1.1rem; flex-wrap: wrap; margin-bottom: 1rem; }
footer.site a { color: var(--ink-2); text-decoration: none; }
footer.site a:hover { color: var(--brand-ink); text-decoration: underline; }
.disclosure { margin-top: .6rem; }

/* FTC affiliate disclosure — rendered adjacent to outbound affiliate links, in
   addition to the footer disclosure. Small but legible, muted (var(--muted)
   clears WCAG AA in both themes), always visible — never behind hover/accordion. */
.aff-disclosure { font-size: .78rem; line-height: 1.4; color: var(--ink-2); margin: .4rem 0 0; }
.aff-disclosure-inline { margin: 0 0 .5rem; }

.stack-gap > * + * { margin-top: .6rem; }

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem;
  font-size: .82rem; color: var(--muted); margin-bottom: .7rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-ink); text-decoration: underline; }
.breadcrumb .sep { opacity: .45; }
.breadcrumb [aria-current] { color: var(--ink-2); font-weight: 600; }

/* ---------- trust bar ---------- */
.trust-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.8rem;
  padding: .95rem 1.3rem; margin: -1.2rem 0 2.4rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  font-size: .87rem; color: var(--ink-2);
}
.trust-bar .ti { display: inline-flex; align-items: center; gap: .5rem; }
.trust-bar .ti::before {
  content: "✓"; display: grid; place-items: center;
  width: 1.15rem; height: 1.15rem; border-radius: 50%; flex: 0 0 auto;
  background: var(--brand-soft); color: var(--brand-ink); font-size: .72rem; font-weight: 800;
}
.trust-bar .ti b { font-weight: 700; color: var(--ink); }

/* ---------- meta row (freshness / provenance) ---------- */
.meta-row {
  display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center;
  font-size: .82rem; color: var(--muted); margin: .9rem 0 .2rem;
}
.meta-row .dot { opacity: .45; }
.meta-row time { color: var(--ink-2); font-weight: 600; }

/* ---------- FAQ accordion ---------- */
.faq-list { border-top: 1px solid var(--line); margin-top: 1rem; }
details.qa { border-bottom: 1px solid var(--line); }
details.qa > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem .25rem; font-weight: 650; font-size: 1.02rem; color: var(--ink);
}
details.qa > summary:hover { color: var(--brand-ink); }
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary::after {
  content: "+"; flex: 0 0 auto; width: 1.4rem; height: 1.4rem;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--surface-2); color: var(--brand); font-size: 1.15rem; font-weight: 500; line-height: 1;
}
details.qa[open] > summary::after { content: "−"; background: var(--brand-soft); }
details.qa > summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
details.qa .qa-body { padding: 0 .25rem 1.15rem; color: var(--ink-2); max-width: 54rem; }
details.qa .qa-body p { margin: 0; }

/* ---------- calculator result headline ---------- */
.result-headline {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem;
  padding: 1.2rem 1.4rem; margin-bottom: 1rem;
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: var(--radius);
}
.result-headline .rh-lbl { font-weight: 650; color: var(--brand-ink); }
.result-headline .rh-lbl small { display: block; font-weight: 500; color: var(--brand-ink); opacity: .8; font-size: .8rem; margin-top: .1rem; }
.result-headline .rh-num { font-size: clamp(1.9rem, 5vw, 2.4rem); font-weight: 850; letter-spacing: -.03em; color: var(--brand-ink); font-variant-numeric: tabular-nums; line-height: 1; }

/* ---------- tariff schedule: filter bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .9rem 1rem; align-items: flex-end;
  padding: 1.1rem 1.3rem; margin: 1rem 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  position: sticky; top: 4.2rem; z-index: 20;
}
.filter-bar .fb-field { display: flex; flex-direction: column; gap: .35rem; }
.filter-bar .fb-field.grow { flex: 1 1 18rem; }
.filter-bar label { font-size: .78rem; font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.filter-bar input, .filter-bar select {
  width: 100%; padding: .6rem .8rem; font-size: .95rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink);
}
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.result-count { font-size: .85rem; color: var(--muted); margin: .2rem 0 .6rem; }
.result-count b { color: var(--ink); font-weight: 700; }

/* segmented control (ad density) */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg); }
.seg button {
  border: 0; background: transparent; padding: .55rem .85rem; font: inherit;
  font-weight: 650; font-size: .85rem; color: var(--ink-2); cursor: pointer;
  border-left: 1px solid var(--line);
}
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--brand-soft); color: var(--brand-ink); }
.seg button.on { background: var(--brand); color: #fff; }

/* schedule rows */
.rate-pill { font-variant-numeric: tabular-nums; font-weight: 750; }
.rate-pill.free { color: var(--good); }
td code, .schedule code { font: 650 .9em ui-monospace, "SF Mono", Menlo, monospace; color: var(--brand-ink); }
.schedule .table-scroll { margin: 0 0 1rem; }
.schedule-empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); background: var(--surface); }

/* pager */
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem; margin: 1.6rem 0 .5rem; }
.pager .pg-info { font-size: .85rem; color: var(--muted); margin: 0 .5rem; font-variant-numeric: tabular-nums; }
.pager button[disabled] { opacity: .4; cursor: not-allowed; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.6s; }
  .btn, .pcard, tbody tr { transition: none; }
}

/* ---------- editorial / long-form pages (guides, privacy, disclaimer, updates) ---------- */
article.guide { max-width: 52rem; }
article.guide p, article.guide li { max-width: 46rem; }
article.guide h2 { margin-top: 1.9rem; }
article.guide ol, article.guide ul { padding-left: 1.2rem; }
article.guide li { margin: .3rem 0; }

/* FAQ sections that use plain <h3>/<p> (category, product, underestimated) */
.faq h3 { font-size: 1.02rem; margin: 1.3rem 0 .25rem; font-weight: 700; }
.faq h3:first-of-type { margin-top: .6rem; }

/* base <details>/<summary> for any non-accordion use */
details:not(.qa) { margin: .8rem 0; }
details:not(.qa) > summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; }

/* "est." tag on the tariff schedule (fallback rows + client-rendered rows) */
.est {
  font-size: .72rem; font-weight: 700; color: var(--warn);
  background: var(--warn-soft); padding: .05rem .35rem; border-radius: 5px;
  vertical-align: middle; letter-spacing: .01em;
}
pre.card { overflow-x: auto; font-size: .85rem; }

/* ---------- theme toggle button ---------- */
.theme-toggle {
  margin-left: .3rem; flex: 0 0 auto;
  width: 2.15rem; height: 2.15rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  display: inline-grid; place-items: center; cursor: pointer;
  font-size: 1rem; line-height: 1;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.theme-toggle:hover { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(0); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- dark mode ---------- */
/* A manual choice (data-theme on <html>) always wins; with no choice, follow the OS. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9eef4; --ink-2: #bcc9d6; --muted: #8fa1b3;
  --line: #223243; --line-2: #182636; --bg: #0b141d; --surface: #121e2b; --surface-2: #182636;
  --brand-soft: #123529; --brand-ink: #4ecfa8;
  --good: #4ecfa8; --good-soft: #123529;
  --hero-grad: linear-gradient(135deg, #0d2733 0%, #0d4a44 55%, #0e7a5f 100%);
  --warn-soft: #35300f; --warn: #e3c95c;
  --bad-soft: #3a201c; --bad: #ea8076;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.30);
  --shadow-2: 0 4px 10px rgba(0,0,0,.40), 0 12px 32px rgba(0,0,0,.45);
  --shadow-3: 0 10px 24px rgba(0,0,0,.5), 0 30px 60px rgba(0,0,0,.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #e9eef4; --ink-2: #bcc9d6; --muted: #8fa1b3;
    --line: #223243; --line-2: #182636; --bg: #0b141d; --surface: #121e2b; --surface-2: #182636;
    --brand-soft: #123529; --brand-ink: #4ecfa8;
    --good: #4ecfa8; --good-soft: #123529;
    --hero-grad: linear-gradient(135deg, #0d2733 0%, #0d4a44 55%, #0e7a5f 100%);
    --warn-soft: #35300f; --warn: #e3c95c;
    --bad-soft: #3a201c; --bad: #ea8076;
    --shadow-1: 0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.30);
    --shadow-2: 0 4px 10px rgba(0,0,0,.40), 0 12px 32px rgba(0,0,0,.45);
    --shadow-3: 0 10px 24px rgba(0,0,0,.5), 0 30px 60px rgba(0,0,0,.55);
  }
}
/* element tweaks that don't derive purely from tokens (both dark paths) */
:root[data-theme="dark"] header.site { background: color-mix(in srgb, var(--surface) 78%, transparent); }
:root[data-theme="dark"] .field-msg { color: var(--warn); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) header.site { background: color-mix(in srgb, var(--surface) 78%, transparent); }
  :root:not([data-theme="light"]) .field-msg { color: var(--warn); }
}

/* ---------- tariff chapter / heading pages ---------- */
.tstats { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.1rem 0 1.2rem; }
.tstat {
  display: flex; align-items: baseline; gap: .45rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: .45rem .95rem; box-shadow: var(--shadow-1);
}
.tstat b { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--brand-ink); }
.tstat span { font-size: .84rem; color: var(--muted); }
tr.hgroup td { background: var(--surface-2); font-weight: 650; }
tr.hgroup a { text-decoration: none; }
tr.hgroup a:hover { text-decoration: underline; }
tbody tr.hgroup:hover { background: var(--surface-2); }
td .levy { color: var(--muted); font-size: .78rem; display: block; }
.chapter-nav {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 1.6rem 0 .4rem; font-size: .9rem; font-weight: 600;
}
.chapter-index { margin: 2rem 0 1rem; }
.ci-section { margin-top: 1.2rem; }
.ci-section h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .5rem; }
.ci-section ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.ci-section a { display: flex; gap: .5rem; text-decoration: none; padding: .3rem .5rem; border-radius: var(--radius-sm); font-size: .92rem; }
.ci-section a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.ci-num { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
