:root {
    --primary: #e63000;
    --secondary: #ff7b00;
    --accent: #a30000;
    --background: #ffffff;
    --surface: #f8f9fa;
    --text: #212529;
    --muted: #6c757d;
    --line: #e9ecef;
    --success: #198754;
    --warning: #b56a00;
    --shadow: 0 10px 24px rgba(33, 37, 41, .08);
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --glass-blur: 16px;
    --brand-gradient: linear-gradient(135deg, #e63000, #a30000);
}

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

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(230, 48, 0, 0.15); }
    50% { box-shadow: 0 0 40px rgba(230, 48, 0, 0.3); }
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
}

.public-body {
    background: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--accent), var(--primary) 58%, #6d0000);
    color: #fff;
    padding: 18px;
}

.brand {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
}

.brand img {
    width: 100%;
    height: auto;
}

.nav-section {
    margin-top: 22px;
}

.nav-title {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.nav-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .9);
    font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
    background: #fff;
    color: var(--accent);
}

.nav-mark {
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, .16);
    font-size: 11px;
    font-weight: 900;
}

.nav-link.active .nav-mark,
.nav-link:hover .nav-mark {
    background: rgba(230, 48, 0, .1);
}

.main {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.page-kicker {
    margin: 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.page-heading {
    margin: 2px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: 0;
}

.content {
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid.stats {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.grid.two {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr);
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.card,
.stat,
.article,
.table-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--background);
    box-shadow: var(--shadow);
}

.panel {
    padding: 22px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
}

.stat-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    background: rgba(230, 48, 0, .1);
    color: var(--primary);
    font-weight: 900;
}

.stat-value {
    font-size: 26px;
    line-height: 1;
    font-weight: 900;
}

.stat-label,
.muted,
.meta {
    color: var(--muted);
}

.stat-label,
.meta {
    font-size: 13px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-head h2,
.card h3,
.panel h2,
.article h1 {
    margin: 0;
    letter-spacing: 0;
}

.section-head h2,
.panel h2 {
    font-size: 20px;
    font-weight: 900;
}

.card h3 {
    font-size: 18px;
    font-weight: 900;
}

.article {
    padding: 28px;
}

.article h1 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    font-weight: 900;
}

.article-body {
    margin-top: 22px;
    color: #343a40;
    font-size: 16px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge,
.chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(230, 48, 0, .18);
    background: rgba(230, 48, 0, .08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.chip.active,
.badge.dark {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.actions,
.filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.button:hover {
    background: var(--accent);
}

.button.secondary {
    background: var(--secondary);
    color: #212529;
}

.button.ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
}

.button.small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.field {
    display: grid;
    gap: 6px;
}

.field label,
.form-label {
    color: #343a40;
    font-size: 13px;
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.help {
    color: var(--muted);
    font-size: 12px;
}

.alert {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.alert.success {
    border-color: rgba(25, 135, 84, .25);
    background: rgba(25, 135, 84, .08);
    color: #0f5132;
}

.alert.error {
    border-color: rgba(163, 0, 0, .25);
    background: rgba(163, 0, 0, .08);
    color: var(--accent);
}

.button.danger {
    background: var(--accent);
}

.button.link-danger {
    border: 1px solid rgba(163, 0, 0, .2);
    background: #fff;
    color: var(--accent);
}

.inline-form {
    display: inline-flex;
}

.bulk-import-form {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.file-input {
    width: min(280px, 100%);
    min-height: 34px;
    padding: 6px 8px;
    font-size: 13px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
}

.service-map {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.service-tile {
    min-height: 130px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.service-tile strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #f1f3f5;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.exam-section {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.question {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.choices {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.audio-tool,
.audio-block {
    padding: 14px;
    border: 1px solid rgba(230, 48, 0, .16);
    border-radius: 8px;
    background: rgba(255, 123, 0, .06);
}

.audio-block {
    margin: 12px 0;
}

.audio-block audio {
    width: 100%;
    margin-top: 8px;
}

.test-runner {
    display: grid;
    gap: 18px;
}

.runner-topline,
.runner-section-head,
.runner-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.runner-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.runner-step {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.runner-step.active {
    border-color: rgba(230, 48, 0, .28);
    background: rgba(230, 48, 0, .1);
    color: var(--accent);
}

.runner-step.done {
    border-color: rgba(25, 135, 84, .22);
    background: rgba(25, 135, 84, .08);
    color: #0f5132;
}

.runner-timer {
    min-width: 112px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
    text-align: center;
}

.runner-timer.danger {
    background: var(--primary);
}

.runner-intro,
.runner-transition {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(230, 48, 0, .16);
    border-radius: 8px;
    background: rgba(255, 123, 0, .06);
}

.runner-intro h2,
.runner-transition h2,
.runner-section-head h2,
.runner-question-card h3 {
    margin: 0;
    font-weight: 900;
    letter-spacing: 0;
}

.runner-rule-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.runner-rule-grid div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.runner-rule-grid strong,
.runner-rule-grid span {
    display: block;
}

.runner-rule-grid span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.runner-workspace {
    display: grid;
    gap: 14px;
}

.runner-notice,
.runner-audio-status {
    padding: 12px 14px;
    border: 1px solid rgba(230, 48, 0, .16);
    border-radius: 8px;
    background: rgba(230, 48, 0, .06);
    color: #343a40;
    font-weight: 800;
}

.runner-audio-status {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    background: rgba(255, 123, 0, .08);
}

.runner-audio-status span {
    color: var(--muted);
    font-size: 13px;
}

.runner-main {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 16px;
}

.runner-question-nav {
    align-self: start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.runner-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.runner-nav-button {
    min-width: 0;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.runner-nav-button.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.runner-nav-button.answered:not(.active) {
    border-color: rgba(25, 135, 84, .3);
    background: rgba(25, 135, 84, .08);
    color: #0f5132;
}

.runner-nav-button.flagged:not(.active) {
    border-color: rgba(255, 123, 0, .42);
    background: rgba(255, 123, 0, .12);
    color: var(--warning);
}

.runner-listening-lock {
    display: grid;
    gap: 5px;
    color: var(--accent);
}

.runner-listening-lock span {
    color: var(--muted);
    font-size: 13px;
}

.runner-question-area {
    min-width: 0;
}

.runner-question-card,
.runner-passage {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.runner-question-card {
    padding: 18px;
}

.runner-question-card h3 {
    margin-top: 8px;
    font-size: 20px;
    line-height: 1.35;
}

.runner-choices {
    display: grid;
    gap: 9px;
    margin-top: 16px;
}

.runner-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
    min-height: 48px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.runner-choice input {
    margin-top: 3px;
    accent-color: var(--primary);
}

.runner-choice.selected {
    border-color: rgba(230, 48, 0, .42);
    background: rgba(230, 48, 0, .08);
}

.runner-choice.locked {
    cursor: not-allowed;
    opacity: .7;
}

.runner-reading-grid {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(0, 1.15fr);
    gap: 14px;
}

.runner-passage {
    max-height: 520px;
    overflow: auto;
    padding: 18px;
}

.runner-passage p {
    margin: 8px 0 0;
    color: #343a40;
    font-size: 16px;
}

.runner-controls {
    justify-content: flex-end;
    padding-top: 4px;
}

.runner-controls [hidden],
.runner-workspace[hidden],
.runner-transition[hidden],
.runner-audio-status[hidden] {
    display: none;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.empty {
    padding: 28px;
    border: 1px dashed #ced4da;
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

.result-score {
    font-size: clamp(44px, 8vw, 76px);
    line-height: 1;
    font-weight: 900;
    color: var(--primary);
}

.result-hero {
    display: grid;
    grid-template-columns: minmax(260px, .46fr) minmax(0, 1fr);
    gap: 18px;
}

.result-score-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.result-recommendation {
    display: grid;
    gap: 14px;
}

.result-section-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mini-score-card {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.mini-score-head,
.topic-row-head,
.topic-row-meta,
.topic-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mini-score-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.mini-progress {
    height: 9px;
    overflow: hidden;
    margin: 10px 0 6px;
    border-radius: 999px;
    background: #e9ecef;
}

.mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.result-ai-note {
    padding: 14px;
    border: 1px solid rgba(230, 48, 0, .18);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: rgba(230, 48, 0, .04);
}

.result-ai-note.compact {
    margin-top: 14px;
}

.result-ai-note p {
    margin: 6px 0 0;
    color: #495057;
}

.result-detail-grid {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    gap: 14px;
}

.result-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.result-metric-grid div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.result-metric-grid strong {
    display: block;
    margin-top: 4px;
    color: var(--primary);
    font-size: 22px;
    line-height: 1;
}

.topic-list {
    display: grid;
    gap: 12px;
}

.topic-row {
    display: grid;
    gap: 7px;
}

.topic-row-head span,
.topic-row-meta,
.topic-legend {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.topic-row-meta {
    justify-content: flex-start;
}

.topic-bar {
    display: flex;
    width: 100%;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9ecef;
}

.topic-segment {
    min-width: 0;
    height: 100%;
}

.topic-segment.correct,
.topic-legend i.correct {
    background: #2a9dba;
}

.topic-segment.wrong,
.topic-legend i.wrong {
    background: #e03131;
}

.topic-segment.empty,
.topic-legend i.empty {
    background: #e9ecef;
}

.topic-legend {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.topic-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.topic-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.mobile-brand {
    display: none;
}

.public-nav {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 64px;
    padding: 10px 24px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.public-brand {
    display: flex;
    align-items: center;
    max-width: 180px;
}

.public-brand img {
    width: 100%;
    height: auto;
}

.public-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.public-links a {
    padding: 8px 14px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.public-links a:hover {
    color: var(--primary);
    background: rgba(230, 48, 0, 0.06);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--brand-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.nav-btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
}

.nav-btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(230, 48, 0, 0.04);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
}

.public-footer {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    border-top: 1px solid var(--line);
}

.footer-brand {
    max-width: 340px;
}

.footer-logo {
    height: 32px;
    width: auto;
    margin-bottom: 12px;
}

.footer-brand p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.footer-cols {
    display: flex;
    gap: 40px;
}

.footer-col {
    display: grid;
    gap: 8px;
}

.footer-head {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.footer-col a {
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 92vh;
    display: flex;
    align-items: center;
    background: linear-gradient(-45deg, #fff5f2, #fff, #fff7ed, #fff);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 80%, rgba(230, 48, 0, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 90% 20%, rgba(255, 123, 0, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(163, 0, 0, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: rgba(230, 48, 0, 0.1);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.glow-2 {
    width: 300px;
    height: 300px;
    background: rgba(255, 123, 0, 0.08);
    bottom: -80px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 500px);
    align-items: center;
    gap: 48px;
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 100px 0 60px;
}

.hero-copy h1 {
    max-width: 720px;
    margin: 16px 0 18px;
    color: var(--text);
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.hero-copy p {
    max-width: 600px;
    color: #475569;
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hero-tags span {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid rgba(230, 48, 0, .18);
    border-radius: 999px;
    background: rgba(230, 48, 0, .08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 24px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    gap: 8px;
}

.btn-primary {
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(230, 48, 0, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(230, 48, 0, 0.3);
    color: #fff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff;
    transform: translateY(-2px);
}

.btn-lg {
    min-height: 52px;
    padding: 14px 32px;
    font-size: 16px;
}

.hero-preview {
    animation: float 6s ease-in-out infinite;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    padding: 28px;
}

.preview-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}

.preview-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-head strong {
    font-size: 22px;
    font-weight: 900;
}

.preview-scores {
    display: grid;
    gap: 16px;
}

.preview-score-item {
    display: grid;
    gap: 4px;
}

.preview-score-item span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.preview-score-item strong {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
}

.mini-bar {
    height: 6px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}

.mini-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--brand-gradient);
}

.preview-recommend {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.preview-recommend strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.preview-recommend p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.stats-section {
    position: relative;
    z-index: 2;
    margin-top: -40px;
    padding-bottom: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.6s ease-out both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card-accent {
    background: var(--brand-gradient);
    border-color: transparent;
    color: #fff;
}

.stat-card-accent .stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex: 0 0 48px;
}

.stat-icon-red {
    background: rgba(230, 48, 0, 0.1);
    color: var(--primary);
}

.stat-icon-orange {
    background: rgba(255, 123, 0, 0.1);
    color: var(--secondary);
}

.stat-icon-crimson {
    background: rgba(163, 0, 0, 0.1);
    color: var(--accent);
}

.stat-icon-glow {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.stat-body {
    display: grid;
    gap: 2px;
}

.stat-value {
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
}

.stat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.section {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0;
}

.section-head {
    max-width: 680px;
    margin-bottom: 36px;
}

.section-head h2 {
    margin: 14px 0 10px;
    font-size: clamp(28px, 3.5vw, 38px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.section-head p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--card-hue, var(--primary));
    border-radius: 16px 16px 0 0;
}

.service-card:nth-child(1) { animation-delay: 0.05s; }
.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.15s; }
.service-card:nth-child(4) { animation-delay: 0.2s; }
.service-card:nth-child(5) { animation-delay: 0.25s; }

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
    border-color: rgba(230, 48, 0, 0.15);
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(230, 48, 0, 0.08);
    color: var(--card-hue, var(--primary));
}

.service-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
}

.service-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    flex: 1;
}

.service-arrow {
    font-size: 18px;
    color: var(--primary);
    font-weight: 900;
    transition: transform 0.2s ease;
}

.service-card:hover .service-arrow {
    transform: translateX(4px);
}

.cta-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 52px;
    border-radius: 20px;
    background: linear-gradient(135deg, #a30000, #e63000 50%, #ff7b00);
    color: #fff;
}

.cta-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(60px);
    top: -80px;
    right: 10%;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.cta-eyebrow {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
}

.cta-content h2 {
    margin: 14px 0 10px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.12;
    font-weight: 900;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    line-height: 1.6;
}

.cta-banner .btn-primary {
    background: #fff;
    color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
}

.cta-banner .btn-primary:hover {
    background: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    color: var(--accent);
}

.features-grid {
    display: grid;
    gap: 16px;
}

.feature-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.6s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

.feature-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(230, 48, 0, 0.06);
    flex: 0 0 64px;
}

.feature-body h3 {
    margin: 8px 0 6px;
    font-size: 18px;
    font-weight: 900;
}

.feature-body p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    animation: fadeInUp 0.6s ease-out both;
}

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-card:nth-child(3) { animation-delay: 0.3s; }

.pricing-featured {
    border-color: rgba(230, 48, 0, 0.3);
    box-shadow: 0 8px 40px rgba(230, 48, 0, 0.12);
    animation: pulse-glow 3s ease-in-out infinite;
    transform: scale(1.03);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 16px;
    border-radius: 999px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.pricing-card h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.pricing-price {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.pricing-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    flex: 1;
}

.pricing-card .btn {
    width: 100%;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.resource-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
}

.resource-card:nth-child(1) { animation-delay: 0.1s; }
.resource-card:nth-child(2) { animation-delay: 0.2s; }
.resource-card:nth-child(3) { animation-delay: 0.3s; }

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
    border-color: rgba(230, 48, 0, 0.15);
}

.resource-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    background: linear-gradient(135deg, rgba(230, 48, 0, 0.06), rgba(255, 123, 0, 0.08));
    color: var(--primary);
}

.resource-body {
    padding: 20px;
    display: grid;
    gap: 8px;
}

.resource-body h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
}

.resource-body p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.faq-section {
    padding-bottom: 100px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.faq-card {
    padding: 22px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.6s ease-out both;
}

.faq-card:nth-child(1) { animation-delay: 0.05s; }
.faq-card:nth-child(2) { animation-delay: 0.1s; }
.faq-card:nth-child(3) { animation-delay: 0.15s; }
.faq-card:nth-child(4) { animation-delay: 0.2s; }

.faq-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 900;
}

.faq-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
    align-items: center;
    gap: 36px;
    width: min(1040px, calc(100% - 40px));
    min-height: calc(100vh - 170px);
    margin: 0 auto;
    padding: 44px 0;
}

.auth-shell.compact {
    display: flex;
    justify-content: center;
}

.auth-copy {
    max-width: 560px;
}

.auth-panel {
    display: grid;
    gap: 14px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.auth-panel h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
}

.google-button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    color: var(--primary);
    font-weight: 800;
}

.role-permission-shell {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.role-permission-group {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.role-permission-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.role-permission-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.permission-check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 8px;
    min-height: 58px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-size: 13px;
    font-weight: 800;
}

.permission-check input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.permission-check small {
    grid-column: 2;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        border-radius: 0;
    }

    .brand {
        max-width: 260px;
    }

    .grid.stats,
    .grid.three,
    .grid.cards,
    .service-map,
    .grid.two,
    .role-permission-grid,
    .runner-rule-grid,
    .runner-main,
    .runner-reading-grid,
    .result-hero,
    .result-detail-grid,
    .result-section-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-grid,
    .pricing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-inner,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .hero-preview {
        max-width: 480px;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 40px 32px;
    }

    .public-footer {
        flex-direction: column;
        gap: 32px;
    }

    .footer-cols {
        gap: 28px;
    }
}

@media (max-width: 820px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .pricing-featured {
        transform: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .content,
    .topbar {
        padding: 18px;
    }

    .topbar {
        position: relative;
        align-items: flex-start;
        flex-direction: column;
    }

    .grid.stats,
    .grid.three,
    .grid.cards,
    .service-map,
    .grid.two,
    .search-form,
    .form-grid,
    .role-permission-grid {
        grid-template-columns: 1fr;
    }

    .public-nav {
        gap: 10px;
        top: 8px;
        padding: 10px 16px;
        grid-template-columns: 160px 1fr auto;
    }

    .public-links {
        display: none;
        flex-direction: column;
        width: 100%;
        grid-column: 1 / -1;
        padding: 8px 0;
    }

    .public-nav.open .public-links {
        display: flex;
    }

    .public-nav > .actions {
        display: none;
    }

    .public-nav.open > .actions {
        display: flex;
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
    }

    .hero-inner {
        padding: 80px 0 40px;
        gap: 32px;
    }

    .hero-preview {
        max-width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .stats-section {
        margin-top: -24px;
    }

    .section {
        padding: 48px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .cta-banner {
        padding: 32px 24px;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .public-footer,
    .runner-topline,
    .runner-section-head,
    .runner-controls {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
    }

    .runner-rule-grid,
    .runner-main,
    .runner-reading-grid,
    .result-hero,
    .result-detail-grid,
    .result-section-summary,
    .result-metric-grid {
        grid-template-columns: 1fr;
    }

    .runner-question-nav {
        width: 100%;
    }

    .runner-nav-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .runner-timer {
        width: 100%;
    }

    .public-links {
        justify-content: flex-start;
    }

    .nav-list {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .article {
        padding: 20px;
    }
}
