/* =========================================================================
   Poseidon Peptides — design system
   Borrows the technique and atmosphere of the reference design (pure black
   shell, particle nebula, oversized geometric headlines, bracketed monospace
   metadata, hairline rules, glass pills) but the layout is rebuilt for a
   wholesale catalog. Pure black is reserved for atmosphere layers only.
   ========================================================================= */

@import url("/css/fonts.css");

:root {
    /* three surface layers: void = atmosphere, base = page, raise = data */
    --surface-void: #000000;
    --surface-base: #08090a;
    --surface-raise: #111214;
    --surface-overlay: #191b1e;

    --line-hair: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .18);
    /* Card and panel frames: the design draws them as a 25% white line
     * (#4d4d4e once composited on the raised surface), not solid white. */
    --line-card: rgba(255, 255, 255, .25);

    --text-primary: #ffffff;
    --text-secondary: #d5d9df;
    --text-muted: #8e9299;
    --text-faint: rgba(255, 255, 255, .40);

    --accent: #6e8bff;
    --accent-deep: #182987;
    --accent-dim: rgba(110, 139, 255, .12);
    /* Search-button gradient sampled from the design. */
    --grad-from: rgb(24, 41, 135);
    --grad-to: rgb(43, 163, 222);
    --stock: #8fe3b0;
    --warn: #e8d48a;
    --danger: #ff6b6b;

    --font-display: "Space Grotesk", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
    --font-body: "Inter", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* The artboard is 1800px wide. Every hand-set length is expressed as a
     * multiple of --u, so the whole page shrinks exactly like the design
     * PDF does when it is fitted to the window width. */
    --u: min(calc(100vw / 1800), 1px);

    --space-1: calc(4 * var(--u));
    --space-2: calc(8 * var(--u));
    --space-3: calc(12 * var(--u));
    --space-4: calc(16 * var(--u));
    --space-5: calc(24 * var(--u));
    --space-6: calc(32 * var(--u));
    --space-7: calc(48 * var(--u));
    --space-8: calc(72 * var(--u));
    --space-9: calc(120 * var(--u));

    --content-max: 1440px;
    --gutter: clamp(calc(20 * var(--u)), 5vw, calc(72 * var(--u)));
    --page-gutter: clamp(16px, 1.2vw, 24px);
    --frame-max: 1800px;
    --frame-gutter: clamp(16px, 1.111vw, 20px);
    --body-max: 1232px;
    --section-gap: calc(88 * var(--u));

    --radius-card: 2px;
    --radius-pill: 999px;

    --ease: cubic-bezier(.16, 1, .3, 1);
}

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

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

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--surface-base);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: calc(15 * var(--u));
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.nav-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -.02em;
    line-height: 1.05;
    font-weight: 700;
}

p {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

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

.container {
    width: 100%;
    max-width: var(--frame-max);
    margin-inline: auto;
    padding-inline: var(--frame-gutter);
}

/* The design artboard is 1800px wide: the body blocks are 1232px wide
 * (x=284..1516 on the artboard) and stay centred, while the page rail
 * (headings, hero, quickbar) uses the thin outer gutter. */
main > section > .container {
    width: 68.444%;
    max-width: var(--body-max);
    padding-inline: 0;
}

.section {
    padding-block: var(--section-gap);
    position: relative;
}

.section--void {
    background: var(--surface-void);
}

.section--raise {
    background: var(--surface-raise);
}

.section--hair {
    border-top: 1px solid var(--line-hair);
}

.skip-link {
    position: absolute;
    left: calc(-9999 * var(--u));
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    left: calc(16 * var(--u));
    top: 16px;
    z-index: 100;
    background: var(--accent);
    color: #000;
    padding: calc(8 * var(--u)) calc(16 * var(--u));
}

/* -------------------------------------------------------------- type bits */

.eyebrow {
    font-family: var(--font-mono);
    font-size: calc(11 * var(--u));
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
}

.meta {
    font-family: var(--font-mono);
    font-size: calc(11 * var(--u));
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 4vw, 72px);
    line-height: .96;
    letter-spacing: -.03em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.h2 {
    font-size: clamp(calc(32 * var(--u)), 4vw, calc(48 * var(--u)));
    line-height: .98;
    letter-spacing: -.025em;
}

.h3 {
    font-family: var(--font-display);
    font-size: calc(20 * var(--u));
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--text-primary);
}

.lede {
    color: var(--text-secondary);
    font-size: calc(15 * var(--u));
    max-width: 62ch;
}

.muted {
    color: var(--text-muted);
}

/* ----------------------------------------------------------- section head */

.section-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: var(--space-4);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--line-hair);
    margin-bottom: var(--space-6);
}

.section-head__mark {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(calc(28 * var(--u)), 3vw, calc(44 * var(--u)));
    line-height: 1;
    color: var(--text-secondary);
    margin-right: var(--space-4);
    opacity: .8;
}

.section-head__title {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.section-head__aside {
    font-family: var(--font-mono);
    font-size: calc(11 * var(--u));
    letter-spacing: .14em;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(8, 9, 10, .72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-hair);
}

/* Announcing discounts above the navigation; the track scrolls the copy. */
.marquee {
    overflow: hidden;
    background: #1b2fd6;
    color: #fff;
}

.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 42s linear infinite;
}

.marquee__group {
    display: flex;
    flex-shrink: 0;
}

.marquee__item {
    margin-right: calc(64 * var(--u));
    padding-block: calc(7 * var(--u));
    font-family: var(--font-mono);
    font-size: calc(10.5 * var(--u));
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee__track { animation: none; }
}

.notice-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: calc(7 * var(--u)) var(--gutter);
    font-family: var(--font-mono);
    font-size: calc(10.5 * var(--u));
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--line-hair);
    text-align: center;
}

.notice-bar strong {
    color: var(--accent);
    font-weight: 500;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-width: 0;
    height: calc(68 * var(--u));
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* The lockup already carries the wordmark and the tagline, so no text is
   stacked next to it. It is cropped tight in the SVG, hence the fixed height. */
.brand__logo {
    height: calc(46 * var(--u));
    width: auto;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: clamp(calc(12 * var(--u)), 1.6vw, calc(24 * var(--u)));
    margin-left: auto;
    min-width: 0;
}

.nav__link {
    font-family: var(--font-mono);
    font-size: calc(11 * var(--u));
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: calc(6 * var(--u)) 0;
    position: relative;
    transition: color .18s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--text-primary);
}

.nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--accent);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    gap: calc(6 * var(--u));
    height: calc(34 * var(--u));
    padding: 0 calc(12 * var(--u));
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(12px);
    font-family: var(--font-mono);
    font-size: calc(11 * var(--u));
    letter-spacing: .1em;
    color: var(--text-secondary);
}

.lang-pill a {
    color: var(--text-muted);
    transition: color .16s;
}

.lang-pill a.is-current,
.lang-pill a:hover {
    color: var(--text-primary);
}

.lang-pill span {
    color: var(--text-faint);
}

.nav__toggle {
    display: none;
    width: calc(38 * var(--u));
    height: calc(34 * var(--u));
    border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, .35);
    border-radius: var(--radius-pill);
    align-items: center;
    justify-content: center;
}

/* -------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(8 * var(--u));
    height: calc(44 * var(--u));
    padding: 0 calc(20 * var(--u));
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(12px);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: calc(13 * var(--u));
    font-weight: 500;
    letter-spacing: .02em;
    transition: border-color .18s var(--ease), background .18s var(--ease), color .18s;
    white-space: nowrap;
}

.btn:hover {
    border-color: rgba(110, 139, 255, .55);
    background: var(--accent-dim);
}

.btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #05070f;
    font-weight: 600;
}

.btn--primary:hover {
    background: #829bff;
    border-color: #829bff;
    color: #05070f;
}

.btn--ghost {
    background: transparent;
}

.btn--sm {
    height: calc(34 * var(--u));
    padding: 0 calc(14 * var(--u));
    font-size: calc(12 * var(--u));
}

.btn--block {
    width: 100%;
}

.btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

/* ------------------------------------------------------------------ hero */

.hero {
    position: relative;
    min-height: min(88svh, 780px);
    display: flex;
    align-items: flex-end;
    padding-block: clamp(calc(56 * var(--u)), 9vw, calc(110 * var(--u))) clamp(calc(40 * var(--u)), 6vw, calc(72 * var(--u)));
    background: var(--surface-void);
    overflow: hidden;
    border-bottom: 1px solid var(--line-hair);
}

.hero__canvas,
.hero__fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero__fallback {
    background:
        radial-gradient(ellipse 60% 50% at 72% 28%, rgba(110, 139, 255, .16), transparent 70%),
        radial-gradient(ellipse 40% 35% at 30% 78%, rgba(255, 255, 255, .07), transparent 70%),
        #000;
}

.hero__void {
    position: absolute;
    width: 58vw;
    height: 58vw;
    max-width: calc(720 * var(--u));
    max-height: calc(720 * var(--u));
    right: 6vw;
    bottom: -18vw;
    border-radius: 50%;
    background: radial-gradient(circle, #000 52%, rgba(0, 0, 0, .55) 66%, transparent 74%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero__eyebrow {
    margin-bottom: var(--space-5);
}

.hero__title {
    margin-bottom: var(--space-6);
    max-width: 17ch;
    position: relative;
}

/* particle dissolve: only used on the hero headline */
.hero__title span.dissolve {
    background-image: url("/img/noise.webp");
    background-size: 220px 220px;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-6);
    align-items: end;
    border-top: 1px solid var(--line-hair);
    padding-top: var(--space-5);
}

.hero__lede {
    max-width: 44ch;
    color: var(--text-secondary);
    font-size: calc(14 * var(--u));
    line-height: 1.7;
}

.hero__index {
    font-family: var(--font-mono);
    font-size: calc(11 * var(--u));
    letter-spacing: .14em;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.hero__search {
    margin-top: var(--space-5);
    display: flex;
    gap: var(--space-2);
    max-width: calc(560 * var(--u));
}

.hero__search input {
    flex: 1;
    height: calc(48 * var(--u));
    border-radius: 2px;
    border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, .55);
    color: var(--text-primary);
    padding: 0 calc(16 * var(--u));
    font-family: var(--font-body);
    font-size: calc(14 * var(--u));
    backdrop-filter: blur(8px);
}

.hero__search input::placeholder {
    color: var(--text-muted);
}

.sparkle {
    width: calc(26 * var(--u));
    height: calc(26 * var(--u));
    color: var(--text-primary);
    display: inline-block;
    vertical-align: middle;
}

/* --------------------------------------------------------------- quickbar */

.quickbar {
    background: var(--surface-raise);
    border-bottom: 1px solid var(--line-hair);
    /* Design: the pill row sits in a 193px band, i.e. 73px above and below
     * the 47px pills. */
    padding-block: calc(73 * var(--u));
}

.quickbar__row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.quickbar__chips {
    /* Carousel viewport: one clipped line that loops through every family. */
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 clamp(16px, 3vw, 48px), #000 calc(100% - clamp(16px, 3vw, 48px)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 clamp(16px, 3vw, 48px), #000 calc(100% - clamp(16px, 3vw, 48px)), transparent);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: calc(8 * var(--u));
    height: calc(32 * var(--u));
    padding: 0 calc(12 * var(--u));
    border: 1px solid var(--line-hair);
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: calc(10.5 * var(--u));
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color .16s, border-color .16s, background .16s;
    white-space: nowrap;
}

.chip:hover,
.chip.is-active {
    color: var(--text-primary);
    border-color: rgba(110, 139, 255, .45);
    background: var(--accent-dim);
}

.chip__idx {
    color: var(--text-faint);
}

.chip__count {
    color: var(--text-muted);
}

.quickbar__stats {
    display: flex;
    gap: var(--space-5);
    font-family: var(--font-mono);
    font-size: calc(10.5 * var(--u));
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.quickbar__stats b {
    color: var(--text-primary);
    font-weight: 500;
}

/* ----------------------------------------------------------------- cards */

.card {
    position: relative;
    background: var(--surface-raise);
    border: 1px solid var(--line-card);
    border-radius: var(--radius-card);
    padding: var(--space-5);
    transition: border-color .18s var(--ease);
}

.card:hover {
    border-color: var(--accent);
}

/* Anchors styled as cards (SAME FAMILY, COA lists) must be block-level:
   as inline boxes their padding bleeds and the stack layout collapses. */
a.card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card__idx {
    font-family: var(--font-mono);
    font-size: calc(12 * var(--u));
    letter-spacing: .12em;
    color: var(--accent);
}

.card__title {
    font-family: var(--font-display);
    font-size: calc(19 * var(--u));
    font-weight: 500;
    color: var(--text-primary);
    margin-top: var(--space-3);
    letter-spacing: -.01em;
}

.card__meta {
    font-family: var(--font-mono);
    font-size: calc(10.5 * var(--u));
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: var(--space-2);
}

/* Product photography uploaded through the admin console. */
.product-shot {
    border: 1px solid var(--line-hair);
    background: var(--surface-raise);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}

.product-shot img {
    width: 100%;
}

.thumb {
    width: calc(40 * var(--u));
    height: calc(40 * var(--u));
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--line-hair);
    display: block;
}

.card__link {
    display: inline-flex;
    align-items: center;
    gap: calc(6 * var(--u));
    margin-top: var(--space-4);
    font-family: var(--font-mono);
    font-size: calc(11 * var(--u));
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgb(98, 123, 226);
}

.grid {
    display: grid;
    gap: 1px;
    background: var(--line-hair);
    border: 1px solid var(--line-hair);
}

.grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid .card {
    border: 0;
    border-radius: 0;
}

/* --------------------------------------------------------------- tables */

.table-wrap {
    border: 1px solid var(--line-hair);
    background: var(--surface-raise);
    overflow-x: auto;
    position: relative;
}

/* A vertical scroll container is what makes the sticky header actually stick:
   `overflow-x: auto` alone promotes overflow-y to auto with content height, so
   `position: sticky` on the header has nothing to stick against. */
.table-wrap--scroll {
    max-height: 68vh;
    overflow-y: auto;
}

/* The catalogue is a long list of products, not a panel in a frame: the rows
   sit on the page itself and the whole list is visible at once, with the page
   scrolling instead of a box inside the page. */
.table-wrap--plain {
    border: 0;
    background: none;
    overflow: visible;
}

/* The header has to come to rest below the site header, which is taller than
   the navigation alone because it carries the notice bar. Its height is
   measured in the browser and handed over as --header-h. */
.table-wrap--plain table.data thead th {
    top: var(--header-h, 0px);
}

/* Without a frame the sticky column needs a background of its own, or the
   columns scrolled past it show through. */
.table-wrap--plain table.data tbody tr .sticky-col {
    background: var(--surface-base);
}

.table-wrap--plain table.data tbody tr:nth-child(even) .sticky-col {
    background: #15171a;
}

.table-wrap--plain table.data tbody tr:hover .sticky-col {
    background: #1b1f2c;
}

/* The table is wider than a phone. There it keeps its own sideways scroll,
   so the page itself is never pushed sideways — but the sideways scroll
   makes the wrapper a scroll container, and a sticky header inside one has
   nothing to stick against. There the header simply scrolls away with the
   table. */
@media (max-width: 960px) {
    .table-wrap--plain {
        overflow-x: auto;
    }

    .table-wrap--plain table.data thead th {
        top: 0;
    }
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: calc(13 * var(--u));
    min-width: calc(860 * var(--u));
}

table.data thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(17, 18, 20, .94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-strong);
    padding: calc(12 * var(--u)) calc(14 * var(--u));
    text-align: left;
    font-family: var(--font-mono);
    font-size: calc(10 * var(--u));
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

table.data tbody tr {
    border-bottom: 1px solid var(--line-hair);
    transition: background .14s;
}

table.data tbody tr:nth-child(even) {
    background: #15171a;
}

table.data tbody tr:hover {
    background: var(--accent-dim);
}

table.data td {
    padding: calc(10 * var(--u)) calc(14 * var(--u));
    height: calc(44 * var(--u));
    vertical-align: middle;
    color: var(--text-secondary);
}

table.data td.num,
table.data th.num {
    text-align: right;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

table.data .cat {
    font-family: var(--font-mono);
    font-size: calc(11.5 * var(--u));
    letter-spacing: .04em;
    color: var(--text-primary);
    white-space: nowrap;
}

table.data .pname {
    color: var(--text-primary);
    font-weight: 500;
}

table.data .pspec {
    font-family: var(--font-mono);
    font-size: calc(11.5 * var(--u));
    color: var(--text-muted);
    white-space: nowrap;
}

table.data .price {
    color: var(--text-primary);
    font-weight: 500;
}

table.data .na {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: calc(11 * var(--u));
}

.sticky-col {
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 1;
}

table.data tbody tr:nth-child(even) .sticky-col {
    background: #15171a;
}

table.data tbody tr:hover .sticky-col {
    background: #1b1f2c;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: calc(5 * var(--u));
    height: calc(22 * var(--u));
    padding: 0 calc(9 * var(--u));
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: calc(10.5 * var(--u));
    letter-spacing: .1em;
    text-transform: uppercase;
    border: 1px solid var(--line-hair);
    color: var(--text-muted);
    white-space: nowrap;
}

.tag--coa {
    /* Design: the COA id is the bright accent blue, not a deep navy. */
    color: var(--accent);
    border-color: rgba(110, 139, 255, .35);
    background: rgba(110, 139, 255, .08);
}

.tag--stock {
    color: var(--stock);
    border-color: rgba(143, 227, 176, .3);
    background: rgba(143, 227, 176, .07);
}

.tag--warn {
    color: var(--warn);
    border-color: rgba(232, 212, 138, .3);
    background: rgba(232, 212, 138, .07);
}

.tag--muted {
    color: var(--text-faint);
}

/* ---------------------------------------------------------------- forms */

.field {
    display: flex;
    flex-direction: column;
    gap: calc(6 * var(--u));
    margin-bottom: var(--space-4);
}

.field label {
    font-family: var(--font-mono);
    font-size: calc(10 * var(--u));
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
    height: calc(44 * var(--u));
    border-radius: 2px;
    border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, .35);
    color: var(--text-primary);
    padding: 0 calc(14 * var(--u));
    font-family: var(--font-body);
    font-size: calc(14 * var(--u));
    width: 100%;
    transition: border-color .16s;
}

.field textarea {
    height: auto;
    min-height: calc(120 * var(--u));
    padding: calc(12 * var(--u)) calc(14 * var(--u));
    resize: vertical;
    line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-faint);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* ------------------------------------------------------------- summary box */

.summary {
    border: 1px solid var(--line-hair);
    background: var(--surface-raise);
    padding: var(--space-5);
    position: sticky;
    top: 96px;
}

.summary__row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: calc(8 * var(--u));
    border-bottom: 1px solid var(--line-hair);
    font-size: calc(13 * var(--u));
}

.summary__row:last-of-type {
    border-bottom: 0;
}

.summary__row span:last-child {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
    padding-top: var(--space-4);
    margin-top: var(--space-2);
    border-top: 1px solid var(--line-strong);
}

.summary__total b {
    font-family: var(--font-mono);
    font-size: calc(24 * var(--u));
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- two column */

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: var(--space-7);
    align-items: start;
}

.split--wide {
    grid-template-columns: minmax(0, 1fr) 420px;
}

/* --------------------------------------------------------------- footer */

.site-footer {
    background: var(--surface-base);
    border-top: 1px solid var(--line-hair);
    padding-block: var(--space-8) var(--space-6);
    position: relative;
    overflow: hidden;
}

.footer__canvas {
    position: absolute;
    inset: 0;
    opacity: .55;
}

.footer__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--space-6);
    padding-bottom: var(--space-7);
    border-bottom: 1px solid var(--line-hair);
}

.site-footer .brand__logo {
    height: calc(58 * var(--u));
}

.footer__col h4 {
    font-family: var(--font-mono);
    font-size: calc(10 * var(--u));
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: var(--space-4);
}

.footer__col a,
.footer__col p {
    display: block;
    font-size: calc(13 * var(--u));
    color: var(--text-secondary);
    padding-block: calc(4 * var(--u));
    transition: color .16s;
}

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

.footer__bottom {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-5);
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: calc(10.5 * var(--u));
    letter-spacing: .1em;
    color: var(--text-muted);
}

.disclaimer {
    position: relative;
    z-index: 1;
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--line-hair);
    font-size: calc(11.5 * var(--u));
    line-height: 1.7;
    color: var(--text-faint);
    max-width: 92ch;
}

/* ------------------------------------------------------------- tg float */

.tg-float {
    position: fixed;
    right: calc(20 * var(--u));
    bottom: calc(20 * var(--u));
    z-index: 70;
    display: inline-flex;
    align-items: center;
    gap: calc(10 * var(--u));
    height: calc(48 * var(--u));
    padding: 0 calc(18 * var(--u)) 0 calc(12 * var(--u));
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, .72);
    border: 1px solid var(--line-strong);
    backdrop-filter: blur(14px);
    color: var(--text-primary);
    font-size: calc(12.5 * var(--u));
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    transition: border-color .18s, background .18s;
}

.tg-float:hover {
    border-color: rgba(110, 139, 255, .6);
    background: rgba(110, 139, 255, .14);
}

.tg-float__dot {
    width: calc(26 * var(--u));
    height: calc(26 * var(--u));
    border-radius: 50%;
    background: var(--accent);
    display: grid;
    place-items: center;
    color: #05070f;
    flex-shrink: 0;
}

/* ------------------------------------------------------------- utilities */

.stack > * + * {
    margin-top: var(--space-4);
}

.row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.row--between {
    justify-content: space-between;
}

.hair {
    height: 1px;
    background: var(--line-hair);
    border: 0;
    margin: 0;
}

.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.center {
    text-align: center;
}

.empty {
    padding: var(--space-8) var(--space-5);
    text-align: center;
    border: 1px dashed var(--line-hair);
    color: var(--text-muted);
    font-size: calc(13 * var(--u));
}

.flash {
    border: 1px solid rgba(143, 227, 176, .35);
    background: rgba(143, 227, 176, .08);
    color: var(--stock);
    padding: calc(12 * var(--u)) calc(16 * var(--u));
    font-size: calc(13 * var(--u));
    border-radius: 2px;
    margin-bottom: var(--space-4);
}

.flash--err {
    border-color: rgba(255, 107, 107, .4);
    background: rgba(255, 107, 107, .08);
    color: var(--danger);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
    .grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split,
    .split--wide {
        grid-template-columns: minmax(0, 1fr);
    }

    .summary {
        position: static;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 860px) {
    :root {
        --section-gap: 56px;
    }

    .site-header .brand__logo {
        height: 36px;
    }

    .nav__links {
        position: fixed;
        inset: var(--header-h, 98px) 0 auto 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: rgba(8, 9, 10, .98);
        border-bottom: 1px solid var(--line-hair);
        padding: var(--space-4) var(--gutter) var(--space-5);
        display: none;
    }

    body.nav-open .nav__links {
        display: flex;
    }

    body.nav-open .nav__links .nav__link {
        padding: 14px 0;
        width: 100%;
        border-bottom: 1px solid var(--line-hair);
        font-size: 12px;
    }

    .nav__toggle {
        display: inline-flex;
    }

    .nav__actions .btn span.long {
        display: none;
    }

    /* The quotation button now shows only the count. It still carried the
       padding of the full button, which pushed the header past the edge of a
       phone and let the whole page scroll sideways. */
    .nav__actions {
        flex-shrink: 1;
        min-width: 0;
    }

    .nav__actions .btn {
        padding: 0 12px;
        gap: 4px;
    }

    .grid--4,
    .grid--3,
    .grid--2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        min-height: 74svh;
    }

    .hero__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__index {
        text-align: left;
    }

    .field-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tg-float {
        right: 12px;
        bottom: 12px;
        height: 44px;
        padding: 0 14px 0 8px;
        font-size: 11.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .quickbar__track {
        animation: none;
    }

    .hero__canvas {
        display: none;
    }
}

/* =========================================================================
   Configurator: the option cards carry their own example photo
   ========================================================================= */

/* Option cards carry their own example photo, so the grid is denser:
   two across on desktop, one on phones. */
.opt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(10 * var(--u));
}

/* Photo on the left, choice on the right. */
.opt-card {
    display: flex;
    align-items: stretch;
    gap: calc(14 * var(--u));
    padding: calc(14 * var(--u));
    cursor: pointer;
    background: rgba(255, 255, 255, .02);
}

/* The photo sits on its own plate: a 4:3 box that shows the whole
   picture (contain), never a cropped banner of it. */
.opt-card__media {
    position: relative;
    flex: 0 0 46%;
    min-width: 0;
    align-self: flex-start;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-overlay);
    border: 1px solid var(--line-hair);
    border-radius: 4px;
    overflow: hidden;
    cursor: zoom-in;
}

.opt-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
}

.opt-card__img:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.opt-card__zoom {
    position: absolute;
    right: calc(6 * var(--u));
    top: 6px;
    width: calc(24 * var(--u));
    height: calc(24 * var(--u));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(8, 9, 10, .72);
    border: 1px solid var(--line-hair);
    color: var(--text-secondary);
    pointer-events: none;
}

.opt-card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: calc(6 * var(--u));
}

.opt-card__head {
    display: flex;
    align-items: flex-start;
    gap: calc(10 * var(--u));
}

.opt-card__head input {
    margin-top: calc(3 * var(--u));
    accent-color: var(--accent);
}

.opt-card__name {
    display: block;
    color: var(--text-primary);
    font-size: calc(13.5 * var(--u));
}

.opt-card__price {
    font-size: calc(11 * var(--u));
    color: var(--text-muted);
}

/* :has() marks the chosen option straight on the photo plate */
.opt-card:has(input:checked) {
    border-color: var(--accent);
}

.opt-card:has(input:checked) .opt-card__media {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.opt-card:has(input:checked) .opt-card__name {
    color: var(--accent);
}

@media (max-width: 700px) {
    .opt-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Lightbox: the full-size photo, opened from the card thumbnail. */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(24 * var(--u));
}

.lightbox[hidden] {
    display: none;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 6, .88);
}

.lightbox__panel {
    position: relative;
    z-index: 1;
    max-width: min(1100px, 92vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(14 * var(--u));
}

.lightbox__img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    display: block;
    background: var(--surface-overlay);
    border: 1px solid var(--line-hair);
    border-radius: 4px;
}

.lightbox__caption {
    font-family: var(--font-mono);
    font-size: calc(11 * var(--u));
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

.lightbox__close {
    position: absolute;
    top: 10px;
    right: calc(10 * var(--u));
    width: calc(34 * var(--u));
    height: calc(34 * var(--u));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-hair);
    border-radius: 50%;
    background: rgba(8, 9, 10, .78);
    color: var(--text-primary);
    cursor: pointer;
    z-index: 2;
}

/* =========================================================================
   Storefront refresh — home hero, family pills, media cards, quality panel
   ========================================================================= */

/* Hero: one full-bleed still behind the copy. */
.hero--media {
    /* The hero fills the rest of the first screen below the header, so the
     * whole still is visible without scrolling: header ≈ marquee (31.3u)
     * + nav (68u) + 1px rule. */
    --header-h: calc(99.325 * var(--u) + 1px);
    height: calc(100svh - var(--header-h));
    min-height: clamp(520px, 48svh, calc(1007 * var(--u)));
    align-items: flex-start;
    padding-block: clamp(calc(48 * var(--u)), 15svh, calc(176 * var(--u))) clamp(calc(24 * var(--u)), 9svh, calc(120 * var(--u)));
    background: #030814;
}

.hero--media .hero__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% center;
}

.hero--media .hero__inner {
    width: 100%;
    max-width: var(--frame-max);
    margin-inline: auto;
    padding-inline: clamp(20px, 7.222vw, 130px);
    /* Full-height column so the lede can sit against the bottom edge of
     * the still, exactly like the artboard. */
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero--media .hero__title {
    /* The line break is authored in markup, so no width constraint is
     * needed. Shrunk and lightened so it keeps its place inside the
     * viewport-height hero. */
    max-width: none;
    font-size: clamp(28px, 3vw, 54px);
    font-weight: 500;
    letter-spacing: .01em;
    line-height: 1.14;
    margin-bottom: clamp(8px, .667vw, 12px);
}

.hero--media .hero__search {
    /* Design: field 455px + 25px gap + 120px button. */
    width: 100%;
    max-width: clamp(320px, 33.389vw, 601px);
    gap: clamp(12px, 1.389vw, 25px);
    align-items: center;
    margin-top: 0;
}

.hero--media .hero__search .btn {
    width: clamp(88px, 6.667vw, 120px);
    height: clamp(44px, 3vw, 54px);
    padding-inline: 0;
    font-size: clamp(12px, .944vw, 17px);
}

.hero--media .hero__search .btn--wide {
    /* Design: "搜 索" with a full-width gap; the extra left padding offsets
     * the trailing tracking so the glyphs stay optically centred. */
    letter-spacing: .5em;
    padding-left: .5em;
}

.hero--media .hero__search input {
    height: clamp(44px, 2.778vw, 50px);
    border-color: #fff;
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: clamp(11px, .944vw, 17px);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hero--media .hero__search input::placeholder {
    color: rgba(255, 255, 255, .72);
}

.hero--media .hero__eyebrow {
    /* Sampled from the design: rgb(48, 168, 224), set tighter than the
     * default mono tracking. */
    color: rgb(48, 168, 224);
    font-size: clamp(10px, .889vw, 16px);
    letter-spacing: -.03em;
    line-height: 1.2;
    margin-bottom: clamp(8px, .667vw, 12px);
}

/* Hero CTAs follow the design's larger type on the 1800 artboard. */
.hero--media .hero__actions {
    margin-top: clamp(calc(20 * var(--u)), 6svh, calc(69 * var(--u)));
    gap: clamp(12px, 1.833vw, 33px);
}

.hero--media .hero__actions .btn {
    /* Design: 54px tall, 30px side padding (212px pill for the price CTA). */
    height: clamp(44px, 3vw, 54px);
    font-size: clamp(12px, .944vw, 17px);
    padding-inline: clamp(20px, 1.667vw, 30px);
    text-transform: uppercase;
    letter-spacing: .02em;
}

/* The secondary CTA sits on a translucent navy plate with a light border. */
.hero--media .hero__actions .btn:not(.btn--blue) {
    background: rgba(2, 22, 52, .72);
    border-color: rgba(255, 255, 255, .85);
    color: #fff;
    /* Design: the ghost pill is roomier than the blue one (~562px wide). */
    padding-inline: clamp(20px, 2.667vw, 48px);
}

.hero--media .hero__actions .btn:not(.btn--blue):hover {
    background: rgba(4, 30, 68, .85);
    border-color: #fff;
}

.hero--media .hero__body {
    display: block;
    border-top: 0;
    padding-top: 0;
    margin-top: auto;
    width: 100%;
}

.hero--media .hero__lede {
    max-width: calc(640 * var(--u));
    font-size: clamp(12px, .833vw, 14px);
    line-height: 1.75;
}

/* Hero primary actions use the blue gradient of the design. */
.btn--blue {
    /* Design: light rgb(43,163,222) on the left, deep navy rgb(24,41,135)
     * on the right. */
    background: linear-gradient(100deg, var(--grad-to) 0%, var(--grad-from) 100%);
    /* The transparent 1px border keeps the gradient's positioning area at the
     * padding box, so the tile would wrap a cyan sliver onto the right edge.
     * Painting it from the border box (and not repeating) removes that rim. */
    background-origin: border-box;
    background-repeat: no-repeat;
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.btn--blue:hover {
    background: linear-gradient(100deg, #45b0e6 0%, #1f38a4 100%);
    border-color: transparent;
    color: #fff;
}

/* Every content block — section head, section body, header, footer — uses the
 * same 1232px measure of the 1800 artboard, so the gutters stay even. */
.section-rail {
    width: 68.444%;
    max-width: var(--body-max);
    margin-inline: auto;
    padding-inline: 0;
}

.site-footer > .container {
    width: 68.444%;
    max-width: var(--body-max);
    padding-inline: 0;
}

/* The logo shares the hero's left inset so it lines up with the eyebrow, but
 * the nav cluster is part of the body grid: on the artboard the quote pill's
 * right edge is x=1516, the same edge as the section asides and the footer
 * columns, not the frame gutter at x=1670. */
.site-header .container {
    width: 100%;
    max-width: var(--frame-max);
    margin-inline: auto;
    padding-left: clamp(20px, 7.222vw, 130px);
    padding-right: min(15.778vw, calc((var(--frame-max) - var(--body-max)) / 2));
}

/* Family pills: equal width, a count and a circled arrow. */
.quickbar .quickbar__row {
    width: 100%;
    max-width: var(--frame-max);
    margin-inline: auto;
    padding-inline: var(--frame-gutter);
}

@media (max-width: 860px) {
    .hero__break {
        display: none;
    }

    /* Below the design breakpoint the 1232px measure no longer applies:
     * every block falls back to the page gutter so nothing is cramped. */
    main > section > .container,
    .section-rail,
    .site-header .container,
    .site-footer > .container {
        width: 100%;
        max-width: none;
        padding-inline: var(--page-gutter);
    }
}

.quickbar__track {
    /* Two identical groups side by side; shifting by half the track width
     * loops seamlessly. Hovering or focusing holds the strip still. */
    display: flex;
    width: max-content;
    animation: family-marquee 70s linear infinite;
}

.quickbar__track:hover,
.quickbar__track:focus-within {
    animation-play-state: paused;
}

.quickbar__group {
    /* The design pitches the pills on a ~314px rhythm (223px pill + 80px gap). */
    display: flex;
    gap: calc(80 * var(--u));
    padding-right: calc(80 * var(--u));
}

@keyframes family-marquee {
    to { transform: translateX(-50%); }
}

.chip--family {
    /* Design chip: 223×47 pill, 18px left padding, grey vertical gradient. */
    flex: 0 0 calc(223 * var(--u));
    height: calc(47 * var(--u));
    padding: 0 calc(10 * var(--u)) 0 calc(18 * var(--u));
    justify-content: flex-start;
    gap: calc(7 * var(--u));
    border-color: transparent;
    background: linear-gradient(180deg, #474343 0%, #696868 100%);
    font-family: var(--font-body);
    font-size: clamp(12px, .889vw, 16px);
    letter-spacing: .02em;
    text-transform: none;
    color: var(--text-secondary);
}

.chip--family:hover,
.chip--family.is-active {
    color: #fff;
    background: linear-gradient(180deg, #544f4f 0%, #7a7878 100%);
    border-color: transparent;
}

.chip--family .chip__count {
    /* The count follows the family name directly; only the arrow is pushed
     * to the far edge. */
    margin-left: 0;
    color: rgb(0, 159, 232);
    font-size: 1em;
}

.chip__arrow {
    /* 30px circle on a 47px pill. */
    flex: 0 0 calc(30 * var(--u));
    width: calc(30 * var(--u));
    height: calc(30 * var(--u));
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: clamp(1px, .111vw, 2px) solid #fff;
    border-radius: 50%;
    color: #fff;
}

.chip--family:hover .chip__arrow {
    color: #fff;
    border-color: #fff;
}

/* Cards with an image plate on the right (OEM and logistics). */
.grid--cards {
    gap: calc(12 * var(--u));
    background: none;
    border: 0;
}

.grid--cards > .card {
    border: 1px solid var(--line-card);
}

.card--media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40%;
    padding: 0;
    overflow: hidden;
    min-height: calc(188 * var(--u));
}

/* Design: a bright key list, then a smaller muted note, tightly stacked. */
.card--media .card__meta {
    font-family: var(--font-body);
    font-size: calc(13 * var(--u));
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-primary);
    margin-top: calc(12 * var(--u));
    margin-bottom: calc(5 * var(--u));
}

/* The OEM photos are square plates inset in the right column, not full-bleed. */
.card--media:not(.card--media--sm) .card__media {
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    align-self: center;
}

.card--media .card__body p.muted {
    font-size: calc(11.5 * var(--u));
    line-height: 1.6;
}

.card--media .card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Design: the OEM body is inset 16px from the frame; roomier before. */
    padding: calc(16 * var(--u));
}

.card--media .card__title {
    margin-top: calc(10 * var(--u));
    font-size: clamp(18px, 1.389vw, 25px);
}

.card--media .card__body .muted {
    margin-top: calc(8 * var(--u));
    font-size: calc(12.5 * var(--u));
    line-height: 1.6;
}

.card--media .card__link {
    margin-top: auto;
    padding-top: calc(16 * var(--u));
}

.card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #05060a;
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card__media--contain {
    background: transparent;
}

.card__media--contain img {
    object-fit: contain;
    padding: calc(14 * var(--u));
}

.card--media--sm {
    min-height: calc(172 * var(--u));
}

/* The logistics cards (section C) keep the roomier inset of their design. */
.card--media--sm .card__body {
    padding: var(--space-5);
}

/* Design sets these labels with no tracking at all, so "48H" reads as one
 * token instead of "4 8 H". The bracket labels elsewhere keep their spread. */
.card--media--sm .card__idx {
    font-size: calc(14 * var(--u));
    letter-spacing: 0;
}

/* Quality panel: facility still on the left, statements on the right. */
.quality-panel {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    border: 1px solid var(--line-card);
    background: var(--surface-raise);
}

.quality-panel__media {
    position: relative;
    min-height: calc(420 * var(--u));
    overflow: hidden;
    background: #07080c;
}

.quality-panel__media img,
.quality-panel__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quality-panel__list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6px var(--space-6);
}

.quality-item {
    padding: calc(14 * var(--u)) 0;
    border-bottom: 1px solid var(--line-hair);
}

.quality-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.quality-item h3 {
    font-size: calc(13.5 * var(--u));
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
    color: var(--text-primary);
}

.quality-item p {
    margin-top: calc(4 * var(--u));
    font-size: calc(12 * var(--u));
    line-height: 1.65;
    color: var(--text-muted);
}

.quality-item--link {
    position: relative;
    padding-right: calc(150 * var(--u));
}

.quality-item--link .card__link {
    position: absolute;
    right: 0;
    bottom: calc(18 * var(--u));
    margin: 0;
}

/* Community card with the support portrait on the right. */
.split--community {
    /* Design: the support card is ~553 of 1232, leaving the title one line. */
    grid-template-columns: minmax(0, 1fr) minmax(calc(360 * var(--u)), calc(553 * var(--u)));
    /* Both blocks share the bottom edge: the card is shorter than the copy
     * column, so its frame starts lower and the portrait rises out of it. */
    align-items: end;
}

.split--community .h2 {
    font-size: clamp(28px, 2.222vw, 40px);
}

.card--support {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30%;
    padding: 0;
    position: relative;
    /* Sits on the bottom edge of the split and stays 190px tall (design), so
     * its frame starts well below the (F) heading while the copy column is
     * taller. */
    overflow: visible;
    height: auto;
    min-height: calc(190 * var(--u));
}

.card--support .card__body {
    display: flex;
    flex-direction: column;
    grid-column: 1;
    padding: clamp(20px, 1.778vw, 32px);
}

.card--support .card__title {
    margin-top: 0;
    font-size: calc(26 * var(--u));
    letter-spacing: 0;
    text-transform: uppercase;
}

.card__support-img {
    /* Absolute so the portrait can rise above the card without stretching
     * the grid row and pushing the note out of the card. The box is much
     * taller than the card: with the PNG's 8% transparent headroom, the
     * visible top of the head lands on the (F) heading line. */
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30%;
    height: calc(278 * var(--u));
    object-fit: cover;
    object-position: bottom center;
    display: block;
}

@media (max-width: 1200px) {
    :root {
        /* The artboard only holds above 1200px; below it the grids reflow,
         * so the proportional scale is released and the designed px values
         * come back. */
        --u: 1px;
    }

    .quickbar {
        padding-block: 32px;
    }

    .quickbar__chips {
        padding-block: 4px;
    }
}

@media (max-width: 1100px) {
    .split--community {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Stacked layout: the shorter card and the small overhang are only meant
     * for the side-by-side composition. */
    .card--support {
        min-height: calc(200 * var(--u));
    }

    .card__support-img {
        height: calc(236 * var(--u));
    }
}

@media (max-width: 960px) {
    .quality-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .quality-panel__media {
        min-height: 260px;
    }

    .quality-item--link {
        padding-right: 0;
    }

    .quality-item--link .card__link {
        position: static;
        margin-top: 8px;
    }

    .split--community {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }
}

@media (max-width: 860px) {
    .hero--media {
        /* On phones the viewport is portrait, so let the hero size to its
         * content again instead of filling the screen height. */
        height: auto;
        min-height: min(82svh, 720px);
    }

    .hero--media .hero__body {
        margin-top: 40px;
    }

    .hero--media .hero__media {
        object-position: 64% center;
    }
}

@media (max-width: 700px) {
    .card--media {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .card__media {
        order: -1;
        min-height: 160px;
    }

    .card--media--sm .card__media {
        min-height: 140px;
    }

    .card--support {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }

    .card__support-img {
        position: static;
        order: -1;
        width: 100%;
        height: auto;
        max-height: 210px;
        object-position: center top;
    }
}

@media print {
    .site-header,
    .tg-float,
    .site-footer {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }
}
