:root {
    --bg: #fffdf9;
    --surface: #ffffff;
    --surface-2: #fff4df;
    --text: #211f1f;
    --muted: #68615c;
    --border: #eaded3;
    --accent: #e84624;
    --accent-dark: #b92e15;
    --gold: #f6b939;
    --teal: #11806a;
    --danger: #b42318;
    --shadow: 0 18px 50px rgba(33, 31, 31, .12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    letter-spacing: 0;
}

a {
    color: inherit;
}

.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: var(--accent);
    border-radius: var(--radius);
    font-size: 12px;
}

.site-nav,
.site-footer nav,
.hero-actions,
.inline-actions,
.action-panel,
.form-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.site-nav a,
.site-footer a,
.form-links a {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.nav-form {
    margin: 0;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(232, 70, 36, .2);
}

.button.secondary {
    background: #211f1f;
    box-shadow: none;
}

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

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

.button.full {
    width: 100%;
}

.link-button {
    border: 0;
    padding: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: 52px;
    max-width: 1180px;
    min-height: 620px;
    margin: 0 auto;
    padding: 76px 22px 44px;
    align-items: center;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: .94;
    letter-spacing: 0;
}

.hero p,
.page-hero p,
.section-heading p,
.readable p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
}

.hero-copy p {
    max-width: 600px;
}

.mock-card,
.roast-card,
.form-card,
.template-card,
.category-card,
.stat-card,
.policy-panel,
.empty-state {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.mock-card,
.roast-card {
    position: relative;
    padding: 28px;
    overflow: hidden;
}

.roast-card {
    transform-origin: center;
    animation: roast-reveal 520ms cubic-bezier(.2, .8, .2, 1) both;
}

.roast-card.is-reacting {
    animation: reaction-pop 520ms cubic-bezier(.2, .8, .2, 1) both;
}

.roast-card.cake_explosion { animation: roast-reveal 480ms ease-out both, confetti-burst 760ms 180ms ease-out both; }
.roast-card.life_scan { animation: roast-reveal 480ms ease-out both, scan-pulse 1.4s 400ms ease-in-out both; }
.roast-card.gas_station_sushi { animation: roast-reveal 480ms ease-out both, card-wobble 620ms 260ms ease-in-out both; }
.roast-card.heart_trash { animation: roast-reveal 480ms ease-out both, quote-drift 900ms 240ms ease-out both; }
.roast-card.friendly_stamp { animation: stamp-in 620ms cubic-bezier(.2, .9, .25, 1.2) both; }
.roast-card.inspirational_quote { animation: roast-reveal 480ms ease-out both, quote-drift 900ms 240ms ease-out both; }
.roast-card.loser_notice { animation: stamp-in 620ms cubic-bezier(.2, .9, .25, 1.2) both; }
.roast-card.scoreboard_shame { animation: roast-reveal 480ms ease-out both, score-flash 900ms 260ms ease-out both; }
.roast-card.retirement_press_conference { animation: roast-reveal 480ms ease-out both, camera-flash 800ms 280ms ease-out both; }
.roast-card.favorite_child_scan { animation: roast-reveal 480ms ease-out both, scan-pulse 1.4s 400ms ease-in-out both; }
.roast-card.backup_certificate { animation: stamp-in 620ms cubic-bezier(.2, .9, .25, 1.2) both; }
.roast-card.factory_defect { animation: roast-reveal 480ms ease-out both, card-wobble 620ms 260ms ease-in-out both; }
.roast-card.corporate_memo { animation: paper-slide 620ms cubic-bezier(.2, .8, .2, 1) both; }
.roast-card.concern_meter { animation: roast-reveal 480ms ease-out both, scan-pulse 1.4s 400ms ease-in-out both; }
.roast-card.hr_approved_roast { animation: stamp-in 620ms cubic-bezier(.2, .9, .25, 1.2) both; }
.roast-card.clown_alert { animation: roast-reveal 480ms ease-out both, alert-pulse 900ms 260ms ease-in-out both; }
.roast-card.brain_cell_ooo { animation: roast-reveal 480ms ease-out both, quote-drift 900ms 240ms ease-out both; }
.roast-card.menace_certificate { animation: stamp-in 620ms cubic-bezier(.2, .9, .25, 1.2) both; }

@keyframes roast-reveal {
    from { opacity: 0; transform: translateY(22px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes reaction-pop {
    0%, 100% { transform: scale(1) rotate(0); }
    32% { transform: scale(1.035) rotate(-.7deg); }
    68% { transform: scale(.995) rotate(.4deg); }
}

@keyframes confetti-burst {
    0%, 100% { box-shadow: var(--shadow); }
    45% { box-shadow: 18px -12px 0 -8px var(--gold), -18px -6px 0 -8px var(--teal), var(--shadow); }
}

@keyframes scan-pulse {
    0%, 100% { filter: saturate(1); }
    50% { filter: saturate(1.35) contrast(1.04); }
}

@keyframes card-wobble {
    0%, 100% { transform: rotate(0); }
    35% { transform: rotate(-.8deg); }
    70% { transform: rotate(.6deg); }
}

@keyframes quote-drift {
    from { letter-spacing: 0; }
    50% { letter-spacing: .02em; }
    to { letter-spacing: 0; }
}

@keyframes stamp-in {
    from { opacity: 0; transform: scale(1.12) rotate(-1.5deg); }
    70% { opacity: 1; transform: scale(.985) rotate(.4deg); }
    to { transform: scale(1) rotate(0); }
}

@keyframes score-flash {
    0%, 100% { border-color: var(--border); }
    50% { border-color: var(--danger); }
}

@keyframes camera-flash {
    0%, 35%, 100% { filter: brightness(1); }
    45% { filter: brightness(1.22); }
}

@keyframes paper-slide {
    from { opacity: 0; transform: translateX(-28px) rotate(-.5deg); }
    to { opacity: 1; transform: translateX(0) rotate(0); }
}

@keyframes alert-pulse {
    0%, 100% { border-color: var(--border); }
    50% { border-color: var(--accent); box-shadow: 0 18px 50px rgba(232, 70, 36, .22); }
}

.mock-card::before,
.roast-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 8px;
    background: linear-gradient(90deg, var(--accent), var(--gold), var(--teal));
}

.mock-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.mock-card h2,
.roast-card h1,
.roast-card h2,
.template-card h2,
.template-card h3 {
    margin: 28px 0 14px;
    font-size: 34px;
    line-height: 1.05;
}

.mock-card p,
.roast-card p,
.template-card p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0;
}

.mode {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 900;
}

.mode.active {
    color: #fff;
    background: var(--teal);
    border-color: var(--teal);
}

.short-link {
    padding: 14px;
    border-radius: var(--radius);
    background: #211f1f;
    color: #fff;
    font-weight: 900;
}

.section,
.page-hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 54px 22px;
}

.page-hero.compact {
    padding-top: 54px;
    padding-bottom: 28px;
}

.page-hero.compact h1 {
    font-size: clamp(38px, 5vw, 64px);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

.section-heading h2,
.readable h2 {
    margin: 0;
    font-size: 34px;
}

.section-heading.left {
    align-items: start;
}

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

.category-card,
.template-card,
.stat-card {
    padding: 20px;
    text-decoration: none;
}

.category-card span,
.stat-card strong {
    display: block;
    font-size: 28px;
    font-weight: 950;
}

.category-card small,
.stat-card span {
    color: var(--muted);
    line-height: 1.5;
}

.split,
.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
    gap: 28px;
}

.steps {
    display: grid;
    gap: 12px;
}

.steps div {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--surface-2);
}

.steps strong {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: var(--accent);
    border-radius: var(--radius);
}

.auth-shell,
.centered {
    display: grid;
    place-items: center;
    gap: 22px;
    max-width: 960px;
    margin: 0 auto;
    padding: 54px 22px;
}

.form-card {
    width: min(100%, 520px);
    padding: 26px;
}

.form-card.wide {
    width: 100%;
}

.compact-form {
    box-shadow: none;
}

label {
    display: grid;
    gap: 7px;
    margin: 14px 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

textarea {
    resize: vertical;
}

.hp {
    position: absolute;
    left: -9999px;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 700;
}

.check-row input {
    width: auto;
    min-height: 0;
    margin-top: 5px;
}

.form-foot,
.usage-note {
    color: var(--muted);
    font-size: 14px;
}

.roast-card.large {
    width: min(100%, 760px);
    min-height: 420px;
}

.roast-card.large h1 {
    font-size: clamp(38px, 7vw, 72px);
}

.policy-panel,
.empty-state {
    padding: 24px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: #211f1f;
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
}

.action-cell {
    min-width: 160px;
}

.action-cell form,
.action-panel form {
    display: inline;
}

.flash-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
}

.flash {
    margin: 10px 0;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: #e8f7f3;
    color: #064d40;
    font-weight: 800;
}

.flash.error {
    background: #fff0ed;
    color: var(--danger);
}

.flash.warning {
    background: #fff5d6;
    color: #735000;
}

.flash ul {
    margin: 8px 0 0;
}

.notice.warning {
    padding: 18px;
    border-radius: var(--radius);
    background: #fff5d6;
    color: #735000;
    font-weight: 800;
}

.site-footer {
    margin-top: 50px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

@media (max-width: 820px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero,
    .split,
    .two-col {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .category-grid,
    .template-grid,
    .stat-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

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

.interactive-options {
    border: 1px solid var(--line);
    border-radius: 6px;
    margin: 1.25rem 0;
    padding: 1rem;
}

.interactive-options legend {
    font-weight: 800;
    padding: 0 .4rem;
}

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

.field-optional {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 500;
}

.checkbox-row {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: .65rem;
}

.checkbox-row input {
    height: 1.1rem;
    margin: 0;
    width: 1.1rem;
}

.interactive-card {
    background: #fff;
    border: 3px solid #20242c;
    border-radius: 8px;
    box-shadow: 8px 8px 0 #20242c;
    color: #20242c;
    isolation: isolate;
    margin: 0 auto 1.5rem;
    max-width: 720px;
    min-height: 610px;
    overflow: hidden;
    position: relative;
    text-align: center;
    width: min(100%, 720px);
}

.interactive-card__topline {
    background: #20242c;
    color: #fff;
    display: flex;
    font-size: .9rem;
    font-weight: 700;
    justify-content: space-between;
    min-height: 44px;
    padding: .75rem 1rem;
}

.graduation-scene {
    background: #ffd447;
    border-bottom: 3px solid #20242c;
    height: 175px;
    overflow: hidden;
    position: relative;
}

.graduation-cap {
    background: #20242c;
    height: 54px;
    left: 50%;
    position: absolute;
    top: 38px;
    transform: translateX(-50%) rotate(-4deg) skewY(-8deg);
    width: 150px;
}

.graduation-cap::after {
    background: #eb4d4b;
    content: '';
    height: 48px;
    position: absolute;
    right: 4px;
    top: 40px;
    width: 4px;
}

.graduation-cap i {
    background: #20242c;
    border-radius: 50%;
    bottom: -31px;
    height: 51px;
    left: 25px;
    position: absolute;
    transform: skewY(8deg);
    width: 100px;
}

.diploma {
    background: #fff;
    border: 3px solid #20242c;
    bottom: -17px;
    height: 62px;
    position: absolute;
    right: 13%;
    transform: rotate(12deg);
    width: 150px;
}

.diploma i {
    background: #20bf6b;
    height: 68px;
    left: 64px;
    position: absolute;
    top: -6px;
    width: 18px;
}

.interactive-card__content {
    padding: 2rem clamp(1.1rem, 5vw, 3.5rem) 2.5rem;
}

.interactive-card__eyebrow {
    color: #b22523;
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.interactive-card h1 {
    font-size: clamp(1.8rem, 7cqi, 2.8rem);
    letter-spacing: 0;
    line-height: 1.05;
    margin: .5rem 0 1rem;
    overflow-wrap: anywhere;
}

.interactive-card__message,
.interactive-card__final > p {
    font-size: 1.12rem;
    line-height: 1.55;
    margin: 0 auto 1.5rem;
    max-width: 560px;
    min-height: 3.5rem;
}

.interactive-card__controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    min-height: 64px;
}

.suspicious-button {
    background: #eb4d4b;
    border: 3px solid #20242c;
    border-radius: 50%;
    box-shadow: 0 8px 0 #8d201e;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: .86rem;
    font-weight: 900;
    height: 118px;
    line-height: 1.1;
    padding: .8rem;
    text-transform: uppercase;
    transition: transform .16s ease, box-shadow .16s ease;
    width: 118px;
}

.suspicious-button:hover {
    transform: translateY(2px);
}

.suspicious-button:active {
    box-shadow: 0 2px 0 #8d201e;
    transform: translateY(7px);
}

.suspicious-button:focus-visible,
.sound-toggle:focus-visible {
    outline: 4px solid #2d98da;
    outline-offset: 4px;
}

.sound-toggle {
    background: #fff;
    border: 2px solid #20242c;
    border-radius: 4px;
    color: #20242c;
    cursor: pointer;
    font: inherit;
    font-size: .82rem;
    font-weight: 800;
    min-height: 42px;
    padding: .55rem .7rem;
}

.sound-toggle[aria-pressed="true"] {
    background: #20bf6b;
}

.sincere-reveal {
    border-top: 2px dashed #20242c;
    margin: 1.5rem auto;
    max-width: 560px;
    padding-top: 1.25rem;
}

.sincere-reveal :is(h2, h3, h4, h5, h6) {
    font-size: 1.15rem;
    margin: 0 0 .5rem;
}

.confetti-layer {
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    z-index: 3;
}

.confetti-layer i {
    animation: card-confetti var(--fall) ease-in var(--delay) forwards;
    background: var(--color);
    height: 16px;
    left: var(--x);
    opacity: 0;
    position: absolute;
    top: -20px;
    width: 9px;
}

.confetti-layer--still::after {
    color: #b22523;
    content: 'Congratulations!';
    font-size: 1rem;
    font-weight: 900;
    left: 50%;
    position: absolute;
    top: 155px;
    transform: translateX(-50%);
}

@keyframes card-confetti {
    0% { opacity: 1; transform: translateY(0) rotate(0); }
    100% { opacity: 1; transform: translateY(650px) rotate(640deg); }
}

.sr-only {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media (max-width: 520px) {
    .interactive-card {
        box-shadow: 4px 4px 0 #20242c;
        min-height: 580px;
    }

    .interactive-card__topline {
        align-items: flex-start;
        flex-direction: column;
        gap: .25rem;
    }

    .graduation-scene {
        height: 145px;
    }

    .diploma {
        right: 4%;
    }
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--text);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid #1473e6;
    outline-offset: 3px;
}

.admin-filters {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.admin-filters label {
    flex: 1 1 220px;
    margin: 0;
}

.admin-filters .button {
    flex: 0 0 auto;
}

.results-summary {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 22px;
}

.pagination span {
    color: var(--muted);
    font-weight: 800;
}

.legal-copy section + section {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.legal-copy li + li {
    margin-top: 10px;
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
