:root {
  --navy-950: #0a223d;
  --navy-900: #102f53;
  --navy-700: #1f537d;
  --plum-800: #61264e;
  --plum-100: #f4e8f0;
  --gold-700: #765600;
  --gold-400: #d7b75c;
  --gold-100: #f6ebc9;
  --cream: #fbf7ed;
  --paper: #fffdf8;
  --ink: #13243a;
  --muted: #506276;
  --line: #d9d7cf;
  --blue-wash: #e8f0f6;
  --focus: #a63a00;
  --shadow: 0 18px 48px rgb(16 47 83 / 11%);
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 4%, rgb(215 183 92 / 16%), transparent 23rem),
    var(--cream);
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  transform: translateY(-180%);
  border-radius: 0.6rem;
  background: var(--paper);
  color: var(--navy-950);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(100% - 2rem, 74rem);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid rgb(16 47 83 / 15%);
  background: rgb(255 253 248 / 94%);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-inner {
  min-height: 5.5rem;
  padding-block: 1rem;
}

.identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.85rem;
}

.calendar-mark {
  display: grid;
  flex: 0 0 auto;
  width: 2.8rem;
  height: 2.8rem;
  grid-template-columns: repeat(2, 0.45rem);
  place-content: center;
  gap: 0.28rem;
  border: 2px solid var(--gold-400);
  border-radius: 0.8rem;
  background: var(--navy-900);
}

.calendar-mark span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 0.12rem;
  background: var(--paper);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
}

.eyebrow.gold {
  color: var(--gold-700);
}

.school-name {
  max-width: 34rem;
  margin: 0.2rem 0 0;
  color: var(--navy-950);
  font-size: clamp(0.86rem, 1.8vw, 1rem);
  font-weight: 760;
  line-height: 1.25;
}

.download-link {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--navy-900);
  border-radius: 0.75rem;
  color: var(--navy-900);
  font-size: 0.85rem;
  font-weight: 780;
  text-align: center;
  text-decoration: none;
}

.download-link:hover {
  background: var(--blue-wash);
}

.download-link small {
  font-size: 0.77em;
  font-weight: 700;
}

.page-shell {
  padding-block: clamp(2.2rem, 6vw, 5.5rem);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 15ch;
  margin: 0.5rem 0 0;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 7vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.lede {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.rotation-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem 1.1rem;
  padding-bottom: 0.35rem;
  color: var(--navy-950);
  font-size: 0.84rem;
  font-weight: 780;
}

.rotation-key span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.week-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.week-one-dot {
  background: var(--navy-700);
}

.week-two-dot {
  background: var(--plum-800);
}

.today-card {
  margin-top: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.25rem, 4vw, 2.2rem);
  border: 1px solid rgb(16 47 83 / 18%);
  border-top: 0.4rem solid var(--gold-400);
  border-radius: 1.25rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.today-heading,
.fortnight-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
}

.today-heading h2,
.fortnight-heading h2 {
  margin: 0.25rem 0 0;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.08;
}

.date-chip {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--gold-700);
  font-size: 0.83rem;
  font-weight: 850;
}

.today-content {
  margin-top: 1.25rem;
}

.today-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.today-meta span {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgb(16 47 83 / 18%);
  border-radius: 999px;
  background: var(--blue-wash);
  color: var(--navy-950);
  font-size: 0.77rem;
  font-weight: 800;
}

.today-lessons,
.lessons {
  margin: 0;
  padding: 0;
  list-style: none;
}

.today-lessons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.today-lessons .lesson {
  grid-template-columns: 1fr;
  align-content: start;
  min-height: 8.6rem;
  padding: 0.9rem;
}

.today-lessons .lesson-time {
  margin-bottom: 0.55rem;
}

.term-note,
.enhancement-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.term-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.enhancement-note {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 0.8rem;
  background: var(--cream);
}

.timing-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 2.25rem 0 0;
  overflow: hidden;
  border: 1px solid var(--navy-900);
  border-radius: 0.9rem;
  background: var(--navy-900);
}

.timing-strip div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  background: var(--paper);
  color: var(--navy-950);
}

.timing-strip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timing-strip strong {
  white-space: nowrap;
}

.fortnight {
  margin-top: clamp(3rem, 8vw, 6.5rem);
}

.week-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 0.45rem;
  padding: 0.3rem;
  border: 1px solid rgb(16 47 83 / 18%);
  border-radius: 0.9rem;
  background: var(--paper);
}

.week-tabs[hidden] {
  display: none;
}

.week-tab {
  min-width: 6.7rem;
  min-height: 2.75rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--navy-950);
  cursor: pointer;
  font-weight: 850;
}

.week-tab::after {
  display: block;
  width: 1.8rem;
  height: 0.2rem;
  margin: 0.3rem auto 0;
  border-radius: 99px;
  background: transparent;
  content: "";
}

.week-tab-one[aria-selected="true"] {
  background: var(--blue-wash);
}

.week-tab-one[aria-selected="true"]::after {
  background: var(--navy-700);
}

.week-tab-two[aria-selected="true"] {
  background: var(--plum-100);
}

.week-tab-two[aria-selected="true"]::after {
  background: var(--plum-800);
}

.week-panels {
  margin-top: 1.5rem;
}

.week-panel + .week-panel {
  margin-top: 3rem;
}

.week-panel[hidden] {
  display: none;
}

.week-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.week-heading::before {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--navy-700);
  content: "";
}

.week-panel[data-week="1"] .week-heading::before {
  background: var(--plum-800);
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.day-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(16 47 83 / 15%);
  border-radius: 1rem;
  background: var(--paper);
}

.day-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.day-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--navy-900);
  color: white;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.week-panel[data-week="1"] .day-title {
  background: var(--plum-800);
}

.day-title small {
  opacity: 0.86;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lesson {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(6.3rem, 0.72fr) minmax(0, 1.7fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.72rem 1rem;
}

.lesson + .lesson {
  border-top: 1px solid var(--line);
}

.lesson-time {
  color: var(--navy-700);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  white-space: nowrap;
}

.week-panel[data-week="1"] .lesson-time {
  color: var(--plum-800);
}

.lesson-body {
  min-width: 0;
}

.lesson-subject {
  display: block;
  color: var(--navy-950);
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.25;
}

.lesson-detail {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.2rem 0.55rem;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.room {
  flex: 0 0 auto;
  color: var(--gold-700);
  font-weight: 820;
}

.teacher {
  min-width: 0;
}

.site-footer {
  margin-top: 1rem;
  border-top: 1px solid rgb(16 47 83 / 15%);
  background: var(--navy-950);
  color: white;
}

.footer-inner {
  min-height: 5.5rem;
  padding-block: 1.2rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.82rem;
}

.footer-inner p:last-child {
  opacity: 0.76;
  text-align: right;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 1.25rem, 44rem);
  }

  .header-inner,
  .intro,
  .today-heading,
  .fortnight-heading,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .header-inner {
    display: flex;
    gap: 0.85rem;
  }

  .download-link {
    width: 100%;
  }

  .intro {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .rotation-key {
    justify-content: flex-start;
  }

  .today-heading,
  .fortnight-heading {
    display: flex;
  }

  .date-chip {
    align-self: flex-start;
  }

  .today-lessons {
    grid-template-columns: 1fr;
  }

  .today-lessons .lesson {
    min-height: 0;
    grid-template-columns: minmax(6.2rem, 0.7fr) minmax(0, 1.5fr);
  }

  .week-tabs {
    width: 100%;
  }

  .week-tab {
    flex: 1 1 50%;
    min-width: 0;
  }

  .day-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .day-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .footer-inner {
    display: flex;
    gap: 0.4rem;
  }

  .footer-inner p:last-child {
    text-align: left;
  }
}

@media (max-width: 370px) {
  .shell {
    width: min(100% - 1rem, 44rem);
  }

  .identity {
    align-items: flex-start;
  }

  .calendar-mark {
    width: 2.5rem;
    height: 2.5rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .today-card {
    padding: 1rem;
  }

  .timing-strip {
    grid-template-columns: 1fr;
  }

  .lesson,
  .today-lessons .lesson {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .lesson-time {
    white-space: normal;
  }
}

@media print {
  body {
    background: white;
  }

  .site-header,
  .today-card,
  .term-note,
  .week-tabs,
  .site-footer {
    display: none !important;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .intro {
    display: block;
  }

  .rotation-key,
  .lede {
    display: none;
  }

  h1 {
    max-width: none;
    font-size: 2rem;
  }

  .fortnight {
    margin-top: 1.5rem;
  }

  .week-panel,
  .week-panel[hidden] {
    display: block !important;
    break-after: page;
  }

  .day-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
