/* Public marketing site styles (landing, pricing, terms). Extracted from
   templates/landing.html so the public pages share one stylesheet. */
:root {
    --bg: #0B1622;
    --bg-darker: #050A10;
    --bg-card: #0F172A;
    --border: #1E293B;
    --cyan: #22d3ee;
    --cyan-dark: #06b6d4;
    --cyan-glow: rgba(34, 211, 238, 0.4);
    --green: #22C55E;
    --red: #ef4444;
    --red-dark: #dc2626;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-faint: rgba(255, 255, 255, 0.4);
    --text-dim: rgba(255, 255, 255, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}
body::selection, body *::selection {
    background: rgba(34, 211, 238, 0.3);
    color: #a5f3fc;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 48px; } }

/* ============ NAV ============ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(11, 22, 34, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(34, 211, 238, 0.2);
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
@media (min-width: 768px) { .nav-inner { padding: 0 48px; height: 96px; } }
.nav-brand {
    display: flex; align-items: center; gap: 12px;
    font-weight: 900; font-size: 1.25rem; letter-spacing: 0.02em;
}
.nav-brand img { height: 44px; width: auto; }
.nav-brand-text { color: var(--text); }
.nav-brand-text span { color: var(--cyan); }
.nav-links {
    display: none;
    gap: 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--cyan); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid transparent;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: var(--cyan);
    color: var(--bg-darker);
    box-shadow: 6px 6px 0 0 var(--border);
}
.btn-primary:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 0 var(--green);
}
.btn-primary:active:not(:disabled) {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 0 var(--border);
}
.btn-ghost {
    border-color: var(--border);
    color: var(--text);
}
.btn-ghost:hover:not(:disabled) {
    border-color: var(--cyan);
    color: var(--cyan);
}
.btn-lg {
    padding: 18px 36px;
    font-size: 1rem;
}
.btn-link-inline {
    background: none; border: none; padding: 0; color: var(--cyan);
    font: inherit; cursor: pointer; text-transform: none; letter-spacing: 0;
}

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 100dvh;
    padding: 144px 0 80px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at top right, rgba(34, 211, 238, 0.1), transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(34, 197, 94, 0.05), transparent 60%),
        var(--bg);
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}
.hero-grid {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px;
    align-items: center;
}
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 7fr 5fr; gap: 32px; } }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border: 2px solid rgba(34, 211, 238, 0.4);
    background: rgba(34, 211, 238, 0.05);
    color: var(--cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.badge .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}
.hero h1 {
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    margin-bottom: 32px;
}
.hero h1 .accent {
    display: block;
    background: linear-gradient(135deg, var(--cyan) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 32px;
    max-width: 560px;
    border-left: 4px solid var(--cyan);
    padding-left: 24px;
}
@media (min-width: 768px) { .hero-sub { font-size: 1.25rem; } }
.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
}
.hero-supported {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.hero-supported-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 16px;
}
.hero-supported-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}
@media (min-width: 768px) { .hero-supported-grid { grid-template-columns: repeat(3, 1fr); } }
.hero-supported-grid div::before {
    content: '> ';
    color: var(--cyan);
    font-weight: 700;
}

/* Hero mockup card */
.hero-mock {
    position: relative;
    border: 2px solid var(--border);
    background: var(--bg-card);
    padding: 24px;
    box-shadow: 16px 16px 0 0 var(--border);
}
.hero-mock::before,
.hero-mock::after {
    content: '';
    position: absolute;
    width: 32px; height: 32px;
    border-color: var(--cyan);
}
.hero-mock::before {
    top: -2px; left: -2px;
    border-top: 4px solid;
    border-left: 4px solid;
}
.hero-mock::after {
    bottom: -2px; right: -2px;
    border-bottom: 4px solid;
    border-right: 4px solid;
}
.hero-mock-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.hero-mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.hero-mock-dot.red { background: rgba(239, 68, 68, 0.5); }
.hero-mock-dot.yellow { background: rgba(234, 179, 8, 0.5); }
.hero-mock-dot.green { background: rgba(34, 197, 94, 0.5); }
.hero-mock-title {
    margin-left: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-faint);
    text-transform: uppercase;
}
.hero-mock-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.hero-mock-row span:first-child { color: var(--text-muted); }
.hero-mock-row span:last-child { color: var(--cyan); font-weight: 700; }
.hero-mock-row.done span:last-child { color: var(--green); }
.hero-mock-status {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.hero-mock-status .left {
    color: var(--green);
    display: flex; align-items: center; gap: 8px;
}
.hero-mock-status .left::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--green); animation: pulse 2s infinite;
}
.hero-mock-status .right { color: var(--text-faint); }

/* ============ SECTIONS ============ */
section {
    position: relative;
    padding: 96px 0;
    scroll-margin-top: 96px;
}
.section-title-bar {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border: 2px solid rgba(34, 211, 238, 0.4);
    background: rgba(34, 211, 238, 0.05);
    color: var(--cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.section-title-bar.warn {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
    color: var(--red);
}
.section-title {
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.section-lead {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.6;
    max-width: 720px;
    margin-bottom: 64px;
    border-left: 4px solid var(--cyan);
    padding-left: 24px;
}
@media (min-width: 768px) { .section-lead { font-size: 1.25rem; } }

/* Bottleneck section */
#problem { background: var(--bg-darker); border-top: 8px solid var(--red-dark); }
.bottleneck-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px) { .bottleneck-grid { grid-template-columns: repeat(2, 1fr); } }
.bottleneck-card {
    position: relative;
    background: var(--bg-card);
    border: 2px solid var(--border);
    padding: 32px;
    transition: border-color 0.3s ease;
}
.bottleneck-card:hover { border-color: rgba(239, 68, 68, 0.5); }
.bottleneck-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--red);
    margin-bottom: 12px;
}
.bottleneck-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

/* How It Works section */
#how { background: var(--bg); border-top: 4px solid rgba(34, 211, 238, 0.2); }
.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
    position: relative;
    background: var(--bg-card);
    border: 2px solid var(--border);
    padding: 40px 32px;
    overflow: hidden;
}
.step-number {
    position: absolute;
    top: 16px; right: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 4rem;
    font-weight: 900;
    color: rgba(34, 211, 238, 0.15);
    line-height: 1;
}
.step-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--cyan);
    text-transform: uppercase;
    margin-bottom: 16px;
}
.step-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}
.step-body {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Features section */
#features { background: var(--bg-darker); border-top: 4px solid rgba(34, 211, 238, 0.2); }
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.feature {
    background: var(--bg-card);
    border: 2px solid var(--border);
    padding: 40px 32px;
    transition: border-color 0.2s, transform 0.2s;
}
.feature:hover {
    border-color: rgba(34, 211, 238, 0.5);
    transform: translateY(-4px);
}
.feature-icon {
    width: 48px; height: 48px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: var(--cyan);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.feature-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}
.feature-body {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Personas section */
#personas { background: var(--bg); border-top: 4px solid rgba(34, 211, 238, 0.2); }
.personas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 1024px) { .personas-grid { grid-template-columns: repeat(2, 1fr); } }
.persona {
    background: var(--bg-darker);
    border-left: 4px solid var(--cyan);
    padding: 32px;
}
.persona-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--cyan);
    text-transform: uppercase;
    margin-bottom: 12px;
}
.persona-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}
.persona-body {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* Math section */
#math { background: var(--bg-darker); border-top: 4px solid rgba(34, 211, 238, 0.2); }
.math-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}
@media (min-width: 1024px) { .math-grid { grid-template-columns: 5fr 7fr; } }
.math-input {
    background: var(--bg);
    border: 2px solid var(--border);
    padding: 32px;
}
.math-input-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 8px;
}
.math-slider-group { margin-bottom: 32px; }
.math-slider-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.math-slider-row .name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}
.math-slider-row .val {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--cyan);
    font-size: 1.1rem;
}
.math-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}
.math-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; height: 18px;
    background: var(--cyan);
    border: 2px solid var(--bg-darker);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}
.math-slider::-moz-range-thumb {
    width: 18px; height: 18px;
    background: var(--cyan);
    border: 2px solid var(--bg-darker);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}
.math-slider-meta {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-top: 8px;
}
.math-output {
    background: var(--bg);
    border: 2px solid var(--cyan);
    padding: 32px;
    box-shadow: 8px 8px 0 0 var(--border);
}
.math-output-block { margin-bottom: 32px; }
.math-output-block:last-child { margin-bottom: 0; }
.math-output-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--text-faint);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.math-output-value {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.math-output-value.cyan { color: var(--cyan); }
.math-output-value.green { color: var(--green); }
.math-output-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-faint);
    margin-top: 8px;
    letter-spacing: 0.05em;
}
.math-note {
    margin-top: 32px;
    padding: 16px;
    background: rgba(34, 211, 238, 0.05);
    border-left: 4px solid var(--cyan);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Testimonials */
#testimonials { background: var(--bg); border-top: 4px solid rgba(34, 211, 238, 0.2); }
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 1024px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial {
    position: relative;
    background: var(--bg-card);
    border: 2px solid var(--border);
    padding: 40px 32px;
}
.testimonial::before {
    content: '\201C';
    position: absolute;
    top: 8px; left: 24px;
    font-family: Georgia, serif;
    font-size: 5rem;
    color: rgba(34, 211, 238, 0.2);
    line-height: 1;
    pointer-events: none;
}
.testimonial-body {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.0625rem;
    line-height: 1.6;
    font-weight: 500;
    margin-bottom: 32px;
    min-height: 140px;
}
.testimonial-author {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.testimonial-name {
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--text);
    margin-bottom: 4px;
}
.testimonial-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-faint);
    text-transform: uppercase;
}

/* CTA / waitlist */
#start { background: var(--bg-darker); border-top: 4px solid rgba(34, 211, 238, 0.2); }
.start-panel {
    background: var(--bg-card);
    border: 2px solid var(--border);
    padding: 40px;
}
.start-panel h3 {
    font-size: 1.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}
.start-panel .lead {
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}
.start-options {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .start-options { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .start-options { grid-template-columns: repeat(3, 1fr); } }
.start-option {
    background: var(--bg-darker);
    border: 2px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.start-option .tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--cyan);
    text-transform: uppercase;
}
.start-option h4 {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.25;
}
.start-option p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    flex: 1;
}

/* ============ FOOTER ============ */
footer {
    background: var(--bg-darker);
    border-top: 4px solid var(--border);
    padding: 80px 0 48px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-bottom: 64px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 64px; } }
.footer-brand-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 360px;
    margin-top: 16px;
}
.footer-col-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 16px;
}
.footer-col a, .footer-col span {
    display: block;
    color: var(--text-muted);
    padding: 6px 0;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--cyan); cursor: pointer; }
.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    text-transform: uppercase;
}
@media (min-width: 768px) {
    .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Continue link for re-auth bounce */
.continue-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 60;
    padding: 12px 24px;
    background: var(--green);
    color: var(--bg-darker);
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}
.continue-bar a {
    text-decoration: underline;
    font-weight: 800;
}

.scroll-mt { scroll-margin-top: 96px; }

/* ============ MOBILE OVERRIDES ≤ 640px ============ */
@media (max-width: 640px) {
    .container { padding: 0 16px; }

    /* NAV: keep both Log In + Request Access; drop wordmark for room */
    .nav-inner { height: 64px; padding: 0 16px; }
    .nav-brand-text { display: none; }   /* logo-only brand on phone */
    .nav-brand img { height: 40px; }
    .nav-cta { gap: 8px; }
    .nav-cta .btn {
        padding: 8px 12px;
        font-size: 0.7rem;
        letter-spacing: 0.04em;
        min-width: 0;
    }
    .nav-cta .btn-primary { box-shadow: 3px 3px 0 0 var(--border); }
    .nav-cta .btn-ghost { padding: 8px 10px; }

    /* HERO: tighter padding, full-width stacked CTAs */
    .hero { padding: 96px 0 56px; }
    .hero::before { background-size: 32px 32px; }
    .hero-grid { gap: 40px; }
    .hero h1 { margin-bottom: 24px; line-height: 1; }
    .hero-sub { font-size: 1rem; padding-left: 16px; margin-bottom: 24px; }
    .hero-ctas { flex-direction: column; gap: 12px; margin-bottom: 32px; }
    .hero-ctas .btn { width: 100%; }
    .btn-lg { padding: 14px 22px; font-size: 0.9rem; }
    .hero-mock { padding: 18px; box-shadow: 8px 8px 0 0 var(--border); }
    .hero-mock-row { font-size: 0.78rem; padding: 10px 0; }
    .hero-supported-grid { gap: 10px; font-size: 0.75rem; }

    /* SECTIONS: dial the rhythm down */
    section { padding: 64px 0; scroll-margin-top: 72px; }
    .section-title { font-size: 2.25rem; line-height: 1.05; margin-bottom: 16px; }
    .section-lead { font-size: 1rem; padding-left: 16px; margin-bottom: 40px; }
    .section-title-bar { padding: 6px 12px; font-size: 0.65rem; letter-spacing: 0.15em; }

    /* CARDS: tighter, lighter shadow halos */
    .bottleneck-card, .step, .feature, .persona { padding: 24px; }
    .step-number { font-size: 3rem; top: 12px; right: 18px; }

    /* MATH: stack, shrink output values, tame the shadow */
    #math .math-grid { gap: 24px; }
    .math-input, .math-output { padding: 24px; }
    .math-output { box-shadow: 4px 4px 0 0 var(--border); }
    .math-output-value { font-size: 2.25rem; word-break: break-word; }
    .math-slider-group { margin-bottom: 24px; }
    .math-slider { height: 6px; }   /* easier finger drag */
    .math-slider::-webkit-slider-thumb { width: 24px; height: 24px; }
    .math-slider::-moz-range-thumb { width: 24px; height: 24px; }

    /* TESTIMONIALS: shorter min-height */
    .testimonial { padding: 32px 24px; }
    .testimonial-body { min-height: 0; font-size: 1rem; }
    .testimonial::before { font-size: 4rem; top: 4px; left: 16px; }

    /* GET STARTED: tighter panel */
    .start-panel { padding: 28px 24px; }
    .start-panel h3 { font-size: 1.375rem; }
    .start-option { padding: 20px; }

    /* FOOTER: condense */
    footer { padding: 56px 0 32px; }
    .footer-grid { gap: 32px; margin-bottom: 40px; }
}

/* ============ EXTRA-NARROW ≤ 380px (iPhone SE etc.) ============ */
@media (max-width: 380px) {
    .nav-brand img { height: 36px; }
    .nav-cta .btn { font-size: 0.65rem; padding: 7px 10px; }
    .hero h1 { font-size: 2.25rem; }
    .section-title { font-size: 1.875rem; }
    .math-output-value { font-size: 2rem; }
}

/* Touch-friendly tweaks regardless of width */
@media (hover: none) and (pointer: coarse) {
    .feature:hover { transform: none; }   /* no hover-lift on touch */
    .btn-primary:hover:not(:disabled) { transform: none; box-shadow: 6px 6px 0 0 var(--border); }
}

/* ============ SHARED PUBLIC PAGES (pricing, terms) ============ */
.nav-links a.nav-active { color: var(--cyan); }
.footer-grid { grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; } }
.footer-bottom-link { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom-link:hover { color: var(--cyan); }

/* Sub-page hero (shorter than the landing hero) */
.subhero {
    position: relative;
    padding: 160px 0 48px;
    background:
        radial-gradient(ellipse at top right, rgba(34, 211, 238, 0.1), transparent 60%),
        var(--bg);
}
.subhero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}
.subhero .container { position: relative; z-index: 1; }
.subhero h1 {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.subhero h1 .accent {
    display: block;
    background: linear-gradient(135deg, var(--cyan) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.subhero .hero-sub { margin-bottom: 0; }

/* Plan cards */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
}
@media (min-width: 1024px) { .plans-grid { grid-template-columns: repeat(3, 1fr); } }
.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 2px solid var(--border);
    padding: 36px 32px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.plan:hover { border-color: rgba(34, 211, 238, 0.5); }
.plan.featured {
    border: 3px solid var(--cyan);
    box-shadow: 12px 12px 0 0 var(--green);
}
.plan-flag {
    position: absolute;
    top: -14px; left: 32px;
    padding: 4px 12px;
    background: var(--green);
    color: var(--bg-darker);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
}
.plan-name {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.plan-fit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 20px;
    min-height: 2.4em;
}
.plan-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.plan-price .amount {
    font-size: 2.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--cyan);
    line-height: 1;
}
.plan-price .per {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.plan-price-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.plan-blurb {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.plan ul { list-style: none; flex: 1; margin-bottom: 28px; }
.plan ul li {
    position: relative;
    padding: 8px 0 8px 24px;
    font-size: 0.95rem;
    color: var(--text);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.plan ul li:last-child { border-bottom: none; }
.plan ul li::before {
    content: '>';
    position: absolute; left: 0;
    color: var(--cyan);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}
.plan ul li strong { color: var(--text); font-weight: 700; }
.plan-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--green);
    margin-bottom: 20px;
    line-height: 1.5;
}
.plan .btn { width: 100%; }
.plans-foot {
    margin-top: 40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    text-transform: uppercase;
    line-height: 1.8;
}
.plans-foot a { color: var(--cyan); }

/* Free-plan strip */
.free-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 56px;
    padding: 20px 28px;
    border: 2px solid rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.05);
}
.free-strip .free-strip-text { font-weight: 600; }
.free-strip .free-strip-text span {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Comparison tables */
.compare-wrap { overflow-x: auto; border: 2px solid var(--border); background: var(--bg-card); }
.compare {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    font-size: 0.95rem;
}
.compare th, .compare td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.compare th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-faint);
    background: var(--bg-darker);
}
.compare th.us { color: var(--cyan); }
.compare td:first-child { color: var(--text-muted); }
.compare td.us { color: var(--text); font-weight: 600; }
.compare tr:last-child td { border-bottom: none; }
.compare-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
.compare-grid > div { min-width: 0; }   /* let the wrapper scroll instead of the grid cell growing */
@media (min-width: 1024px) { .compare-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.compare-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 16px;
}

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .faq-grid { grid-template-columns: repeat(2, 1fr); } }
.faq {
    background: var(--bg-card);
    border: 2px solid var(--border);
    padding: 24px 28px;
}
.faq h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.faq p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.faq p strong { color: var(--text); }
#pricing-faq { background: var(--bg-darker); border-top: 8px solid var(--border); }

/* CTA band */
.cta-band {
    border: 2px solid var(--border);
    background: var(--bg-card);
    padding: 48px 32px;
    text-align: center;
    box-shadow: 12px 12px 0 0 var(--border);
}
.cta-band h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}
.cta-band .hero-ctas { justify-content: center; margin-bottom: 0; }

/* Legal document */
.legal {
    max-width: 860px;
    margin: 0 auto;
}
.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin-bottom: 40px;
    padding: 16px 20px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.legal-meta strong { color: var(--cyan); font-weight: 700; }
.legal p, .legal li { color: rgba(255, 255, 255, 0.82); font-size: 1rem; line-height: 1.7; }
.legal p { margin-bottom: 16px; }
.legal h2 {
    font-size: 1.35rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 48px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.legal h2 .num { color: var(--cyan); margin-right: 10px; font-family: 'JetBrains Mono', monospace; }
.legal .clause { margin-bottom: 16px; }
.legal .clause .cnum {
    font-family: 'JetBrains Mono', monospace;
    color: var(--cyan);
    font-size: 0.85rem;
    margin-right: 8px;
}
.legal .clause .ctitle { font-weight: 700; color: var(--text); }
.legal dl.defs dt { font-weight: 700; color: var(--text); margin-top: 12px; }
.legal dl.defs dd { margin: 4px 0 0 0; color: rgba(255, 255, 255, 0.82); line-height: 1.7; }
.legal .caps { text-transform: uppercase; letter-spacing: 0.01em; font-size: 0.92rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; max-width: 520px; }
.legal th, .legal td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; font-size: 0.95rem; }
.legal th { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-faint); background: var(--bg-darker); }
.legal-toc {
    columns: 2; column-gap: 32px;
    margin-bottom: 8px;
    padding: 20px 24px;
    border: 2px solid var(--border);
    background: var(--bg-card);
}
.legal-toc a {
    display: block;
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    break-inside: avoid;
}
.legal-toc a:hover { color: var(--cyan); }
.legal-toc a .num { color: var(--cyan); font-family: 'JetBrains Mono', monospace; margin-right: 8px; font-size: 0.8rem; }
@media (max-width: 640px) {
    .subhero { padding: 104px 0 40px; }
    .plan { padding: 28px 22px; }
    .plan.featured { box-shadow: 6px 6px 0 0 var(--green); }
    .plan-price .amount { font-size: 2.25rem; }
    .legal-toc { columns: 1; }
    .cta-band { padding: 36px 20px; box-shadow: 6px 6px 0 0 var(--border); }
}
@media (max-width: 640px) {
    .subhero h1 { font-size: 2rem; line-height: 1.05; }
    .subhero h1 .accent { display: inline; }   /* let the accent line wrap on phones */
}
/* Footer brand: keep the helm + wordmark on one line (the generic
   `.footer-col a/span { display:block }` rule used to split it). */
.footer-col a.nav-brand { display: flex; padding: 0; }
.footer-col .nav-brand-text, .footer-col .nav-brand-text span { display: inline; padding: 0; }

/* Mobile/tablet Pricing link: .nav-links is hidden below 1024px, so this
   sits in the CTA cluster and disappears once the full nav is visible. */
.nav-mobile-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.nav-mobile-link:hover, .nav-mobile-link.nav-active { color: var(--cyan); }
@media (min-width: 1024px) { .nav-mobile-link { display: none; } }
@media (max-width: 380px) { .nav-mobile-link { padding: 6px 6px; font-size: 0.62rem; letter-spacing: 0.08em; } }
