/* ============================================================
   SPRIME — "Data Observatory" Design System
   Dark, precision-engineered, mission-control aesthetic
   ============================================================ */

:root {
    /* Core palette — dark (default) */
    --bg-base: #0c0e14;
    --bg-raised: #12151e;
    --bg-surface: #181c28;
    --bg-surface-hover: #1e2333;
    --border: #252a3a;
    --border-subtle: #1c2030;

    /* Text */
    --text-primary: #e8ecf4;
    --text-secondary: #8892a8;
    --text-muted: #5a6377;

    /* Accent */
    --accent: #3b82f6;
    --accent-bright: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --accent-glow-strong: rgba(59, 130, 246, 0.3);

    /* Status colors */
    --green: #22c55e;
    --green-dim: rgba(34, 197, 94, 0.15);
    --amber: #f59e0b;
    --red: #ef4444;
    --red-muted: #fca5a5;

    /* Tier colors */
    --tier-free: #22c55e;
    --tier-starter: #3b82f6;
    --tier-pro: #a855f7;

    /* Typography */
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Sizing */
    --max-width: 1200px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.4s ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);

    /* Card surface (used by vfy inputs, preview blocks, dev callout) */
    --bg-card: #181c28;

    /* Nav bg (used in rgba for backdrop) */
    --nav-bg-rgb: 12, 14, 20;

    /* Legacy mappings (for non-homepage pages) */
    --primary-purple: #3b82f6;
    --primary-violet: #6366f1;
    --dark-gray: #0c0e14;
    --light-gray: #12151e;
    --white: #181c28;
    --border-color: #252a3a;
    --text-dark: #e8ecf4;
    --text-medium: #8892a8;
    --text-light: #5a6377;
}

/* ============================================================
   LIGHT THEME OVERRIDES
   Applied via [data-theme="light"] on <html>
   ============================================================ */

[data-theme="light"] {
    /* Backgrounds — warm off-white paper stack */
    --bg-base: #f4f5f7;
    --bg-raised: #ffffff;
    --bg-surface: #eef0f4;
    --bg-surface-hover: #e4e7ed;
    --border: #d1d5e0;
    --border-subtle: #e2e5ec;

    /* Text — near-black with ink softness */
    --text-primary: #0f1117;
    --text-secondary: #4a5168;
    --text-muted: #8b92a8;

    /* Accent — same blue, still pops on light */
    --accent: #2563eb;
    --accent-bright: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.1);
    --accent-glow-strong: rgba(37, 99, 235, 0.2);

    /* Status — slightly adjusted for light BG readability */
    --green: #16a34a;
    --green-dim: rgba(22, 163, 74, 0.1);
    --amber: #d97706;
    --red: #dc2626;
    --red-muted: #ef4444;

    /* Tier colors — slightly deeper for contrast */
    --tier-free: #16a34a;
    --tier-starter: #2563eb;
    --tier-pro: #9333ea;

    /* Shadows — lighter, warm-tinted */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 30px var(--accent-glow);

    /* Card surface */
    --bg-card: #ffffff;

    /* Nav bg */
    --nav-bg-rgb: 244, 245, 247;

    /* Legacy overrides */
    --dark-gray: #f4f5f7;
    --light-gray: #ffffff;
    --white: #eef0f4;
    --border-color: #d1d5e0;
    --text-dark: #0f1117;
    --text-medium: #4a5168;
    --text-light: #8b92a8;
}

/* Smooth palette transition on theme switch.
   Applied only during the switch via JS class to avoid clobbering other transitions. */
html.sp-theme-switching,
html.sp-theme-switching *,
html.sp-theme-switching *::before,
html.sp-theme-switching *::after {
    transition: background-color 0.3s ease, color 0.3s ease,
                border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    -webkit-text-size-adjust: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

pre, code, table {
    max-width: 100%;
}

pre {
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: pre-wrap;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.65;
    min-height: 100vh;
}

/* Ambient grid background */
.sp-grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--border-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

/* Skip to content - accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) 0;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

nav {
    background: rgba(var(--nav-bg-rgb), 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.85rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.94rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.nav-links a.active {
    color: var(--accent-bright);
    background: var(--accent-glow);
}

.nav-links a.active::after {
    display: none;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    z-index: 101;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   THEME TOGGLE
   ============================================================ */

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.theme-toggle-btn {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.theme-toggle-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Pill track */
.theme-toggle-track {
    position: absolute;
    inset: 2px;
    border-radius: 10px;
    overflow: clip;
    pointer-events: none;
}

/* Sliding thumb */
.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
}

/* Active state (light mode = thumb slid right, sunny) */
[data-theme="light"] .theme-toggle-btn {
    background: #dbeafe;
    border-color: #93c5fd;
}

[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(20px);
    background: var(--accent);
}

/* Icons inside thumb */
.theme-toggle-thumb::before {
    content: '🌙';
    font-size: 9px;
    line-height: 1;
}

[data-theme="light"] .theme-toggle-thumb::before {
    content: '☀️';
}

/* Label text beside toggle (optional, hidden on small screens) */
.theme-toggle-label {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    user-select: none;
    white-space: nowrap;
    transition: color 0.25s ease;
}

/* On screens <560px hide the label, keep just the pill */
@media (max-width: 560px) {
    .theme-toggle-label {
        display: none;
    }
    .theme-toggle {
        margin-left: 0.25rem;
    }
}

/* "Auto" indicator dot — shown when theme was set by time-of-day */
.theme-toggle-auto-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--amber);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle.is-auto .theme-toggle-auto-dot {
    opacity: 1;
}

/* Light theme grid: softer, warmer tint */
[data-theme="light"] .sp-grid-bg {
    background-image:
        linear-gradient(#c8cdd8 1px, transparent 1px),
        linear-gradient(90deg, #c8cdd8 1px, transparent 1px);
    opacity: 0.18;
}

/* Light theme: hp-hero gradient-text stays legible */
[data-theme="light"] .hp-hero-accent {
    background: linear-gradient(135deg, #1d4ed8, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Light theme code blocks */
[data-theme="light"] pre,
[data-theme="light"] code {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border);
}
/* Cancel the blanket pre/code light background inside any force-dark container.
   Without this, every new terminal added breaks in light mode — the root cause of
   repeated regressions. Add any new force-dark container class here too. */
[data-theme="light"] .hp-term pre,
[data-theme="light"] .hp-term code,
[data-theme="light"] .hp-code-block pre,
[data-theme="light"] .hp-code-block code,
[data-theme="light"] .hp-compare-card pre,
[data-theme="light"] .hp-compare-card code {
    background: transparent;
    color: inherit;
    border-color: transparent;
}

/* Light theme: terminals and code blocks always stay dark */
[data-theme="light"] .hp-term {
    background: #0f1219;
    border-color: #252a3a;
}
[data-theme="light"] .hp-term-bar {
    background: #181c28;
    border-color: #252a3a;
}
[data-theme="light"] .hp-term-body {
    color: #e8ecf4;
}
[data-theme="light"] .hp-term-output pre,
[data-theme="light"] #demo-json {
    color: #e8ecf4;
}
[data-theme="light"] .hp-term-url {
    color: #8892a8;
}
[data-theme="light"] .hp-term-controls {
    background: #181c28;
    border-color: #252a3a;
}
[data-theme="light"] .hp-preset {
    background: #12151e;
    color: #8892a8;
    border-color: #252a3a;
}
[data-theme="light"] .hp-preset:hover {
    background: #1e2333;
    color: #e8ecf4;
    border-color: #8892a8;
}
[data-theme="light"] .hp-term-form input {
    background: #0c0e14;
    color: #e8ecf4;
    border-color: #252a3a;
}
[data-theme="light"] .hp-term-form input::placeholder {
    color: #5a6377;
}
/* Compare cards — force fully dark in light mode so code is readable */
[data-theme="light"] .hp-compare-card {
    background: #0f1219;
    border-color: #1e2535;
}
[data-theme="light"] .hp-compare-after-card {
    border-color: rgba(59, 130, 246, 0.4);
}
[data-theme="light"] .hp-compare-label {
    color: #8892a8;
    border-color: #1e2535;
}
[data-theme="light"] .hp-compare-badge.hp-compare-before {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}
[data-theme="light"] .hp-compare-badge.hp-compare-after {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}
[data-theme="light"] .hp-compare-note {
    color: #5a6377;
}

[data-theme="light"] .hp-code-block {
    background: #0d111a;
}
[data-theme="light"] .hp-code-block pre {
    color: #e8ecf4;
}
/* Copy button inside dark code block stays dark in light mode */
[data-theme="light"] .hp-code-block .hp-copy-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #8892a8;
    border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="light"] .hp-code-block .hp-copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #e8ecf4;
    border-color: rgba(255, 255, 255, 0.25);
}

/* Light theme: doc sidebar */
[data-theme="light"] .docs-sidebar {
    background: var(--bg-raised);
    border-color: var(--border);
}

/* Light theme: status indicator eyebrow pill */
[data-theme="light"] .hp-hero-eyebrow {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
}

/* Light theme: pricing cards */
[data-theme="light"] .pricing-card {
    box-shadow: var(--shadow-md);
}

/* Light mode skip link */
[data-theme="light"] .skip-link {
    color: white;
}

/* ============================================================
   SECTION HEADERS (shared)
   ============================================================ */

.hp-section-header {
    margin-bottom: 3rem;
}

.hp-section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-bright);
    background: var(--accent-glow);
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 1rem;
}

.hp-section-header h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.hp-section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.65;
}

/* ============================================================
   HERO
   ============================================================ */

.hp-hero {
    padding: 5rem 1.5rem 4rem;
    position: relative;
    z-index: 1;
}

.hp-hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hp-hero-inner > * {
    min-width: 0;
}

.hp-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--green);
    background: var(--green-dim);
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hp-status-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: sp-pulse 2s ease-in-out infinite;
}

@keyframes sp-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

.hp-hero h1 {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.hp-hero-accent {
    background: linear-gradient(135deg, var(--accent-bright), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hp-hero-sub {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 2rem;
}

.hp-hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons */
.hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.96rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-body);
}

.hp-btn-icon {
    font-size: 1.1rem;
    transition: transform 0.15s;
}

.hp-btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.3);
}

.hp-btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.hp-btn-primary:hover .hp-btn-icon {
    transform: translateX(3px);
}

.hp-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.hp-btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: var(--bg-surface);
}

.hp-btn-full {
    display: block;
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* ============================================================
   TERMINAL
   ============================================================ */

.hp-term {
    background: var(--bg-raised);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.hp-term-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

.hp-term-dots {
    display: flex;
    gap: 6px;
}

.hp-term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hp-term-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.hp-term-body {
    padding: 1.25rem 1.5rem;
    min-height: 220px;
}

.hp-term-req {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.hp-term-method {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.hp-term-url {
    color: var(--accent-bright);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    word-break: break-all;
}

.hp-term-loader {
    display: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    background-size: 200% 100%;
    animation: hp-loader 1.2s ease-in-out infinite;
    border-radius: 2px;
    margin-bottom: 0.75rem;
}

@keyframes hp-loader {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.hp-term-meta {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 1.2em;
}

.hp-term-status {
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.hp-term-ok { color: var(--green); }
.hp-term-fail { color: var(--red); }
.hp-term-time { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.75rem; }
.hp-term-err { color: var(--amber); font-size: 0.8rem; }

.hp-term-output {
    position: relative;
}

.hp-term-output pre, #demo-json {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.hp-term-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 16px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.hp-preset {
    padding: 4px 12px;
    background: var(--bg-raised);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: var(--transition);
}

.hp-preset:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: var(--bg-surface-hover);
}

.hp-term-form {
    flex: 1;
    min-width: 120px;
}

.hp-term-form input {
    width: 100%;
    padding: 4px 12px;
    background: var(--bg-base);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    margin: 0;
    outline: none;
    transition: border-color var(--transition);
}

.hp-term-form input:focus {
    border-color: var(--accent);
}

.hp-term-form input::placeholder {
    color: var(--text-muted);
}

/* Copy buttons */
.hp-copy-btn {
    padding: 3px 10px;
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.hp-copy-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.hp-copy-json {
    position: absolute;
    top: 0;
    right: 0;
}

/* ============================================================
   SIGNAL STRIP
   ============================================================ */

.hp-signals {
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.hp-signals-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 2rem 2.5rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.hp-signal {
    text-align: center;
}

.hp-signal-value {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hp-signal-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.hp-signal-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* ============================================================
   BEFORE / AFTER COMPARE
   ============================================================ */

.hp-compare {
    padding: 6rem 1.5rem;
    position: relative;
    z-index: 1;
}

.hp-compare-inner {
    max-width: 920px;
    margin: 0 auto;
}

.hp-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.hp-compare-grid > * {
    min-width: 0;
}

.hp-compare-card {
    background: var(--bg-raised);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}

.hp-compare-after-card {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-glow);
}

.hp-compare-label {
    padding: 0.75rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hp-compare-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hp-compare-before {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.hp-compare-after {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.hp-code-block {
    padding: 1.25rem 1.5rem;
    background: var(--bg-base);
    position: relative;
}

.hp-code-block pre {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.hp-code-block .hp-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Syntax highlighting */
.c-key { color: #7dd3fc; }
.c-str { color: #86efac; }
.c-num { color: #fbbf24; }
.c-brace { color: var(--text-muted); }

.hp-compare-note {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 1.5rem;
    text-align: center;
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */

.hp-steps {
    padding: 6rem 1.5rem;
    position: relative;
    z-index: 1;
}

.hp-steps-inner {
    max-width: 920px;
    margin: 0 auto;
}

.hp-steps .hp-section-header {
    text-align: center;
}

.hp-steps .hp-section-header p {
    margin: 0 auto;
}

.hp-steps-grid {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.hp-step {
    flex: 1;
    background: var(--bg-raised);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    border: 1px solid var(--border);
    transition: border-color var(--transition), box-shadow var(--transition);
    min-width: 0;
}

.hp-step:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-glow);
}

.hp-step-connector {
    width: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1.5rem;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.hp-step-connector::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--border);
    display: block;
}

.hp-step-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-bright);
    background: var(--accent-glow);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.hp-step h3 {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hp-step p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ============================================================
   ENDPOINTS SHOWCASE
   ============================================================ */

.hp-endpoints {
    padding: 6rem 1.5rem;
    position: relative;
    z-index: 1;
}

.hp-endpoints-inner {
    max-width: 920px;
    margin: 0 auto;
}

.hp-endpoints .hp-section-header {
    text-align: center;
}

.hp-endpoints-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.hp-endpoint-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all var(--transition);
    position: relative;
    min-width: 0;
}

.hp-endpoint-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.hp-endpoint-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    color: var(--accent-bright);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.hp-endpoint-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.hp-endpoint-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1rem;
}

.hp-endpoint-tier {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hp-endpoint-tier.free {
    background: rgba(34, 197, 94, 0.1);
    color: var(--tier-free);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.hp-endpoint-tier.starter {
    background: rgba(59, 130, 246, 0.1);
    color: var(--tier-starter);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.hp-endpoint-tier.pro {
    background: rgba(168, 85, 247, 0.1);
    color: var(--tier-pro);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

/* ============================================================
   PRICING
   ============================================================ */

.hp-pricing {
    padding: 6rem 1.5rem;
    position: relative;
    z-index: 1;
}

.hp-pricing-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.hp-pricing .hp-section-header {
    text-align: center;
}

.hp-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.hp-pricing-grid > * {
    min-width: 0;
}

.hp-pricing-card {
    background: var(--bg-raised);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
}

.hp-pricing-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.hp-pricing-featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.hp-pricing-featured:hover {
    border-color: var(--accent-bright);
    box-shadow: 0 0 40px var(--accent-glow-strong);
}

.hp-pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--accent);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 0 0 6px var(--bg-base);
}

.hp-pricing-tier {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.hp-price {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    line-height: 1;
}

.hp-price-currency {
    font-size: 1.6rem;
    vertical-align: super;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 2px;
}

.hp-price-period {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
    margin-top: 0.25rem;
}

.hp-pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.hp-pricing-card li {
    padding: 0.6rem 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
}

.hp-pricing-card li:last-child {
    border-bottom: none;
}

/* ============================================================
   FAQ
   ============================================================ */

.hp-faq {
    padding: 6rem 1.5rem 4rem;
    position: relative;
    z-index: 1;
}

.hp-faq-inner {
    max-width: 700px;
    margin: 0 auto;
}

.hp-faq .hp-section-header {
    text-align: center;
}

.hp-faq-list details {
    background: var(--bg-raised);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color var(--transition);
}

.hp-faq-list details[open] {
    border-color: rgba(59, 130, 246, 0.2);
}

.hp-faq-list summary {
    padding: 1.1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.92rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition);
}

.hp-faq-list summary:hover {
    color: var(--accent-bright);
}

.hp-faq-list summary::-webkit-details-marker {
    display: none;
}

.hp-faq-list summary::after {
    content: '+';
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s;
}

.hp-faq-list details[open] summary::after {
    content: '\2212';
}

.hp-faq-list details p {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
}

.hp-faq-list details code {
    background: var(--bg-surface);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    font-family: var(--font-mono);
    color: var(--accent-bright);
}

.hp-faq-list details a {
    color: var(--accent-bright);
    text-decoration: none;
}

.hp-faq-list details a:hover {
    text-decoration: underline;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 3rem 1.5rem 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.footer-container > * {
    min-width: 0;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.footer-section a:hover {
    color: var(--accent-bright);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .hp-hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hp-hero h1 { font-size: 2.6rem; }

    .hp-compare-grid { grid-template-columns: 1fr; }

    .hp-steps-grid {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hp-step-connector {
        width: auto;
        min-width: auto;
        height: 20px;
        padding-top: 0;
    }

    .hp-step-connector::before {
        width: 1px;
        height: 14px;
    }

    .hp-endpoints-grid { grid-template-columns: 1fr 1fr; }

    .hp-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .hp-signals-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 1.5rem 2rem;
    }

    .hp-signal-divider { display: none; }

    .hp-section-header h2 { font-size: 2rem; }
    .hp-urgent-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-container { flex-direction: row; position: relative; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-raised);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        border-left: 1px solid var(--border);
        transition: right 0.3s ease;
        gap: 0;
        z-index: 100;
    }

    .nav-links.open { right: 0; }

    .nav-links li { border-bottom: 1px solid var(--border); }

    .nav-links a {
        display: block;
        padding: 1rem 0;
        font-size: 1rem;
        border-radius: 0;
    }

    .nav-links a.active::after { display: none; }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 99;
    }

    .nav-overlay.open { display: block; }

    .hp-endpoints-grid { grid-template-columns: 1fr; }
    .hp-urgent-inner { padding: 1.3rem; }
    .hp-urgent-grid { grid-template-columns: 1fr; }
    .hp-triage-row select { min-width: 0; width: 100%; }

    footer { text-align: center; }
    .footer-container { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hp-hero { padding: 3rem 1.25rem 2.5rem; }
    .hp-hero h1 { font-size: 2rem; }
    .hp-hero-sub { font-size: 0.95rem; }

    .hp-signals-inner { gap: 1rem; padding: 1.25rem; }
    .hp-signal-value { font-size: 1.3rem; }

    .hp-compare, .hp-steps, .hp-endpoints, .hp-pricing, .hp-faq {
        padding: 3.5rem 1.25rem;
    }
    .hp-urgent { padding: 0 1.25rem 3.5rem; }

    .hp-section-header h2 { font-size: 1.6rem; }

    .hp-term-body {
        padding: 0.75rem 1rem;
        min-height: 180px;
    }

    .hp-term-output pre, #demo-json { font-size: 0.72rem; }

    .hp-preset {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* ============================================================
   NON-HOMEPAGE PAGE STYLES (preserved)
   Docs, Dashboard, Changelog, Privacy, Terms
   ============================================================ */

/* Global form elements */
input {
    width: 100%;
    padding: 0.9rem;
    margin: 1.2rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color var(--transition);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-body);
}

input:focus {
    outline: none;
    border-color: var(--accent);
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    background-color: var(--bg-surface);
    border-color: var(--border);
    color: var(--text-primary);
}

/* Page hero for non-home pages */
.hero, .header-banner {
    max-width: 100%;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.hero h1, .header-banner h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.15;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.8;
    max-width: 550px;
    margin: 0 auto 1.5rem;
    color: var(--text-secondary);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 3rem 0 1.5rem;
    padding: 0 1.5rem;
}

/* Container for content pages */
.container, .main-container {
    max-width: 1200px;
    margin: 2rem auto 4rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 900px;
    background: var(--bg-raised);
    padding: 3rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: clip;
}

.container h2 { color: var(--text-primary); margin-bottom: 1rem; }
.container h3 { color: var(--text-primary); margin-top: 2rem; margin-bottom: 0.5rem; }
.container p, .container ul { color: var(--text-secondary); line-height: 1.7; }

.container code {
    background: var(--bg-surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-bright);
    font-weight: 500;
    font-family: var(--font-mono);
}

/* Card styles */
.card, .pricing-card, .feature-card {
    background: var(--bg-raised);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.feature-card:hover,
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card h3 { color: var(--text-primary); margin-bottom: 0.75rem; font-size: 1.25rem; }
.feature-card p { color: var(--text-secondary); line-height: 1.6; }

.pricing-card, .card { flex: 1 1 300px; max-width: 380px; text-align: center; }
.pricing-card h3 { color: var(--text-primary); font-size: 1.5rem; margin-bottom: 0.5rem; }
.card h3 { color: var(--text-primary); margin-bottom: 1rem; }

.cta-button {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    transition: all 0.2s;
    font-size: 1rem;
}

.pricing-card .cta-button {
    width: 100%;
    margin-top: 1.5rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.cta-button:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.4);
    outline-offset: 2px;
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    min-width: 0;
}

.dashboard-grid > * { min-width: 0; }

/* Features grid */
.features {
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 2rem;
}

.features > * { min-width: 0; }

.stat-val {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    margin: 0.5rem 0;
    font-family: var(--font-mono);
}

.progress-container {
    background: var(--bg-surface);
    height: 8px;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent), #818cf8);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.key-box {
    background: var(--bg-base);
    color: var(--accent-bright);
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

.key-box span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    /* Flex centering — works on all screen heights */
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.is-open {
    display: flex !important;
}

.modal-content {
    background: var(--bg-raised);
    max-width: 400px;
    width: 100%;
    /* margin: 0 so flex centering works — never use margin: 15% auto */
    margin: 0;
    padding: 2.5rem;
    border-radius: var(--radius);
    text-align: center;
    overflow: hidden;
    border: 1px solid var(--border);
}

.modal-content h3 { color: var(--text-primary); margin-bottom: 1rem; }

/* Code blocks */
.code-block {
    background: var(--bg-base);
    color: var(--text-primary);
    padding: 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    text-align: left;
    margin-top: 1rem;
    border: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.92rem;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 1.5rem;
    justify-content: center;
    border: none;
}

.tab-btn, .tab-link {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.tab-btn.active, .tab-link.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.tab-btn:hover, .tab-link:hover {
    background: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Disclaimer */
.disclaimer-box {
    background: rgba(239, 68, 68, 0.08);
    border-left: 4px solid var(--red);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-top: 1rem;
    color: var(--red-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Origin note */
.origin-note {
    max-width: 700px;
    margin: 0 auto 3rem;
    padding: 1.5rem 2rem;
    background: var(--bg-raised);
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
    border: 1px solid var(--border);
}

.origin-note p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin: 0; }
.origin-note strong { color: var(--text-primary); }
.origin-note a { color: var(--accent-bright); text-decoration: none; font-weight: 500; }
.origin-note a:hover { text-decoration: underline; }

/* Price styling for non-homepage */
.price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 0.25rem;
    font-family: var(--font-mono);
}

.price-period { color: var(--text-muted); font-size: 1rem; margin-bottom: 1rem; }

.pricing-features {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

.pricing-features li {
    padding: 0.6rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: var(--accent); background: var(--accent-glow); }

.btn-copy {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all var(--transition);
    font-family: var(--font-mono);
}

.btn-copy:hover { background: var(--bg-surface-hover); color: var(--text-primary); }

/* Button loading state */
.cta-button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.cta-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================================
   DOCS-SPECIFIC STYLES
   ============================================================ */

.toc { margin: 2rem 0; }
.toc h2 { margin-bottom: 1rem; color: var(--text-primary); }

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.toc-grid a {
    display: block;
    padding: 0.6rem 1rem;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    color: var(--accent-bright);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.93rem;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.toc-grid a:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.endpoint-card {
    background: var(--bg-raised);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.endpoint-card h2 { margin-top: 0; }
.endpoint-card h3 { margin-top: 1.5rem; }

.method {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.82rem;
    margin-right: 0.5rem;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.method.get { background: rgba(34, 197, 94, 0.12); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.2); }
.method.post { background: rgba(59, 130, 246, 0.12); color: var(--accent-bright); border: 1px solid rgba(59, 130, 246, 0.2); }
.method.delete { background: rgba(239, 68, 68, 0.12); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.2); }

.tier-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 0.5rem;
    font-family: var(--font-mono);
}

.tier-badge.free { background: rgba(34, 197, 94, 0.1); color: var(--tier-free); border: 1px solid rgba(34, 197, 94, 0.2); }
.tier-badge.starter { background: rgba(59, 130, 246, 0.1); color: var(--tier-starter); border: 1px solid rgba(59, 130, 246, 0.2); }
.tier-badge.pro { background: rgba(168, 85, 247, 0.1); color: var(--tier-pro); border: 1px solid rgba(168, 85, 247, 0.2); }

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.93rem;
}

.table-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

.table-scroll-wrap .param-table { margin: 0; }

.param-table th {
    background: var(--bg-surface);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    font-size: 0.88rem;
}

.param-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.param-table code {
    background: var(--bg-surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82em;
    color: var(--accent-bright);
    font-family: var(--font-mono);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.badge.required { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }

.docs-container {
    max-width: 1000px;
    margin: 2rem auto 4rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* ============================================================
   CHANGELOG STYLES
   ============================================================ */

.version-block {
    border-left: 3px solid var(--border);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.version-block.latest { border-left-color: var(--accent); }
.version-block h3 { color: var(--text-primary); margin-top: 0; }
.version-block p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.5rem; }
.version-block ul { margin-top: 1rem; padding-left: 1rem; }
.version-block li { color: var(--text-secondary); margin-bottom: 0.4rem; line-height: 1.5; }

.latest-badge {
    background: linear-gradient(135deg, var(--accent), #818cf8);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 0.5rem;
    font-family: var(--font-mono);
}

.changelog-toc {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.changelog-toc-label { font-weight: 600; font-size: 0.88rem; color: var(--text-secondary); }

.changelog-toc a {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: var(--bg-surface);
    border-radius: var(--radius-xs);
    color: var(--accent-bright);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.changelog-toc a:hover { background: var(--accent); color: white; border-color: var(--accent); }

.changelog-year {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.changelog-year:first-of-type { margin-top: 0; }

.changelog-stability { font-size: 0.82rem; color: var(--text-muted); font-style: italic; margin-top: 0.25rem; margin-bottom: 0.5rem; }

.changelog-links { margin-top: 0.75rem; font-size: 0.82rem; }
.changelog-links a { color: var(--accent-bright); text-decoration: none; font-weight: 600; }
.changelog-links a:hover { text-decoration: underline; }

/* Page Hero (non-home pages) */
.hp-page-hero {
    padding: 4.5rem 1.5rem 3rem;
    text-align: center;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.03) 100%);
}

.hp-page-hero-inner { max-width: 960px; margin: 0 auto; }

.hp-page-hero .hp-section-tag { margin-bottom: 1.25rem; }

.hp-page-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.hp-page-hero p { font-size: 1.05rem; line-height: 1.6; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* Code example on other pages */
.code-example {
    max-width: 900px;
    margin: 4rem auto;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-raised);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.endpoint-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.endpoint-tabs .tab {
    padding: 0.6rem 1.4rem;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.endpoint-tabs .tab:hover,
.endpoint-tabs .tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), #818cf8);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

.pricing { max-width: 1200px; margin: 4rem auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; padding: 0 1.5rem; }

.pricing-button {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: var(--accent);
    color: white;
    text-align: center;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s;
}

.pricing-button:hover { opacity: 0.9; }

.pricing-card.popular { border: 2px solid var(--accent); transform: scale(1.03); }

.pricing-header { text-align: center; margin-bottom: 2rem; width: 100%; }
.pricing-header h2 { font-size: 2.2rem; color: var(--text-primary); }

.use-cases-bar { max-width: 900px; margin: 2.5rem auto 0; padding: 1.25rem 2rem; background: var(--bg-raised); border-radius: var(--radius); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.use-cases-label { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.use-cases-list { color: var(--text-secondary); font-size: 0.95rem; }

.tagline { font-family: var(--font-mono); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 1.5rem; opacity: 0.8; font-weight: 600; color: var(--text-secondary); }

.best-for { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.5rem; font-style: italic; }

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .main-container { padding: 0 1rem; }
    .container { padding: 2rem 1.5rem; }
    .docs-container { padding: 0 1rem; }
    .endpoint-card { padding: 1.5rem; }
}

@media (max-width: 768px) {
    .hero h1, .header-banner h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .use-cases-bar { flex-direction: column; text-align: center; padding: 1rem 1.5rem; }
    .origin-note { margin: 0 1rem 2rem; padding: 1.25rem 1.5rem; }
    .pricing-card { flex: 1 1 100%; }
    .code-example { padding: 2rem 1rem; }

    .key-box { flex-direction: column; gap: 0.75rem; text-align: center; word-break: break-all; }
    .key-box button { width: 100%; }
    .code-block { padding: 1rem; font-size: 0.86rem; }
    .card { padding: 1.5rem; }
    .stat-val { font-size: 2rem; }
    select { width: 100%; margin-top: 0.5rem; }

    .hp-page-hero { padding: 3rem 1.25rem 2rem; }
    .hp-page-hero h1 { font-size: 2rem; }
    .hp-page-hero p { font-size: 1rem; }

    .toc-grid { grid-template-columns: repeat(2, 1fr); }
    .param-table { font-size: 0.88rem; }
    .param-table th, .param-table td { padding: 0.5rem 0.4rem; }
    .endpoint-card { padding: 1.25rem; }
    .docs-container { padding: 0 0.75rem; }
    .pricing-card.popular { transform: scale(1); }
    .endpoint-tabs { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .hp-page-hero h1 { font-size: 1.7rem; }

    .param-table th, .param-table td { padding: 0.4rem 0.3rem; font-size: 0.82rem; }
    .param-table code { font-size: 0.78em; word-break: break-all; }
    .endpoint-card { padding: 1rem; }
    .container { padding: 1.5rem 1rem; }
    .code-block { padding: 0.75rem; font-size: 0.82rem; }
}

/* ============================================================
   VERIFY HERO
   ============================================================ */
.vfy-hidden { display: none !important; }

.vfy-hero {
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
}
.vfy-hero-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.vfy-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(99,179,237,0.08);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(99,179,237,0.2);
}
.vfy-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin: 0.25rem 0 0;
    max-width: 640px;
}
.vfy-hero-br::after { content: '\A'; white-space: pre; }
.vfy-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 680px;
    line-height: 1.6;
    margin: 0;
}

/* Input zone */
.vfy-input-zone {
    width: 100%;
    max-width: 760px;
    margin-top: 0.5rem;
}
.vfy-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.vfy-input-row.vfy-text-mode {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
}
.vfy-url-input {
    flex: 1;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-mono);
    min-width: 0;
    transition: border-color 0.2s;
}
.vfy-url-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99,179,237,0.18);
}
.vfy-text-input {
    flex: 1;
    padding: 0.9rem 1.05rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.04rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    min-width: 0;
    min-height: 100px;
    transition: border-color 0.2s;
}
.vfy-text-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99,179,237,0.18);
}
.vfy-check-btn {
    padding: 0.7rem 1.4rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.vfy-text-mode .vfy-check-btn {
    align-self: flex-end;
}
.vfy-check-btn:hover { opacity: 0.88; }
.vfy-input-meta {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
    justify-content: center;
}
.vfy-link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.92rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.vfy-link-btn:hover { opacity: 0.75; }

.vfy-example-bank {
    margin-top: 0.75rem;
}
.vfy-example-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 0.45rem;
    text-align: left;
}
.vfy-example-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.vfy-example-chip {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.vfy-example-chip:hover,
.vfy-example-chip:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59, 130, 246, 0.08);
    outline: none;
}
.vfy-example-chip.vfy-chip-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    font-weight: 500;
}

.vfy-mission-board {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 1rem;
    text-align: left;
    /* reveal animation */
    max-height: 600px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.35s ease, margin-top 0.3s ease, padding 0.3s ease;
}
.vfy-mission-board.vfy-mission-hidden {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    border-color: transparent;
    pointer-events: none;
}
.vfy-mission-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.vfy-mission-head-left {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.vfy-mission-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.vfy-mission-head strong {
    font-size: 1rem;
    color: var(--text-primary);
}
/* scope points span specifically to avoid colliding with other spans */
#vfy-mission-points {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: var(--text-secondary);
}
.vfy-mission-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.vfy-mission-bar > span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-bright));
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 999px;
}
.vfy-mission-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.3rem;
}
.vfy-mission-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.87rem;
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    padding: 0.38rem 0.6rem;
    transition: border-color 0.25s, background 0.25s, color 0.2s;
}
.vfy-mission-list li > span:nth-child(2) { flex: 1; }
.vfy-mission-check {
    display: inline-block;
    width: 1.1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #22c55e;
    flex-shrink: 0;
    text-align: center;
    transition: opacity 0.2s;
}
.vfy-mission-list li.vfy-mission-complete {
    color: var(--text-primary);
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.07);
}
.vfy-mission-list li:not(.vfy-mission-complete) .vfy-mission-check {
    opacity: 0;
}
.vfy-mission-reward {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    flex-shrink: 0;
    margin-left: auto;
}
.vfy-mission-list li.vfy-mission-complete .vfy-mission-reward {
    color: #22c55e;
    text-decoration: line-through;
    opacity: 0.6;
}
.vfy-mission-note {
    margin: 0.55rem 0 0;
    font-size: 0.77rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Result area */
.vfy-result-area {
    width: 100%;
    max-width: 760px;
    margin-top: 0.5rem;
}
.vfy-loader {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    background-size: 200% 100%;
    animation: vfy-shimmer 1.2s infinite;
    border-radius: 2px;
    margin-bottom: 1rem;
}
@keyframes vfy-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Risk level badges */
.vfy-risk-badge {
    display: inline-block;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    vertical-align: middle;
}
/* Default = dark mode optimised (vivid on dark backgrounds) */
.vfy-risk-critical { background: rgba(239, 68, 68, 0.18);  color: #f87171; }
.vfy-risk-high     { background: rgba(249, 115, 22, 0.18); color: #fb923c; }
.vfy-risk-medium   { background: rgba(234, 179, 8, 0.18);  color: #eab308; }
.vfy-risk-low      { background: rgba(34, 197, 94, 0.16);  color: #4ade80; }
.vfy-risk-none     { background: rgba(34, 197, 94, 0.16);  color: #4ade80; }
/* Light mode: darken text for contrast on pale tinted bg */
[data-theme="light"] .vfy-risk-critical { background: rgba(239, 68, 68, 0.1);  color: #dc2626; }
[data-theme="light"] .vfy-risk-high     { background: rgba(249, 115, 22, 0.1); color: #ea580c; }
[data-theme="light"] .vfy-risk-medium   { background: rgba(234, 179, 8, 0.13); color: #a16207; }
[data-theme="light"] .vfy-risk-low,
[data-theme="light"] .vfy-risk-none     { background: rgba(34, 197, 94, 0.1);  color: #166534; }

/* Preview blocks */
@keyframes vfy-block-in {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.vfy-preview-block {
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.6rem;
    animation: vfy-block-in 0.22s ease both;
}
.vfy-preview-block[data-risk="critical"] {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.06);
}
.vfy-preview-block[data-risk="high"] {
    border-color: rgba(249, 115, 22, 0.45);
    background: rgba(249, 115, 22, 0.06);
}
.vfy-preview-block[data-risk="medium"] {
    border-color: rgba(234, 179, 8, 0.4);
    background: rgba(234, 179, 8, 0.05);
}
/* Light mode: reduce opacity so tints don't overpower light bg */
[data-theme="light"] .vfy-preview-block[data-risk="critical"] { background: rgba(239, 68, 68, 0.04); }
[data-theme="light"] .vfy-preview-block[data-risk="high"]     { background: rgba(249, 115, 22, 0.04); }
[data-theme="light"] .vfy-preview-block[data-risk="medium"]   { background: rgba(234, 179, 8, 0.03); }
.vfy-preview-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.vfy-preview-micro {
    font-size: 0.86rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.4rem;
}
.vfy-preview-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.vfy-preview-flags li { color: var(--text-secondary); }
.vfy-preview-next .vfy-next-text {
    font-size: 0.92rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.55;
}
.vfy-more-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.88rem;
    cursor: pointer;
    padding: 0.2rem 0;
    margin-top: 0.25rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.vfy-signup-prompt, .vfy-error-block {
    text-align: center;
    padding: 1.25rem;
}
.vfy-signup-prompt p, .vfy-error-block p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

/* Upgrade hooks */
.vfy-upgrade-hooks {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}
.vfy-monitor-wrap { position: relative; display: inline-block; }
.vfy-monitor-btn { position: relative; }
.vfy-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated, #1e2a38);
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid var(--border);
    z-index: 10;
    text-align: center;
}
.vfy-tooltip-sub {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 2px;
}
.vfy-monitor-btn:hover .vfy-tooltip,
.vfy-monitor-btn:focus .vfy-tooltip { display: block; }

/* Privacy note + dev link */
.vfy-privacy-note {
    font-size: 0.9rem;
    color: var(--text-muted, var(--text-secondary));
    max-width: 520px;
    text-align: center;
    line-height: 1.5;
    opacity: 0.75;
    margin: 0;
}
.vfy-dev-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    opacity: 0.6;
    margin-top: -0.25rem;
}
.vfy-dev-link:hover { opacity: 1; color: var(--accent); }

/* ============================================================
   VERIFY SUITE SECTION (#tools)
   ============================================================ */
.vs-section {
    padding: 4rem 1.5rem;
    border-top: 1px solid var(--border);
}
.vs-inner { max-width: 1100px; margin: 0 auto; }

.vs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 2.5rem;
}
@media (max-width: 700px) {
    .vs-grid { grid-template-columns: 1fr; }
    .vfy-input-row { flex-direction: column; align-items: stretch; }
    .vfy-check-btn { width: 100%; }
    .vfy-text-mode .vfy-check-btn { align-self: stretch; }
    .vfy-input-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    .vfy-hero { padding: 2rem 1.25rem 1.5rem; }
    .vfy-input-zone { margin-top: 0.35rem; }
    .vfy-sub { font-size: 1rem; }
    .vfy-example-bank { margin-top: 0.55rem; }
}

@media (max-width: 480px) {
    .vfy-hero { padding: 1.75rem 1rem 1.25rem; }
    .vfy-sub { font-size: 0.93rem; }
    .vfy-hero h1 { font-size: clamp(1.65rem, 7vw, 2.1rem); }
    .vfy-input-zone { margin-top: 0.25rem; }
    .vfy-example-chip { font-size: 0.79rem; padding: 0.28rem 0.6rem; }
    .vfy-mission-board { padding: 0.8rem; }
    .vfy-mission-list li { font-size: 0.83rem; padding: 0.32rem 0.5rem; }
    .vfy-mission-head { flex-direction: row; align-items: center; }
    .vfy-mission-head-left { flex-direction: row; align-items: baseline; gap: 0.4rem; }
    .vfy-mission-title { font-size: 0.68rem; }
    .vfy-preview-block { padding: 0.75rem 1rem; }
    .vfy-example-label { font-size: 0.83rem; }
}

.vs-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.vs-card-live {
    border-color: rgba(99,179,237,0.35);
    box-shadow: 0 0 0 1px rgba(99,179,237,0.12) inset;
}
.vs-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.vs-badge {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
}
.vs-badge-live {
    background: rgba(99,179,237,0.15);
    color: var(--accent);
    border: 1px solid rgba(99,179,237,0.3);
}
.vs-badge-soon {
    background: var(--bg-elevated, rgba(255,255,255,0.05));
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.vs-icon { color: var(--text-secondary); opacity: 0.6; }
.vs-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}
.vs-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}
.vs-cta { margin-top: auto; align-self: flex-start; }
.vs-waitlist-micro {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.75;
    margin: 0 !important;
}
.vs-notify-form {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}
.vs-notify-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 0.95rem;
    min-width: 0;
}
.vs-notify-input:focus {
    outline: none;
    border-color: var(--accent);
}
.vs-notify-btn {
    padding: 0.5rem 0.85rem;
    background: var(--bg-elevated, rgba(255,255,255,0.07));
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s;
}
.vs-notify-btn:hover { border-color: var(--accent); color: var(--accent); }
.vs-notify-thanks {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

/* Card 5: full-width strip */
.vs-strip {
    margin-top: 1.25rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.vs-strip p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}
.vs-suggest-wrap { display: flex; gap: 0.5rem; align-items: center; }
.vs-suggest-input {
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 0.92rem;
    width: 220px;
}
.vs-suggest-input:focus { outline: none; border-color: var(--accent); }

/* Urgent playbook section */
.hp-urgent {
    padding: 0 1.5rem 4rem;
    position: relative;
    z-index: 1;
}
.hp-urgent-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.hp-urgent-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.hp-urgent-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.1rem 1rem;
}
.hp-urgent-chip {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-bright);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 99px;
    padding: 3px 9px;
    margin-bottom: 0.6rem;
}
.hp-urgent-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    color: var(--text-primary);
}
.hp-urgent-card p {
    margin: 0 0 0.7rem;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.6;
}
.hp-urgent-list {
    margin: 0;
    padding-left: 1.15rem;
}
.hp-urgent-list li {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 0.35rem;
}
.hp-triage {
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-surface);
    padding: 1rem;
}
.hp-triage-head {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 0.7rem;
}
.hp-triage-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}
.hp-triage-row select {
    margin: 0;
    min-width: 260px;
    flex: 1;
    font-size: 0.95rem;
}
.hp-triage-result {
    margin-top: 0.85rem;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.08);
    padding: 0.85rem;
}
.hp-triage-result h4 {
    font-size: 0.96rem;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
}
.hp-triage-result p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
}
.hp-triage-links {
    margin-top: 0.6rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.hp-triage-links a {
    font-size: 0.86rem;
}

/* ============================================================
   DEV CALLOUT BLOCK
   ============================================================ */
.hp-dev-callout {
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
}
.hp-dev-callout-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.hp-dev-callout-title {
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.35rem;
    color: var(--text-primary);
}
.hp-dev-callout p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.55;
}

/* Keep long labels/URLs from overflowing cards on narrow screens */
.hp-term-url,
.hp-endpoint-path,
.om-url,
.key-box span,
.code-block,
.param-table code {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Light mode: ensure vfy inputs readable */
[data-theme="light"] .vfy-url-input,
[data-theme="light"] .vfy-text-input,
[data-theme="light"] .vs-notify-input,
[data-theme="light"] .vs-suggest-input {
    background: #fff;
    border-color: #d0d7de;
}

/* ============================================================
   DESIGN EYE CANDY — Cohesion & Delight
   Ambient glow, scroll reveals, micro-interactions
   ============================================================ */

/* ── Aurora ambient glow (injected by site.js) ── */
.sp-aurora {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 1600px;
    height: 65vh;
    background:
        radial-gradient(ellipse 70% 55% at 50% -5%, rgba(59, 130, 246, 0.09) 0%, transparent 65%),
        radial-gradient(ellipse 35% 25% at 78% 12%, rgba(99, 102, 241, 0.05) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .sp-aurora {
    background:
        radial-gradient(ellipse 70% 50% at 50% -5%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
}

/* ── Scroll reveal system ── */
.sp-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.sp-reveal.sp-visible {
    opacity: 1;
    transform: translateY(0);
}

.sp-stagger-1 { transition-delay: 0.07s; }
.sp-stagger-2 { transition-delay: 0.14s; }
.sp-stagger-3 { transition-delay: 0.21s; }
.sp-stagger-4 { transition-delay: 0.28s; }
.sp-stagger-5 { transition-delay: 0.35s; }
.sp-stagger-6 { transition-delay: 0.42s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sp-reveal { opacity: 1; transform: none; transition: none; }
    .sp-aurora { display: none; }
}

/* ── Button shimmer sweep on hover ── */
.hp-btn-primary {
    position: relative;
    overflow: hidden;
}

.hp-btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 55%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 80%
    );
    transform: skewX(-15deg);
    pointer-events: none;
}

.hp-btn-primary:hover::after {
    animation: sp-btn-shimmer 0.55s ease forwards;
}

@keyframes sp-btn-shimmer {
    0%   { left: -120%; }
    100% { left: 160%; }
}

/* ── Signal values — gradient glow text (dark only) ── */
[data-theme="dark"] .hp-signal-value {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Signal strip hover glow ── */
.hp-signals-inner {
    transition: border-color var(--transition), box-shadow var(--transition);
}

.hp-signals-inner:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 32px rgba(59, 130, 246, 0.08);
}

/* ── Pricing featured card — top accent bar ── */
.hp-pricing-featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--accent-bright) 70%, transparent 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    pointer-events: none;
}

/* ── AlertPrime featured card — top accent bar ── */
.al-pricing-featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-bright), transparent);
    pointer-events: none;
}

/* ── Endpoint icon lift on card hover ── */
.hp-endpoint-card .hp-endpoint-icon {
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.hp-endpoint-card:hover .hp-endpoint-icon {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

/* ── Nav bottom glow line ── */
nav {
    position: relative;
}

nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.3) 40%,
        rgba(99, 102, 241, 0.3) 60%,
        transparent
    );
    pointer-events: none;
}

/* ── Dark-mode section h2 — subtle fade ── */
[data-theme="dark"] .hp-compare .hp-section-header h2,
[data-theme="dark"] .hp-steps .hp-section-header h2,
[data-theme="dark"] .hp-endpoints .hp-section-header h2,
[data-theme="dark"] .hp-pricing .hp-section-header h2,
[data-theme="dark"] .hp-faq .hp-section-header h2,
[data-theme="dark"] .vs-section .hp-section-header h2 {
    background: linear-gradient(150deg, var(--text-primary) 40%, rgba(148, 163, 184, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── VS card hover depth ── */
.vs-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.vs-card:hover {
    border-color: rgba(99, 179, 237, 0.45);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* ── VS live card — animated top line ── */
.vs-card-live {
    position: relative;
    overflow: hidden;
}

.vs-card-live::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(99, 179, 237, 0.7), transparent);
    animation: vs-live-glow 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes vs-live-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ── Verify hero input — enhanced focus glow ── */
.vfy-url-input:focus,
.vfy-text-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.1) !important;
}

/* ── Dev callout hover ── */
.hp-dev-callout-inner {
    transition: border-color var(--transition), box-shadow var(--transition);
}

.hp-dev-callout-inner:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.07);
}

/* ── Section tag — small accent indicator ── */
.hp-section-tag::before {
    content: '';
    display: inline-block;
    width: 2px;
    height: 8px;
    background: var(--accent);
    border-radius: 1px;
    margin-right: 6px;
    vertical-align: middle;
    opacity: 0.9;
}

/* ===== Payment Safety Checker ===== */
.ps-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.ps-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.ps-chip:hover { border-color: var(--accent); color: var(--accent); }
.ps-result { margin-top: 1.5rem; }
.ps-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  background: var(--bg-card);
}
.ps-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.ps-method-name { font-size: 1.15rem; font-weight: 600; margin: 0; }
.ps-risk-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  color: #fff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ps-flags { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ps-flag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid;
}
.ps-flag-ok  { border-color: #34d399; color: #34d399; background: rgba(52,211,153,0.08); }
.ps-flag-bad { border-color: #f87171; color: #f87171; background: rgba(248,113,113,0.08); }
.ps-flag-icon { font-style: normal; font-weight: 700; }
.ps-section { margin-top: 1.25rem; }
.ps-section h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 0.5rem; }
.ps-list { padding-left: 1.25rem; margin: 0; }
.ps-list li { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.4rem; line-height: 1.5; }
.ps-list-green li { color: #86efac; }
.ps-empty { font-size: 0.875rem; color: var(--text-muted); margin: 0; }
.ps-ftc-link { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.82rem; }
.ps-ftc-link a { color: var(--text-muted); }
.ps-ftc-link a:hover { color: var(--accent); }
.ps-error {
  background: rgba(248,113,113,0.1);
  border: 1px solid #f87171;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: #fca5a5;
  font-size: 0.9rem;
}

/* ===== Contract Clause Translator ===== */

/* Page wrapper — single-column, full-width within hero (fixes 2-col grid regression) */
.cc-page-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.cc-page-inner .hp-section-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.cc-page-inner .hp-section-header p {
  max-width: 100%;
}

/* Tab bar */
.cc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
}
.cc-tab {
  background: none;
  border: none;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.cc-tab:hover { color: var(--text-primary); }
.cc-tab.cc-tab-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Tab panels */
.cc-tab-panel { display: none; }
.cc-tab-panel.cc-panel-active { display: block; }

/* ToS library panel */
.cc-lib-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.cc-lib-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cc-lib-cat:hover,
.cc-lib-cat.cc-lib-cat-active {
  background: rgba(96,165,250,0.12);
  border-color: var(--accent);
  color: var(--accent);
}
.cc-lib-select-wrap {
  position: relative;
  margin-bottom: 0.85rem;
}
.cc-lib-select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-sans, 'DM Sans', sans-serif);
  font-size: 0.9rem;
  padding: 0.65rem 2.25rem 0.65rem 0.9rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.cc-lib-select:focus { outline: none; border-color: var(--accent); }
.cc-lib-select-arrow {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.cc-lib-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  min-height: 80px;
  display: none;
}
.cc-lib-preview.cc-lib-preview-visible { display: block; }
.cc-lib-preview-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.cc-lib-preview-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.cc-lib-risk-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cc-lib-preview-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.cc-lib-load-btn {
  width: 100%;
}

/* Label and textarea */
.cc-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.cc-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 0.875rem 1rem;
  resize: vertical;
  min-height: 180px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.cc-textarea:focus { outline: none; border-color: var(--accent); }
.cc-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}
.cc-char-count { font-size: 0.78rem; color: var(--text-muted); }

/* Results area — robust single-column layout */
.cc-result { margin-top: 1.5rem; }
.cc-result-wrap { width: 100%; box-sizing: border-box; }

.cc-result-hero {
  display: grid;
  grid-template-columns: 140px 1fr 100px;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.cc-gauge-wrap,
.cc-donut-wrap { display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.cc-gauge-svg { width: 140px; height: 110px; }
.cc-donut-svg { width: 100px; height: 100px; }
.cc-hero-center { text-align: center; min-width: 0; }

/* Responsive result hero */
@media (max-width: 680px) {
  .cc-result-hero {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    text-align: center;
  }
  .cc-gauge-wrap,
  .cc-donut-wrap { display: none; }
  .cc-hero-center { text-align: center; }
}
@media (min-width: 681px) and (max-width: 900px) {
  .cc-result-hero {
    grid-template-columns: 110px 1fr 80px;
    gap: 1rem;
  }
  .cc-gauge-svg { width: 110px; height: 86px; }
  .cc-donut-svg { width: 80px; height: 80px; }
}

.cc-summary-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.cc-summary-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cc-summary-count { color: var(--text-muted); font-size: 0.85rem; margin-left: auto; }
.cc-clauses-list { display: flex; flex-direction: column; gap: 1rem; }
.cc-clause {
  border: 1px solid;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  box-sizing: border-box;
  overflow: hidden;
  word-break: break-word;
}
.cc-clause-header {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.cc-severity-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: #fff;
  flex-shrink: 0;
}
.cc-sentence-id {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-base);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.cc-original {
  border-left: 2px solid var(--border);
  margin: 0 0 0.6rem 0;
  padding-left: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
  overflow-wrap: break-word;
}
.cc-plain { font-size: 0.9rem; color: var(--text-primary); margin: 0; line-height: 1.55; }
.cc-clean { color: #34d399; font-size: 0.9rem; padding: 1rem 0; }
.cc-disclaimer { font-size: 0.78rem; color: var(--text-muted); margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Light mode adjustments for cc-* elements */
[data-theme="light"] .cc-textarea,
[data-theme="light"] .cc-lib-select {
  background: #f9fafb;
  border-color: rgba(0,0,0,0.15);
  color: var(--text-primary);
}
[data-theme="light"] .cc-lib-preview {
  background: #f9fafb;
  border-color: rgba(0,0,0,0.12);
}
[data-theme="light"] .cc-lib-cat {
  background: #f3f4f6;
  border-color: rgba(0,0,0,0.12);
}

/* ToS library in homepage hero */
.vfy-tos-lib-section {
  margin-top: 0.75rem;
}
.vfy-tos-toggle-btn {
  background: none;
  border: none;
  padding: 0.25rem 0;
  font-size: 0.82rem;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.vfy-tos-toggle-btn:hover { color: var(--accent-bright, var(--accent)); text-decoration: underline; }
.vfy-tos-lib-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.6rem;
}
.vfy-tos-lib-panel.vfy-hidden { display: none; }
.vfy-tos-cats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.vfy-tos-cat-btn {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.vfy-tos-cat-btn:hover,
.vfy-tos-cat-btn.active {
  background: rgba(96,165,250,0.12);
  border-color: var(--accent);
  color: var(--accent);
}
.vfy-tos-select-wrap { position: relative; margin-bottom: 0.65rem; }
.vfy-tos-select {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.88rem;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  box-sizing: border-box;
}
.vfy-tos-select:focus { outline: none; border-color: var(--accent); }
.vfy-tos-select-caret {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.vfy-tos-preview-strip {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.5rem;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
  margin-bottom: 0.65rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.vfy-tos-preview-strip.vfy-tos-preview-visible { display: flex; }
.vfy-tos-risk-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.vfy-tos-load-btn {
  width: 100%;
  font-size: 0.88rem;
  padding: 0.55rem 1rem;
}
[data-theme="light"] .vfy-tos-lib-panel {
  background: #f9fafb;
  border-color: rgba(0,0,0,0.12);
}
[data-theme="light"] .vfy-tos-select,
[data-theme="light"] .vfy-tos-cat-btn {
  background: #fff;
  border-color: rgba(0,0,0,0.15);
}
[data-theme="light"] .vfy-tos-preview-strip {
  background: rgba(0,0,0,0.05);
}

/* ===== OFFER MONITOR (.om-*) ===== */
.om-limit-bar { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.om-limit-track { flex: 1; height: 6px; background: var(--border-subtle, rgba(255,255,255,0.1)); border-radius: 3px; overflow: hidden; }
.om-limit-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }
.om-limit-label { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

.om-add-form { background: var(--bg-card); border: 1px solid var(--border-subtle, rgba(255,255,255,0.08)); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.om-label-input { width: 100%; padding: 0.6rem 0.9rem; background: var(--bg-input, rgba(255,255,255,0.05)); border: 1px solid var(--border-subtle, rgba(255,255,255,0.12)); border-radius: 8px; color: var(--text-primary); font-size: 0.9rem; font-family: inherit; box-sizing: border-box; }
.om-label-input:focus { outline: none; border-color: var(--accent); }

.om-list { display: flex; flex-direction: column; gap: 1rem; }
.om-card { background: var(--bg-card); border: 1px solid var(--border-subtle, rgba(255,255,255,0.08)); border-radius: 12px; padding: 1.25rem 1.5rem; }
.om-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.om-url { font-size: 0.85rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.om-label { font-size: 0.9rem; color: var(--text-secondary, var(--text-muted)); margin: 0.25rem 0 0.5rem; }
.om-meta-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.om-last-checked { font-size: 0.8rem; color: var(--text-muted); }
.om-freshness-badge { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.55rem; border-radius: 4px; white-space: nowrap; }
.om-freshness-active { background: rgba(52,211,153,0.15); color: #34d399; }
.om-freshness-changed { background: rgba(251,191,36,0.15); color: #fbbf24; }
.om-freshness-error { background: rgba(248,113,113,0.15); color: #f87171; }
.om-change-badge { font-size: 0.75rem; background: rgba(251,191,36,0.12); color: #fbbf24; padding: 0.15rem 0.5rem; border-radius: 4px; }
.om-card-actions { display: flex; gap: 0.5rem; }
.om-small-btn { font-size: 0.8rem; padding: 0.35rem 0.75rem; border-radius: 6px; border: 1px solid var(--border-subtle, rgba(255,255,255,0.12)); background: transparent; color: var(--text-primary); cursor: pointer; font-family: inherit; transition: background 0.15s, border-color 0.15s; }
.om-small-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.om-small-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.om-del-danger { border-color: rgba(248,113,113,0.3); color: #f87171; }
.om-del-danger:hover { background: rgba(248,113,113,0.08); border-color: #f87171; }
.om-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-size: 0.95rem; }

/* ── Endpoint tabs ── */
.hp-tab-row { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.hp-tab { background: transparent; border: 1px solid rgba(255,255,255,.12); color: var(--text-muted); border-radius: 8px; padding: .45rem 1.1rem; font-size: .85rem; font-weight: 600; cursor: pointer; transition: border-color .2s, color .2s, background .2s; font-family: inherit; }
.hp-tab:hover { border-color: var(--accent); color: var(--accent); }
.hp-tab.active { border-color: var(--accent); background: rgba(96,165,250,.1); color: var(--accent); }
.hp-tab-panel { display: none; }
.hp-tab-panel.active { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.hp-endpoint-path { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: var(--text-muted); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 5px; padding: .15rem .45rem; margin-top: .4rem; }
[data-theme="light"] .hp-tab { border-color: rgba(0,0,0,.12); }
[data-theme="light"] .hp-tab.active { background: rgba(96,165,250,.12); }
[data-theme="light"] .hp-endpoint-path { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.08); }
