:root {
    color-scheme: dark;
    --bg: #07101d;
    --bg-2: #0b1728;
    --panel: rgba(14, 28, 47, 0.90);
    --panel-strong: #101f34;
    --panel-soft: rgba(255, 255, 255, 0.045);
    --line: rgba(255, 255, 255, 0.11);
    --line-bright: rgba(255, 255, 255, 0.22);
    --text: #f4f8ff;
    --muted: #b9c9dc;
    --gold: #ffd15c;
    --cyan: #65dfff;
    --green: #78e59a;
    --orange: #ff9d4d;
    --purple: #c291ff;
    --red: #ff7c76;
    --shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 0%, rgba(101, 223, 255, 0.11), transparent 29rem),
        radial-gradient(circle at 90% 22%, rgba(255, 209, 92, 0.10), transparent 31rem),
        linear-gradient(180deg, #050b14 0%, var(--bg) 45%, #080e18 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

button, input { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }

.ambient {
    position: fixed;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.16;
    pointer-events: none;
    z-index: -1;
}

.ambient-one { left: -12rem; top: 25vh; background: var(--cyan); }
.ambient-two { right: -12rem; top: 60vh; background: var(--orange); }

.site-header {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 5px 12px rgba(101, 223, 255, 0.22));
}

.brand span { display: grid; line-height: 1.08; }
.brand strong { font-size: 20px; letter-spacing: 0.02em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 5px; }

.header-actions,
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-chip,
.language-switcher {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

.version-chip {
    padding: 8px 12px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.language-switcher { padding: 4px; }

.language-switcher button {
    border: 0;
    min-width: 42px;
    min-height: 36px;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.language-switcher button.active {
    background: var(--gold);
    color: #182033;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    gap: 34px;
    align-items: center;
    min-height: 540px;
    padding: clamp(28px, 5vw, 62px);
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 45%),
        var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-copy { min-width: 0; }

.eyebrow,
.section-kicker {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.hero h1 {
    margin: 12px 0 18px;
    max-width: 770px;
    font-size: clamp(42px, 6.4vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
}

.hero-copy > p {
    margin: 0;
    max-width: 720px;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 21px);
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-fact {
    padding: 9px 12px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.hero-visual {
    position: relative;
    margin: 0;
    justify-self: center;
    width: min(330px, 100%);
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 8% -12%;
    z-index: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(101, 223, 255, 0.25), transparent 68%);
    filter: blur(24px);
}

.hero-visual img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-height: 430px;
    object-fit: cover;
    object-position: 50% 58%;
    border-radius: 26px;
    border: 1px solid rgba(101, 223, 255, 0.28);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

.hero-visual figcaption {
    position: relative;
    z-index: 2;
    width: calc(100% - 28px);
    margin: -26px auto 0;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(9, 19, 34, 0.94);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.guide-controls {
    position: sticky;
    top: 10px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.28fr);
    gap: 12px;
    margin: 18px 0 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(7, 16, 29, 0.88);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--muted);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 2px;
}

.category-button {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.category-button.active {
    color: #081321;
    background: var(--category-color, var(--gold));
    border-color: transparent;
}

.quick-paths,
.faq-section {
    margin-top: 44px;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(27px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.path-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 19px;
}

.path-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(140deg, color-mix(in srgb, var(--path-color) 12%, transparent), transparent 60%),
        var(--panel);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease;
}

.path-card:hover { transform: translateY(-3px); border-color: var(--line-bright); }
.path-card .path-icon { font-size: 30px; }
.path-card h3 { margin: 18px 0 8px; font-size: 23px; }
.path-card p { margin: 0; color: var(--muted); }
.path-card .path-link { margin-top: auto; padding-top: 18px; color: var(--path-color); font-weight: 900; }

.faq-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.result-count { margin: 0 0 3px; color: var(--muted); font-size: 13px; }

.topic-list {
    display: grid;
    gap: 14px;
    margin-top: 19px;
}

.topic {
    --topic-color: var(--cyan);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    overflow: clip;
    scroll-margin-top: 100px;
}

.topic.open { border-color: color-mix(in srgb, var(--topic-color) 48%, transparent); }

.topic-question {
    width: 100%;
    min-height: 92px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 15px;
    align-items: center;
    padding: 18px 20px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.topic-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: color-mix(in srgb, var(--topic-color) 14%, transparent);
    color: var(--topic-color);
    font-size: 12px;
    font-weight: 900;
}

.topic-question-copy { display: grid; gap: 4px; }
.topic-category { color: var(--topic-color); font-size: 11px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.topic-title { font-size: clamp(17px, 2.4vw, 23px); font-weight: 850; line-height: 1.3; }
.topic-summary { color: var(--muted); font-size: 13px; font-weight: 500; }

.topic-chevron {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--topic-color);
    font-size: 24px;
    transition: transform 180ms ease;
}

.topic.open .topic-chevron { transform: rotate(45deg); }

.topic-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 220ms ease;
}

.topic.open .topic-answer { grid-template-rows: 1fr; }
.topic-answer-clip { overflow: hidden; }

.topic-answer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    gap: 26px;
    padding: 4px 20px 24px 79px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.answer-copy { padding-top: 20px; }
.answer-intro { margin: 0 0 18px; color: var(--muted); font-size: 16px; }

.steps { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.step-index {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: color-mix(in srgb, var(--topic-color) 16%, transparent);
    color: var(--topic-color);
    font-size: 12px;
    font-weight: 900;
}
.step strong { display: block; color: var(--text); line-height: 1.35; }
.step p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }

.topic-tip {
    margin-top: 18px;
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--topic-color) 32%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--topic-color) 8%, transparent);
    color: var(--text);
    font-size: 14px;
}

.answer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 11px;
}

.source-chip {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.topic-media {
    display: grid;
    gap: 12px;
    padding-top: 20px;
    align-content: start;
}

.media-card {
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.035);
}

.media-button {
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 13px;
    overflow: hidden;
    background: #060b13;
    cursor: zoom-in;
}

.media-card img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: var(--media-position, 50% 50%);
}

.media-card figcaption {
    padding: 10px 8px 6px;
    color: var(--muted);
    font-size: 12px;
}

.topic-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.topic-link,
.copy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.copy-link { color: var(--topic-color); }
.topic-link:hover, .copy-link:hover { border-color: var(--line-bright); color: var(--text); }

.empty-state {
    margin-top: 18px;
    padding: 30px;
    border: 1px dashed var(--line-bright);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 60px auto 0;
    padding: 28px 0 40px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.footer-links a { color: var(--cyan); text-decoration: none; }

.image-dialog {
    width: min(920px, calc(100% - 28px));
    max-height: 92vh;
    padding: 14px;
    border: 1px solid var(--line-bright);
    border-radius: 22px;
    background: #091321;
    color: var(--text);
    box-shadow: var(--shadow);
}

.image-dialog::backdrop { background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(5px); }
.image-dialog img { display: block; max-height: 78vh; margin: auto; border-radius: 14px; }
.image-dialog p { margin: 11px 38px 0 4px; color: var(--muted); font-size: 13px; }
.dialog-close {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-bright);
    border-radius: 50%;
    background: rgba(4, 9, 16, 0.88);
    color: var(--text);
    cursor: pointer;
    font-size: 25px;
}

@media (max-width: 880px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-visual { width: min(420px, 100%); }
    .guide-controls { position: static; grid-template-columns: 1fr; }
    .path-grid { grid-template-columns: 1fr; }
    .path-card { min-height: 178px; }
    .topic-answer-inner { grid-template-columns: 1fr; padding-left: 20px; }
    .topic-media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .site-header, .page-shell, .site-footer { width: min(100% - 20px, 1180px); }
    .site-header { min-height: 66px; }
    .brand small { display: none; }
    .brand { min-width: 0; }
    .brand strong { font-size: 18px; }
    .header-actions { flex: 0 0 auto; }
    .version-chip { display: none; }
    .hero { padding: 24px 18px; border-radius: 24px; gap: 25px; }
    .hero h1 { font-size: clamp(38px, 12vw, 55px); }
    .quick-paths, .faq-section { margin-top: 34px; }
    .faq-heading-row { align-items: start; flex-direction: column; }
    .topic-question { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 15px 13px; }
    .topic-number { width: 36px; height: 36px; }
    .topic-summary { display: none; }
    .topic-answer-inner { padding: 3px 14px 18px; }
    .topic-media { grid-template-columns: 1fr; }
    .media-card img { max-height: 510px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}
