/*
 * ClearFeed AI — landing page.
 *
 * Hand-written rather than utility classes from a CDN, for three reasons that
 * all matter more here than the convenience does. The page's whole first
 * impression is a WebGL globe layered under glass and a vignette, which is a
 * composition of stacking contexts and blend modes that utilities express
 * badly. The Tailwind play CDN compiles the stylesheet in the browser, so it
 * lands *after* first paint — on a dark page that is a white flash, and on this
 * page it is a white flash in front of a planet. And a page about children's
 * safety should not open a connection to a third party to render its own
 * layout.
 *
 * THEMES. `data-theme` on <html> is the only switch. Every colour below reads
 * from a variable, and the globe re-lights itself in JS to match — see
 * exposure-globe.js, where the light theme is a different set of lights rather
 * than the dark one turned up.
 */

/* ---------------------------------------------------------------- tokens */

:root {
    /* Brand. The emerald is the "clean" end of the risk ramp the extension
       uses; the rose is the other end. They are not interchangeable accents. */
    --brand: #10b981;
    --brand-strong: #059669;
    --brand-soft: rgba(16, 185, 129, 0.12);
    --accent: #38bdf8;
    --danger: #fb7185;
    --warn: #fbbf24;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shell: min(1200px, 100% - 3rem);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
            'Helvetica Neue', Arial, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme='dark'] {
    --bg: #070c17;
    --bg-raised: rgba(20, 30, 48, 0.62);
    --bg-sunk: rgba(8, 14, 26, 0.72);
    --ink: #f1f5f9;
    --ink-soft: #a4b3c9;
    --ink-faint: #6b7d97;
    --line: rgba(148, 178, 220, 0.14);
    --line-strong: rgba(148, 178, 220, 0.26);
    --glass-blur: 18px;
    --shadow: 0 24px 70px -28px rgba(0, 0, 0, 0.9);
    /* Two washes and a vignette, so the globe never sits on flat black. */
    --wash-a: rgba(16, 185, 129, 0.16);
    --wash-b: rgba(56, 189, 248, 0.14);
    --vignette: radial-gradient(ellipse 120% 80% at 50% 40%,
                                transparent 30%, rgba(7, 12, 23, 0.72) 100%);
    --star-alpha: 0.55;
}

:root[data-theme='light'] {
    --bg: #f5f8fc;
    --bg-raised: rgba(255, 255, 255, 0.78);
    --bg-sunk: rgba(241, 246, 252, 0.85);
    --ink: #0d1b2a;
    --ink-soft: #4a5b70;
    --ink-faint: #7c8ca1;
    --line: rgba(13, 27, 42, 0.10);
    --line-strong: rgba(13, 27, 42, 0.18);
    --glass-blur: 16px;
    --shadow: 0 24px 60px -30px rgba(15, 40, 70, 0.35);
    --wash-a: rgba(16, 185, 129, 0.14);
    --wash-b: rgba(56, 189, 248, 0.16);
    --vignette: radial-gradient(ellipse 120% 80% at 50% 40%,
                                transparent 35%, rgba(245, 248, 252, 0.82) 100%);
    --star-alpha: 0;
    --brand-soft: rgba(16, 185, 129, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* Anchored sections land below the sticky header instead of under it. */
    scroll-padding-top: 92px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100vh;
}

::selection { background: var(--brand); color: #04150e; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 99px;
    border: 3px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--ink-faint); background-clip: content-box; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ------------------------------------------------------------- backdrop */
/*
 * Four fixed layers under everything: a colour wash, a star field, the globe's
 * own stage, and a vignette on top of all three. The vignette is what lets the
 * copy keep its contrast no matter which part of the planet has rotated behind
 * it — without it, white text over the Sahara is unreadable for about forty
 * seconds every three minutes.
 *
 * They stack at positive z-indices below the content rather than at negative
 * ones. A negative z-index only stays behind the page while <body> has no
 * background of its own to paint over it; one later rule setting a body
 * background would hide the entire backdrop, and that failure reads as "the
 * globe never loaded" rather than as a stacking mistake.
 */
.sky, .stars, .globe-stage, .vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.sky {
    z-index: 1;
    background:
        radial-gradient(60rem 40rem at 12% -10%, var(--wash-a), transparent 60%),
        radial-gradient(50rem 36rem at 92% 8%, var(--wash-b), transparent 62%),
        var(--bg);
}

/* Two tiled gradients at different scales, which is enough to stop the eye
   finding the repeat. A real star field would be a texture download for
   something nobody will look at directly. */
.stars {
    z-index: 2;
    opacity: var(--star-alpha);
    transition: opacity 0.6s var(--ease);
    background-image:
        radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 70% 12%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 45% 78%, rgba(255,255,255,0.75), transparent),
        radial-gradient(1px 1px at 88% 62%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 12% 88%, rgba(255,255,255,0.5), transparent);
    background-size: 480px 480px, 320px 320px, 560px 560px, 400px 400px, 280px 280px;
}

/*
 * The globe hangs off the right on a wide screen so the hero copy sits in the
 * dark half, and re-centres on a phone where there is no room for two columns.
 * `pointer-events: auto` is restored on the canvas alone in the JS: the stage
 * spans the viewport, and letting it swallow clicks would kill every link on
 * the page.
 */
.globe-stage {
    z-index: 3;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.4s var(--ease), transform 1.8s var(--ease);
}
.globe-stage.ready { opacity: 1; transform: scale(1); }
.globe-stage canvas { pointer-events: auto; }

@media (min-width: 1024px) {
    .globe-stage { left: 22%; }
}

.vignette {
    z-index: 4;
    background: var(--vignette);
}

/*
 * The stand-in while the bundle and the 3 MB of imagery arrive, and the
 * permanent backdrop for a browser with no WebGL. Deliberately not a spinner:
 * it is the right shape and roughly the right colour, so the swap to the real
 * planet reads as it sharpening rather than as one thing replacing another.
 */
.orb {
    position: fixed;
    top: 50%;
    left: 62%;
    width: min(70vh, 620px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 3;
    /* Not optional. Once the globe loads this fades to opacity 0 — and a
       transparent element still receives clicks, so without this it would go on
       silently swallowing them across 620px of the hero. */
    pointer-events: none;
    background:
        radial-gradient(circle at 34% 30%, rgba(56, 189, 248, 0.45), transparent 55%),
        radial-gradient(circle at 68% 72%, rgba(16, 185, 129, 0.40), transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(30, 58, 90, 0.9), rgba(7, 12, 23, 0.95));
    filter: blur(2px);
    box-shadow: 0 0 120px -20px rgba(56, 189, 248, 0.4);
    animation: orb-drift 14s ease-in-out infinite alternate;
    transition: opacity 1s var(--ease);
}
.orb.hidden { opacity: 0; }

@media (max-width: 1023px) { .orb { left: 50%; } }

@keyframes orb-drift {
    from { transform: translate(-50%, -50%) scale(1); }
    to   { transform: translate(-50%, -53%) scale(1.04); }
}

/* --------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    background: var(--bg-sunk);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
/* Only once the page has moved — a border under a header at scroll-top is a
   line across the hero for no reason. */
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
    width: var(--shell);
    margin-inline: auto;
    height: 76px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: inherit;
    margin-right: auto;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #03130d;
    box-shadow: 0 8px 24px -8px rgba(16, 185, 129, 0.7);
    flex-shrink: 0;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.brand-name span { color: var(--brand); }
.brand-tag {
    font-size: 0.68rem;
    color: var(--ink-faint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.site-nav a {
    padding: 0.5rem 0.85rem;
    border-radius: 99px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: var(--ink); background: var(--brand-soft); }

@media (max-width: 900px) { .site-nav { display: none; } }

.header-tools { display: flex; align-items: center; gap: 0.6rem; }

.select-wrap { position: relative; display: inline-flex; }
.select-wrap select {
    appearance: none;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 0.45rem 2rem 0.45rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.select-wrap select:hover { border-color: var(--line-strong); }
.select-wrap::after {
    content: '';
    position: absolute;
    right: 0.8rem;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 1.6px solid var(--ink-soft);
    border-bottom: 1.6px solid var(--ink-soft);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.select-wrap select option { background: #0f172a; color: #f1f5f9; }
:root[data-theme='light'] .select-wrap select option { background: #fff; color: #0d1b2a; }

/* Three-way theme control, matching the one on the ScrapeGraph sign-in page so
   the two products feel like they came from the same place. */
.theme-switch {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: 99px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
}
.theme-switch button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    color: var(--ink-faint);
    border-radius: 99px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed='true'] {
    background: var(--brand);
    color: #04150e;
}

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    border-radius: 99px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
                background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #03130d;
    box-shadow: 0 12px 30px -12px rgba(16, 185, 129, 0.85);
}
.btn-primary:hover { box-shadow: 0 18px 44px -12px rgba(16, 185, 129, 0.95); }

.btn-ghost {
    background: var(--bg-raised);
    border-color: var(--line-strong);
    color: var(--ink);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }

@media (max-width: 640px) { .btn-header { display: none; } }

/* ----------------------------------------------------------------- shell */

main { position: relative; z-index: 10; }

.section {
    width: var(--shell);
    margin-inline: auto;
    padding-block: clamp(4rem, 9vw, 7.5rem);
}

.section-head { max-width: 46rem; margin-bottom: 3.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 1rem;
}
.eyebrow::before {
    content: '';
    width: 22px;
    height: 1px;
    background: currentColor;
}
.section-head.center .eyebrow::before { display: none; }

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.12; font-weight: 700; }

.section-title { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section-sub {
    margin-top: 1rem;
    font-size: clamp(1rem, 1.6vw, 1.12rem);
    color: var(--ink-soft);
    max-width: 44rem;
}
.section-head.center .section-sub { margin-inline: auto; }

.grad {
    background: linear-gradient(110deg, var(--brand) 10%, var(--accent) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ------------------------------------------------------------------ hero */

.hero {
    width: var(--shell);
    margin-inline: auto;
    min-height: calc(100vh - 76px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 3rem;
    padding-block: clamp(3rem, 8vh, 6rem);
}

@media (min-width: 1024px) {
    .hero {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        align-items: center;
    }
}

.hero-copy { max-width: 40rem; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.95rem 0.45rem 0.6rem;
    border-radius: 99px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 1.75rem;
}

.dot-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: pulse 2.4s ease-out infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-lede {
    font-size: clamp(1.05rem, 1.9vw, 1.24rem);
    color: var(--ink-soft);
    max-width: 34rem;
    margin-bottom: 2.25rem;
}
.hero-lede strong { color: var(--ink); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.5rem; }

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
}
.hero-trust div { display: flex; flex-direction: column; }
.hero-trust b {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.hero-trust span { font-size: 0.8rem; color: var(--ink-faint); }

/* ------------------------------------------------- live exposure console */
/*
 * Reads the globe rather than decorating it: the place name and the
 * coordinates in the feed are the dot that was just drawn. That is the whole
 * argument of the page in one component — this is happening continuously, and
 * it is happening somewhere specific.
 */
.console {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.console-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.console-head .dot-live { margin-right: 0.15rem; }
.console-head .count {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--danger);
    font-variant-numeric: tabular-nums;
}

.feed {
    list-style: none;
    padding: 0.5rem;
    margin: 0;
    min-height: 232px;
}

.feed li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    animation: feed-in 0.45s var(--ease) both;
}
@keyframes feed-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

/* One swatch per risk tone, matching the globe's palette index for index. */
.feed .tone {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 12px currentColor;
}
.feed .t0 { background: #34d399; color: #34d399; }
.feed .t1 { background: #a3e635; color: #a3e635; }
.feed .t2 { background: #fbbf24; color: #fbbf24; }
.feed .t3 { background: #fb7185; color: #fb7185; }

/*
 * The light theme's ramp, matching THEMES.light.palette in exposure-globe.js
 * index for index.
 *
 * Not a stylistic preference — the swatch beside a row and the dot on the globe
 * are asserting the same fact, so they have to be the same colour. The dark
 * ramp above is tuned to win against a night-lit planet; on a white card those
 * same mints and ambers are barely a tint, and the row that says a child met
 * harmful content would read as the calmest one on screen.
 */
:root[data-theme='light'] .feed .t0 { background: #047857; color: #047857; }
:root[data-theme='light'] .feed .t1 { background: #3f6212; color: #3f6212; }
:root[data-theme='light'] .feed .t2 { background: #b45309; color: #b45309; }
:root[data-theme='light'] .feed .t3 { background: #be123c; color: #be123c; }
/* The glow reads as a smudge on a light background, where the dot already has
   all the contrast it needs. */
:root[data-theme='light'] .feed .tone { box-shadow: none; }

.feed .where { font-weight: 600; color: var(--ink); }
.feed .what { color: var(--ink-soft); }
.feed .coords {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--ink-faint);
    white-space: nowrap;
}
@media (max-width: 480px) { .feed .coords { display: none; } }

.console-foot {
    padding: 0.85rem 1.15rem;
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
    color: var(--ink-faint);
}

/* ------------------------------------------------------------ stat cards */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.stat {
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: transform 0.3s var(--ease), border-color 0.3s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--line-strong); }

.stat b {
    display: block;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat.hot b { background: linear-gradient(135deg, var(--warn), var(--danger)); -webkit-background-clip: text; background-clip: text; }
.stat p { margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink-soft); }
.stat cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.7rem;
    font-style: normal;
    color: var(--ink-faint);
}

/* --------------------------------------------------------------- feature */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card {
    position: relative;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    overflow: hidden;
    transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}
/* A gradient edge that only appears on hover. Painted on a pseudo-element
   rather than the border so it can fade rather than snap. */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s var(--ease);
    pointer-events: none;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }

.card-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 1.35rem;
}
.card-icon.blue  { background: rgba(56, 189, 248, 0.13); color: #38bdf8; }
.card-icon.amber { background: rgba(251, 191, 36, 0.13); color: #fbbf24; }
.card-icon.rose  { background: rgba(251, 113, 133, 0.13); color: #fb7185; }
.card-icon.violet{ background: rgba(167, 139, 250, 0.14); color: #a78bfa; }

.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------------------------------------------------- risk category rows */

.risk-list { display: grid; gap: 0.85rem; }

.risk-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem 1.35rem;
    border-radius: var(--radius);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: border-color 0.25s, transform 0.25s var(--ease);
}
.risk-row:hover { border-color: var(--line-strong); transform: translateX(4px); }

.risk-glyph {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.risk-row h4 { font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em; }
.risk-row p { font-size: 0.85rem; color: var(--ink-soft); }

.risk-tag {
    font-family: var(--mono);
    font-size: 0.68rem;
    padding: 0.28rem 0.6rem;
    border-radius: 99px;
    border: 1px solid var(--line-strong);
    color: var(--ink-faint);
    white-space: nowrap;
}
@media (max-width: 640px) { .risk-tag { display: none; } }

/* The same pill as .risk-tag, but it never hides. It carries the release
   number inside the download button, and a download button that stops naming
   its version on a phone is exactly where the ambiguity costs most. */
.version-chip {
    font-family: var(--mono);
    font-size: 0.68rem;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    border: 1px solid currentColor;
    opacity: 0.75;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ flow */

.flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    position: relative;
}

.step { text-align: center; position: relative; }

/* The connector between steps, drawn only where there is a next step to
   connect to and only on a row wide enough to have one. */
@media (min-width: 780px) {
    .step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 32px;
        left: calc(50% + 44px);
        width: calc(100% - 88px + 2rem);
        height: 1px;
        background: linear-gradient(90deg, var(--line-strong), transparent);
    }
}

.step-num {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    display: grid;
    place-items: center;
    border-radius: 20px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand);
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    position: relative;
    z-index: 1;
}
.step h3 { font-size: 1.08rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; color: var(--ink-soft); }

/* --------------------------------------------------------------- install */

.install-list { display: grid; gap: 0.75rem; counter-reset: step; }

.install-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.1rem;
    align-items: start;
    padding: 1.1rem 1.35rem;
    border-radius: var(--radius);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: border-color 0.25s;
}
.install-step:hover { border-color: var(--brand); }
.install-step::before {
    counter-increment: step;
    content: counter(step);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.8rem;
    font-weight: 700;
}
.install-step p { font-size: 0.93rem; color: var(--ink-soft); }
.install-step strong { color: var(--ink); font-weight: 600; }

code {
    font-family: var(--mono);
    font-size: 0.85em;
    padding: 0.15em 0.45em;
    border-radius: 6px;
    background: var(--bg-sunk);
    border: 1px solid var(--line);
    color: var(--brand);
}

/* -------------------------------------------------------------- call-out */

.callout {
    position: relative;
    overflow: hidden;
    padding: clamp(2.5rem, 6vw, 4.5rem);
    border-radius: var(--radius-xl);
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    text-align: center;
    box-shadow: var(--shadow);
}
.callout::after {
    content: '';
    position: absolute;
    inset: -40% 30% auto -20%;
    height: 140%;
    background: radial-gradient(circle, var(--brand-soft), transparent 62%);
    pointer-events: none;
}
.callout > * { position: relative; z-index: 1; }
.callout h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.callout p { color: var(--ink-soft); max-width: 38rem; margin: 0 auto 2rem; }

/* ---------------------------------------------------------------- footer */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-sunk);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    position: relative;
    z-index: 10;
}
.footer-inner {
    width: var(--shell);
    margin-inline: auto;
    padding-block: 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--brand); }
.footer-note { font-size: 0.82rem; color: var(--ink-faint); }

/* --------------------------------------------------------------- reveals */
/*
 * Opt-in through a class the script adds, so a browser without
 * IntersectionObserver never hides anything it cannot later reveal.
 */
.js-reveal .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js-reveal .reveal.shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .js-reveal .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------- view transition ink */
/* The theme ripple. Both snapshots are stacked and the new one is clipped
   open over the old, so nothing cross-fades and the globe underneath does not
   flicker mid-swap. */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* --------------------------------------------------------------- pricing */
/*
 * Three tiers, the middle one raised. They mirror the plans the API enforces
 * (Guest, Trial, Pro), so this block should change when those do and not
 * before.
 */
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.price {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}
.price:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.price.featured { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand), var(--shadow); }

.price-badge {
    position: absolute;
    top: 1.15rem;
    right: 1.15rem;
    padding: 0.3rem 0.65rem;
    border-radius: 99px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.price h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 0.6rem;
}
.price-amount {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.7rem;
}
.price-amount small,
.price-amount .or {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ink-faint);
}
.price-desc { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 1.35rem; }

.price-list {
    list-style: none;
    display: grid;
    gap: 0.6rem;
    margin: 0 0 1.75rem;
    padding: 0;
    flex: 1;
}
.price-list li {
    position: relative;
    padding-left: 1.7rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.price-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.68rem;
    font-weight: 700;
}
.price-list li.no { color: var(--ink-faint); }
.price-list li.no::before { content: '–'; background: var(--bg-sunk); color: var(--ink-faint); }

.price .btn { width: 100%; margin-top: auto; }
.btn[aria-disabled='true'] { opacity: 0.55; pointer-events: none; }

.price-note {
    max-width: 46rem;
    margin: 1.75rem auto 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--ink-faint);
}
.price-note a { color: var(--brand); text-decoration: none; }
.price-note a:hover { text-decoration: underline; }

/* ----------------------------------------------------------- placeholder */
/*
 * [[FIELDS]] still to be filled in — the Pro price here, the controller's
 * name and address on the legal pages. Painted loudly on purpose: a
 * placeholder that blends in is a placeholder that ships.
 */
.ph {
    padding: 0 0.3em;
    border-radius: 4px;
    background: rgba(251, 191, 36, 0.22);
    color: var(--warn);
    font-family: var(--mono);
    font-size: 0.9em;
    font-weight: 600;
}
:root[data-theme='light'] .ph { background: rgba(251, 191, 36, 0.32); color: #92400e; }

/* ---------------------------------------------------------- install note */

.install-note {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 1.25rem;
    padding: 0.9rem 1.15rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--line-strong);
    font-size: 0.88rem;
    color: var(--ink-soft);
}
.install-note svg { flex-shrink: 0; margin-top: 0.15rem; color: var(--accent); }
.install-note strong { color: var(--ink); }

/* ------------------------------------------------------ footer disclaimer */

.footer-disclaimer {
    margin-top: 0.4rem;
    max-width: 36rem;
    font-size: 0.74rem;
    color: var(--ink-faint);
}

/* ------------------------------------------------------------ why / compare */
/*
 * The category comparison. Cells are coloured by class (yes / part / no), the
 * words inside come from the i18n table, so the colour and the claim can be
 * audited separately. The ClearFeed column is tinted, not louder.
 */
.compare-wrap {
    margin-top: 2.5rem;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}
.compare {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.compare caption {
    caption-side: top;
    text-align: left;
    padding: 1rem 1.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.compare th, .compare td {
    padding: 0.85rem 1.1rem;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
}
.compare thead th {
    color: var(--ink);
    font-weight: 600;
    background: var(--bg-sunk);
    white-space: nowrap;
}
.compare tbody th { color: var(--ink); font-weight: 600; width: 22%; }
.compare .cf { background: var(--brand-soft); }
.compare thead th.cf { color: var(--brand); }
.compare td.yes { color: var(--ink); }
.compare td.yes::before { content: '\2713\00a0'; color: var(--brand); font-weight: 700; }
.compare td.part::before { content: '\25D0\00a0'; color: var(--warn); font-weight: 700; }
.compare td.no { color: var(--ink-faint); }
.compare td.no::before { content: '\2014\00a0'; }
.compare-note {
    padding: 0.85rem 1.25rem 1rem;
    font-size: 0.74rem;
    color: var(--ink-faint);
}

/* --------------------------------------------------------- pricing extras */

.price-alt {
    margin: -0.35rem 0 0.7rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.price-sub {
    margin-top: 0.7rem;
    text-align: center;
    font-size: 0.74rem;
    color: var(--ink-faint);
}

/* ------------------------------------------------------------------ trust */

.trust-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.trust-item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}
.trust-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
}
.trust-item p { font-size: 0.9rem; color: var(--ink-soft); }
.trust-item strong { color: var(--ink); font-weight: 600; }
.trust-item a { color: inherit; text-decoration: underline; text-decoration-color: var(--brand); }
.trust-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* -------------------------------------------------------------------- faq */

.faq-list { max-width: 52rem; margin-inline: auto; display: grid; gap: 0.75rem; }
.faq {
    border-radius: var(--radius);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding: 0 1.25rem;
    transition: border-color 0.25s;
}
.faq[open] { border-color: var(--line-strong); }
.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 1.05rem 2.4rem 1.05rem 0;
    font-weight: 600;
    color: var(--ink);
    position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
}
.faq[open] summary::after { content: '\2013'; }
.faq p { padding: 0 0 1.1rem; font-size: 0.92rem; color: var(--ink-soft); }
.faq p a { color: var(--brand); }

/* ---------------------------------------------------------- small pages */
/* welcome / goodbye / verify-email: one card, the landing chrome around it. */

.page-card {
    position: relative;
    z-index: 10;
    width: min(100% - 2rem, 44rem);
    margin: clamp(2rem, 6vw, 4rem) auto;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    box-shadow: var(--shadow);
}
.page-card h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 0.6rem; }
.page-card .lede { color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 1.5rem; }
.page-card p { color: var(--ink-soft); }
.page-card .flow { margin: 1.5rem 0 2rem; }
.page-card .step { text-align: left; }
.page-card .step-num { margin: 0 0 0.9rem; }
.page-card .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.page-card .fine { font-size: 0.8rem; color: var(--ink-faint); margin-top: 1.5rem; }
.page-card .fine a { color: var(--brand); text-decoration: none; }

.choice-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.choice-list a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-sunk);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s var(--ease);
}
.choice-list a:hover { border-color: var(--brand); transform: translateX(4px); }
.choice-list .num {
    width: 28px; height: 28px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--brand-soft); color: var(--brand);
    font-size: 0.8rem; font-weight: 700;
}

.status {
    display: none;
    margin-top: 1.25rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}
.status.ok { display: block; background: rgba(16, 185, 129, 0.12); color: var(--ink); border: 1px solid rgba(16, 185, 129, 0.4); }
.status.err { display: block; background: rgba(251, 113, 133, 0.12); color: var(--ink); border: 1px solid rgba(251, 113, 133, 0.4); }
.status.busy { display: block; background: var(--bg-sunk); color: var(--ink-soft); border: 1px solid var(--line); }
