:root {
    --bg: #eef2f6;
    --surface: #ffffff;
    --surface-soft: #f7fafc;
    --text: #18222d;
    --muted: #66727f;
    --line: #d7e0e8;
    --line-strong: #bfccd8;
    --primary: #14606b;
    --primary-dark: #0e4550;
    --primary-soft: #e7f3f4;
    --accent: #c75f3a;
    --accent-soft: #fff0e9;
    --success: #087c55;
    --danger: #b42318;
    --warning: #946200;
    --shadow: 0 18px 44px rgba(23, 36, 50, 0.1);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(180deg, rgba(20, 96, 107, 0.12) 0, rgba(238, 242, 246, 0) 330px),
        repeating-linear-gradient(135deg, rgba(20, 96, 107, 0.035) 0 1px, transparent 1px 18px),
        var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.58;
}

a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 3px solid rgba(199, 95, 58, 0.28);
    outline-offset: 3px;
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 52px;
}

.page.narrow {
    width: min(860px, calc(100% - 32px));
}

.hero,
.topbar,
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 22px;
}

.hero {
    padding: 18px 0 8px;
}

.hero h1,
.topbar h1,
.admin-header h1,
.result-card h1 {
    max-width: 880px;
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: 0;
}

.hero p,
.topbar p {
    max-width: 760px;
}

.eyebrow,
.block-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow::before,
.block-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(215, 224, 232, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin: 18px 0;
}

.card h2 {
    margin: 0 0 16px;
    font-size: clamp(23px, 2.2vw, 30px);
    line-height: 1.18;
    letter-spacing: 0;
}

.muted,
.submit-panel p,
.admin-link {
    color: var(--muted);
}

.intro-card {
    border-top: 4px solid var(--primary);
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.steps-list div {
    min-height: 118px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.steps-list strong {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
}

.steps-list span {
    display: block;
    font-weight: 800;
    line-height: 1.35;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(20, 96, 107, 0.14);
    text-decoration: none;
}

.button-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

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

.button-light {
    background: var(--surface-soft);
}

.button:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

.progress-box {
    flex: 0 0 auto;
    min-width: 118px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--primary-dark);
    color: #fff;
    text-align: center;
    box-shadow: 0 12px 28px rgba(14, 69, 80, 0.18);
}

.progress-box strong {
    display: block;
    font-size: 24px;
    line-height: 1;
}

.progress-box span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.progress-line {
    height: 10px;
    border-radius: 99px;
    background: #dce5ec;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(191, 204, 216, 0.8);
}

.progress-line span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.card-header-row,
.detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.timer {
    flex: 0 0 auto;
    min-width: 86px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.instruction,
.long-text,
.case-text,
.scale-help {
    padding: 18px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    margin: 16px 0 22px;
}

.instruction {
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
}

.case-text {
    white-space: normal;
}

.case-image {
    margin: 18px 0 24px;
    padding: 0;
}

.case-image-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    cursor: zoom-in;
    text-align: left;
}

.case-image-button img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #cbe8f6;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(55, 86, 120, 0.12);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.case-image-button span {
    display: block;
    margin-top: 10px;
    color: #757baa;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.case-image-button:hover img {
    border-color: #6abfe8;
    box-shadow: 0 18px 38px rgba(103, 194, 235, 0.18);
    transform: translateY(-2px);
}

.question-text {
    margin: 0 0 18px;
    color: #334155;
    font-weight: 600;
}

.metrics-table-wrap,
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.metrics-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

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

.metrics-table tr:last-child td,
.data-table tr:last-child td {
    border-bottom: 0;
}

.metrics-table th,
.data-table th {
    background: #f0f5f7;
    color: #425466;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.metrics-table td {
    font-size: 18px;
    font-weight: 900;
}

.metrics-note {
    margin: 14px 0 22px;
    padding: 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(245, 249, 255, 0.9);
    color: #344054;
    font-size: 15px;
    line-height: 1.55;
}

.metrics-note p {
    margin: 0;
}

.metrics-note p + p {
    margin-top: 6px;
}

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

.form-grid .field:only-child {
    grid-column: 1 / -1;
}

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

.field span,
.fieldset legend {
    color: #344054;
    font-weight: 900;
}

.field .case-rating-label {
    font-weight: 400;
    line-height: 1.45;
    overflow-wrap: break-word;
}

.field input[type="text"],
.field input[type="password"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 10px 14px;
    background: #fff;
    color: var(--text);
    font-size: 16px;
}

.field input[type="text"]:focus,
.field input[type="password"]:focus {
    border-color: var(--primary);
}

.range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.range-row output {
    display: grid;
    place-items: center;
    min-height: 46px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--primary-dark);
    font-size: 20px;
    font-weight: 900;
    border: 1px solid var(--line);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.fieldset {
    border: 0;
    padding: 0;
    margin: 24px 0 0;
}

.answers {
    display: grid;
    gap: 10px;
}

.answer-option,
.consent-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.answer-option:hover,
.consent-box:hover {
    border-color: rgba(20, 96, 107, 0.5);
    background: #fbfdff;
    box-shadow: 0 8px 20px rgba(20, 96, 107, 0.08);
}

.answer-option:has(input:checked),
.consent-box:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.answer-option input,
.consent-box input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 4px;
    accent-color: var(--primary);
}

.answer-option span,
.consent-box span {
    min-width: 0;
    font-weight: 650;
}

.other-field {
    margin-top: 16px;
}

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

.rating-row label {
    cursor: pointer;
}

.rating-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-row span {
    display: grid;
    place-items: center;
    min-height: 58px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    font-size: 20px;
    font-weight: 900;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.rating-row label:hover span {
    border-color: rgba(20, 96, 107, 0.5);
    transform: translateY(-1px);
}

.rating-row input:checked + span {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.submit-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.submit-panel p {
    margin: 0;
    max-width: 430px;
    font-size: 14px;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-weight: 800;
}

.alert-error {
    color: var(--danger);
    background: #fff1f0;
    border: 1px solid #ffd8d3;
}

.alert-success {
    color: var(--success);
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

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

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

.result-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.result-grid strong {
    display: block;
    font-size: 19px;
    line-height: 1.25;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status-completed {
    background: #ecfdf3;
    color: var(--success);
}

.status-in_progress {
    background: #fff8e5;
    color: var(--warning);
}

.mini-metrics {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.login-card {
    max-width: 520px;
    margin: 48px auto;
}

.login-form {
    display: grid;
    gap: 16px;
}

@media (max-width: 900px) {
    .steps-list,
    .result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body {
        font-size: 15px;
    }

    .hero,
    .topbar,
    .admin-header,
    .card-header-row,
    .detail-heading,
    .submit-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .steps-list,
    .form-grid,
    .result-grid {
        grid-template-columns: 1fr;
    }

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

    .card {
        padding: 20px;
    }

    .page {
        width: min(100% - 22px, 1120px);
        padding-top: 18px;
    }

    .range-row {
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }
}

/* Dribbble-inspired light clinical dashboard skin */
:root {
    --bg: #fbfdff;
    --surface: #ffffff;
    --surface-soft: #f5faff;
    --text: #121126;
    --muted: #7b80a3;
    --line: #cde9f6;
    --line-strong: #a9d8ec;
    --primary: #66b9df;
    --primary-dark: #283a8b;
    --primary-soft: #edf6ff;
    --accent: #5169f0;
    --accent-soft: #eef3ff;
    --shadow: 0 12px 28px rgba(55, 86, 120, 0.12);
    --radius: 18px;
}

body {
    background: #fff;
    color: var(--text);
    font-family: "Avenir Next", "Nunito Sans", "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.page {
    padding-top: 42px;
}

.page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 22% 6%, rgba(181, 224, 255, 0.5), transparent 20%),
        radial-gradient(circle at 86% 8%, rgba(213, 222, 255, 0.42), transparent 24%),
        #fff;
}

.hero,
.topbar,
.admin-header {
    align-items: center;
}

.hero h1,
.topbar h1,
.admin-header h1,
.result-card h1,
.login-card h1 {
    font-weight: 850;
    color: #111025;
}

.hero p,
.topbar p,
.muted,
.submit-panel p,
.admin-link {
    color: var(--muted);
}

.eyebrow,
.block-label {
    color: #7b7fbd;
    letter-spacing: 0;
    text-transform: none;
}

.eyebrow::before,
.block-label::before {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #7fd3ff, #6477ff);
    box-shadow: 0 0 0 5px rgba(102, 185, 223, 0.12);
}

.card {
    border: 1px solid rgba(198, 228, 244, 0.95);
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 1px 4px rgba(27, 45, 74, 0.08),
        0 12px 30px rgba(91, 125, 153, 0.10);
}

.intro-card,
.step-card,
.detail-card,
.login-card,
.result-card {
    position: relative;
    overflow: hidden;
}

.intro-card::before,
.step-card::before,
.detail-card::before,
.login-card::before,
.result-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #94ddff, #8ba1ff, #f5f8ff);
}

.steps-list div,
.stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #cbe8f6;
    background:
        radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.54) 0 28px, transparent 29px),
        radial-gradient(circle at 86% 48%, rgba(255, 255, 255, 0.35) 0 34px, transparent 35px),
        linear-gradient(135deg, #e7f7ff 0%, #b7d0ff 100%);
    color: #14152a;
}

.steps-list strong {
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #fff;
    color: #58b7dd;
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(91, 180, 220, 0.18);
}

.steps-list div {
    min-height: 150px;
    padding: 20px 22px;
    border-radius: 22px;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-position 260ms ease;
    background-size: 100% 100%, 100% 100%, 140% 140%;
}

.steps-list span {
    max-width: 100%;
    color: #15152d;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.32;
    overflow-wrap: anywhere;
    word-break: normal;
}

.steps-list div:hover {
    transform: translateY(-7px) scale(1.015);
    border-color: #9edcf4;
    box-shadow: 0 18px 34px rgba(87, 150, 205, 0.2);
    background-position: 76% 18%, 90% 44%, 100% 50%;
}

.steps-list div:hover strong {
    transform: scale(1.08);
    box-shadow: 0 12px 22px rgba(91, 180, 220, 0.28);
}

.steps-list strong {
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.button {
    min-height: 50px;
    border-color: #dfe5f0;
    border-radius: 999px;
    background: #fff;
    color: #14152a;
    box-shadow: 0 4px 12px rgba(22, 33, 58, 0.07);
}

.button-primary {
    border-color: #0e0d25;
    background: #0e0d25;
    color: #fff;
}

.button-primary:hover {
    background: #1b1a3b;
}

.button-light {
    background: #f7fbff;
}

.progress-box {
    border-radius: 22px;
    background: #0e0d25;
    box-shadow: 0 14px 28px rgba(14, 13, 37, 0.18);
}

.progress-line {
    height: 7px;
    border: 0;
    background: #edf4fb;
}

.progress-line span {
    background: linear-gradient(90deg, #67c2eb, #6174ff);
}

.timer,
.instruction,
.long-text,
.case-text,
.scale-help,
.range-row,
.result-grid div {
    border-color: #cbe8f6;
    background: #f4f8ff;
}

.instruction {
    border-left: 0;
    color: #4f5685;
}

.scale-help p {
    margin: 0 0 12px;
}

.scale-help p:last-child {
    margin-bottom: 0;
}

.scale-legend {
    display: grid;
    gap: 6px;
    color: #4f5685;
    font-weight: 750;
}

.metrics-table-wrap,
.table-wrap {
    border-color: #e6edf5;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(28, 47, 80, 0.06);
}

.metrics-table th,
.data-table th {
    background: #f7fbff;
    color: #757baa;
    letter-spacing: 0;
    text-transform: none;
}

.metrics-table td,
.data-table td {
    border-bottom-color: #edf2f7;
}

.field input[type="text"],
.field input[type="password"],
.answer-option,
.consent-box,
.rating-row span,
.range-row output {
    border-color: #bfe3f3;
    border-radius: 16px;
}

.field input[type="text"],
.field input[type="password"] {
    background: #f4f7ff;
    color: #4f5685;
}

.answer-option,
.consent-box {
    background: #fff;
}

.answer-option:hover,
.consent-box:hover,
.answer-option:has(input:checked),
.consent-box:has(input:checked) {
    border-color: #6abfe8;
    background: #f0f8ff;
    box-shadow: 0 8px 20px rgba(103, 194, 235, 0.14);
}

.rating-row input:checked + span {
    border-color: #5ab4dc;
    background: #6abfe8;
    color: #fff;
}

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

.viewer-open {
    overflow: hidden;
}

.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    padding: 22px;
    background: rgba(8, 12, 30, 0.62);
    backdrop-filter: blur(12px);
}

.image-viewer.is-open {
    display: grid;
    place-items: center;
}

.image-viewer-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(1180px, 100%);
    height: min(860px, calc(100vh - 44px));
    border: 1px solid rgba(203, 232, 246, 0.88);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 80px rgba(8, 12, 30, 0.28);
    overflow: hidden;
}

.image-viewer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid #edf2f7;
}

.image-viewer-header h2 {
    margin: 0;
    color: #121126;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.15;
}

.viewer-icon-button {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border: 1px solid #dfe5f0;
    border-radius: 50%;
    background: #fff;
    color: #14152a;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(22, 33, 58, 0.08);
}

.image-viewer-stage {
    display: grid;
    place-items: center;
    min-height: 0;
    margin: 16px 22px;
    border: 1px solid #cbe8f6;
    border-radius: 18px;
    background: #f7fbff;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}

.image-viewer-stage.is-dragging {
    cursor: grabbing;
}

.image-viewer-stage img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 14px;
    background: #fff;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    transition: transform 100ms ease;
}

.image-viewer-stage.is-dragging img {
    transition: none;
}

.image-viewer-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 22px 20px;
}

.viewer-button {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #bfe3f3;
    border-radius: 999px;
    background: #f4f8ff;
    color: #4f5685;
    font-family: inherit;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.viewer-button:hover,
.viewer-icon-button:hover {
    border-color: #6abfe8;
    background: #f0f8ff;
}

.viewer-button-dark {
    border-color: #0e0d25;
    background: #0e0d25;
    color: #fff;
}

.viewer-button-dark:hover {
    background: #1b1a3b;
}

@media (max-width: 720px) {
    .image-viewer {
        padding: 10px;
    }

    .image-viewer-panel {
        height: calc(100vh - 20px);
        border-radius: 18px;
    }

    .image-viewer-header {
        padding: 16px;
    }

    .image-viewer-stage {
        margin: 10px 12px;
    }

    .image-viewer-actions {
        padding: 0 12px 14px;
    }

    .viewer-button {
        flex: 1 1 42%;
    }
}

.factor-item {
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid #cbe8f6;
    border-radius: 18px;
    background: #fbfdff;
}

.factor-item legend {
    float: left;
    width: 100%;
    margin-bottom: 12px;
    color: #14152a;
    font-weight: 850;
    line-height: 1.3;
}

.factor-item legend + * {
    clear: both;
}

.compact-rating {
    grid-template-columns: repeat(5, minmax(38px, 1fr));
    gap: 7px;
}

.compact-rating span {
    min-height: 42px;
    font-size: 15px;
}

.alert {
    border-radius: 16px;
}

.status {
    border-radius: 999px;
}

.login-card {
    border-radius: 28px;
}

.admin-shell {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
}

.admin-shell .page {
    width: 100%;
}

.admin-sidebar {
    position: sticky;
    top: 34px;
    align-self: start;
    display: grid;
    gap: 13px;
    justify-items: center;
    margin-top: 98px;
    padding: 18px 10px;
    border: 1px solid #eef5fb;
    border-radius: 0;
    background: linear-gradient(180deg, #f7fcff, #f1fbff);
    box-shadow: 0 8px 20px rgba(32, 76, 108, 0.08);
}

.sidebar-item {
    display: grid;
    gap: 4px;
    justify-items: center;
    width: 62px;
    color: #6f7597;
    font-size: 10px;
    font-weight: 700;
}

.sidebar-item:hover {
    text-decoration: none;
}

.sidebar-item span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #e8f5ff;
    color: #5ab4dc;
    font-size: 15px;
    font-weight: 900;
}

.sidebar-item.active span,
.sidebar-item:hover span {
    background: #6abfe8;
    color: #fff;
}

.sidebar-item small {
    line-height: 1.15;
    text-align: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    min-height: 116px;
    padding: 18px;
    border-radius: 18px;
    box-shadow: 0 9px 20px rgba(63, 111, 150, 0.12);
}

.stat-card span {
    display: block;
    margin-bottom: 20px;
    color: #4f5685;
    font-size: 13px;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    font-size: 30px;
    line-height: 1;
}

@media (max-width: 920px) {
    .admin-shell {
        display: block;
        width: min(100% - 22px, 1120px);
    }

    .admin-sidebar {
        position: static;
        display: flex;
        justify-content: space-between;
        margin-top: 18px;
        overflow-x: auto;
    }

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

@media (max-width: 720px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

.home-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: #fafafa;
}

.aurora-background {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
    color: #121126;
}

.aurora-layer {
    --white: #ffffff;
    --transparent: rgba(255, 255, 255, 0);
    --blue-500: #3b82f6;
    --indigo-300: #a5b4fc;
    --blue-300: #93c5fd;
    --violet-200: #ddd6fe;
    --blue-400: #60a5fa;
    position: absolute;
    inset: -10px;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.48;
    filter: blur(10px) invert(1);
    background-image:
        repeating-linear-gradient(100deg, var(--white) 0%, var(--white) 7%, var(--transparent) 10%, var(--transparent) 12%, var(--white) 16%),
        repeating-linear-gradient(100deg, var(--blue-500) 10%, var(--indigo-300) 15%, var(--blue-300) 20%, var(--violet-200) 25%, var(--blue-400) 30%);
    background-size: 300%, 200%;
    background-position: 50% 50%, 50% 50%;
    -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 10%, transparent 70%);
    mask-image: radial-gradient(ellipse at 100% 0%, #000 10%, transparent 70%);
    will-change: transform, background-position;
}

.aurora-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(100deg, var(--white) 0%, var(--white) 7%, var(--transparent) 10%, var(--transparent) 12%, var(--white) 16%),
        repeating-linear-gradient(100deg, var(--blue-500) 10%, var(--indigo-300) 15%, var(--blue-300) 20%, var(--violet-200) 25%, var(--blue-400) 30%);
    background-attachment: fixed;
    background-size: 200%, 100%;
    mix-blend-mode: difference;
    animation: aurora 46s linear infinite;
}

.home-content {
    position: relative;
    z-index: 1;
}

.home-page .page::before {
    display: none;
}

.home-page .hero,
.home-page .intro-card,
.home-page .admin-link {
    backdrop-filter: blur(3px);
}

.home-page .hero {
    justify-content: center;
    text-align: center;
}

.home-page .hero h1,
.home-page .hero p {
    margin-left: auto;
    margin-right: auto;
}

.home-page .hero .eyebrow {
    justify-content: center;
}

.start-button {
    position: relative;
    min-height: 62px;
    padding: 16px 34px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #63c7f0 0%, #7fa4ff 48%, #4f5de8 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow:
        0 16px 34px rgba(88, 148, 232, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.36);
    overflow: hidden;
}

.start-button::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.24) 45%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 420ms ease;
    pointer-events: none;
}

.start-button:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #53bfe9 0%, #7299ff 46%, #3f4bd6 100%);
    box-shadow:
        0 22px 44px rgba(88, 148, 232, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.start-button:hover::after {
    transform: translateX(120%);
}

.home-page .intro-card form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.access-modal-open {
    overflow: hidden;
}

.access-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 22px;
    background: rgba(8, 12, 30, 0.5);
    backdrop-filter: blur(14px);
}

.access-modal.is-open {
    display: grid;
}

.access-modal-panel {
    position: relative;
    width: min(520px, 100%);
    padding: 34px;
    border: 1px solid rgba(203, 232, 246, 0.95);
    border-radius: 28px;
    background:
        radial-gradient(circle at 85% 16%, rgba(255, 255, 255, 0.7) 0 34px, transparent 35px),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 255, 0.98));
    box-shadow: 0 28px 80px rgba(8, 12, 30, 0.28);
    pointer-events: auto;
}

.access-modal-panel h2 {
    margin: 0 0 10px;
    color: #121126;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.12;
}

.access-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #dfe5f0;
    border-radius: 50%;
    background: #fff;
    color: #14152a;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(22, 33, 58, 0.08);
}

.access-modal-close:hover {
    border-color: #6abfe8;
    background: #f0f8ff;
}

.access-code-field {
    margin: 22px 0 18px;
}

.access-code-field input {
    min-height: 56px;
    font-size: 22px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    -webkit-appearance: none;
    appearance: none;
    -webkit-user-select: text;
    user-select: text;
    touch-action: manipulation;
}

.access-submit {
    width: 100%;
}

@media (max-width: 720px) {
    .access-modal {
        padding: 14px;
    }

    .access-modal-panel {
        padding: 28px 20px 22px;
        border-radius: 22px;
    }

    .access-modal.is-inline {
        position: static;
        inset: auto;
        z-index: auto;
        display: block;
        width: 100%;
        padding: 18px 0 0;
        background: transparent;
        backdrop-filter: none;
        order: 2;
    }

    .access-modal.is-inline .access-modal-panel {
        width: 100%;
        padding: 24px 18px 20px;
        box-shadow: 0 18px 46px rgba(88, 148, 232, 0.18);
    }

    .access-modal.is-inline .access-modal-close {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}

@keyframes aurora {
    from {
        background-position: 50% 50%, 50% 50%;
    }

    to {
        background-position: 350% 50%, 250% 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aurora-layer::after {
        animation: none;
    }
}
