/*
 * VelocityVerify 1.5 — Production Redesign Homepage Stylesheet
 * Integrates Apple-inspired precision diagnostic instrument, bento hierarchy,
 * connection quality storytelling, research grid, education guide, and AdSense zones.
 */

/* ── Global Page Reset for Homepage ────────────────────────── */
body {
    margin: 0;
    color: var(--text, #f5f5f7);
    background: var(--bg, #000000);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input {
    font: inherit;
}

.eyebrow {
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--secondary, #a1a1aa);
}

.section-title {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.03;
    letter-spacing: -0.045em;
    margin: 12px 0 16px;
}

.section-copy {
    max-width: 650px;
    color: var(--secondary, #a1a1aa);
    font-size: 18px;
    margin: 0;
}

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 104px 0 56px;
    text-align: center;
}
.hero:before {
    content: "";
    position: absolute;
    z-index: -1;
    width: min(900px, 100vw);
    height: 600px;
    left: 50%;
    top: -90px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at 50% 34%, rgba(255, 55, 95, 0.18), rgba(255, 0, 60, 0.06) 30%, transparent 70%);
    filter: blur(8px);
}
.hero-kicker {
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
    background: linear-gradient(90deg, #ff375f, #ff9f0a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero h1 {
    font-size: clamp(54px, 8vw, 96px);
    line-height: 0.94;
    letter-spacing: -0.065em;
    max-width: 980px;
    margin: 0 auto 26px;
}
.hero h1 span {
    display: block;
    background: linear-gradient(180deg, #ffffff 0%, #8e8e93 72%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p {
    max-width: 680px;
    margin: 0 auto 30px;
    color: var(--secondary, #a1a1aa);
    font-size: clamp(18px, 2.2vw, 22px);
    letter-spacing: -0.01em;
}
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin: 0 0 30px;
}
.hero-primary {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--red, #ff003c);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 10px 34px rgba(255, 0, 60, 0.32), 0 0 28px rgba(255, 0, 60, 0.14);
    transition: transform 0.18s ease, filter 0.18s ease;
}
.hero-primary:hover {
    transform: scale(1.02);
    filter: brightness(1.08);
}
.hero-link {
    text-decoration: none;
    color: #ff5277;
    font-size: 17px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
}
.hero-link span {
    font-size: 24px;
    line-height: 1;
}
.trust {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.trust span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    background: rgba(255, 255, 255, 0.035);
    color: var(--secondary, #a1a1aa);
    font-size: 13px;
}
.trust a, .trust-badge-link {
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    background: rgba(255, 255, 255, 0.035);
    color: var(--secondary, #a1a1aa);
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.trust a:hover, .trust-badge-link:hover {
    color: var(--text, #f5f5f7);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.07);
}
.trust .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green, #30d158);
}

/* ── Precision Diagnostic Instrument ───────────────────────── */
.instrument-shell {
    position: relative;
    padding: 0 0 96px;
}
.instrument-shell:before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 80px;
    transform: translateX(-50%);
    width: min(980px, 90vw);
    height: 620px;
    background: radial-gradient(ellipse, rgba(255, 0, 60, 0.18), rgba(255, 0, 60, 0.04) 38%, transparent 70%);
    filter: blur(45px);
}
.instrument-shell:after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 52%;
    width: min(1080px, 94vw);
    height: 2px;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg, transparent, rgba(255, 0, 60, 0.28), #ff174f, rgba(255, 0, 60, 0.28), transparent);
    filter: blur(8px);
    box-shadow: 0 0 44px rgba(255, 0, 60, 0.55);
}

.instrument {
    position: relative;
    max-width: 1000px;
    margin: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 32px;
    background: radial-gradient(circle at 50% 0, rgba(255, 55, 95, 0.12), transparent 35%), linear-gradient(180deg, rgba(36, 36, 40, 0.82), rgba(8, 8, 10, 0.94));
    -webkit-backdrop-filter: blur(40px) saturate(160%);
    backdrop-filter: blur(40px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(255, 0, 60, 0.12), 0 0 0 1px rgba(255, 0, 60, 0.12), 0 0 38px rgba(255, 0, 60, 0.16), 0 52px 120px rgba(0, 0, 0, 0.78);
    overflow: hidden;
}
.instrument:after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff5277, transparent);
    box-shadow: 0 0 16px rgba(255, 0, 60, 0.9);
    pointer-events: none;
}

.instrument-head {
    padding: 24px 28px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent);
}
.status {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--secondary, #a1a1aa);
}
.status i {
    width: 8px;
    height: 8px;
    background: #67ff91;
    border-radius: 50%;
    box-shadow: 0 0 8px #30d158, 0 0 22px rgba(48, 209, 88, 0.7);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
[data-ui-state="running"] .status i {
    background: #3b82f6;
    box-shadow: 0 0 8px #3b82f6, 0 0 20px rgba(59, 130, 246, 0.7);
    animation: statusPulse 1.4s infinite ease-in-out;
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}
@media (prefers-reduced-motion: reduce) {
    [data-ui-state="running"] .status i {
        animation: none;
    }
}
[data-ui-state="error"] .status i {
    background: #ff003c;
    box-shadow: 0 0 8px #ff003c, 0 0 20px rgba(255, 0, 60, 0.7);
}
.node {
    font-size: 13px;
    color: var(--muted, #7a7a82);
}

/* ── Use-Case Preset Selector ──────────────────────────────── */
.presets {
    display: flex;
    justify-content: center;
    padding: 22px 20px 8px;
    gap: 4px;
}
.preset, .use-case-pill {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--secondary, #a1a1aa);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.preset[aria-pressed="true"], .use-case-pill.is-active {
    background: var(--selected, #2c2c2e);
    color: var(--text, #f5f5f7);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.preset:hover:not([aria-pressed="true"]) {
    color: var(--text, #f5f5f7);
}

/* ── Symmetrical Meter Layout ──────────────────────────────── */
.meter-layout {
    display: grid;
    grid-template-columns: 1fr 250px 1fr;
    align-items: center;
    padding: 38px 55px 34px;
    gap: 34px;
}
.metric, .testArea {
    text-align: center;
    position: relative;
}
.metric-label, .testName {
    font-size: 13px;
    color: var(--secondary, #a1a1aa);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.meter-canvas-wrap {
    position: relative;
    width: 160px;
    height: 88px;
    margin: 0 auto;
}
canvas.meter {
    width: 160px;
    height: 88px;
    display: block;
    margin: 0 auto;
}
.metric-value, .meterText {
    font-size: clamp(42px, 6vw, 68px);
    letter-spacing: -0.055em;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
    min-height: 1em;
}
div.meterText:empty:before {
    content: "—";
}
.metric-grade {
    font-size: 0.35em;
    vertical-align: middle;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(48, 209, 88, 0.15);
    color: var(--green, #30d158);
    font-weight: 600;
}
.metric-unit, .unit {
    font-size: 13px;
    color: var(--muted, #7a7a82);
    margin-top: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Concentric-Ring START Control ─────────────────────────── */
.go-wrap {
    display: grid;
    place-items: center;
}
.go, #startStopBtn {
    width: 196px;
    height: 196px;
    border-radius: 50%;
    color: #ffffff;
    background: radial-gradient(circle at 50% 42%, #26262b 0, #111114 48%, #050506 100%);
    border: 2px solid #ff174f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 34px rgba(255, 0, 60, 0.16), 0 0 10px rgba(255, 0, 60, 0.85), 0 0 38px rgba(255, 0, 60, 0.48), 0 22px 60px rgba(0, 0, 0, 0.62);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.45), 0 0 22px rgba(255, 0, 60, 0.75);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0.16em;
    cursor: pointer;
    position: relative;
    transition: transform 0.18s var(--ease, cubic-bezier(.2, .8, .2, 1)), filter 0.18s, box-shadow 0.25s ease, background 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.go-label {
    display: inline;
}
.go-label-running {
    display: none;
}
#startStopBtn.running .go-label,
.go.running .go-label {
    display: none;
}
#startStopBtn.running .go-label-running,
.go.running .go-label-running {
    display: inline;
}
.ring-inner {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 82, 119, 0.65);
    box-shadow: inset 0 0 18px rgba(255, 0, 60, 0.2), 0 0 12px rgba(255, 0, 60, 0.38);
    pointer-events: none;
}
.go:after, #startStopBtn:after {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 0, 60, 0.28);
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.2);
    pointer-events: none;
}
.go:hover, #startStopBtn:hover {
    transform: scale(1.035);
    background: radial-gradient(circle at 50% 42%, #34343a 0, #151518 48%, #070708 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 42px rgba(255, 0, 60, 0.22), 0 0 12px rgba(255, 0, 60, 1), 0 0 52px rgba(255, 0, 60, 0.62), 0 26px 68px rgba(0, 0, 0, 0.7);
}
.go:active, #startStopBtn:active {
    transform: scale(0.965);
    box-shadow: inset 0 0 46px rgba(255, 0, 60, 0.34), 0 0 8px rgba(255, 0, 60, 0.9), 0 0 28px rgba(255, 0, 60, 0.42);
}
.go.running, #startStopBtn.running {
    background: radial-gradient(circle, #201014 0, #09090b 70%);
    border-color: #ff453a;
    color: #ffffff;
    box-shadow: inset 0 0 42px rgba(255, 69, 58, 0.2), 0 0 12px rgba(255, 69, 58, 0.9), 0 0 42px rgba(255, 0, 60, 0.5);
}
.go:focus-visible, #startStopBtn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 6px;
}

/* ── Submetrics Bar ────────────────────────────────────────── */
.submetrics {
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    display: flex;
}
.submetric {
    flex: 1;
    padding: 20px 16px;
    text-align: center;
    border-right: 1px solid var(--line, rgba(255, 255, 255, 0.12));
}
.submetric:last-child {
    border-right: 0;
}
.submetric b, .submetric .submetric-val {
    display: block;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    color: var(--text, #f5f5f7);
    line-height: 1.2;
}
.submetric span, .submetric .submetric-lbl {
    display: block;
    font-size: 12px;
    color: var(--muted, #7a7a82);
    margin-top: 4px;
}
.submetric[hidden] {
    display: none !important;
}

/* ── Instrument Privacy Footer ─────────────────────────────── */
.privacy {
    padding: 22px 28px;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--secondary, #a1a1aa);
    font-size: 13px;
}
.privacy a {
    text-decoration: none;
    color: var(--text, #f5f5f7);
    font-weight: 500;
}
.privacy a:hover {
    text-decoration: underline;
}

/* ── Error Banner ──────────────────────────────────────────── */
.error-banner {
    margin: 16px 28px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255, 69, 58, 0.12);
    border: 1px solid rgba(255, 69, 58, 0.3);
    display: flex;
    align-items: center;
    gap: 16px;
}
.error-banner[hidden] {
    display: none !important;
}
.error-icon {
    font-size: 24px;
}
.error-text {
    flex: 1;
    margin: 0;
    color: #ff6b6b;
    font-size: 14px;
    text-align: left;
}
.btn-retry {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: #ff453a;
    color: #ffffff;
    border: 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.18s ease;
}
.btn-retry:hover {
    filter: brightness(1.1);
}

/* ── Completed Actions Bar ─────────────────────────────────── */
.share-actions-bar {
    padding: 24px 28px;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.015);
}
.share-actions-bar[hidden] {
    display: none !important;
}
.cta-button {
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, filter 0.18s ease;
}
.cta-button:hover {
    transform: scale(1.02);
}
.btn-primary {
    background: var(--red, #ff003c);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 0, 60, 0.3);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    color: var(--text, #f5f5f7);
}

/* ── History Drawer ────────────────────────────────────────── */
.history-container {
    padding: 24px 28px;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    background: rgba(0, 0, 0, 0.2);
}
.history-container[hidden] {
    display: none !important;
}
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.history-header h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -0.01em;
}
.clear-history-btn, #clearHistoryBtn {
    min-height: 44px;
    min-width: 44px;
    padding: 0 16px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    background: transparent;
    color: var(--secondary, #a1a1aa);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.clear-history-btn:hover, #clearHistoryBtn:hover {
    color: var(--text, #f5f5f7);
    border-color: var(--red, #ff003c);
    background: rgba(255, 0, 60, 0.1);
}
#errorRetry, .btn-retry {
    min-height: 44px;
    min-width: 44px;
    padding: 0 20px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--red, #ff003c);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.18s ease, filter 0.18s ease;
}
.history-table-wrapper {
    overflow-x: auto;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}
.history-table th {
    padding: 10px 14px;
    color: var(--muted, #7a7a82);
    font-weight: 500;
    border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.12));
}
.history-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-variant-numeric: tabular-nums;
}

/* ── Analysis Section ──────────────────────────────────────── */
.analysis {
    padding: 96px 0;
}
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 38px;
}
.section-head a {
    font-size: 14px;
    text-decoration: none;
    color: var(--secondary, #a1a1aa);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.section-head a:hover {
    color: var(--text, #f5f5f7);
}
.cards {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    grid-template-rows: repeat(2, minmax(235px, auto));
    gap: 16px;
}
.card {
    background: linear-gradient(145deg, #17171a, #09090a);
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    border-radius: 24px;
    padding: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
.card:first-child {
    grid-row: 1 / 3;
    min-height: 490px;
    padding: 36px;
}
.card:after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: 16px;
    top: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 55, 95, 0.12), transparent 70%);
    pointer-events: none;
}
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card .icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--surface, #141416);
    display: grid;
    place-items: center;
    color: var(--red, #ff003c);
    font-size: 18px;
    box-shadow: inset 0 0 12px rgba(255, 0, 60, 0.12), 0 0 18px rgba(255, 0, 60, 0.09);
}
.grade {
    font-size: 12px;
    color: var(--green, #30d158);
    background: rgba(48, 209, 88, 0.1);
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 600;
}
.card h3 {
    font-size: 22px;
    letter-spacing: -0.025em;
    margin: 28px 0 8px;
}
.card:first-child h3 {
    font-size: 36px;
    margin-top: 46px;
}
.card p {
    color: var(--secondary, #a1a1aa);
    font-size: 14px;
    margin: 0;
}
.card:first-child p {
    font-size: 16px;
    max-width: 430px;
}
.spark {
    margin-top: auto;
    height: 46px;
    display: flex;
    align-items: flex-end;
    gap: 5px;
}
.card:first-child .spark {
    height: 150px;
    gap: 9px;
}
.spark i {
    flex: 1;
    border-radius: 4px 4px 1px 1px;
    background: linear-gradient(var(--red2, #ff375f), rgba(255, 0, 60, 0.16));
}

/* ── Connection Quality Storytelling ───────────────────────── */
.quality-story {
    padding: 130px 0;
    background: linear-gradient(180deg, #050506, #101014 54%, #050506);
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    overflow: hidden;
}
.quality-grid {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    align-items: center;
    gap: 80px;
}
.quality-copy h2 {
    font-size: clamp(48px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    margin: 18px 0 24px;
}
.quality-copy h2 span {
    color: #8e8e93;
}
.quality-copy p {
    max-width: 530px;
    color: var(--secondary, #a1a1aa);
    font-size: 18px;
    margin-bottom: 20px;
}
.quality-label-row {
    margin-bottom: 20px;
}
.quality-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--secondary, #a1a1aa);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    border-radius: 999px;
    padding: 4px 12px;
}
.quality-copy a {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    color: #ff5277;
    text-decoration: none;
    font-size: 17px;
    min-height: 44px;
}
.quality-copy a b {
    font-size: 24px;
    margin-left: 4px;
}
.quality-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 580px;
    margin-left: auto;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 55, 95, 0.12), transparent 56%);
}
.quality-orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    inset: 10%;
}
.quality-orbit:after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--red2, #ff375f);
    top: 11%;
    left: 15%;
    box-shadow: 0 0 20px var(--red, #ff003c);
}
.orbit-2 {
    inset: 24%;
    border-color: rgba(255, 255, 255, 0.18);
}
.orbit-2:after {
    top: auto;
    left: auto;
    right: 8%;
    bottom: 22%;
    background: var(--green, #30d158);
    box-shadow: 0 0 18px rgba(48, 209, 88, 0.65);
}
.quality-score {
    position: absolute;
    inset: 31%;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(40, 40, 45, 0.92), rgba(9, 9, 11, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 25px 70px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.quality-score small {
    font-size: 11px;
    color: var(--secondary, #a1a1aa);
}
.quality-score strong {
    font-size: 72px;
    line-height: 1;
    letter-spacing: -0.07em;
}
.quality-score span {
    font-size: 13px;
    color: var(--green, #30d158);
    font-weight: 600;
}
.quality-chip {
    position: absolute;
    min-width: 130px;
    padding: 13px 16px;
    border-radius: 18px;
    background: rgba(30, 30, 34, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.34);
}
.quality-chip b {
    display: block;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
}
.quality-chip span {
    display: block;
    color: var(--secondary, #a1a1aa);
    font-size: 11px;
}
.chip-a { left: 0; top: 22%; }
.chip-b { right: 0; top: 28%; }
.chip-c { right: 8%; bottom: 12%; }

/* ── AdSense-Safe Advertising Zones ────────────────────────── */
.ad-zone {
    margin: 72px auto;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    min-height: 250px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted, #7a7a82);
    background: transparent;
}
.ad-zone.compact {
    min-height: 110px;
    margin: 72px auto;
}
.ad-zone.optional {
    min-height: 110px;
}
.ad-zone[hidden] {
    display: none !important;
}
.ad-zone small {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
    margin-bottom: 7px;
    color: var(--muted, #7a7a82);
}
.ad-zone span {
    font-size: 13px;
}
.ad-zone, .ad-zone * {
    text-shadow: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* ── Original Research Section ─────────────────────────────── */
.research, .education {
    padding: 76px 0;
}
.research-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 42px;
}
.story {
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    border-radius: 20px;
    padding: 0;
    background: linear-gradient(145deg, #161619, #080809);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.story:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 0, 60, 0.12);
}
.story-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #0c0d0e;
    position: relative;
}
.story-media picture,
.story-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.story:hover .story-img {
    transform: scale(1.05);
}
@media (prefers-reduced-motion: reduce) {
    .story,
    .story:hover,
    .story .story-img,
    .story:hover .story-img {
        transform: none !important;
        transition: none !important;
    }
}
.story-content {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.story-tag {
    font-size: 11px;
    color: var(--red2, #ff375f);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    margin-bottom: 8px;
}
.story h3 {
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    position: relative;
    z-index: 1;
    color: #fff;
}
.story.small h3 {
    font-size: 18px;
}
.story p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--secondary, #a1a1aa);
    position: relative;
    z-index: 1;
    margin: 0;
    flex-grow: 1;
}
.story-meta {
    font-size: 11px;
    color: var(--muted, #7a7a82);
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

/* ── Educational Guide Section ─────────────────────────────── */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 46px;
}
.edu {
    min-height: 210px;
    padding: 26px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    border-radius: 24px;
    background: linear-gradient(145deg, #17171a, #0a0a0b);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.edu:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.22);
}
.edu b {
    font-size: 22px;
    letter-spacing: -0.025em;
    display: block;
    margin-bottom: 12px;
}
.edu p {
    font-size: 14px;
    color: var(--secondary, #a1a1aa);
    margin: 0;
    line-height: 1.5;
}

/* ── Monthly Intelligence Newsletter ───────────────────────── */
.newsletter {
    margin: 90px auto;
    padding: 50px;
    border-radius: 28px;
    background: var(--text, #f5f5f7);
    color: #000000;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 36px;
    box-shadow: 0 24px 80px rgba(255, 255, 255, 0.08);
}
.newsletter h2 {
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: -0.045em;
    margin: 0 0 10px;
}
.newsletter p {
    margin: 0;
    color: #5d5d62;
    font-size: 16px;
}
.newsletter form {
    display: flex;
    gap: 8px;
}
.newsletter input {
    width: 250px;
    min-height: 48px;
    border: 1px solid #d2d2d7;
    background: #ffffff;
    border-radius: 13px;
    padding: 0 14px;
    color: #000000;
}
.newsletter button {
    min-height: 48px;
    border: 0;
    border-radius: 13px;
    background: #000000;
    color: #ffffff;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.18s ease;
}
.newsletter button:hover {
    filter: brightness(1.2);
}
.newsletter-message {
    font-size: 13px;
    margin-top: 8px;
}

/* ── Editorial Transparency Section ────────────────────────── */
.transparency {
    padding: 36px 0 80px;
}
.transparency-in {
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 50px;
}
.transparency h3 {
    margin: 0;
    font-size: 17px;
    letter-spacing: -0.01em;
}
.transparency p {
    max-width: 720px;
    margin: 0;
    color: var(--secondary, #a1a1aa);
    font-size: 14px;
}

/* ── Light Mode System Refinements ─────────────────────────── */
html[data-theme="light"] .hero:before {
    background: radial-gradient(ellipse at 50% 34%, rgba(255, 55, 95, 0.13), rgba(255, 0, 60, 0.035) 34%, transparent 70%);
}
html[data-theme="light"] .hero h1 {
    color: #1d1d1f;
}
html[data-theme="light"] .hero h1 span {
    background: linear-gradient(180deg, #3a3a3c, #8e8e93 75%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
html[data-theme="light"] .hero p {
    color: #6e6e73;
}
html[data-theme="light"] .trust span,
html[data-theme="light"] .trust a {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(0, 0, 0, 0.11);
    color: #515154;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .trust a:hover {
    color: #000000;
}

/* Light Instrument */
html[data-theme="light"] .instrument {
    background: radial-gradient(circle at 50% 0, rgba(255, 55, 95, 0.11), transparent 38%), linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 246, 248, 0.98));
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(255, 0, 60, 0.08), 0 0 0 1px rgba(255, 0, 60, 0.09), 0 0 38px rgba(255, 0, 60, 0.10), 0 42px 100px rgba(50, 50, 60, 0.16);
}
html[data-theme="light"] .instrument-head,
html[data-theme="light"] .submetrics,
html[data-theme="light"] .privacy,
html[data-theme="light"] .share-actions-bar,
html[data-theme="light"] .history-container {
    border-color: rgba(0, 0, 0, 0.10);
}
html[data-theme="light"] .status,
html[data-theme="light"] .node,
html[data-theme="light"] .metric-label,
html[data-theme="light"] .metric-unit,
html[data-theme="light"] .submetric span,
html[data-theme="light"] .submetric .submetric-lbl,
html[data-theme="light"] .privacy {
    color: #6e6e73;
}
html[data-theme="light"] .metric-value,
html[data-theme="light"] .submetric b,
html[data-theme="light"] .submetric .submetric-val,
html[data-theme="light"] .privacy a {
    color: #1d1d1f;
    text-shadow: none;
}
html[data-theme="light"] .preset,
html[data-theme="light"] .use-case-pill {
    color: #6e6e73;
}
html[data-theme="light"] .preset[aria-pressed="true"],
html[data-theme="light"] .use-case-pill.is-active {
    background: #ffffff;
    color: #1d1d1f;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .go,
html[data-theme="light"] #startStopBtn {
    background: radial-gradient(circle at 50% 42%, #ffffff 0, #f8f8fa 48%, #efeff2 100%);
    border-color: #ff174f;
    color: #d90033;
    box-shadow: inset 0 1px 0 #fff, inset 0 0 24px rgba(255, 0, 60, 0.08), 0 0 10px rgba(255, 0, 60, 0.35), 0 0 30px rgba(255, 0, 60, 0.16), 0 18px 45px rgba(0, 0, 0, 0.12);
    text-shadow: none;
}
html[data-theme="light"] .go .ring-inner,
html[data-theme="light"] #startStopBtn .ring-inner {
    border-color: rgba(255, 0, 60, 0.45);
    box-shadow: inset 0 0 14px rgba(255, 0, 60, 0.1), 0 0 8px rgba(255, 0, 60, 0.2);
}
html[data-theme="light"] .go:after,
html[data-theme="light"] #startStopBtn:after {
    border-color: rgba(255, 0, 60, 0.22);
    box-shadow: 0 0 14px rgba(255, 0, 60, 0.12);
}
html[data-theme="light"] .go:hover,
html[data-theme="light"] #startStopBtn:hover {
    background: radial-gradient(circle at 50% 42%, #ffffff 0, #f2f2f5 48%, #e8e8ed 100%);
    box-shadow: inset 0 1px 0 #fff, inset 0 0 28px rgba(255, 0, 60, 0.12), 0 0 12px rgba(255, 0, 60, 0.5), 0 0 36px rgba(255, 0, 60, 0.22), 0 20px 50px rgba(0, 0, 0, 0.16);
}
html[data-theme="light"] .go.running,
html[data-theme="light"] #startStopBtn.running {
    background: #ffffff;
    border-color: #ff453a;
    color: #d90033;
    box-shadow: inset 0 0 28px rgba(255, 69, 58, 0.12), 0 0 12px rgba(255, 69, 58, 0.5), 0 0 32px rgba(255, 0, 60, 0.2);
}
html[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1d1d1f;
}
html[data-theme="light"] .history-table th {
    border-color: rgba(0, 0, 0, 0.10);
    color: #6e6e73;
}
html[data-theme="light"] .history-table td {
    border-color: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

/* Light Analysis Cards */
html[data-theme="light"] .analysis .eyebrow,
html[data-theme="light"] .section-copy,
html[data-theme="light"] .section-head a {
    color: #6e6e73;
}
html[data-theme="light"] .card,
html[data-theme="light"] .edu {
    background: linear-gradient(145deg, #ffffff, #f1f1f4);
    border-color: rgba(0, 0, 0, 0.11);
    box-shadow: inset 0 1px 0 #fff, 0 14px 36px rgba(0, 0, 0, 0.055);
}
html[data-theme="light"] .card h3,
html[data-theme="light"] .edu b {
    color: #1d1d1f;
}
html[data-theme="light"] .card p,
html[data-theme="light"] .edu p {
    color: #6e6e73;
}
html[data-theme="light"] .card .icon {
    background: #f2f2f5;
}

/* Light Connection Quality Visualization */
html[data-theme="light"] .quality-story {
    background: linear-gradient(180deg, #ffffff, #f2f2f5 54%, #ffffff);
    border-color: rgba(0, 0, 0, 0.10);
}
html[data-theme="light"] .quality-copy h2 {
    color: #1d1d1f;
}
html[data-theme="light"] .quality-copy h2 span {
    color: #8e8e93;
}
html[data-theme="light"] .quality-copy p {
    color: #6e6e73;
}
html[data-theme="light"] .quality-badge {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: #515154;
}
html[data-theme="light"] .quality-visual {
    background: radial-gradient(circle, rgba(255, 55, 95, 0.10), transparent 58%);
}
html[data-theme="light"] .quality-orbit {
    border-color: rgba(0, 0, 0, 0.12);
}
html[data-theme="light"] .orbit-2 {
    border-color: rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] .quality-score {
    background: linear-gradient(145deg, #ffffff, #f2f2f5);
    border-color: rgba(0, 0, 0, 0.14);
    box-shadow: inset 0 1px 0 #fff, 0 18px 45px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .quality-score small {
    color: #6e6e73;
}
html[data-theme="light"] .quality-score strong {
    color: #1d1d1f;
}
html[data-theme="light"] .quality-chip {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .quality-chip b {
    color: #1d1d1f;
}
html[data-theme="light"] .quality-chip span {
    color: #6e6e73;
}

/* Light Research, Education, Newsletter & Transparency */
html[data-theme="light"] .research {
    background: #f5f5f7;
    color: #1d1d1f;
}
html[data-theme="light"] .research .eyebrow {
    color: #6e6e73;
}
html[data-theme="light"] .research .section-title {
    color: #1d1d1f;
}
html[data-theme="light"] .research .story {
    background: #ffffff;
    color: #1d1d1f;
    border-color: #dedee3;
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.07);
}
html[data-theme="light"] .research .story h3 {
    color: #1d1d1f;
}
html[data-theme="light"] .research .story p,
html[data-theme="light"] .research .story-meta {
    color: #6e6e73;
}
html[data-theme="light"] .education {
    color: #1d1d1f;
}
html[data-theme="light"] .newsletter {
    background: #1d1d1f;
    color: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
}
html[data-theme="light"] .newsletter p {
    color: #b8b8bd;
}
html[data-theme="light"] .newsletter input {
    border-color: #d2d2d7;
    background: #ffffff;
    color: #000000;
}
html[data-theme="light"] .newsletter button {
    background: #ffffff;
    color: #000000;
}
html[data-theme="light"] .transparency-in,
html[data-theme="light"] .ad-zone {
    border-color: rgba(0, 0, 0, 0.12);
}
html[data-theme="light"] .transparency h3 {
    color: #1d1d1f;
}
html[data-theme="light"] .transparency p {
    color: var(--secondary);
}
html[data-theme="light"] .ad-zone {
    color: var(--muted);
}

/* ── Responsive Breakpoints ────────────────────────────────── */
@media (max-width: 900px) {
    .hero {
        padding-top: 76px;
    }
    .meter-layout {
        grid-template-columns: 1fr 210px 1fr;
        padding: 34px 24px;
        gap: 16px;
    }
    .go, #startStopBtn {
        width: 180px;
        height: 180px;
    }
    .cards {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .card:first-child {
        grid-column: 1 / 3;
        grid-row: auto;
    }
    .quality-grid {
        grid-template-columns: 1fr;
        gap: 55px;
    }
    .quality-copy {
        text-align: center;
    }
    .quality-copy p {
        margin-left: auto;
        margin-right: auto;
    }
    .quality-visual {
        margin: auto;
        width: min(580px, 100%);
    }
    .research-grid {
        grid-template-columns: 1fr 1fr;
    }
    .story:first-child {
        grid-column: span 2;
    }
    .edu-grid {
        grid-template-columns: 1fr 1fr;
    }
    .newsletter {
        grid-template-columns: 1fr;
    }
    .newsletter form {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 64px 0 40px;
    }
    .hero h1 {
        font-size: 50px;
        line-height: 0.96;
    }
    .hero p {
        font-size: 17px;
    }
    .trust {
        gap: 7px;
    }
    .instrument-shell {
        padding-bottom: 64px;
    }
    .instrument-shell:before {
        width: 320px;
        height: 320px;
    }
    .instrument-shell:after {
        width: 92vw;
    }
    .instrument {
        border-radius: 24px;
    }
    .instrument-head {
        padding: 18px;
    }
    .node {
        display: none;
    }
    .presets {
        justify-content: center;
        padding: 16px;
        flex-wrap: wrap;
    }
    .preset, .use-case-pill {
        flex: 0 0 auto;
        padding: 0 12px;
    }
    .meter-layout {
        grid-template-columns: 1fr 1fr;
        padding: 20px 16px 26px;
    }
    .go-wrap {
        grid-column: 1 / -1;
        grid-row: 1;
        margin-bottom: 14px;
    }
    .go, #startStopBtn {
        width: 172px;
        height: 172px;
    }
    .go:after, #startStopBtn:after {
        inset: -9px;
    }
    .metric {
        grid-row: 2;
    }
    .metric-value, .meterText {
        font-size: 42px;
    }
    .submetrics {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .submetric:nth-child(2) {
        border-right: 0;
    }
    .submetric:nth-child(-n+2) {
        border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    }
    .privacy {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
    .analysis, .research, .education {
        padding: 64px 0;
    }
    .section-head {
        display: block;
    }
    .section-title {
        font-size: 38px;
    }
    .cards {
        grid-template-columns: 1fr;
    }
    .card:first-child {
        grid-column: auto;
        min-height: 390px;
        padding: 26px;
    }
    .card:first-child h3 {
        font-size: 29px;
    }
    .card:first-child .spark {
        height: 90px;
    }
    .quality-story {
        padding: 82px 0;
    }
    .quality-copy h2 {
        font-size: 48px;
    }
    .quality-copy p {
        font-size: 16px;
    }
    .quality-visual {
        width: 356px;
        max-width: 100%;
    }
    .quality-score strong {
        font-size: 54px;
    }
    .quality-chip {
        min-width: 112px;
        padding: 10px 12px;
    }
    .quality-chip b {
        font-size: 16px;
    }
    .chip-a { left: 0; top: 18%; }
    .chip-b { right: 0; top: 26%; }
    .chip-c { right: 4%; bottom: 9%; }
    .research-grid {
        grid-template-columns: 1fr;
    }
    .story:first-child {
        grid-column: auto;
    }
    .story {
        min-height: 340px;
    }
    .edu-grid {
        grid-template-columns: 1fr;
    }
    .edu {
        min-height: 0;
    }
    .ad-zone {
        min-height: 250px;
        margin: 48px auto;
    }
    .ad-zone.compact {
        min-height: 250px;
        margin: 48px auto;
    }
    .ad-zone.optional {
        min-height: 200px;
    }
    .newsletter {
        margin: 64px auto;
        padding: 30px 22px;
    }
    .newsletter h2 {
        font-size: 30px;
    }
    .newsletter form {
        display: grid;
    }
    .newsletter input {
        width: 100%;
    }
    .transparency-in {
        display: block;
    }
    .transparency h3 {
        margin-bottom: 12px;
    }
}
