:root {
    color-scheme: light;
    --bg: #f7f5ef;
    --ink: #20231f;
    --muted: #646b5e;
    --card: #ffffff;
    --line: #ded8ca;
    --green: #2f7d57;
    --blue: #2f6f9f;
    --coral: #d65f4b;
    --yellow: #f3c04d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
}

a { color: inherit; font-weight: 700; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(247, 245, 239, .94);
    border-bottom: 1px solid var(--line);
}

.brand { text-decoration: none; font-size: 18px; }
.nav { display: flex; gap: 10px; align-items: center; overflow-x: auto; font-size: 14px; }
.nav a { text-decoration: none; white-space: nowrap; }
.link-button { background: none; color: var(--ink); padding: 0; border: 0; font-weight: 700; }

.shell { width: min(980px, 100%); margin: 0 auto; padding: 20px 16px 48px; }
.page-head, .hero-card, .panel, .card { border: 1px solid var(--line); background: var(--card); border-radius: 8px; }
.page-head, .hero-card { padding: 24px; margin-bottom: 16px; }
.page-head h1, .hero-card h1 { margin: 6px 0 8px; font-size: 34px; line-height: 1.05; }
.page-head p, .hero-card p, .card p { color: var(--muted); }

.hero-card { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.stack { display: grid; gap: 12px; }
.panel { padding: 16px; margin-bottom: 18px; }

label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: #fffdfa;
}
textarea { min-height: 96px; }
.code-input { font-size: 28px; letter-spacing: 6px; text-align: center; }

button, .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: white;
    padding: 12px 18px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
}
.wide { width: 100%; margin-top: 12px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.list { display: grid; gap: 12px; }
.card { padding: 16px; }
.card h2 { margin: 0 0 8px; font-size: 20px; }
.card b { display: block; font-size: 32px; }
.accent:nth-child(2n) { border-top: 5px solid var(--blue); }
.accent:nth-child(2n+1) { border-top: 5px solid var(--coral); }
.pill { display: inline-flex; width: fit-content; border-radius: 999px; background: #f8e3a0; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.quick-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.quick-actions a, .row-actions a { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; text-decoration: none; }
.notice { padding: 12px; border-radius: 8px; margin-bottom: 12px; background: #e7f4ed; border: 1px solid #b7dbc8; }
.notice.error { background: #fde9e5; border-color: #e7b2a8; }
.check { display: flex; grid-template-columns: auto 1fr; flex-direction: row; align-items: center; gap: 8px; }
.check input { width: auto; min-height: auto; }
.small-form { margin-top: 12px; }
.option-grid { display: grid; gap: 10px; }
.progress { height: 12px; border-radius: 999px; background: #e8e0d1; overflow: hidden; margin: 14px 0; }
.progress span { display: block; height: 100%; background: var(--green); }
iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.answer { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.answer input { width: auto; min-height: auto; }
.content { line-height: 1.55; }
.keypoints { background: #f9f1cf; padding: 12px; border-radius: 8px; }

@media (min-width: 760px) {
    .shell { padding-top: 32px; }
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hero-card { min-height: 520px; }
    .page-head h1, .hero-card h1 { font-size: 48px; }
}
