:root {
  --ink: #1c1917;
  --muted: #44403c;
  --paper: #fbf7f1;
  --card: #ffffff;
  --line: #e6ddd0;
  --teal: #0f4c5c;
  --teal-deep: #0a3944;
  --teal-soft: #e7f4f6;
  --rust: #9a3412;
  --rust-soft: #fff4eb;
  --purple: #5b21b6;
  --purple-soft: #f5f3ff;
  --green: #14532d;
  --blue: #1e3a8a;
  --blue-soft: #eff6ff;
  --focus: #c2410c;
  --ok: #166534;
  --ok-bg: #dcfce7;
  --bad: #991b1b;
  --bad-bg: #fee2e2;
  --mark: #fde68a;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.06);
}

* { box-sizing: border-box; }

html {
  font-size: 20px;
  scroll-padding-bottom: 7.5rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Verdana, "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.8rem;
  z-index: 5;
}

.skip:focus { top: 0.5rem; }

a { color: var(--teal-deep); }

a:focus-visible,
button:focus-visible,
.option:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.site-header {
  background: var(--teal);
  color: white;
  padding: 1.25rem 1.25rem 1.4rem;
}

.site-header a { color: white; }

.school {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.site-header h1 {
  margin: 0.2rem 0 0.15rem;
  font-size: 1.7rem;
  line-height: 1.25;
  font-weight: 750;
}

.byline { margin: 0; font-size: 1rem; }

.wrap {
  width: min(46rem, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.25rem 0 5rem;
}

.intro p { margin: 0 0 0.6rem; }

.intro p:last-child { color: var(--green); }

.today-card,
.calendar-card,
.panel,
.question,
.scoreboard,
.box,
.photo {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.today-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1rem 1.15rem;
  margin: 1rem 0 1.15rem;
  border-left: 8px solid var(--teal);
}

.today-card:hover { background: var(--teal-soft); }

.eyebrow {
  display: block;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.95rem;
}

.today-card strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 0.15rem 0;
}

.today-card span:last-child { color: var(--muted); }

.calendar-card { padding: 1rem 0.8rem 1.1rem; }

.month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.month-bar h2 {
  margin: 0;
  color: var(--teal);
  font-size: 1.35rem;
  text-align: center;
}

.month-bar button {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 2px solid var(--teal);
  background: white;
  color: var(--teal);
  font-size: 1.3rem;
  cursor: pointer;
}

.month-bar button:hover { background: var(--teal-soft); }

.weekdays,
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.weekdays {
  margin-bottom: 0.35rem;
  color: var(--rust);
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
}

.day {
  min-height: 4.2rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  background: #f6f3ee;
  border: 1px solid transparent;
  font-weight: 650;
}

.day small {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
  padding: 0 0.15rem;
}

.day.is-empty { cursor: default; }

.day.has-reading {
  background: var(--teal);
  color: white;
}

.day.has-reading:hover { background: var(--teal-deep); }

.day.is-today { box-shadow: inset 0 0 0 3px var(--focus); }

.legend {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 3px;
  margin: 0 0.25rem 0 0.6rem;
  vertical-align: -0.1rem;
}

.swatch-on { background: var(--teal); }
.swatch-off { background: #e7e1d8; margin-left: 0.8rem; }

.article-head h2 {
  margin: 0.2rem 0 0.45rem;
  color: var(--teal);
  font-size: 1.7rem;
  line-height: 1.25;
}

.meta {
  margin: 0;
  color: var(--muted);
}

.meta strong { color: var(--rust); }

.standfirst {
  font-size: 1.15rem;
  margin: 0.8rem 0 0;
  padding: 0.8rem 0.95rem;
  background: var(--teal-soft);
  border-radius: 10px;
}

.skill-strip {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: var(--blue-soft);
  border-radius: 12px;
  color: var(--blue);
}

.skill-strip p { margin: 0.25rem 0; }

.panel { padding: 1rem 1.1rem 0.4rem; margin: 1rem 0; }

.panel h3 {
  margin: 0 0 0.7rem;
  color: var(--purple);
  font-size: 1.25rem;
}

.panel.names h3 { color: var(--rust); }

.vocab-list,
.name-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vocab-list li,
.name-list li {
  margin: 0 0 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.vocab-list li:last-child,
.name-list li:last-child { border-bottom: 0; }

.word {
  color: var(--purple);
  font-weight: 750;
}

a.word,
a.zh,
a.vocab-back {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

a.zh,
a.vocab-back {
  display: block;
  margin-top: 0.2rem;
  color: var(--green);
}

a.word:hover,
a.word:focus-visible,
a.zh:hover,
a.zh:focus-visible,
a.vocab-back:hover,
a.vocab-back:focus-visible,
a.para-ref:hover,
a.para-ref:focus-visible {
  background: #fff3b0;
  outline: 2px solid #4a148c;
  outline-offset: 2px;
}

a.para-ref {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  cursor: pointer;
}

a.term {
  scroll-margin-top: 1rem;
}

a.term:target {
  background: #fff3b0;
  outline: 3px solid #4a148c;
}

.zh { color: var(--green); }

.para-ref {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 700;
}

.name-list .word { color: var(--rust); }

.article { margin-top: 1.2rem; }

.para {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.35rem 0.7rem;
  margin: 0 0 0.95rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
}

.para-num {
  color: var(--teal);
  font-weight: 800;
  text-align: right;
}

.term {
  color: var(--purple);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a.term {
  cursor: pointer;
}

a.term:hover,
a.term:focus-visible {
  background: #fff3b0;
  color: #4a148c;
  outline: 2px solid #4a148c;
  outline-offset: 2px;
}

.vocab-list li {
  scroll-margin-top: 1rem;
}

.vocab-list li:target {
  background: #fff3b0;
  border-radius: 8px;
  padding: 0.5rem 0.6rem 0.75rem;
  outline: 3px solid #4a148c;
}

.section-title {
  color: var(--rust);
  font-size: 1.35rem;
  margin: 1.5rem 0 0.8rem;
}

.photo {
  margin: 1rem 0 1.2rem;
  overflow: hidden;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
}

.photo figcaption {
  padding: 0.75rem 0.95rem 0.9rem;
  font-size: 0.98rem;
}

.credit {
  display: block;
  margin-top: 0.2rem;
  color: var(--teal);
  font-weight: 750;
}

.box {
  margin: 1rem 0;
  padding: 0.95rem 1.05rem;
}

.box h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }

.box p { margin: 0; }

.box-why {
  border-left: 8px solid var(--teal);
  background: var(--teal-soft);
}

.box-why h3 { color: var(--teal); }

.box-think {
  border-left: 8px solid var(--rust);
  background: var(--rust-soft);
}

.box-think h3 { color: var(--rust); }

.box .note {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.questions { margin-top: 1.6rem; }

.questions > h2 {
  color: var(--blue);
  font-size: 1.45rem;
  margin-bottom: 0.3rem;
}

.question {
  padding: 1rem 1rem 0.8rem;
  margin: 0.9rem 0;
  min-inline-size: 0;
}

.question legend {
  padding: 0;
  width: 100%;
}

.q-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.q-num {
  color: var(--blue);
  font-weight: 800;
}

.skill-tag {
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 0.1rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 750;
}

.stem { margin: 0.2rem 0 0.7rem; font-weight: 650; }

.q-hint {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.8rem;
  border-left: 4px solid var(--teal);
  background: #e8f7f7;
  border-radius: 0 8px 8px 0;
}

.q-hint-label {
  margin: 0 0 0.2rem;
  color: var(--teal);
  font-weight: 800;
  font-size: 0.95rem;
}

.q-hint p { margin: 0.2rem 0; }

a.para-jump {
  color: var(--teal);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

a.para-jump:hover,
a.para-jump:focus-visible {
  background: #fff3b0;
  color: #004d4d;
  outline: 2px solid #004d4d;
  outline-offset: 2px;
}

.para,
.standfirst {
  scroll-margin-top: 1rem;
}

.para:target,
.standfirst:target {
  background: #fff3b0;
  outline: 3px solid var(--teal);
}

.options { display: grid; gap: 0.5rem; }

.option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: white;
}

.option input { width: 1.2rem; height: 1.2rem; margin-top: 0.28rem; flex: 0 0 auto; }

.option span:last-child { flex: 1; }

.option.chosen { border-color: var(--blue); background: var(--blue-soft); }

.option.correct { border-color: var(--ok); background: var(--ok-bg); }

.option.wrong { border-color: var(--bad); background: var(--bad-bg); }

.letter {
  font-weight: 800;
  color: var(--blue);
  min-width: 1.2rem;
  line-height: 1.5;
}

.guide {
  margin-top: 0.85rem;
  padding: 0.75rem 0.8rem;
  background: #fffbeb;
  border-radius: 10px;
}

.guide h4 {
  margin: 0 0 0.3rem;
  color: var(--rust);
  font-size: 1rem;
}

.guide p { margin: 0.3rem 0; }

.guide blockquote {
  margin: 0.35rem 0;
  padding-left: 0.7rem;
  border-left: 4px solid var(--rust);
}

.show-place {
  margin-top: 0.4rem;
  background: white;
  color: var(--teal-deep);
  border: 2px solid var(--teal);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.para.is-evidence {
  background: #fef3c7;
  box-shadow: inset 0 0 0 3px #d97706;
}

.standfirst.is-evidence {
  box-shadow: inset 0 0 0 3px #d97706;
}

.evidence-quote {
  background: var(--mark);
  color: var(--ink);
  padding: 0 0.12rem;
}

.submit-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: white;
  border: 2px solid var(--blue);
  border-radius: 14px;
}

.submit-bar p { margin: 0; color: var(--blue); font-weight: 700; }

.submit-bar button {
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font: inherit;
  font-weight: 750;
  padding: 0.65rem 1rem;
  cursor: pointer;
}

.submit-bar button:disabled {
  background: #cbd5e1;
  color: #334155;
  cursor: not-allowed;
}

.scoreboard {
  padding: 1rem 1.1rem;
  margin: 0.4rem 0 1rem;
  border-left: 8px solid var(--blue);
}

.scoreboard h2 { margin: 0; color: var(--blue); font-size: 1.6rem; }

.scoreboard p { margin: 0.35rem 0 0; }

.site-footer {
  padding: 0 1.25rem 2rem;
  color: var(--muted);
  width: min(46rem, calc(100% - 1.5rem));
  margin: 0 auto;
  font-size: 0.92rem;
}

.empty-state {
  padding: 1rem 0;
}

@media (max-width: 640px) {
  html { font-size: 18px; }
  .day { min-height: 3.4rem; }
  .day small { display: none; }
  .submit-bar { flex-direction: column; align-items: stretch; }
  .para { grid-template-columns: 1.8rem 1fr; }
}

@media (min-width: 900px) {
  .vocab-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.2rem;
  }
}
