:root {
  --ink: #10202f;
  --ink-2: #3b4b5c;
  --muted: #5f6f80;
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --line: #e0d9cf;
  --accent: #f29a2e;
  --accent-ink: #8a4b00;
  --accent-soft: #fdecd5;
  --teal: #0e6b62;
  --teal-soft: #dff1ee;
  --danger: #b42318;
  --ok: #157f3b;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(16 32 47 / .06), 0 8px 24px -12px rgb(16 32 47 / .18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", var(--font);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2f6; --ink-2: #c4ced8; --muted: #93a2b1; --bg: #0d1822; --surface: #142330; --surface-2: #1b2d3c;
    --line: #26394a; --accent-ink: #ffc27a; --accent-soft: #3a2a12; --teal: #5fd0c3; --teal-soft: #12332f;
    --danger: #ff8a80; --ok: #6fdc95; color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 700; margin-top: 1.6em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; text-wrap: pretty; }
.muted { color: var(--muted); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.15rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand__tld { color: var(--accent-ink); }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.nav__toggle { display: none; }
@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
  .nav ul { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.is-open ul { display: flex; }
}

/* Page grid */
.page { padding-block: 28px 40px; }
.page--sidebar { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.sidebar { display: grid; gap: 24px; }
.sidebar__sticky { position: sticky; top: 84px; }
@media (max-width: 1000px) { .page--sidebar { grid-template-columns: 1fr; } .sidebar__sticky { position: static; } }
main { min-width: 0; }

/* Hero */
.hero { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; margin-bottom: 28px; }
.hero__eyebrow { display: inline-block; font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.hero__lede { font-size: 1.12rem; color: var(--ink-2); max-width: 56ch; }
.hero__art { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; background: var(--surface-2); }
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero__art { aspect-ratio: 16/9; order: -1; } }

.page-head { display: grid; grid-template-columns: 1fr 260px; gap: 28px; align-items: center; margin-bottom: 20px; }
.page-head__art { border-radius: 18px; overflow: hidden; aspect-ratio: 16/10; background: var(--surface-2); }
.page-head__art img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .page-head { grid-template-columns: 1fr; } .page-head__art { display: none; } }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

/* Track form */
.track { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.track__row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.track__row--select { grid-template-columns: 1.3fr 1fr auto; }
@media (max-width: 640px) { .track__row, .track__row--select { grid-template-columns: 1fr; } }
.input, select.input { width: 100%; font: inherit; font-size: 1.05rem; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); min-height: 52px; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.input--mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem/1 var(--font); padding: 0 22px; min-height: 52px; border-radius: 12px; border: 0; background: var(--accent); color: #1d1200; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.05); color: #1d1200; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: .92rem; border-radius: 10px; }
.track__hint { margin: 10px 2px 0; font-size: .9rem; color: var(--muted); }
.detect { margin-top: 10px; font-size: .92rem; min-height: 1.4em; }
.detect b { color: var(--teal); }
label.lbl { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }

/* Cards & grids */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.card h3 { margin: 0 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.card__img { margin: -16px -18px 14px; aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--surface-2); }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.courier-card { display: flex; gap: 12px; align-items: center; }
.courier-card .mono { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 800 .95rem var(--display); color: #fff; }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); vertical-align: middle; }
.tag--live { background: var(--teal-soft); color: var(--teal); }
.tag--warn { background: var(--accent-soft); color: var(--accent-ink); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel--soft { background: var(--surface-2); border-color: transparent; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: .92rem; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.notice { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 8px; margin: 16px 0; }
.notice p:last-child { margin: 0; }

/* Results */
.result { margin-top: 20px; }
.result__head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: baseline; justify-content: space-between; }
.status-pill { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); }
.timeline { list-style: none; margin: 16px 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 20px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.timeline li:first-child::before { background: var(--accent); border-color: var(--accent); }
.timeline time { display: block; font-size: .85rem; color: var(--muted); }
.timeline .loc { font-size: .88rem; color: var(--ink-2); }
.options { display: grid; gap: 10px; margin-top: 14px; }
.option { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.option p { margin: 0; font-size: .92rem; color: var(--muted); }

/* Prose */
.prose { max-width: 74ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table, table.tbl { border-collapse: collapse; width: 100%; font-size: .94rem; margin: 1em 0 1.4em; }
table.tbl th, table.tbl td, .prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th, .prose th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
.prose figure { margin: 1.4em 0; }
.prose figure img { border-radius: var(--radius); }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
details.faq { border-bottom: 1px solid var(--line); padding: 12px 0; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: 8px 0 0; color: var(--ink-2); }

/* Calculators */
.calc { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }
.field .input { font-size: 1rem; padding: 10px 12px; min-height: 46px; }
.field small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.out { background: var(--ink); color: var(--bg); border-radius: var(--radius); padding: 20px; }
.out .big { font: 800 2.4rem/1 var(--display); margin: 6px 0 12px; color: var(--accent); }
.out dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin: 0; font-size: .95rem; }
.out dt { opacity: .8; }
.out dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.out .sep { grid-column: 1/-1; border-top: 1px solid rgb(255 255 255 / .15); margin: 4px 0; }
@media (prefers-color-scheme: dark) { .out { background: #091119; color: var(--ink); } }

/* Ads — reserve space to avoid layout shift */
.ad { width: 100%; margin: 24px auto; text-align: center; min-height: 120px; }
.ad--top, .ad--results { min-height: 100px; }
.ad--sidebar { min-height: 600px; margin: 0; }
.ad__label { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad ins { min-height: inherit; }

/* Footer */
.site-footer { background: var(--ink); color: #c7d1db; padding: 40px 0 24px; margin-top: 24px; }
@media (prefers-color-scheme: dark) { .site-footer { background: #08121a; } }
.site-footer a { color: #e9eef3; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer h2 { font: 700 .82rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: #8ea0b2; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer__grid { display: grid; gap: 28px; grid-template-columns: 2fr 1fr 1fr 1fr; }
.site-footer .muted { color: #8ea0b2; }
.brand--footer { color: #fff; margin-bottom: 10px; }
.site-footer__legal { border-top: 1px solid rgb(255 255 255 / .1); margin-top: 28px; padding-top: 16px; font-size: .85rem; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__grid > :first-child { grid-column: 1/-1; } }

.section { margin-top: 36px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font: 800 1rem var(--display); }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
