/* termtime.ae — design tokens.
 *
 * From the Claude Design canvas (Termtime.dc.html). The palette, type and
 * radii below are the design's own values, named here so the rest of the
 * stylesheets never repeat a hex.
 *
 * Archivo and JetBrains Mono are self-hosted VARIABLE fonts — one file each,
 * covering every weight the design uses. Both are SIL OFL. Self-hosted rather
 * than loaded from Google: no third party in the critical path, nothing to
 * explain in a privacy policy, and no risk of reviewing a fallback face by
 * accident (which is exactly what happened on the first build).
 */

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/Archivo.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── Ground ─────────────────────────────────────────────────────── */
  --paper:      #faf8f3;   /* the page */
  --paper-2:    #f2efe6;   /* control bar, footer */
  --paper-3:    #f7f6f2;   /* out-of-year cells, hover */
  --card:       #ffffff;

  /* ── Ink ────────────────────────────────────────────────────────── */
  --ink:        #101418;   /* 15.9:1 on paper */
  --ink-2:      #4a5058;   /* body copy in panels */
  --ink-3:      #5d6670;   /* secondary — 5.5:1 on paper */
  --ink-4:      #706b60;   /* labels, hints, mono column headings — 4.6:1 on paper-2 */
  /* --ink-5 is deliberately absent. The canvas had a fifth, lighter step, but
     no colour that reads as a step below --ink-4 clears 4.5:1 on the darkest
     ground it sits on. Everything the canvas painted --ink-5 uses --ink-4. */
  --ink-5:      var(--ink-4);

  /* ── Rules ──────────────────────────────────────────────────────── */
  --line:       #e4e0d5;
  --line-2:     #efece3;   /* inside cards */
  --line-3:     #ddd8ca;   /* unselected chips */

  /* ── Accent ─────────────────────────────────────────────────────── */
  --teal:       #0f5f66;   /* links, active toggles — 6.4:1 on paper */
  --teal-deep:  #0f2f33;   /* the dark "Next up" panel */
  --teal-pale:  #e6f2f1;
  --teal-text:  #7fb3ac;   /* on --teal-deep only */
  --teal-text-2:#a9c4c0;
  --pink:       #cb246a;   /* the pastoral layer, and link hover — 4.6:1 on paper-2 */
  --pink-wash:  #fdf3f7;
  --pink-line:  #f0dbe4;

  /* ── Week states ────────────────────────────────────────────────── */
  /* Each pairs a fill with a border and a text tone. Colour is never the only
     signal: every cell also carries a word, and the flags row adds a glyph. */
  --w-out-bg:      #f7f6f2;  --w-out-bd:      #e2ded2;  --w-out-fg:      #746f66;
  --w-teach-bg:    #ffffff;  --w-teach-bd:    #e4e0d5;  --w-teach-fg:    #5d6670;
  --w-break-bg:    #e7eaf9;  --w-break-bd:    #b3bbea;  --w-break-fg:    #4a52a8;
  --w-holiday-bg:  #fdf2da;  --w-holiday-bd:  #e6c574;  --w-holiday-fg:  #8a6410;
  --w-ramadan-bg:  #f0e9f8;  --w-ramadan-bd:  #c2ade0;  --w-ramadan-fg:  #6b4d99;
  --w-exam-bg:     #eaf4ee;  --w-exam-bd:     #a8ceb8;  --w-exam-fg:     #1f6b47;

  /* ── Type ───────────────────────────────────────────────────────── */
  --font: Archivo, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Metrics ────────────────────────────────────────────────────── */
  --shell:   1440px;
  --pad:     32px;
  --pad-sm:  18px;
  --r-sm:    5px;
  --r:       6px;
  --r-md:    10px;
  --r-lg:    12px;
  --r-pill:  20px;
  --head-h:  57px;   /* the sticky header; the control bar sticks below it */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--pink); }
button { font-family: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: #ffe08a; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Fixed rather than absolute, and above everything. The header is sticky with
   a backdrop-filter, which makes it a stacking context painted over anything
   that merely shares its space — so a skip link at the top of the document
   landed underneath the very chrome it exists to skip (WCAG 2.2 2.4.11). */
.skip-link {
  position: fixed; left: -9999px; top: 0; z-index: 200;
  background: var(--card); color: var(--teal);
  padding: 12px 16px; font-weight: 600;
  border: 1px solid var(--ink); border-radius: 0 0 var(--r) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.shell { max-width: var(--shell); margin: 0 auto; padding-inline: var(--pad); }
@media (max-width: 720px) { :root { --pad: 18px; } }
