/* ==========================================================================
   Maktap. — the site's design system
   ==========================================================================

   Rewritten 2026-08-31. The tokens and the three-state theme handling survive
   from the 2026-08-28 pass unchanged, because they were right; what changed is
   everything the visitor actually sees.

   Three rules this file follows, and the previous one did not:

   1. **One scale, used everywhere.** Type, spacing and radii come from the
      ramps below. The old stylesheet set font sizes and paddings ad hoc at
      every component, so nothing lined up with anything and the page read as a
      pile of unrelated boxes.

   2. **Nothing is loaded from a third party.** The faces are served from
      static/fonts (see backend/tools/make_web_fonts.py) and the icons are an
      inlined SVG sprite. The site used to make three render-blocking requests
      to two CDNs before first paint -- for a page that carries its own privacy
      policy.

   3. **Depth comes from the border, not the shadow.** Heavy drop shadows on
      every card are what made the old page feel like a template. Cards are flat
      with a hairline; shadow is reserved for things that genuinely float (the
      header, a dropdown, the hero device).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Typefaces, self-hosted
   -------------------------------------------------------------------------- */

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Poppins ships no Cyrillic and two pages carry Russian copy, so Montserrat is
   the fallback rather than a second display face. Declared after Poppins and
   listed second in --font-primary: the browser resolves it per glyph. */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
    color-scheme: light;

    /* --- Brand paint. Fixed values. These name a colour, not a role, and they
       do NOT change between themes. --- */
    --primary-lime: #BAFF66;
    --primary-lime-rgb: 186, 255, 102;
    --primary-lime-dark: #406900;   /* legible on light surfaces */
    --obsidian-dark: #111111;
    --neutral-white: #FFFFFF;
    --soft-grey-bg: #F4F5F7;
    --border-grey: #ECEEF1;

    /* --- Semantic tokens. These name a ROLE and they DO change between
       themes. All new CSS uses these; the brand names above survive only where
       the value is genuinely fixed paint. --- */
    --page-bg: #F4F5F7;
    --surface: #FFFFFF;
    --surface-muted: #F4F5F7;
    --border: #ECEEF1;
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #888888;
    --accent: var(--primary-lime-dark);
    --on-accent: #FFFFFF;

    /* A deliberately dark block -- the footer, the obsidian button -- in BOTH
       themes. The one place a fixed dark surface is the design. */
    --surface-inverse: #111111;
    --on-inverse: #FFFFFF;
    --on-inverse-muted: rgba(255, 255, 255, 0.7);

    --glass-bg: rgba(255, 255, 255, 0.82);

    --shadow-sm: 0 6px 18px rgba(17, 17, 17, 0.05);
    --shadow-md: 0 14px 34px rgba(17, 17, 17, 0.08);
    --shadow-lg: 0 28px 60px rgba(17, 17, 17, 0.12);

    --ok-bg: #EBFEEB;
    --ok-border: #C2F6C2;
    --ok-text: #1E6B1E;
    --err-bg: #FFEBEB;
    --err-border: #FFC2C2;
    --err-text: #6B1E1E;
    --err-accent: #D32F2F;
    --err-field-bg: #FFF8F8;

    /* Layout */
    --header-height: 76px;
    --max-width: 1180px;
    --gutter: clamp(20px, 5vw, 48px);

    /* One radius ramp. 24 is the app's card radius. */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;
    --r-pill: 999px;

    /* One spacing ramp, used for every gap and every section rhythm. */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --s-8: 64px;
    --s-9: 96px;
    --section-gap: clamp(64px, 9vw, 112px);

    /* One type ramp, fluid. Headings are tight and heavy; body is 1.65 so long
       Azerbaijani sentences stay readable. */
    --t-display: clamp(2.4rem, 1.4rem + 4.4vw, 4.4rem);
    --t-h1: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
    --t-h2: clamp(1.55rem, 1.2rem + 1.5vw, 2.25rem);
    --t-h3: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
    --t-body: 1rem;
    --t-small: 0.875rem;
    --t-tiny: 0.78rem;

    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --font-primary: 'Poppins', 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-secondary: var(--font-primary);
}

/* --- Dark theme ------------------------------------------------------------
   Three states, and all three have to be covered: an explicit choice stamps
   data-theme on <html>, and the default "system" setting stamps nothing, where
   only prefers-color-scheme separates light from dark. So the tokens are
   redefined twice -- once under the media query, guarded against an explicit
   light choice, and once under the explicit dark attribute, which has to win in
   both directions.

   Surfaces are not pure black. An OLED-black card on an OLED-black page has no
   edge, and every card in this design is defined by its edge -- the same
   reasoning as AppTheme.darkSurface in the app. */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --page-bg: #0E0E0E;
        --surface: #1A1A1A;
        --surface-muted: #242424;
        --border: #2C2C2C;
        --text-primary: #ECEEF1;
        --text-secondary: #A8ADB4;
        --text-muted: #7A7F86;
        --accent: var(--primary-lime);
        --on-accent: #111111;

        --surface-inverse: #000000;
        --on-inverse: #ECEEF1;
        --on-inverse-muted: rgba(236, 238, 241, 0.65);

        --glass-bg: rgba(20, 20, 20, 0.82);

        --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.5);
        --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.55);
        --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.6);

        --ok-bg: #12240F;
        --ok-border: #2F5B27;
        --ok-text: #A7E39B;
        --err-bg: #2A1414;
        --err-border: #5E2626;
        --err-text: #F0A9A9;
        --err-accent: #FF6B6B;
        --err-field-bg: #221010;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --page-bg: #0E0E0E;
    --surface: #1A1A1A;
    --surface-muted: #242424;
    --border: #2C2C2C;
    --text-primary: #ECEEF1;
    --text-secondary: #A8ADB4;
    --text-muted: #7A7F86;
    --accent: var(--primary-lime);
    --on-accent: #111111;

    --surface-inverse: #000000;
    --on-inverse: #ECEEF1;
    --on-inverse-muted: rgba(236, 238, 241, 0.65);

    --glass-bg: rgba(20, 20, 20, 0.82);

    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.6);

    --ok-bg: #12240F;
    --ok-border: #2F5B27;
    --ok-text: #A7E39B;
    --err-bg: #2A1414;
    --err-border: #5E2626;
    --err-text: #F0A9A9;
    --err-accent: #FF6B6B;
    --err-field-bg: #221010;
}

/* --------------------------------------------------------------------------
   Reset and base
   -------------------------------------------------------------------------- */

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

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

body {
    margin: 0;
    font-family: var(--font-primary);
    font-size: var(--t-body);
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

p { margin: 0; }

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

img, svg { max-width: 100%; }

/* Every interactive thing gets the same ring. `outline: none` with nothing in
   its place is how a keyboard user loses the page entirely. */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

.skip-link {
    position: absolute;
    left: var(--s-4);
    top: -100px;
    z-index: 200;
    padding: var(--s-3) var(--s-5);
    border-radius: var(--r-pill);
    background: var(--obsidian-dark);
    color: var(--neutral-white);
    font-weight: 600;
    transition: top 0.2s ease;
}
.skip-link:focus { top: var(--s-4); }

/* The icon set. One size, currentColor, optically aligned with the text. */
.icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    vertical-align: -0.2em;
    color: currentColor;
}
.icon-lg { width: 1.5em; height: 1.5em; }

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

.animate-fade-in,
.animate-fade-in-delayed,
.animate-slide-up,
.animate-slide-up-delayed,
.animate-scale-up {
    animation: enter 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.animate-slide-up { --enter-y: 16px; }
.animate-slide-up-delayed { --enter-y: 16px; animation-delay: 0.08s; }
.animate-fade-in-delayed { animation-delay: 0.16s; }
.animate-scale-up { --enter-scale: 0.97; animation-delay: 0.12s; }

@keyframes enter {
    from { opacity: 0; transform: translateY(var(--enter-y, 8px)) scale(var(--enter-scale, 1)); }
    to { opacity: 1; transform: none; }
}

/* Collapse the entrance rather than removing it: an element that never
   animates in must still end up visible. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

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

.glass-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: var(--s-5);
}

.brand-logo { display: inline-flex; align-items: center; margin-right: auto; }
.brand-logo-img { height: 34px; width: auto; display: block; }

/* The wordmark, in the version that can be seen. LG-01.

   The mark is black lettering on transparency, so on the dark theme's near
   black page it was black on black. Both files are in the markup and CSS picks
   one, which keeps it working with no JavaScript and through the three theme
   states the site has: an explicit choice stamps data-theme, and the default
   "system" stamps nothing, where only prefers-color-scheme separates them. */
.brand-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand-logo-light { display: none; }
    :root:not([data-theme="light"]) .brand-logo-dark { display: block; }
}
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--s-1);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-pill);
    font-size: var(--t-small);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}
.nav-link:hover { color: var(--text-primary); background: var(--surface-muted); }
.nav-link.active { color: var(--text-primary); font-weight: 600; }
.nav-link.active .icon { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: var(--s-2); }

/* Language and theme controls share one pill shape. */
.lang-btn,
.theme-toggle,
.mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 40px;
    padding: 0 var(--s-3);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--t-small);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.theme-toggle, .mobile-toggle { width: 40px; padding: 0; }
.lang-btn:hover, .theme-toggle:hover, .mobile-toggle:hover { border-color: var(--text-muted); }

.lang-selector { position: relative; }

.lang-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + var(--s-2));
    min-width: 160px;
    padding: var(--s-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: var(--transition-smooth);
}
.lang-dropdown.show { opacity: 1; visibility: visible; transform: none; }

.lang-option {
    display: block;
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-sm);
    font-size: var(--t-small);
    color: var(--text-secondary);
}
.lang-option:hover { background: var(--surface-muted); color: var(--text-primary); }
.lang-option.active { background: var(--surface-muted); color: var(--text-primary); font-weight: 600; }

.mobile-toggle { display: none; }

@media (max-width: 900px) {
    .mobile-toggle { display: inline-flex; }
    .nav-menu {
        position: absolute;
        left: var(--gutter);
        right: var(--gutter);
        top: calc(var(--header-height) - 6px);
        flex-direction: column;
        align-items: stretch;
        gap: var(--s-1);
        padding: var(--s-3);
        border: 1px solid var(--border);
        border-radius: var(--r-lg);
        background: var(--surface);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: var(--transition-smooth);
    }
    .nav-menu.show { opacity: 1; visibility: visible; transform: none; }
    .nav-link { padding: var(--s-3) var(--s-4); font-size: var(--t-body); }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.main-content { display: block; }

.page-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: clamp(48px, 7vw, 88px) var(--gutter) var(--section-gap);
}

.page-header { max-width: 60ch; margin-bottom: var(--s-7); }
.page-title { font-size: var(--t-h1); margin-bottom: var(--s-3); }
.page-subtitle { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); color: var(--text-secondary); }

/* A short lime rule under a page title, in place of the old full-width bar. */
.title-underline {
    display: block;
    width: 56px;
    height: 4px;
    margin-top: var(--s-4);
    border-radius: var(--r-pill);
    background: var(--primary-lime);
}

.section-header { max-width: 62ch; margin: 0 auto var(--s-7); text-align: center; }
.section-header h2 { font-size: var(--t-h2); margin-bottom: var(--s-3); }
.section-header p { color: var(--text-secondary); }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 50px;
    padding: 0 var(--s-6);
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-family: inherit;
    font-size: var(--t-small);
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }

/* Lime is the brand, so the primary button is lime in both themes and its text
   is obsidian in both -- fixed paint, deliberately not tokenised. */
.btn-primary { background: var(--primary-lime); color: var(--obsidian-dark); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(var(--primary-lime-rgb), 0.45); }

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--text-muted); }

.btn-obsidian { background: var(--obsidian-dark); color: var(--neutral-white); }
.btn-obsidian:hover { box-shadow: var(--shadow-md); }

.btn[disabled], .btn.disabled { opacity: 0.55; pointer-events: none; }

.btn-spinner { display: none; }
.btn.is-loading .btn-spinner { display: inline-flex; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero-section {
    position: relative;
    overflow: hidden;
    padding: clamp(56px, 8vw, 104px) 0 var(--section-gap);
}

/* One soft lime bloom behind the headline. The old page had a large radial
   gradient plus a second glow inside the visual, which together washed the
   whole viewport. */
.hero-glow {
    position: absolute;
    top: -220px;
    left: 50%;
    width: min(900px, 120vw);
    height: 620px;
    transform: translateX(-50%);
    background: radial-gradient(circle at 50% 50%, rgba(var(--primary-lime-rgb), 0.22), transparent 62%);
    pointer-events: none;
}

.hero-container {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(40px, 6vw, 80px);
}

.hero-content { min-width: 0; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-bottom: var(--s-5);
    padding: var(--s-2) var(--s-4);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    background: var(--surface);
    font-size: var(--t-tiny);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.hero-badge .icon { color: var(--accent); }

.hero-title {
    font-size: var(--t-display);
    font-weight: 700;
    letter-spacing: -0.035em;
    margin-bottom: var(--s-5);
    text-wrap: balance;
}

.hero-subtitle {
    max-width: 52ch;
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: var(--s-7);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* The device. Obsidian frame, lime accent, the app's own radii -- rather than
   the browser-chrome mock with red/yellow/green traffic lights that used to
   sit here, which looked like a desktop app screenshot for a phone product. */
.hero-visual { position: relative; display: flex; justify-content: center; min-width: 0; }

.visual-card-wrapper { position: relative; width: min(300px, 78vw); }

.visual-card { position: relative; }

.main-visual {
    padding: 12px;
    border-radius: 42px;
    background: var(--surface-inverse);
    box-shadow: var(--shadow-lg);
}

.visual-device-icon { display: none; }

.visual-app-mock {
    border-radius: 32px;
    background: #0E0E0E;
    overflow: hidden;
}

/* The notch, in place of three traffic-light dots. */
.mock-header {
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mock-header::after {
    content: "";
    width: 84px;
    height: 6px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.18);
}
.mock-header .dot { display: none; }

.mock-body { padding: 0 14px 18px; display: grid; gap: 10px; }

.mock-widget {
    padding: 14px;
    border-radius: 18px;
    background: #1A1A1A;
    color: #ECEEF1;
}
.mock-widget h3 { font-size: 0.95rem; color: inherit; }
.mock-widget h4 { font-size: 0.8rem; color: inherit; }
.mock-widget p { font-size: 0.72rem; color: rgba(236, 238, 241, 0.6); }

.mock-widget.lime-bg { background: var(--primary-lime); color: var(--obsidian-dark); }
.mock-widget.lime-bg p { color: rgba(17, 17, 17, 0.72); }

.widget-row { display: flex; align-items: center; gap: 10px; }
.avatar-placeholder {
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: var(--r-pill);
    background: rgba(var(--primary-lime-rgb), 0.25);
}


/* The phone, rebuilt. Backlog W-01: "it is not tall enough and looks
   detail-less". It was a 300px-wide frame holding two widgets, so the device
   read as a wide box rather than a phone, and there was nothing in it to look
   at. It is narrower, considerably taller, and shows a screen the app actually
   has -- a heading, a search field, a school card with a distance, two counts
   and a saved item -- with the bottom navigation bar the app is built around. */
.visual-card-wrapper { width: min(276px, 74vw); }

.visual-app-mock {
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.mock-body {
    padding: 4px 14px 14px;
    display: grid;
    gap: 10px;
    align-content: start;
    flex: 1;
}

.mock-eyebrow {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(236, 238, 241, 0.5);
}

.mock-title {
    margin: -4px 0 2px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ECEEF1;
}

.mock-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--r-md);
    background: #1A1A1A;
    color: rgba(236, 238, 241, 0.45);
    font-size: 0.7rem;
}
.mock-search .icon { width: 14px; height: 14px; flex: none; }

.mock-school { display: flex; align-items: center; gap: 10px; }

.mock-thumb {
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(var(--primary-lime-rgb), 0.35), rgba(var(--primary-lime-rgb), 0.08));
}

.mock-school-text { min-width: 0; }

.mock-chip {
    display: inline-block;
    margin-bottom: 3px;
    padding: 1px 7px;
    border-radius: var(--r-pill);
    background: var(--primary-lime);
    color: var(--obsidian-dark);
    font-size: 0.58rem;
    font-weight: 700;
}

.mock-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.mock-stat {
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: #1A1A1A;
    display: grid;
    gap: 1px;
}
.mock-stat strong { font-size: 0.95rem; color: var(--primary-lime); }
.mock-stat span { font-size: 0.6rem; color: rgba(236, 238, 241, 0.55); }

/* The bottom bar. Four tabs, because the app has four. */
.mock-nav {
    margin-top: auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 18px 16px;
    border-top: 1px solid rgba(236, 238, 241, 0.08);
}
/* The mock's tabs, which are real controls now. WB-02.

   They were four <span>s inside an aria-hidden bar: a picture of a navigation
   bar. They are buttons in a tablist, so they take focus, they say which one
   is selected, and the arrow keys move between them. */
.mock-nav-item {
    display: grid;
    place-items: center;
    width: 34px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: var(--r-pill);
    background: transparent;
    color: rgba(236, 238, 241, 0.42);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}
.mock-nav-item .icon { width: 16px; height: 16px; }
.mock-nav-item:hover { color: rgba(236, 238, 241, 0.8); }
.mock-nav-item.is-active {
    color: var(--obsidian-dark);
    background: var(--primary-lime);
}
.mock-nav-item:focus-visible {
    outline: 2px solid var(--primary-lime);
    outline-offset: 2px;
}

/* One panel at a time. `hidden` does the hiding; this only stops a
   `display: grid` from overriding it. */
.mock-screen { display: grid; gap: 10px; align-content: start; }
.mock-screen[hidden] { display: none; }

/* The map tab needs something map-shaped behind its pins, and a real tile
   would be a third-party request on a page that makes none. */
.mock-map {
    position: relative;
    height: 132px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 35%, rgba(186, 255, 102, 0.18), transparent 45%),
        repeating-linear-gradient(0deg, rgba(236, 238, 241, 0.06) 0 1px, transparent 1px 26px),
        repeating-linear-gradient(90deg, rgba(236, 238, 241, 0.06) 0 1px, transparent 1px 26px),
        rgba(236, 238, 241, 0.04);
    border: 1px solid rgba(236, 238, 241, 0.08);
}
.mock-pin {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(236, 238, 241, 0.35);
}
.mock-pin.pin-1 { top: 26%; left: 22%; }
.mock-pin.pin-2 { top: 62%; left: 44%; }
.mock-pin.pin-3 { top: 38%; left: 68%; }
.mock-pin.is-active {
    width: 14px;
    height: 14px;
    background: var(--primary-lime);
    box-shadow: 0 0 0 6px rgba(186, 255, 102, 0.18);
}

/* Visible to a screen reader, not to the eye. The tabs are icons; this is what
   names them. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* The two download buttons. Backlog W-02. */
.store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    margin-top: var(--s-5);
}

.store-button {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.store-button:hover { transform: translateY(-2px); border-color: var(--primary-lime); }
.store-button .icon { width: 20px; height: 20px; flex: none; }
/* The two store marks are filled, not stroked, so they need a little more room
   to read at the same optical weight as the outlined icons beside them. */
.store-button .store-icon { width: 22px; height: 22px; }
.store-button span { display: grid; line-height: 1.15; }
.store-button small { font-size: 0.6rem; color: var(--text-muted); }
.store-button strong { font-size: 0.85rem; font-weight: 700; }

/* In the footer they sit above the copyright line, centred with it. */
.glass-footer .store-buttons { justify-content: center; margin: 0 0 var(--s-5); }

@media (max-width: 720px) {
    .visual-app-mock { min-height: 460px; }
}

.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}
.floating-badge h4 { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.floating-badge p { font-size: var(--t-tiny); color: var(--text-muted); }
.badge-1 { top: 14%; left: -18%; }
.badge-2 { bottom: 12%; right: -16%; }
.lime-text { color: var(--accent); }

@media (max-width: 900px) {
    .hero-container { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .badge-1 { left: -6%; }
    .badge-2 { right: -4%; }
}
@media (max-width: 520px) {
    .floating-badge { display: none; }
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stats-section { padding: 0 0 var(--section-gap); }

.stats-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

/* One panel divided by hairlines, rather than four shadowed boxes. */
.stat-card {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-6) var(--s-5);
    background: var(--surface);
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: var(--r-md);
    background: var(--surface-muted);
    color: var(--accent);
}

.stat-info h3 {
    font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}
.stat-info p { font-size: var(--t-small); color: var(--text-muted); }

@media (max-width: 900px) { .stats-container { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stats-container { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.home-features {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter) var(--section-gap);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--s-5);
}

.feature-card {
    padding: var(--s-6);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    transition: var(--transition-smooth);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: var(--s-5);
    border-radius: var(--r-md);
    background: rgba(var(--primary-lime-rgb), 0.22);
    color: var(--primary-lime-dark);
}
:root[data-theme="dark"] .feature-icon,
.feature-icon { color: var(--primary-lime-dark); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .feature-icon { background: rgba(var(--primary-lime-rgb), 0.16); color: var(--primary-lime); }
}
:root[data-theme="dark"] .feature-icon { background: rgba(var(--primary-lime-rgb), 0.16); color: var(--primary-lime); }

.feature-card h3 { font-size: var(--t-h3); margin-bottom: var(--s-3); }
.feature-card p { color: var(--text-secondary); font-size: var(--t-small); }

/* --------------------------------------------------------------------------
   Call to action
   -------------------------------------------------------------------------- */

.cta-shortcuts {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter) var(--section-gap);
}

.cta-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-6);
    padding: clamp(32px, 5vw, 56px);
    border-radius: var(--r-xl);
}

/* Lime paint with obsidian text, in both themes. */
.cta-card.lime-bg { background: var(--primary-lime); color: var(--obsidian-dark); }
.cta-card.lime-bg h2 { color: var(--obsidian-dark); font-size: var(--t-h2); margin-bottom: var(--s-3); }
.cta-card.lime-bg p { color: rgba(17, 17, 17, 0.75); max-width: 52ch; }
.cta-content { min-width: 0; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

.about-content { min-width: 0; }

.about-visual-card,
.legal-sheet-card,
.empty-state-card,
.contact-form-card,
.contact-info-panel,
.info-item {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
}

.about-visual-card { padding: var(--s-6); display: grid; gap: var(--s-4); }
.brand-large-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--r-md);
    background: rgba(var(--primary-lime-rgb), 0.22);
    color: var(--primary-lime-dark);
}
.inner-visual-box, .inner-info-box {
    padding: var(--s-4);
    border-radius: var(--r-md);
    background: var(--surface-muted);
    font-size: var(--t-small);
    color: var(--text-secondary);
}

/* Long prose from the database. */
.text-rich, .legal-content { color: var(--text-secondary); }
.text-rich p, .legal-content p { margin-bottom: var(--s-4); }
.text-rich h2, .legal-content h2 { font-size: var(--t-h3); color: var(--text-primary); margin: var(--s-6) 0 var(--s-3); }
.text-rich a, .legal-content a { color: var(--accent); text-decoration: underline; }
.legal-sheet-card { padding: clamp(24px, 4vw, 48px); }
.legal-section { max-width: 74ch; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-accordion-list { display: grid; gap: var(--s-3); max-width: 78ch; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    overflow: hidden;
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-5);
    border: 0;
    background: none;
    font-family: inherit;
    font-size: var(--t-body);
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}
.faq-question { flex: 1; min-width: 0; }

.faq-icon-holder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: var(--r-sm);
    background: var(--surface-muted);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}
.faq-trigger[aria-expanded="true"] .faq-icon-holder {
    background: var(--primary-lime);
    color: var(--obsidian-dark);
    transform: rotate(45deg);
}

/* Height-driven rather than grid-driven, because main.js measures
   scrollHeight and writes max-height -- and re-measures on resize, which is the
   one thing a pure-CSS grid transition cannot do for content that reflows. */
.faq-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-content-inner { padding: 0 var(--s-5) var(--s-5); }
.faq-content-inner p { color: var(--text-secondary); font-size: var(--t-small); }

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

.contact-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: start;
}
@media (max-width: 900px) { .contact-wrapper { grid-template-columns: 1fr; } }

.contact-form-card, .contact-info-panel { padding: clamp(24px, 3.5vw, 40px); }
.panel-desc { color: var(--text-secondary); font-size: var(--t-small); margin-bottom: var(--s-5); }

.form-group { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.form-group label { font-size: var(--t-small); font-weight: 600; }
.form-group .required { color: var(--err-accent); }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-muted);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--t-body);
    transition: var(--transition-smooth);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); background: var(--surface); }

.error-msg { color: var(--err-accent); font-size: var(--t-tiny); }
.form-group input.error, .form-group textarea.error {
    border-color: var(--err-border);
    background: var(--err-field-bg);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    font-size: var(--t-small);
    color: var(--text-secondary);
}
.checkbox-container input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }

.btn-submit-form { width: 100%; }
.action-container { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.alert-container {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-5);
    margin-bottom: var(--s-5);
    border: 1px solid;
    border-radius: var(--r-md);
    font-size: var(--t-small);
}
.alert-container.ok { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-text); }
.alert-container.error { background: var(--err-bg); border-color: var(--err-border); color: var(--err-text); }

.info-details { display: grid; gap: var(--s-3); }
.info-item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); font-size: var(--t-small); }
.info-item .icon { color: var(--accent); }

/* --------------------------------------------------------------------------
   Delete-account page
   -------------------------------------------------------------------------- */

.steps-section { display: grid; gap: var(--s-4); max-width: 74ch; margin-bottom: var(--s-7); }
.email-request-section { display: grid; gap: var(--s-4); max-width: 74ch; }

.empty-state-card { padding: var(--s-6); display: grid; gap: var(--s-3); justify-items: start; }
.empty-icon { color: var(--text-muted); }

code, .code {
    padding: 2px 6px;
    border-radius: var(--r-sm);
    background: var(--surface-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
}

/* --------------------------------------------------------------------------
   Get-the-app page (deep links)
   -------------------------------------------------------------------------- */

.app-open-card {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    background: var(--surface);
    text-align: center;
    display: grid;
    gap: var(--s-5);
    justify-items: center;
}
.app-open-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--r-lg);
    background: var(--primary-lime);
    color: var(--obsidian-dark);
}
.app-open-target {
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md);
    background: var(--surface-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: var(--t-small);
    color: var(--text-secondary);
    word-break: break-all;
}

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

.glass-footer {
    background: var(--surface-inverse);
    color: var(--on-inverse);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--s-9) var(--gutter) var(--s-6);
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
    gap: clamp(32px, 6vw, 80px);
}
@media (max-width: 760px) { .footer-container { grid-template-columns: 1fr; } }

.footer-branding { display: grid; gap: var(--s-4); align-content: start; }
/* No filter: the footer uses the real dark artwork, so the swoosh stays
   lime instead of being flattened to white with the lettering. */
.footer-logo .brand-logo-img { height: 30px; }
.footer-tagline { color: var(--on-inverse-muted); font-size: var(--t-small); max-width: 42ch; }

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--s-6);
}
.links-group { display: grid; gap: var(--s-2); align-content: start; }
.links-group h4 {
    font-size: var(--t-tiny);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-inverse-muted);
    margin-bottom: var(--s-2);
}
.links-group a { color: var(--on-inverse); font-size: var(--t-small); opacity: 0.85; }
.links-group a:hover { opacity: 1; color: var(--primary-lime); }

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--s-5) var(--gutter) var(--s-7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--on-inverse-muted);
    font-size: var(--t-tiny);
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    justify-content: space-between;
}
