@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #6b7280;
    --soft-muted: #9ca3af;
    --line: #e7eaf0;
    --surface: #ffffff;
    --page: #f7f8fb;
    --accent: #f36f56;
    --accent-dark: #df5c43;
    --accent-soft: #fff0eb;
    --green: #20a66a;
    --yellow: #e7b422;
    --orange: #f28a36;
    --red: #e34e55;
    --shadow: 0 18px 55px rgba(27, 39, 64, 0.07);
}
* {
    box-sizing: border-box;
}
html {
    min-height: 100%;
    background: var(--page);
}
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family:
        "DM Sans",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background:
        radial-gradient(
            ellipse at 12% 0%,
            rgba(243, 111, 86, 0.065),
            transparent 34rem
        ),
        var(--page);
}
button,
input {
    font: inherit;
}
button {
    cursor: pointer;
}
button:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(243, 111, 86, 0.28);
    outline-offset: 3px;
}
[hidden] {
    display: none !important;
}
.app-shell {
    width: min(100% - 40px, 720px);
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.topbar {
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(224, 228, 235, 0.75);
}
.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
    font:
        800 20px/1 "Manrope",
        sans-serif;
    letter-spacing: -0.8px;
}
.brand-mark {
    width: 34px;
    height: 34px;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
}
.module-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid #f0d9d2;
    background: rgba(255, 255, 255, 0.72);
    color: #b85b48;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.1px;
}
.module-dot,
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}
.screen {
    flex: 1;
    width: 100%;
    padding: 55px 0 38px;
    animation: screen-in 0.32s ease both;
}
.start-screen {
    max-width: 550px;
    margin: 0 auto;
}
.eyebrow {
    color: #858b99;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.65px;
}
.sparkle {
    color: var(--accent);
    font-size: 15px;
    vertical-align: -1px;
    margin-right: 5px;
}
h1 {
    margin: 15px 0 13px;
    font:
        800 clamp(37px, 7vw, 54px)/1.08 "Manrope",
        sans-serif;
    letter-spacing: -2.4px;
}
.text-accent {
    color: var(--accent);
}
.intro {
    max-width: 490px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}
.intro strong {
    color: var(--ink);
    font-weight: 700;
}
.preview-card,
.challenge-card,
.result-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.preview-card {
    margin-top: 30px;
    padding: 24px 25px 20px;
}
.preview-label,
.task-topline,
.footer-label,
.result-label {
    color: #a0a5b0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.45px;
}
.sentence {
    margin: 24px 0;
    font:
        700 clamp(22px, 4vw, 29px)/1.45 "Manrope",
        sans-serif;
    letter-spacing: -0.8px;
}
.target-word {
    color: #c85d49;
    background: #fff0eb;
    border-radius: 5px;
    padding: 1px 5px 3px;
    text-decoration: underline;
    text-decoration-color: #f3a08e;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.example-answer {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #f0f1f4;
    padding-top: 17px;
    color: #697181;
    font-size: 14px;
}
.example-arrow {
    color: var(--accent);
    font-size: 18px;
}
.example-answer strong {
    color: var(--green);
}
.example-check {
    margin-left: auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8f8ef;
    color: var(--green);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
}
.start-meta {
    display: flex;
    gap: 35px;
    padding: 24px 2px 25px;
}
.start-meta > div {
    display: flex;
    align-items: center;
    gap: 11px;
}
.meta-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--accent);
    font-size: 19px;
}
.start-meta strong,
.start-meta small {
    display: block;
}
.start-meta strong {
    font-size: 12px;
    font-weight: 700;
}
.start-meta small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}
.button {
    min-height: 49px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: white;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 7px 16px rgba(243, 111, 86, 0.2);
    transition:
        transform 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}
.button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 9px 19px rgba(243, 111, 86, 0.25);
}
.button:active {
    transform: translateY(0);
}
.button-large {
    min-height: 54px;
}
.fine-print {
    color: #a0a5b0;
    text-align: center;
    font-size: 11px;
    margin: 15px 0 0;
}
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 0 25px;
    border-top: 1px solid rgba(224, 228, 235, 0.75);
    color: #a0a5b0;
    font-size: 10px;
}
.site-footer span:first-child {
    font-weight: 700;
    letter-spacing: 1.2px;
}
.game-screen {
    padding-top: 33px;
    max-width: 590px;
    margin: 0 auto;
}
.game-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.round-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9298a5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.3px;
}
.live-dot {
    background: var(--green);
    box-shadow: 0 0 0 4px #e4f7ec;
}
.timer {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--green);
    font:
        800 20px/1 "Manrope",
        sans-serif;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}
.hourglass {
    font-size: 17px;
}
.time-track {
    height: 6px;
    margin-top: 17px;
    overflow: hidden;
    background: #e9edf2;
    border-radius: 99px;
}
.time-bar {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
    transition:
        width 0.2s linear,
        background 0.25s ease;
}
.game-heading {
    margin: 41px 0 24px;
}
.game-heading h1 {
    font-size: clamp(32px, 6vw, 43px);
    margin-top: 11px;
}
.game-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}
.eyebrow-divider {
    margin: 0 5px;
    color: #d0d3da;
}
.challenge-card {
    padding: 24px;
}
.task-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
#task-counter {
    color: #b4b8c1;
    font-variant-numeric: tabular-nums;
}
.challenge-card .sentence {
    margin: 27px 0 25px;
    font-size: clamp(23px, 4.5vw, 31px);
}
#answer-input {
    width: 100%;
    height: 54px;
    padding: 0 15px;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    color: var(--ink);
    background: #fbfcfe;
    font-size: 15px;
    transition:
        border 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}
#answer-input::placeholder {
    color: #b1b6c0;
}
#answer-input:focus {
    outline: none;
    border-color: #f3a08e;
    box-shadow: 0 0 0 4px rgba(243, 111, 86, 0.1);
    background: white;
}
#answer-input:disabled {
    opacity: 0.8;
}
.feedback {
    min-height: 20px;
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.feedback.success {
    color: var(--green);
    font-weight: 700;
}
.feedback.error {
    color: #c76a42;
}
.challenge-card .button {
    min-height: 50px;
}
.keyboard-hint {
    margin: 13px 0 0;
    color: #a4a9b3;
    font-size: 10px;
    text-align: center;
}
kbd {
    display: inline-block;
    margin-left: 3px;
    padding: 3px 5px;
    border: 1px solid #e3e6ec;
    border-radius: 4px;
    background: #f8f9fb;
    color: #7d8492;
    font:
        600 9px "DM Sans",
        sans-serif;
}
.game-footer {
    display: flex;
    justify-content: center;
    gap: 70px;
    margin-top: 25px;
    padding: 18px 0;
}
.game-footer > div {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
}
.game-footer strong {
    font:
        800 22px/1 "Manrope",
        sans-serif;
    letter-spacing: -0.5px;
}
.game-footer strong small {
    color: #9298a5;
    font:
        600 11px "DM Sans",
        sans-serif;
}
.result-screen {
    max-width: 470px;
    margin: 0 auto;
    text-align: center;
    padding-top: 58px;
}
.result-brand {
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border-radius: 19px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.1);
    animation: pop-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1.2) both;
}
.result-brand img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.result-screen h1 {
    font-size: clamp(35px, 7vw, 46px);
    margin-top: 13px;
}
.result-screen .intro {
    margin: 0 auto;
    font-size: 14px;
}
.result-card {
    margin: 30px 0 23px;
    padding: 24px;
    text-align: left;
}
.result-label {
    display: block;
    text-align: center;
}
.result-score {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 7px;
    margin: 9px 0 18px;
    font:
        800 58px/1.1 "Manrope",
        sans-serif;
    letter-spacing: -3px;
    color: var(--ink);
}
.result-score small {
    font:
        700 14px "DM Sans",
        sans-serif;
    color: #9298a5;
    letter-spacing: 0;
}
.result-divider {
    height: 1px;
    background: #edf0f4;
    margin-bottom: 6px;
}
.result-stat {
    display: flex;
    justify-content: space-between;
    padding-top: 13px;
    color: var(--muted);
    font-size: 13px;
}
.result-stat strong {
    color: var(--ink);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.result-screen .fine-print {
    margin-top: 15px;
}
.is-correct {
    animation: correct-flash 0.35s ease;
}
.is-incorrect {
    animation: shake 0.28s ease;
}
@keyframes screen-in {
    from {
        opacity: 0;
        transform: translateY(7px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pop-in {
    from {
        opacity: 0;
        transform: scale(0.75) rotate(-8deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}
@keyframes correct-flash {
    0% {
        box-shadow: var(--shadow);
    }
    40% {
        box-shadow:
            0 0 0 4px rgba(32, 166, 106, 0.14),
            var(--shadow);
    }
    100% {
        box-shadow: var(--shadow);
    }
}
@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    30% {
        transform: translateX(-4px);
    }
    70% {
        transform: translateX(4px);
    }
}
@media (max-width: 540px) {
    .app-shell {
        width: min(100% - 30px, 720px);
    }
    .topbar {
        height: 70px;
    }
    .screen {
        padding-top: 38px;
    }
    .game-screen {
        padding-top: 25px;
    }
    .preview-card {
        padding: 20px;
        margin-top: 24px;
    }
    .start-meta {
        gap: 22px;
    }
    .challenge-card {
        padding: 19px;
    }
    .game-heading {
        margin-top: 33px;
    }
    .game-footer {
        gap: 48px;
    }
    .result-screen {
        padding-top: 42px;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.review-section {
    margin: 30px 0 24px;
    text-align: left;
}
.review-section h2 {
    margin: 0 0 7px;
    font:
        800 21px/1.2 "Manrope",
        sans-serif;
    letter-spacing: -0.5px;
}
.review-intro {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}
.answer-review {
    display: grid;
    gap: 10px;
}
.review-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}
.review-number {
    color: #a0a5b0;
    font:
        700 11px "Manrope",
        sans-serif;
    padding-top: 2px;
}
.review-sentence {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.55;
    font-weight: 600;
}
.review-yours,
.review-alternatives {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.review-yours {
    font-weight: 700;
}
.review-correct .review-yours {
    color: var(--green);
}
.review-incorrect .review-yours {
    color: #c76a42;
}
.review-alternatives {
    color: var(--muted);
}
.review-empty {
    color: var(--muted);
    font-size: 13px;
}
