:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --white: #fff;
  --ink: #1b2925;
  --muted: #777e77;
  --line: #e6e5de;
  --green: #285b49;
  --green-dark: #204a3b;
  --green-light: #e5eee8;
  --lime: #c7df91;
  --orange: #e8a169;
  --serif: Georgia, "Times New Roman", serif;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.app-shell { width: min(1160px, calc(100% - 64px)); margin: 0 auto; }
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8e7e0; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 800 22px "Manrope", sans-serif; letter-spacing: -1.4px; }
.brand-mark { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--green); color: white; font: 700 21px var(--serif); transform: rotate(-5deg); }
.brand-period { color: var(--orange); }
.topbar-nav { display: flex; align-items: center; gap: 34px; margin-left: 66px; }
.nav-link { color: #747a73; font-size: 13px; font-weight: 600; transition: color .2s; }
.nav-link:hover, .nav-link.active { color: var(--ink); }
.button { border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 7px; font-weight: 600; transition: background .2s, transform .2s; }
.button:active { transform: translateY(1px); }
.button-dark { padding: 11px 17px; background: var(--ink); color: white; font-size: 12px; }
.button-dark:hover { background: var(--green); }
.button-dark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.hero { min-height: 326px; position: relative; display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-copy { position: relative; z-index: 1; padding: 45px 0 48px; }
.eyebrow, .small-label { display: block; color: #758076; font-size: 9px; letter-spacing: 1.7px; font-weight: 700; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow-dot, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #7ca16d; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin: 18px 0 15px; font: 500 clamp(38px, 5vw, 57px)/1.1 "Manrope", sans-serif; letter-spacing: -3.7px; }
.hero h1 span, .how-title h2 span { color: var(--green); font-family: var(--serif); font-style: italic; font-weight: 400; }
.hero-copy > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.hero-art { position: absolute; width: 390px; height: 294px; right: 32px; top: 16px; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid #e2e2d7; border-radius: 50%; transform: rotate(-28deg); }
.orbit-one { width: 338px; height: 212px; }
.orbit-two { width: 290px; height: 254px; transform: rotate(32deg); }
.art-card { position: relative; width: 201px; height: 228px; transform: rotate(5deg); border-radius: 6px; background: #d9e3c4; display: flex; align-items: center; flex-direction: column; justify-content: space-between; padding: 23px 12px 20px; box-shadow: 0 18px 32px #3d50301c; }
.art-card-top, .art-card-bottom { color: #647451; font-size: 7px; letter-spacing: 1.4px; font-weight: 700; }
.art-question { flex: 1; display: grid; place-items: center; font: 400 126px/.8 var(--serif); color: var(--green); }
.sparkle, .art-leaf { position: absolute; z-index: 2; }
.sparkle-one { right: 23px; top: 43px; color: #d89562; font-size: 22px; }
.sparkle-two { left: 33px; bottom: 42px; color: #acb97d; font-size: 17px; }
.art-leaf { top: 35px; left: 62px; color: var(--green); font-size: 19px; }

.quiz-layout { display: grid; grid-template-columns: 262px minmax(0, 1fr); gap: 68px; padding: 48px 0 91px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.section-heading .small-label { font-size: 8px; letter-spacing: 1.35px; }
.section-heading h2 { margin: 8px 0 0; font: 700 20px "Manrope", sans-serif; letter-spacing: -.8px; }
.topic-count { color: #899087; font-size: 10px; }
.category-list { display: grid; gap: 8px; }
.category-button { width: 100%; min-height: 48px; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 0 12px; display: flex; align-items: center; text-align: left; gap: 11px; color: #606a62; font-size: 12px; transition: background .2s, border-color .2s, color .2s; }
.category-button:hover { background: #eeeee7; }
.category-button.active { background: white; border-color: #e9e9e2; color: var(--ink); box-shadow: 0 4px 13px #252d2010; }
.category-button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.category-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 6px; color: var(--green); background: var(--green-light); font: 17px var(--serif); }
.category-name { flex: 1; }
.category-amount { color: #9ba097; font-size: 10px; }
.category-note { margin-top: 26px; padding: 15px 14px; display: flex; gap: 11px; align-items: flex-start; border-radius: 6px; background: #eceee5; }
.note-icon { color: #88975b; font-size: 16px; line-height: 1; }
.category-note p { margin: 0; color: #747b69; font: italic 12px/1.65 var(--serif); }

.question-area { min-width: 0; }
.question-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 17px; }
.question-context { display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 1.2px; color: #647266; font-size: 9px; font-weight: 700; }
.status-dot { width: 6px; height: 6px; }
.shuffle-button { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 7px; padding: 5px; color: #627165; font-size: 10px; font-weight: 600; }
.shuffle-button:hover { color: var(--green); }
.shuffle-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.question-card { position: relative; min-height: 376px; padding: 26px 31px 24px; border: 1px solid #e8e8e0; border-radius: 7px; background: white; box-shadow: 0 8px 24px #35403208; display: flex; flex-direction: column; }
.question-card-top { display: flex; justify-content: space-between; align-items: center; }
.question-number { color: #9a9f96; font-size: 8px; letter-spacing: 1.5px; font-weight: 700; }
.question-decoration { color: #a5b27e; font-size: 17px; }
.question-card h2 { margin: 24px 0 22px; max-width: 620px; font: 500 clamp(22px, 2.5vw, 29px)/1.35 "Manrope", sans-serif; letter-spacing: -1.15px; }
.answer-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 15px; }
.answer-option { min-height: 39px; display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid #e9e9e4; border-radius: 5px; color: #667068; font-size: 11px; line-height: 1.4; }
.option-letter { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; background: #f1f2ed; border-radius: 4px; color: #7c837a; font-size: 9px; font-weight: 700; }
.answer-option.correct { border-color: #a8c3a9; background: #f2f7f0; color: var(--green-dark); }
.answer-option.correct .option-letter { background: var(--green); color: white; }
.answer-reveal { border-left: 2px solid #92ae80; background: #f4f7f0; margin: 1px 0 17px; padding: 10px 13px; }
.answer-label { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 8px; font-weight: 700; letter-spacing: 1.4px; }
.answer-check { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: #dfead8; font-size: 9px; }
.answer-reveal p { margin: 7px 0 0 21px; color: #43594a; font: 15px/1.5 var(--serif); }
.question-actions { margin-top: auto; display: flex; align-items: center; gap: 14px; padding-top: 10px; }
.button-primary { min-height: 40px; padding: 0 16px; background: var(--green); color: white; font-size: 11px; }
.button-primary:hover { background: var(--green-dark); }
.question-actions .button-primary span { font-size: 14px; }
.answer-hint { color: #9a9e97; font: italic 11px var(--serif); }
.below-card { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px; color: #8a9088; font-size: 10px; }
.tiny-spark { color: #b0a56d; margin-right: 4px; }
.below-card button { padding: 4px 0; border: 0; background: none; color: var(--green); font-size: 10px; font-weight: 600; }
.below-card button span { margin-left: 6px; font-size: 14px; }

.footer { min-height: 74px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #969b93; font-size: 10px; }
.footer-brand { color: var(--ink); font-size: 17px; }
.footer-brand .brand-mark { width: 24px; height: 24px; font-size: 17px; border-radius: 8px 8px 8px 3px; }
.footer-year { letter-spacing: 1.3px; font-size: 8px; font-weight: 700; }

.admin-page { min-height: 100vh; padding: 34px 40px 48px; background: #fbfbf8; }
.admin-page-content { width: min(100%, 1120px); margin: 0 auto; }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.admin-header .small-label { font-size: 8px; }
.admin-header h2 { margin: 7px 0 0; font: 700 30px "Manrope", sans-serif; letter-spacing: -1px; }
.admin-return { min-height: 38px; padding: 0 13px; font-size: 11px; }
.admin-tabs { display: flex; gap: 23px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.admin-tab { position: relative; padding: 15px 1px 13px; border: 0; background: none; color: #8a9088; font-size: 11px; font-weight: 600; }
.admin-tab.active { color: var(--green); }
.admin-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--green); content: ""; }
.admin-section-heading { margin-bottom: 20px; }
.admin-section-heading h3, .admin-list-heading h3 { margin: 0 0 5px; font: 700 14px "Manrope", sans-serif; }
.admin-section-heading p { margin: 0; color: #899088; font-size: 10px; }
.admin-management-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 42px; align-items: start; }
.admin-section form { display: grid; gap: 8px; }
.admin-collection { min-width: 0; }
.field-label { display: block; margin: 4px 0 0; color: #4b564d; font-size: 10px; font-weight: 700; }
.field-help { margin-left: 4px; color: #9a9f96; font-weight: 400; }
.admin-section textarea, .admin-section select, .admin-section input[type="text"] { width: 100%; min-height: 38px; padding: 9px 10px; border: 1px solid #e2e4dc; border-radius: 5px; outline: none; background: white; color: var(--ink); font-size: 11px; }
.admin-section textarea { resize: vertical; line-height: 1.5; }
.admin-section textarea:focus, .admin-section select:focus, .admin-section input[type="text"]:focus { border-color: #8fae92; box-shadow: 0 0 0 3px #dfead84c; }
.admin-section textarea::placeholder, .admin-section input::placeholder { color: #a7aca4; }
.choice-fields { display: grid; gap: 7px; }
.choice-field { display: flex; align-items: center; gap: 9px; }
.choice-field input[type="radio"] { accent-color: var(--green); margin: 0 0 0 3px; }
.choice-field input[type="text"] { min-height: 34px; }
.form-actions { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.form-actions .button, .inline-form .button { min-height: 37px; font-size: 10px; }
.button-quiet { padding: 0 13px; background: #eeefe9; color: #687068; }
.button-quiet:hover { background: #e4e7dd; }
.form-message { min-height: 0; margin: 0; color: #a95345; font-size: 10px; }
.form-message:empty { display: none; }
.admin-list-heading { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.admin-list-heading h3 { margin: 0; font-size: 12px; }
.admin-list-heading > span { min-width: 18px; padding: 3px 5px; border-radius: 10px; background: #edf0e8; color: #747c6e; text-align: center; font-size: 8px; }
.admin-question-list, .admin-category-list { display: grid; gap: 7px; }
.empty-message { margin: 0; padding: 12px 10px; border: 1px dashed #dedfd7; border-radius: 5px; color: #91978e; font-size: 10px; line-height: 1.5; }
.admin-question-item, .admin-category-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.admin-question-info, .admin-category-name { min-width: 0; flex: 1; }
.admin-question-info strong, .admin-category-name strong { display: block; overflow: hidden; color: #48534a; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.admin-question-info span { display: block; margin-top: 4px; color: #9a9f96; font-size: 9px; }
.item-action { flex: 0 0 auto; padding: 5px 6px; border: 0; background: none; color: #778177; font-size: 9px; }
.item-action:hover { color: var(--green); }
.item-action.delete:hover { color: #b34d40; }
.inline-form { display: flex; gap: 7px; }
.inline-form input { flex: 1; min-width: 0; }
.inline-form .button { flex: 0 0 auto; padding: 0 14px; }
.admin-category-item { padding: 12px 10px; }
.admin-category-name span { display: block; margin-top: 4px; color: #9a9f96; font-size: 9px; }
.admin-footnote { display: flex; align-items: center; gap: 7px; margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); color: #999f95; font: italic 11px var(--serif); }
.admin-footnote span { color: #9eaa75; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: calc(100% - 44px); padding: 12px 17px; border-radius: 5px; background: var(--ink); color: white; box-shadow: 0 6px 20px #1c2c2340; font-size: 11px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 850px) {
  .app-shell { width: min(100% - 44px, 700px); }
  .hero-art { right: -57px; opacity: .78; transform: scale(.83); transform-origin: right center; }
  .hero-copy { max-width: 64%; }
  .quiz-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 30px; }
  .question-card { padding: 23px 22px 21px; }
}
@media (max-width: 620px) {
  .app-shell { width: calc(100% - 36px); }
  .topbar { height: 68px; }
  .brand { font-size: 20px; }
  .brand-mark { width: 27px; height: 27px; }
  .topbar-nav { display: none; }
  .button-dark { padding: 10px 12px; }
  .hero { min-height: 320px; align-items: flex-start; }
  .hero-copy { max-width: 100%; padding: 40px 0 34px; }
  .hero h1 { font-size: clamp(38px, 10vw, 48px); letter-spacing: -2.7px; }
  .hero-copy > p { max-width: 265px; font-size: 12px; }
  .desktop-break { display: none; }
  .hero-art { width: 190px; height: 145px; right: 0; top: auto; bottom: -1px; opacity: .25; transform: scale(.67); transform-origin: right bottom; }
  .quiz-layout { display: flex; flex-direction: column; gap: 30px; padding: 32px 0 59px; }
  .section-heading { margin-bottom: 14px; }
  .section-heading h2 { font-size: 18px; }
  .category-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 250px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 2px 1px; scrollbar-color: #bdc7b5 transparent; scrollbar-width: thin; }
  .category-button { width: 100%; min-width: 0; min-height: 44px; gap: 7px; padding: 0 9px; border-color: #e5e6df; background: #fafaf7; font-size: 11px; }
  .category-icon { width: 23px; height: 23px; flex: 0 0 23px; font-size: 15px; }
  .category-name { overflow-wrap: anywhere; }
  .category-amount { display: none; }
  .category-note { display: none; }
  .question-toolbar { margin: 0 0 13px; }
  .question-card { min-height: 345px; padding: 21px 19px 18px; }
  .question-card h2 { margin: 22px 0 19px; font-size: 23px; }
  .answer-options { grid-template-columns: 1fr; gap: 7px; }
  .answer-option { min-height: 36px; }
  .question-actions { align-items: flex-start; flex-direction: column; gap: 9px; }
  .below-card { font-size: 9px; }
  .footer { min-height: 68px; }
  .footer > span:nth-child(2) { display: none; }
  .admin-page { padding: 24px 22px 36px; }
  .admin-management-grid { gap: 26px; }
}
@media (max-width: 720px) {
  .admin-management-grid { grid-template-columns: 1fr; gap: 28px; }
  .admin-list-heading { margin-top: 0; }
}
@media (max-width: 420px) {
  .admin-page { padding: 20px 18px 30px; }
  .admin-header h2 { font-size: 25px; }
  .admin-return { padding: 0 9px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
