:root {
  color-scheme: light;
  --paper: #f5f7fb;
  --surface: #fff;
  --ink: #1b2944;
  --muted: #4b5a73;
  --navy: #1b2f57;
  --accent: #284a88;
  --gold: #f3d59c;
  --tint: #e9eef8;
  --line: #d5deed;
  --error: #96263e;
  --body: "Be Vietnam Pro", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-block-size: 100vh; display: flex; flex-direction: column; font: 400 15px/1.6 var(--body); color: var(--ink); background: var(--paper); }
h1, h2, h3, p { margin: 0; }
h1 { font: 600 clamp(1.8rem, 5.7vw, 3.4rem)/1.16 "Lora", Georgia, serif; letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: clamp(1.15rem, 2.6vw, 1.5rem); line-height: 1.4; }
h3 { font-size: 1rem; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(100% - clamp(1.5rem, 6vw, 5rem), 67.5rem); margin-inline: auto; }
.skip { position: fixed; z-index: 2; padding: .65rem; background: var(--surface); translate: 0 -120%; }
.skip:focus { translate: 0; }
.hero { padding-block: clamp(1.65rem, 5vw, 3.3rem); background: var(--navy); color: #fff8ea; }
.kicker { margin-bottom: .4rem; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.source { display: flex; align-items: center; gap: .55rem; margin-top: .75rem; font-size: .875rem; color: #dde6fa; }
.source::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--gold); }
.tool-nav { border-bottom: 1px solid var(--line); background: var(--surface); }
.tool-nav .wrap { display: flex; flex-wrap: wrap; column-gap: 1.4rem; }
.tool-nav button { min-height: 52px; padding: .65rem .15rem .48rem; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-weight: 650; text-align: center; }
.tool-nav button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--accent); }
main { padding-block: clamp(1.3rem, 4vw, 2.6rem) 2.3rem; flex: 1; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .9rem; align-items: end; margin-top: 1rem; }
label { display: grid; gap: .3rem; min-width: 0; font-weight: 600; }
input, select, button { font: inherit; }
input, select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #aab9d1; border-radius: .5rem; padding: .5rem .65rem; color: var(--ink); background: var(--surface); font-size: 1rem; }
.status { margin-top: 1rem; color: var(--muted); }
.status:empty { display: none; }
.status.error { color: var(--error); }
.card { margin-top: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); padding: clamp(.65rem, 2vw, 1.2rem); }
.result-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; }
.result-heading p { color: var(--muted); font-size: .85rem; }
.day-field { display: none; }
.week { margin-top: .8rem; width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .875rem; }
.week caption { padding-bottom: .35rem; font-weight: 700; text-align: left; }
.week th, .week td { padding: .45rem .3rem; border: 1px solid var(--line); text-align: center; overflow-wrap: anywhere; }
.week th { background: var(--tint); font-weight: 600; }
.week .period { width: 12%; }
.week .empty { color: var(--muted); }
.lesson + .lesson { margin-top: .35rem; padding-top: .35rem; border-top: 1px solid var(--line); }
.graduation-label { display: block; width: fit-content; margin: 0 auto .1rem; padding: .04rem .28rem; border-radius: .25rem; color: #624507; background: #f9e9c7; font-size: .72rem; font-weight: 700; }
#graduation-lookup .action { margin-top: .8rem; }
.lookup-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .65rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.lookup-results .card { margin: 0; }
.lookup-results p { color: var(--muted); }
.subject-schedules { margin-top: 1.8rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.subject-picker { max-width: 22rem; margin-top: .65rem; }
footer { padding-block: .85rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
footer a { font-weight: 600; }
.action { min-height: 44px; padding: .5rem .85rem; border: 0; border-radius: .5rem; background: var(--accent); color: #fff; font-weight: 650; cursor: pointer; }
.action:disabled { background: var(--tint); color: var(--muted); cursor: default; }
.review-list { padding-left: 1.4rem; }
.review-list li + li { margin-top: .4rem; }
.admin { max-inline-size: 66rem; }
.admin summary { cursor: pointer; }
.admin details + details { margin-top: .65rem; }
.admin .action { margin-top: 1rem; }
@media (max-width: 650px) {
  .tool-nav .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: .65rem; }
  .tool-nav button { font-size: .82rem; padding-inline: .15rem; }
  .fields { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .day-field { display: grid; margin-top: .65rem; }
  .week [data-day]:not([data-current-day]) { display: none; }
  .week .period { width: 31%; }
  .action { width: 100%; }
}
