@font-face {
  font-family: Instrument;
  src: url('/display.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url('/body.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3f6fb;
  --surface: #fff;
  --ink: #18283b;
  --muted: #4b5e71;
  --line: #cbd6e4;
  --navy: #132337;
  --navy-accent: #304760;
  --amber: #ffba68;
  --amber-pale: #ffe3bd;
  --link: #204b79;
  --focus: #216eba;
  --radius: .9rem;
  --sans: Manrope, ui-sans-serif, system-ui, sans-serif;
  --serif: Instrument, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
::selection { color: var(--navy); background: var(--amber); }
a { color: var(--link); text-underline-offset: .2em; }
a, button, input, select { -webkit-tap-highlight-color: #204b7920; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { line-height: 1.05; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h3 { font-size: 1.1rem; line-height: 1.3; }
.shell { width: min(100% - 4.5rem, 75rem); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 4; top: .5rem; left: .5rem; padding: .65rem .9rem; background: white; border-radius: .4rem; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner, .footer-inner { display: flex; min-height: 4.5rem; justify-content: space-between; align-items: center; gap: .55rem 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 800; line-height: 1.3; text-decoration: none; min-height: 2.75rem; }
.brand-mark { display: inline-flex; flex: 0 0 auto; align-items: flex-end; gap: .16rem; padding: .45rem; width: 1.75rem; height: 1.75rem; background: var(--navy); border-radius: .32rem; }
.brand-mark i { width: .2rem; height: 42%; background: var(--amber); border-radius: .08rem; }
.brand-mark i:nth-child(2) { height: 100%; }
.brand-mark i:last-child { height: 66%; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .05rem 1.5rem; }
nav a { display: inline-flex; min-height: 2.75rem; align-items: center; color: var(--ink); font-weight: 700; font-size: .875rem; text-decoration: none; }
nav a:hover { text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .97fr); align-items: center; gap: clamp(1.7rem, 6vw, 6.5rem); padding-block: 4.55rem 4.65rem; }
.hero h1 { font-size: clamp(3.85rem, 6.8vw, 6rem); line-height: .91; letter-spacing: -.035em; }
.hero-copy > p { max-width: 34rem; color: var(--muted); margin-top: 1.45rem; font-size: 1.0625rem; }
.hero-actions, .export-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.button { display: inline-flex; min-height: 2.85rem; padding: .55rem .85rem; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: .48rem; font: 800 .875rem/1.4 var(--sans); text-decoration: none; cursor: pointer; text-align: center; }
.primary { color: var(--navy); background: var(--amber); border-color: #d79443; }
.primary:hover { background: #ffc984; }
.secondary { color: var(--ink); background: var(--surface); border-color: #a8b8cb; }
.secondary:hover { background: #eaf1fa; border-color: #6a85a0; }
.hero-copy .hero-note { margin-top: .9rem; font-size: .875rem; font-variant-numeric: tabular-nums; }

.year-map { background: var(--navy); color: #fff; padding: clamp(1rem, 2.6vw, 2rem); border-radius: var(--radius); align-self: stretch; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; justify-content: center; }
.map-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-bottom: 1rem; border-bottom: 1px solid #55708d; }
.map-header div { min-width: 0; }
.map-header strong, .map-header div span { display: block; }
.map-header strong { font-size: 1.45rem; font-weight: 800; line-height: 1.3; }
.map-header div span, .map-key { color: #b4c8df; font-size: .8125rem; }
#map-weeks { flex: 0 0 auto; background: var(--amber); color: var(--navy); border-radius: .3rem; padding: .28rem .52rem; font-size: .8125rem; font-weight: 800; }
.quarters { display: grid; gap: .65rem; margin: 1rem 0 .75rem; list-style: none; padding: 0; }
.quarter { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) 5.7rem; align-items: center; gap: .55rem; }
.quarter-name { font-size: .8125rem; color: #e0eafa; font-weight: 800; }
.quarter-periods { display: flex; gap: .18rem; min-width: 0; }
.period-block { display: flex; flex: var(--weeks) 1 0; min-width: 0; justify-content: space-between; align-items: center; gap: .18em; padding: .32rem .4rem; background: #304760; border-radius: .2rem; font-size: .8125rem; font-weight: 700; color: #f4f8ff; }
.period-block:nth-child(2) { background: var(--amber-pale); color: var(--navy); }
.quarter-dates { font-size: .75rem; color: #b4c8df; text-align: right; }
.map-key { margin-top: .16rem; }

.workspace { padding-block: 2rem 3.8rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.section-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1.3rem; }
.section-heading h2, .reading h2 { font-size: clamp(2.25rem, 4.5vw, 3.6rem); letter-spacing: -.025em; }
.section-heading p, .reading p { color: var(--muted); }
.workspace-grid { display: grid; grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.control-rail, .table-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.control-rail { display: grid; gap: 1rem; padding: 1.1rem; }
.control-group + .control-group { border-top: 1px solid var(--line); padding-top: 1rem; }
.field { display: grid; gap: .26rem; margin-top: .8rem; min-width: 0; }
.field label { font-size: .875rem; color: var(--ink); font-weight: 800; }
.field select, .field input { width: 100%; min-width: 0; max-width: 100%; min-height: 2.75rem; padding: .48rem .65rem; border: 1px solid #a8b8cb; border-radius: .42rem; background: var(--paper); color: var(--ink); font: 600 1rem/1.35 var(--sans); }
.field select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 49%, var(--ink) 51%), linear-gradient(135deg, var(--ink) 49%, transparent 51%); background-position: right 1.03rem center, right .75rem center; background-size: .3rem .3rem; background-repeat: no-repeat; }
.field-note, .helper-link { font-size: .875rem; color: var(--muted); }
.control-group .field-note { margin-top: .4rem; }
.helper-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--link); font-weight: 700; }
.export-actions, #lookup-form button { margin-top: .75rem; }
.lookup-result { overflow-wrap: anywhere; color: var(--ink); font-size: .875rem; }
.lookup-result:not(:empty) { background: var(--paper); border-radius: .42rem; padding: .65rem .7rem; margin-top: .75rem; }
.lookup-result > * { display: block; }
.table-panel { min-width: 0; padding: 1.1rem; }
.table-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: end; gap: .65rem 1rem; }
.comparison-field { margin: 0; flex: 0 1 13rem; }
#comparison-note { margin-block: .6rem .75rem; }
.table-scroll { max-height: 29rem; overflow: auto; border: 1px solid var(--line); border-radius: .45rem; scrollbar-color: #9caec4 var(--paper); }
table { table-layout: fixed; border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; text-align: left; }
th, td { border-bottom: 1px solid #e1e8f0; padding: .55rem .65rem; line-height: 1.45; }
thead th { position: sticky; top: 0; background: #e5edf7; font-weight: 800; }
tbody th { font-weight: 800; }
tbody tr:nth-child(even) { background: #f6f8fc; }
tbody .period-start > * { border-top: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
#retail-weeks thead th:nth-child(1) { width: 14%; }
#retail-weeks thead th:nth-child(2) { width: 32%; }
#retail-weeks thead th:nth-child(3) { width: 23%; }
.cell-detail { color: var(--muted); }

.reading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; border-top: 1px solid var(--line); padding-block: 2.3rem 3.8rem; }
.reading p { margin-top: .6rem; max-width: 43ch; }
.reading-links { display: grid; gap: .6rem; }
.reading-links a { display: grid; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); padding: .45rem .1rem .65rem; }
.reading-links a:hover strong { text-decoration: underline; }
.reading-links a span, .footer p { color: var(--muted); font-size: .875rem; }
.footer { border-top: 1px solid var(--line); padding-block: .85rem 1.3rem; }

.article { max-width: 53rem; padding-block: clamp(2.2rem, 6vw, 5rem); }
.article h1 { max-width: 19ch; font-size: clamp(3rem, 7vw, 5.65rem); letter-spacing: -.03em; }
.article-lead { max-width: 62ch; color: var(--muted); font-size: 1.125rem; margin-top: 1rem; }
.article-body { border-top: 1px solid var(--line); margin-top: 1.8rem; padding-top: .25rem; overflow-wrap: anywhere; }
.article-body h2 { margin: 1.6rem 0 .65rem; font-size: clamp(1.85rem, 4.5vw, 2.7rem); }
.article-body p, .article-body ol, .article-body ul { margin: .6rem 0; max-width: 70ch; }
.article-body li + li { margin-top: .38rem; }
.article-body table { margin-block: .9rem; background: white; }

@media (max-width: 63rem) {
  .hero { gap: 2rem; }
  .quarter { grid-template-columns: 1.65rem minmax(0, 1fr); gap: .35rem .55rem; }
  .quarter-dates { grid-column: 2; text-align: left; }
  #retail-weeks td .cell-detail { display: block; }
}

@media (max-width: 48rem) {
  .shell { width: min(100% - 2rem, 75rem); }
  .hero { padding-block: 3.1rem 2.5rem; }
  .workspace-grid { grid-template-columns: 1fr; }
  .control-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-group + .control-group { border-top: 0; border-left: 1px solid var(--line); padding-top: 0; padding-left: 1rem; }
  .table-scroll { max-height: 26rem; }
}

@media (max-width: 40rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; padding-block: 2.2rem; }
  .hero h1 { font-size: clamp(3.55rem, 13vw, 5rem); }
  .hero-copy > p { margin-top: 1rem; }
  .hero-actions { margin-top: 1.05rem; }
  .quarter { grid-template-columns: 1.55rem minmax(0, 1fr) 5.45rem; gap: .45rem; }
  .quarter-dates { grid-column: auto; text-align: right; }
  .workspace { padding-block: 1.45rem 2.1rem; }
  .masthead-inner, .footer-inner { align-items: start; flex-direction: column; padding-block: .25rem; gap: 0; }
  nav { gap: .05rem 1.15rem; }
  .reading { grid-template-columns: 1fr; padding-block: 1.65rem 2.1rem; gap: .65rem; }
}

@media (max-width: 32rem) {
  .control-rail { grid-template-columns: 1fr; }
  .control-group + .control-group { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 1rem; }
  .table-panel { padding: .75rem; }
  #retail-weeks { font-size: .875rem; }
  #retail-weeks th, #retail-weeks td { padding: .42rem .28rem; overflow-wrap: anywhere; }
  .quarter { grid-template-columns: 1.55rem minmax(0, 1fr); }
  .quarter-dates { grid-column: 2; text-align: left; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .reading-links a { transition: background-color .18s ease-out, border-color .18s ease-out; }
}
