/* Spora website styles.

   The tokens below mirror the Spora design system ("Instrument" direction):
   cool sage surfaces, ink text, IBM Plex Sans + Mono, a semantic color split
   (orange = act, green = success, gold = pending, rust = error), shape-coded
   status, flat color only, and the barcode strip as the one ornament.
   Design source: Claude Design project 9d253146 (local sync in ../spora-mac/_ds/).
   Rules marked "site:" are this website's extensions of the system (a marketing
   page reads at a larger scale than a 412dp phone screen). */

/* ── tokens: colors (design system, verbatim) ─────────────────────────── */
:root {
    --sage-100: #F6F8F4;   /* card */
    --sage-200: #EFF2EE;   /* text on dark */
    --sage-300: #D6DAD3;   /* background */
    --sage-400: #C2C7C1;
    --ink-900:  #1D211D;   /* primary text */
    --ink-600:  #494F49;   /* muted text (AA on sage-300) */
    --pine-800: #333B36;   /* primary UI: buttons */
    --pine-900: #272E29;   /* dark chrome */
    --soil-700: #3E4A40;   /* mark arc (recolor B), quiet accent */
    --green-500: #6C9044;  /* THE mark green: semantic success family root */
    --green-600: #587536;  /* success dot on light */
    --green-700: #4E6B2F;  /* success text on light */
    --ember-500: #DB5F3D;  /* action orange: big affirmative buttons only */
    --ember-050: #FFF4EE;  /* titles on action */
    --ember-900: #38180D;  /* micro-labels on action */
    --gold-500: #DAC35B;   /* pending fill */
    --gold-700: #8A6D14;   /* pending text */
    --rust-600: #AC3322;   /* error */
    --rust-800: #7E2013;   /* error emphasis */

    --surface-bg: var(--sage-300);
    --surface-card: var(--sage-100);
    --surface-nav: var(--pine-900);
    --surface-error-tint: rgba(172, 51, 34, 0.08);

    --text-primary: var(--ink-900);
    --text-muted: var(--ink-600);
    --text-on-dark: var(--sage-200);
    --text-on-dark-muted: #99A29A;

    --color-primary: var(--pine-800);
    --color-action: var(--ember-500);
    --on-action-title: var(--ember-050);
    --on-action-micro: var(--ember-900);
    --color-success: var(--green-500);
    --color-success-dot: var(--green-600);
    --color-success-text: var(--green-700);
    --color-success-text-on-dark: color-mix(in srgb, var(--green-500) 65%, var(--sage-100));
    --color-pending: var(--gold-500);
    --color-pending-text: var(--gold-700);
    --color-error: var(--rust-600);
    --color-error-strong: var(--rust-800);
    --color-waiting: var(--ink-600);

    --border-hairline: rgba(28, 32, 28, 0.15);
    --border-divider: rgba(28, 32, 28, 0.10);
    --border-strong: rgba(28, 32, 28, 0.35);
    --border-error: rgba(172, 51, 34, 0.5);
    --border-on-dark: rgba(239, 242, 238, 0.14);

    --shadow-hero: 0 12px 26px -12px rgba(150, 55, 30, 0.5);
    --shadow-nav: 0 -12px 32px rgba(16, 22, 18, 0.2);

    /* ── tokens: type ──────────────────────────────────────────────────── */
    --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --type-wordmark-ls: 0.18em;   /* 2.4px at 13px */
    --type-button-ls: 0.07em;     /* 1px at 14px */
    --type-micro-ls: 0.12em;      /* 1.4px at 9.5px, rounded for larger sizes */

    /* ── tokens: spacing + shape ───────────────────────────────────────── */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --radius-hero: 16px;
    --radius-card: 10px;
    --radius-chip: 6px;
    --radius-tag: 4px;
    --radius-nav: 20px;
    --radius-button: 10px;
    --dot-size: 7px;
    --dot-ring-size: 8px;
    --hit-target: 48px;

    /* ── tokens: motion ────────────────────────────────────────────────── */
    --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
    --duration-quick: 150ms;
    --duration-standard: 220ms;
    --press-scale: 0.98;

    /* ── site: layout ──────────────────────────────────────────────────── */
    --gutter: 4rem;
    --leaf-light: #A3BA8A;   /* green-500 tinted toward sage-100, hero leaves only */
    --surface-row-hover: rgba(28, 32, 28, 0.07);   /* menu row highlight inside a card */
    --section-pad: 6rem;
    --container: 1200px;
}

/* ── base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background: var(--surface-bg);
}

body {
    background-color: var(--surface-bg);
    color: var(--text-primary);
    font: 400 1rem/1.55 var(--font-sans);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

svg.icon {
    display: block;
    width: 24px;
    height: 24px;
    flex: none;
}

/* Micro-label role: mono, uppercase, tracked. */
.brand-eyebrow,
.advantage-label,
.step-role,
.safety-eyebrow,
.safety-section-label,
.safety-note-label,
.download-eyebrow,
.error-eyebrow,
.problem-content h2 {
    font: 500 0.72rem/1.3 var(--font-mono);
    letter-spacing: var(--type-micro-ls);
    text-transform: uppercase;
}

/* Barcode: the system's only data-viz motif, used here as ornament.
   Rows of 2px bars in three quantized heights, deterministic per seed.
   Bars are rendered by the small script in base.html. */
[data-barcode] {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    overflow: hidden;
    color: var(--color-success-dot);
    opacity: 0.75;
    pointer-events: none;
}

[data-barcode] > span {
    flex: none;
    width: 2px;
    border-radius: 1px;
    background: currentColor;
}

/* ── nav ──────────────────────────────────────────────────────────────── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem var(--gutter);
    position: relative;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: var(--hit-target);
    font: 700 0.9375rem/1 var(--font-sans);
    letter-spacing: var(--type-wordmark-ls);
    color: var(--text-primary);
    text-decoration: none;
}

.logo img {
    width: auto;
    height: 22px;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--hit-target);
    font: 500 0.75rem/1 var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--duration-quick) var(--ease-standard);
}

.nav-link:hover {
    color: var(--text-primary);
}

/* Hamburger (hidden on desktop) */
.nav-toggle {
    display: none;
}

.nav-hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: var(--hit-target);
    height: var(--hit-target);
    align-items: center;
    z-index: 110;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background: var(--text-primary);
    transition: transform var(--duration-standard) var(--ease-standard),
                opacity var(--duration-standard) var(--ease-standard);
}

/* Nav dropdown */
.nav-dropdown-group {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link-has-dropdown {
    cursor: default;
}

.nav-link-has-dropdown::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 0.5em;
    position: relative;
    top: -2px;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 4px;
    z-index: 120;
}

.nav-dropdown-menu {
    background: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    padding: 0.5rem;
    min-width: 220px;
}

.nav-dropdown-group:hover .nav-dropdown,
.nav-dropdown-group:focus-within .nav-dropdown {
    display: block;
}

.nav-dropdown-link {
    display: block;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-chip);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color var(--duration-quick) var(--ease-standard);
}

.nav-dropdown-link:hover {
    background-color: var(--surface-row-hover);
}

/* External links carry the system's "open in a new place" glyph. */
.nav-dropdown-link svg.icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-left: 0.15rem;
    color: var(--text-muted);
}

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero,
.subpage-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.hero {
    min-height: 85vh;
    padding: 3rem var(--gutter) 5rem;
}

.subpage-hero {
    min-height: 65vh;
    padding: 5rem var(--gutter) 7rem;
}

.hero-content,
.subpage-hero-content {
    position: relative;
    z-index: 10;
    max-width: 55%;
}

.brand-eyebrow {
    display: block;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 1.75rem;
}

.h1-line {
    display: block;
}

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

p.hero-copy {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 34em;
    margin-bottom: 2.5rem;
}

/* Hero leaves. Kept from the first design as the one piece of imagery,
   recolored to the palette with flat fills in shades of the mark's green. */
.organic-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.leaf-shape {
    position: absolute;
    background: var(--green-500);
    opacity: 0.9;
    border-radius: 0 50% 0 50%;
}

.leaf-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    right: -100px;
    transform: rotate(45deg);
    background: var(--green-500);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.leaf-2 {
    width: 600px;
    height: 600px;
    top: 40%;
    right: -150px;
    transform: rotate(15deg);
    background: var(--green-700);
    z-index: 1;
}

.leaf-3 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 400px;
    transform: rotate(60deg);
    background: var(--leaf-light);
    z-index: 3;
    border-radius: 50% 0 50% 0;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(-10px) rotate(48deg); }
    100% { transform: translateY(0px) rotate(45deg); }
}

/* Leaf variations for the use-case pages */
.leaves-family .leaf-shape {
    border-radius: 50% 0 50% 0;
}

.leaves-family .leaf-1 {
    width: 350px;
    height: 350px;
    top: 5%;
    right: -50px;
    transform: rotate(30deg);
    background: var(--green-500);
    z-index: 2;
    animation: float-gentle 8s ease-in-out infinite;
}

.leaves-family .leaf-2 {
    width: 500px;
    height: 500px;
    top: 35%;
    right: -120px;
    transform: rotate(-15deg);
    background: var(--green-700);
    z-index: 1;
    border-radius: 0 50% 0 50%;
}

.leaves-family .leaf-3 {
    width: 180px;
    height: 180px;
    top: 15%;
    right: 350px;
    transform: rotate(75deg);
    background: var(--leaf-light);
    z-index: 3;
    animation: float-gentle 8s ease-in-out 2s infinite;
}

.leaves-family .leaf-4 {
    width: 120px;
    height: 120px;
    top: 70%;
    right: 250px;
    transform: rotate(20deg);
    background: var(--green-600);
    z-index: 3;
    border-radius: 0 50% 0 50%;
    opacity: 0.7;
}

@keyframes float-gentle {
    0% { transform: translateY(0px) rotate(30deg); }
    50% { transform: translateY(-8px) rotate(33deg); }
    100% { transform: translateY(0px) rotate(30deg); }
}

.leaves-connect .leaf-1 {
    width: 450px;
    height: 450px;
    top: 8%;
    right: -80px;
    transform: rotate(-20deg);
    background: var(--green-500);
    z-index: 2;
    border-radius: 0 50% 0 50%;
    animation: float-drift 7s ease-in-out infinite;
}

.leaves-connect .leaf-2 {
    width: 300px;
    height: 300px;
    top: 55%;
    right: -60px;
    transform: rotate(40deg);
    background: var(--green-700);
    z-index: 1;
    border-radius: 50% 0 50% 0;
}

.leaves-connect .leaf-3 {
    width: 160px;
    height: 160px;
    top: 25%;
    right: 300px;
    transform: rotate(-45deg);
    background: var(--leaf-light);
    z-index: 3;
    border-radius: 0 50% 0 50%;
    animation: float-drift 7s ease-in-out 3s infinite;
}

.leaves-connect .leaf-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 200px;
    transform: rotate(60deg);
    background: var(--green-600);
    z-index: 3;
    border-radius: 50% 0 50% 0;
    opacity: 0.7;
}

@keyframes float-drift {
    0% { transform: translateY(0px) rotate(-20deg); }
    50% { transform: translateY(-12px) rotate(-17deg); }
    100% { transform: translateY(0px) rotate(-20deg); }
}

.leaves-home .leaf-1 {
    width: 500px;
    height: 500px;
    top: 15%;
    right: -130px;
    transform: rotate(10deg);
    background: var(--green-500);
    z-index: 1;
    border-radius: 0 50% 0 50%;
    animation: float-sway 9s ease-in-out infinite;
}

.leaves-home .leaf-2 {
    width: 250px;
    height: 250px;
    top: 5%;
    right: 150px;
    transform: rotate(55deg);
    background: var(--leaf-light);
    z-index: 2;
    border-radius: 50% 0 50% 0;
}

.leaves-home .leaf-3 {
    width: 350px;
    height: 350px;
    top: 55%;
    right: -30px;
    transform: rotate(-25deg);
    background: var(--green-700);
    z-index: 2;
    border-radius: 50% 0 50% 0;
    animation: float-sway 9s ease-in-out 4s infinite;
}

.leaves-home .leaf-4 {
    width: 130px;
    height: 130px;
    top: 40%;
    right: 330px;
    transform: rotate(35deg);
    background: var(--green-600);
    z-index: 3;
    border-radius: 0 50% 0 50%;
    opacity: 0.7;
}

@keyframes float-sway {
    0% { transform: translateX(0px) rotate(10deg); }
    50% { transform: translateX(-6px) rotate(13deg); }
    100% { transform: translateX(0px) rotate(10deg); }
}

.leaves-travel .leaf-1 {
    width: 380px;
    height: 380px;
    top: 20%;
    right: -60px;
    transform: rotate(50deg);
    background: var(--green-500);
    z-index: 2;
    border-radius: 50% 0 50% 0;
    animation: float-bob 6s ease-in-out infinite;
}

.leaves-travel .leaf-2 {
    width: 280px;
    height: 280px;
    top: 0%;
    right: 100px;
    transform: rotate(-10deg);
    background: var(--green-600);
    z-index: 1;
    border-radius: 0 50% 0 50%;
    opacity: 0.85;
}

.leaves-travel .leaf-3 {
    width: 420px;
    height: 420px;
    top: 50%;
    right: -100px;
    transform: rotate(25deg);
    background: var(--green-700);
    z-index: 1;
    border-radius: 0 50% 0 50%;
}

.leaves-travel .leaf-4 {
    width: 140px;
    height: 140px;
    top: 45%;
    right: 320px;
    transform: rotate(-40deg);
    background: var(--leaf-light);
    z-index: 3;
    border-radius: 50% 0 50% 0;
    animation: float-bob 6s ease-in-out 2s infinite;
}

@keyframes float-bob {
    0% { transform: translateY(0px) rotate(50deg); }
    50% { transform: translateY(-10px) rotate(53deg); }
    100% { transform: translateY(0px) rotate(50deg); }
}

/* Buttons. Action (ember) is reserved for the one big affirmative step:
   getting Spora. Everything else is primary (pine) or outlined. */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: var(--hit-target);
    padding: 0.9rem 1.5rem;
    background-color: var(--color-action);
    color: var(--on-action-title);
    border: 0;
    border-radius: var(--radius-button);
    font: 600 0.875rem/1 var(--font-sans);
    letter-spacing: var(--type-button-ls);
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: var(--shadow-hero);
    cursor: pointer;
    transition: transform var(--duration-quick) var(--ease-standard),
                filter var(--duration-quick) var(--ease-standard),
                background-color var(--duration-quick) var(--ease-standard);
}

.cta-button::after {
    content: '';
    width: 16px;
    height: 16px;
    flex: none;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cta-button:hover {
    filter: brightness(0.94);
}

.cta-button:active {
    transform: scale(var(--press-scale));
}

/* ── dark sections (differentiator, problem, pullquote) ───────────────── */
.differentiator,
.problem-section,
.pullquote-section {
    background-color: var(--surface-nav);
    color: var(--text-on-dark);
    padding: var(--section-pad) var(--gutter);
    position: relative;
    z-index: 5;
}

.differentiator {
    text-align: center;
}

.differentiator-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.differentiator-intro h2 {
    color: var(--text-on-dark);
}

.differentiator-intro p {
    max-width: 34em;
    margin: 0 auto;
    color: var(--text-on-dark-muted);
    font-size: 1.125rem;
    line-height: 1.65;
}

.differentiator-statement {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-on-dark-muted);
    max-width: 800px;
    margin: 0 auto 4rem auto;
    line-height: 1.35;
}

.differentiator-statement em {
    color: var(--text-on-dark);
    font-style: normal;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.advantage-item {
    text-align: left;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-on-dark);
}

/* Shape-coded: a filled circle means active. These are the things Spora is. */
.advantage-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-on-dark);
    margin-bottom: 0.75rem;
}

.advantage-label::before {
    content: '';
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: var(--color-success);
    flex: none;
}

.advantage-text {
    font-size: 0.95rem;
    color: var(--text-on-dark-muted);
    line-height: 1.6;
}

/* ── use cases ────────────────────────────────────────────────────────── */
.use-cases,
.connection-questions,
.solution-section {
    padding: var(--section-pad) var(--gutter);
    background-color: var(--surface-card);
    position: relative;
    z-index: 5;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2,
.differentiator-intro h2,
.solution-content h2,
.footer-cta h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 34em;
    margin: 0 auto;
    line-height: 1.6;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: var(--container);
    margin: 0 auto;
}

/* Cards: solid surface + hairline. No shadows, no gradients. On the card
   surface the card itself is the page background tint, for contrast. */
.use-case-card {
    display: block;
    background: var(--surface-bg);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    padding: 1.75rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: border-color var(--duration-quick) var(--ease-standard),
                transform var(--duration-quick) var(--ease-standard);
}

.use-case-card:hover {
    border-color: var(--border-strong);
}

.use-case-card:active {
    transform: scale(var(--press-scale));
}

.use-case-icon,
.problem-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-chip);
    margin-bottom: 1.5rem;
}

.use-case-icon {
    background: rgba(108, 144, 68, 0.15);
    color: var(--color-success-text);
}

.use-case-card h3 {
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

.use-case-card p {
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 0.95rem;
}

/* ── questions before connecting ──────────────────────────────────────── */
.question-list {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--border-hairline);
}

.question-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-hairline);
}

.question-item h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    line-height: 1.35;
}

.question-item p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.questions-safety {
    max-width: 800px;
    margin: 1.75rem auto 0;
}

.questions-safety a {
    text-underline-offset: 0.2em;
}

/* ── how it works ─────────────────────────────────────────────────────── */
.how-it-works,
.how-it-works-subpage {
    padding: var(--section-pad) var(--gutter);
    background-color: var(--surface-bg);
    position: relative;
    z-index: 5;
}

.how-it-works {
    --surface-card: var(--surface-nav);
    --text-primary: var(--text-on-dark);
    --text-muted: var(--text-on-dark-muted);
    --color-success-text: var(--color-success-text-on-dark);
    --border-hairline: var(--border-on-dark);
    padding-block: min(4.5rem, var(--section-pad));
    background-color: var(--surface-card);
    color: var(--text-primary);
}

.connection-story {
    --story-gap: 2.5rem;
    max-width: var(--container);
    margin: 0 auto;
}

.connection-story h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    text-align: center;
}

.connection-story-intro {
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.65;
    text-align: center;
}

.connection-story-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem var(--story-gap);
    list-style: none;
}

.connection-story-steps li {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    padding-top: 1rem;
    border-top: 1px solid var(--border-hairline);
}

.connection-story-number {
    color: var(--text-muted);
    font: 500 0.875rem/1 var(--font-mono);
    letter-spacing: var(--type-micro-ls);
}

.connection-story-steps h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.3;
}

.connection-story-steps p {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.65;
}

.connection-story-steps strong {
    color: var(--color-success-text);
    font-weight: 600;
    white-space: nowrap;
}

.traffic-diagram {
    margin-top: 2.5rem;
    padding: clamp(1rem, 3vw, 2.5rem);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    background-color: var(--surface-card);
}

.traffic-diagram figcaption {
    margin-bottom: 1.75rem;
    color: var(--text-muted);
    font: 500 0.75rem/1.5 var(--font-mono);
    letter-spacing: var(--type-micro-ls);
    text-transform: uppercase;
}

.traffic-route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr);
    grid-template-rows: 72px auto auto;
    gap: 0.5rem clamp(0.75rem, 1.5vw, 1.5rem);
    text-align: center;
}

.traffic-node,
.traffic-link {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    min-width: 0;
}

.traffic-node-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    justify-self: center;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    background-color: var(--surface-card);
    color: var(--text-primary);
}

.traffic-node-icon svg.icon {
    width: 36px;
    height: 36px;
}

.traffic-node-name {
    padding-top: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.traffic-node-detail {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.traffic-website-ip strong {
    color: var(--color-success-text);
    font-weight: 600;
}

.traffic-link-lines {
    align-self: center;
    color: var(--color-success-text);
}

.traffic-flow-line {
    display: block;
    position: relative;
    height: 24px;
}

.traffic-flow-line::before {
    content: '';
    position: absolute;
    top: 11px;
    left: 0;
    right: 5px;
    height: 2px;
    border-radius: 1px;
    background-color: currentColor;
}

.traffic-flow-line svg.icon {
    position: absolute;
    top: 0;
    right: 0;
}

.traffic-flow-return {
    margin-top: -4px;
    transform: rotate(180deg);
}

.traffic-link-label {
    align-self: center;
    color: var(--text-muted);
    font: 500 0.75rem/1.5 var(--font-mono);
    letter-spacing: var(--type-micro-ls);
    text-transform: uppercase;
}

.steps-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: stretch;
    max-width: 900px;
    margin: 0 auto;
}

.steps-container-3 {
    grid-template-columns: 1fr auto 1fr auto 1fr;
}

.step {
    padding: 2rem 1.75rem;
    background: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    color: var(--text-on-dark);
    border-radius: var(--radius-chip);
    font: 600 1rem/1 var(--font-sans);
    margin-bottom: 1.25rem;
}

.step-role {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.step p {
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 0.95rem;
}

.steps-arrow {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.steps-footnote {
    text-align: center;
    margin-top: 2.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── problem section (use-case subpages, dark) ────────────────────────── */
.problem-content {
    max-width: 1000px;
    margin: 0 auto;
}

.problem-content h2 {
    color: var(--text-on-dark-muted);
    margin-bottom: 1.25rem;
}

.problem-statement {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-on-dark);
    line-height: 1.35;
    max-width: 700px;
    margin-bottom: 3.5rem;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.problem-item {
    padding: 1.75rem;
    border: 1px solid var(--border-on-dark);
    border-radius: var(--radius-card);
}

.problem-icon {
    background: rgba(239, 242, 238, 0.08);
    color: var(--text-on-dark);
    margin-bottom: 1.25rem;
}

.problem-item h3 {
    font-size: 1.1rem;
    color: var(--text-on-dark);
    margin-bottom: 0.6rem;
}

.problem-item p {
    font-size: 0.925rem;
    color: var(--text-on-dark-muted);
    line-height: 1.6;
}

/* ── solution section ─────────────────────────────────────────────────── */
.solution-content {
    max-width: 800px;
    margin: 0 auto;
}

.solution-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.benefit-grid {
    display: grid;
    gap: 0;
}

.benefit-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-divider);
}

.benefit-item:first-child {
    padding-top: 0;
}

.benefit-item:last-child {
    border-bottom: none;
}

/* Shape-coded: filled circle = active. */
.benefit-marker {
    width: var(--dot-size);
    height: var(--dot-size);
    min-width: var(--dot-size);
    background: var(--color-success-dot);
    border-radius: 50%;
    margin-top: 0.55rem;
}

.benefit-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.benefit-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── pullquote ────────────────────────────────────────────────────────── */
.pullquote {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.pullquote-barcode {
    width: 96px;
    height: 18px;
    margin: 0 auto 1.75rem;
    color: var(--text-on-dark-muted);
    opacity: 0.7;
}

.pullquote p {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-on-dark);
    line-height: 1.4;
}

/* ── footer: dark chrome ──────────────────────────────────────────────── */
footer {
    background-color: var(--surface-nav);
    color: var(--text-on-dark);
    padding: 5rem var(--gutter) 2rem;
    text-align: center;
    position: relative;
    z-index: 5;
}

.footer-cta {
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.footer-cta h2 {
    color: var(--text-on-dark);
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.footer-cta p {
    color: var(--text-on-dark-muted);
    margin-bottom: 2rem;
}

.copyright {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font: 400 0.75rem/1.4 var(--font-mono);
    color: var(--text-on-dark-muted);
    border-top: 1px solid var(--border-on-dark);
    padding-top: 1.5rem;
}

.footer-support a {
    color: var(--text-on-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border-on-dark);
    transition: text-decoration-color var(--duration-quick) var(--ease-standard);
}

.footer-support a:hover {
    text-decoration-color: currentColor;
}

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-link,
.lang-current {
    text-transform: capitalize;
}

.lang-link {
    color: var(--text-on-dark-muted);
    text-decoration: none;
    transition: color var(--duration-quick) var(--ease-standard);
}

.lang-link:hover {
    color: var(--text-on-dark);
}

.lang-current {
    color: var(--text-on-dark);
    font-weight: 500;
}

.lang-sep {
    color: var(--border-on-dark);
}

/* ── safety page ──────────────────────────────────────────────────────── */
.safety-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem var(--gutter) 5rem;
}

.safety-header {
    margin-bottom: 2.5rem;
}

.safety-eyebrow {
    display: block;
    color: var(--text-muted);
}

.safety-header h1 {
    font-size: clamp(2.25rem, 5vw, 3rem);
    margin: 0.75rem 0 1.25rem;
}

.safety-intro {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Caution is the pending family (gold), not the error family (rust). */
.safety-warning {
    display: flex;
    gap: 1.25rem;
    background: var(--surface-card);
    border: 1.5px solid rgba(138, 109, 20, 0.55);
    border-radius: var(--radius-card);
    padding: 1.75rem;
    margin-bottom: 3rem;
}

.safety-warning-icon {
    flex-shrink: 0;
    color: var(--color-pending-text);
    padding-top: 0.15rem;
}

.safety-warning-icon svg {
    width: 28px;
    height: 28px;
}

.safety-warning-content h2 {
    font-size: 1.25rem;
    color: var(--color-pending-text);
    margin-bottom: 0.75rem;
}

.safety-warning-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.safety-warning-content p:last-child {
    margin-bottom: 0;
}

.safety-sections {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.safety-section {
    border-top: 1px solid var(--border-divider);
    padding-top: 2rem;
}

.safety-section-label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.safety-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.safety-section > p {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.safety-note {
    margin-top: 1.5rem;
    background: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    padding: 1.5rem;
}

.safety-note-label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.safety-note p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.safety-note p:last-child {
    margin-bottom: 0;
}

/* ── download page ────────────────────────────────────────────────────── */
.download-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem var(--gutter) 5rem;
    text-align: center;
}

.download-header h1 {
    font-size: clamp(2.25rem, 5vw, 3rem);
    margin-bottom: 0.75rem;
}

.download-intro {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.download-alpha-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

/* Alpha is a pending state: gold tag. */
.download-alpha-badge {
    flex-shrink: 0;
    font: 500 0.65rem/1 var(--font-mono);
    letter-spacing: 0.08em;
    background: var(--color-pending);
    color: var(--ink-900);
    padding: 0.35em 0.6em;
    border-radius: var(--radius-tag);
    margin-top: 0.3rem;
}

.download-alpha-notice p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Platform tabs are filter chips. */
.download-platforms {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.platform-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 96px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-chip);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color var(--duration-quick) var(--ease-standard),
                border-color var(--duration-quick) var(--ease-standard),
                transform var(--duration-quick) var(--ease-standard);
}

.platform-tab:hover {
    background: var(--surface-card);
}

.platform-tab:active {
    transform: scale(var(--press-scale));
}

.platform-tab.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--text-on-dark);
}

.platform-icon {
    width: 28px;
    height: 28px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

.platform-tab.active .platform-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

.platform-icon-android { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231D211D' d='M18.4395 5.5586c-.675 1.1664-1.352 2.3318-2.0274 3.498-.0366-.0155-.0742-.0286-.1113-.043-1.8249-.6957-3.484-.8-4.42-.787-1.8551.0185-3.3544.4643-4.2597.8203-.084-.1494-1.7526-3.021-2.0215-3.4864a1.1451 1.1451 0 0 0-.1406-.1914c-.3312-.364-.9054-.4859-1.379-.203-.475.282-.7136.9361-.3886 1.5019 1.9466 3.3696-.0966-.2158 1.9473 3.3593.0172.031-.4946.2642-1.3926 1.0177C2.8987 12.176.452 14.772 0 18.9902h24c-.119-1.1108-.3686-2.099-.7461-3.0683-.7438-1.9118-1.8435-3.2928-2.7402-4.1836a12.1048 12.1048 0 0 0-2.1309-1.6875c.6594-1.122 1.312-2.2559 1.9649-3.3848.2077-.3615.1886-.7956-.0079-1.1191a1.1001 1.1001 0 0 0-.8515-.5332c-.5225-.0536-.9392.3128-1.0488.5449zm-.0391 8.461c.3944.5926.324 1.3306-.1563 1.6503-.4799.3197-1.188.0985-1.582-.4941-.3944-.5927-.324-1.3307.1563-1.6504.4727-.315 1.1812-.1086 1.582.4941zM7.207 13.5273c.4803.3197.5506 1.0577.1563 1.6504-.394.5926-1.1038.8138-1.584.4941-.48-.3197-.5503-1.0577-.1563-1.6504.4008-.6021 1.1087-.8106 1.584-.4941z'/%3E%3C/svg%3E"); }
.platform-icon-windows { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231D211D' d='M0 3.449L9.75 2.1v9.451H0zm10.949-1.564L24 0v11.4H10.949zM0 12.6h9.75v9.451L0 20.699zM10.949 12.6H24V24l-13.051-1.849z'/%3E%3C/svg%3E"); }
.platform-icon-ios { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231D211D' d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z'/%3E%3C/svg%3E"); }
.platform-icon-macos { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231D211D' d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z'/%3E%3C/svg%3E"); }
.platform-icon-linux { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231D211D' d='M12.504 0c-.155 0-.315.008-.48.021-4.226.333-3.105 4.807-3.17 6.298-.076 1.092-.3 1.953-1.05 3.02-.885 1.051-2.127 2.75-2.716 4.521-.278.832-.41 1.684-.287 2.489a.424.424 0 00-.11.135c-.26.268-.45.6-.663.839-.199.199-.485.267-.797.4-.313.136-.658.269-.864.68-.09.189-.136.394-.132.602 0 .199.027.4.055.536.058.399.116.728.04.97-.249.68-.28 1.145-.106 1.484.174.334.535.47.94.601.81.2 1.91.135 2.774.6.926.466 1.866.67 2.616.47.526-.116.97-.464 1.208-.946.587-.003 1.23-.269 2.26-.334.699-.058 1.574.267 2.577.2.025.134.063.198.114.333l.003.003c.391.778 1.113 1.132 1.884 1.071.771-.06 1.592-.536 2.257-1.306.631-.765 1.683-1.084 2.378-1.503.348-.199.629-.469.649-.853.023-.4-.2-.811-.714-1.376v-.097l-.003-.003c-.17-.2-.25-.535-.338-.926-.085-.401-.182-.786-.492-1.046h-.003c-.059-.054-.123-.067-.188-.135a.357.357 0 00-.19-.064c.431-1.278.264-2.55-.173-3.694-.533-1.41-1.465-2.638-2.175-3.483-.796-1.005-1.576-1.957-1.56-3.368.026-2.152.236-6.133-3.544-6.139zm.529 3.405h.013c.213 0 .396.062.584.198.19.135.33.332.438.533.105.259.158.459.166.724 0-.02.006-.04.006-.06v.105a.086.086 0 01-.004-.021l-.004-.024a1.807 1.807 0 01-.15.706.953.953 0 01-.213.335.71.71 0 00-.088-.042c-.104-.045-.198-.064-.284-.133a1.312 1.312 0 00-.22-.066c.05-.06.146-.133.183-.198.053-.128.082-.264.088-.402v-.02a1.21 1.21 0 00-.061-.4c-.045-.134-.101-.2-.183-.333-.084-.066-.167-.132-.267-.132h-.016c-.093 0-.176.03-.262.132a.8.8 0 00-.205.334 1.18 1.18 0 00-.09.4v.019c.002.089.008.179.02.267-.193-.067-.438-.135-.607-.202a1.635 1.635 0 01-.018-.2v-.02a1.772 1.772 0 01.15-.768c.082-.22.232-.406.43-.533a.985.985 0 01.594-.2zm-2.962.059h.036c.142 0 .27.048.399.135.146.129.264.288.344.465.09.199.14.4.153.667v.004c.007.134.006.2-.002.266v.08c-.03.007-.056.018-.083.024-.152.055-.274.135-.393.2.012-.09.013-.18.003-.267v-.015c-.012-.133-.04-.2-.082-.333a.613.613 0 00-.166-.267.248.248 0 00-.183-.064h-.021c-.071.006-.13.04-.186.132a.552.552 0 00-.12.27.944.944 0 00-.023.33v.015c.012.135.037.2.08.334.046.134.098.2.166.268.01.009.02.018.034.024-.07.057-.117.07-.176.136a.304.304 0 01-.131.068 2.62 2.62 0 01-.275-.402 1.772 1.772 0 01-.155-.667 1.759 1.759 0 01.08-.668 1.43 1.43 0 01.283-.535c.128-.133.26-.2.418-.2zm1.37 1.706c.332 0 .733.065 1.216.399.293.2.523.269 1.052.468h.003c.255.136.405.266.478.399v-.131a.571.571 0 01.016.47c-.123.31-.516.643-1.063.842v.002c-.268.135-.501.333-.775.465-.276.135-.588.292-1.012.267a1.139 1.139 0 01-.448-.067 3.566 3.566 0 01-.322-.198c-.195-.135-.363-.332-.612-.465v-.005h-.005c-.4-.246-.616-.512-.686-.71-.07-.268-.005-.47.193-.6.224-.135.38-.271.483-.336.104-.074.143-.102.176-.131h.002v-.003c.169-.202.436-.47.839-.601.139-.036.294-.065.466-.065zm2.8 2.142c.358 1.417 1.196 3.475 1.735 4.473.286.534.855 1.659 1.102 3.024.156-.005.33.018.513.064.646-1.671-.546-3.467-1.089-3.966-.22-.2-.232-.335-.123-.335.59.534 1.365 1.572 1.646 2.757.13.535.16 1.104.021 1.67.067.028.135.06.205.067 1.032.534 1.413.938 1.23 1.537v-.043c-.06-.003-.12 0-.18 0h-.016c.151-.467-.182-.825-1.065-1.224-.915-.4-1.646-.336-1.77.465-.008.043-.013.066-.018.135-.068.023-.139.053-.209.064-.43.268-.662.669-.793 1.187-.13.533-.17 1.156-.205 1.869v.003c-.02.334-.17.838-.319 1.35-1.5 1.072-3.58 1.538-5.348.334a2.645 2.645 0 00-.402-.533 1.45 1.45 0 00-.275-.333c.182 0 .338-.03.465-.067a.615.615 0 00.314-.334c.108-.267 0-.697-.345-1.163-.345-.467-.931-.995-1.788-1.521-.63-.4-.986-.87-1.15-1.396-.165-.534-.143-1.085-.015-1.645.245-1.07.873-2.11 1.274-2.763.107-.065.037.135-.408.974-.396.751-1.14 2.497-.122 3.854a8.123 8.123 0 01.647-2.876c.564-1.278 1.743-3.504 1.836-5.268.048.036.217.135.289.202.218.133.38.333.59.465.21.201.477.335.876.335.039.003.075.006.11.006.412 0 .73-.134.997-.268.29-.134.52-.334.74-.4h.005c.467-.135.835-.402 1.044-.7zm2.185 8.958c.037.6.343 1.245.882 1.377.588.134 1.434-.333 1.791-.765l.211-.01c.315-.007.577.01.847.268l.003.003c.208.199.305.53.391.876.085.4.154.78.409 1.066.486.527.645.906.636 1.14l.003-.007v.018l-.003-.012c-.015.262-.185.396-.498.595-.63.401-1.746.712-2.457 1.57-.618.737-1.37 1.14-2.036 1.191-.664.053-1.237-.2-1.574-.898l-.005-.003c-.21-.4-.12-1.025.056-1.69.176-.668.428-1.344.463-1.897.037-.714.076-1.335.195-1.814.12-.465.308-.797.641-.984l.045-.022zm-10.814.049h.01c.053 0 .105.005.157.014.376.055.706.333 1.023.752l.91 1.664.003.003c.243.533.754 1.064 1.189 1.637.434.598.77 1.131.729 1.57v.006c-.057.744-.48 1.148-1.125 1.294-.645.135-1.52.002-2.395-.464-.968-.536-2.118-.469-2.857-.602-.369-.066-.61-.2-.723-.4-.11-.2-.113-.602.123-1.23v-.004l.002-.003c.117-.334.03-.752-.027-1.118-.055-.401-.083-.71.043-.94.16-.334.396-.4.69-.533.294-.135.64-.202.915-.47h.002v-.002c.256-.268.445-.601.668-.838.19-.201.38-.336.663-.336zm7.159-9.074c-.435.201-.945.535-1.488.535-.542 0-.97-.267-1.28-.466-.154-.134-.28-.268-.373-.335-.164-.134-.144-.333-.074-.333.109.016.129.134.199.2.096.066.215.2.36.333.292.2.68.467 1.167.467.485 0 1.053-.267 1.398-.466.195-.135.445-.334.648-.467.156-.136.149-.267.279-.267.128.016.034.134-.147.332a8.097 8.097 0 01-.69.468zm-1.082-1.583V5.64c-.006-.02.013-.042.029-.05.074-.043.18-.027.26.004.063 0 .16.067.15.135-.006.049-.085.066-.135.066-.055 0-.092-.043-.141-.068-.052-.018-.146-.008-.163-.065zm-.551 0c-.02.058-.113.049-.166.066-.047.025-.086.068-.14.068-.05 0-.13-.02-.136-.068-.01-.066.088-.133.15-.133.08-.031.184-.047.259-.005.019.009.036.03.03.05v.02h.003z'/%3E%3C/svg%3E"); }

.platform-name {
    font: 500 0.7rem/1 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.download-panel {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* The app section is the primary offer: centered, big button. */
.download-section-app {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.download-section-head h2 {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.download-section-head p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 1.5rem;
}

/* The CLI is a separate product; it sits in its own quieter card below the
   app, left-aligned and with outline buttons so it never competes with it. */
.download-section-cli {
    text-align: left;
    background: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    padding: 1.75rem 2rem 2rem;
}

.download-section-cli .download-section-head h2 {
    font-size: 1.25rem;
}

.download-section-cli .download-section-head p {
    margin: 0 0 1.25rem;
    max-width: none;
}

.download-section-cli .download-section-head a {
    color: var(--text-primary);
    font-weight: 500;
}

.download-eyebrow {
    display: inline-block;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.download-section-cli .download-version {
    margin-bottom: 1rem;
}

.download-section-cli .download-assets {
    justify-content: flex-start;
}

.download-section-cli .download-asset {
    align-items: flex-start;
}

.download-available {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.download-version {
    font: 400 0.8rem/1.4 var(--font-mono);
    color: var(--text-muted);
}

/* Download = receive: the trailing arrow points down. */
.download-button::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M6 13l6 6 6-6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M6 13l6 6 6-6'/%3E%3C/svg%3E");
}

.download-button {
    font-size: 0.9375rem;
    padding: 1rem 2rem;
}

/* Outlined secondary button (the ActionCard secondary treatment). */
.download-button-secondary,
.secondary-button {
    font-size: 0.8125rem;
    padding: 0.7rem 1.25rem;
    background-color: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-strong);
    box-shadow: none;
}

.download-button-secondary:hover,
.secondary-button:hover {
    filter: none;
    background-color: var(--surface-bg);
}

.download-tag {
    margin-left: 0.75rem;
}

.download-assets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.download-asset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.download-filename {
    font: 400 0.75rem/1.4 var(--font-mono);
    color: var(--text-primary);
    word-break: break-all;
}

.download-sha256 code {
    font: 400 0.75rem/1.4 var(--font-mono);
    color: var(--text-muted);
    cursor: help;
}

.download-unavailable p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 480px;
}

/* ── error pages (404.html, 500.html, ...) ────────────────────────────── */
.error-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 5rem var(--gutter) 7rem;
}

.error-eyebrow {
    display: block;
    color: var(--text-muted);
}

.error-page h1 {
    font-size: clamp(2.25rem, 5vw, 3rem);
    margin: 0.75rem 0 1.25rem;
}

.error-message {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root {
        --gutter: 2rem;
        --section-pad: 4rem;
    }

    nav { padding: 1rem var(--gutter); }
    .hero, .subpage-hero { min-height: auto; padding: 2.5rem var(--gutter) 3rem; }
    .hero-content, .subpage-hero-content { max-width: 100%; }
    .organic-bg { opacity: 0.3; }
    .use-case-grid { grid-template-columns: repeat(2, 1fr); }
    .advantage-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .steps-container { grid-template-columns: 1fr; }
    .steps-container-3 { grid-template-columns: 1fr; }
    .steps-arrow { justify-content: center; }
    .steps-arrow svg { transform: rotate(90deg); }
    .problem-grid { grid-template-columns: 1fr; }
    .problem-statement { font-size: 1.35rem; }
    .pullquote p { font-size: 1.2rem; }
    .differentiator-statement { font-size: 1.35rem; }
    .safety-warning { flex-direction: column; gap: 1rem; }
    .platform-tab { min-width: 80px; padding: 0.75rem 0.75rem; }
    .download-alpha-notice { flex-direction: column; gap: 0.75rem; }
    .download-section-cli { padding: 1.25rem 1.25rem 1.5rem; }
    footer { padding-top: 4rem; }
    .copyright { flex-direction: column; align-items: center; gap: 0.75rem; }

    /* Mobile nav */
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: var(--gutter);
        right: var(--gutter);
        background: var(--surface-card);
        border: 1px solid var(--border-hairline);
        border-radius: var(--radius-card);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.25rem 1rem;
    }

    .nav-links .nav-link {
        padding: 0.5rem 0;
        display: flex;
    }

    .nav-dropdown-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-dropdown-group .nav-link {
        padding: 0.5rem 0;
        display: flex;
    }

    .nav-dropdown {
        position: static;
        transform: none;
        padding-top: 0;
        display: block;
    }

    .nav-dropdown-menu {
        background: transparent;
        border: 0;
        border-left: 1px solid var(--border-divider);
        border-radius: 0;
        padding: 0 0 0.5rem 1rem;
        margin-bottom: 0.5rem;
        min-width: 0;
    }

    .nav-dropdown-link {
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }

    .nav-dropdown-link:hover {
        background-color: transparent;
    }

    .nav-link-has-dropdown::after {
        display: none;
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

    /* Animate hamburger to X */
    .nav-toggle:checked ~ .nav-hamburger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle:checked ~ .nav-hamburger span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle:checked ~ .nav-hamburger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (min-width: 901px) {
    /* Share the step columns and their gaps with the diagram below. */
    .connection-story {
        --traffic-link-width: clamp(7rem, 14vw, 11.25rem);
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr) var(--story-gap)) minmax(0, 1fr);
    }

    .connection-story > *,
    .traffic-diagram > * {
        grid-column: 1 / -1;
    }

    .connection-story-steps,
    .traffic-diagram,
    .traffic-route {
        grid-template-columns: subgrid;
        column-gap: 0;
    }

    .connection-story-steps li:nth-child(2) { grid-column: 3; }
    .connection-story-steps li:nth-child(3) { grid-column: 5; }

    .traffic-diagram {
        display: grid;
        padding-inline: 0;
    }

    .traffic-diagram figcaption {
        margin-inline: clamp(1rem, 3vw, 2.5rem);
    }

    .traffic-node {
        width: calc(100% + var(--story-gap) - var(--traffic-link-width) - 1.5rem);
        justify-self: center;
    }

    .traffic-link {
        width: var(--traffic-link-width);
        justify-self: center;
    }
}

@media (max-width: 900px) {
    .connection-story-steps {
        grid-template-columns: 1fr;
        row-gap: 1.75rem;
    }

    .connection-story-steps li {
        grid-row: auto;
        grid-template-rows: auto auto auto;
        gap: 0.75rem;
    }
}

@media (max-width: 760px) {
    .traffic-route {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        text-align: left;
    }

    .traffic-node {
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 1rem;
        row-gap: 0.25rem;
        align-items: center;
    }

    .traffic-node-icon {
        grid-row: 1 / span 2;
        width: 48px;
        height: 48px;
    }

    .traffic-node-icon svg.icon { width: 28px; height: 28px; }
    .traffic-node-name { padding-top: 0; font-size: 1.125rem; }

    .traffic-link {
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-rows: auto;
        column-gap: 1rem;
        min-height: 72px;
    }

    .traffic-link-lines {
        width: 72px;
        justify-self: center;
        transform: rotate(90deg);
    }
}

@media (max-width: 600px) {
    :root {
        --gutter: 1rem;
        --section-pad: 3rem;
    }

    .use-case-grid { grid-template-columns: 1fr; }
    .nav-links { left: var(--gutter); right: var(--gutter); }
}

/* Calm and short, and none at all when the reader asks for that. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
