/* ================================================================ */
/*  VARIOglide — design system                                       */
/*  Light, instrument-like: white paper, sky-mist sections,          */
/*  logo blue as the single brand colour. Green/red only for         */
/*  climb/sink, as on a real vario.                                  */
/* ================================================================ */

:root {
    --paper: #FFFFFF;
    --mist: #EEF3F8;
    --mist-2: #E2EAF2;
    --ink: #12263A;
    --ink-2: #4A5D70;
    --line: #D7E0E9;
    --brand: #0B4FB0;
    --brand-ink: #083C88;
    --sky: #3AB0F0;
    --climb: #13985A;
    --sink: #D64545;
    --amber: #B7791F;

    --font: 'Archivo', 'Segoe UI', system-ui, sans-serif;

    --r-btn: 10px;
    --r-panel: 20px;
    --nav-height: 68px;
    --wrap: 1160px;

    /* legacy aliases used by styles.css / older markup */
    --primary: var(--brand);
    --primary-dark: var(--brand-ink);
    --primary-light: var(--sky);
    --text: var(--ink);
    --text-secondary: var(--ink-2);
    --divider: var(--line);
    --bg: var(--mist);
    --surface: var(--mist);
    --green: var(--climb);
    --red: var(--sink);
    --on-primary: #FFFFFF;
    --border-radius: var(--r-btn);
    --border-radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 16px); }

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a { color: var(--brand); }

:focus-visible {
    outline: 3px solid var(--sky);
    outline-offset: 3px;
    border-radius: 4px;
}

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

/* ================================================================ */
/*                            NAVBAR                                 */
/* ================================================================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.nav-inner {
    max-width: var(--wrap);
    width: 100%;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-brand img {
    height: 44px;
    width: auto;
}

.nav-brand span {
    font-size: 1.05rem;
    font-weight: 700;
    font-stretch: 112%;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin-right: auto;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--ink-2);
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.15s, background-color 0.15s;
    white-space: nowrap;
}

.nav-links a:hover { color: var(--ink); background: var(--mist); }

.nav-links a.active {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 var(--brand);
    border-radius: 0;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
    padding: 9px 16px;
    border-radius: var(--r-btn);
    transition: background-color 0.15s;
    white-space: nowrap;
}

.nav-cta:hover { background: var(--brand-ink); }

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

/* Mobile menu */
.nav-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(18, 38, 58, 0.35);
    z-index: 998;
}

.nav-mobile-overlay.open { display: block; }

.nav-mobile {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 86vw;
    height: 100%;
    background: var(--paper);
    z-index: 999;
    padding: 24px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
    box-shadow: -8px 0 32px rgba(18, 38, 58, 0.12);
    overflow-y: auto;
}

.nav-mobile.open { transform: none; visibility: visible; }

.nav-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.nav-mobile-header span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink-2);
}

.nav-mobile-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--ink-2);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.nav-mobile a {
    display: block;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.nav-mobile a:hover,
.nav-mobile a.active { color: var(--brand); }

.nav-mobile a.nav-mobile-buy {
    margin-top: 20px;
    border: none;
    text-align: center;
    color: #fff;
    background: var(--brand);
    border-radius: var(--r-btn);
    font-weight: 600;
}

/* Language toggle — compact segmented control */
.lang-toggle {
    display: flex;
    align-items: center;
    background: var(--mist);
    border-radius: 9px;
    padding: 3px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-2);
    padding: 5px 9px;
    border-radius: 7px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s, background-color 0.15s;
}

.lang-btn .lang-flag {
    width: 16px;
    height: 11px;
    border-radius: 2px;
}

.lang-btn.active {
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(18, 38, 58, 0.12);
}

.lang-btn:not(.active):hover { color: var(--ink); }

@media (max-width: 900px) {
    .nav-links, .nav-cta { display: none; }
    .nav-toggle { display: flex; }
    .lang-toggle { margin-left: auto; }
    .nav-inner { gap: 12px; padding: 0 18px; }
}

@media (max-width: 420px) {
    .nav-brand span { display: none; }
    .lang-btn .lang-flag { display: none; }
}

/* Screen-reader only */
.sr-only,
.seo-section {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================================================================ */
/*                      SHARED TYPE & BUTTONS                        */
/* ================================================================ */

.kicker {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand);
    margin-bottom: 14px;
}

.h-display {
    font-size: clamp(2.3rem, 5.2vw, 4rem);
    line-height: 1.04;
    font-weight: 800;
    font-stretch: 115%;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.h-section {
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
    line-height: 1.1;
    font-weight: 750;
    font-stretch: 112%;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 18px;
    max-width: 22ch;
}

.lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--ink-2);
    max-width: 52ch;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    padding: 14px 22px;
    border-radius: var(--r-btn);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }

.btn-light { background: #fff; color: var(--brand-ink); }
.btn-light:hover { background: var(--mist); }

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.text-link {
    font-weight: 600;
    color: var(--brand);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}

.text-link:hover { color: var(--brand-ink); }

/* ================================================================ */
/*                             HOMEPAGE                              */
/* ================================================================ */

/* --- Hero --- */

.hero {
    position: relative;
    background: linear-gradient(180deg, var(--paper) 0%, var(--mist) 100%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 40px;
    align-items: center;
    min-height: 600px;
    padding-top: 56px;
    padding-bottom: 32px;
}

.hero-copy .lead { margin: 22px 0 32px; }

.hero-buy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
}

.hero-note { font-size: 0.92rem; color: var(--ink-2); }

.hero-facts {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    gap: 0;
    margin-top: 40px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
}

.hero-facts div {
    padding-right: 22px;
    margin-right: 22px;
    border-right: 1px solid var(--line);
}

.hero-facts div:last-child { border-right: none; margin-right: 0; padding-right: 0; }

.hero-facts dt {
    font-size: 0.82rem;
    color: var(--ink-2);
}

.hero-facts dd {
    font-size: 1.15rem;
    font-weight: 700;
    font-stretch: 110%;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hero-visual {
    position: relative;
    align-self: stretch;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: -56px; /* lanyards run off the top edge */
}

.hero-visual img {
    width: 100%;
    max-width: 440px;
    height: auto;
    filter: drop-shadow(0 28px 32px rgba(18, 38, 58, 0.18));
}

/* --- Vario trace (signature element) --- */

.trace {
    position: relative;
    height: 132px;
    border-top: 1px solid var(--line);
    background: var(--mist);
}

.trace svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.trace .zero { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 5; opacity: 0.5; }
.trace .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.trace .line.up { stroke: var(--climb); }
.trace .line.down { stroke: var(--sink); }

.trace .line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: trace-draw 2.6s cubic-bezier(.4, 0, .2, 1) 0.3s forwards;
}

@keyframes trace-draw { to { stroke-dashoffset: 0; } }

/* Live cursor (js/trace.js): the line is revealed by the cursor instead */
.trace.is-live .line { animation: none; stroke-dashoffset: 0; }

.trace-cursor { transition: opacity .4s ease; }
.trace-cursor.is-hidden { opacity: 0; }
.trace-cursor .stem { stroke: var(--ink); stroke-width: 1; opacity: 0.12; vector-effect: non-scaling-stroke; }
.trace-cursor .dot { fill: var(--paper); stroke: var(--ink-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.trace-cursor[data-kind="up"] .dot { stroke: var(--climb); fill: var(--climb); }
.trace-cursor[data-kind="down"] .dot { stroke: var(--sink); fill: var(--sink); }

.trace-cursor .tag rect { fill: var(--paper); stroke: var(--line); vector-effect: non-scaling-stroke; }
.trace-cursor .tag text {
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    fill: var(--ink);
}
.trace-cursor[data-kind="up"] .tag text { fill: var(--climb); }
.trace-cursor[data-kind="down"] .tag text { fill: var(--sink); }

.trace .pulse {
    fill: none;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    transform-box: fill-box;
    transform-origin: center;
    animation: trace-pulse .9s ease-out forwards;
}
.trace .pulse.up { stroke: var(--climb); }
.trace .pulse.down { stroke: var(--sink); }

@keyframes trace-pulse {
    from { transform: scale(1); opacity: 0.7; }
    to   { transform: scale(4.5); opacity: 0; }
}

.trace-legend {
    position: absolute;
    left: 28px;
    top: 14px;
    display: flex;
    gap: 18px;
    font-size: 0.8rem;
    color: var(--ink-2);
    pointer-events: none;
}

.trace-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trace-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.trace-legend .up i { background: var(--climb); }
.trace-legend .down i { background: var(--sink); }

/* --- Section jump bar --- */

.jumpbar {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.jumpbar ul {
    list-style: none;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-top: 14px;
    padding-bottom: 14px;
    scrollbar-width: none;
}

.jumpbar ul::-webkit-scrollbar { display: none; }

.jumpbar a {
    display: inline-block;
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-2);
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: color 0.15s, border-color 0.15s;
}

.jumpbar a:hover { color: var(--brand); border-color: var(--brand); }

/* --- Feature blocks --- */

.feature { padding: 104px 0; }
.feature.tint { background: var(--mist); }

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.feature.flip .feature-media { order: 2; }

.feature-copy p { color: var(--ink-2); max-width: 54ch; margin-bottom: 22px; }

.ticks {
    list-style: none;
    margin: 0 0 28px;
    display: grid;
    gap: 12px;
}

.ticks li {
    position: relative;
    padding-left: 30px;
    max-width: 54ch;
}

.ticks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 16px;
    height: 9px;
    border-left: 2.5px solid var(--brand);
    border-bottom: 2.5px solid var(--brand);
    transform: rotate(-45deg);
}

.feature-media { display: flex; justify-content: center; }

/* Sound panel: what the pilot hears (values from firmware) */
.sound-panel {
    width: 100%;
    max-width: 480px;
    background: var(--mist);
    border-radius: var(--r-panel);
    padding: 32px 32px 28px;
}

.sound-panel figcaption { margin-bottom: 18px; }
.sound-panel figcaption strong { display: block; font-size: 1.15rem; font-weight: 700; }
.sound-panel figcaption span { font-size: 0.9rem; color: var(--ink-2); }

.sound-scale { list-style: none; border-top: 2px solid var(--ink); }

.sound-scale li {
    display: grid;
    grid-template-columns: 7.2em 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.sound-scale b {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sound-scale em {
    font-style: normal;
    font-size: 0.9rem;
    color: var(--ink-2);
    text-align: right;
    white-space: nowrap;
}

.beeps { display: flex; align-items: center; gap: 5px; min-height: 20px; }

.beeps i { display: block; border-radius: 3px; }
.up .beeps i { width: 6px; height: 20px; background: var(--climb); }
.down .beeps i { width: 11px; height: 9px; background: var(--sink); }

.quiet b, .quiet em { color: var(--ink-2); font-weight: 500; }
.quiet .beeps { border-top: 1px dashed var(--ink-2); min-height: 0; opacity: 0.5; }

.sound-note { margin-top: 16px; font-size: 0.88rem; color: var(--ink-2); }

.phone-shot {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 4 / 5;
    border-radius: var(--r-panel);
    background: var(--mist);
    overflow: hidden;
    display: flex;
    justify-content: center;
    padding-top: 48px;
}

.feature.tint .phone-shot { background: var(--paper); }

.phone-shot img { width: 58%; height: auto; align-self: flex-start; }

/* --- Specs --- */

.specs { padding: 104px 0; background: var(--mist); }

.specs-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 72px;
    align-items: start;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.spec-table th,
.spec-table td {
    text-align: left;
    vertical-align: top;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.spec-table th {
    width: 38%;
    font-weight: 500;
    color: var(--ink-2);
    padding-right: 20px;
}

.spec-table td {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.spec-table tr:first-child th,
.spec-table tr:first-child td { border-top: 1px solid var(--ink); }

.specs-side img {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 36px;
    filter: drop-shadow(0 20px 24px rgba(18, 38, 58, 0.14));
}

.box-list {
    background: var(--paper);
    border-radius: var(--r-panel);
    padding: 26px 28px;
}

.box-list + .box-list { margin-top: 14px; }

.box-list h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.box-list ul { list-style: none; display: grid; gap: 6px; color: var(--ink-2); }

.box-list li { display: flex; gap: 10px; }
.box-list li b { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 1.6em; }

/* --- Steps (real sequence) --- */

.steps { padding: 104px 0; background: var(--paper); }

.steps-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 44px;
}

.steps-head .h-section { margin-bottom: 0; max-width: none; }

.step-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    counter-reset: step;
    border-top: 2px solid var(--ink);
}

.step-list li {
    counter-increment: step;
    padding: 26px 24px 8px 0;
    position: relative;
}

.step-list li + li { padding-left: 24px; border-left: 1px solid var(--line); }

.step-list li::before {
    content: counter(step);
    display: block;
    font-size: 2.6rem;
    font-weight: 800;
    font-stretch: 115%;
    line-height: 1;
    color: var(--brand);
    margin-bottom: 18px;
    font-variant-numeric: tabular-nums;
}

.step-list h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.step-list p { color: var(--ink-2); font-size: 0.97rem; }

/* --- Buy band --- */

.buy { padding: 8px 0 104px; }

.buy-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px 56px;
    align-items: center;
    background: var(--brand);
    color: #fff;
    border-radius: 28px;
    padding: 56px 60px;
    position: relative;
    overflow: hidden;
}

.buy-panel .h-section { color: #fff; margin-bottom: 12px; }
.buy-panel p { color: rgba(255, 255, 255, 0.85); max-width: 52ch; }

.buy-panel .buy-terms {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 20px;
    font-size: 0.93rem;
    color: #fff;
}

.buy-panel .buy-terms li::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sky);
    margin-right: 9px;
    vertical-align: 2px;
}

.buy-action { display: flex; flex-direction: column; align-items: center; }

.buy-action .btn { width: 100%; }

/* ================================================================ */
/*                          SITE FOOTER                              */
/* ================================================================ */

.site-footer {
    margin-top: auto;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.72);
    padding: 64px 0 32px;
    font-size: 0.94rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 700;
    font-stretch: 112%;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.footer-brand img { height: 48px; width: auto; }

.footer-grid h4 {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-grid ul { list-style: none; display: grid; gap: 8px; }

.footer-grid a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer-grid a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.footer-note {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.55);
}

.footer-note p { max-width: 70ch; }

/* ================================================================ */
/*                       HOMEPAGE RESPONSIVE                         */
/* ================================================================ */

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; gap: 8px; }
    /* Show both devices whole: crop the lanyards at the top instead of the devices at the bottom */
    .hero-visual { order: -1; margin-top: -150px; }
    .hero-visual img { max-width: 300px; }
    .feature, .specs, .steps { padding: 72px 0; }
    .feature-grid, .specs-grid { grid-template-columns: 1fr; gap: 40px; }
    .feature.flip .feature-media { order: 0; }
    .step-list { grid-template-columns: 1fr 1fr; }
    .step-list li:nth-child(3) { padding-left: 0; border-left: none; }
    .step-list li:nth-child(n+3) { border-top: 1px solid var(--line); }
    .buy-panel { grid-template-columns: 1fr; padding: 40px 32px; }
    .buy-action { align-items: stretch; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .sound-panel { padding: 24px 20px 20px; }
    .sound-scale li { grid-template-columns: 6.4em 1fr auto; gap: 10px; }
    .up .beeps i { width: 5px; }
    .down .beeps i { width: 8px; }
    .beeps { gap: 4px; }
    .wrap { padding: 0 20px; }
    .hero-facts { grid-template-columns: 1fr 1fr; gap: 14px 0; }
    .hero-facts div:nth-child(2) { border-right: none; }
    .hero-buy .btn { flex: 1 1 100%; }
    .trace { height: 104px; }
    .trace-legend { left: 20px; }
    .step-list { grid-template-columns: 1fr; }
    .step-list li, .step-list li + li { padding: 22px 0 6px; border-left: none; }
    .step-list li + li { border-top: 1px solid var(--line); }
    .spec-table th { width: 44%; }
    .buy { padding: 0 0 56px; }
    .buy-panel { border-radius: 20px; padding: 32px 24px; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ================================================================ */
/*                       GUIDE PAGE                                  */
/* ================================================================ */

.guide-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 28px 80px;
    min-height: calc(100vh - var(--nav-height));
}

.guide-header {
    padding: 64px 0 36px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}

.guide-header img { display: none; }

.guide-header h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    font-stretch: 115%;
    letter-spacing: -0.025em;
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: 10px;
}

.guide-header .subtitle {
    font-size: 1.1rem;
    color: var(--ink-2);
}

.guide-section-divider {
    border: none;
    height: 0;
    margin: 64px 0 0;
}

.guide-wrapper h2 {
    font-size: 1.6rem;
    font-weight: 750;
    font-stretch: 110%;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 20px;
    padding-top: 18px;
    border-top: 2px solid var(--ink);
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.guide-wrapper h2 .num {
    color: var(--brand);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.guide-wrapper h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    margin: 32px 0 10px;
}

.guide-wrapper p { margin-bottom: 14px; max-width: 68ch; }

.guide-wrapper ul {
    list-style: none;
    padding: 0;
    margin-bottom: 18px;
}

.guide-wrapper ul li {
    padding: 5px 0 5px 22px;
    position: relative;
}

.guide-wrapper ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.95em;
    width: 7px;
    height: 7px;
    background: var(--brand);
    border-radius: 50%;
}

.guide-wrapper ol {
    list-style: none;
    padding: 0;
    margin-bottom: 18px;
    counter-reset: steps;
}

.guide-wrapper ol li {
    padding: 8px 0 8px 42px;
    position: relative;
    counter-increment: steps;
}

.guide-wrapper ol li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 7px;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--brand);
    color: var(--brand);
    border-radius: 50%;
    text-align: center;
    line-height: 25px;
    font-size: 0.85rem;
    font-weight: 700;
}

.guide-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 28px;
    font-size: 0.95rem;
}

.guide-wrapper thead th {
    text-align: left;
    font-weight: 600;
    color: var(--ink-2);
    padding: 10px 14px 10px 0;
    border-bottom: 2px solid var(--ink);
}

.guide-wrapper tbody td {
    padding: 12px 14px 12px 0;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.mockup { margin: 32px 0; }

.mockup img {
    max-width: 280px;
    width: 100%;
    margin: 0 auto;
    background: var(--mist);
    border-radius: var(--r-panel);
    padding: 24px 20px 0;
}

.mockup .caption {
    text-align: center;
    font-size: 0.88rem;
    color: var(--ink-2);
    margin-top: 12px;
}

.callout {
    background: var(--mist);
    border-left: 3px solid var(--brand);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 12px 12px 0;
    font-size: 0.97rem;
}

.callout.warning { border-left-color: var(--amber); background: #FBF5EA; }
.callout.success { border-left-color: var(--climb); background: #EAF6EF; }

.callout strong { color: var(--ink); }

.platform-note,
.guide-toc {
    background: var(--mist);
    border-radius: var(--r-panel);
    padding: 24px 28px;
    margin: 28px 0;
}

.platform-note { font-size: 0.95rem; color: var(--ink-2); }
.platform-note strong { color: var(--ink); }

.guide-toc h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
}

.guide-toc ol { margin: 0; }
.guide-toc li { padding-top: 6px; padding-bottom: 6px; }

.guide-toc a { color: var(--ink); text-decoration: none; }
.guide-toc a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.disclaimer {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 22px;
    margin: 24px 0;
    font-size: 0.9rem;
    color: var(--ink-2);
    line-height: 1.6;
}

.disclaimer strong { color: var(--ink); }

.guide-footer {
    padding: 32px 0 0;
    margin-top: 56px;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--ink-2);
}

@media (max-width: 600px) {
    .guide-wrapper { padding: 0 20px 56px; }
    .guide-wrapper h2 { font-size: 1.35rem; }
    .guide-wrapper table { font-size: 0.9rem; }
}

/* ================================================================ */
/*                     MOTION & PRINT                                */
/* ================================================================ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .trace .line { animation: none; stroke-dashoffset: 0; }
    .nav-mobile { transition: none; }
}

@media print {
    .site-nav, .nav-mobile, .nav-mobile-overlay, .site-footer, .jumpbar { display: none !important; }
    body { background: #fff; }
    .guide-wrapper { padding: 0; }
    .guide-header { padding: 20px 0 16px; }
    h2 { break-after: avoid; }
    .mockup img { max-width: 220px; }
    .callout, .disclaimer, table { break-inside: avoid; }
    .guide-section-divider { margin: 28px 0 0; }
}
