:root {
    --bg: #030733;
    --bg-2: #050a42;
    --surface: rgba(255, 255, 255, .075);
    --surface-strong: rgba(255, 255, 255, .13);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, .72);
    --soft: rgba(255, 255, 255, .52);
    --line: rgba(255, 255, 255, .16);
    --danger: #ff2a56;
    --danger-2: #ff7b82;
    --ok: #46e6a6;
    --warning: #ffcf5a;
    --shadow: 0 24px 80px rgba(0, 0, 0, .36);
    --radius: 28px;
    --max: 1120px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: var(--bg);
    color: var(--text);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(circle at 24% 0%, rgba(255, 42, 86, .22), transparent 30rem),
        radial-gradient(circle at 100% 20%, rgba(255, 123, 130, .16), transparent 28rem),
        linear-gradient(180deg, var(--bg), #01031c 70%);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(3, 7, 51, .78);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
}

.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { width: 46px; height: 46px; border-radius: 999px; object-fit: cover; border: 1px solid rgba(255,255,255,.2); box-shadow: 0 10px 26px rgba(0,0,0,.25); }
.brand-text { display: grid; line-height: 1.05; }
.brand-title { font-size: 18px; font-weight: 850; letter-spacing: -.03em; }
.brand-subtitle { color: var(--muted); font-size: 12px; margin-top: 3px; }

.nav-toggle {
    min-width: 66px; height: 46px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 850; letter-spacing: .01em; cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-strong); }

.site-nav {
    display: none; position: absolute; inset: 72px 16px auto 16px; padding: 14px;
    border: 1px solid var(--line); border-radius: 22px; background: rgba(4,7,43,.96); box-shadow: var(--shadow);
}
.site-nav.is-open { display: grid; gap: 8px; }
.site-nav a, .site-nav button {
    min-height: 46px; padding: 12px 14px; border-radius: 16px; color: var(--muted);
    background: transparent; border: 0; text-align: left; cursor: pointer;
}
.site-nav a:hover, .site-nav button:hover { color: var(--text); background: var(--surface); }
.nav-form { margin: 0; }

.hero { min-height: calc(100svh - 72px); display: grid; align-items: center; padding: 42px 0 28px; }
.hero-grid { display: grid; gap: 28px; }
.kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; font-weight: 750; }
.kicker::before { width: 9px; height: 9px; border-radius: 999px; background: linear-gradient(135deg, var(--danger-2), var(--danger)); content: ""; box-shadow: 0 0 0 8px rgba(255,42,86,.1); }

.hero h1, .page-title { margin: 16px 0 0; font-size: clamp(40px, 10vw, 88px); line-height: .98; letter-spacing: -.045em; word-spacing: .04em; font-weight: 820; text-wrap: balance; }
.hero h1 span, .accent { background: linear-gradient(135deg, #fff, var(--danger-2) 42%, var(--danger)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { margin: 20px 0 0; color: var(--muted); font-size: clamp(18px, 5vw, 24px); line-height: 1.35; max-width: 780px; }

.search-card, .panel-card, .emergency-card, .stat-card, .auth-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.055));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.search-card { padding: 18px; }
.form-grid { display: grid; gap: 12px; }

.input, .textarea, .select {
    width: 100%; min-height: 56px; border: 1px solid var(--line); border-radius: 18px;
    background: rgba(255,255,255,.09); color: var(--text); padding: 0 16px; outline: none;
}
.textarea { min-height: 120px; padding: 14px 16px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: rgba(255,255,255,.42); }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(255,42,86,.72); box-shadow: 0 0 0 4px rgba(255,42,86,.14); }

.btn {
    min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 0 20px; border-radius: 18px; border: 1px solid transparent;
    background: linear-gradient(135deg, var(--danger-2), var(--danger)); color: white;
    font-weight: 850; cursor: pointer; box-shadow: 0 18px 34px rgba(255,42,86,.24);
}
.btn.secondary { background: rgba(255,255,255,.08); border-color: var(--line); box-shadow: none; color: var(--text); }
.btn.ghost { background: transparent; border-color: var(--line); box-shadow: none; }
.btn.full { width: 100%; }
.mini-text { color: var(--soft); font-size: 13px; line-height: 1.45; }

.story {
    position: relative;
    min-height: 520svh;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 50% 24%, rgba(255,42,86,.12), transparent 28rem),
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
}
.story-stage {
    position: sticky;
    top: 72px;
    min-height: calc(100svh - 72px);
    display: grid;
    align-items: center;
    padding: 36px 0;
    pointer-events: none;
    overflow: hidden;
}
.story-stage::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 18%;
    width: min(620px, 82vw);
    height: min(620px, 82vw);
    border-radius: 999px;
    transform: translate3d(-50%, calc(var(--story-orbit, 0) * 18px), 0) scale(calc(1 + var(--story-orbit, 0) * .025));
    background: radial-gradient(circle, rgba(255,42,86,.16), transparent 62%);
    filter: blur(4px);
    opacity: .78;
}
.story-stage .container { position: relative; z-index: 1; }
.story-text {
    max-width: 980px;
    margin: 0 auto;
    font-size: clamp(38px, 9vw, 94px);
    line-height: 1.02;
    letter-spacing: -.045em;
    word-spacing: .035em;
    font-weight: 820;
    text-align: center;
    text-wrap: balance;
    transform: translate3d(0, var(--story-y, 0px), 0) scale(var(--story-scale, 1));
    opacity: var(--story-opacity, 1);
    filter: blur(var(--story-blur, 0px));
    transition: opacity .16s linear, transform .16s linear, filter .16s linear;
    will-change: transform, opacity, filter;
}
.story-progress {
    width: min(320px, 66vw);
    height: 5px;
    margin: 30px auto 0;
    border-radius: 99px;
    background: rgba(255,255,255,.13);
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
}
.story-progress span {
    display: block;
    height: 100%;
    width: calc(var(--progress, 0) * 100%);
    background: linear-gradient(90deg, var(--danger-2), var(--danger));
    border-radius: inherit;
    transition: width .08s linear;
}
.story-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.story-marker {
    min-height: 100svh;
    display: grid;
    place-items: end center;
    padding: 0 24px 54px;
    color: var(--soft);
    text-align: center;
}
.story-marker span {
    max-width: 460px;
    opacity: .22;
    font-size: 15px;
    line-height: 1.45;
    transform: translateY(calc(var(--caption-y, 0) * 1px));
    transition: opacity .18s linear, transform .18s linear;
}
.story-marker.is-active span { opacity: .58; }

.section { padding: 64px 0; }
.section-title { margin: 0; font-size: clamp(30px, 8vw, 56px); line-height: 1; letter-spacing: -.06em; }
.section-lead { color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 740px; }
.cards-grid { display: grid; gap: 16px; margin-top: 24px; }
.info-card { padding: 22px; border-radius: 26px; border: 1px solid var(--line); background: rgba(255,255,255,.055); }
.info-card strong { display: block; font-size: 18px; margin-bottom: 8px; }
.info-card p { color: var(--muted); margin: 0; line-height: 1.55; }

.page { padding: 34px 0 80px; }
.panel-card { padding: 20px; }
.auth-shell { min-height: calc(100svh - 72px); display: grid; align-items: center; padding: 42px 0; }
.auth-card { width: min(100%, 480px); margin: auto; padding: 22px; }
.form-row { display: grid; gap: 8px; margin-bottom: 14px; }
label { color: var(--muted); font-size: 14px; font-weight: 750; }
.alert { padding: 14px 16px; border-radius: 18px; margin: 14px 0; border: 1px solid var(--line); }
.alert.error { border-color: rgba(255,42,86,.46); background: rgba(255,42,86,.13); }
.alert.success { border-color: rgba(70,230,166,.36); background: rgba(70,230,166,.12); }
.error-text { color: #ff9cab; font-size: 13px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 24px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px; text-align: left; border-bottom: 1px solid var(--line); color: var(--muted); }
th { color: var(--text); background: rgba(255,255,255,.055); font-size: 13px; }

.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 800; }
.badge.ok { background: rgba(70,230,166,.13); border-color: rgba(70,230,166,.3); }
.badge.warn { background: rgba(255,207,90,.13); border-color: rgba(255,207,90,.3); }
.badge.danger { background: rgba(255,42,86,.13); border-color: rgba(255,42,86,.3); }

.emergency-hero { padding: 26px 0 70px; }
.emergency-card { padding: 22px; }
.emergency-title { font-size: clamp(34px, 10vw, 76px); line-height: .95; margin: 14px 0 10px; letter-spacing: -.07em; }
.emergency-code { display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; padding: 9px 13px; background: rgba(255,255,255,.09); color: var(--muted); }
.contact-list { display: grid; gap: 12px; margin-top: 18px; }
.contact-tile { padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255,255,255,.055); }
.contact-tile strong { display: block; margin-bottom: 5px; }

.dashboard-grid { display: grid; gap: 16px; margin-top: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 38px; color: var(--muted); }
.footer { padding: 36px 0; border-top: 1px solid var(--line); color: var(--soft); }

.content-shell { display: grid; gap: 22px; }
.content-grid { display: grid; gap: 16px; margin-top: 4px; }
.rich-text { color: var(--muted); font-size: 17px; line-height: 1.72; }
.rich-text h2 { color: var(--text); margin: 28px 0 10px; font-size: clamp(24px, 5vw, 34px); line-height: 1.05; letter-spacing: -.04em; }
.rich-text p { margin: 0 0 14px; }
.rich-text blockquote { margin: 24px 0 0; padding: 18px 20px; border-left: 4px solid var(--danger); border-radius: 18px; background: rgba(255,255,255,.06); color: var(--text); }
.notice-card, .download-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255,255,255,.065);
    padding: 20px;
}
.notice-card strong, .download-card strong { display: block; color: var(--text); margin-bottom: 8px; font-size: 18px; }
.notice-card p, .download-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.download-card { display: grid; gap: 16px; align-items: center; }
.legal-text h2 { padding-top: 4px; }
.footer-grid { display: grid; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-links a { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; font-size: 13px; }
.footer-links a:hover { color: var(--text); background: var(--surface); }

@media (min-width: 760px) {
    .hero-grid { grid-template-columns: 1.05fr .75fr; align-items: center; }
    .form-grid.lookup { grid-template-columns: 1fr auto; }
    .cards-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid { grid-template-columns: repeat(3, 1fr); }
    .two-col { grid-template-columns: repeat(2, 1fr); }
    .download-card { grid-template-columns: 1fr auto; }
    .footer-grid { grid-template-columns: 1fr auto; align-items: start; }
    .search-card, .panel-card, .emergency-card, .auth-card { padding: 28px; }
    .notice-card, .download-card { padding: 24px; }
}

@media (min-width: 960px) {
    .nav-toggle { display: none; }
    .site-nav {
        position: static; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px;
        padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
    }
    .site-nav a, .site-nav button { min-height: 42px; padding: 10px 11px; text-align: center; font-size: 14px; }
}

@media (max-width: 520px) {
    .container { width: min(100% - 22px, var(--max)); }
    .brand-title { font-size: 16px; }
    .brand-subtitle { display: none; }
    .hero h1, .page-title { font-size: 42px; line-height: 1; letter-spacing: -.035em; }
    .story-text { font-size: clamp(34px, 12vw, 54px); line-height: 1.05; letter-spacing: -.035em; }
    .story-stage { top: 72px; }
    .search-card, .panel-card, .emergency-card, .auth-card { border-radius: 22px; padding: 16px; }
    .notice-card, .download-card { border-radius: 20px; padding: 16px; }
    .site-nav { inset-inline: 11px; }
}

