:root {
    color-scheme: light;
    --bg: #f4f7f6;
    --surface: #ffffff;
    --surface-soft: #edf5f2;
    --surface-warm: #f7f3eb;
    --text: #132421;
    --muted: #5c6b67;
    --line: #d7e1de;
    --accent: #15786f;
    --accent-dark: #0b4f4a;
    --accent-deep: #083e3b;
    --accent-light: #b9ddd6;
    --warm: #d39a55;
    --warn: #a16207;
    --bad: #b42318;
    --good: #047857;
    --shadow-sm: 0 8px 24px rgba(12, 53, 49, 0.07);
    --shadow-lg: 0 26px 70px rgba(8, 62, 59, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 86% 4%, rgba(21, 120, 111, 0.11), transparent 28rem),
        linear-gradient(180deg, #f8faf9 0, var(--bg) 32rem),
        var(--bg);
    color: var(--text);
    font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent-dark);
}

.topbar {
    background: rgba(8, 62, 59, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 8px 30px rgba(8, 45, 42, 0.16);
    padding: 14px 0;
}

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

.topbar__inner {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.topbar h1 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
}

.brand {
    align-items: center;
    color: #fff;
    display: inline-flex;
    gap: 11px;
    min-width: 0;
    text-decoration: none;
}

.brand__mark {
    align-items: center;
    background: linear-gradient(145deg, #f4c27f, var(--warm));
    border-radius: 11px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.55), 0 6px 18px rgba(0, 0, 0, 0.14);
    color: var(--accent-deep);
    display: inline-flex;
    font-size: 1rem;
    font-weight: 900;
    height: 39px;
    justify-content: center;
    width: 39px;
}

.brand__copy {
    display: grid;
    line-height: 1.12;
}

.brand__copy strong {
    font-size: 1.1rem;
    letter-spacing: 0.035em;
}

.brand__copy small {
    color: #c9e1dc;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.topbar p {
    margin: 4px 0 0;
    color: #d7eeea;
}

.topbar__nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topbar__nav a {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 9px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    padding: 9px 12px;
    text-decoration: none;
}

.topbar__nav .nav-user {
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    padding: 8px 10px;
}

.nav-form {
    margin: 0;
}

.nav-form button {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 0;
    padding: 8px 10px;
    width: auto;
}

.topbar__nav a:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.48);
}

.page {
    padding: 38px 0 72px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.grid--forms {
    align-items: start;
}

.panel,
.question {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.panel {
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.login-panel {
    margin: 8px auto 0;
    max-width: 560px;
}

.login-panel--fallback {
    margin-top: 16px;
}

.login-panel h2 {
    font-size: 1.2rem;
}

.login-panel p {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 0;
}

.nav-card {
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 122px;
    padding-right: 54px;
    position: relative;
    text-decoration: none;
}

.nav-card strong {
    color: var(--accent-dark);
    font-size: 1.05rem;
}

.nav-card::after {
    align-items: center;
    background: var(--surface-soft);
    border-radius: 999px;
    color: var(--accent-dark);
    content: "→";
    display: flex;
    font-size: 1.15rem;
    height: 34px;
    justify-content: center;
    position: absolute;
    right: 18px;
    top: 18px;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
    width: 34px;
}

.nav-card span,
.status-card p {
    color: var(--muted);
    margin: 0;
}

.nav-card:hover {
    border-color: var(--accent);
    background: var(--surface-soft);
    transform: translateY(-2px);
}

.nav-card:hover::after {
    background: var(--accent);
    color: #fff;
    transform: translateX(2px);
}

.badge {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent-dark);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0 0 10px;
    padding: 4px 9px;
}

.owner-only {
    border-color: #f0c36a;
}

.role-actions form {
    margin: 0;
}

.provider-actions {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.qr-login {
    max-width: 760px;
}

.qr-login__grid {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 220px;
    margin-top: 18px;
}

.qr-login__box {
    background: #f8fbfa;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    min-height: 220px;
    place-items: center;
}

.qr-login__box img {
    display: block;
    height: auto;
    max-width: 190px;
    width: 100%;
}

.provider-button {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    display: grid;
    gap: 14px;
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 66px;
    padding: 12px 14px;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.provider-button:hover {
    background: var(--surface-soft);
    border-color: var(--accent);
}

.provider-button:focus-visible {
    border-color: var(--accent);
    outline: 3px solid rgba(15, 118, 110, 0.18);
    outline-offset: 2px;
}

.provider-button:active {
    transform: translateY(1px);
}

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

.provider-copy strong {
    display: block;
    font-size: 1rem;
    line-height: 1.15;
}

.provider-button small {
    color: var(--muted);
    display: block;
    line-height: 1.25;
    margin-top: 3px;
}

.provider-icon {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.google-icon::before {
    color: #4285f4;
    content: "G";
    font-size: 1.35rem;
    font-weight: 800;
}

.microsoft-icon {
    display: grid;
    gap: 3px;
    grid-template-columns: repeat(2, 11px);
    grid-template-rows: repeat(2, 11px);
    padding: 5px;
}

.microsoft-icon i:nth-child(1) {
    background: #f25022;
}

.microsoft-icon i:nth-child(2) {
    background: #7fba00;
}

.microsoft-icon i:nth-child(3) {
    background: #00a4ef;
}

.microsoft-icon i:nth-child(4) {
    background: #ffb900;
}

.microsoft-icon i {
    display: block;
    height: 11px;
    width: 11px;
}

.panel h2,
.section h2 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    letter-spacing: 0;
}

.metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.metric:last-child {
    border-bottom: 0;
}

.metric strong {
    font-size: 1.35rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.button {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #0e655e);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 9px 22px rgba(15, 118, 110, 0.2);
    min-height: 46px;
    padding: 11px 18px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.button--small {
    min-height: 34px;
    padding: 6px 10px;
}

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

.button--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow: none;
    color: #fff;
}

.button--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.62);
}

.button--secondary:hover {
    background: #c9dad4;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.home-hero {
    background:
        radial-gradient(circle at 100% 0, rgba(244, 194, 127, 0.18), transparent 24rem),
        linear-gradient(138deg, var(--accent-deep), #0b5751);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    color: #fff;
    display: grid;
    gap: clamp(28px, 6vw, 72px);
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.72fr);
    overflow: hidden;
    padding: clamp(34px, 6vw, 68px);
    position: relative;
}

.home-hero::before {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
    height: 240px;
    left: -150px;
    position: absolute;
    top: -150px;
    width: 240px;
}

.home-hero__copy,
.home-hero__summary {
    position: relative;
    z-index: 1;
}

.home-hero .eyebrow {
    color: #a7d7cf;
}

.home-hero h2 {
    font-size: clamp(2.35rem, 5.2vw, 4.25rem);
    letter-spacing: -0.052em;
    line-height: 0.98;
    margin: 0;
    max-width: 760px;
}

.home-hero__lead {
    color: #d7e9e5;
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    line-height: 1.62;
    margin: 24px 0 0;
    max-width: 660px;
}

.home-hero__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 30px;
}

.home-hero__actions .button:not(.button--ghost) {
    background: #fff;
    box-shadow: 0 10px 25px rgba(1, 29, 27, 0.2);
    color: var(--accent-deep);
}

.home-hero__actions .button:not(.button--ghost):hover {
    background: var(--surface-warm);
}

.hero-action {
    display: contents;
}

.home-hero__summary {
    align-self: stretch;
    background: rgba(255, 253, 250, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 17px;
    box-shadow: 0 20px 48px rgba(1, 32, 29, 0.18);
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
    padding: clamp(24px, 3.3vw, 36px);
}

.home-hero__summary-label {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    margin: 0;
    text-transform: uppercase;
}

.home-hero__number {
    color: var(--accent-deep);
    font-size: clamp(4rem, 7vw, 5.75rem);
    letter-spacing: -0.07em;
    line-height: 0.9;
    margin: 18px 0 8px;
}

.home-hero__summary > span {
    color: var(--muted);
    line-height: 1.4;
}

.home-hero__facts {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 24px;
    padding-top: 20px;
}

.home-hero__facts div {
    display: grid;
    gap: 2px;
}

.home-hero__facts strong {
    color: var(--accent-deep);
    font-size: 1.25rem;
}

.home-hero__facts span {
    color: var(--muted);
    font-size: 0.82rem;
}

.home-section {
    margin: clamp(58px, 8vw, 92px) 0 0;
}

.home-section--compact {
    margin-top: clamp(48px, 7vw, 72px);
}

.section-heading {
    margin-bottom: 26px;
    max-width: 760px;
}

.section-heading h2 {
    color: var(--text);
    font-size: clamp(1.8rem, 3.5vw, 2.85rem);
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin: 0;
}

.section-heading > p:last-child {
    color: var(--muted);
    font-size: 1.02rem;
    margin: 14px 0 0;
    max-width: 680px;
}

.section-heading--row {
    align-items: end;
    display: flex;
    gap: 36px;
    justify-content: space-between;
    max-width: none;
}

.section-heading--row > p:last-child {
    margin: 0 0 4px;
    max-width: 350px;
}

.process-grid {
    counter-reset: process;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.process-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    min-height: 205px;
    padding: 25px;
}

.process-card > span {
    align-items: center;
    background: var(--surface-warm);
    border-radius: 999px;
    color: #9a6427;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    letter-spacing: 0.07em;
    width: 36px;
}

.process-card h3 {
    color: var(--accent-deep);
    font-size: 1.12rem;
    margin: 24px 0 7px;
}

.process-card p {
    color: var(--muted);
    margin: 0;
}

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

.module-grid .nav-card {
    background: rgba(255, 255, 255, 0.84);
    min-height: 138px;
    padding: 25px 68px 25px 25px;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.module-grid .nav-card strong {
    font-size: 1.2rem;
}

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

.theme-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: 13px;
    display: flex;
    gap: 14px;
    min-height: 112px;
    padding: 18px;
}

.theme-card__number {
    align-items: center;
    background: var(--surface-soft);
    border-radius: 10px;
    color: var(--accent);
    display: inline-flex;
    flex: 0 0 42px;
    font-size: 0.8rem;
    font-weight: 900;
    height: 42px;
    justify-content: center;
}

.theme-card div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.theme-card div > span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.theme-card strong {
    color: var(--accent-deep);
    font-size: 0.93rem;
    line-height: 1.3;
}

.notice {
    border-left: 4px solid var(--warn);
    background: #fff8e5;
    padding: 12px 14px;
    margin: 0 0 18px;
}

.flash {
    border-radius: 6px;
    font-weight: 700;
    margin: 0 0 14px;
    padding: 12px 14px;
}

.flash--success {
    background: #e8f7ef;
    border: 1px solid #b8e2ca;
    color: var(--good);
}

.flash--error {
    background: #fff1f0;
    border: 1px solid #f0b8b3;
    color: var(--bad);
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-stack label {
    color: var(--muted);
    display: flex;
    flex-direction: column;
    font-weight: 700;
    gap: 5px;
}

input,
select {
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    font: inherit;
    min-height: 42px;
    padding: 8px 10px;
    width: 100%;
}

input:focus,
select:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(15, 118, 110, 0.16);
}

.inline-form {
    margin: 0;
}

[hidden] {
    display: none !important;
}

.package-picker,
.scope-picker {
    border: 0;
    display: grid;
    gap: 10px;
    margin: 4px 0;
    padding: 0;
}

.package-picker legend,
.scope-picker legend {
    font-weight: 800;
    margin-bottom: 4px;
}

.package-choice,
.scope-choice {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    padding: 13px 14px;
}

.package-choice:has(input:checked),
.scope-choice:has(input:checked) {
    background: var(--surface-soft);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(21, 120, 111, 0.1);
}

.package-choice input,
.scope-choice input {
    accent-color: var(--accent);
    flex: 0 0 20px;
    height: 20px;
    margin: 2px 0 0;
    min-height: 20px;
    padding: 0;
    width: 20px;
}

.package-choice span,
.scope-choice span {
    display: grid;
    gap: 2px;
}

.package-choice small,
.scope-choice small {
    color: var(--muted);
    line-height: 1.4;
}

.package-summary {
    align-items: flex-start;
    background: linear-gradient(135deg, var(--accent-deep), var(--accent));
    border-radius: 10px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
}

.package-summary span {
    color: #d8efeb;
    font-size: 0.9rem;
}

.module-start {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-top: 20px;
    padding: 18px;
}

.action-stack {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.test-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f8fbfa;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.test-header__inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.timer {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--accent-dark);
    font-weight: 700;
    min-width: 112px;
    padding: 8px 10px;
    text-align: center;
}

.section {
    margin: 24px 0;
}

.section__meta {
    color: var(--muted);
    margin: -6px 0 12px;
}

.question {
    margin: 12px 0;
    padding: 16px;
}

.question legend {
    display: block;
    float: left;
    width: 100%;
    margin: 0 0 12px;
    font-weight: 700;
}

.question legend + * {
    clear: both;
}

.question__number {
    color: var(--accent-dark);
}

.option {
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: flex;
    gap: 12px;
    margin: 8px 0;
    min-height: 58px;
    padding: 12px;
}

.option input[type="radio"] {
    accent-color: var(--accent);
    flex: 0 0 24px;
    height: 24px;
    margin: 1px 0 0;
    min-height: 24px;
    padding: 0;
    width: 24px;
}

.option span {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.option:hover {
    background: var(--surface-soft);
}

.test-form {
    max-width: 860px;
    user-select: none;
}

.test-progress {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    font-size: 0.9rem;
    font-weight: 800;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 11px 14px;
}

#save-status {
    color: var(--accent-dark);
}

.test-section {
    margin: 0;
}

.test-section > h2,
.test-section > .section__meta {
    margin-left: 2px;
}

.question {
    box-shadow: var(--shadow-sm);
    min-height: 420px;
    outline: none;
    padding: 24px;
}

.question:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(21, 120, 111, 0.14), var(--shadow-sm);
}

.question__fieldset {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.case-card {
    background: linear-gradient(135deg, #edf5f2, #f8faf9);
    border: 1px solid #cfe0dc;
    border-left: 4px solid var(--warm);
    border-radius: 9px;
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
    padding: 14px 16px;
}

.case-card__label {
    color: var(--accent-dark);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.case-card p {
    color: var(--muted);
    margin: 4px 0 0;
}

.option {
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.option:has(input:checked) {
    background: var(--surface-soft);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(21, 120, 111, 0.1);
}

.test-navigation {
    align-items: center;
    background: rgba(244, 247, 246, 0.96);
    bottom: 0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
    padding: 12px 0 4px;
    position: static;
    z-index: 4;
}

.test-navigation .button:first-child {
    margin-right: auto;
}

.score-block {
    border-top: 1px solid var(--line);
    margin-top: 20px;
    padding-top: 18px;
}

.score-block:first-of-type {
    border-top: 0;
    margin-top: 12px;
    padding-top: 0;
}

.score-block h3 {
    font-size: 1rem;
    margin: 0 0 12px;
}

.score-chart {
    display: grid;
    gap: 14px;
}

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

.score-row__head {
    align-items: baseline;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.score-row__head strong,
.score-row__head span {
    min-width: 0;
}

.score-row__head strong {
    overflow-wrap: anywhere;
}

.score-row__head span {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 0.9rem;
    font-weight: 700;
}

.score-bars {
    display: grid;
    gap: 5px;
}

.score-bar {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(82px, 128px) minmax(0, 1fr);
}

.score-bar__label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.score-bar__track {
    background: #e6eeeb;
    border: 1px solid var(--line);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.score-bar__fill {
    background: var(--accent);
    display: block;
    height: 100%;
    width: var(--value);
}

.score-bar--norm .score-bar__fill {
    background: #7b8791;
}

.score-bar--empty .score-bar__track {
    background: #f0f3f2;
}

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

.table-wrap {
    overflow-x: auto;
}

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

.result-table th {
    color: var(--muted);
    font-size: 0.9rem;
}

.empty,
.muted {
    color: var(--muted);
}

.score-good {
    color: var(--good);
    font-weight: 700;
}

.score-low {
    color: var(--bad);
    font-weight: 700;
}

.footer-note {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 22px;
}

@media (max-width: 720px) {
    .topbar__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar__nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .topbar__nav a,
    .topbar__nav .nav-user,
    .nav-form button {
        justify-content: center;
        min-height: 44px;
        text-align: center;
        width: 100%;
    }

    .nav-form {
        width: 100%;
    }

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

    .home-hero {
        border-radius: 17px;
        gap: 30px;
        grid-template-columns: 1fr;
        padding: 28px 22px 22px;
    }

    .home-hero h2 {
        font-size: clamp(2.2rem, 12vw, 3.25rem);
    }

    .home-hero__lead {
        margin-top: 18px;
    }

    .home-hero__actions,
    .home-hero__actions .button,
    .home-hero__actions .hero-action {
        width: 100%;
    }

    .home-hero__summary {
        min-height: 0;
        padding: 24px;
    }

    .home-hero__number {
        font-size: 4.4rem;
    }

    .home-section {
        margin-top: 58px;
    }

    .section-heading--row {
        align-items: start;
        flex-direction: column;
        gap: 8px;
    }

    .section-heading--row > p:last-child {
        margin-top: 4px;
    }

    .process-grid,
    .module-grid,
    .theme-grid {
        grid-template-columns: 1fr;
    }

    .process-card {
        min-height: 0;
    }

    .theme-card {
        min-height: 96px;
    }

    .panel {
        padding: 18px;
    }

    .provider-button {
        min-height: 64px;
    }

    .qr-login__grid {
        grid-template-columns: 1fr;
    }

    .qr-login__box {
        min-height: 0;
        padding: 16px;
    }

    .test-header__inner {
        align-items: stretch;
        flex-direction: column;
    }

    .timer {
        text-align: left;
    }

    .question {
        min-height: 0;
        padding: 16px;
    }

    .test-progress {
        position: static;
    }

    .test-navigation .button {
        min-width: 0;
        padding-inline: 14px;
    }

    .score-row__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .score-bar {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (min-width: 721px) and (max-width: 980px) {
    .home-hero {
        gap: 28px;
        grid-template-columns: minmax(0, 1.2fr) minmax(235px, 0.8fr);
        padding: 40px;
    }

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

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

@media print {
    .topbar,
    .test-header,
    .page {
        display: none !important;
    }

    body::before {
        content: "Utskrift er deaktivert i testvisningen.";
        display: block;
        padding: 32px;
        font: 18px Arial, Helvetica, sans-serif;
    }
}
