/* ==========================================================================
   Toyota parts catalogue — design system

   One stylesheet, no build step, no framework. Everything is driven by the
   tokens in :root so the whole site can be re-skinned from one block, and the
   dark palette re-declares only the tokens rather than duplicating rules.
   ========================================================================== */

:root {
    /* Structure */
    --c-bg:          #f2f5f9;
    --c-surface:     #ffffff;
    --c-surface-2:   #f7f9fc;
    --c-line:        #dce3ed;
    --c-line-strong: #c3cede;

    /* Text */
    --c-ink:         #15202f;
    --c-ink-2:       #46566c;
    --c-muted:       #6b7b91;

    /* Brand: deep navy structure, warm red for the one action that matters */
    --c-brand:       #0d2540;
    --c-brand-2:     #16406e;
    --c-brand-ink:   #ffffff;
    --c-accent:      #d1202f;
    --c-accent-2:    #b0121f;
    --c-accent-ink:  #ffffff;

    /* Status */
    --c-ok:          #0c7a58;
    --c-ok-bg:       #e6f5ef;
    --c-warn:        #a75d00;
    --c-warn-bg:     #fdf2e2;
    --c-info:        #12566f;
    --c-info-bg:     #e6f2f7;
    --c-danger:      #b3261e;
    --c-danger-bg:   #fdecea;

    --radius:    10px;
    --radius-sm: 6px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(15, 32, 55, .07), 0 1px 1px rgba(15, 32, 55, .04);
    --shadow:    0 4px 14px rgba(15, 32, 55, .09);
    --shadow-lg: 0 18px 40px rgba(15, 32, 55, .16);

    --wrap: 1280px;
    --header-h: 62px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
            "Noto Sans JP", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --c-bg:          #0e141c;
        --c-surface:     #151d28;
        --c-surface-2:   #1a2431;
        --c-line:        #263243;
        --c-line-strong: #35455a;

        --c-ink:         #e8eef6;
        --c-ink-2:       #b3c1d2;
        --c-muted:       #8496ac;

        --c-brand:       #0b1826;
        --c-brand-2:     #1d4a7a;
        --c-accent:      #e63946;
        --c-accent-2:    #c92836;

        --c-ok:          #4cc79c;
        --c-ok-bg:       #10322a;
        --c-warn:        #e0a458;
        --c-warn-bg:     #33260f;
        --c-info:        #7cc4dd;
        --c-info-bg:     #102a34;
        --c-danger:      #f08b84;
        --c-danger-bg:   #351a18;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
        --shadow:    0 4px 14px rgba(0, 0, 0, .45);
        --shadow-lg: 0 18px 40px rgba(0, 0, 0, .55);
    }
}

/* --- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.011em; font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; }

p { margin: 0 0 1em; }

a { color: var(--c-brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--c-line); margin: 1.5rem 0; }

:focus-visible {
    outline: 3px solid var(--c-brand-2);
    outline-offset: 2px;
    border-radius: 3px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 20px; }

.mono { font-family: var(--mono); font-size: .93em; }
.muted { color: var(--c-muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.hide { display: none !important; }

.skip-link {
    position: absolute;
    left: -9999px;
    background: var(--c-surface);
    padding: .6rem 1rem;
    z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --- Header -------------------------------------------------------------- */

.topbar {
    background: var(--c-brand);
    color: rgba(255, 255, 255, .82);
    font-size: .8rem;
}
.topbar a { color: rgba(255, 255, 255, .82); }
.topbar a:hover { color: #fff; }
.topbar .wrap {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    min-height: 34px;
    flex-wrap: wrap;
}
.topbar-spacer { margin-left: auto; }

.region-form { display: inline-flex; align-items: center; gap: .4rem; }
.region-form select {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius-sm);
    padding: .15rem 1.4rem .15rem .4rem;
    font: inherit;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.7) 50%),
                      linear-gradient(135deg, rgba(255,255,255,.7) 50%, transparent 50%);
    background-position: right 12px center, right 7px center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.region-form select option { color: #16202e; background: #fff; }

.header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header .wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: var(--header-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--c-ink);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -.02em;
    white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo-mark {
    width: 34px;
    height: 26px;
    border-radius: 50% / 38%;
    border: 3px solid var(--c-accent);
    position: relative;
    flex: none;
}
.logo-mark::before,
.logo-mark::after {
    content: "";
    position: absolute;
    border: 2.5px solid var(--c-accent);
    border-radius: 50% / 40%;
}
.logo-mark::before { inset: 4px 12px; }
.logo-mark::after  { inset: 8px 3px; border-radius: 50% / 50%; }
.logo small {
    display: block;
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--c-muted);
}

/* --- Search -------------------------------------------------------------- */

.search {
    flex: 1;
    position: relative;
    min-width: 0;
}
.search form { display: flex; }
.search input[type="search"] {
    flex: 1;
    min-width: 0;
    font: inherit;
    padding: .62rem .9rem;
    border: 2px solid var(--c-line-strong);
    border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    background: var(--c-surface);
    color: var(--c-ink);
}
.search input[type="search"]:focus {
    outline: 0;
    border-color: var(--c-brand-2);
}
.search button {
    font: inherit;
    font-weight: 600;
    border: 0;
    padding: 0 1.15rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--c-accent);
    color: var(--c-accent-ink);
    cursor: pointer;
}
.search button:hover { background: var(--c-accent-2); }

.suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 60;
}
.suggest a {
    display: flex;
    gap: .7rem;
    align-items: baseline;
    padding: .55rem .9rem;
    color: var(--c-ink);
    border-bottom: 1px solid var(--c-line);
}
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.is-active { background: var(--c-surface-2); text-decoration: none; }
.suggest .s-kind {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 700;
    color: var(--c-muted);
    flex: none;
    width: 58px;
}
.suggest .s-detail { margin-left: auto; color: var(--c-muted); font-size: .82rem; }

/* --- Header actions ------------------------------------------------------ */

.header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }

.basket-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .8rem;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--radius);
    color: var(--c-ink);
    font-weight: 600;
    white-space: nowrap;
}
.basket-link:hover { text-decoration: none; border-color: var(--c-brand-2); }
.basket-count {
    background: var(--c-accent);
    color: var(--c-accent-ink);
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: .74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--radius);
    color: var(--c-ink);
    padding: .45rem .7rem;
    font: inherit;
    cursor: pointer;
}

/* --- Primary nav --------------------------------------------------------- */

.nav {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
}
.nav .wrap { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a {
    padding: .6rem .85rem;
    color: var(--c-ink-2);
    font-weight: 600;
    font-size: .9rem;
    border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--c-ink); text-decoration: none; }
.nav a.is-active { color: var(--c-brand-2); border-bottom-color: var(--c-accent); }

/* --- Page furniture ------------------------------------------------------ */

main { padding: 1.5rem 0 3rem; min-height: 55vh; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    font-size: .84rem;
    color: var(--c-muted);
    margin-bottom: 1rem;
}
.crumbs a { color: var(--c-ink-2); }
.crumbs span[aria-hidden] { opacity: .5; }
.crumbs .current { color: var(--c-ink); font-weight: 600; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.page-head p { margin: 0; color: var(--c-muted); }

.card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.1rem 1.25rem; }
.card + .card { margin-top: 1rem; }
.card > h2, .card > h3 { margin-top: 0; }

.section-title {
    display: flex;
    align-items: baseline;
    gap: .7rem;
    margin: 1.75rem 0 .85rem;
}
.section-title h2 { margin: 0; }
.section-title .count { color: var(--c-muted); font-size: .85rem; }
.section-title .more { margin-left: auto; font-size: .85rem; }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font: inherit;
    font-weight: 600;
    padding: .55rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--c-line-strong);
    background: var(--c-surface);
    color: var(--c-ink);
    cursor: pointer;
    text-align: center;
}
.btn:hover { text-decoration: none; border-color: var(--c-brand-2); color: var(--c-brand-2); }
.btn-accent {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: var(--c-accent-ink);
}
.btn-accent:hover { background: var(--c-accent-2); border-color: var(--c-accent-2); color: #fff; }
.btn-brand {
    background: var(--c-brand-2);
    border-color: var(--c-brand-2);
    color: #fff;
}
.btn-brand:hover { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.btn-sm { padding: .3rem .6rem; font-size: .82rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* --- Chips & badges ------------------------------------------------------ */

.chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .12rem .5rem;
    border-radius: 999px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-line);
    font-size: .78rem;
    color: var(--c-ink-2);
    white-space: nowrap;
}
.chip-ok     { background: var(--c-ok-bg);     border-color: transparent; color: var(--c-ok); }
.chip-warn   { background: var(--c-warn-bg);   border-color: transparent; color: var(--c-warn); }
.chip-info   { background: var(--c-info-bg);   border-color: transparent; color: var(--c-info); }
.chip-danger { background: var(--c-danger-bg); border-color: transparent; color: var(--c-danger); }
.chip-code { font-family: var(--mono); font-size: .74rem; }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; }

.price {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.price-none { color: var(--c-muted); font-weight: 400; font-size: .85rem; }

/* --- Notices ------------------------------------------------------------- */

.notice {
    border-left: 4px solid var(--c-info);
    background: var(--c-info-bg);
    color: var(--c-ink);
    padding: .75rem 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 0 0 1rem;
    font-size: .9rem;
}
.notice-warn { border-color: var(--c-warn); background: var(--c-warn-bg); }
.notice-ok   { border-color: var(--c-ok);   background: var(--c-ok-bg); }
.notice-error{ border-color: var(--c-danger); background: var(--c-danger-bg); }
.notice strong { font-weight: 700; }
.notice p:last-child { margin-bottom: 0; }

/* --- Tables -------------------------------------------------------------- */

.table-wrap {
    overflow-x: auto;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: .89rem;
}
table.data th,
table.data td {
    padding: .55rem .7rem;
    text-align: left;
    border-bottom: 1px solid var(--c-line);
    vertical-align: top;
}
table.data thead th {
    position: sticky;
    top: 0;
    background: var(--c-surface-2);
    color: var(--c-ink-2);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    white-space: nowrap;
    z-index: 2;
    box-shadow: inset 0 -1px 0 var(--c-line);
}
table.data tbody tr:hover { background: var(--c-surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; text-align: right; }
table.data .pn { font-family: var(--mono); font-weight: 600; white-space: nowrap; }

.table-note {
    padding: .6rem .9rem;
    font-size: .82rem;
    color: var(--c-muted);
    border-top: 1px solid var(--c-line);
    background: var(--c-surface-2);
}

/* --- Grids --------------------------------------------------------------- */

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.split {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1.25rem;
    align-items: start;
}

/* --- Tiles --------------------------------------------------------------- */

.tile {
    display: flex;
    flex-direction: column;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--c-ink);
    transition: border-color .12s, box-shadow .12s, transform .12s;
}
a.tile:hover {
    text-decoration: none;
    border-color: var(--c-brand-2);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.tile-img {
    aspect-ratio: 157 / 113;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--c-line);
    overflow: hidden;
}
.tile-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.tile-img.is-empty {
    background: repeating-linear-gradient(45deg, var(--c-surface-2), var(--c-surface-2) 8px, var(--c-surface) 8px, var(--c-surface) 16px);
    color: var(--c-muted);
    font-size: .78rem;
}
.tile-body { padding: .7rem .8rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.tile-title { font-weight: 650; font-size: .93rem; line-height: 1.3; }
.tile-meta { font-size: .78rem; color: var(--c-muted); margin-top: auto; }

.model-card {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .8rem .9rem;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    color: var(--c-ink);
}
a.model-card:hover { text-decoration: none; border-color: var(--c-brand-2); box-shadow: var(--shadow); }
.model-card .m-name { font-weight: 700; letter-spacing: -.01em; }
.model-card .m-meta { font-size: .8rem; color: var(--c-muted); }

/* --- Alphabet index ------------------------------------------------------ */

.alpha { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.25rem; }
.alpha a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-ink-2);
    font-weight: 700;
    font-size: .85rem;
}
.alpha a:hover { text-decoration: none; border-color: var(--c-brand-2); color: var(--c-brand-2); }
.alpha a.is-active { background: var(--c-brand-2); border-color: var(--c-brand-2); color: #fff; }

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

.hero {
    background:
        radial-gradient(1200px 400px at 15% -20%, rgba(209, 32, 47, .28), transparent 60%),
        linear-gradient(155deg, var(--c-brand) 0%, #123a63 55%, #0b2138 100%);
    color: #fff;
    padding: 2.75rem 0 2.25rem;
}
.hero h1 {
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    max-width: 22ch;
    margin-bottom: .5rem;
}
.hero p.lede {
    color: rgba(255, 255, 255, .8);
    max-width: 62ch;
    font-size: 1.02rem;
}
.hero-search { margin-top: 1.5rem; max-width: 720px; }
.hero-search form { display: flex; }
.hero-search input {
    flex: 1;
    min-width: 0;
    font: inherit;
    font-size: 1.02rem;
    padding: .85rem 1.1rem;
    border: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    background: #fff;
    color: #16202e;
}
.hero-search button {
    font: inherit;
    font-weight: 700;
    border: 0;
    padding: 0 1.6rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--c-accent);
    color: #fff;
    cursor: pointer;
}
.hero-search button:hover { background: var(--c-accent-2); }
.hero-hint { margin-top: .7rem; font-size: .85rem; color: rgba(255, 255, 255, .72); }
.hero-hint code {
    font-family: var(--mono);
    background: rgba(255, 255, 255, .13);
    padding: .1rem .35rem;
    border-radius: 4px;
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.step {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
}
.step .n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--c-brand-2);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    margin-bottom: .5rem;
}
.step h3 { margin-bottom: .25rem; }
.step p { margin: 0; color: var(--c-muted); font-size: .9rem; }

/* --- Figure viewer ------------------------------------------------------- */

.figure-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 1.25rem;
    align-items: start;
}

.figure-pane {
    position: sticky;
    top: calc(var(--header-h) + 12px);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.figure-canvas {
    position: relative;
    background: #fff;
    line-height: 0;
}
.figure-canvas img { width: 100%; display: block; }
.figure-canvas svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hs {
    fill: rgba(22, 64, 110, .001);
    stroke: rgba(22, 64, 110, .55);
    stroke-width: .35;
    cursor: pointer;
    transition: fill .1s;
}
.hs:hover, .hs.is-active {
    fill: rgba(209, 32, 47, .22);
    stroke: var(--c-accent);
    stroke-width: .7;
}
.hs.is-dead {
    stroke: rgba(107, 123, 145, .5);
    stroke-dasharray: 1.2 1.2;
    cursor: default;
}
.hs.is-dead:hover { fill: rgba(107, 123, 145, .12); stroke-width: .35; }

.figure-toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .7rem;
    border-top: 1px solid var(--c-line);
    background: var(--c-surface-2);
    font-size: .82rem;
    color: var(--c-muted);
    flex-wrap: wrap;
}
.figure-toolbar .spacer { margin-left: auto; }

.parts-pane .filter-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .6rem;
}
.parts-pane .filter-bar input {
    font: inherit;
    padding: .4rem .65rem;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-ink);
    min-width: 180px;
}

/* The parts pane is the narrow half of the figure layout, and a part
   description plus four fitment codes will happily overflow it. Constrain the
   two elastic columns so the price and the add button stay on screen. */
.parts-pane table.data td.fitment { max-width: 190px; }
/* A fitment token runs to 82 characters in the worst case
   (`5D;NCP10,NLP10,SCP10` and longer). Truncate the chip and leave the full
   text in its tooltip rather than letting one row set the table's width. */
.parts-pane table.data td.fitment .chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}
.parts-pane table.data td:nth-child(2) { min-width: 170px; }
.parts-pane table.data td:last-child,
.parts-pane table.data td.right { white-space: nowrap; }

tr.part-row.is-dim { opacity: .32; }
tr.part-row.is-hot { background: var(--c-warn-bg) !important; }
tr.part-row td.ref { font-family: var(--mono); font-weight: 700; color: var(--c-brand-2); }

.group-head td {
    background: var(--c-surface-2);
    font-weight: 700;
    font-size: .85rem;
    border-top: 2px solid var(--c-line-strong);
}

/* --- Detail layout ------------------------------------------------------- */

.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: .35rem 1rem; font-size: .9rem; }
.kv dt { color: var(--c-muted); }
.kv dd { margin: 0; }

.stat-row { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.stat { display: flex; flex-direction: column; }
.stat .v { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .k { font-size: .78rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }

.tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 1px solid var(--c-line);
    margin-bottom: 1.25rem;
    overflow-x: auto;
}
.tabs a {
    padding: .55rem .9rem;
    font-weight: 600;
    font-size: .88rem;
    color: var(--c-ink-2);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.tabs a:hover { text-decoration: none; color: var(--c-ink); }
.tabs a.is-active { color: var(--c-brand-2); border-bottom-color: var(--c-accent); }

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

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
.field .hint { font-size: .8rem; color: var(--c-muted); margin-top: .25rem; }
.field .err { font-size: .82rem; color: var(--c-danger); margin-top: .25rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="search"], select, textarea {
    font: inherit;
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-ink);
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--c-brand-2); box-shadow: 0 0 0 3px rgba(22, 64, 110, .14); }
textarea { min-height: 110px; resize: vertical; }

.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin-bottom: 0; flex: 1; min-width: 180px; }

.qty-input { width: 72px; text-align: center; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Empty states -------------------------------------------------------- */

.empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--c-muted);
    background: var(--c-surface);
    border: 1px dashed var(--c-line-strong);
    border-radius: var(--radius);
}
.empty h2 { color: var(--c-ink); }
.empty p { max-width: 52ch; margin-inline: auto; }

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

.footer {
    background: var(--c-brand);
    color: rgba(255, 255, 255, .72);
    padding: 2.25rem 0 1.5rem;
    font-size: .87rem;
    margin-top: 3rem;
}
.footer a { color: rgba(255, 255, 255, .85); }
.footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .35rem; }
.footer-cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; }
.footer-legal {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: .8rem;
    color: rgba(255, 255, 255, .6);
}

/* --- Print --------------------------------------------------------------- */

@media print {
    .topbar, .header, .nav, .footer, .btn, .figure-toolbar, .filter-bar { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    .card, .table-wrap { box-shadow: none; border-color: #bbb; }
    .figure-layout { grid-template-columns: 1fr; }
    a { color: inherit; text-decoration: none; }
}

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

@media (max-width: 1080px) {
    .figure-layout { grid-template-columns: 1fr; }
    .figure-pane { position: static; }
    .split { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .header .wrap { flex-wrap: wrap; min-height: 0; padding-top: .6rem; padding-bottom: .6rem; gap: .6rem; }
    .search { order: 3; flex-basis: 100%; }
    .menu-toggle { display: inline-block; }
    .nav { display: none; }
    .nav.is-open { display: block; }
    .nav .wrap { flex-direction: column; gap: 0; padding-bottom: .5rem; }
    .nav a { border-bottom: 1px solid var(--c-line); border-left: 3px solid transparent; }
    .nav a.is-active { border-bottom-color: var(--c-line); border-left-color: var(--c-accent); }
    .header { position: static; }
    .page-head { align-items: flex-start; }
    .hero { padding: 1.75rem 0; }
    .footer-cols { grid-template-columns: 1fr; gap: 1.25rem; }
}

@media (max-width: 560px) {
    body { font-size: 14.5px; }
    .logo small { display: none; }
    table.data { font-size: .84rem; }
    table.data th, table.data td { padding: .45rem .5rem; }
}
