/* Nein Pines Research - public site styles (design v2)

   The site reads like a technical data package for a piece of hardware:
   drawing-paper sections carry data and specs, full-bleed black bands carry
   field photography, and one signal color marks what can be acted on.
   Admin and legacy trial-order pages still load main.css; this file is only
   linked from the public pages. */

:root {
    --ink: #0d0e0f;
    --ink-2: #151618;
    --ink-3: #1d1e21;
    --paper: #edece7;
    --paper-2: #e2e0d9;
    --sheet: #f9f8f5;

    --text: #0d0e0f;
    --text-muted: #56575b;
    --text-faint: #86878b;
    --ink-text: #ecebe6;
    --ink-muted: #a2a3a7;
    --ink-faint: #6b6c70;

    --rule: rgba(13, 14, 15, 0.14);
    --rule-strong: rgba(13, 14, 15, 0.5);
    --ink-rule: rgba(236, 235, 230, 0.13);
    --ink-rule-strong: rgba(236, 235, 230, 0.36);
    --grid-major: rgba(13, 14, 15, 0.06);
    --grid-minor: rgba(13, 14, 15, 0.028);

    /* The logo's black and white carry the page. "Signal" is whatever
       contrasts most with the surface, so it flips on black surfaces below.
       Signal red is a marker, not a paint: it points at things (section
       squares, photo callouts, figure ticks, focus, hover) and never fills
       a resting button or sets running text. */
    --red: #e3000f;
    --signal: var(--ink);
    --signal-deep: var(--ink);
    --on-signal: var(--sheet);

    --font-sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --wide: 118%;

    --max: 1320px;
    --gutter: clamp(16px, 3.4vw, 48px);
    --section-y: clamp(64px, 8.5vw, 128px);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.band-ink,
.site-header,
.site-footer,
.plate,
.bleed {
    --signal: var(--ink-text);
    --signal-deep: var(--ink-text);
    --on-signal: var(--ink);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 16px;
}

body {
    margin: 0;
    overflow-x: clip;
    background: var(--paper);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Links carry a faded underline in their own text color, so a link reads
   as a link without looking like a spelling flag; hover brings it to full
   strength. Red stays reserved for markers. */
a {
    color: inherit;
    text-decoration-color: color-mix(in srgb, currentColor 38%, transparent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.24em;
    transition: text-decoration-color 150ms ease;
}

a:hover {
    text-decoration-color: currentColor;
}

::selection {
    background: var(--red);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

p {
    margin: 0 0 1em;
}

.wrap,
.page {
    width: min(var(--max), calc(100% - 2 * var(--gutter)));
    margin-inline: auto;
}

/* ---------- Type ---------- */

.display {
    margin: 0;
    font-stretch: var(--wide);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.012em;
    text-transform: uppercase;
    text-wrap: balance;
}

.display .ln {
    display: block;
}

.display-xl {
    font-size: clamp(2.4rem, 11.4cqi, 6rem);
}

/* Sized to its own column (every heading wrapper is a size container),
   so a single long word such as SPECIFICATIONS never overflows. */
.display-lg {
    font-size: clamp(1.6rem, 8.8cqi, 4.2rem);
}

.display-md {
    font-size: clamp(1.7rem, 3vw, 2.7rem);
}

.tone {
    color: var(--text-faint);
}

.band-ink .tone {
    color: var(--ink-faint);
}

.lede {
    max-width: 38rem;
    margin: 1.6rem 0 0;
    color: var(--text-muted);
    font-size: clamp(1.05rem, 1.25vw, 1.2rem);
    line-height: 1.55;
}

.band-ink .lede {
    color: var(--ink-muted);
}

.mono,
.label,
.crumb,
.caption,
.updated,
.section-label {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.label,
.section-label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 1.4rem;
    color: var(--text-muted);
}

.label::before,
.section-label::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    background: var(--red);
}

.label-num {
    color: var(--text);
}

.band-ink .label {
    color: var(--ink-muted);
}

.band-ink .label-num {
    color: var(--ink-text);
}

.crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0 0 1.75rem;
    color: var(--text-muted);
}

.crumb a {
    text-decoration: none;
}

.crumb span:last-child {
    color: var(--text);
}

.caption,
.updated {
    color: var(--text-muted);
}

/* ---------- Buttons ---------- */

.actions,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.btn,
.hero-cta,
.btn-secondary,
.subscribe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 50px;
    padding: 0 1.3rem;
    border: 1px solid transparent;
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.btn-primary,
.hero-cta,
.subscribe-btn {
    background: var(--signal);
    color: var(--on-signal);
}

.btn-primary::after,
.hero-cta::after {
    content: "\2192";
    transition: transform 220ms var(--ease);
}

.btn-primary:hover,
.hero-cta:hover,
.subscribe-btn:hover {
    background: var(--red);
    color: #fff;
}

.btn-primary:hover::after,
.hero-cta:hover::after {
    transform: translateX(3px);
}

.btn-ghost,
.btn-secondary {
    background: transparent;
    border-color: var(--rule-strong);
    color: var(--text);
}

.btn-ghost:hover,
.btn-secondary:hover {
    border-color: var(--ink);
    background: rgba(13, 14, 15, 0.05);
    color: var(--text);
}

.band-ink .btn-ghost {
    border-color: var(--ink-rule-strong);
    color: var(--ink-text);
}

.band-ink .btn-ghost:hover {
    border-color: var(--ink-text);
    background: rgba(236, 235, 230, 0.06);
}

button:disabled {
    opacity: 0.55;
    cursor: wait;
}

/* ---------- Header ---------- */

.site-header {
    position: relative;
    z-index: 50;
    background: var(--ink);
    color: var(--ink-text);
    border-bottom: 1px solid var(--ink-rule);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 14px;
}

.brand {
    display: block;
    flex: none;
}

/* The logo file is black on transparent; invert renders it white. */
.brand-logo {
    width: auto;
    height: clamp(72px, 7.5vw, 104px);
    filter: invert(1);
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.4vw, 2.25rem);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav a {
    padding-block: 0.5rem;
    color: var(--ink-muted);
    text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: var(--ink-text);
}

.nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--red);
}

.cart-count {
    margin-left: 0.3em;
    color: var(--signal);
}

.nav .nav-cta {
    padding: 0.75rem 1rem;
    background: var(--signal);
    color: var(--on-signal);
}

.nav .nav-cta:hover {
    background: var(--red);
    color: #fff;
}

/* ---------- Bands ---------- */

.band {
    position: relative;
    padding-block: var(--section-y);
}

.band-ink {
    background: var(--ink);
    color: var(--ink-text);
}

.band-ink a:hover {
    color: var(--ink-text);
}

.band-alt {
    background: var(--paper-2);
}

.band-ruled {
    border-top: 1px solid var(--rule);
}

.band-flush {
    padding: 0;
}

.drafting {
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid-major) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
        linear-gradient(var(--grid-minor) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
    background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
    background-position: -1px -1px;
}

.section-head {
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-head-split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(1.5rem, 4vw, 4.5rem);
    align-items: end;
}

.section-head .lede {
    margin: 0;
}

/* ---------- Hero ---------- */

.hero {
    border-bottom: 1px solid var(--rule-strong);
}

.hero-grid > :first-child,
.section-head,
.section-head-split > div,
.spec-grid > div,
.fit {
    container-type: inline-size;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 4.5vw, 5rem);
    align-items: center;
    padding-block: clamp(3rem, 7vw, 6.5rem) clamp(2.5rem, 5vw, 4.5rem);
}

.facts {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    border-top: 1px solid var(--rule-strong);
}

.fact {
    padding: 1.2rem 1.5rem 1.6rem 0;
}

.fact + .fact {
    padding-left: 1.5rem;
    border-left: 1px solid var(--rule);
}

.facts-plain .fact {
    margin: 0;
    font-size: 15px;
    font-stretch: 112%;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.35;
    text-transform: uppercase;
}

.fact-key {
    display: block;
    font-size: 15px;
    font-stretch: 112%;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.fact-val {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.45;
}

@media (prefers-reduced-motion: no-preference) {
    .rise {
        animation: rise 700ms var(--ease) both;
    }

    .rise-2 {
        animation-delay: 80ms;
    }

    .rise-3 {
        animation-delay: 160ms;
    }

    .rise-4 {
        animation-delay: 240ms;
    }

    @keyframes rise {
        from {
            opacity: 0;
            transform: translateY(14px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }
}

/* ---------- Plates, figures, callouts ---------- */

.plate {
    position: relative;
    margin: 0;
    padding: clamp(10px, 1.3vw, 16px);
    background: var(--ink);
    color: var(--ink-text);
}

.plate-media {
    position: relative;
}

.plate-media img {
    width: 100%;
}

.plate-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.4rem 1rem;
    padding: 0.85rem 0.2rem 0.15rem;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Registration ticks at two corners, as on a drawing border. */
.ticks::before,
.ticks::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 0 solid var(--red);
    pointer-events: none;
}

.ticks::before {
    top: -8px;
    left: -8px;
    border-top-width: 2px;
    border-left-width: 2px;
}

.ticks::after {
    right: -8px;
    bottom: -8px;
    border-right-width: 2px;
    border-bottom-width: 2px;
}

.sheet {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 640px;
    margin: 0;
    padding: clamp(1rem, 2.5vw, 2rem);
    background: #fff;
    border: 1px solid var(--rule-strong);
}

.sheet img {
    width: 100%;
}

.sheet figcaption {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--rule);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Balloon callouts: leader lines live in an SVG using 0-100 coordinates
   stretched over the photo, so they track the image at any width; the
   balloons and target dots are HTML so they stay a readable size. */
.callouts {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.callouts svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.callouts line {
    stroke: #fff;
    stroke-width: 1.25;
    vector-effect: non-scaling-stroke;
}

.target,
.balloon {
    position: absolute;
    left: var(--x);
    top: var(--y);
}

.target {
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 2px #fff;
}

.balloon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    transition: background-color 150ms ease;
}

.legend {
    margin: 0.9rem 0 0;
    padding: 0;
    border-top: 1px solid var(--ink-rule);
    list-style: none;
}

.legend li {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.55rem 0.2rem;
    border-bottom: 1px solid var(--ink-rule);
    font-size: 14px;
    line-height: 1.45;
}

.legend-num {
    padding-top: 1px;
    color: var(--signal);
    font-family: var(--font-mono);
    font-size: 12px;
}

.plate:has(.legend [data-item="1"]:hover) .balloon[data-item="1"],
.plate:has(.legend [data-item="2"]:hover) .balloon[data-item="2"],
.plate:has(.legend [data-item="3"]:hover) .balloon[data-item="3"],
.plate:has(.legend [data-item="4"]:hover) .balloon[data-item="4"] {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* Easter egg: callout 05 (the cactus) is not in the legend and stays hidden
   until someone clicks or taps the cactus; the click target is a transparent
   button over the cactus pad, toggled by site.js. */
.callouts [data-item="5"] {
    visibility: hidden;
}

.plate-media.egg-on .callouts [data-item="5"] {
    visibility: visible;
    opacity: 1;
}

.egg-tag {
    position: absolute;
    left: var(--x);
    top: var(--y);
    margin-left: 20px;
    padding: 3px 7px;
    transform: translateY(-50%);
    background: #fff;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.egg {
    position: absolute;
    left: 23%;
    top: 2%;
    width: 18%;
    height: 50%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
}

/* Callouts rest faint so the photo reads first, and come up to full strength
   when the photo is hovered (all of them) or a legend row is hovered (that one).
   Only on devices that can hover: a touch screen could never bring them up. */
@media (hover: hover) {
    .callouts line,
    .callouts .target,
    .callouts .balloon {
        opacity: 0.45;
        transition: opacity 180ms ease, background-color 150ms ease;
    }

    .plate-media:hover .callouts line,
    .plate-media:hover .callouts .target,
    .plate-media:hover .callouts .balloon,
    .plate:has(.legend [data-item="1"]:hover) .callouts [data-item="1"],
    .plate:has(.legend [data-item="2"]:hover) .callouts [data-item="2"],
    .plate:has(.legend [data-item="3"]:hover) .callouts [data-item="3"],
    .plate:has(.legend [data-item="4"]:hover) .callouts [data-item="4"] {
        opacity: 1;
    }
}

.fig {
    margin: 0;
}

.fig img {
    width: 100%;
}

.fig-crop img {
    aspect-ratio: var(--ar);
    object-fit: cover;
}

.fig figcaption {
    display: flex;
    gap: 0.8rem;
    padding-top: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-transform: uppercase;
}

.band-ink .fig figcaption {
    color: var(--ink-muted);
}

.fig-num {
    flex: none;
    color: var(--signal-deep);
}

.band-ink .fig-num {
    color: var(--signal);
}

.fig-frame img {
    border: 1px solid var(--rule);
}

.stack {
    display: grid;
    gap: clamp(1.25rem, 2.4vw, 2rem);
    align-content: start;
}

.pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1.4vw, 18px);
}

/* Full-bleed photograph with its caption laid on the lower edge. */
.bleed {
    position: relative;
    margin: 0;
    background: var(--ink);
}

.bleed img {
    width: 100%;
    max-height: 88vh;
    object-fit: cover;
}

.bleed figcaption {
    position: absolute;
    left: var(--gutter);
    bottom: clamp(12px, 2vw, 24px);
    display: flex;
    gap: 0.8rem;
    max-width: calc(100% - 2 * var(--gutter));
    padding: 0.45rem 0.7rem;
    background: rgba(13, 14, 15, 0.78);
    color: var(--ink-text);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bleed .fig-num {
    color: var(--signal);
}

/* ---------- Home ---------- */

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1.4vw, 18px);
}

.lineup {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
}

.lineup {
    column-gap: 3rem;
}

.line {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0 1.6rem;
    color: inherit;
    text-decoration: none;
}

/* Column rules sit in the gap so all three columns stay the same width. */
.line + .line::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1.5rem;
    border-left: 1px solid var(--rule);
}

a.line:hover {
    color: inherit;
}

.line-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--sheet);
    border: 1px solid var(--rule);
}

.line-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms var(--ease);
}

.line-media-cad {
    background: #fff;
}

.line-media-cad img {
    padding: 7%;
    object-fit: contain;
}

a.line:hover .line-media img {
    transform: scale(1.035);
}

.line-pn {
    margin-top: 1.3rem;
    color: var(--text-muted);
}

.line h3 {
    margin: 0.35rem 0 0.7rem;
    font-size: clamp(1.7rem, 2.5vw, 2.3rem);
    font-stretch: var(--wide);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.line p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
}

.line-foot {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1.6rem;
}

.line-go {
    color: var(--text);
}

.line-go::after {
    content: " \2192";
    color: var(--red);
    transition: margin 220ms var(--ease);
}

a.line:hover .line-go::after {
    margin-left: 4px;
}

.line-dev {
    color: var(--text-faint);
}

/* ---------- Signup ---------- */

.signup-grid {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.signup-grid-media {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: stretch;
}

.signup-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.signup-copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.signup-copy p {
    max-width: 34rem;
    color: var(--ink-muted);
}

.subscribe-form {
    display: flex;
    margin-top: 1.5rem;
    border: 1px solid var(--ink-rule-strong);
    transition: border-color 150ms ease;
}

.subscribe-form:focus-within {
    border-color: var(--red);
}

.subscribe-form input {
    flex: 1;
    min-width: 0;
    min-height: 56px;
    padding: 0 1rem;
    border: 0;
    background: transparent;
    color: var(--ink-text);
    font-family: var(--font-mono);
    font-size: 15px;
}

.subscribe-form input::placeholder {
    color: var(--ink-faint);
}

.subscribe-form input:focus {
    outline: none;
}

.subscribe-btn {
    min-height: 56px;
    border: 0;
}

.subscribe-status {
    min-height: 1.5em;
    margin: 0.8rem 0 0;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.subscribe-status.success {
    color: #86e0a8;
}

.subscribe-status.error {
    color: #ff8a8a;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 1.5rem;
}

.contact-links a {
    color: var(--ink-text);
}

/* ---------- Product page ---------- */

.product-name {
    font-size: clamp(3.4rem, 19.5cqi, 10rem);
    line-height: 0.84;
}

.picker {
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule-strong);
}

.picker-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.9rem;
    color: var(--text-muted);
}

.variant-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--rule-strong);
}

.variant-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-stretch: var(--wide);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.variant-btn + .variant-btn {
    border-left: 1px solid var(--rule-strong);
}

.variant-btn small {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-stretch: normal;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.variant-btn:hover {
    background: rgba(13, 14, 15, 0.05);
}

.variant-btn.is-active {
    background: var(--ink);
    color: var(--paper);
}

.variant-btn.is-active small {
    color: var(--ink-muted);
}

.picker-note {
    margin: 1rem 0 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.55;
}

.price-note {
    margin: 0.9rem 0 0;
}

.design-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 4.5vw, 5rem);
    align-items: start;
}

.rows {
    border-top: 1px solid var(--rule-strong);
}

.row,
.list-item {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 1.4rem 0 1.5rem;
    border-bottom: 1px solid var(--rule);
}

.row-num {
    padding-top: 0.3rem;
    color: var(--signal-deep);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
}

.row h3 {
    margin: 0 0 0.45rem;
    font-size: 1.3rem;
    font-stretch: 112%;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.15;
    text-transform: uppercase;
}

.row p {
    margin: 0;
    color: var(--text-muted);
}

.spec-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(2rem, 4.5vw, 5rem);
    align-items: start;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--sheet);
    border: 1px solid var(--rule-strong);
}

.spec-table caption {
    padding: 0.95rem 1.25rem;
    background: var(--ink);
    color: var(--ink-text);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
}

.spec-table th,
.spec-table td {
    padding: 0.95rem 1.25rem;
    border-top: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

.spec-table th {
    width: 36%;
    padding-top: 1.1rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.spec-table td {
    font-size: 16px;
}

/* ---------- Technology page ---------- */

.toc {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--rule-strong);
}

.toc a {
    padding: 1rem 1rem 1.2rem 0;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-decoration: none;
    text-transform: uppercase;
}

.toc a + a {
    padding-left: 1rem;
    border-left: 1px solid var(--rule);
}

.toc a span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--signal-deep);
}

.toc a:hover {
    color: var(--text);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 5.5rem);
    align-items: start;
}

.split-even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sticky {
    position: sticky;
    top: 96px;
}

.copy {
    max-width: 40rem;
    container-type: inline-size;
}

.copy p {
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.65;
}

.copy p.lead {
    color: var(--text);
    font-size: clamp(1.2rem, 1.6vw, 1.4rem);
    line-height: 1.5;
}

.band-ink .copy p {
    color: var(--ink-muted);
}

.copy a {
    color: var(--text);
}

.band-ink .copy a {
    color: var(--ink-text);
}

.copy .display {
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.stats {
    display: grid;
    border-top: 1px solid var(--ink-rule-strong);
}

.stat {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 1.5rem 0 1.6rem;
    border-bottom: 1px solid var(--ink-rule);
}

.stat-num {
    padding-top: 0.45rem;
    color: var(--signal);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
}

.stat h3 {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-stretch: var(--wide);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.stat-sub {
    display: block;
    margin: 0.55rem 0 0.7rem;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat p {
    margin: 0;
    color: var(--ink-muted);
}

.findings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--rule-strong);
}

.finding {
    padding: 1.3rem 1.5rem 0 0;
}

.finding + .finding {
    padding-left: 1.5rem;
    border-left: 1px solid var(--rule);
}

.finding strong {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
    font-stretch: 112%;
    font-weight: 700;
    text-transform: uppercase;
}

.finding p {
    margin: 0;
    color: var(--text-muted);
}

/* ---------- Secondary pages (policies, cart, checkout) ---------- */

.page-hero {
    margin-inline: calc(50% - 50vw);
    padding: clamp(3rem, 6vw, 5rem) calc(50vw - 50%) clamp(2.5rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--rule-strong);
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid-major) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
        linear-gradient(var(--grid-minor) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
    background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5.4vw, 4.8rem);
    font-stretch: var(--wide);
    font-weight: 800;
    letter-spacing: -0.012em;
    line-height: 0.92;
    text-transform: uppercase;
}

.page-hero .updated {
    margin: 1.2rem 0 0;
}

.example {
    padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--section-y);
}

.prose {
    max-width: 46rem;
    counter-reset: sec;
}

.prose h2 {
    display: flex;
    gap: 1rem;
    margin: 3rem 0 1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--rule-strong);
    font-size: 1.15rem;
    font-stretch: 112%;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-transform: uppercase;
    counter-increment: sec;
}

.prose h2::before {
    content: counter(sec, decimal-leading-zero);
    padding-top: 0.2rem;
    color: var(--signal-deep);
    font-family: var(--font-mono);
    font-size: 12px;
    font-stretch: normal;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose p,
.prose li {
    color: #2e2f33;
}

.prose ul {
    padding-left: 1.15rem;
}

.prose li {
    margin: 0.45rem 0;
}

.prose li::marker {
    color: var(--red);
}

.prose strong {
    color: var(--text);
    font-weight: 600;
}

.list {
    margin: 0 0 1.5rem;
    padding: 0;
    border-top: 1px solid var(--rule-strong);
    list-style: none;
}

.list-item {
    grid-template-columns: minmax(0, 1fr);
}

.cart-lines {
    border-top: 1px solid var(--rule-strong);
}

.cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 1rem 1.5rem;
    align-items: center;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--rule);
}

.cart-line-name {
    font-stretch: 112%;
    font-weight: 700;
    text-transform: uppercase;
}

.cart-line-meta {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
}

.cart-line-total {
    font-family: var(--font-mono);
    font-weight: 500;
}

.buy-qty {
    width: 4.5rem;
    min-height: 42px;
    padding: 0 0.6rem;
    border: 1px solid var(--rule-strong);
    border-radius: 0;
    background: var(--sheet);
    font-family: var(--font-mono);
    font-size: 15px;
}

.cart-remove {
    padding: 0.4rem 0;
    border: 0;
    background: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-decoration: underline;
    text-transform: uppercase;
    cursor: pointer;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1.3rem 0;
    border-bottom: 1px solid var(--rule-strong);
}

.cart-summary-label {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cart-total-amount {
    font-size: 1.8rem;
    font-stretch: var(--wide);
    font-weight: 800;
}

.cart-actions {
    margin-top: 1.5rem;
}

.cart-status {
    margin-top: 1rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
}

/* ---------- 404 ---------- */

.lost {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 2rem var(--gutter);
    text-align: center;
}

.lost img {
    width: min(200px, 55vw);
    margin: 0 auto;
}

.lost h1 {
    margin: 0.6rem 0 0;
    font-size: clamp(2.4rem, 7vw, 4.5rem);
    font-stretch: var(--wide);
    font-weight: 800;
    line-height: 0.92;
    text-transform: uppercase;
}

.lost .label {
    justify-content: center;
    margin: 2.5rem 0 0;
}

.lost nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* ---------- Install pages ---------- */

/* Built to be read at the bench: everything needed fits in the top block,
   and each step is a picture with a line or two under it. */
.install-top {
    padding-block: clamp(1.75rem, 3.5vw, 3rem);
    border-bottom: 1px solid var(--rule-strong);
}

.install-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
}

.install-top .crumb {
    margin-bottom: 1rem;
}

.install-title {
    font-size: clamp(2rem, 5vw, 3.6rem);
}

.install-lede {
    max-width: 40rem;
    margin: 0.9rem 0 0;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

.checklist {
    margin: 1.4rem 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--rule-strong);
}

.checklist li {
    display: grid;
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
    line-height: 1.45;
}

.check-key {
    padding-top: 0.15rem;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quickref {
    padding: 1.1rem 1.25rem 1.2rem;
    background: var(--ink);
    color: var(--ink-text);
}

.quickref-title {
    margin: 0 0 0.35rem;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quickref-list + .quickref-title {
    margin-top: 1rem;
}

.quickref-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.quickref-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-top: 1px solid var(--ink-rule);
    font-size: 15px;
    line-height: 1.4;
}

.quickref-list li span:last-child {
    flex: none;
    font-weight: 700;
    text-align: right;
}

.quickref-note {
    margin: 0.75rem 0 0;
    color: var(--ink-muted);
    font-size: 13px;
}

.install-steps {
    padding-block: clamp(1.75rem, 3.5vw, 3rem);
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.4vw, 2rem) clamp(1rem, 2vw, 1.75rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.step-card h2 {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0.8rem 0 0.3rem;
    font-size: 1.05rem;
    font-stretch: 112%;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-transform: uppercase;
}

.step-num {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
}

.step-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
}

.step-fig {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--sheet);
    border: 1px solid var(--rule);
}

.step-fig img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CAD drawings: whole figure visible, on the sheet tone they were drawn for */
.step-fig-drawing picture {
    display: contents;
}

.step-fig-drawing img {
    padding: 0.5rem;
    object-fit: contain;
}

.step-fig-pending {
    display: grid;
    place-items: center;
    padding: 1rem;
    border-style: dashed;
    border-color: var(--rule-strong);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.6;
    text-align: center;
    text-transform: uppercase;
}

/* Install guide index: each card is one link to its guide */
.guide-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.guide-card:hover h2 {
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-underline-offset: 0.2em;
}

.install-help {
    margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--rule-strong);
    color: var(--text-muted);
    font-size: 15px;
}

/* Facts still owed by the owner. Drafts only: test/no-placeholders.test.js
   fails while any remain in public/, so a page with one cannot merge. */
.tbd {
    padding: 0 0.25em;
    background: rgba(227, 0, 15, 0.07);
    outline: 1px dashed var(--red);
    color: var(--text);
}

.tbd::before {
    content: "TBD ";
    color: var(--red);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
}

@media (max-width: 960px) {
    .install-top-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .step-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .step-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .step-fig {
        aspect-ratio: 16 / 10;
    }
}

/* Instructions get printed for the bench: one sheet, no navigation. */
@media print {
    body:has(main.install) .site-header .nav,
    body:has(main.install) .footer-links,
    body:has(main.install) .footer-trademarks {
        display: none;
    }

    main.install .quickref {
        border: 1px solid var(--ink);
        background: none;
        color: var(--text);
    }

    main.install .step-card {
        break-inside: avoid;
    }
}

/* ---------- Footer ---------- */

.site-footer {
    padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.5rem;
    background: var(--ink);
    color: var(--ink-text);
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
    gap: clamp(2rem, 5vw, 5rem);
    padding-bottom: 2.2rem;
    border-bottom: 1px solid var(--ink-rule);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.footer-brand > img {
    flex: none;
    width: 92px;
    filter: invert(1);
}

/* Subdued US and Texas flags. US first: the Flag Code puts it at the viewer's left.
   13px tall so each US stripe lands on whole pixels at 1x and 2x. */
.footer-flags {
    display: flex;
    gap: 6px;
    margin-bottom: 0.6rem;
}

.footer-flags img {
    display: block;
    width: auto;
    height: 13px;
}

.footer-brand p {
    margin: 0 0 0.35rem;
    color: var(--ink-muted);
    font-size: 15px;
}

.footer-brand a {
    color: var(--ink-text);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.footer-links h2 {
    margin: 0 0 0.8rem;
    color: var(--ink-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-links a {
    display: block;
    width: fit-content;
    margin-bottom: 0.45rem;
    color: var(--ink-muted);
    font-size: 15px;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--ink-text);
}

.footer-legal {
    margin: 1.6rem 0 0;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.footer-trademarks {
    max-width: 72rem;
    margin: 0.9rem 0 0;
    color: var(--ink-faint);
    font-size: 12px;
    line-height: 1.65;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .toc {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .toc a:nth-child(4) {
        padding-left: 0;
        border-left: 0;
    }

    .toc a:nth-child(n + 4) {
        border-top: 1px solid var(--rule);
    }
}

@media (max-width: 960px) {
    .hero-grid,
    .section-head-split,
    .design-grid,
    .spec-grid,
    .signup-grid,
    .split {
        grid-template-columns: minmax(0, 1fr);
    }

    .section-head-split {
        align-items: start;
    }

    .signup-grid-media .signup-media img {
        max-height: 420px;
    }

    .sticky {
        position: relative;
        top: auto;
    }

    .footer-top {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    body {
        font-size: 16px;
    }

    .nav .nav-cta {
        display: none;
    }

    .nav {
        gap: 1.1rem;
        font-size: 11px;
    }

    .facts,
    .lineup,
    .findings {
        grid-template-columns: minmax(0, 1fr);
    }

    .fact,
    .fact + .fact,
    .finding,
    .finding + .finding {
        padding: 1rem 0 1.2rem;
        border-left: 0;
    }

    .fact + .fact,
    .finding + .finding {
        border-top: 1px solid var(--rule);
    }

    .line {
        padding: 1.5rem 0 1.75rem;
    }

    .line + .line::before {
        display: none;
    }

    .line + .line {
        border-top: 1px solid var(--rule);
    }

    .field-grid,
    .pair,
    .split-even {
        grid-template-columns: minmax(0, 1fr);
    }

    .toc {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .toc a,
    .toc a + a,
    .toc a:nth-child(4) {
        padding: 0.9rem 0.75rem 1rem 0;
        border-left: 0;
        border-top: 1px solid var(--rule);
    }

    .toc a:nth-child(2n) {
        padding-left: 0.75rem;
        border-left: 1px solid var(--rule);
    }

    .cart-line {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .copy p {
        font-size: 17px;
    }
}

@media (max-width: 460px) {
    .footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legend li {
        font-size: 13px;
    }

    .balloon {
        width: 24px;
        height: 24px;
        margin: -12px 0 0 -12px;
        font-size: 11px;
    }
}
