:root {
  color-scheme: light;
  --ink: #17343a;
  --ink-soft: #456066;
  --muted: #76898c;
  --line: #dce5e2;
  --paper: #fbfcf8;
  --white: #ffffff;
  --ice: #e9f3f2;
  --teal: #277e78;
  --teal-dark: #17645f;
  --sun: #edbd61;
  --coral: #d77c68;
  --side: #17343a;
  --side-muted: #9cb3b0;
  --display: "Newsreader", Georgia, serif;
  --body: "DM Sans", "Segoe UI", sans-serif;
  --shadow: 0 16px 40px rgba(28, 58, 60, .08);
  font-family: var(--body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--paper); }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #e3ad4d; outline-offset: 3px; }
a { color: inherit; }
.skip-link { position: fixed; z-index: 20; top: 8px; left: 8px; transform: translateY(-150%); padding: 10px 14px; color: white; background: var(--ink); border-radius: 4px; }
.skip-link:focus { transform: none; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 238px; padding: 27px 17px 15px; color: #f4f7f3; background: var(--side); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 37px; color: inherit; text-decoration: none; }
.brand-mark { display: inline-flex; align-items: end; justify-content: center; gap: 3px; width: 34px; height: 34px; padding: 8px; border: 1px solid rgba(231, 243, 239, .48); border-radius: 50%; }
.brand-mark span { display: block; width: 3px; border-radius: 3px; background: var(--sun); }
.brand-mark span:nth-child(1) { height: 9px; }
.brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 12px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 13px; font-weight: 600; letter-spacing: .2px; }
.brand-copy small { color: #a4b8b4; font-size: 11px; }
.side-label { padding: 0 11px 10px; color: var(--side-muted); font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.side-label-spaced { margin-top: 31px; }
.primary-nav { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 11px; color: #c0cfcb; background: transparent; border: 0; border-radius: 5px; cursor: pointer; text-align: left; font-size: 12px; transition: background .18s ease, color .18s ease; }
.nav-link:hover { color: white; background: rgba(255, 255, 255, .08); }
.nav-link.is-active { color: white; background: rgba(255, 255, 255, .12); }
.nav-icon { display: inline-grid; place-items: center; width: 18px; color: #c7d6d0; font-size: 17px; }
.nav-count { display: grid; place-items: center; width: 20px; height: 20px; margin-left: auto; color: #f8e6bd; background: rgba(237, 189, 97, .15); border-radius: 50%; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.daily-note { position: relative; overflow: hidden; margin: 0 3px 19px; padding: 15px 14px 16px; background: rgba(255, 255, 255, .065); border: 1px solid rgba(255, 255, 255, .1); border-radius: 5px; }
.note-kicker { color: #a9c1bc; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.daily-note p { max-width: 145px; margin: 9px 0 0; color: #eff4ef; font-family: var(--display); font-size: 17px; line-height: 1.15; }
.note-line { position: absolute; right: 15px; bottom: 0; width: 1px; height: 34px; background: var(--sun); transform: rotate(35deg); transform-origin: bottom; }
.main-panel { min-height: 100vh; margin-left: 238px; }
.topbar { position: sticky; z-index: 4; top: 0; display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 0 clamp(22px, 4vw, 58px); background: rgba(251, 252, 248, .93); border-bottom: 1px solid #e8edeb; backdrop-filter: blur(12px); }
.crumbs { display: flex; align-items: center; gap: 11px; color: #8a9b9c; font-size: 9px; font-weight: 700; letter-spacing: .75px; }
.crumbs strong { color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.crumb-dot { color: #bfcdca; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink-soft); background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 15px; }
.icon-button:hover { color: var(--teal-dark); background: var(--ice); }
.mobile-brand { display: none; }
.view-container { width: min(100%, 1310px); min-height: calc(100vh - 114px); margin: 0 auto; padding: 33px clamp(22px, 4vw, 58px) 42px; }
.site-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px clamp(22px, 4vw, 58px) 20px; color: #88999a; border-top: 1px solid #e8edeb; font-size: 9px; }
.site-footer a { color: #557174; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--teal-dark); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
.eyebrow::before { width: 18px; height: 1px; background: var(--sun); content: ""; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); }
h1, .display-heading { margin-bottom: 0; font-family: var(--display); font-size: clamp(34px, 4vw, 49px); font-weight: 500; line-height: .98; letter-spacing: 0; }
h2 { margin-bottom: 0; font-family: var(--display); font-size: 28px; font-weight: 500; line-height: 1.05; }
h3 { margin-bottom: 0; font-size: 13px; font-weight: 600; }
.subtle { color: var(--muted); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-heading p { max-width: 520px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.game-level-control { width: min(100%, 190px); margin-top: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-dark); border: 0; background: none; cursor: pointer; font-size: 11px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 0 15px; color: var(--ink); background: white; border: 1px solid #cbd9d5; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: 600; text-decoration: none; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:hover { background: #f3f8f5; border-color: #91b4ae; transform: translateY(-1px); }
.button-primary { color: white; background: var(--teal-dark); border-color: var(--teal-dark); }
.button-primary:hover { color: white; background: #0f5753; }
.button-dark { color: white; background: var(--ink); border-color: var(--ink); }
.button-dark:hover { color: white; background: #24545a; }
.button-small { min-height: 33px; padding: 0 11px; font-size: 10px; }
.button[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.hero { position: relative; display: grid; grid-template-columns: minmax(250px, 1fr) minmax(230px, 40%); overflow: hidden; min-height: 265px; margin-bottom: 31px; background: #e9f1eb; border: 1px solid #dbe6df; border-radius: 6px; }
.hero::before { position: absolute; top: -155px; left: 50%; width: 370px; height: 370px; border: 1px solid rgba(39, 126, 120, .12); border-radius: 50%; content: ""; }
.hero-copy { position: relative; z-index: 1; align-self: center; padding: 33px 40px; }
.hero-copy h1 { max-width: 470px; margin-top: 14px; font-size: clamp(37px, 4.2vw, 54px); }
.hero-copy h1 em { color: var(--teal-dark); font-weight: 500; }
.hero-copy p { max-width: 415px; margin: 14px 0 20px; color: #617a7b; font-size: 12px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-art { position: relative; display: flex; align-items: end; justify-content: center; min-height: 240px; padding: 20px 22px 0; }
.hero-art::before { position: absolute; right: 12%; bottom: 0; width: 76%; height: 74%; background: #d2e3dc; border-radius: 48% 48% 0 0; content: ""; }
.portrait-stack { position: relative; display: flex; align-items: end; justify-content: center; width: 100%; height: 100%; }
.portrait-stack img { position: relative; width: 29%; max-width: 124px; height: 178px; object-fit: cover; object-position: center top; background: #d9dfd9; border: 4px solid #f4f6ed; border-bottom: 0; border-radius: 60px 60px 0 0; box-shadow: 0 8px 24px rgba(23, 52, 58, .1); }
.portrait-stack img + img { margin-left: -13px; }
.portrait-stack img:nth-child(2) { z-index: 1; height: 212px; }
.portrait-stack img:nth-child(3) { z-index: 2; height: 194px; }
.portrait-stack img:nth-child(4) { z-index: 1; height: 212px; }
.portrait-stack img:nth-child(5) { height: 178px; }
.home-section { margin-top: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.section-title { font-family: var(--display); font-size: 22px; font-weight: 500; }
.level-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.level-card { position: relative; display: grid; min-height: 119px; padding: 13px 13px 12px; text-align: left; background: white; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.level-card:hover { border-color: #8eb9b0; box-shadow: 0 8px 20px rgba(28, 58, 60, .07); transform: translateY(-2px); }
.level-card.is-unlocked { background: #f4f8f5; border-color: #c8dcd4; }
.level-top { display: flex; align-items: center; justify-content: space-between; }
.level-number { color: var(--teal); font-family: var(--display); font-size: 23px; }
.level-state { display: grid; place-items: center; width: 20px; height: 20px; color: #7a938f; background: #eef3ef; border-radius: 50%; font-size: 10px; }
.level-card strong { align-self: end; font-size: 10px; font-weight: 600; }
.level-card small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.level-card.is-locked { color: #819090; background: #fafbf8; }
.level-card.is-locked .level-number { color: #9badaa; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.game-card { position: relative; min-height: 135px; padding: 16px 16px 14px; background: white; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; text-align: left; transition: border-color .18s ease, transform .18s ease; }
.game-card:hover { border-color: #9cbdb5; transform: translateY(-2px); }
.game-index { display: inline-grid; place-items: center; width: 24px; height: 24px; color: #145a55; background: #e4f1ed; border-radius: 50%; font-size: 9px; font-weight: 700; }
.game-card:nth-child(3n + 2) .game-index { color: #9b572d; background: #fbefdb; }
.game-card:nth-child(3n) .game-index { color: #a4544a; background: #f7e8e1; }
.game-card h3 { margin-top: 15px; }
.game-card p { max-width: 230px; margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.game-arrow { position: absolute; top: 18px; right: 17px; color: #8aa19c; font-size: 16px; }
.info-strip { display: flex; align-items: center; gap: 12px; margin-top: 19px; padding: 13px 15px; color: #536c6e; background: #f1f4ee; border-left: 2px solid var(--sun); font-size: 10px; line-height: 1.5; }
.info-strip strong { color: var(--ink); }
.about-notices { max-width: 820px; border-top: 1px solid var(--line); }
.about-notice { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.about-number { color: var(--teal); font-family: var(--display); font-size: 22px; }
.about-notice h2 { font-size: 23px; }
.about-notice p { margin: 9px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.about-notice a { display: inline-block; margin-top: 10px; color: var(--teal-dark); font-size: 10px; font-weight: 600; text-decoration: none; }
.about-notice a:hover { text-decoration: underline; }
.about-disclaimer { max-width: 820px; margin-top: 20px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; }
.search-field { display: flex; align-items: center; flex: 1 1 220px; gap: 8px; max-width: 370px; min-height: 38px; padding: 0 11px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.search-field span { color: #8da09e; font-size: 14px; }
.search-field input { width: 100%; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 11px; }
.search-field input::placeholder { color: #9aa8a6; }
.select-control, .field-input { min-height: 38px; padding: 0 11px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; }
.segmented { display: inline-flex; gap: 3px; padding: 3px; background: #edf2ef; border-radius: 5px; }
.segmented button { min-height: 29px; padding: 0 10px; color: #617876; background: transparent; border: 0; border-radius: 3px; cursor: pointer; font-size: 10px; }
.segmented button.is-active { color: var(--ink); background: white; box-shadow: 0 1px 3px rgba(22, 50, 50, .1); }
.leader-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.leader-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; transition: border-color .18s ease, transform .18s ease; }
.leader-card:hover { border-color: #a2bfb8; transform: translateY(-2px); }
.leader-photo { position: relative; overflow: hidden; height: 185px; background: linear-gradient(145deg, #e9f1ee, #dbe5df); }
.leader-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 14%; }
.leader-photo .photo-fallback { display: grid; place-items: center; height: 100%; color: #456a69; font-family: var(--display); font-size: 43px; }
.leader-role { position: absolute; bottom: 9px; left: 9px; padding: 5px 7px; color: #365d59; background: rgba(250, 252, 247, .91); border-radius: 2px; font-size: 8px; font-weight: 600; }
.leader-copy { padding: 12px 12px 13px; }
.leader-copy h3 { font-size: 12px; }
.leader-copy p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.study-flashcard { display: grid; grid-template-columns: minmax(220px, .78fr) minmax(280px, 1fr); overflow: hidden; min-height: 405px; background: white; border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); }
.flash-photo { position: relative; min-height: 330px; background: #e8efeb; }
.flash-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.flash-copy { display: flex; flex-direction: column; justify-content: center; padding: 35px clamp(24px, 4vw, 48px); }
.flash-copy h2 { margin-top: 12px; font-size: clamp(29px, 3vw, 38px); }
.flash-copy .current-position { margin: 9px 0 18px; color: var(--teal-dark); font-size: 11px; font-weight: 600; }
.flash-copy .bio { margin: 0; color: #607577; font-size: 12px; line-height: 1.75; }
.fact-line { margin-top: 16px; padding-top: 15px; color: #4d6668; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.6; }
.fact-line strong { color: var(--ink); }
.flash-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 23px; }
.flash-controls .arrow-group { display: flex; gap: 7px; }
.flash-counter { color: var(--muted); font-size: 10px; }
.study-modes { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 17px 0 12px; }
.inline-actions { display: flex; gap: 8px; }
.game-panel { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 5px; }
.game-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.game-panel-head strong { font-size: 11px; }
.game-stats { display: flex; gap: 17px; color: var(--muted); font-size: 9px; }
.game-stats strong { margin-left: 4px; color: var(--ink); font-size: 11px; }
.game-body { padding: 18px; }
.game-instruction { margin: 0 0 14px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.match-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; }
.match-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.match-photo { position: relative; overflow: hidden; min-height: 110px; padding: 0; background: #e9f0ed; border: 2px solid transparent; border-radius: 4px; cursor: pointer; }
.match-photo img { display: block; width: 100%; height: 110px; object-fit: cover; object-position: center 12%; }
.portrait-stack img.portrait-uchtdorf, .leader-photo img.portrait-uchtdorf, .flash-photo img.portrait-uchtdorf, .match-photo img.portrait-uchtdorf, .question-photo img.portrait-uchtdorf { object-position: center 30%; }
.match-photo.is-selected { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(39, 126, 120, .12); }
.match-photo.is-matched { opacity: .42; filter: grayscale(.7); cursor: default; }
.match-photo.is-wrong { border-color: var(--coral); animation: shake .25s linear 1; }
.match-photo-label { position: absolute; right: 5px; bottom: 5px; left: 5px; overflow: hidden; padding: 4px 5px; color: var(--ink); background: rgba(255,255,255,.91); border-radius: 2px; font-size: 8px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.name-bank { display: grid; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.name-tile { min-height: 38px; padding: 7px 9px; color: #476266; background: #f7f9f6; border: 1px solid #e1e9e5; border-radius: 4px; cursor: pointer; font-size: 10px; text-align: left; transition: background .15s ease, border-color .15s ease; }
.name-tile:hover { background: var(--ice); border-color: #9fc2bb; }
.name-tile.is-used { opacity: .4; cursor: default; text-decoration: line-through; }
.match-result { margin-top: 13px; color: var(--teal-dark); font-size: 10px; font-weight: 600; }
.question-layout { display: grid; grid-template-columns: minmax(150px, .65fr) 1fr; gap: 27px; align-items: center; max-width: 800px; margin: 0 auto; padding: 12px 0; }
.question-photo { overflow: hidden; height: 260px; background: #e9f0ed; border-radius: 4px; }
.question-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.question-photo .photo-fallback { display: grid; place-items: center; height: 100%; color: var(--teal); font-family: var(--display); font-size: 60px; }
.question-copy h2 { margin: 11px 0 8px; font-size: 29px; }
.question-copy > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.answer-list { display: grid; gap: 8px; }
.answer-option { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 43px; padding: 8px 11px; color: #425e61; background: #fbfcfa; border: 1px solid #dce6e2; border-radius: 4px; cursor: pointer; text-align: left; font-size: 11px; }
.answer-option:hover:not(:disabled) { background: #eff7f3; border-color: #9ebfb5; }
.answer-option:disabled { cursor: default; }
.answer-option.is-correct { color: #1e655a; background: #e8f4ed; border-color: #85b6a1; }
.answer-option.is-incorrect { color: #9a4c40; background: #faece6; border-color: #dba192; }
.answer-key { display: grid; flex: 0 0 20px; place-items: center; width: 20px; height: 20px; color: #829794; background: #eef2ef; border-radius: 50%; font-size: 9px; font-weight: 700; }
.quiz-feedback { min-height: 20px; margin-top: 11px; color: var(--teal-dark); font-size: 10px; font-weight: 600; }
.quiz-next { margin-top: 3px; }
.quote-text { margin: 13px 0 20px; color: var(--ink); font-family: var(--display); font-size: clamp(22px, 2.5vw, 31px); line-height: 1.22; }
.quote-source { margin: -9px 0 15px; color: var(--muted); font-size: 9px; }
.bio-clue { margin: 17px 0 19px; padding: 18px; color: #456165; background: #eff5f1; border-left: 2px solid var(--sun); font-family: var(--display); font-size: 19px; line-height: 1.4; }
.hint-button { margin-bottom: 12px; }
.name-hint { margin: 0 0 16px; padding: 12px; font-family: inherit; font-size: 11px; }
.name-hint p { margin: 6px 0 0; color: inherit; font-size: inherit; line-height: 1.5; }
.timer-track { height: 5px; overflow: hidden; margin-bottom: 15px; background: #edf1ed; border-radius: 5px; }
.timer-fill { height: 100%; width: 100%; background: var(--teal); transform-origin: left; transition: width .4s linear; }
.timer-fill.is-low { background: var(--coral); }
.challenge-score { color: var(--teal-dark); font-family: var(--display); font-size: 25px; }
.result-view { max-width: 690px; margin: 38px auto; padding: 35px; background: white; border: 1px solid var(--line); border-radius: 5px; text-align: center; box-shadow: var(--shadow); }
.result-medal { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; color: #815a1d; background: #f8ebc8; border: 1px solid #e8d49d; border-radius: 50%; font-family: var(--display); font-size: 25px; }
.result-view h2 { font-size: 34px; }
.result-view > p { margin: 10px auto 22px; color: var(--muted); font-size: 11px; }
.result-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 23px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-metrics div { padding: 16px 8px; }
.result-metrics div + div { border-left: 1px solid var(--line); }
.result-metrics strong { display: block; color: var(--ink); font-family: var(--display); font-size: 24px; font-weight: 500; }
.result-metrics span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.result-actions { display: flex; justify-content: center; gap: 8px; }
.leaderboard-tabs { display: flex; gap: 5px; margin-bottom: 18px; }
.leaderboard-tabs button { min-height: 31px; padding: 0 11px; color: #728684; background: transparent; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-size: 10px; }
.leaderboard-tabs button.is-active { color: var(--ink); background: white; border-color: var(--line); }
.score-table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--line); text-align: left; }
.score-table th { padding: 11px 13px; color: #829392; background: #f4f7f4; font-size: 9px; font-weight: 600; }
.score-table td { padding: 12px 13px; border-top: 1px solid #e9efec; font-size: 10px; }
.score-table tr:first-child td { color: #725526; }
.rank-number { display: inline-grid; place-items: center; width: 20px; height: 20px; background: #f0f3ef; border-radius: 50%; font-size: 9px; }
.empty-state { padding: 28px 16px; color: var(--muted); background: #f7f9f6; border: 1px dashed #d4dfda; border-radius: 4px; font-size: 11px; text-align: center; }
.progress-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-bottom: 18px; }
.stat-block { padding: 17px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.stat-block span { display: block; color: var(--muted); font-size: 9px; }
.stat-block strong { display: block; margin-top: 8px; font-family: var(--display); font-size: 27px; font-weight: 500; }
.progress-bars { display: grid; gap: 14px; padding: 17px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.progress-row { display: grid; grid-template-columns: 130px 1fr 38px; align-items: center; gap: 12px; color: #637a7a; font-size: 10px; }
.progress-row > span { overflow-wrap: anywhere; }
.progress-track { height: 7px; overflow: hidden; background: #edf2ef; border-radius: 6px; }
.progress-track span { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.badge-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.badge-item { display: flex; align-items: center; gap: 8px; padding: 9px 11px; background: white; border: 1px solid var(--line); border-radius: 4px; font-size: 9px; }
.badge-icon { color: #b4863d; font-size: 14px; }
.recent-quote { margin-top: 15px; padding: 14px 15px; background: #f3f6f1; border-left: 2px solid var(--sun); }
.recent-quote > strong { color: #58716f; font-size: 9px; letter-spacing: .45px; text-transform: uppercase; }
.recent-quote p { margin: 7px 0 5px; color: var(--ink); font-family: var(--display); font-size: 18px; line-height: 1.3; }
.recent-quote small { color: var(--muted); font-size: 9px; }
.recent-quote a { color: var(--teal-dark); text-decoration: none; }
.recent-quote a:hover { text-decoration: underline; }
.recent-quote audio { display: block; width: min(100%, 320px); height: 34px; margin-top: 9px; }
.personal-best { color: var(--teal-dark) !important; font-size: 11px !important; font-weight: 700; }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(20, 42, 44, .56); backdrop-filter: blur(3px); }
.modal { position: relative; width: min(100%, 480px); padding: 28px; background: var(--paper); border-radius: 5px; box-shadow: 0 24px 80px rgba(8, 25, 27, .25); }
.modal-close { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 30px; height: 30px; color: #607779; background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.modal h2 { margin: 7px 34px 8px 0; font-size: 31px; }
.modal > p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-form { display: grid; gap: 11px; margin-top: 17px; }
.form-row { display: grid; gap: 5px; }
.form-row label { color: #4c6667; font-size: 10px; font-weight: 600; }
.form-row input, .form-row textarea, .form-row select { width: 100%; min-height: 39px; padding: 9px 10px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; }
.form-row textarea { min-height: 90px; resize: vertical; }
.auth-form .button { margin-top: 4px; }
.modal-switch { margin-top: 13px; color: var(--muted); font-size: 10px; text-align: center; }
.modal-switch button { color: var(--teal-dark); background: none; border: 0; cursor: pointer; font-weight: 700; }
.admin-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); gap: 15px; }
.admin-list { display: grid; gap: 6px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; background: white; border: 1px solid var(--line); border-radius: 3px; font-size: 10px; }
.admin-actions { display: flex; gap: 5px; }
.admin-actions button { padding: 4px 7px; color: var(--teal-dark); background: transparent; border: 1px solid #d4e1dc; border-radius: 3px; cursor: pointer; font-size: 9px; }
.admin-form { display: grid; gap: 8px; align-content: start; padding: 14px; background: #f1f5f1; border-radius: 4px; }
.admin-form .form-row input, .admin-form .form-row textarea { min-height: 32px; font-size: 10px; }
.admin-form .form-row textarea { min-height: 60px; }
.toast-region { position: fixed; z-index: 30; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { max-width: min(360px, calc(100vw - 36px)); padding: 11px 15px; color: white; background: var(--ink); border-left: 3px solid var(--sun); border-radius: 3px; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease-out; }
.noscript-note { position: fixed; inset: 0 0 auto; z-index: 99; padding: 15px; color: white; background: #a34d3f; text-align: center; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 1120px) {
  .leader-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr 37%; }
  .match-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .match-photo, .match-photo img { min-height: 92px; height: 92px; }
}
@media (max-width: 850px) {
  .sidebar { width: 70px; align-items: center; padding: 18px 8px 12px; }
  .brand { padding: 0 0 31px; }
  .brand-copy, .side-label, .nav-link:not(.is-active) .nav-count, .nav-link { font-size: 0; }
  .primary-nav { width: 100%; }
  .nav-link { justify-content: center; min-height: 44px; padding: 0; }
  .nav-icon { font-size: 17px; }
  .nav-count { position: absolute; margin: -27px 0 0 25px; width: 16px; height: 16px; font-size: 9px; }
  .side-label-spaced { display: block; width: 100%; height: 24px; margin-top: 20px; padding: 0; overflow: hidden; font-size: 0; }
  .daily-note { display: none; }
  .main-panel { margin-left: 70px; }
  .hero-copy { padding: 28px; }
  .hero-art { padding-right: 5px; padding-left: 5px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .sidebar { position: sticky; inset: 0 0 auto; flex-direction: row; align-items: center; width: 100%; height: 58px; padding: 0 12px; }
  .brand { display: none; }
  .primary-nav { display: flex; width: auto; gap: 2px; }
  .sidebar > .side-label, .sidebar-bottom { display: none; }
  .nav-link { width: 43px; min-height: 39px; font-size: 0; }
  .nav-count { display: none; }
  .sidebar::before { flex: 1; color: #f2f7f4; content: "LEADER MATCH"; font-size: 10px; font-weight: 700; letter-spacing: .8px; }
  .main-panel { margin: 0; }
  .topbar { position: sticky; top: 58px; height: 53px; padding: 0 16px; }
  .crumbs > span:first-child, .crumb-dot { display: none; }
  .mobile-brand { display: none; }
  .view-container { min-height: calc(100vh - 162px); padding: 23px 16px 30px; }
  .site-footer { padding: 13px 16px 17px; font-size: 8px; }
  .site-footer span { max-width: 165px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 24px 21px 12px; }
  .hero-copy h1 { max-width: 370px; font-size: 39px; }
  .hero-copy p { margin: 10px 0 14px; font-size: 11px; }
  .hero-art { height: 155px; min-height: 155px; }
  .hero-art::before { right: 18%; width: 64%; height: 94%; }
  .portrait-stack img { height: 130px; }
  .portrait-stack img:nth-child(2) { height: 150px; }
  .portrait-stack img:nth-child(3) { height: 140px; }
  .portrait-stack img:nth-child(4) { height: 150px; }
  .portrait-stack img:nth-child(5) { height: 130px; }
  .page-heading { align-items: start; flex-direction: column; gap: 12px; }
  h1, .display-heading { font-size: 37px; }
  .level-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-card { min-height: 103px; }
  .level-card:last-child { grid-column: span 2; }
  .game-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .game-card { min-height: 127px; padding: 12px; }
  .game-card h3 { max-width: 145px; margin-top: 11px; font-size: 11px; }
  .game-card p { font-size: 9px; }
  .leader-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .leader-photo { height: 145px; }
  .leader-copy { padding: 9px; }
  .leader-copy h3 { font-size: 10px; }
  .leader-copy p { font-size: 8px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .search-field { flex-basis: 100%; max-width: none; }
  .toolbar .select-control { flex: 1; }
  .study-flashcard { grid-template-columns: 1fr; }
  .flash-photo { height: 225px; min-height: 225px; }
  .flash-copy { padding: 21px; }
  .flash-copy h2 { font-size: 31px; }
  .study-modes { align-items: flex-start; flex-direction: column; }
  .match-layout { grid-template-columns: 1fr; gap: 14px; }
  .match-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .match-photo, .match-photo img { min-height: 91px; height: 91px; }
  .name-bank { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-panel-head { align-items: flex-start; flex-direction: column; }
  .game-stats { flex-wrap: wrap; gap: 8px 14px; }
  .game-body { padding: 13px; }
  .question-layout { grid-template-columns: minmax(90px, .45fr) 1fr; gap: 14px; padding: 3px 0; }
  .question-photo { height: 180px; }
  .question-copy h2 { font-size: 22px; }
  .question-copy > p { margin-bottom: 12px; font-size: 10px; }
  .answer-option { min-height: 40px; padding: 7px; font-size: 10px; }
  .answer-key { flex-basis: 18px; width: 18px; height: 18px; }
  .quote-text { font-size: 23px; }
  .bio-clue { padding: 13px; font-size: 16px; }
  .progress-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .stat-block { padding: 11px; }
  .stat-block strong { font-size: 21px; }
  .progress-row { grid-template-columns: 90px 1fr 30px; gap: 7px; font-size: 9px; }
  .score-table th, .score-table td { padding: 9px 7px; font-size: 9px; }
  .result-view { margin: 20px auto; padding: 23px 15px; }
  .result-actions { flex-wrap: wrap; }
  .admin-wrap { grid-template-columns: 1fr; }
  .modal { padding: 23px 18px; }
}
@media (max-width: 380px) {
  .hero-copy h1 { font-size: 34px; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 110px; }
  .match-photo, .match-photo img { min-height: 78px; height: 78px; }
  .question-layout { grid-template-columns: 1fr; }
  .question-photo { width: min(100%, 180px); height: 180px; margin: 0 auto; }
}
.high-contrast {
  --ink: #000;
  --ink-soft: #111;
  --muted: #303838;
  --line: #596362;
  --paper: #fff;
  --white: #fff;
  --ice: #e6ffff;
  --teal: #005d59;
  --teal-dark: #004842;
  --side: #000;
  --side-muted: #e2eeee;
}
.high-contrast .hero, .high-contrast .game-card, .high-contrast .level-card, .high-contrast .leader-card, .high-contrast .game-panel, .high-contrast .stat-block { border-color: #555; }
