@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Dancing+Script:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');

:root {
  color-scheme: light;
  --ink: #282e2d;
  --muted: #66706d;
  --paper: #f5efe3;
  --cream: #fffaf1;
  --terracotta: #b85c3c;
  --olive: #7a8061;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Dancing Script', cursive; }
.site-header { height: 82px; padding: 0 7vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(40,46,45,.12); }
.wordmark { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.wordmark-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--terracotta); border-radius: 50%; background: #f0dfc3; }
.wordmark-mark svg { display: block; width: 26px; height: 26px; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { color: var(--ink); font-size: 13px; text-decoration: none; white-space: nowrap; }
nav a.active { padding-bottom: 7px; border-bottom: 1px solid var(--terracotta); }
.hero { min-height: 560px; display: grid; grid-template-columns: 1fr 1fr; padding: 55px 7vw 75px; gap: 5vw; align-items: center; }
.hero-copy { padding: 10px 0 10px 5vw; }
.eyebrow { margin: 0 0 22px; color: var(--terracotta); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: 'Dancing Script', cursive; font-weight: 600; letter-spacing: -.035em; }
h1 { font-size: clamp(64px, 8.5vw, 112px); line-height: .91; }
h1 em { color: var(--terracotta); font-weight: 500; }
.intro { max-width: 360px; margin: 26px 0 25px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.text-link { color: var(--ink); font-size: 12px; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(40,46,45,.35); padding-bottom: 8px; }
.text-link span { color: var(--terracotta); margin-left: 10px; font-size: 16px; }
.hero-page-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; max-width: 390px; margin: 30px 0 0; padding: 0; list-style: none; counter-reset: page; }
.hero-page-list li { counter-increment: page; }
.hero-page-list a { display: flex; gap: 10px; align-items: baseline; color: var(--ink); font-size: 12px; text-decoration: none; }
.hero-page-list a::before { content: counter(page, decimal-leading-zero); color: var(--terracotta); font-family: 'Playfair Display', serif; font-size: 16px; }
.hero-page-list a:hover { color: var(--terracotta); }
.hero-art { height: 400px; max-width: 540px; width: 100%; position: relative; overflow: hidden; justify-self: center; background: linear-gradient(160deg, #ead5af 0%, #d7a57f 52%, #ad674e 100%); }
.home-overview { display: flex; justify-content: flex-end; margin: 0; padding: 0 7vw 42px; }
.home-overview img { display: block; width: min(100%, 680px); height: auto; }
.hero-art::before, .hero-art::after { content: ''; position: absolute; bottom: 0; width: 120%; height: 47%; left: -10%; border-radius: 50% 50% 0 0; background: rgba(105,111,81,.34); }
.hero-art::after { height: 33%; background: rgba(75,83,66,.42); left: 12%; width: 105%; }
.sun { position: absolute; width: 165px; height: 165px; border-radius: 50%; background: #f5dfb3; top: 53px; right: 78px; opacity: .92; }
.temple { position: absolute; z-index: 1; width: 270px; height: 190px; left: 50%; transform: translateX(-50%); bottom: 78px; }
.roof { position: absolute; top: 0; left: 2px; width: 266px; height: 15px; background: #595a49; clip-path: polygon(0 100%, 5% 0, 95% 0, 100% 100%); }
.pediment { position: absolute; left: 38px; top: 12px; width: 194px; height: 51px; background: #6c6955; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.columns { position: absolute; left: 27px; right: 27px; top: 60px; height: 103px; display: flex; justify-content: space-between; padding: 0 5px; border-top: 9px solid #595a49; border-bottom: 9px solid #595a49; }
.columns i { width: 24px; height: 100%; background: repeating-linear-gradient(90deg, #e6d2ad 0 5px, #c6b28f 5px 7px); }
.steps { position: absolute; bottom: 0; left: 10px; width: 250px; height: 13px; background: #595a49; box-shadow: 0 12px 0 -2px #706b54, 0 23px 0 -4px #777158; }
.art-caption { position: absolute; z-index: 2; right: 18px; bottom: 18px; color: rgba(255,250,241,.86); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.welcome { padding: 85px 12vw 100px; background: var(--cream); }
.welcome .eyebrow { margin-bottom: 18px; }
h2 { font-size: clamp(42px, 5.5vw, 68px); line-height: 1.02; }
.welcome-copy { max-width: 510px; color: var(--muted); font-size: 15px; line-height: 1.8; margin: 22px 0 42px; }
.next-step { max-width: 600px; display: flex; align-items: center; gap: 18px; padding: 18px 0; border-top: 1px solid rgba(40,46,45,.2); border-bottom: 1px solid rgba(40,46,45,.2); font-size: 13px; }
.page-card { max-width: 600px; display: flex; align-items: center; gap: 18px; padding: 18px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(40,46,45,.2); font-size: 13px; }
.page-card strong, .page-card small { display: block; }
.page-card small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.step-number { color: var(--terracotta); font-family: 'Playfair Display', serif; font-size: 22px; }
.step-arrow { margin-left: auto; color: var(--terracotta); font-size: 20px; }
footer { min-height: 72px; padding: 0 7vw; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; letter-spacing: .13em; }
footer span:first-child { color: var(--ink); font-weight: 700; }
.topic-page { min-height: calc(100vh - 154px); padding: 92px 12vw 110px; background: radial-gradient(ellipse at 84% 25%, rgba(184,92,60,.1), transparent 34%); }
.topic-title { font-size: clamp(72px, 10vw, 132px); line-height: .9; }
.topic-title em { color: var(--terracotta); font-weight: 500; }
.topic-rule { width: 62px; height: 1px; background: var(--terracotta); margin: 35px 0 24px; }
.topic-placeholder { max-width: 480px; color: var(--muted); font-size: 16px; line-height: 1.8; margin: 0 0 32px; }
.topic-image { margin: 0 0 32px; max-width: 620px; }
.topic-image img { display: block; width: 100%; height: auto; }
.topic-image figcaption { padding-top: 9px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.quiz-page { max-width: 960px; margin: 0 auto; padding: 76px 7vw 100px; }
.quiz-intro { margin: 18px 0 38px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.home-quiz { margin-top: 24px; background: linear-gradient(140deg, #fffaf1, #f0e5d1); border-top: 1px solid rgba(40,46,45,.14); }
.challenge-quiz { margin-top: 10px; background: linear-gradient(140deg, #e6ece9, #f5efe3); border-top: 1px solid rgba(40,46,45,.14); }
.quiz-status { max-width: 720px; margin: 26px 0 30px; padding: 16px 18px; border-radius: 14px; background: #fffaf1; box-shadow: 0 8px 24px rgba(40,46,45,.07); }
.quiz-status-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--ink); font-size: 12px; font-weight: 700; }
.quiz-status progress { display: block; width: 100%; height: 11px; overflow: hidden; border: 0; border-radius: 20px; background: #e7dcc8; accent-color: var(--terracotta); }
.quiz-status progress::-webkit-progress-bar { border-radius: 20px; background: #e7dcc8; }
.quiz-status progress::-webkit-progress-value { border-radius: 20px; background: linear-gradient(90deg, #d88954, #b85c3c); transition: width .3s ease; }
.quiz-status progress::-moz-progress-bar { border-radius: 20px; background: linear-gradient(90deg, #d88954, #b85c3c); }
.quiz-section { margin: 38px 0; }
.bonus-round { margin-top: 56px; padding: 25px; border: 1px dashed rgba(184,92,60,.55); border-radius: 16px; background: rgba(255,250,241,.7); }
.quiz-section h2 { margin-bottom: 18px; font-size: clamp(30px, 4vw, 42px); }
.quiz-question { margin: 0 0 18px; padding: 20px 22px; border: 1px solid rgba(40,46,45,.18); background: var(--cream); }
.quiz-question legend { padding: 0 8px; font-weight: 700; font-size: 14px; }
.quiz-question label { display: block; margin: 10px 0; padding: 12px 14px; border: 1px solid rgba(40,46,45,.12); border-radius: 9px; background: #fff; color: var(--muted); font-size: 14px; cursor: pointer; transition: border-color .16s, background .16s, transform .16s; }
.quiz-question label:hover { border-color: var(--terracotta); background: #fff7ec; transform: translateY(-1px); }
.quiz-question label:has(input:checked) { border-color: var(--terracotta); background: #f8e9d8; color: var(--ink); }
.quiz-question input { accent-color: var(--terracotta); margin-right: 8px; }
.quiz-question.correct { border: 2px solid #687c4d; box-shadow: 0 0 0 4px rgba(104,124,77,.1); }
.quiz-question.incorrect { border: 2px solid var(--terracotta); box-shadow: 0 0 0 4px rgba(184,92,60,.1); }
.quiz-feedback { display: inline-block; margin-left: 8px; font-size: 18px; font-weight: 700; line-height: 1; }
.quiz-question.correct .quiz-feedback { color: #536b38; }
.quiz-question.incorrect .quiz-feedback { color: var(--terracotta); }
.quiz-feedback-message { min-height: 1.6em; margin: 16px 0; color: var(--terracotta); font-size: 16px; font-weight: 700; }
.quiz-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.quiz-submit { border: 0; padding: 14px 22px; background: var(--terracotta); color: white; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.quiz-submit[hidden] { display: none; }
.quiz-submit:hover { background: #98482e; }
.quiz-result { min-height: 1.5em; color: var(--ink); font-weight: 700; }
.olympics-content { max-width: 620px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.olympics-content h2 { margin: 0 0 14px; color: var(--ink); font-size: clamp(34px, 4vw, 46px); }
.country-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; padding-left: 20px; }
@media (max-width: 500px) { .country-list { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .site-header { height: 70px; padding: 0 6vw; }
  .hero { grid-template-columns: 1fr; padding: 56px 7vw 60px; gap: 40px; }
  .hero-copy { padding-left: 0; }
  .hero-art { height: 330px; }
  .home-overview { padding: 0 7vw 28px; }
  .welcome { padding: 68px 8vw 75px; }
  .topic-page { min-height: calc(100vh - 142px); padding: 74px 8vw; }
  footer { padding: 0 6vw; }
}
