/* ==========================================================================
   pua.me — 反 PUA / 情感操控识别平台
   ========================================================================== */

:root,
html[data-theme="dark"] {
    --bg: #000;
    --bg-soft: #060608;
    --bg-elevated: #0d0d12;
    --bg-card: #0f0f15;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.14);

    --text: #ffffff;
    --text-muted: #9696a4;
    --text-subtle: #5a5a68;

    --violet: #8b5cf6;
    --violet-light: #a78bfa;
    --violet-soft: rgba(139, 92, 246, 0.12);

    --ambient-1: rgba(139, 92, 246, 0.07);
    --ambient-2: rgba(139, 92, 246, 0.05);
    --hero-mask: linear-gradient(95deg, #000 0%, rgba(0,0,0,0.95) 22%, rgba(0,0,0,0.7) 42%, rgba(0,0,0,0.25) 60%, transparent 75%), linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 18%, transparent 82%, rgba(0,0,0,0.6) 100%);

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 20px 48px rgba(0, 0, 0, 0.4);

    --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --container: 1240px;
    --container-narrow: 880px;

    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
    --bg: #fbfaf8;
    --bg-soft: #f4f1ec;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --border: rgba(20, 12, 40, 0.08);
    --border-strong: rgba(20, 12, 40, 0.18);

    --text: #14102a;
    --text-muted: #5a5066;
    --text-subtle: #8a8294;

    --violet: #6d28d9;
    --violet-light: #7c3aed;
    --violet-soft: rgba(109, 40, 217, 0.08);

    --ambient-1: rgba(109, 40, 217, 0.06);
    --ambient-2: rgba(217, 70, 239, 0.04);
    --hero-mask: linear-gradient(95deg, #fbfaf8 0%, rgba(251,250,248,0.96) 22%, rgba(251,250,248,0.72) 42%, rgba(251,250,248,0.28) 60%, transparent 75%), linear-gradient(180deg, rgba(251,250,248,0.4) 0%, transparent 18%, transparent 82%, rgba(251,250,248,0.6) 100%);

    --shadow-card: 0 4px 18px rgba(20, 12, 40, 0.06);
    --shadow-lift: 0 18px 36px rgba(20, 12, 40, 0.1);
}

/* Smooth color transitions when switching themes */
html { color-scheme: dark; transition: background-color 0.4s, color 0.4s; }
html[data-theme="light"] { color-scheme: light; }
body, .nav, .footer, .tool-card, .kb-card, .feature, .value,
.tl-card, .stat, .flow-step, .sig-card, .quiz-promises, .q-opt,
.res-card, .detector, .detector-result, .featured, .cmd-modal {
    transition: background-color 0.4s, color 0.4s, border-color 0.4s, box-shadow 0.4s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 70% 55% at 0% 0%, var(--ambient-1) 0%, transparent 55%),
        radial-gradient(ellipse 55% 70% at 100% 100%, var(--ambient-2) 0%, transparent 55%);
    background-attachment: fixed;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection { background: rgba(139, 92, 246, 0.4); color: #fff; }
::-moz-selection { background: rgba(139, 92, 246, 0.4); color: #fff; }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

a { color: var(--text); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--violet-light); }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 32px; }

/* ==========================================================================
   Scroll progress bar (top of viewport)
   ========================================================================== */
.scroll-prog {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: var(--p, 0%);
    background: linear-gradient(90deg, transparent 0%, var(--violet) 30%, var(--violet-light) 70%, #f0abfc 100%);
    z-index: 101;
    transition: width 0.08s ease-out;
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.6);
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 20px 0;
    transition: background-color var(--transition), padding var(--transition);
}

.nav.scrolled {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    display: inline-flex;
    align-items: baseline;
}

.brand .b-dot { color: var(--violet-light); }
.brand:hover { color: var(--text); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 48px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color var(--transition);
    position: relative;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    background: var(--violet);
    border-radius: 50%;
}

.nav-toggle {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    border-radius: 4px;
}

.nav-toggle:hover { background-color: rgba(255, 255, 255, 0.05); }

/* ==========================================================================
   Hero — full-bleed photo + overlay text
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    background: #000;
    overflow: hidden;
    isolation: isolate;
}

.hero-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-photo img {
    position: absolute;
    right: -4%;
    top: 50%;
    transform: translateY(-50%);
    height: 108%;
    width: auto;
    max-width: none;
    filter: contrast(1.04) saturate(1.05);
    animation: heroBreathe 18s ease-in-out infinite alternate;
}

@keyframes heroBreathe {
    0%   { transform: translateY(-50%) scale(1); }
    100% { transform: translateY(-50%) scale(1.04); }
}

.hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--hero-mask);
    pointer-events: none;
}

html[data-theme="light"] .hero-photo img {
    filter: contrast(0.95) saturate(0.95) brightness(0.95);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 120px 40px 200px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 580px;
    opacity: 0;
    animation: heroIn 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s forwards;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--violet-light);
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    margin-bottom: 32px;
    padding: 7px 16px 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--violet-light);
    box-shadow: 0 0 10px var(--violet-light);
    animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
    font-size: clamp(3.2rem, 8.5vw, 6.5rem);
    font-weight: 600;
    line-height: 0.96;
    letter-spacing: -0.045em;
    margin-bottom: 36px;
    text-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

.hero-title .line-1 {
    display: block;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 14px;
    font-weight: 300;
    letter-spacing: -0.03em;
}

.hero-title .line-2 {
    display: block;
    background: linear-gradient(135deg,
        #ffffff 0%,
        #e9defe 30%,
        var(--violet-light) 65%,
        #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.hero-sub {
    font-size: 1.18rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 48px;
    letter-spacing: 0.015em;
    line-height: 1.65;
    max-width: 460px;
}

.hero-cta-row {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px 16px 36px;
    border: 1px solid var(--violet);
    border-radius: 999px;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 500;
    background: rgba(139, 92, 246, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.hero-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--violet) 0%, #c084fc 100%);
    opacity: 0;
    transition: opacity 0.32s;
    z-index: -1;
}

.hero-cta:hover {
    color: #fff;
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 14px 36px rgba(139, 92, 246, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.hero-cta:hover::before { opacity: 1; }

.hero-cta .arrow {
    display: inline-flex;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-cta:hover .arrow { transform: translateX(5px); }

.hero-trust {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.hero-trust .avatars {
    display: inline-flex;
}

.hero-trust .avatars span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    border: 1.5px solid #000;
    margin-left: -7px;
}

.hero-trust .avatars span:first-child { margin-left: 0; background: linear-gradient(135deg, #c084fc, #f0abfc); }
.hero-trust .avatars span:nth-child(2) { background: linear-gradient(135deg, #818cf8, #8b5cf6); }
.hero-trust .avatars span:nth-child(3) { background: linear-gradient(135deg, #a78bfa, #d8b4fe); }

.hero-trust strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-subtle);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    z-index: 3;
}

.hero-scroll-line {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, transparent, var(--text-subtle));
}

@keyframes scrollDown {
    0% { transform: translateY(-8px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(8px); opacity: 0; }
}

.hero-scroll .arrow-down { animation: scrollDown 2s ease-in-out infinite; }

/* ==========================================================================
   Feature row (4 icons under hero)
   ========================================================================== */
.feature-row {
    background: var(--bg);
    padding: 56px 0;
}

.feature-row-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.feature {
    text-align: center;
    padding: 16px;
    transition: transform var(--transition);
}

.feature:hover { transform: translateY(-6px); }

.feature-icon {
    width: 44px; height: 44px;
    margin: 0 auto 20px;
    color: var(--violet);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg { width: 100%; height: 100%; }

.feature-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.feature-desc {
    font-size: 0.82rem;
    color: var(--text-subtle);
    line-height: 1.7;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 140px 0; position: relative; }
.section-sm { padding: 96px 0; }

.section-eyebrow {
    color: var(--violet-light);
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    line-height: 1.15;
}

.section-title .accent { color: var(--violet-light); font-weight: 600; }

.section-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 640px;
}

.section-head { margin-bottom: 80px; }
.section-head.center { text-align: center; }
.section-head.center .section-sub { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Tool / detector cards
   ========================================================================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tool-card {
    padding: 48px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

.tool-card::before {
    content: "";
    position: absolute;
    top: -100px; right: -100px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
    pointer-events: none;
    transition: opacity var(--transition);
    opacity: 0.6;
}

.tool-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-4px);
}

.tool-card:hover::before { opacity: 1; }

.tool-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--violet-soft);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 999px;
    color: var(--violet-light);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    position: relative;
}

.tool-tag::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--violet-light);
    box-shadow: 0 0 8px var(--violet-light);
}

.tool-card h3 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    position: relative;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.7;
    position: relative;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--violet-light);
    font-size: 0.9rem;
    transition: gap var(--transition);
    position: relative;
}

.tool-link:hover { color: var(--violet-light); gap: 14px; }

/* ==========================================================================
   Knowledge / signal cards
   ========================================================================== */
.kb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.kb-card {
    padding: 36px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.kb-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    background: var(--bg-card);
    transform: translateY(-4px);
}

.kb-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-subtle);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.kb-meta .cat {
    color: var(--violet-light);
    text-transform: uppercase;
}

.kb-card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.kb-card:hover h3 { color: var(--violet-light); }

.kb-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 24px;
}

.kb-card .kb-cta {
    color: var(--text-subtle);
    font-size: 0.82rem;
    transition: color var(--transition);
}

.kb-card:hover .kb-cta { color: var(--violet-light); }

/* ==========================================================================
   Detector tool
   ========================================================================== */
.detector {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    max-width: 880px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.detector::before {
    content: "";
    position: absolute;
    top: -200px; right: -200px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.detector-head {
    margin-bottom: 32px;
    position: relative;
}

.detector-head h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.detector-head p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.detector-textarea {
    width: 100%;
    min-height: 240px;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.7;
    resize: vertical;
    transition: border-color var(--transition), box-shadow var(--transition);
    position: relative;
}

.detector-textarea:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.detector-textarea::placeholder { color: var(--text-subtle); }

.detector-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
}

.detector-hint {
    color: var(--text-subtle);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-violet {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--violet);
    color: var(--text);
    border-radius: 999px;
    font-size: 0.95rem;
    transition: all var(--transition);
    border: 1px solid var(--violet);
}

.btn-violet:hover {
    background: var(--violet-light);
    color: var(--text);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.btn-violet:disabled {
    background: var(--bg-elevated);
    border-color: var(--border);
    color: var(--text-subtle);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-ghost-violet {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: transparent;
    color: var(--violet-light);
    border: 1px solid var(--violet);
    border-radius: 999px;
    font-size: 0.95rem;
    transition: all var(--transition);
}

.btn-ghost-violet:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--violet-light);
}

.examples {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    position: relative;
}

.examples-label {
    color: var(--text-subtle);
    font-size: 0.82rem;
    margin-right: 4px;
}

.example-chip {
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--transition);
}

.example-chip:hover {
    border-color: var(--violet);
    color: var(--violet-light);
}

.detector-result {
    margin-top: 32px;
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    display: none;
}

.detector-result.show { display: block; animation: fadeIn 0.5s ease; }

.result-score {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.score-ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: conic-gradient(var(--violet) calc(var(--score, 0) * 1%), rgba(139, 92, 246, 0.1) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-ring-inner {
    width: 80px; height: 80px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-num {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--violet-light);
    line-height: 1;
}

.score-unit {
    font-size: 0.7rem;
    color: var(--text-subtle);
    margin-top: 4px;
}

.result-summary h4 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.result-summary p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.result-tag {
    padding: 6px 14px;
    background: rgba(248, 113, 113, 0.08);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 999px;
    font-size: 0.82rem;
}

.result-advice h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 12px;
}

.result-advice ul { margin-left: 4px; }

.result-advice li {
    color: var(--text-muted);
    font-size: 0.92rem;
    padding-left: 24px;
    position: relative;
    margin-bottom: 12px;
    line-height: 1.7;
}

.result-advice li::before {
    content: "";
    position: absolute;
    left: 0; top: 12px;
    width: 12px; height: 1px;
    background: var(--violet);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Page header
   ========================================================================== */
.page-head {
    padding: 200px 0 80px;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.page-head::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.page-head .eyebrow {
    color: var(--violet-light);
    font-size: 0.78rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 24px;
    position: relative;
}

.page-head h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    position: relative;
    line-height: 1.1;
}

.page-head h1 .accent { color: var(--violet-light); }

.page-head p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 620px;
    margin: 0 auto;
    position: relative;
    line-height: 1.7;
}

/* ==========================================================================
   KB filter
   ========================================================================== */
.kb-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 64px;
}

.kb-tab {
    padding: 10px 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 999px;
    font-size: 0.88rem;
    transition: all var(--transition);
}

.kb-tab:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.kb-tab.active {
    background: var(--violet);
    color: var(--text);
    border-color: var(--violet);
}

/* ==========================================================================
   Story / About
   ========================================================================== */
.story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.story-text h2 { margin-bottom: 24px; }

.story-text p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.85;
}

.story-text strong { color: var(--text); }

.story-art {
    aspect-ratio: 1 / 1.2;
    background: #000;
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.story-art img,
.story-art svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==== values ==== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.value {
    padding: 40px 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all var(--transition);
}

.value:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-4px);
}

.value-num {
    color: var(--violet-light);
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    margin-bottom: 16px;
}

.value h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.value p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ==== contact ==== */
.contact-form {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px;
}

.field { margin-bottom: 20px; }

.field label {
    display: block;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.field input::placeholder, .field textarea::placeholder { color: var(--text-subtle); }
.field textarea { min-height: 120px; resize: vertical; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn-block { width: 100%; padding: 16px 32px; }

/* ==========================================================================
   Notice banner
   ========================================================================== */
.notice {
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 24px 32px;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    display: flex;
    gap: 16px;
}

.notice-icon { color: var(--violet-light); flex-shrink: 0; margin-top: 2px; }
.notice strong { color: var(--text); font-weight: 500; }

/* ==========================================================================
   CTA strip
   ========================================================================== */
.cta-strip {
    padding: 96px 0;
    text-align: center;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.cta-strip::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.cta-strip h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 500;
    margin-bottom: 24px;
    position: relative;
    letter-spacing: -0.03em;
}

.cta-strip p {
    color: var(--text-muted);
    margin-bottom: 40px;
    position: relative;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cta-strip .actions {
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding: 80px 0 32px;
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 20px;
    line-height: 1.8;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 0.78rem;
    color: var(--text-subtle);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 24px;
    font-weight: 500;
}

.footer-col li { margin-bottom: 12px; }

.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-subtle);
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom .icp { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { color: var(--text-subtle); }
.footer-bottom a:hover { color: var(--text-muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-content {
        padding: 120px 32px 140px;
    }
    .hero-photo img {
        right: 50%;
        transform: translate(50%, -50%);
        height: 100%;
        opacity: 0.55;
    }
    @keyframes heroBreathe {
        0%   { transform: translate(50%, -50%) scale(1); }
        100% { transform: translate(50%, -50%) scale(1.04); }
    }
    .hero-photo::after {
        background:
            linear-gradient(180deg,
                rgba(0, 0, 0, 0.55) 0%,
                rgba(0, 0, 0, 0.3) 35%,
                rgba(0, 0, 0, 0.7) 75%,
                #000 100%);
    }
    .hero-text { max-width: 600px; }
    .hero-sub { max-width: none; }
    .feature-row-inner { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
    .tools-grid { grid-template-columns: 1fr; }
    .kb-grid { grid-template-columns: 1fr 1fr; }
    .story { grid-template-columns: 1fr; gap: 48px; }
    .values-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
}

@media (max-width: 720px) {
    .nav-inner { padding: 0 24px; }
    .container, .container-narrow { padding: 0 24px; }
    .nav-links {
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 24px;
        align-items: stretch;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition), opacity var(--transition);
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-links a {
        padding: 16px 0;
        border-bottom: 1px solid var(--border);
    }
    .nav-links a.active::after { display: none; }
    .hero-title { font-size: clamp(2.6rem, 12vw, 4.2rem); }
    .hero-content { padding: 110px 24px 110px; }
    .hero-eyebrow { font-size: 0.7rem; padding: 6px 12px 6px 12px; margin-bottom: 24px; }
    .hero-sub { font-size: 1.05rem; margin-bottom: 36px; }
    .hero-cta-row { gap: 16px; }
    .section, .section-sm { padding: 80px 0; }
    .section-head { margin-bottom: 48px; }
    .feature-row { padding: 40px 0; }
    .feature-row-inner { padding: 0 24px; gap: 24px 16px; }
    .feature-icon { width: 36px; height: 36px; margin-bottom: 14px; }
    .feature-title { font-size: 0.92rem; }
    .feature-desc { font-size: 0.78rem; }
    .tool-card { padding: 32px 24px; }
    .kb-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr; }
    .detector { padding: 28px; }
    .contact-form { padding: 28px; }
    .field-row { grid-template-columns: 1fr; }
    .footer { padding: 56px 0 24px; }
    .footer-inner { padding: 0 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (min-width: 721px) {
    .nav-toggle { display: none; }
}

/* ==========================================================================
   Polish — scroll animations, refined surfaces, accent details
   ========================================================================== */

/* === Scroll-triggered fade in === */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.85s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}
.reveal[data-d="1"] { transition-delay: 0.06s; }
.reveal[data-d="2"] { transition-delay: 0.12s; }
.reveal[data-d="3"] { transition-delay: 0.18s; }
.reveal[data-d="4"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-text { animation: none; opacity: 1; }
    .hero-photo img { animation: none; }
    .hero-eyebrow::before { animation: none; }
}

/* === Refined cards — subtle gradient border on hover === */
.tool-card,
.kb-card,
.feature,
.value {
    position: relative;
    isolation: isolate;
}

.tool-card::after,
.kb-card::after,
.value::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        transparent 0%,
        rgba(139, 92, 246, 0.5) 50%,
        transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
    z-index: -1;
}

.tool-card:hover::after,
.kb-card:hover::after,
.value:hover::after { opacity: 1; }

/* === Feature row — subtle separator + lift === */
.feature-row {
    position: relative;
}
.feature-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, 60%);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
}

/* === Section eyebrows — refined dot prefix === */
.section-eyebrow,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.section-eyebrow::before,
.eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--violet-light);
}

/* === Buttons — softer on the violet === */
.btn-violet {
    background: linear-gradient(135deg, var(--violet) 0%, #c084fc 100%);
    border: 1px solid transparent;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}
.btn-violet:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #d8b4fe 100%);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.55);
    transform: translateY(-2px);
}

/* === CTA strip — more depth === */
.cta-strip {
    margin: 48px 32px;
    border-radius: 32px;
    border: 1px solid rgba(139, 92, 246, 0.18);
    background:
        radial-gradient(ellipse at 25% 30%, rgba(139, 92, 246, 0.16), transparent 55%),
        radial-gradient(ellipse at 75% 70%, rgba(192, 132, 252, 0.1), transparent 55%),
        linear-gradient(135deg, rgba(20, 12, 40, 0.6), rgba(8, 5, 20, 0.4));
    backdrop-filter: blur(8px);
}
.cta-strip::before {
    width: 1100px;
    height: 540px;
    background:
        radial-gradient(ellipse at center, rgba(139, 92, 246, 0.22) 0%, transparent 65%);
}
@media (max-width: 720px) {
    .cta-strip { margin: 32px 16px; border-radius: 24px; padding: 64px 28px; }
}

/* === Detector — better focus ring + textarea === */
.detector-textarea {
    transition:
        border-color 0.32s,
        box-shadow 0.32s,
        background-color 0.32s;
}
.detector-textarea:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background-color: rgba(0, 0, 0, 0.5);
}
.detector-textarea:focus {
    border-color: var(--violet-light);
    box-shadow:
        0 0 0 4px rgba(139, 92, 246, 0.15),
        0 0 32px rgba(139, 92, 246, 0.18);
    background-color: rgba(0, 0, 0, 0.55);
}

/* === Tool tag — subtle glow === */
.tool-tag {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0.06));
    border-color: rgba(139, 92, 246, 0.4);
}

/* === Notice — softer === */
.notice {
    background:
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.08), transparent 60%),
        rgba(139, 92, 246, 0.04);
    border-color: rgba(139, 92, 246, 0.18);
    border-radius: 18px;
}

/* === Footer — subtle top divider === */
.footer {
    position: relative;
}
.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(620px, 70%);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.35), transparent);
}

/* === Nav — refined backdrop === */
.nav.scrolled {
    background-color: rgba(0, 0, 0, 0.65);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* === Type rendering polish === */
.section-title,
.h2,
.hero-title {
    font-feature-settings: "ss01", "ss02", "kern";
}

/* === Brand mark refinement === */
.brand .b-dot {
    text-shadow: 0 0 14px rgba(139, 92, 246, 0.6);
}

/* === Knowledge featured article === */
.featured-wrap { position: relative; }

.featured {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
    background: var(--bg-elevated);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 28px;
    overflow: hidden;
    transition: all 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    isolation: isolate;
}

.featured::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5) 0%, transparent 40%, rgba(192, 132, 252, 0.4) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0.6;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: -1;
}

.featured:hover { transform: translateY(-3px); }
.featured:hover::before { opacity: 1; }

.featured-side {
    padding: 56px 56px 48px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 999px;
    color: var(--violet-light);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    width: fit-content;
    margin-bottom: 8px;
}

.featured-tag .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--violet-light);
    box-shadow: 0 0 8px var(--violet-light);
    animation: pulseDot 2.4s ease-in-out infinite;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-subtle);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.featured-cat {
    color: var(--violet-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.featured-title {
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 8px;
}

.featured-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--violet-light), #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.featured-excerpt {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 14px;
}

.featured-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.featured-author {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
}

.featured-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), #c084fc);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
    flex-shrink: 0;
}

.featured-author strong {
    color: var(--text);
    font-weight: 500;
    display: block;
}

.featured-role {
    color: var(--text-subtle);
    font-size: 0.78rem;
    display: block;
}

.featured-time {
    color: var(--text-subtle);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

.featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--violet), #c084fc);
    color: #fff;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    width: fit-content;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 6px 22px rgba(139, 92, 246, 0.35);
}

.featured-cta:hover {
    color: #fff;
    transform: translateX(4px) translateY(-2px);
    box-shadow: 0 14px 36px rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #a78bfa, #d8b4fe);
}

.featured-cta span { transition: transform 0.32s; }
.featured-cta:hover span { transform: translateX(4px); }

/* Visual / quote side */
.featured-visual {
    position: relative;
    min-height: 380px;
    overflow: hidden;
}

.featured-art {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(217, 70, 239, 0.35), transparent 55%),
        radial-gradient(ellipse at 70% 70%, rgba(139, 92, 246, 0.35), transparent 55%),
        linear-gradient(135deg, #1a0b40 0%, #0a0420 60%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.featured-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 30%, transparent 70%);
    pointer-events: none;
}

.ribbon {
    position: absolute;
    top: 28px;
    right: -38px;
    transform: rotate(35deg);
    background: linear-gradient(135deg, var(--violet), #c084fc);
    color: #fff;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    padding: 6px 48px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.featured-quote {
    position: relative;
    z-index: 2;
    font-family: "PingFang SC", "Songti SC", "Hiragino Sans GB", serif;
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    font-weight: 300;
    line-height: 1.4;
    text-align: center;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.featured-quote::before,
.featured-quote::after {
    content: """;
    font-family: Georgia, serif;
    color: var(--violet-light);
    opacity: 0.55;
    font-size: 0.7em;
    line-height: 0;
    position: relative;
}
.featured-quote::before { margin-right: 6px; top: 0.4em; }
.featured-quote::after  { content: """; margin-left: 4px; top: 0.4em; }

@media (max-width: 900px) {
    .featured { grid-template-columns: 1fr; }
    .featured-side { padding: 36px 32px 32px; }
    .featured-visual { min-height: 240px; order: -1; }
    .ribbon { right: -32px; padding: 5px 40px; font-size: 0.6rem; }
}

/* === Stats / proof section === */
.proof { padding-top: 80px; padding-bottom: 80px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

.stat {
    padding: 36px 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: left;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.stat::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 65%);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
}

.stat:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.4);
}
.stat:hover::before { opacity: 1; }

.stat-num {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #ffffff 0%, var(--violet-light) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-feature-settings: "tnum";
    margin-bottom: 14px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-suffix {
    font-size: 0.55em;
    color: var(--violet-light);
    -webkit-text-fill-color: var(--violet-light);
    font-weight: 500;
}

.stat-label {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: 0.005em;
}

.stat-note {
    color: var(--text-subtle);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.stat-note span { color: var(--violet-light); font-feature-settings: "tnum"; }

/* Publication strip */
.proof-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 28px 32px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    margin-bottom: 64px;
    position: relative;
}

.proof-strip-label {
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-subtle);
    padding-right: 24px;
    border-right: 1px solid var(--border);
}

.proof-strip-list {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.proof-strip-list .sep {
    color: var(--text-subtle);
    opacity: 0.5;
}

.proof-strip-list span:not(.sep) {
    transition: color 0.25s;
    cursor: default;
}

.proof-strip-list span:not(.sep):hover {
    color: var(--text);
}

/* Pull quote */
.proof-quote {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 0 32px;
}

.proof-quote blockquote {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: -0.01em;
    margin-bottom: 28px;
    position: relative;
    padding: 0 24px;
}

.proof-quote blockquote::before {
    content: """;
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    line-height: 1;
    color: var(--violet);
    font-family: Georgia, serif;
    opacity: 0.5;
}

.proof-quote figcaption {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.q-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), #c084fc);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.q-name { color: var(--text); font-weight: 500; }
.q-role { color: var(--text-subtle); }

@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .proof-strip-label { border-right: none; padding-right: 0; padding-bottom: 8px; flex-basis: 100%; text-align: center; }
}

@media (max-width: 560px) {
    .stats-grid { grid-template-columns: 1fr; }
    .proof-strip { padding: 20px 24px; gap: 16px; }
    .proof-strip-list { gap: 12px; font-size: 0.88rem; justify-content: center; }
    .proof-strip-list .sep { display: none; }
}

/* === Detector — color-coded result + staggered reveals === */

/* dot loading inside button while analyzing */
.dot-load {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    border-top-color: transparent;
    animation: dotSpin 0.6s linear infinite;
    flex-shrink: 0;
}
@keyframes dotSpin { to { transform: rotate(360deg); } }

/* button shake for input error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-3px); }
    40%, 80% { transform: translateX(3px); }
}
.btn-violet.shake { animation: shake 0.36s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
.btn-violet.loading {
    cursor: progress;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(192, 132, 252, 0.3));
}

/* Result panel — analyzing skeleton state */
.detector-result.analyzing {
    background:
        linear-gradient(110deg, var(--bg) 8%, rgba(139, 92, 246, 0.06) 18%, var(--bg) 33%) 0 0 / 200% 100%;
    animation: skelShimmer 1.4s linear infinite;
    min-height: 160px;
}
@keyframes skelShimmer {
    to { background-position: -200% 0; }
}
.detector-result.analyzing .result-score,
.detector-result.analyzing .result-tags,
.detector-result.analyzing .result-advice { opacity: 0; visibility: hidden; }

/* Score ring — color shifts based on risk level */
.detector-result[data-level="risk-high"] .score-ring {
    background: conic-gradient(#f87171 calc(var(--score, 0) * 1%), rgba(248, 113, 113, 0.08) 0%);
    box-shadow: 0 0 32px rgba(248, 113, 113, 0.18);
}
.detector-result[data-level="risk-high"] .score-num { color: #fca5a5; }

.detector-result[data-level="risk-mid"] .score-ring {
    background: conic-gradient(#fbbf24 calc(var(--score, 0) * 1%), rgba(251, 191, 36, 0.08) 0%);
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.18);
}
.detector-result[data-level="risk-mid"] .score-num { color: #fcd34d; }

.detector-result[data-level="risk-low"] .score-ring {
    background: conic-gradient(#a78bfa calc(var(--score, 0) * 1%), rgba(167, 139, 250, 0.1) 0%);
    box-shadow: 0 0 24px rgba(167, 139, 250, 0.2);
}

.detector-result[data-level="risk-ok"] .score-ring {
    background: conic-gradient(#34d399 calc(var(--score, 0) * 1%), rgba(52, 211, 153, 0.1) 0%);
    box-shadow: 0 0 28px rgba(52, 211, 153, 0.18);
}
.detector-result[data-level="risk-ok"] .score-num { color: #6ee7b7; }

/* Level badge */
.level-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 10px;
}
.level-badge.risk-high { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.3); }
.level-badge.risk-mid  { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border: 1px solid rgba(251, 191, 36, 0.3); }
.level-badge.risk-low  { background: rgba(167, 139, 250, 0.12); color: var(--violet-light); border: 1px solid rgba(167, 139, 250, 0.3); }
.level-badge.risk-ok   { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.3); }

/* Tag/advice stagger entrance */
.result-tag,
.result-advice li {
    opacity: 0;
    animation: tagIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes tagIn {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Result panel border tint by level */
.detector-result[data-level="risk-high"] { border-color: rgba(248, 113, 113, 0.25); }
.detector-result[data-level="risk-mid"]  { border-color: rgba(251, 191, 36, 0.25); }
.detector-result[data-level="risk-low"]  { border-color: rgba(167, 139, 250, 0.25); }
.detector-result[data-level="risk-ok"]   { border-color: rgba(52, 211, 153, 0.25); }

/* === 12 signal cards — icon + number layout === */
.signals-grid .sig-card {
    position: relative;
    padding: 32px 28px 32px;
    overflow: hidden;
}

.sig-card .sig-num {
    position: absolute;
    top: 22px;
    right: 26px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-subtle);
    letter-spacing: 0.18em;
    font-feature-settings: "tnum";
    transition: color 0.4s, transform 0.4s;
}

.sig-card .sig-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(139, 92, 246, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--violet-light);
    margin-bottom: 22px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sig-card .sig-ico svg { width: 20px; height: 20px; }

.sig-card .kb-meta {
    margin-bottom: 12px;
}

.sig-card:hover .sig-ico {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(192, 132, 252, 0.1));
    border-color: rgba(139, 92, 246, 0.5);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 6px 22px rgba(139, 92, 246, 0.25);
}

.sig-card:hover .sig-num {
    color: var(--violet-light);
    transform: scale(1.05);
}

/* subtle bottom accent on hover */
.sig-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 28px;
    right: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--violet), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}
.sig-card:hover::before { opacity: 1; }

/* ==========================================================================
   Access gate · "developing" screen (active when html[data-gate="1"])
   The inline head script in each page sets this attr if the visitor has
   not yet visited with ?cy in the URL. The body content is hidden via
   :not(.g-scr) and the developing screen is injected on DOMContentLoaded.
   ========================================================================== */
html[data-gate="1"] body {
    background: #000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #fff;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}
html[data-gate="1"] body::before {
    content: "";
    position: fixed;
    inset: -30%;
    background: radial-gradient(circle at 50% 45%, rgba(139, 92, 246, 0.18) 0%, transparent 55%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}
html[data-gate="1"] body > :not(.g-scr) { display: none !important; }

.g-scr {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 32px;
    max-width: 560px;
    animation: gFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes gFade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.g-br {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.78);
}
.g-br i {
    font-style: normal;
    color: #a78bfa;
    text-shadow: 0 0 14px rgba(139, 92, 246, 0.6);
}

.g-eb {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.08);
    color: #a78bfa;
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    margin-bottom: 28px;
    text-transform: uppercase;
}

.g-scr h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #fff;
}
.g-scr h1 span {
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    margin-left: 8px;
}

.g-scr p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 40px;
    letter-spacing: 0.02em;
}

.g-do { display: inline-flex; gap: 10px; }
.g-do i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a78bfa;
    display: inline-block;
    animation: gBlink 1.4s ease-in-out infinite;
}
.g-do i:nth-child(2) { animation-delay: 0.18s; }
.g-do i:nth-child(3) { animation-delay: 0.36s; }

@keyframes gBlink {
    0%, 100% { opacity: 0.25; transform: scale(0.8); }
    50%      { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Microinteractions & focus polish
   ========================================================================== */

/* Unified focus-visible (keyboard nav) */
:focus { outline: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--violet-light);
    outline-offset: 3px;
    border-radius: 4px;
}
.btn-violet:focus-visible,
.btn-ghost-violet:focus-visible,
.hero-cta:focus-visible {
    outline-offset: 4px;
}

/* Link hover underline animation */
.tool-link,
.kb-card .kb-cta {
    position: relative;
}

/* Nav link underline indicator */
.nav-links a {
    position: relative;
}
.nav-links a:not(.active)::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--violet-light);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 8px var(--violet-light);
}
.nav-links a:hover::after { width: 16px; }

/* Hover lift utility */
.tool-card,
.kb-card,
.value,
.feature {
    will-change: transform;
}

/* Example chip — refined click feedback */
.example-chip {
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.example-chip:hover {
    border-color: var(--violet);
    color: var(--violet-light);
    background: rgba(139, 92, 246, 0.06);
    transform: translateY(-1px);
}
.example-chip:active { transform: translateY(0); }

/* Smoother nav scrolled transition */
.nav {
    transition: background-color 0.35s ease, padding 0.35s ease, backdrop-filter 0.35s ease;
}

/* Hero CTA — slight scale on press */
.hero-cta:active { transform: translateY(-1px) scale(0.98); }
.btn-violet:active { transform: translateY(0) scale(0.98); }
.btn-ghost-violet:active { transform: scale(0.98); }

/* Avatar — subtle wobble on hover */
.hero-trust .avatars span { transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hero-trust:hover .avatars span { transform: translateY(-2px); }
.hero-trust:hover .avatars span:nth-child(2) { transition-delay: 0.05s; }
.hero-trust:hover .avatars span:nth-child(3) { transition-delay: 0.1s; }

/* Form field — softer focus across pages */
.field input:focus,
.field textarea:focus,
.field select:focus,
.detector-textarea:focus {
    transition-duration: 0.22s;
}

/* Smoother scroll progress bar gradient ends */
.scroll-prog {
    transition: width 0.08s linear;
}

/* Reduce motion across the board */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Article read view (article.html)
   ========================================================================== */
.read-prog {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: var(--rp, 0%);
    background: linear-gradient(90deg, var(--violet) 0%, var(--violet-light) 50%, #f0abfc 100%);
    z-index: 99;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.5);
}

.art-head {
    padding: 160px 0 56px;
    position: relative;
    overflow: hidden;
}
.art-head::before {
    content: "";
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 420px;
    background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.16) 0%, transparent 70%);
    pointer-events: none;
}
.art-head-inner {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-subtle);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    margin-bottom: 36px;
    transition: color 0.25s, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.back-link:hover {
    color: var(--violet-light);
    transform: translateX(-3px);
}

.art-cat-row {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    color: var(--text-subtle);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}
.art-cat {
    color: var(--violet-light);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    font-size: 0.72rem;
}
.dot-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-subtle);
    opacity: 0.6;
}

.art-title {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
    color: var(--text);
}
.art-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--violet-light), #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.art-deck {
    font-size: 1.18rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 40px;
    letter-spacing: 0.005em;
}

.art-author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    gap: 16px;
    flex-wrap: wrap;
}
.art-author {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 0.92rem;
}
.art-av {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), #c084fc);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}
.art-author strong { color: var(--text); display: block; font-weight: 500; }
.art-author span span { color: var(--text-subtle); font-size: 0.78rem; }
.art-actions { display: inline-flex; gap: 6px; }
.art-action {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}
.art-action:hover {
    background: var(--violet-soft);
    color: var(--violet-light);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.art-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 56px 32px 80px;
    color: var(--text);
}

.art-body p,
.art-body ul,
.art-body ol {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
    line-height: 1.95;
    margin-bottom: 22px;
    letter-spacing: 0.005em;
}

.art-body p strong { color: #fff; font-weight: 500; }
.art-body p em { color: var(--violet-light); font-style: normal; font-weight: 500; }

.art-body .lede {
    font-size: 1.32rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 36px;
    font-weight: 300;
    position: relative;
    padding-left: 24px;
    border-left: 2px solid var(--violet);
}

.art-body h2 {
    font-size: clamp(1.5rem, 2.4vw, 1.8rem);
    font-weight: 500;
    margin: 56px 0 22px;
    letter-spacing: -0.02em;
    color: #fff;
    padding-top: 14px;
    position: relative;
}
.art-body h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--violet);
    border-radius: 2px;
}

.art-body h3 {
    font-size: 1.18rem;
    font-weight: 600;
    margin: 36px 0 14px;
    letter-spacing: -0.01em;
    color: #fff;
}

.art-body ul,
.art-body ol {
    padding-left: 26px;
    margin-bottom: 28px;
}
.art-body li {
    margin-bottom: 10px;
    line-height: 1.85;
}
.art-body ul li { list-style: none; position: relative; }
.art-body ul li::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--violet-light);
    box-shadow: 0 0 6px rgba(167, 139, 250, 0.5);
}
.art-body ol { padding-left: 28px; }
.art-body ol li { padding-left: 6px; }
.art-body ol li::marker { color: var(--violet-light); font-weight: 600; }

.art-body blockquote {
    margin: 36px 0;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.02));
    border-left: 3px solid var(--violet);
    border-radius: 0 18px 18px 0;
    font-size: 1.2rem;
    line-height: 1.6;
    font-weight: 300;
    color: #fff;
    font-style: italic;
    position: relative;
}
.art-body blockquote::before {
    content: """;
    position: absolute;
    top: 8px;
    right: 24px;
    font-size: 4rem;
    color: var(--violet);
    opacity: 0.25;
    font-family: Georgia, serif;
    line-height: 1;
}
.art-body blockquote em {
    font-style: italic;
    background: linear-gradient(135deg, var(--violet-light), #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}
.art-body blockquote cite {
    display: block;
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-subtle);
    font-style: normal;
    letter-spacing: 0.04em;
}

.art-cta-box {
    margin: 48px 0;
    padding: 36px 36px;
    background:
        radial-gradient(ellipse at top right, rgba(139, 92, 246, 0.15), transparent 60%),
        var(--bg-elevated);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.art-cta-box h4 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    color: #fff;
}
.art-cta-box h4 span {
    background: linear-gradient(135deg, var(--violet-light), #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.art-cta-box p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
    max-width: 420px;
    line-height: 1.65;
}
.art-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--violet), #c084fc);
    color: #fff;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
    flex-shrink: 0;
}
.art-cta-btn:hover {
    color: #fff;
    transform: translateX(4px) translateY(-2px);
    box-shadow: 0 14px 36px rgba(139, 92, 246, 0.5);
}
.art-cta-btn span { transition: transform 0.32s; }
.art-cta-btn:hover span { transform: translateX(4px); }

.art-foot-info {
    margin-top: 64px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}
.art-foot-label {
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: 12px;
}
.art-foot-name {
    font-size: 1.05rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
}
.art-foot-bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
}
.art-refs {
    padding: 0;
    margin: 0;
    list-style: none;
}
.art-refs li {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 6px;
    padding-left: 14px;
    position: relative;
}
.art-refs li::before {
    content: "·";
    position: absolute;
    left: 0;
    color: var(--violet-light);
    font-weight: 700;
}
.art-refs li em { font-style: italic; color: var(--text); }

.related-wrap { padding-top: 0; }

@media (max-width: 720px) {
    .art-head { padding: 130px 0 36px; }
    .art-author-bar { flex-direction: column; align-items: flex-start; }
    .art-body { padding: 36px 24px 56px; }
    .art-body .lede { font-size: 1.15rem; padding-left: 18px; }
    .art-cta-box { flex-direction: column; align-items: flex-start; padding: 28px; }
    .art-foot-info { grid-template-columns: 1fr; gap: 32px; }
    .art-body blockquote { padding: 22px 24px; font-size: 1.05rem; }
}

/* ==========================================================================
   Timeline (about page)
   ========================================================================== */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    max-width: 920px;
    margin: 0 auto;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(139, 92, 246, 0.3) 8%,
        rgba(139, 92, 246, 0.3) 92%,
        transparent 100%);
    transform: translateX(-50%);
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    align-items: center;
    margin-bottom: 32px;
    min-height: 80px;
}
.tl-item:nth-child(even) { direction: rtl; }
.tl-item:nth-child(even) .tl-card { direction: ltr; }
.tl-item:nth-child(even) .tl-marker { direction: ltr; }

.tl-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}
.tl-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--violet-light);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12), 0 0 16px rgba(167, 139, 250, 0.4);
    transition: transform 0.3s;
}
.tl-item:hover .tl-dot { transform: scale(1.3); }

.tl-card {
    padding: 28px 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: all var(--transition);
    position: relative;
}
.tl-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-3px);
    background: var(--bg-card);
}

.tl-card.highlighted {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), var(--bg-elevated));
    border-color: rgba(139, 92, 246, 0.35);
}
.tl-card.highlighted::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), transparent 60%, rgba(192, 132, 252, 0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.tl-when {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: var(--violet-light);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tl-tag {
    padding: 2px 10px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 999px;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
}
.tl-tag-now {
    background: linear-gradient(135deg, var(--violet), #c084fc);
    color: #fff;
    border: none;
    animation: pulseDot 2.4s ease-in-out infinite;
}

.tl-what {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: -0.01em;
}

.tl-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.75;
    margin: 0;
}
.tl-card p strong { color: #fff; font-weight: 500; }
.tl-card p em { color: var(--violet-light); font-style: normal; }

@media (max-width: 720px) {
    .timeline::before { left: 22px; }
    .tl-item,
    .tl-item:nth-child(even) {
        grid-template-columns: 44px 1fr;
        direction: ltr;
    }
    .tl-marker { justify-content: flex-start; }
}

.about-lede,
.lede-about {
    font-size: 1.18rem;
    line-height: 1.7;
    color: var(--text);
    font-weight: 300;
    margin-bottom: 20px;
}

/* ==========================================================================
   Detection page "how it works" flow
   ========================================================================== */
.flow-section { position: relative; }

.flow {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    position: relative;
}

.flow-step {
    padding: 36px 28px 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.flow-step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--violet), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}
.flow-step:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.4);
    background: var(--bg-card);
}
.flow-step:hover::before { opacity: 1; }

/* Connecting line between flow steps (desktop) */
.flow-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--violet-light);
    opacity: 0.4;
    font-size: 1.2rem;
    z-index: 1;
    pointer-events: none;
}

.flow-num {
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    color: var(--violet-light);
    font-weight: 600;
    margin-bottom: 18px;
    font-feature-settings: "tnum";
}
.flow-num::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 1px;
    background: var(--violet-light);
    vertical-align: middle;
    margin-right: 10px;
    margin-top: -2px;
}

.flow-ico {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(139, 92, 246, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--violet-light);
    margin-bottom: 18px;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.flow-ico svg { width: 22px; height: 22px; }
.flow-step:hover .flow-ico {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(192, 132, 252, 0.12));
    color: #fff;
    box-shadow: 0 6px 22px rgba(139, 92, 246, 0.25);
}

.flow-step h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.flow-step p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

.flow-step .lvl-ok   { color: #6ee7b7; font-weight: 500; }
.flow-step .lvl-low  { color: var(--violet-light); font-weight: 500; }
.flow-step .lvl-mid  { color: #fcd34d; font-weight: 500; }
.flow-step .lvl-high { color: #fca5a5; font-weight: 500; }

.flow-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.78rem;
    color: var(--text-subtle);
    letter-spacing: 0.02em;
}
.flow-tip span {
    color: var(--violet-light);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}
.flow-tip.flow-tip-ok span { color: #6ee7b7; }

@media (max-width: 1024px) {
    .flow { grid-template-columns: 1fr 1fr; }
    .flow-step:nth-child(2n)::after { display: none; }
}
@media (max-width: 560px) {
    .flow { grid-template-columns: 1fr; }
    .flow-step::after { display: none; }
}

/* ==========================================================================
   Quiz page
   ========================================================================== */
.quiz-hero {
    min-height: 100vh;
    padding: 120px 32px 80px;
    position: relative;
    overflow: hidden;
}
.quiz-hero::before {
    content: "";
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 480px;
    background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.16) 0%, transparent 70%);
    pointer-events: none;
}

.quiz-prog-wrap {
    max-width: 720px;
    margin: 0 auto 48px;
    position: relative;
    z-index: 2;
}
.quiz-prog-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}
.quiz-prog-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--violet), var(--violet-light));
    border-radius: 4px;
    transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.5);
}
.quiz-prog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-subtle);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    font-feature-settings: "tnum";
}

.quiz-stage {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.quiz-screen {
    display: none;
    animation: quizIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.quiz-screen.active { display: block; }

@keyframes quizIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.quiz-eyebrow {
    display: inline-block;
    color: var(--violet-light);
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.06);
}

.quiz-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 28px;
    color: #fff;
}
.quiz-title .accent {
    background: linear-gradient(135deg, #fff, var(--violet-light) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.quiz-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 36px;
}

.quiz-promises {
    list-style: none;
    padding: 28px 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 18px;
    margin-bottom: 36px;
    display: grid;
    gap: 16px;
}
.quiz-promises li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}
.quiz-promises strong { color: #fff; font-weight: 500; }
.qp-ic {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.quiz-disclaimer {
    margin-top: 24px;
    color: var(--text-subtle);
    font-size: 0.85rem;
    line-height: 1.7;
}
.quiz-disclaimer a { color: var(--violet-light); border-bottom: 1px solid rgba(167, 139, 250, 0.35); }

/* Question screen */
.q-dim {
    color: var(--violet-light);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 18px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.q-dim::before {
    content: "";
    width: 16px;
    height: 1px;
    background: var(--violet-light);
}

.q-text {
    font-size: clamp(1.5rem, 3.2vw, 2.2rem);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    color: #fff;
}

.q-options {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.q-opt {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.q-opt:hover {
    background: var(--bg-card);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateX(4px);
}
.q-opt.selected {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0.04));
    border-color: var(--violet);
    box-shadow: 0 0 0 1px var(--violet), 0 6px 22px rgba(139, 92, 246, 0.25);
}
.q-opt-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    background: transparent;
    transition: all 0.25s;
    position: relative;
}
.q-opt.selected .q-opt-dot {
    border-color: var(--violet);
    background: var(--violet);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.45);
}
.q-opt.selected .q-opt-dot::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: #fff;
    border-radius: 50%;
}
.q-opt-label {
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
}
.q-opt-sub {
    color: var(--text-subtle);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-feature-settings: "tnum";
}

.q-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.q-prev,
.q-skip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: all 0.22s;
}
.q-prev:hover:not(:disabled),
.q-skip:hover {
    color: #fff;
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
}
.q-prev:disabled { opacity: 0.35; cursor: not-allowed; }
.q-hint {
    color: var(--text-subtle);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

/* Result screen */
.q-result-head {
    text-align: center;
    padding: 32px 24px;
    margin-bottom: 40px;
    border-radius: 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.q-result-head[data-level="risk-high"] { border-color: rgba(248, 113, 113, 0.3); background: linear-gradient(135deg, rgba(248, 113, 113, 0.06), var(--bg-elevated)); }
.q-result-head[data-level="risk-mid"]  { border-color: rgba(251, 191, 36, 0.3); background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), var(--bg-elevated)); }
.q-result-head[data-level="risk-low"]  { border-color: rgba(167, 139, 250, 0.3); background: linear-gradient(135deg, rgba(167, 139, 250, 0.06), var(--bg-elevated)); }
.q-result-head[data-level="risk-ok"]   { border-color: rgba(52, 211, 153, 0.3); background: linear-gradient(135deg, rgba(52, 211, 153, 0.06), var(--bg-elevated)); }

.q-result-head .level-badge { margin-bottom: 16px; }
.q-result-head h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    color: #fff;
}
.q-result-head .r-score {
    font-size: 1.4em;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--violet-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-feature-settings: "tnum";
}
.q-result-head[data-level="risk-high"] .r-score { background: linear-gradient(135deg, #fff, #fca5a5); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.q-result-head[data-level="risk-mid"]  .r-score { background: linear-gradient(135deg, #fff, #fcd34d); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.q-result-head[data-level="risk-ok"]   .r-score { background: linear-gradient(135deg, #fff, #6ee7b7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.q-result-head p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 520px;
    margin: 0 auto;
}

.q-result-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    margin-bottom: 40px;
}
.q-radar {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.q-radar svg { width: 100%; height: auto; max-width: 320px; }

.q-dims {
    display: grid;
    gap: 14px;
}
.q-dim-row {
    padding: 16px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.q-dim-row[data-level="risk-high"] { border-left: 3px solid #f87171; }
.q-dim-row[data-level="risk-mid"]  { border-left: 3px solid #fbbf24; }
.q-dim-row[data-level="risk-low"]  { border-left: 3px solid var(--violet-light); }
.q-dim-row[data-level="risk-ok"]   { border-left: 3px solid #34d399; }

.q-dim-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.q-dim-name { color: #fff; font-size: 0.98rem; font-weight: 500; letter-spacing: -0.01em; }
.q-dim-val {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--violet-light);
    font-feature-settings: "tnum";
}
.q-dim-row[data-level="risk-high"] .q-dim-val { color: #fca5a5; }
.q-dim-row[data-level="risk-mid"]  .q-dim-val { color: #fcd34d; }
.q-dim-row[data-level="risk-ok"]   .q-dim-val { color: #6ee7b7; }

.q-dim-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}
.q-dim-bar > div {
    height: 100%;
    background: linear-gradient(90deg, var(--violet), var(--violet-light));
    border-radius: 2px;
    animation: dimFill 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.q-dim-row[data-level="risk-high"] .q-dim-bar > div { background: linear-gradient(90deg, #f87171, #fca5a5); }
.q-dim-row[data-level="risk-mid"]  .q-dim-bar > div { background: linear-gradient(90deg, #fbbf24, #fcd34d); }
.q-dim-row[data-level="risk-ok"]   .q-dim-bar > div { background: linear-gradient(90deg, #34d399, #6ee7b7); }

@keyframes dimFill {
    from { width: 0; }
}
.q-dim-desc {
    color: var(--text-subtle);
    font-size: 0.82rem;
    line-height: 1.6;
}

.q-flags {
    padding: 24px 28px;
    background: rgba(248, 113, 113, 0.04);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 18px;
    margin-bottom: 40px;
}
.q-flags h4 { color: #fca5a5; font-size: 0.95rem; font-weight: 500; margin-bottom: 8px; letter-spacing: 0.02em; }
.q-flags p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 14px; }
.q-flag-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.q-flag-tag {
    padding: 6px 14px;
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
}

.q-next h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
    color: #fff;
}
.q-next-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 40px;
}
.q-next-card {
    padding: 24px 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.q-next-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.4);
    background: var(--bg-card);
}
.q-next-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--violet-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 14px;
}
.q-next-card h4 { font-size: 1rem; font-weight: 500; margin-bottom: 8px; color: #fff; letter-spacing: -0.01em; }
.q-next-card p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.7; }

.q-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
    .q-result-grid { grid-template-columns: 1fr; }
    .q-radar { padding: 12px; }
    .q-next-grid { grid-template-columns: 1fr; }
    .q-options { gap: 8px; }
    .q-opt { padding: 14px 16px; }
    .quiz-promises { padding: 22px 20px; }
}

/* ==========================================================================
   Resources page
   ========================================================================== */
.emergency-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
    background: radial-gradient(ellipse at left, rgba(248, 113, 113, 0.12), transparent 70%), var(--bg-elevated);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}
.eb-pulse {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f87171;
    box-shadow: 0 0 14px #f87171;
    flex-shrink: 0;
    position: relative;
}
.eb-pulse::before,
.eb-pulse::after {
    content: "";
    position: absolute;
    inset: -8px;
    border: 2px solid #f87171;
    border-radius: 50%;
    opacity: 0;
    animation: ebRing 2s ease-out infinite;
}
.eb-pulse::after { animation-delay: 1s; }
@keyframes ebRing {
    0%   { opacity: 0.6; transform: scale(0.6); }
    100% { opacity: 0; transform: scale(1.8); }
}

.eb-content { flex: 1; min-width: 0; }
.eb-label {
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    color: #fca5a5;
    font-weight: 600;
    margin-bottom: 8px;
}
.eb-text { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.eb-text strong { color: #fff; font-weight: 500; }
.eb-text a { color: #fca5a5; border-bottom: 1px solid rgba(252, 165, 165, 0.4); }
.eb-cta { flex-shrink: 0; background: linear-gradient(135deg, #f87171, #fca5a5); border-color: transparent; }
.eb-cta:hover { background: linear-gradient(135deg, #ef4444, #f87171); box-shadow: 0 12px 32px rgba(248, 113, 113, 0.45); }

.res-block {
    margin-bottom: 64px;
    transition: all 0.4s;
}
.res-block-head {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.res-block-num {
    font-size: 0.78rem;
    color: var(--violet-light);
    font-weight: 600;
    letter-spacing: 0.18em;
    font-feature-settings: "tnum";
}
.res-block-head h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0;
    color: #fff;
}
.res-block-meta {
    margin-left: auto;
    color: var(--text-subtle);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.res-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.res-card {
    padding: 28px 26px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}
.res-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.35);
    background: var(--bg-card);
}
.res-card.highlighted {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), var(--bg-elevated));
    border-color: rgba(139, 92, 246, 0.35);
}

.res-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(139, 92, 246, 0.12);
    color: var(--violet-light);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    width: fit-content;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.res-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: #fff;
    line-height: 1.4;
    letter-spacing: -0.01em;
}
.res-card h3 em { font-style: italic; color: var(--text-muted); font-weight: 400; }

.res-phone {
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-feature-settings: "tnum";
}
.res-phone a {
    background: linear-gradient(135deg, var(--violet-light), #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: filter 0.25s;
}
.res-phone a:hover { filter: brightness(1.2); }

.res-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 14px;
    flex: 1;
}
.res-card p em { color: var(--violet-light); font-style: italic; }
.res-card p a {
    color: var(--violet-light);
    border-bottom: 1px solid rgba(167, 139, 250, 0.35);
    transition: color 0.2s, border-color 0.2s;
}
.res-card p a:hover { color: #fff; border-color: #fff; }

.res-author {
    color: var(--text-subtle);
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-style: italic;
}

.res-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-subtle);
    font-size: 0.78rem;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    letter-spacing: 0.02em;
}

@media (max-width: 1024px) {
    .res-grid { grid-template-columns: 1fr 1fr; }
    .emergency-banner { flex-wrap: wrap; }
    .eb-cta { width: 100%; justify-content: center; }
}
@media (max-width: 560px) {
    .res-grid { grid-template-columns: 1fr; }
    .res-block-meta { width: 100%; margin-left: 0; }
}

/* ==========================================================================
   SOS floating button + panel
   ========================================================================== */
.sos-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 95;
}

.sos-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: visible;
}
.sos-fab:hover { transform: scale(1.08); box-shadow: 0 18px 44px rgba(239, 68, 68, 0.6); }
.sos-fab:active { transform: scale(0.96); }
.sos-fab svg { position: relative; z-index: 2; }
.sos-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    letter-spacing: 0.3em;
    color: #fca5a5;
    font-weight: 700;
}

.sos-pulse,
.sos-pulse-2 {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #f87171;
    opacity: 0;
    animation: sosPulse 2.4s ease-out infinite;
}
.sos-pulse-2 { animation-delay: 1.2s; }
@keyframes sosPulse {
    0%   { opacity: 0.6; transform: scale(1); }
    100% { opacity: 0; transform: scale(2); }
}

.sos-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: rgba(15, 10, 30, 0.92);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 22px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    pointer-events: none;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.sos-wrap.open .sos-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.sos-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.12), transparent);
}
.sos-h-eb { font-size: 0.65rem; letter-spacing: 0.3em; color: #fca5a5; font-weight: 600; margin-bottom: 2px; }
.sos-h-t { font-size: 1.05rem; font-weight: 600; color: #fff; }
.sos-close {
    width: 32px; height: 32px; border-radius: 50%;
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.22s;
    border: 1px solid var(--border);
}
.sos-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.sos-body { padding: 14px; display: grid; gap: 8px; }
.sos-row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.22s;
}
.sos-row:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--border-strong); transform: translateX(2px); }
.sos-row-call { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.sos-row-call:hover { background: rgba(248, 113, 113, 0.14); }
.sos-row-num {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 10px;
    border-radius: 8px;
    text-align: center;
    font-feature-settings: "tnum";
}
.sos-row-call .sos-row-num { color: #fca5a5; background: rgba(248, 113, 113, 0.12); }
.sos-row-info { line-height: 1.35; }
.sos-row-info strong { color: #fff; font-size: 0.92rem; font-weight: 500; display: block; }
.sos-row-info span { color: var(--text-subtle); font-size: 0.78rem; }
.sos-row-arrow { color: var(--text-subtle); font-size: 0.9rem; }

.sos-row-link .sos-row-num {
    background: rgba(139, 92, 246, 0.12);
    color: var(--violet-light);
}

.sos-exit {
    margin-top: 8px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.22s;
}
.sos-exit:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.sos-foot {
    padding: 12px 18px 18px;
    color: var(--text-subtle);
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.55;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   Command palette (Cmd+K)
   ========================================================================== */
.cmd-wrap {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14vh;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0s linear 0.2s;
}
.cmd-wrap.open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.2s, visibility 0s;
}

.cmd-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cmd-modal {
    position: relative;
    width: 640px;
    max-width: calc(100vw - 32px);
    background: rgba(15, 10, 30, 0.92);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 32px 96px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    transform: scale(0.96) translateY(-12px);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cmd-wrap.open .cmd-modal { transform: scale(1) translateY(0); }

.cmd-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1.05rem;
    font-family: inherit;
    letter-spacing: -0.01em;
}
.cmd-input::placeholder { color: var(--text-subtle); }

.cmd-esc {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: inherit;
    letter-spacing: 0.05em;
}

.cmd-list {
    list-style: none;
    padding: 8px;
    margin: 0;
    max-height: 56vh;
    overflow-y: auto;
}

.cmd-item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s;
}
.cmd-item.active { background: rgba(139, 92, 246, 0.18); }
.cmd-item:hover { background: rgba(255, 255, 255, 0.04); }
.cmd-icon { font-size: 1rem; opacity: 0.85; text-align: center; }
.cmd-label { color: #fff; font-size: 0.95rem; letter-spacing: -0.005em; }
.cmd-sub { color: var(--text-subtle); font-size: 0.78rem; margin-top: 2px; }
.cmd-type {
    font-size: 0.7rem;
    color: var(--text-subtle);
    letter-spacing: 0.1em;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}
.cmd-item.active .cmd-type { background: rgba(139, 92, 246, 0.18); color: var(--violet-light); }

.cmd-empty {
    padding: 36px 14px;
    text-align: center;
    color: var(--text-subtle);
    font-size: 0.9rem;
}

.cmd-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.72rem;
    color: var(--text-subtle);
    letter-spacing: 0.04em;
}
.cmd-foot kbd {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: inherit;
    margin-right: 4px;
}
.cmd-foot-r { margin-left: auto; color: var(--text-subtle); }

/* ==========================================================================
   Article sticky TOC
   ========================================================================== */
.art-toc {
    position: fixed;
    top: 140px;
    left: 32px;
    width: 220px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    z-index: 30;
    padding: 18px;
    background: rgba(15, 10, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: opacity 0.3s;
}
@media (max-width: 1280px) { .art-toc { display: none; } }

.art-toc-label {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.art-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}
.art-toc-list li {
    counter-increment: toc;
    margin-bottom: 6px;
}
.art-toc-list a {
    display: block;
    padding: 6px 10px 6px 22px;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    border-radius: 6px;
    transition: all 0.22s;
    position: relative;
    border-left: 2px solid transparent;
}
.art-toc-list a::before {
    content: counter(toc, decimal-leading-zero);
    position: absolute;
    left: 4px;
    top: 6px;
    font-size: 0.65rem;
    color: var(--text-subtle);
    letter-spacing: 0.02em;
    font-feature-settings: "tnum";
}
.art-toc-list a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}
.art-toc-list a.active {
    color: var(--violet-light);
    border-left-color: var(--violet);
    background: rgba(139, 92, 246, 0.08);
}
.art-toc-list a.active::before { color: var(--violet-light); }

/* ==========================================================================
   Light theme overrides — places where dark colors are hard-coded
   ========================================================================== */
html[data-theme="light"] .nav.scrolled {
    background-color: rgba(251, 250, 248, 0.78);
    box-shadow: 0 1px 0 var(--border);
}
html[data-theme="light"] .nav.scrolled,
html[data-theme="light"] .sos-panel,
html[data-theme="light"] .cmd-modal {
    background: rgba(255, 255, 255, 0.85);
}
html[data-theme="light"] .cmd-backdrop { background: rgba(20, 12, 40, 0.45); }
html[data-theme="light"] .cmd-modal,
html[data-theme="light"] .sos-panel { box-shadow: 0 24px 64px rgba(20, 12, 40, 0.25); }
html[data-theme="light"] .hero-trust .avatars span { border-color: var(--bg); }
html[data-theme="light"] .hero-cta { background: rgba(109, 40, 217, 0.05); color: var(--text); }
html[data-theme="light"] .hero-cta:hover { color: #fff; }
html[data-theme="light"] .nav-links {
    background-color: rgba(251, 250, 248, 0.95);
}
html[data-theme="light"] .g-scr h1 span { background: linear-gradient(135deg, var(--text), var(--violet)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
html[data-theme="light"] .g-br i { color: var(--violet); text-shadow: 0 0 14px rgba(109, 40, 217, 0.3); }
html[data-theme="light"] body::after { background: radial-gradient(ellipse at center, transparent 25%, rgba(20, 12, 40, 0.05) 100%); }
html[data-theme="light"] .hero-text { text-shadow: none; }
html[data-theme="light"] .hero-title .line-1 { color: var(--text); }
html[data-theme="light"] .hero-title .line-2 {
    background: linear-gradient(135deg, var(--text) 0%, var(--violet-light) 50%, var(--violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
html[data-theme="light"] .hero-title { text-shadow: none; }
html[data-theme="light"] .hero-sub { color: var(--text-muted); }
html[data-theme="light"] .hero-eyebrow {
    background: rgba(109, 40, 217, 0.05);
    border-color: rgba(109, 40, 217, 0.2);
    color: var(--violet);
}
html[data-theme="light"] .hero-eyebrow::before { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
html[data-theme="light"] .hero-trust { color: var(--text-muted); }
html[data-theme="light"] .hero-trust strong { color: var(--text); }
html[data-theme="light"] .detector-textarea,
html[data-theme="light"] .det-area {
    background: rgba(20, 12, 40, 0.03);
    color: var(--text);
}
html[data-theme="light"] .detector-textarea::placeholder,
html[data-theme="light"] .det-area::placeholder { color: var(--text-subtle); }
html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .field select {
    background: rgba(20, 12, 40, 0.03);
    color: var(--text);
}
html[data-theme="light"] .footer { background: var(--bg-soft); }

/* ==========================================================================
   Theme toggle button (injected by JS into nav)
   ========================================================================== */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(127, 127, 127, 0.04);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.28s;
    margin-left: 12px;
    flex-shrink: 0;
}
.theme-toggle:hover {
    color: var(--violet-light);
    border-color: rgba(139, 92, 246, 0.4);
    background: var(--violet-soft);
    transform: scale(1.05);
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: inline-block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: inline-block; }
html[data-theme="light"] .theme-toggle .icon-sun  { display: none; }

/* ==========================================================================
   Skip-to-content link (a11y)
   ========================================================================== */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 1000;
    padding: 10px 18px;
    background: var(--violet);
    color: #fff;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: top 0.2s;
    text-decoration: none;
}
.skip-link:focus {
    top: 16px;
    outline: 2px solid var(--violet-light);
    outline-offset: 3px;
    color: #fff;
}

/* ==========================================================================
   Highlight-to-share bubble (article page)
   ========================================================================== */
.share-bubble {
    position: absolute;
    z-index: 50;
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: rgba(15, 10, 30, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(8px) scale(0.92);
    transform-origin: center bottom;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.share-bubble.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.share-bubble::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: inherit;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.share-bubble button {
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.18s;
    font-family: inherit;
}
.share-bubble button:hover { background: rgba(139, 92, 246, 0.25); }
.share-bubble button.ok { color: #6ee7b7; }
html[data-theme="light"] .share-bubble { background: rgba(255, 255, 255, 0.96); border-color: var(--border); box-shadow: 0 12px 32px rgba(20, 12, 40, 0.18); }
html[data-theme="light"] .share-bubble button { color: var(--text); }
html[data-theme="light"] .share-bubble::after { border-color: var(--border); }

/* ==========================================================================
   Konami easter egg overlay
   ========================================================================== */
.konami {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.45), rgba(0, 0, 0, 0.92));
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}
.konami.show { opacity: 1; pointer-events: auto; }
.konami-card {
    background: rgba(15, 10, 30, 0.95);
    border: 1px solid rgba(167, 139, 250, 0.4);
    border-radius: 22px;
    padding: 56px 48px;
    max-width: 520px;
    text-align: center;
    color: #fff;
    box-shadow: 0 32px 96px rgba(0, 0, 0, 0.6), 0 0 80px rgba(139, 92, 246, 0.35);
    transform: scale(0.92);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.konami.show .konami-card { transform: scale(1); }
.konami-card .konami-h {
    font-size: 0.72rem;
    letter-spacing: 0.4em;
    color: #a78bfa;
    margin-bottom: 20px;
}
.konami-card h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}
.konami-card p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.85;
    margin-bottom: 14px;
}
.konami-card .konami-sig {
    margin-top: 24px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}
.konami-card button {
    margin-top: 24px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.22s;
}
.konami-card button:hover { background: rgba(167, 139, 250, 0.18); border-color: rgba(167, 139, 250, 0.4); }

/* ==========================================================================
   Chat-bubble detector (detection page redesign)
   ========================================================================== */
.chat-input {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
    transition: all var(--transition);
}
.chat-input:focus-within {
    border-color: var(--violet);
    box-shadow: 0 0 0 4px var(--violet-soft);
}

.chat-bubbles {
    padding: 22px 22px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 380px;
    overflow-y: auto;
}

.chat-empty {
    color: var(--text-subtle);
    text-align: center;
    padding: 48px 24px;
    font-size: 0.92rem;
    line-height: 1.7;
}
.chat-empty strong { color: var(--text-muted); display: block; margin-bottom: 6px; font-weight: 500; }

.chat-bubble {
    max-width: 78%;
    padding: 12px 16px 10px;
    border-radius: 18px;
    position: relative;
    animation: chatIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes chatIn {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-bubble.ta {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-top-left-radius: 6px;
}
.chat-bubble.me {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0.12));
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: #fff;
    border-top-right-radius: 6px;
}
.chat-bubble .who {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: 4px;
    font-weight: 600;
}
.chat-bubble.me .who { color: var(--violet-light); }
.chat-bubble .msg {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
}
.chat-bubble .x {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-subtle);
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    line-height: 1;
}
.chat-bubble:hover .x { opacity: 1; }
.chat-bubble .x:hover { background: rgba(248, 113, 113, 0.18); color: #fca5a5; }
.chat-bubble.me .x { color: var(--violet-light); }

/* Live highlight of matched keywords */
.chat-bubble .msg .hl {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
    padding: 1px 4px;
    border-radius: 3px;
    border-bottom: 1px dotted rgba(248, 113, 113, 0.5);
    font-weight: 500;
}
.chat-bubble .msg .hl-mild {
    background: rgba(251, 191, 36, 0.18);
    color: #fcd34d;
    padding: 1px 4px;
    border-radius: 3px;
    border-bottom: 1px dotted rgba(251, 191, 36, 0.5);
}

.chat-compose {
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 14px;
}
.chat-compose-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.chat-role-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 999px;
    padding: 3px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.chat-role-toggle button {
    padding: 6px 14px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--text-subtle);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.chat-role-toggle button.active.ta-role {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}
.chat-role-toggle button.active.me-role {
    background: var(--violet);
    color: #fff;
}
.chat-compose textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: none;
    min-height: 38px;
    max-height: 120px;
    padding: 8px 4px;
}
.chat-compose textarea::placeholder { color: var(--text-subtle); }
.chat-add {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--violet);
    color: #fff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s;
    flex-shrink: 0;
}
.chat-add:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.4);
}
.chat-add:disabled { background: var(--bg-elevated); color: var(--text-subtle); cursor: not-allowed; transform: none; box-shadow: none; }

.chat-shortcuts {
    margin-top: 10px;
    font-size: 0.72rem;
    color: var(--text-subtle);
    letter-spacing: 0.02em;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.chat-shortcuts kbd {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: inherit;
    margin: 0 2px;
}

.chat-quick-fill {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.chat-quick-fill button {
    padding: 5px 12px;
    background: transparent;
    border: 1px dashed var(--border-strong);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.chat-quick-fill button:hover {
    border-style: solid;
    border-color: var(--violet);
    color: var(--violet-light);
    background: var(--violet-soft);
}

@media (max-width: 560px) {
    .chat-compose-row { flex-wrap: wrap; }
    .chat-role-toggle { order: -1; flex-basis: auto; }
    .chat-bubbles { padding: 16px 16px 6px; min-height: 160px; }
}

/* ==========================================================================
   404 page
   ========================================================================== */
.nf-hero {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 24px 64px;
    position: relative;
    overflow: hidden;
}
.nf-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.nf-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}
.nf-glow-1 {
    width: 480px; height: 480px;
    top: 10%; left: 15%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.42), transparent 60%);
    animation: nfFloat 18s ease-in-out infinite alternate;
}
.nf-glow-2 {
    width: 380px; height: 380px;
    bottom: 8%; right: 12%;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.32), transparent 60%);
    animation: nfFloat 22s ease-in-out infinite alternate-reverse;
}
.nf-glow-3 {
    width: 320px; height: 320px;
    top: 40%; left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 60%);
    animation: nfFloat 26s ease-in-out infinite alternate;
}
@keyframes nfFloat {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -30px) scale(1.15); }
}

.nf-inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    text-align: center;
}

.nf-meta {
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    color: var(--text-subtle);
    text-transform: uppercase;
    margin-bottom: 32px;
    font-weight: 600;
}

.nf-code {
    font-size: clamp(7rem, 22vw, 14rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.06em;
    margin-bottom: 36px;
    display: flex;
    justify-content: center;
    gap: 0;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 60%, var(--violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nf-code .nf-zero {
    position: relative;
    display: inline-block;
    animation: nfSpin 8s linear infinite;
    transform-origin: center 50%;
}
@keyframes nfSpin {
    to { transform: rotateY(360deg); }
}

.nf-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: var(--text);
}
.nf-title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--violet-light), #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

.nf-sub {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.8;
    margin-bottom: 40px;
}
.nf-sub em { font-style: italic; color: var(--violet-light); }

.nf-actions {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 36px;
}

.nf-tip {
    color: var(--text-subtle);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nf-tip kbd {
    padding: 3px 8px;
    background: rgba(127, 127, 127, 0.08);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Stories page
   ========================================================================== */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.story-card {
    padding: 32px 32px 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 22px;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
}
.story-card:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.3);
    background: var(--bg-card);
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-subtle);
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.story-num {
    color: var(--violet-light);
    font-weight: 600;
    letter-spacing: 0.18em;
    font-feature-settings: "tnum";
}
.story-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-subtle);
    opacity: 0.5;
}
.story-where { color: var(--text-muted); }
.story-tag {
    margin-left: auto;
    padding: 3px 10px;
    background: var(--violet-soft);
    color: var(--violet-light);
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    border: 1px solid rgba(139, 92, 246, 0.22);
}

.story-title {
    font-size: 1.18rem;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 16px;
    color: #fff;
    letter-spacing: -0.01em;
}
html[data-theme="light"] .story-title { color: var(--text); }

.story-body {
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.85;
    overflow: hidden;
    max-height: 6.6em;
    position: relative;
    transition: max-height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}
.story-body p { margin-bottom: 14px; }
.story-body p:last-child { margin-bottom: 0; }
.story-body p strong { color: #fff; font-weight: 500; }
html[data-theme="light"] .story-body p strong { color: var(--text); }
.story-body p em { color: var(--violet-light); font-style: italic; }

.story-card.expanded .story-body {
    max-height: 200em;
    mask-image: none;
    -webkit-mask-image: none;
}

.story-toggle {
    margin-top: 16px;
    padding: 8px 0;
    background: transparent;
    border: none;
    color: var(--violet-light);
    font-size: 0.88rem;
    cursor: pointer;
    align-self: flex-start;
    transition: gap 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.story-toggle:hover { color: #fff; }

/* === Submission form === */
.story-submit {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    padding: 48px;
    background: var(--bg-elevated);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
}
.story-submit::before {
    content: "";
    position: absolute;
    top: -80px;
    left: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 65%);
    filter: blur(20px);
    pointer-events: none;
}
.story-submit-side { position: relative; z-index: 1; }
.story-submit-side .section-title { margin-bottom: 18px; }
.story-submit-side > p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.75; }
.story-promises {
    list-style: none;
    padding: 0;
    margin: 0;
}
.story-promises li {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 8px;
}

.story-form {
    position: relative;
    z-index: 1;
}
.story-form .field { margin-bottom: 16px; }
.story-form .field-row { gap: 14px; margin-bottom: 16px; }
.sf-count {
    text-align: right;
    color: var(--text-subtle);
    font-size: 0.78rem;
    margin-top: 6px;
    letter-spacing: 0.02em;
}
.sf-count span { color: var(--violet-light); font-feature-settings: "tnum"; font-weight: 600; }
.story-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.65;
    margin: 18px 0 24px;
    cursor: pointer;
}
.story-consent input[type=checkbox] {
    margin-top: 4px;
    accent-color: var(--violet);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.story-consent a {
    color: var(--violet-light);
    border-bottom: 1px solid rgba(167, 139, 250, 0.4);
}

@media (max-width: 1024px) {
    .stories-grid { grid-template-columns: 1fr; }
    .story-submit { grid-template-columns: 1fr; gap: 28px; padding: 32px 28px; }
}

/* ==========================================================================
   FAQ page
   ========================================================================== */
.faq-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 32px;
    color: var(--text-muted);
    transition: all 0.25s;
}
.faq-search-wrap:focus-within {
    border-color: var(--violet);
    box-shadow: 0 0 0 4px var(--violet-soft);
}
.faq-search {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}
.faq-search::placeholder { color: var(--text-subtle); }
.faq-count {
    font-size: 0.82rem;
    color: var(--text-subtle);
    letter-spacing: 0.04em;
    font-feature-settings: "tnum";
}

.faq-list { display: grid; gap: 40px; }
.faq-section { }
.faq-section-title {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text);
    letter-spacing: -0.02em;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.faq-section-num {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: var(--violet-light);
    font-weight: 600;
    font-feature-settings: "tnum";
}

.faq-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.25s;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item[open] {
    border-color: rgba(139, 92, 246, 0.32);
    background: var(--bg-card);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.005em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    line-height: 1.5;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--violet-soft);
    color: var(--violet-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 400;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    line-height: 0;
    padding-bottom: 2px;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
    background: var(--violet);
    color: #fff;
}

.faq-body {
    padding: 0 24px 22px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.85;
}
.faq-body p { margin-bottom: 12px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body p strong { color: var(--text); font-weight: 500; }
.faq-body p em { color: var(--violet-light); font-style: italic; }
.faq-body p a {
    color: var(--violet-light);
    border-bottom: 1px solid rgba(167, 139, 250, 0.4);
    transition: color 0.22s, border-color 0.22s;
}
.faq-body p a:hover { color: var(--text); border-color: var(--text); }
.faq-body ul { padding-left: 22px; margin: 12px 0; }
.faq-body ul li { list-style: disc; margin-bottom: 6px; }

.faq-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}
.faq-empty p { margin-bottom: 12px; font-size: 1.05rem; }
.faq-empty a { color: var(--violet-light); border-bottom: 1px solid rgba(167, 139, 250, 0.4); }

.faq-item.hidden { display: none; }
.faq-section.hidden { display: none; }
.faq-search-hit {
    background: rgba(251, 191, 36, 0.25);
    color: #fcd34d;
    padding: 0 2px;
    border-radius: 2px;
}
html[data-theme="light"] .faq-search-hit { background: rgba(251, 191, 36, 0.4); color: #92400e; }

/* ==========================================================================
   Bookmarks system
   ========================================================================== */
.bm-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(127, 127, 127, 0.06);
    border: 1px solid var(--border);
    color: var(--text-subtle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.22s;
    position: relative;
}
.bm-btn:hover {
    color: var(--violet-light);
    border-color: rgba(139, 92, 246, 0.4);
    background: var(--violet-soft);
}
.bm-btn.bookmarked {
    color: var(--violet);
    border-color: var(--violet);
    background: var(--violet-soft);
}
.bm-btn.bookmarked svg { fill: var(--violet); }
.bm-btn svg { width: 14px; height: 14px; transition: all 0.22s; }

/* Article action button — already styled (.art-action), reuse but add bookmark variant */
.art-action.bookmarked { color: var(--violet); background: var(--violet-soft); border-color: rgba(139, 92, 246, 0.4); }
.art-action.bookmarked svg { fill: var(--violet); }

/* Bookmark toast */
.bm-toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 20px;
    background: rgba(15, 10, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: #fff;
    font-size: 0.88rem;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.bm-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.bm-toast svg { color: var(--violet-light); }
html[data-theme="light"] .bm-toast { background: rgba(255, 255, 255, 0.96); color: var(--text); box-shadow: 0 12px 32px rgba(20, 12, 40, 0.18); }

/* ==========================================================================
   Mobile bottom tab bar
   ========================================================================== */
.mtb {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    display: none;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mtb.visible { transform: translateY(0); }
html[data-theme="light"] .mtb { background: rgba(255, 255, 255, 0.85); border-top-color: var(--border); }

.mtb-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
}
.mtb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    color: var(--text-subtle);
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    border-radius: 8px;
    transition: color 0.22s;
    text-decoration: none;
    position: relative;
}
.mtb-item svg { width: 20px; height: 20px; }
.mtb-item:active { background: rgba(127, 127, 127, 0.08); }
.mtb-item.active { color: var(--violet-light); }
.mtb-item.active::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--violet);
    border-radius: 2px;
}

@media (max-width: 720px) {
    .mtb { display: block; }
    .sos-wrap { bottom: 76px; }
    body { padding-bottom: 64px; }
}

/* ==========================================================================
   Article footnotes
   ========================================================================== */
.fn-ref {
    display: inline-block;
    vertical-align: super;
    font-size: 0.7em;
    margin: 0 2px;
    padding: 0 6px;
    background: var(--violet-soft);
    color: var(--violet-light);
    border-radius: 999px;
    text-decoration: none;
    cursor: help;
    font-feature-settings: "tnum";
    border: 1px solid rgba(139, 92, 246, 0.25);
    transition: all 0.22s;
    line-height: 1.4;
}
.fn-ref:hover {
    background: var(--violet);
    color: #fff;
    border-color: var(--violet);
}

.fn-pop {
    position: absolute;
    z-index: 60;
    max-width: 320px;
    padding: 14px 18px;
    background: rgba(15, 10, 30, 0.97);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: all 0.2s;
}
.fn-pop.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.fn-pop strong { color: var(--violet-light); font-weight: 600; font-feature-settings: "tnum"; margin-right: 4px; }
html[data-theme="light"] .fn-pop { background: rgba(255, 255, 255, 0.97); color: var(--text-muted); box-shadow: 0 12px 32px rgba(20, 12, 40, 0.18); }

/* ==========================================================================
   Animated relationship-cycle SVG (homepage)
   ========================================================================== */
.cycle-section {
    padding: 96px 0;
    position: relative;
}
.cycle-wrap {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 64px;
    align-items: center;
}
.cycle-text h2 { margin-bottom: 18px; }
.cycle-text p { color: var(--text-muted); font-size: 1.02rem; line-height: 1.8; margin-bottom: 14px; }
.cycle-text p strong { color: var(--text); }

.cycle-stages {
    margin-top: 28px;
    display: grid;
    gap: 12px;
}
.cycle-stage {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.22s;
}
.cycle-stage.active {
    background: var(--bg-card);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.18);
}
.cycle-stage .cs-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(127, 127, 127, 0.1);
    color: var(--text-subtle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.22s;
    font-feature-settings: "tnum";
}
.cycle-stage.active .cs-num { background: var(--violet); color: #fff; box-shadow: 0 0 14px rgba(139, 92, 246, 0.5); }
.cycle-stage strong { color: var(--text); font-size: 0.95rem; font-weight: 500; }
.cycle-stage span { color: var(--text-muted); font-size: 0.86rem; line-height: 1.6; display: block; margin-top: 2px; }

.cycle-vis {
    aspect-ratio: 1;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}
.cycle-vis svg { width: 100%; height: 100%; }
.cycle-arc {
    fill: none;
    stroke: var(--border-strong);
    stroke-width: 1;
    opacity: 0.4;
}
.cycle-node {
    transition: all 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cycle-node circle.outer { fill: var(--bg-elevated); stroke: var(--border-strong); stroke-width: 1.5; transition: all 0.45s; }
.cycle-node circle.inner { fill: var(--text-subtle); transition: all 0.45s; }
.cycle-node text { fill: var(--text-muted); font-size: 13px; font-weight: 500; text-anchor: middle; font-family: var(--font-sans); transition: all 0.45s; }
.cycle-node.active circle.outer { fill: var(--violet); stroke: var(--violet-light); stroke-width: 3; filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6)); }
.cycle-node.active circle.inner { fill: #fff; r: 8; }
.cycle-node.active text { fill: #fff; font-weight: 600; }

.cycle-pointer {
    transition: transform 0.65s cubic-bezier(0.45, 0.05, 0.55, 0.95);
    transform-origin: 50% 50%;
}
.cycle-center text { fill: var(--text); font-size: 16px; font-weight: 600; text-anchor: middle; font-family: var(--font-sans); }
.cycle-center .cycle-label-stage { fill: var(--violet-light); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600; }
.cycle-center .cycle-label-cn { fill: var(--text); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }

@media (max-width: 900px) {
    .cycle-wrap { grid-template-columns: 1fr; gap: 40px; }
    .cycle-vis { max-width: 360px; }
}

/* ==========================================================================
   Print stylesheet — focus on article reading
   ========================================================================== */
@media print {
    /* Hide chrome */
    .nav, .footer, .scroll-prog, .read-prog,
    .sos-wrap, .cmd-wrap, .mtb, .skip-link,
    .art-toc, .related-wrap, .art-actions,
    .art-cta-box, .back-link, .share-bubble,
    .theme-toggle, .bm-toast {
        display: none !important;
    }

    /* Force light, monochrome */
    html, body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
        line-height: 1.55;
    }

    body::before, body::after, .hero-photo::after { display: none !important; }

    /* Article body — clean serif print */
    .art-body {
        max-width: 100%;
        padding: 0;
        margin: 0;
        color: #000;
    }
    .art-body p,
    .art-body ul,
    .art-body ol,
    .art-body li {
        color: #000 !important;
        font-size: 11pt;
        line-height: 1.6;
    }
    .art-body p strong { color: #000 !important; }
    .art-body p em { color: #4b0082 !important; font-style: italic; }
    .art-body h2, .art-body h3 { color: #000 !important; page-break-after: avoid; }
    .art-body h2::before { background: #4b0082 !important; }
    .art-body blockquote {
        background: #f4f4f4 !important;
        border-left: 3px solid #4b0082 !important;
        color: #000 !important;
        page-break-inside: avoid;
        margin: 14pt 0;
    }
    .art-body blockquote::before { display: none; }
    .art-body ul li::before { background: #000 !important; box-shadow: none !important; }

    .art-head {
        padding: 0 0 14pt !important;
        margin-bottom: 14pt;
        border-bottom: 1px solid #ccc !important;
    }
    .art-head::before { display: none; }
    .art-title { color: #000 !important; font-size: 20pt; margin-bottom: 8pt; }
    .art-title em { color: #4b0082 !important; }
    .art-deck { color: #333 !important; font-size: 12pt; }
    .art-author-bar { border: none !important; padding: 6pt 0; font-size: 9pt; }
    .art-cat { color: #4b0082 !important; }

    /* Author / refs footer */
    .art-foot-info { border-top: 1px solid #ccc !important; color: #000 !important; }
    .art-foot-label, .art-foot-bio, .art-refs li { color: #333 !important; }

    /* Print URL after links */
    a[href]:not([href^="#"])::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555;
        word-wrap: break-word;
    }
    a[href^="#"]::after, .art-cta-btn::after { content: ""; }

    /* Page break helpers */
    h1, h2, h3 { page-break-after: avoid; }
    p, blockquote, ul, ol { page-break-inside: avoid; orphans: 3; widows: 3; }
}
