:root {
    color-scheme: light;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: #2f3028;
    background: #f7efe0;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 1.25rem;
    background:
        radial-gradient(ellipse at 12% 12%, #fff8c9 0, transparent 32rem),
        radial-gradient(ellipse at 90% 86%, #d9edd2 0, transparent 30rem),
        #f7efe0;
}

button,
a {
    font: inherit;
}

.page {
    width: min(100%, 740px);
    margin: 0 auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0.25rem 0 2rem;
}

.home-link {
    color: #344a32;
    font-weight: 800;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.badge {
    border: 1px solid #c9d6b7;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: #fffdf6;
    color: #526b45;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.intro {
    text-align: center;
}

.intro-icon {
    display: block;
    font-size: clamp(3rem, 12vw, 5rem);
    line-height: 1;
    filter: drop-shadow(0 5px 0 #e5d8c3);
}

h1 {
    margin: 0.75rem 0 0.5rem;
    color: #344a32;
    font-size: clamp(2rem, 7vw, 3.4rem);
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.intro p {
    max-width: 34rem;
    margin: 0 auto 1.5rem;
    color: #686b5d;
    font-size: 1.08rem;
    line-height: 1.6;
}

.desk {
    border: 2px solid #e9ddc8;
    border-radius: 1.5rem;
    padding: clamp(1.15rem, 5vw, 2rem);
    background: rgba(255, 253, 246, 0.94);
    box-shadow: 0 18px 45px rgba(62, 59, 41, 0.12);
}

.status-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    color: #68705a;
    font-size: 0.9rem;
    font-weight: 800;
}

.mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    margin: -0.2rem 0 1rem;
    color: #46543b;
    font-weight: 800;
    cursor: pointer;
}

.mode-toggle input {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    accent-color: #70904f;
    cursor: pointer;
}

.mode-hint {
    margin: -0.65rem 0 1rem;
    color: #727366;
    font-size: 0.85rem;
}

progress {
    display: block;
    width: 100%;
    height: 0.8rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #e9e3d4;
    accent-color: #70904f;
}

progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e9e3d4;
}

progress::-webkit-progress-value {
    border-radius: 999px;
    background: #70904f;
    transition: width 250ms ease;
}

progress::-moz-progress-bar {
    border-radius: 999px;
    background: #70904f;
}

.case-file {
    min-height: 245px;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 1.25rem;
    border: 2px dashed #d8c9ad;
    border-radius: 1.1rem;
    background: #fffaf0;
    text-align: center;
}

.case-emoji {
    margin-bottom: 0.4rem;
    font-size: clamp(4rem, 16vw, 6rem);
    line-height: 1;
}

.case-file h2 {
    margin: 0.5rem 0;
    color: #344a32;
    font-size: clamp(1.4rem, 5vw, 2rem);
}

.case-file p {
    max-width: 32rem;
    margin: 0;
    color: #727366;
    line-height: 1.55;
}

.verdicts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-top: 1rem;
}

.verdict,
.restart {
    min-height: 3.5rem;
    border: 0;
    border-radius: 0.9rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    font-weight: 900;
    transition: transform 150ms ease, filter 150ms ease;
}

.verdict:hover,
.restart:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.verdict:focus-visible,
.restart:focus-visible,
.home-link:focus-visible {
    outline: 3px solid #314d2d;
    outline-offset: 3px;
}

.verdict:disabled {
    cursor: wait;
    opacity: 0.65;
}

.approve {
    background: #d8edc7;
    color: #2d5128;
}

.reject {
    background: #f2ddd0;
    color: #7a3e2d;
}

.feedback {
    min-height: 3.25rem;
    margin: 1rem 0 0;
    color: #4e6241;
    font-weight: 800;
    line-height: 1.5;
    text-align: center;
}

.end-card {
    padding: 1.25rem 0.5rem;
    text-align: center;
}

.end-card[hidden] {
    display: none;
}

.end-card .case-emoji {
    font-size: 4rem;
}

.end-card h2 {
    margin: 0.5rem 0;
    color: #344a32;
    font-size: 2rem;
}

.end-card p {
    color: #686b5d;
    line-height: 1.6;
}

.missed-review {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid #d8c9ad;
    border-radius: 1rem;
    background: #fffaf0;
    text-align: left;
}

.missed-review h3 {
    margin: 0 0 0.75rem;
    color: #344a32;
}

.missed-review ol {
    margin: 0;
    padding-left: 1.5rem;
}

.missed-review li {
    margin: 0.65rem 0;
    color: #686b5d;
    line-height: 1.5;
}

.restart {
    background: #344a32;
    color: #fffdf6;
}

.fine-print {
    margin: 1.25rem 0 0;
    color: #818171;
    font-size: 0.82rem;
    text-align: center;
}

@media (max-width: 460px) {
    body {
        padding: 0.85rem;
    }

    .topbar {
        margin-bottom: 1.35rem;
    }

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

    .case-file {
        min-height: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}