/* ============================================================
   VOLTAIRE — 2026 dev-tool dark aesthetic
   ============================================================ */

:root {
    /* Supabase dark palette — extracted from source CSS */
    --bg:        #121212;
    --bg-2:      #171717;
    --bg-3:      #1f1f1f;
    --bg-4:      #292929;

    --text:      #fafafa;
    --text-2:    #b4b4b4;
    --text-3:    #4d4d4d;

    --green:     #3ecf8e;
    --green-dim: rgba(62,207,142,0.12);
    --green-dark:#2db37e;
    --red:       #EF4444;
    --red-dim:   rgba(239,68,68,0.12);

    --border:    #2e2e2e;
    --border-2:  #242424;

    --r-sm:  6px;
    --r-md:  10px;
    --r-lg:  16px;
    --r-xl:  20px;
    --r-full:9999px;

    --shadow-green: 0 0 0 1px var(--green), 0 8px 32px rgba(62,207,142,0.12);

    --ease:  0.2s ease;
    --max-w: 1100px;

    --mono: 'JetBrains Mono', 'Source Code Pro', monospace;
    --sans: 'Inter', system-ui, -apple-system, sans-serif;
    --head: 'Inter', system-ui, sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
h1,h2,h3,h4 { font-family: var(--head); line-height: 1.15; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
code {
    font-family: var(--mono);
    font-size: 0.9em;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 2px 7px;
    color: var(--green);
}

/* ---- SKIP LINK ---- */
.skip-link {
    position: absolute; top: -100px; left: 16px; z-index: 9999;
    background: var(--green); color: #000;
    padding: 10px 20px; border-radius: var(--r-sm);
    font-weight: 700; font-size: .9rem; transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---- CONTAINER ---- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(20px,4vw,48px); }

/* ---- FOCUS ---- */
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ================================================================
   REVEAL ANIMATIONS
   ================================================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease calc(var(--reveal-delay, 0s)),
                transform 0.55s ease calc(var(--reveal-delay, 0s));
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.js-loaded .reveal { /* only animate when JS loaded */ }

/* ================================================================
   HEADER
   ================================================================ */
#site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,10,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--ease), box-shadow var(--ease);
}
#site-header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 1px 0 var(--border);
}
.navbar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.logo {
    font-family: var(--head); font-weight: 800; font-size: 1.15rem;
    color: var(--text); letter-spacing: -0.02em;
}
.logo:hover { color: var(--green); }

.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav-link {
    font-size: .88rem; font-weight: 500; color: var(--text-2);
    padding: 7px 12px; border-radius: var(--r-sm);
    transition: color var(--ease), background var(--ease);
    display: flex; align-items: center;
}
.nav-link:hover { color: var(--text); background: var(--bg-2); }
.nav-link-icon { padding: 7px 9px; }

.nav-buttons { display: flex; align-items: center; gap: 8px; }
.btn-nav {
    font-size: .88rem; font-weight: 700;
    background: var(--green); color: #000;
    padding: 9px 20px; border-radius: var(--r-full);
    transition: all var(--ease);
    white-space: nowrap;
}
.btn-nav:hover { background: var(--green-dark); transform: translateY(-1px); }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    background: none; border: none; cursor: pointer;
    width: 44px; height: 44px; border-radius: var(--r-sm);
}
.hamburger:hover { background: var(--bg-2); }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-top: 1px solid var(--border); z-index: 99;
    padding: 12px clamp(16px,4vw,32px) 20px;
}
.mobile-menu.open { display: flex; flex-direction: column; gap: 2px; }
.mobile-menu a {
    display: block; padding: 11px 10px; font-size: 1rem; font-weight: 500;
    color: var(--text-2); border-radius: var(--r-sm);
    transition: background var(--ease), color var(--ease);
}
.mobile-menu a:hover { background: var(--bg-2); color: var(--text); }
.mobile-menu .btn-cta { color: #000; margin-top: 8px; text-align: center; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-cta {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--green); color: #000;
    font-family: var(--sans); font-weight: 700;
    font-size: clamp(.95rem, 1.5vw, 1.05rem);
    padding: 14px 32px; border-radius: var(--r-full);
    border: none; cursor: pointer; min-height: 48px;
    transition: all var(--ease);
    box-shadow: 0 4px 20px rgba(34,197,94,0.25);
}
.btn-cta:hover, .btn-cta:focus-visible {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(34,197,94,0.35);
}
.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--text-2);
    font-weight: 500; font-size: clamp(.95rem, 1.5vw, 1rem);
    padding: 14px 24px; border-radius: var(--r-full);
    border: 1px solid var(--border);
    transition: all var(--ease); min-height: 48px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }

/* ================================================================
   HERO
   ================================================================ */
.hero {
    padding: clamp(64px,9vw,120px) 0 clamp(48px,7vw,80px);
    background: var(--bg);
    text-align: center;
}
.hero .container { display: flex; flex-direction: column; align-items: center; gap: clamp(40px,6vw,64px); }

.hero-content { max-width: 700px; }
.hero-title {
    font-size: clamp(2rem, 1rem + 3.5vw, 3.2rem);
    font-weight: 800; color: var(--text);
    line-height: 1.1; margin-bottom: 20px;
    letter-spacing: -0.03em;
}
.hero-accent {
    background: linear-gradient(135deg, var(--green) 0%, #86EFAC 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
    font-size: clamp(.97rem,1.6vw,1.1rem); color: var(--text-2);
    max-width: 540px; margin: 0 auto 32px; font-weight: 400; line-height: 1.7;
}
.hero-code {
    font-family: var(--mono); font-size: 0.95em;
    background: var(--bg-3); border: 1px solid var(--border);
    border-radius: var(--r-sm); padding: 1px 7px; color: var(--green);
    -webkit-text-fill-color: var(--green);
}
.hero-ctas { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Terminal */
.terminal-block {
    width: 100%; max-width: 620px;
    background: #0D0D0D;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 1px 0 var(--border-2) inset;
    text-align: left;
}
.terminal-header {
    display: flex; align-items: center; gap: 7px;
    padding: 12px 16px;
    background: var(--bg-3);
    border-bottom: 1px solid var(--border);
}
.terminal-dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.terminal-dot-red    { background: #FF5F57; }
.terminal-dot-yellow { background: #FFBD2E; }
.terminal-dot-green  { background: #28CA42; }
.terminal-title { font-size: .75rem; color: var(--text-3); margin-left: 4px; font-family: var(--mono); }

.terminal-body { padding: 20px 24px; font-family: var(--mono); font-size: clamp(.78rem,1.3vw,.88rem); line-height: 1.8; }
.terminal-line { display: flex; align-items: baseline; gap: 4px; }
.terminal-spacer { height: 8px; }
.terminal-indent { padding-left: 20px; }
.terminal-prompt { gap: 10px; }

.terminal-dim   { color: var(--text-3); }
.terminal-green { color: var(--green); }
.terminal-red   { color: var(--red); }
.terminal-label { color: var(--text); }

.terminal-cursor {
    display: inline-block;
    width: 7px; height: 1.1em;
    background: var(--green);
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ================================================================
   STATS BAR
   ================================================================ */
.stats-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
    padding: clamp(24px,4vw,36px) 0;
}
.stats-row {
    display: flex; align-items: center; justify-content: center;
    gap: 0; flex-wrap: wrap;
}
.stat-item { text-align: center; padding: 0 clamp(28px,5vw,64px); flex: 1; min-width: 160px; }
.stat-number {
    font-family: var(--head); font-size: clamp(1.6rem,3vw,2.2rem);
    font-weight: 800; color: var(--green); letter-spacing: -0.03em;
    line-height: 1;
}
.stat-label { font-size: .8rem; color: var(--text-3); margin-top: 6px; font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }

/* ================================================================
   SECTION TITLES
   ================================================================ */
.s-title {
    font-size: clamp(1.5rem,3vw,2.1rem);
    font-weight: 800; text-align: center;
    color: var(--text); letter-spacing: -0.025em;
    margin-bottom: clamp(8px,1vw,12px);
}
.s-sub {
    text-align: center; font-size: clamp(.92rem,1.4vw,1rem);
    color: var(--text-2); font-weight: 400; max-width: 460px;
    margin: 0 auto clamp(32px,5vw,52px);
}

/* ================================================================
   HOW IT WORKS
   ================================================================ */
.how-section { padding: clamp(56px,8vw,100px) 0; background: var(--bg); }
.how-section .s-title { margin-bottom: clamp(32px,5vw,56px); }

.steps-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: 0;
}
.step-card {
    padding: clamp(24px,3vw,36px);
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    display: flex; flex-direction: column;
}
.step-number {
    font-family: var(--head); font-size: 3.5rem;
    font-weight: 800; color: var(--bg-4);
    line-height: 1; margin-bottom: 16px;
    user-select: none;
}
.step-title {
    font-size: 1rem; font-weight: 700; color: var(--text);
    margin-bottom: 8px;
}
.step-title code {
    font-size: 0.95em;
    background: var(--green-dim);
    border-color: rgba(34,197,94,0.2);
}
.step-desc { font-size: .88rem; color: var(--text-2); line-height: 1.65; }
.step-connector {
    width: clamp(16px,3vw,32px);
    height: 1px; background: var(--border);
    align-self: center;
}

/* ================================================================
   LOOP GRID (how it works)
   ================================================================ */
.loop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: clamp(32px,5vw,52px);
}
.loop-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: clamp(20px,3vw,32px);
    display: flex; flex-direction: column; gap: 10px;
    position: relative;
}
.loop-card-highlight {
    border-color: var(--green);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.15), 0 8px 24px rgba(34,197,94,0.06);
}
.loop-week {
    font-family: var(--mono); font-size: .72rem;
    color: var(--text-3); font-weight: 500;
}
.loop-card-highlight .loop-week { color: var(--green); }
.loop-title {
    font-size: 1rem; font-weight: 700; color: var(--text);
}
.loop-title code { font-size: 0.92em; }
.loop-desc { font-size: .88rem; color: var(--text-2); line-height: 1.65; flex: 1; }

/* ================================================================
   FEATURE SECTIONS
   ================================================================ */
.feat-section { padding: clamp(56px,8vw,100px) 0; }
.feat-dark   { background: var(--bg-2); }
.feat-darker { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.feat-row {
    display: grid; grid-template-columns: 1fr 1fr;
    align-items: center; gap: clamp(40px,6vw,80px);
}
.feat-row-flip { direction: rtl; }
.feat-row-flip > * { direction: ltr; }

.feat-chip {
    display: inline-block; background: var(--green-dim); color: var(--green);
    font-size: .72rem; font-weight: 700; padding: 4px 12px;
    border-radius: var(--r-full); letter-spacing: .06em;
    text-transform: uppercase; margin-bottom: 16px;
    border: 1px solid rgba(34,197,94,0.2);
}
.feat-title {
    font-size: clamp(1.2rem,2.2vw,1.6rem); font-weight: 800;
    color: var(--text); margin-bottom: 20px; letter-spacing: -0.02em;
    line-height: 1.2;
}
.feat-list { display: flex; flex-direction: column; gap: 14px; }
.feat-list li {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: clamp(.9rem,1.4vw,.97rem); color: var(--text-2); line-height: 1.6;
}
.feat-check {
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; min-width: 20px;
    background: var(--green-dim); color: var(--green);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 50%; font-size: .72rem; margin-top: 2px;
    font-style: normal;
}

/* Data card mockup */
.data-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.data-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.data-card-title { font-size: .8rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.data-card-badge {
    font-size: .7rem; font-weight: 700; color: var(--green);
    background: var(--green-dim); border: 1px solid rgba(34,197,94,0.2);
    border-radius: var(--r-full); padding: 2px 9px;
    text-transform: uppercase; letter-spacing: .05em;
}
.metric-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid var(--border-2);
}
.metric-row:first-of-type { border-top: none; }
.metric-row-2 { border-top: 1px solid var(--border-2); }
.metric-info { display: flex; flex-direction: column; gap: 2px; }
.metric-label { font-size: .88rem; font-weight: 600; color: var(--text); }
.metric-sub { font-size: .75rem; color: var(--text-3); }
.metric-right { display: flex; align-items: center; gap: 8px; }
.metric-value { font-family: var(--head); font-size: 1.15rem; font-weight: 800; }
.metric-bad { color: var(--red); }
.metric-neutral { color: var(--text); }
.metric-indicator { font-size: .85rem; font-weight: 700; }
.metric-indicator-down { color: var(--red); }

.metric-bar-wrap { margin: 4px 0 12px; }
.metric-bar {
    height: 5px; background: var(--bg-4);
    border-radius: var(--r-full); overflow: hidden; margin-bottom: 6px;
}
.metric-bar-fill { height: 100%; border-radius: var(--r-full); }
.metric-bar-bad { background: var(--red); }
.metric-bar-label { font-size: .72rem; color: var(--text-3); }

/* Command mockup */
.command-mockup {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.command-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-4);
    border-bottom: 1px solid var(--border);
}
.command-status {
    font-size: .7rem; font-weight: 700; color: var(--green);
    background: var(--green-dim); border: 1px solid rgba(34,197,94,0.2);
    border-radius: var(--r-full); padding: 2px 9px;
    text-transform: uppercase; letter-spacing: .05em;
}
.command-body { padding: 20px; font-family: var(--mono); font-size: .84rem; }
.command-line { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.command-prompt { color: var(--text-3); font-size: 1rem; }
.command-text { color: var(--green); font-weight: 500; }

.command-output { display: flex; flex-direction: column; gap: 0; }
.co-line { font-size: .82rem; line-height: 1.9; }
.co-dim   { color: var(--text-3); }
.co-green { color: var(--green); }
.co-white { color: var(--text); }
.co-label { color: var(--text-2); }
.co-spacer { height: 8px; }

/* ================================================================
   FEATURE VISUALS — clean dark cards
   ================================================================ */
.vis-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: clamp(22px,3vw,32px);
    display: flex; flex-direction: column; gap: 20px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
}
.vis-green { color: var(--green); }
.vis-red   { color: var(--red); }

/* Card header */
.vis-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vis-card-title { font-size: .8rem; font-weight: 600; color: var(--text-2); }
.vis-badge-red {
    font-size: .7rem; font-weight: 700; color: var(--red);
    background: var(--red-dim); border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--r-full); padding: 3px 10px;
    white-space: nowrap;
}

/* Comparison bars */
.vis-compare { display: flex; flex-direction: column; gap: 12px; }
.vis-cmp-row { display: grid; grid-template-columns: 88px 1fr 36px; align-items: center; gap: 10px; }
.vis-cmp-row-hl .vis-cmp-label { color: var(--green); }
.vis-cmp-label { font-size: .8rem; color: var(--text-3); font-weight: 500; white-space: nowrap; }
.vis-cmp-track { height: 7px; background: var(--bg-4); border-radius: var(--r-full); overflow: hidden; }
.vis-cmp-fill { height: 100%; border-radius: var(--r-full); }
.vis-cmp-red   { background: var(--red); opacity: 0.8; }
.vis-cmp-muted { background: var(--text-3); opacity: 0.6; }
.vis-cmp-green { background: var(--green); }
.vis-cmp-val   { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--text-2); text-align: right; }

/* Finding callout */
.vis-finding {
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--bg-4); border-radius: var(--r-md); padding: 14px 16px;
    border: 1px solid rgba(34,197,94,0.15);
}
.vis-finding-dot { color: var(--green); font-size: .75rem; margin-top: 2px; flex-shrink: 0; }
.vis-finding p { font-size: .85rem; color: var(--text-2); line-height: 1.6; }

/* Digest visual */
.vis-digest-header { display: flex; align-items: center; justify-content: space-between; }
.vis-digest-title { font-size: .78rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.vis-live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{box-shadow:0 0 0 3px rgba(34,197,94,0.2)} 50%{box-shadow:0 0 0 6px rgba(34,197,94,0.05)} }

.vis-digest-item {
    padding: 12px 14px;
    background: var(--bg-4); border-radius: var(--r-md);
    border: 1px solid var(--border-2);
}
.vis-digest-anomaly { border-color: rgba(234,179,8,0.3); background: rgba(234,179,8,0.04); }
.vis-digest-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.vis-digest-date { font-size: .78rem; font-weight: 600; color: var(--text-2); font-family: var(--mono); }
.vis-digest-rate { font-family: var(--head); font-size: .95rem; font-weight: 700; color: var(--text); }
.vis-digest-obs { font-size: .78rem; color: var(--text-3); line-height: 1.5; }

.vis-reco {
    background: var(--bg-4); border-radius: var(--r-md); padding: 14px 16px;
    border: 1px solid rgba(34,197,94,0.2);
    display: flex; flex-direction: column; gap: 4px;
}
.vis-reco-tag { font-size: .68rem; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .06em; }
.vis-reco-text { font-size: .88rem; font-weight: 600; color: var(--text); }
.vis-reco-impact { font-size: .8rem; font-weight: 600; color: var(--green); }

/* ================================================================
   APP WINDOW MOCKUP (light theme — mirrors real dashboard)
   ================================================================ */
.app-window {
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid #2A2A2A;
}
.app-window-bar {
    background: #1C1C1C;
    border-bottom: 1px solid #2A2A2A;
    padding: 10px 16px;
    display: flex; align-items: center; gap: 7px;
}
.app-dot {
    width: 11px; height: 11px; border-radius: 50%; background: #333;
}
.app-window-url {
    font-family: var(--mono); font-size: .72rem;
    color: #555; margin-left: 8px;
}
.app-window-body {
    background: #FAFAFA;
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
    overflow: hidden;
}

/* Metric cards row */
.app-metric-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.app-metric-card {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 8px; padding: 10px 10px;
}
.app-metric-label {
    font-size: .6rem; font-weight: 600; color: #9CA3AF;
    letter-spacing: .04em; display: block; margin-bottom: 4px;
    text-transform: uppercase;
}
.app-metric-value {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem; font-weight: 700; color: #111827;
    line-height: 1;
}
.app-metric-red { color: #DC2626; }
.app-metric-delta { font-size: .65rem; font-weight: 500; margin-top: 3px; color: #6B7280; }
.app-delta-down { color: #DC2626; }

/* Alert row */
.app-alert-row {
    display: flex; align-items: center; gap: 8px;
    background: #FEF3C7; border: 1px solid #FDE68A;
    border-radius: 8px; padding: 10px 12px;
    font-size: .8rem; color: #92400E;
}
.app-alert-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #D97706; flex-shrink: 0;
}

/* Insight row */
.app-insight-row {
    background: var(--green-dim);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 8px; padding: 12px 14px;
}
.app-insight-label { font-size: .65rem; font-weight: 700; color: #16A34A; letter-spacing: .05em; margin-bottom: 4px; text-transform: uppercase; }
.app-insight-text { font-size: .82rem; color: #374151; line-height: 1.5; }
.app-insight-text strong { color: #15803D; }

/* Reco row */
.app-reco-row {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 10px; padding: 14px;
}
.app-reco-label { font-size: .65rem; font-weight: 700; color: #9CA3AF; letter-spacing: .05em; margin-bottom: 4px; }
.app-reco-title { font-size: .88rem; font-weight: 600; color: #111827; margin-bottom: 4px; }
.app-reco-impact { font-size: .78rem; font-weight: 600; color: #16A34A; }

/* CTA row */
.app-cta-block {
    background: #111827; border-radius: 8px;
    padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.app-cta-cmd { font-family: var(--mono); font-size: .88rem; color: #F9FAFB; font-weight: 500; }
.app-cta-hint { font-size: .72rem; color: #6B7280; }

/* Digest cards in app window */
.app-section-title { font-size: .72rem; font-weight: 700; color: #6B7280; letter-spacing: .05em; text-transform: uppercase; }
.app-digest-card {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 8px; padding: 10px 12px;
}
.app-digest-anomaly { border-color: #FDE68A; background: #FFFBEB; }
.app-digest-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.app-digest-date { font-size: .78rem; font-weight: 600; color: #374151; }
.app-digest-rate { font-size: .85rem; font-weight: 700; color: #111827; font-family: 'Manrope', sans-serif; }
.app-digest-rate-bad { color: #DC2626; }
.app-digest-rate-good { color: #16A34A; }
.app-digest-obs { font-size: .75rem; color: #6B7280; line-height: 1.5; }

/* ================================================================
   DIGEST MOCKUP
   ================================================================ */
.digest-mockup {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
    display: flex; flex-direction: column; gap: 0;
}
.digest-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.digest-date { font-size: .78rem; color: var(--text-3); font-family: var(--mono); }

.digest-alert {
    display: flex; align-items: flex-start; gap: 10px;
    background: rgba(234,179,8,0.08);
    border: 1px solid rgba(234,179,8,0.2);
    border-radius: var(--r-md);
    padding: 12px 14px;
    font-size: .82rem; color: #FCD34D;
    margin-bottom: 16px; line-height: 1.5;
}
.digest-alert-icon { flex-shrink: 0; font-size: .9rem; }

.digest-metric {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid var(--border-2);
    font-size: .85rem;
}
.digest-label { color: var(--text-2); }
.digest-val { font-family: var(--head); font-weight: 700; color: var(--text); }
.digest-up { font-size: .78rem; color: var(--green); font-weight: 600; }
.digest-down { font-size: .78rem; color: var(--red); font-weight: 600; }

.digest-divider { height: 1px; background: var(--border); margin: 16px 0; }

.digest-reco { background: var(--bg-4); border-radius: var(--r-md); padding: 16px; }
.digest-reco-label { font-size: .7rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.digest-reco-title { font-size: .92rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.digest-reco-impact { font-size: .82rem; color: var(--green); font-weight: 600; margin-bottom: 10px; }
.digest-reco-cta { font-size: .78rem; color: var(--text-3); }
.digest-reco-cta code { font-size: .88em; }

/* ================================================================
   PRICING
   ================================================================ */
.pricing-section { padding: clamp(56px,8vw,100px) 0; background: var(--bg-2); border-top: 1px solid var(--border); }
.pricing-section-page { padding-top: clamp(32px,5vw,56px); }

.pricing-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 20px; max-width: 760px; margin: 0 auto;
}
.pricing-grid-page { max-width: 800px; }

.pricing-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: clamp(28px,4vw,40px);
    position: relative;
    display: flex; flex-direction: column;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.pricing-card:hover { border-color: var(--text-3); }

.pricing-card-pro {
    border-color: var(--green);
    box-shadow: var(--shadow-green);
}
.pricing-card-pro:hover { border-color: var(--green); }

.pricing-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--green); color: #000;
    font-size: .72rem; font-weight: 800; padding: 4px 14px;
    border-radius: var(--r-full); white-space: nowrap; letter-spacing: .04em;
    text-transform: uppercase;
}
.pricing-tier { font-size: .8rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 20px; }
.price-amount { font-family: var(--head); font-size: clamp(2rem,4vw,2.8rem); font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.price-period { font-size: .95rem; color: var(--text-2); }
.pricing-tagline { font-size: .88rem; color: var(--text-2); margin-bottom: 24px; }

.pricing-features { display: flex; flex-direction: column; gap: 12px; flex: 1; margin-bottom: 28px; }
.pricing-features-full { margin-bottom: 24px; }
.pricing-features li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: .88rem; color: var(--text-2); line-height: 1.5;
}
.pricing-features code { font-size: 0.88em; }
.pf-check {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; min-width: 18px;
    background: var(--bg-4); color: var(--text-3);
    border-radius: 50%; font-size: .7rem; margin-top: 1px;
}
.pf-check-green { background: var(--green-dim); color: var(--green); }
.pf-sub { font-size: .82rem; color: var(--text-3); }

.btn-pricing {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-4); color: var(--text);
    font-weight: 700; font-size: .92rem;
    padding: 12px 24px; border-radius: var(--r-full);
    border: 1px solid var(--border);
    transition: all var(--ease); text-align: center;
}
.btn-pricing:hover { border-color: var(--text-3); background: var(--bg-3); }
.btn-pricing-pro {
    background: var(--green); color: #000;
    border-color: var(--green);
    box-shadow: 0 4px 16px rgba(34,197,94,0.25);
}
.btn-pricing-pro:hover { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); }
.pricing-note { text-align: center; font-size: .78rem; color: var(--text-3); margin-top: 12px; }

/* ================================================================
   FAQ
   ================================================================ */
.faq-section { padding: clamp(56px,8vw,100px) 0; background: var(--bg); border-top: 1px solid var(--border); }
.faq-container { max-width: 680px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
    width: 100%; text-align: left; background: none; border: none;
    cursor: pointer; padding: 20px 0;
    font-size: .97rem; font-weight: 600; color: var(--text);
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    transition: color var(--ease);
}
.faq-question::after { content: '+'; font-size: 1.3rem; font-weight: 300; color: var(--text-3); flex-shrink: 0; transition: transform .25s; }
.faq-question:hover { color: var(--green); }
.faq-item.active .faq-question::after { transform: rotate(45deg); color: var(--green); }
.faq-answer { overflow: hidden; max-height: 0; transition: max-height .35s ease; }
.faq-item.active .faq-answer { max-height: 400px; }
.faq-answer p { padding: 0 0 20px; font-size: .92rem; color: var(--text-2); line-height: 1.75; }
.faq-answer a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

/* ================================================================
   FINAL CTA
   ================================================================ */
.cta-section { padding: clamp(56px,8vw,100px) 0; background: var(--bg-2); border-top: 1px solid var(--border); }
.cta-box {
    background: var(--bg-3);
    border: 1px solid var(--green);
    border-radius: var(--r-xl);
    padding: clamp(40px,6vw,72px) clamp(28px,5vw,64px);
    text-align: center;
    box-shadow: 0 0 0 1px rgba(34,197,94,0.1), 0 24px 64px rgba(34,197,94,0.06);
    max-width: 680px; margin: 0 auto;
}
.cta-title { font-size: clamp(1.5rem,3vw,2.2rem); font-weight: 800; color: var(--text); margin-bottom: 12px; letter-spacing: -0.025em; }
.cta-sub { font-size: clamp(.92rem,1.5vw,1.02rem); color: var(--text-2); max-width: 420px; margin: 0 auto 28px; line-height: 1.65; }

/* ================================================================
   PAGE HERO (inner pages)
   ================================================================ */
.page-hero { padding: clamp(56px,8vw,96px) 0 clamp(40px,6vw,64px); text-align: center; background: var(--bg); border-bottom: 1px solid var(--border); }
.page-hero-title { font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 800; color: var(--text); letter-spacing: -0.03em; margin-bottom: 12px; }
.page-hero-sub { font-size: clamp(.95rem,1.5vw,1.05rem); color: var(--text-2); max-width: 420px; margin: 0 auto; }

/* ================================================================
   LEGAL PAGES
   ================================================================ */
.legal-section { padding: clamp(48px,7vw,80px) 0; }
.legal-content { max-width: 680px; margin: 0 auto; }
.legal-content h2 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 32px 0 12px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { font-size: .95rem; color: var(--text-2); line-height: 1.8; margin-bottom: 14px; }
.legal-content a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.legal-content ul { list-style: disc; padding-left: 20px; color: var(--text-2); font-size: .95rem; }
.legal-content ul li { margin-bottom: 8px; line-height: 1.7; }
.legal-meta { font-size: .8rem; color: var(--text-3); margin-bottom: 40px; }

/* ================================================================
   ERROR PAGES
   ================================================================ */
.error-section { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); text-align: center; padding: 40px 20px; }
.error-code { font-family: var(--mono); font-size: clamp(4rem,10vw,8rem); font-weight: 700; color: var(--bg-4); line-height: 1; }
.error-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 8px 0 12px; }
.error-desc { font-size: .95rem; color: var(--text-2); margin-bottom: 28px; }

/* ================================================================
   FOOTER
   ================================================================ */
footer {
    padding: clamp(40px,6vw,64px) 0 clamp(20px,3vw,32px);
    background: var(--bg);
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: clamp(24px, 4vw, 48px);
    margin-bottom: clamp(24px,4vw,40px);
}
.footer-logo {
    font-family: var(--head); font-size: 1.05rem; font-weight: 800;
    color: var(--text); letter-spacing: -0.02em; margin-bottom: 10px;
}
.footer-tagline { font-size: .85rem; color: var(--text-3); line-height: 1.6; max-width: 200px; }
.footer-heading {
    font-size: .72rem; font-weight: 700; color: var(--text-3);
    text-transform: uppercase; letter-spacing: .08em;
    margin-bottom: 14px;
}
.footer-grid > div > a {
    display: block; font-size: .875rem; color: var(--text-2);
    padding: 0.3em 0; transition: color var(--ease);
}
.footer-grid > div > a:hover { color: var(--text); }
.footer-bottom {
    font-size: .78rem; color: var(--text-3);
    padding-top: 20px; border-top: 1px solid var(--border-2);
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-buttons { display: none; }

    .steps-row { grid-template-columns: 1fr; }
    .step-connector { width: 100%; height: 1px; }
    .loop-grid { grid-template-columns: 1fr; }

    .feat-row { grid-template-columns: 1fr; gap: 32px; }
    .feat-row-flip { direction: ltr; }

    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }

    .stats-row { gap: 20px; }
    .stat-divider { display: none; }
    .stat-item { flex: none; width: 50%; }
}

@media (max-width: 480px) {
    .hero-ctas { flex-direction: column; width: 100%; }
    .btn-cta, .btn-ghost { width: 100%; text-align: center; }
    .terminal-body { padding: 16px; }
    .stat-item { width: 100%; }
}


/* ================================================================
   DOCS PAGE
   ================================================================ */
.docs-section { padding: 48px 0 80px; }

.docs-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
    align-items: start;
}

.docs-toc {
    position: sticky;
    top: 80px;
}
.docs-toc ul { list-style: none; padding: 0; margin: 0; }
.docs-toc li + li { margin-top: 4px; }
.docs-toc a {
    display: block;
    font-size: .825rem;
    color: var(--text-3);
    padding: 4px 0;
    text-decoration: none;
    transition: color var(--ease);
}
.docs-toc a:hover { color: var(--text); }

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

.docs-block { margin-bottom: 48px; }
.docs-block h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}
.docs-block h3 {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.docs-block p {
    font-size: .875rem;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 12px;
}
.docs-block p:last-child { margin-bottom: 0; }
.docs-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
}
.docs-block a { color: var(--text); text-decoration: underline; }
.docs-block a:hover { color: var(--text-2); }

.code-block {
    background: #111827;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}
.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.code-lang {
    font-size: .7rem;
    font-family: 'JetBrains Mono', monospace;
    color: #6B7280;
}
.code-block pre {
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .75rem;
    color: #E5E7EB;
    line-height: 1.65;
    overflow-x: auto;
    margin: 0;
    white-space: pre;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .825rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.docs-table th {
    background: var(--surface-2);
    text-align: left;
    padding: 10px 16px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
}
.docs-table td {
    padding: 10px 16px;
    color: var(--text-2);
    border-bottom: 1px solid var(--border-2);
    vertical-align: top;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table td code {
    font-size: .75rem;
    font-weight: 500;
    color: var(--text);
}

@media (max-width: 768px) {
    .docs-layout { grid-template-columns: 1fr; }
    .docs-toc { display: none; }
}
