/* Talent Augmentation OS: Hosted App Styles
   Light theme: clean baseline with a single sage accent.
   Sage signals growth and trust without the urgency/alarm read of red.
   Cards sit on a near-white background and rely on borders for separation
   rather than heavy shadows. */

:root {
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --surface-2: #F7F5EE;
    --accent: #2D6A4F;
    --accent-hover: #235A40;
    --accent-soft: #E5F0E9;
    --text: #0F172A;
    --text-muted: #64748B;
    --success: #1B7A5A;
    --warning: #B45309;
    --danger: #B42318;
    --border: #E2E8F0;
    --border-strong: #CBD5E1;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);

    /* ── v2 marketing tokens (sage→teal, glass, motion) ── */
    --accent-2: #1B9C82;      /* teal-sage companion */
    --accent-3: #74C69D;      /* light sage */
    --accent-deep: #1B4332;   /* forest, for gradient depth */
    --warm: #D9B26A;          /* sparing warm highlight */
    --bg-tint: #F4F7F4;       /* faint sage-tinted marketing bg */
    --surface-3: #FBFAF6;     /* warm card */
    --glass: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.55);
    --ring: rgba(45, 106, 79, 0.18);
    --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.18);
    --shadow-glow: 0 18px 50px -12px rgba(45, 106, 79, 0.32);
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 0.6s;
    --maxw: 1120px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Container ──────────────────────────────────────────────────────────── */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    width: 100%;
}

/* ── Typography ─────────────────────────────────────────────────────────── */

h1 { font-size: 2rem; margin-bottom: 0.25rem; }
h2 { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--accent); }

.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.85rem; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */

.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}
.nav-brand:hover { text-decoration: none; }
.nav-brand-mark { width: 22px; height: 22px; display: block; }

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

.nav-link {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}
.nav-link:hover { color: var(--accent); text-decoration: none; }
.nav-link-muted { color: var(--text-muted); }

.nav-user {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
}

.footer-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ── Card ───────────────────────────────────────────────────────────────── */

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

.card-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; }

.btn-google {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-sm);
    padding: 0.85rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 2rem;
    width: 100%;
    max-width: 320px;
}
.btn-google:hover { background: var(--surface-2); text-decoration: none; }

.btn-export {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
}
.btn-export:hover { border-color: var(--accent); text-decoration: none; }

.export-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent-soft);
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.export-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ── Hidden ──────────────────────────────────────────────────────────────── */

.hidden { display: none !important; }

/* ── Progress bar ───────────────────────────────────────────────────────── */

.progress-bar {
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    margin: 1rem 0 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ── Login page ─────────────────────────────────────────────────────────── */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.login-card {
    text-align: center;
    max-width: 480px;
    padding: 3rem 2rem;
}

.login-title {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.login-features {
    text-align: left;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
}

.feature-icon {
    color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
}

.feature-item p { margin-top: 0.15rem; font-size: 0.85rem; }

.login-note {
    font-size: 0.8rem;
    margin-top: 1.5rem;
}

/* ── Score cards ─────────────────────────────────────────────────────────── */

.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.score-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.score-card-primary {
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    border-color: var(--accent);
}

.score-big {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.score-danger { color: var(--danger); }
.score-warning { color: var(--warning); }
.score-success { color: var(--success); }

.score-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.score-sublabel {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ── Dashboard ──────────────────────────────────────────────────────────── */

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.dash-actions {
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}

/* ── Expertise ──────────────────────────────────────────────────────────── */

.expertise-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.expertise-row {
    display: grid;
    grid-template-columns: 1fr 120px 40px 80px;
    align-items: center;
    gap: 0.75rem;
}

.expertise-domain {
    font-weight: 500;
    font-size: 0.9rem;
}

.expertise-bar-track {
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
}

.expertise-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s;
}

.expertise-rating {
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.expertise-label {
    font-size: 0.75rem;
}

/* ── Skill Compass ──────────────────────────────────────────────────────── */

.compass-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
}

.compass-chart-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.compass-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 700px) {
    .compass-layout {
        grid-template-columns: 1fr;
    }
    .compass-chart-wrapper {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* ── Task Triage Grid ───────────────────────────────────────────────────── */

.triage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.triage-card {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.triage-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.triage-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.triage-automate { border-left: 3px solid var(--success); }
.triage-coach { border-left: 3px solid var(--warning); }
.triage-info { border-left: 3px solid var(--accent); }

.triage-list {
    list-style: none;
    padding: 0;
    margin-top: 0.5rem;
}

.triage-list li {
    font-size: 0.85rem;
    padding: 0.2rem 0;
    color: var(--text);
}

.triage-list li::before {
    content: "→ ";
    color: var(--text-muted);
}

.triage-settings li::before {
    content: "";
}

.dash-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    vertical-align: middle;
}

.badge-info {
    background: var(--accent-soft);
    color: var(--text);
}

/* ── Version table ──────────────────────────────────────────────────────── */

.version-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.version-table th {
    text-align: left;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
}

.version-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

/* ── Chat (Assessment) ──────────────────────────────────────────────────── */

.assess-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    max-height: 800px;
}

.assess-header {
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-msg {
    max-width: 80%;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.chat-msg-user {
    align-self: flex-end;
    background: var(--accent-soft);
    color: var(--text);
    border-bottom-right-radius: 4px;
}

.chat-msg-ai {
    align-self: flex-start;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-msg-ai p { margin-bottom: 0.5rem; }
.chat-msg-ai p:last-child { margin-bottom: 0; }

.chat-input-area {
    flex-shrink: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* U14: a visible keyboard-focus indicator everywhere. The old rules removed
   the outline with only a 1px border-color change as the cue. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: #fff;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
}

.chat-send-btn {
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
}

.chat-typing {
    align-self: flex-start;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.assess-complete-area {
    margin-top: 1rem;
}

/* ── Check-in ───────────────────────────────────────────────────────────── */

.checkin-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 3rem;
}

.checkin-card {
    max-width: 600px;
    width: 100%;
}

.checkin-title {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.checkin-intro {
    margin-bottom: 2rem;
    line-height: 1.5;
}

.checkin-question {
    margin-bottom: 1.25rem;
}

.question-text {
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.checkin-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.checkin-option {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}
.checkin-option:hover { background: var(--surface-2); }

.checkin-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--accent);
}

.checkin-textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

.checkin-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.checkin-done {
    text-align: center;
    padding: 2rem;
}

/* ── Flash ──────────────────────────────────────────────────────────────── */

.flash-messages { margin-bottom: 1rem; }

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--warning);
    color: var(--warning);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Variants (U9): the base .flash reads as a warning, which made every
   success confirmation ("Subscription confirmed") look like a problem.
   Positive and error messages get their own tone. */
.flash-success {
    border-color: var(--accent);
    color: var(--accent);
}

.flash-error {
    border-color: var(--danger);
    color: var(--danger);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .container { padding: 1rem; }
    h1 { font-size: 1.5rem; }
    .dash-header { flex-direction: column; gap: 1rem; }
    .expertise-row { grid-template-columns: 1fr 80px 30px 60px; gap: 0.5rem; }
    .chat-msg { max-width: 90%; }
    .nav-links { gap: 0.75rem; font-size: 0.85rem; }
    .score-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════════════════════════════════
   v2 MARKETING LAYER — landing / pricing / reveal "soul"
   Scoped to body.marketing so the signed-in console stays calm.
   ════════════════════════════════════════════════════════════════════════ */

@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;
    }
}

html { scroll-behavior: smooth; }

body.marketing {
    background:
        radial-gradient(1200px 600px at 80% -10%, var(--accent-soft), transparent 60%),
        radial-gradient(900px 500px at -10% 8%, #EAF3EE, transparent 55%),
        var(--bg);
}

/* Texture + cursor motifs — only visible on marketing pages */
.grain-overlay, .cursor-glow { display: none; }

body.marketing .grain-overlay {
    display: block;
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    opacity: 0.45; mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

body.marketing .cursor-glow.is-on {
    display: block;
    position: fixed; top: 0; left: 0; z-index: 0; pointer-events: none;
    width: 420px; height: 420px; border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 106, 79, 0.12), transparent 65%);
    filter: blur(8px); will-change: transform;
}

/* Marketing pages run full-bleed sections; neutralise the base container */
body.marketing main.container { max-width: none; padding: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; width: 100%; }

/* Scroll reveal. The hidden state only applies when scripting is available:
   without this guard, a blocked or failed motion.js left every [data-reveal]
   section invisible forever (blank page below the hero). Browsers too old
   for the media query simply skip the animation — content always wins. */
@media (scripting: enabled) {
    [data-reveal] {
        opacity: 0; transform: translateY(10px);
        transition: opacity 0.34s var(--ease-out), transform 0.34s var(--ease-out);
        will-change: opacity, transform;
    }
    /* Drop the compositor hint once the element has landed. Leaving will-change
       on every section permanently promotes each to its own layer for the whole
       page lifetime. */
    [data-reveal].is-visible { opacity: 1; transform: none; will-change: auto; }
}

/* ── Site nav ── */
.site-nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(140%) blur(12px);
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.site-nav.is-scrolled {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--text); font-size: 1.02rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; display: block; }
.nav-menu { display: flex; align-items: center; gap: 1.6rem; }
.nav-menu a.nav-item { color: var(--text-muted); font-weight: 500; font-size: 0.92rem; }
.nav-menu a.nav-item:hover { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

/* ── Buttons (marketing scale) ── */
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1rem; border-radius: var(--radius-pill); }
.btn-primary.btn-lg { box-shadow: var(--shadow-glow); }
.btn-primary.btn-lg:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

.pill {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.35rem 0.8rem; border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent);
    font-size: 0.8rem; font-weight: 600;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ── Hero ── */
.hero { position: relative; overflow: hidden; padding: 5.5rem 0 4rem; }
.hero-mesh {
    position: absolute; inset: -10% -5% auto -5%; height: 120%; width: 110%;
    z-index: -1; opacity: 0.9; filter: blur(10px) saturate(115%);
    -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 55%, transparent 100%);
    mask-image: radial-gradient(120% 100% at 50% 0%, #000 55%, transparent 100%);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; }
.hero h1 {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05;
    letter-spacing: -0.02em; margin: 1.1rem 0 0; color: var(--text);
}
.hero h1 .accent { color: var(--accent); }
.hero-sub { font-size: 1.12rem; color: var(--text-muted); margin: 1.1rem 0 0; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.hero-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 1rem; }
.hero-visual { position: relative; }
.glass-card {
    background: var(--glass); border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); padding: 1.4rem;
}
.float { animation: float 7s var(--ease) infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ── Stat band ── */
.stat-band {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
    padding: 1.8rem; margin-top: 2.5rem;
    background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.stat { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; }
.stat-cite { font-size: 0.72rem; color: var(--text-muted); opacity: 0.75; margin-top: 0.2rem; }

/* ── Sections ── */
.section { padding: 4.5rem 0; position: relative; }
.section-head { max-width: 640px; margin: 0 auto 2.6rem; text-align: center; }
.section-eyebrow { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 3.5vw, 2.5rem); letter-spacing: -0.015em; margin-top: 0.5rem; color: var(--text); }
.section-sub { color: var(--text-muted); font-size: 1.05rem; margin-top: 0.7rem; }
.section-tint { background: var(--bg-tint); }

/* ── How it works ── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.8rem; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: white; background: linear-gradient(135deg, var(--accent-3), var(--accent)); margin-bottom: 1rem; }
.step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; color: var(--text); }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* ── Tabbed install ── */
.tabs { max-width: 760px; margin: 0 auto; }
.tab-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-bottom: 1.2rem; }
.tab-btn { padding: 0.5rem 1rem; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-weight: 600; font-size: 0.88rem; cursor: pointer; transition: 0.2s; }
.tab-btn.is-active { background: var(--accent); color: white; border-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade 0.4s var(--ease-out); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.code-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #0F1B16; color: #DCEFE6; border-radius: var(--radius); padding: 0.9rem 1.1rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86rem; overflow-x: auto; }
.code-line code { white-space: nowrap; }
.copy-btn { flex-shrink: 0; background: rgba(255, 255, 255, 0.1); color: #DCEFE6; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--radius-sm); padding: 0.35rem 0.7rem; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.2); }
.copy-btn.is-copied { background: var(--accent); border-color: var(--accent); color: white; }
.tab-steps { margin-top: 1rem; color: var(--text-muted); font-size: 0.92rem; padding-left: 1.1rem; }
.tab-steps li { margin: 0.3rem 0; }

/* ── Reveal teaser ── */
.reveal-preview { position: relative; max-width: 760px; margin: 0 auto; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.reveal-preview .locked { filter: blur(7px); opacity: 0.85; user-select: none; pointer-events: none; }
.reveal-lock { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 5%, transparent), color-mix(in srgb, var(--bg) 82%, transparent)); }
.reveal-lock .lock-inner { background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(8px); border-radius: var(--radius-lg); padding: 1.6rem 1.8rem; box-shadow: var(--shadow-md); }

/* ── Two audiences ── */
.audiences { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.aud-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.aud-card.is-enterprise { background: linear-gradient(160deg, var(--accent-deep), #143026); color: #E7F2EC; border: none; }
.aud-card.is-enterprise h3 { color: #fff; }
.aud-card h3 { font-family: var(--font-display); font-size: 1.5rem; margin: 0.4rem 0 0.8rem; color: var(--text); }
.aud-feat { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.4rem 0; font-size: 0.95rem; color: var(--text-muted); }
.aud-card.is-enterprise .aud-feat { color: #C7DCD2; }
.aud-feat svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.aud-card.is-enterprise .aud-feat svg { color: var(--accent-3); }

/* ── Testimonials ── */
.carousel { max-width: 720px; margin: 0 auto; overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.6s var(--ease); }
.carousel-slide { min-width: 100%; padding: 0.5rem; }
.quote { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; text-align: center; }
.quote-text { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.45; color: var(--text); }
.quote-meta { color: var(--text-muted); font-size: 0.88rem; margin-top: 1rem; }
.carousel-dots { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1.2rem; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--border-strong); cursor: pointer; padding: 0; transition: 0.2s; }
.carousel-dot.is-active { background: var(--accent); width: 22px; border-radius: 4px; }

/* ── FAQ ── */
.faq { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { cursor: pointer; padding: 1.1rem 0.2rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 400; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0.2rem 1.1rem; color: var(--text-muted); }

/* ── CTA band ── */
.cta-band { text-align: center; padding: 4rem 2rem; border-radius: var(--radius-xl); background: linear-gradient(160deg, var(--accent), var(--accent-deep)); color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.cta-band h2 { font-family: var(--font-display); color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin: 0.7rem auto 1.6rem; max-width: 44ch; }
.cta-band .btn-primary { background: #fff; color: var(--accent-deep); }
.cta-band .btn-primary:hover { background: #F0F7F3; }

/* ── Marketing responsive ── */
@media (max-width: 860px) {
    .hero-inner, .audiences { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .steps { grid-template-columns: 1fr; }
    .nav-menu {
        position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
        background: color-mix(in srgb, var(--bg) 97%, transparent); backdrop-filter: blur(12px);
        padding: 1rem 1.5rem 1.5rem; gap: 0.4rem; border-bottom: 1px solid var(--border);
        transform: translateY(-130%); transition: transform 0.3s var(--ease); box-shadow: var(--shadow-md);
    }
    body.nav-open .nav-menu { transform: none; }
    .nav-menu a.nav-item { padding: 0.6rem 0; }
    .nav-toggle { display: block; }
    .stat-band { grid-template-columns: 1fr; }
}

/* ── Trial countdown banner (dashboard) ── */
.trial-banner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    background: var(--accent-soft); border: 1px solid var(--accent);
    border-radius: var(--radius); padding: 0.75rem 1.1rem; margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

/* ── Pricing ── */
.billing-toggle {
    display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 1.3rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-pill); padding: 0.25rem;
}
.billing-toggle button {
    border: none; background: transparent; padding: 0.45rem 1.1rem;
    border-radius: var(--radius-pill); font-weight: 600; font-size: 0.86rem;
    color: var(--text-muted); cursor: pointer; font-family: inherit;
}
.billing-toggle button.is-active { background: var(--accent); color: #fff; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: start; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem 1.6rem; display: flex; flex-direction: column; }
.price-card.is-featured { border: 2px solid var(--accent); box-shadow: var(--shadow-glow); }
.price-card .pill { align-self: flex-start; margin-bottom: 0.6rem; }
.price-card h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 0.4rem; }
.price { display: flex; align-items: baseline; gap: 0.4rem; margin: 0.4rem 0 0.2rem; }
.price-amt { font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; color: var(--text); line-height: 1; }
.price-per { color: var(--text-muted); font-size: 0.9rem; }
.price-note { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.1rem; min-height: 1.2em; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 1.5rem; flex: 1; }
.price-card li { padding: 0.4rem 0 0.4rem 1.6rem; position: relative; font-size: 0.92rem; color: var(--text-muted); }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
@media (max-width: 860px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ── Hero background media (generated image + video) ── */
.hero { isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg-img, .hero-bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Light, even scrim: image stays visible behind ALL hero content, with just
   enough lift on the left for the headline and a soft blend into the next
   section at the very bottom. */
.hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.80) 0%, rgba(255, 255, 255, 0.40) 42%, rgba(255, 255, 255, 0.05) 72%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, 0) 84%, var(--bg) 100%);
}
.hero > .wrap { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-bg-video { display: none; } }
@media (max-width: 640px) { .hero-bg-video { display: none; } }

/* ── Centered hero (no side card) ── */
.hero-centered { padding: 6.5rem 0 4rem; }
.hero-centered .hero-inner { display: block; max-width: 800px; margin: 0 auto; text-align: center; }
.hero-centered .hero-sub { margin-left: auto; margin-right: auto; max-width: 56ch; }
.hero-centered .hero-cta { justify-content: center; }

/* ── Computed hero background: soft sage blobs + halftone dot clouds.
     No image or video assets; everything is CSS so it weighs nothing,
     adapts to any viewport, and stays exactly on-palette. ── */
.hero-bg-computed {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
    /* Blob positions = base point + autonomous drift (--oxN/--oyN, set from
       one rAF loop) + a light cursor parallax (--mx/--my). Layers move at
       different rates so the field reads as depth, like the old motif video. */
    background:
        radial-gradient(42% 36% at calc(16% + var(--ox1, 0%) + (var(--mx, 0.5) - 0.5) * 7%) calc(26% + var(--oy1, 0%) + (var(--my, 0.35) - 0.35) * 6%), rgba(45, 106, 79, 0.14), transparent 70%),
        radial-gradient(38% 32% at calc(80% + var(--ox2, 0%) - (var(--mx, 0.5) - 0.5) * 5%) calc(18% + var(--oy2, 0%) + (var(--my, 0.35) - 0.35) * 4%), rgba(27, 156, 130, 0.10), transparent 70%),
        radial-gradient(30% 28% at calc(62% + var(--ox3, 0%) + (var(--mx, 0.5) - 0.5) * 4%) calc(70% + var(--oy3, 0%) - (var(--my, 0.35) - 0.35) * 5%), rgba(45, 106, 79, 0.09), transparent 70%),
        radial-gradient(26% 24% at calc(32% + var(--ox4, 0%) - (var(--mx, 0.5) - 0.5) * 6%) calc(82% + var(--oy4, 0%) - (var(--my, 0.35) - 0.35) * 4%), rgba(116, 198, 157, 0.10), transparent 70%),
        var(--bg);
}
/* Cursor-following glow: sits under the dots and scrim, brightens with
   pointer speed (--mv) for the colour response, teal so it reads as light
   moving through the sage field rather than more of the same green. */
.hero-glow {
    position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(
        26% 22% at calc(var(--mx, 0.5) * 100%) calc(var(--my, 0.35) * 100%),
        rgb(27 156 130 / calc(0.10 + var(--mv, 0) * 0.16)),
        transparent 70%);
}
.hero-bg-computed::before {
    content: ""; position: absolute; inset: -15%;
    background-image:
        radial-gradient(rgba(45, 106, 79, 0.30) 1.1px, transparent 1.7px),
        radial-gradient(rgba(45, 106, 79, 0.18) 1.1px, transparent 1.7px);
    background-size: 13px 13px, 21px 21px;
    background-position: 0 0, 6px 10px;
    -webkit-mask-image:
        radial-gradient(44% 38% at 20% 28%, #000 0%, transparent 72%),
        radial-gradient(40% 34% at 78% 20%, #000 0%, transparent 72%),
        radial-gradient(34% 30% at 60% 72%, #000 0%, transparent 72%);
    mask-image:
        radial-gradient(44% 38% at 20% 28%, #000 0%, transparent 72%),
        radial-gradient(40% 34% at 78% 20%, #000 0%, transparent 72%),
        radial-gradient(34% 30% at 60% 72%, #000 0%, transparent 72%);
    animation: hero-drift 45s var(--ease, ease) infinite alternate;
}
.hero-bg-computed::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--bg) 42%, transparent) 0%,
        color-mix(in srgb, var(--bg) 10%, transparent) 30%,
        color-mix(in srgb, var(--bg) 10%, transparent) 72%,
        var(--bg) 100%);
}
@keyframes hero-drift {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(2%, 1.4%, 0); }
}
@media (prefers-reduced-motion: reduce) { .hero-bg-computed::before { animation: none; } }

/* ── Step media (generated motifs): small corner accent, not a banner ── */
.step { position: relative; }
.step-media {
    position: absolute; top: 1.2rem; right: 1.2rem;
    width: 52px; height: 52px; object-fit: cover;
    border-radius: 14px; opacity: 0.95; box-shadow: var(--shadow-sm);
}

/* ── Animated product tour ── */
.tour { max-width: 720px; margin: 0 auto; }
.tour-device { background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(14px); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 0.9rem; }
.tour-bar { display: flex; gap: 6px; padding: 0.2rem 0.4rem 0.7rem; }
.tour-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.tour-screen { position: relative; height: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.tour-stage { position: absolute; inset: 0; padding: 1.25rem; opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); pointer-events: none; display: flex; flex-direction: column; gap: 0.7rem; }
.tour-stage.is-active { opacity: 1; transform: none; pointer-events: auto; }
.tour-tag { align-self: flex-start; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); background: var(--accent-soft); padding: 0.25rem 0.6rem; border-radius: var(--radius-pill); }
.tour-chat { display: flex; flex-direction: column; gap: 0.5rem; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.tour-chat::-webkit-scrollbar { display: none; }
.tour-bubble { max-width: 85%; padding: 0.6rem 0.85rem; border-radius: 14px; font-size: 0.9rem; line-height: 1.4; opacity: 0; transform: translateY(6px); transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out); }
.tour-bubble.show { opacity: 1; transform: none; }
.tour-bubble.hide { display: none; }
.tour-bubble.ai { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 4px; }
.tour-bubble.user { align-self: flex-end; background: var(--accent-soft); color: var(--text); border-bottom-right-radius: 4px; }
.tour-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.tour-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.7rem; text-align: center; }
.tour-card b { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--accent); }
.tour-card span { font-size: 0.72rem; color: var(--text-muted); }
.tour-compass { width: 150px; align-self: center; margin-top: auto; }
.tour-result { display: flex; flex-direction: column; gap: 0.9rem; justify-content: center; height: 100%; }
.tour-metric { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 0.8rem; }
.tour-metric span { font-size: 0.85rem; color: var(--text-muted); }
.tour-track { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.tour-track i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, var(--accent-3), var(--accent)); }
.tour-stage.is-active .tour-track i { animation: growBar 1.1s var(--ease-out) forwards; }
@keyframes growBar { to { width: var(--h); } }
.tour-result-note { font-size: 0.85rem; color: var(--text-muted); }
.tour-steps { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1.2rem; flex-wrap: wrap; }
.tour-dot { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 0.8rem; font-weight: 600; padding: 0.4rem 0.9rem; border-radius: var(--radius-pill); cursor: pointer; }
.tour-dot.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 640px) {
    .tour-screen { height: 400px; }
    .tour-pf-row { grid-template-columns: 1fr 44px 68px; gap: 0.4rem; }
    .pf-dom { font-size: 0.78rem; }
    .tour-bubble { font-size: 0.85rem; max-width: 90%; }
}

/* tour: profile snapshot */
.tour-profile { display: flex; flex-direction: column; gap: 0.9rem; }
.tour-pf-head { display: flex; align-items: center; gap: 0.7rem; }
.tour-pf-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-3), var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.tour-pf-id { flex: 1; line-height: 1.2; }
.tour-pf-id b { display: block; font-size: 0.95rem; }
.tour-pf-id span { font-size: 0.78rem; color: var(--text-muted); }
.tour-pf-score { text-align: center; }
.tour-pf-score b { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); line-height: 1; display: block; }
.tour-pf-score span { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.tour-pf-rows { display: flex; flex-direction: column; gap: 0.55rem; }
.tour-pf-row { display: grid; grid-template-columns: 1fr 64px 78px; align-items: center; gap: 0.6rem; }
.pf-dom { font-size: 0.82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.pf-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); }
.tour-stage.is-active .pf-bar i { animation: growW 1s var(--ease-out) forwards; }
@keyframes growW { to { width: var(--w); } }
.pf-mode { display: block; font-style: normal; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.2rem 0; border-radius: var(--radius-pill); text-align: center; }
.m-coach { background: #FBEEDC; color: var(--warning); }
.m-augment { background: var(--accent-soft); color: var(--accent); }
.m-automate { background: #DCEFE4; color: var(--success); }
.m-protect { background: #E7ECF3; color: #3B5572; }

/* tour: result line chart */
.tour-result { display: flex; flex-direction: column; gap: 0.5rem; justify-content: center; height: 100%; }
.tour-chart { width: 100%; height: auto; display: block; }
.tour-axis { stroke: var(--border); stroke-width: 1; }
.tour-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 340; stroke-dashoffset: 340; }
.line-skill { stroke: var(--accent); }
.line-quality { stroke: var(--accent-3); }
.tour-stage.is-active .line-skill { animation: draw 1.5s var(--ease-out) forwards; }
.tour-stage.is-active .line-quality { animation: draw 1.5s 0.2s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tour-dot-end { opacity: 0; }
.ds { fill: var(--accent); }
.dq { fill: var(--accent-3); }
.tour-stage.is-active .tour-dot-end { animation: dotIn 0.4s 1.4s var(--ease-out) forwards; }
@keyframes dotIn { to { opacity: 1; } }
.tour-legend { display: flex; gap: 1rem; justify-content: center; }
.lg { font-size: 0.76rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.35rem; }
.lg::before { content: ""; width: 10px; height: 3px; border-radius: 2px; }
.lg-skill::before { background: var(--accent); }
.lg-quality::before { background: var(--accent-3); }

/* ════════════════════════════════════════════════════════════════════
   App shell (logged-in experience): left sidebar + content pane.
   Same tokens as the marketing site: white surfaces, slate ink, one
   sage accent. Sidebar items get a soft-sage active pill; the content
   pane sits on a faint tinted background so cards read as surfaces.
   ════════════════════════════════════════════════════════════════════ */

body.app { background: var(--bg-tint); }

.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: 248px;
    flex: 0 0 248px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1rem 0.75rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 40;
}

.side-brand { display: flex; align-items: center; justify-content: space-between; padding: 0.25rem 0.55rem 0.9rem; }
.side-brand a {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-display, inherit); font-weight: 700; font-size: 1.02rem;
    color: var(--text); text-decoration: none; letter-spacing: 0.01em;
}
.side-logo {
    display: block;
    width: 24px; height: 24px; border-radius: 6px;
}
.side-close { display: none; }

.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-section {
    margin: 0.9rem 0.55rem 0.25rem;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--text-muted);
}
.side-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 0.65rem; border-radius: 10px;
    font-size: 0.92rem; font-weight: 500;
    color: var(--text); text-decoration: none;
    transition: background 120ms ease, color 120ms ease;
}
.side-item svg { color: var(--text-muted); flex: 0 0 auto; }
.side-item:hover { background: var(--surface-2); }
.side-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-item.is-active svg { color: var(--accent); }
.side-item-muted { color: var(--text-muted); }
.side-spacer { flex: 1; min-height: 0.75rem; }

.side-user {
    display: flex; align-items: center; gap: 0.6rem;
    margin-top: 0.6rem; padding: 0.6rem 0.55rem;
    border-top: 1px solid var(--border);
}
.side-avatar, .chip-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent);
    font-weight: 700; font-size: 0.85rem; flex: 0 0 auto;
}
.side-user-name { font-size: 0.88rem; font-weight: 600; line-height: 1.2; }
.side-plan {
    display: inline-block; margin-top: 2px;
    font-size: 0.72rem; font-weight: 600; color: var(--accent);
    background: var(--accent-soft); border-radius: var(--radius-pill);
    padding: 0.1rem 0.5rem;
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.1rem 2rem 0.9rem;
}
.app-title { font-size: 1.35rem; font-weight: 700; margin: 0; flex: 1; }
.app-top-actions { display: flex; align-items: center; gap: 0.7rem; }
.user-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-pill); padding: 0.3rem 0.85rem 0.3rem 0.35rem;
    box-shadow: var(--shadow-sm);
}
.chip-name { font-size: 0.88rem; font-weight: 600; }
.side-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 0.25rem; }

.app-content { flex: 1; padding: 0 2rem 1.25rem; max-width: 1160px; width: 100%; }
.app-content > .card, .app-content .dashboard > .card { box-shadow: var(--shadow-sm); }
.app-footer {
    margin-top: 2rem; padding: 1rem 0 0.5rem;
    font-size: 0.78rem; color: var(--text-muted); text-align: center;
}
.app-footer a { color: var(--text-muted); }

/* Announcement banner (the "your picks are ready" pattern) */
.app-banner {
    display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
    background: linear-gradient(120deg, var(--accent-deep), var(--accent) 55%, var(--accent-2));
    color: #fff; border-radius: var(--radius-lg);
    padding: 1.1rem 1.4rem; margin-bottom: 1.25rem;
    box-shadow: var(--shadow-glow);
}
.app-banner h2 { font-size: 1.12rem; font-weight: 700; margin: 0 0 0.15rem; color: #fff; }
.app-banner p { margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); }
.app-banner .banner-body { flex: 1; min-width: 240px; }
.app-banner .btn { background: #fff; color: var(--accent-deep); border: none; }
.app-banner .btn:hover { background: var(--accent-soft); }
.app-banner .code-line {
    background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff; margin-top: 0.6rem;
}
.app-banner .code-line code { color: #fff; }
.app-banner .copy-btn { background: rgba(255, 255, 255, 0.92); color: var(--accent-deep); border: none; }

/* Stat tiles (numbers wear text ink; icons sit in a soft accent chip) */
.stat-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem; margin-bottom: 1.25rem;
}
.stat-tile {
    display: flex; align-items: center; gap: 0.85rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
}
.stat-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 12px;
    background: var(--accent-soft); color: var(--accent); flex: 0 0 auto;
}
.stat-num { font-size: 1.45rem; font-weight: 700; line-height: 1.1; color: var(--text); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 1px; }

/* Off-canvas sidebar on small screens */
@media (max-width: 960px) {
    .app-sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        transform: translateX(-105%);
        transition: transform 180ms ease;
        box-shadow: var(--shadow-lg);
    }
    .app-shell.side-open .app-sidebar { transform: translateX(0); }
    .app-scrim {
        display: none; position: fixed; inset: 0;
        background: rgba(15, 23, 42, 0.35); z-index: 30;
    }
    .app-shell.side-open .app-scrim { display: block; }
    .side-toggle { display: inline-flex; }
    .side-close { display: inline-flex; background: none; border: none; font-size: 1.4rem; color: var(--text-muted); cursor: pointer; }
    .app-topbar { padding: 0.9rem 1rem 0.7rem; }
    .app-content { padding: 0 1rem 1rem; }
    .chip-name { display: none; }
}

/* ── Dark mode ──────────────────────────────────────────────────────────
   Deep forest-slate, not black: keeps the care+trust feel in low light.
   The whole theme rides on the :root tokens, so anything var()-driven
   flips automatically. Two triggers: explicit data-theme="dark" (the nav
   toggle, persisted in localStorage) or the OS preference when the user
   hasn't chosen. The token block is intentionally duplicated: CSS has no
   way to share a declaration set across those two selector contexts. */

:root[data-theme="dark"] {
    --bg: #0F1613;
    --surface: #151E1A;
    --surface-2: #1A2620;
    --surface-3: #151E1A;
    --bg-tint: #121B16;
    --accent: #4FAF87;
    --accent-hover: #66C29B;
    --accent-soft: #1D2F27;
    --text: #E8EFEA;
    --text-muted: #9AAFA4;
    --success: #4FAF87;
    --warning: #D08A3E;
    --danger: #E06C5F;
    --border: #263630;
    --border-strong: #35493F;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
    --accent-2: #2FB89B;
    --accent-deep: #0C271C;
    --glass: rgba(18, 26, 22, 0.66);
    --glass-border: rgba(255, 255, 255, 0.09);
    --ring: rgba(79, 175, 135, 0.28);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 18px 50px -12px rgba(47, 184, 155, 0.25);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0F1613;
        --surface: #151E1A;
        --surface-2: #1A2620;
        --surface-3: #151E1A;
        --bg-tint: #121B16;
        --accent: #4FAF87;
        --accent-hover: #66C29B;
        --accent-soft: #1D2F27;
        --text: #E8EFEA;
        --text-muted: #9AAFA4;
        --success: #4FAF87;
        --warning: #D08A3E;
        --danger: #E06C5F;
        --border: #263630;
        --border-strong: #35493F;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
        --accent-2: #2FB89B;
        --accent-deep: #0C271C;
        --glass: rgba(18, 26, 22, 0.66);
        --glass-border: rgba(255, 255, 255, 0.09);
        --ring: rgba(79, 175, 135, 0.28);
        --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
        --shadow-glow: 0 18px 50px -12px rgba(47, 184, 155, 0.25);
    }
}

/* Hero halftone dots need a lighter sage in the dark or they vanish. */
:root[data-theme="dark"] .hero-bg-computed::before {
    background-image:
        radial-gradient(rgba(116, 198, 157, 0.32) 1.1px, transparent 1.7px),
        radial-gradient(rgba(116, 198, 157, 0.18) 1.1px, transparent 1.7px);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hero-bg-computed::before {
        background-image:
            radial-gradient(rgba(116, 198, 157, 0.32) 1.1px, transparent 1.7px),
            radial-gradient(rgba(116, 198, 157, 0.18) 1.1px, transparent 1.7px);
    }
}

/* ── Theme toggle button ── */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: 0 0 auto;
    border-radius: 50%; border: 1px solid var(--border);
    background: transparent; color: var(--text-muted); cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--border-strong); }
.theme-toggle .tt-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .tt-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .tt-sun { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .tt-moon { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .tt-sun { display: block; }
}

/* ── /learn: hub and article ──────────────────────────────────────────────
   Vars only. New surfaces that hard-code colours break the dark theme, which
   derives entirely from the token block above. */

.learn-list { display: grid; gap: 1rem; }

.learn-card {
    display: block; padding: 1.5rem 1.6rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-decoration: none; color: var(--text);
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.learn-card:hover {
    border-color: var(--accent); text-decoration: none;
    transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.learn-question {
    margin: 0 0 0.5rem; font-size: 0.82rem; font-weight: 600;
    letter-spacing: 0.02em; text-transform: uppercase; color: var(--accent);
}
.learn-title { margin: 0 0 0.6rem; font-size: 1.3rem; line-height: 1.3; font-family: var(--font-display); }
.learn-desc { margin: 0 0 0.8rem; color: var(--text-muted); line-height: 1.6; }
.learn-meta { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

.article-wrap { max-width: 720px; }
.article-back { font-size: 0.9rem; color: var(--text-muted); text-decoration: none; }
.article-back:hover { color: var(--accent); }
.article-head { margin: 1.5rem 0 2.5rem; }
.article-head h1 {
    font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.7rem);
    line-height: 1.15; margin: 1rem 0;
}
.article-standfirst { font-size: 1.15rem; line-height: 1.65; color: var(--text-muted); margin: 0 0 1rem; }
.article-meta { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

.article-body { font-size: 1.06rem; line-height: 1.75; }
.article-body h2 {
    font-family: var(--font-display); font-size: 1.6rem; line-height: 1.25;
    margin: 2.6rem 0 1rem;
}
.article-body h3 { font-size: 1.2rem; margin: 2rem 0 0.7rem; }
.article-body p { margin: 0 0 1.2rem; }
.article-body ul, .article-body ol { margin: 0 0 1.4rem; padding-left: 1.3rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body a { color: var(--accent); }
.article-body strong { color: var(--text); font-weight: 650; }
.article-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.article-body em { color: var(--text-muted); }

.article-body blockquote {
    margin: 1.6rem 0; padding: 0.2rem 0 0.2rem 1.3rem;
    border-left: 3px solid var(--accent);
    color: var(--text-muted); font-style: italic;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

/* Tables carry the pilot numbers. They must scroll rather than push the page
   sideways on a phone. */
.article-body table {
    width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: 0.95rem;
    display: block; overflow-x: auto;
}
.article-body th, .article-body td {
    padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border);
}
.article-body th { font-weight: 600; color: var(--text); background: var(--bg-tint); }
.article-body td { color: var(--text-muted); }
.article-body td strong { color: var(--text); }

.article-refs {
    margin-top: 3rem; padding: 1.4rem 1.6rem;
    background: var(--bg-tint); border: 1px solid var(--border); border-radius: var(--radius);
}
.article-refs h2 { font-size: 1rem; margin: 0 0 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.article-refs ul { margin: 0; padding-left: 1.1rem; }
.article-refs li { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.4rem; }

.article-related { margin-top: 2.5rem; }
.article-related h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.8rem; }
.article-related ul { padding-left: 1.1rem; }
.article-related li { margin-bottom: 0.4rem; }

@media (max-width: 640px) {
    .learn-card { padding: 1.2rem 1.2rem; }
    .article-body { font-size: 1rem; }
}
