/* ---------------------------------------------------------------------------
   CHB Mate - shared stylesheet.

   One file for the whole site. It is served statically, cache-busted with the
   file's modification time, and needs no build step.

   The look continues the existing lookup tool rather than replacing it: the
   same blue, the same grey borders, the same dense data tables. Around that
   sits a darker navy frame and a gold accent, so the marketing pages read as a
   product while the working pages still read as a tool. Deliberately not the
   airy, rounded, generic look of a component library - the audience is customs
   brokers reading tariff tables, and density is a feature.
   --------------------------------------------------------------------------- */

:root {
    --navy: #08365f;
    --navy-dark: #062744;
    --accent: #0b5cad;
    --accent-hover: #094a8c;
    --gold: #8a6d00;
    --gold-light: #b8901a;
    --gold-bg: #fdf8e8;

    --ink: #1f2328;
    --muted: #6b7280;
    --border: #d0d4da;
    --border-light: #e5e8ec;
    --page: #f3f5f8;
    --surface: #ffffff;

    --success: #1a7f37;
    --success-bg: #e8f5ec;
    --danger: #8a1f2d;
    --danger-bg: #fdf0f0;
    --warn: #8a6d00;
    --warn-bg: #fff8e1;

    --mono: Consolas, Menlo, "SF Mono", monospace;
    --sans: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

    --radius: 8px;
    --radius-sm: 6px;
}

* { box-sizing: border-box; }

/* The browser's own [hidden] rule is display:none at the lowest precedence, so
   any author rule setting display beats it. .tick sets display:block, which
   would otherwise reveal the confirmation tick the moment the page loaded. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--page);
    line-height: 1.55;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* --- Layout ------------------------------------------------------------- */

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.wrap.wide { max-width: 1500px; }

main { min-height: 60vh; }

.section { padding: 3.5rem 0; }
.section.tight { padding: 2rem 0; }

/* --- Top bar ------------------------------------------------------------ */

.topbar {
    background: var(--navy);
    color: #fff;
    border-bottom: 3px solid var(--gold);
}

.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 60px;
    flex-wrap: wrap;
}

.brand {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.brand .mark {
    font-family: var(--mono);
    color: var(--gold-light);
    font-weight: 700;
}

.nav {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.nav a,
.nav .navBtn {
    color: #cfe0f0;
    text-decoration: none;
    font-size: .9rem;
    padding: .4rem .7rem;
    border-radius: var(--radius-sm);
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.nav a:hover,
.nav .navBtn:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.nav a.on {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.nav .cta {
    background: var(--gold-light);
    color: var(--navy-dark);
    font-weight: 600;
}

.nav .cta:hover { background: #d5a723; color: var(--navy-dark); }

.nav form { display: inline; margin: 0; }

/* Admin group: visually separated so it is obvious when acting as operator. */
.nav .adminGroup {
    display: flex;
    gap: .2rem;
    align-items: center;
    margin-left: .4rem;
    padding-left: .6rem;
    border-left: 1px solid rgba(255, 255, 255, .25);
}

.nav .adminGroup a { color: var(--gold-light); }

/* --- Second-level navigation --------------------------------------------
   One top-bar entry per area, with anything finer down here. The top bar
   already wraps onto two lines on a laptop, so a new screen must not cost a
   slot in it. */

.subnav {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
    margin: -.4rem 0 1.4rem;
    border-bottom: 1px solid var(--border);
}

.subnav a {
    color: var(--muted);
    text-decoration: none;
    font-size: .88rem;
    padding: .45rem .85rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.subnav a:hover { color: var(--ink); background: #f3f5f8; }

.subnav a.on {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* --- Environment banner ------------------------------------------------- */

.envBanner {
    background: var(--warn-bg);
    border-bottom: 1px solid #e0c060;
    color: #6b5500;
    font-size: .82rem;
    text-align: center;
    padding: .35rem 1rem;
}

/* --- Footer ------------------------------------------------------------- */

.sitefoot {
    margin-top: 4rem;
    background: var(--navy-dark);
    color: #9db3c9;
    font-size: .82rem;
    padding: 1.6rem 0;
}

.sitefoot .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.4rem;
    align-items: center;
}

.sitefoot a { color: #cfe0f0; text-decoration: none; }
.sitefoot a:hover { text-decoration: underline; }
.sitefoot .spacer { flex: 1; }
.sitefoot .disclaimer { color: #7e94a9; }

/* --- Typography --------------------------------------------------------- */

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem; font-weight: 650; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.02rem; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .09em;
    font-size: .72rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: .5rem;
}

.lede { font-size: 1.05rem; color: #414852; max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.code { font-family: var(--mono); white-space: nowrap; }

/* --- Buttons ------------------------------------------------------------ */

.btn {
    display: inline-block;
    padding: .55rem 1.3rem;
    font-size: .95rem;
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
}

.btn:hover { background: var(--accent-hover); color: #fff; }

.btn.secondary {
    background: #eef1f5;
    color: var(--ink);
    border-color: var(--border);
}
.btn.secondary:hover { background: #e2e7ee; color: var(--ink); }

.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #6f1824; }

.btn.big { padding: .7rem 1.7rem; font-size: 1rem; }

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}

/* Google button: neutral surface, per Google's identity guidance. */
.btnGoogle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    width: 100%;
    padding: .7rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    background: #fff;
    color: #3c4043;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
}

.btnGoogle:hover { background: #f7f8fa; color: #3c4043; }
.btnGoogle svg { width: 18px; height: 18px; flex: none; }

/* --- Cards and panels --------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
}

.cardGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel > h2,
.panel > .panelHead {
    margin: 0;
    padding: .7rem 1.1rem;
    background: #f7f9fc;
    border-bottom: 1px solid var(--border);
    font-size: .95rem;
}

.panel > .panelBody { padding: 1.1rem; }

/* --- Messages ----------------------------------------------------------- */

.msg {
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    padding: .7rem 1rem;
    margin: 0 0 1.1rem;
    font-size: .92rem;
}

.msg.notice  { background: var(--warn-bg);    border-color: #e0c060; border-left-color: var(--gold); }
.msg.success { background: var(--success-bg); border-color: #a8d5b8; border-left-color: var(--success); }
.msg.error   { background: var(--danger-bg);  border-color: #d99;    border-left-color: var(--danger); }

/* --- Standalone pages (500, CSRF failure, sign-in bounce) --------------- */

.plainPage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.noticeCard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    max-width: 460px;
    text-align: center;
}

.noticeCard h1 { font-size: 1.2rem; }
.noticeCard p { color: var(--muted); font-size: .93rem; }

/* --- Sign-in card ------------------------------------------------------- */

.authCard {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 2rem 2.1rem;
}

.authCard h1 { font-size: 1.25rem; text-align: center; }
.authCard .sub { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 1.6rem; }
.authCard .fine { font-size: .78rem; color: var(--muted); text-align: center; margin-top: 1.1rem; }

/* --- Home page ---------------------------------------------------------- */

.hero {
    background: linear-gradient(180deg, #fff 0%, var(--page) 100%);
    border-bottom: 1px solid var(--border);
    padding: 3.5rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.hero h1 { font-size: 2.15rem; max-width: 18ch; }
.hero .lede { margin: .9rem 0 1.6rem; }
.hero .actions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.hero .priceNote { color: var(--muted); font-size: .88rem; }

/* Oversized tariff-code motif behind the hero copy. */
.hero .motif {
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--mono);
    font-size: 8rem;
    font-weight: 700;
    color: rgba(11, 92, 173, .045);
    letter-spacing: -.03em;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.statsBand {
    background: var(--navy);
    color: #fff;
    padding: 1.8rem 0;
}

.statsBand .wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
    text-align: center;
}

.statsBand .n {
    font-family: var(--mono);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--gold-light);
    display: block;
}

.statsBand .l { font-size: .82rem; color: #b9cde0; }

.steps { counter-reset: step; }

.steps .step { position: relative; padding-left: 3rem; }

.steps .step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold-light);
    font-family: var(--mono);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.priceCard {
    border: 2px solid var(--gold);
    background: var(--gold-bg);
    border-radius: var(--radius);
    padding: 1.7rem 1.8rem;
    max-width: 420px;
}

.priceCard .amount {
    font-size: 2.4rem;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--navy);
    line-height: 1;
}

.priceCard .per { color: var(--muted); font-size: .95rem; }

.priceCard ul {
    list-style: none;
    padding: 0;
    margin: 1.1rem 0 1.4rem;
    font-size: .9rem;
}

.priceCard li { padding: .28rem 0 .28rem 1.5rem; position: relative; }

.priceCard li::before {
    content: "";
    position: absolute;
    left: .25rem;
    top: .72rem;
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--gold);
}

.faq dt { font-weight: 600; margin-top: 1.1rem; }
.faq dd { margin: .25rem 0 0; color: #414852; }

.disclaimerStrip {
    background: #eef1f5;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.1rem 0;
    font-size: .85rem;
    color: #4a525c;
}

/* --- Legal / long-form text --------------------------------------------- */

.legal { max-width: 76ch; }
.legal h2 { margin-top: 2rem; font-size: 1.08rem; }
.legal p, .legal li { font-size: .93rem; color: #333a42; }
.legal .updated { color: var(--muted); font-size: .85rem; }

/* --- Lookup form -------------------------------------------------------- */

.lookupForm { margin-bottom: 1.2rem; }

.lookupForm textarea {
    width: 100%;
    height: 130px;
    font-family: var(--mono);
    font-size: .95rem;
    padding: .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fffbea;
    resize: vertical;
}

.lookupForm textarea:disabled { background: #f1f2f4; color: var(--muted); }

.lookupRow {
    display: flex;
    gap: .8rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: .6rem;
}

.field label {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: .2rem;
}

.field select,
.field input[type="text"],
.field input[type="date"] {
    padding: .45rem .55rem;
    font-size: .92rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
}

.limitNote { color: var(--muted); font-size: .82rem; margin-left: auto; }

/* --- Results table (carried over from the original tool) ---------------- */

.stats { margin: .8rem 0; font-size: .93rem; }

.tablewrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    background: var(--surface);
}

table.res {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
    font-size: .78rem;
}

table.res th,
table.res td {
    border: 1px solid var(--border);
    padding: .3rem .35rem;
    vertical-align: top;
    text-align: left;
    overflow-wrap: break-word;
}

table.res thead th {
    background: #dbe5f1;
    position: sticky;
    top: 0;
    font-size: .72rem;
    z-index: 1;
}

table.res tbody tr:nth-child(even) td { background: #f7f9fc; }

table.res .code { font-family: var(--mono); white-space: nowrap; font-size: .76rem; }

table.res .annot {
    display: block;
    color: var(--gold);
    font-size: .65rem;
    line-height: 1.25;
    white-space: normal;
}

.codeitem { margin-bottom: .2rem; }
.codeitem:last-child { margin-bottom: 0; }
.pgaitem { font-size: .68rem; line-height: 1.3; margin-bottom: .25rem; }
.pgaitem:last-child { margin-bottom: 0; }

/* Duty column. Carried over from the original tool: the computed total reads as
   the answer, the branch label and the column-1 base sit quietly beneath it. */
.dutyline { font-size: .74rem; font-weight: 600; line-height: 1.35; }
.dutylabel { font-weight: 400; color: var(--muted); font-size: .62rem; }
.dutybase { font-size: .62rem; color: var(--muted); }

.inputcell { font-family: var(--mono); background: #fffbea; overflow-wrap: anywhere; }
tr.invalid td { background: var(--danger-bg) !important; color: var(--danger); }
tr.nomatch { color: var(--muted); }
.dash { color: #c2c7cf; text-align: center; }

/* --- Locked (unsubscribed) dashboard ------------------------------------ */

.lockedBanner {
    background: var(--gold-bg);
    border: 1px solid #e0c060;
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.lockedBanner .grow { flex: 1; min-width: 240px; }
.lockedBanner h2 { font-size: 1.05rem; margin-bottom: .2rem; }
.lockedBanner p { margin: 0; font-size: .9rem; color: #5c4f14; }

.exampleTag {
    display: inline-block;
    background: var(--navy);
    color: var(--gold-light);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 3px;
    margin-bottom: .5rem;
}

/* --- Waiting / confirmed states (PayPal return) --------------------------
   All CSS, no JavaScript: the page reloads itself with a meta refresh, so the
   spinner is decoration over a real server-side poll rather than a fake one. */

.statusStage {
    text-align: center;
    padding: 3rem 1rem 2.5rem;
    max-width: 30rem;
    margin: 0 auto;
}

.statusStage h1 { font-size: 1.35rem; margin-bottom: .5rem; }
.statusStage p { color: var(--muted); }

.spinner {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.6rem;
    border: 5px solid var(--border-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 900ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Drawn rather than a static glyph so the confirmation reads as something
   that just happened, which is the moment the customer is waiting for. */
.tick { width: 72px; height: 72px; margin: 0 auto 1.6rem; display: block; }

.tick .tickRing {
    fill: none;
    stroke: var(--success);
    stroke-width: 5;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: tickRing 500ms ease-out forwards;
}

.tick .tickMark {
    fill: none;
    stroke: var(--success);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: tickMark 320ms 420ms ease-out forwards;
}

@keyframes tickRing { to { stroke-dashoffset: 0; } }
@keyframes tickMark { to { stroke-dashoffset: 0; } }

.countdownLine {
    font-size: .95rem;
    color: var(--ink);
    margin-top: 1.4rem;
}

/* The digit itself is written by the script; this only styles it. */
.countdownNum {
    font-family: var(--mono);
    font-weight: 700;
    color: var(--success);
}

.countdownBar {
    height: 4px;
    width: 220px;
    margin: .9rem auto 0;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.countdownBar span {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--success);
}

/* Drains only once the script has confirmed and started the countdown, so the
   bar cannot appear to be counting down before anything has happened. */
.countdownBar.running span {
    animation: countdownDrain 7s linear forwards;
}

@keyframes countdownDrain { to { width: 0; } }

.waitNote { font-size: .85rem; color: var(--muted); margin-top: 1.6rem; }

/* Shown by default so a page whose script never ran still offers a way
   forward; the script adds .polling to the stage and takes it away. */
.statusStage.polling .jsFallback { display: none; }

/* Spinning and draining are motion; the page still works without either. */
@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
        border-top-color: var(--accent);
        opacity: .6;
    }
    .tick .tickRing,
    .tick .tickMark { animation: none; stroke-dashoffset: 0; }
    .countdownBar.running span { animation: none; }
}

/* --- Subscription page -------------------------------------------------- */

.statusCard {
    border: 1px solid var(--border);
    border-left: 5px solid var(--muted);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.5rem;
}

.statusCard.isActive    { border-left-color: var(--success); }
.statusCard.isCancelled { border-left-color: var(--gold); }
.statusCard.isExpired   { border-left-color: var(--danger); }

.statusCard .state {
    font-size: 1.15rem;
    font-weight: 650;
    margin-bottom: .3rem;
}

.statusCard.isActive .state    { color: var(--success); }
.statusCard.isCancelled .state { color: var(--gold); }
.statusCard.isExpired .state   { color: var(--danger); }

.kv {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .3rem 1.2rem;
    font-size: .9rem;
    margin: .9rem 0 0;
}

.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* --- Data tables (admin) ------------------------------------------------ */

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    background: var(--surface);
}

table.data th,
table.data td {
    border-bottom: 1px solid var(--border-light);
    padding: .45rem .6rem;
    text-align: left;
    vertical-align: top;
}

table.data thead th {
    background: #f7f9fc;
    border-bottom: 1px solid var(--border);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #4a525c;
    white-space: nowrap;
}

table.data tbody tr:hover td { background: #f9fbfd; }
table.data td.num { text-align: right; font-family: var(--mono); white-space: nowrap; }

/* --- Admin dashboard ---------------------------------------------------- */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .8rem;
    margin-bottom: 1.5rem;
}

.tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .9rem 1rem;
}

.tile .n {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--navy);
    line-height: 1.1;
}

.tile .l { font-size: .78rem; color: var(--muted); }
.tile.alert { border-color: #d99; background: var(--danger-bg); }
.tile.alert .n { color: var(--danger); }

/* Pure-CSS bar chart: the inline width attribute is why style-src keeps
   'unsafe-inline'. There is no inline JavaScript anywhere. */
.bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 70px;
    padding-top: .4rem;
}

.bars .bar {
    flex: 1;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
}

.bars .bar.alt { background: var(--gold-light); }

.badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    padding: .1rem .45rem;
    border-radius: 3px;
    border: 1px solid;
    white-space: nowrap;
}

.badge.ok   { color: var(--success); border-color: #a8d5b8; background: var(--success-bg); }
.badge.warn { color: var(--warn);    border-color: #e0c060; background: var(--warn-bg); }
.badge.bad  { color: var(--danger);  border-color: #d99;    background: var(--danger-bg); }
.badge.neutral { color: var(--muted); border-color: var(--border); background: #f3f5f8; }

.healthRow {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .4rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: .86rem;
}

.healthRow:last-child { border-bottom: 0; }

/* --- Forms -------------------------------------------------------------- */

.formRow { margin-bottom: .9rem; }

.formRow label.check {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    font-size: .9rem;
    cursor: pointer;
}

.formRow input[type="checkbox"] { margin-top: .25rem; flex: none; }

.confirmBox {
    background: var(--danger-bg);
    border: 1px solid #d99;
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    margin: 1rem 0;
}

.inlineForm { display: inline; margin: 0; }

/* --- Utilities ---------------------------------------------------------- */

.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 720px) {
    .hero h1 { font-size: 1.6rem; }
    .hero .motif { display: none; }
    .topbar .wrap { min-height: 0; padding-top: .5rem; padding-bottom: .5rem; }
    .nav { gap: .1rem; }
    .nav a, .nav .navBtn { padding: .35rem .5rem; font-size: .85rem; }
    .section { padding: 2.2rem 0; }
    .kv { grid-template-columns: 1fr; gap: 0 0; }
    .kv dd { margin-bottom: .5rem; }
}

@media print {
    .topbar, .sitefoot, .envBanner, .lookupForm, .btn { display: none; }
    body { background: #fff; }
    .tablewrap { border: 0; }
}
