/* Shared styling for the comparison and licence pages.
 *
 * The landing (index.html) carries its own ~1200-line inline stylesheet built
 * around one bespoke layout. These pages are plain prose + a table, so they get
 * a small shared sheet instead of a tenth copy of that. Same tokens, same
 * fonts, so they read as the same site.
 *
 * Contrast note carried over from the landing: --sky-600 fails AA at small text
 * sizes on every surface here. Small text uses --sky-ink. Do not swap them.
 */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #0a0e14;
  --ink-2: #39424e;
  --ink-3: #5c656f;
  --paper: #fbfaf6;
  --line: rgba(10, 14, 20, .09);
  --sky-600: #0284c7;
  --sky-ink: #0369a1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: 'Geist', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ---- top bar ---------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.top a { color: var(--ink-2); text-decoration: none; }
.top a:hover { color: var(--sky-ink); }
.home { font-weight: 650; color: var(--ink) !important; letter-spacing: -.01em; }
/* #1217 replaced the landing's two-button toggle with a menu, on the grounds
 * that a control needing a redesign per shipped language is the wrong shape.
 * These are text pages with a sparse top bar rather than a tight nav pill, so
 * they do not need the menu — but they must not overflow either. Wrapping is
 * what makes seven languages a second row instead of a horizontal scrollbar. */
.lang { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
/* 44px minimum touch target — the label is small, the hit area is not. */
.lang a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: .04em;
}
.lang a[aria-current] { color: var(--ink); font-weight: 650; }

/* ---- prose ------------------------------------------------------------ */

h1 {
  color: var(--ink);
  font-size: clamp(30px, 5.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -.028em;
  font-weight: 600;
  margin: 52px 0 0;
}
h1 em {
  font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-weight: 400;
}
.thesis {
  color: var(--ink);
  font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.5;
  margin: 20px 0 0;
}
h2 {
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -.015em;
  font-weight: 650;
  margin: 52px 0 0;
}
p { margin: 16px 0 0; }
a { color: var(--sky-ink); }
a:focus-visible,
.lang a:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--sky-600);
  outline-offset: 3px;
  border-radius: 4px;
}
strong { color: var(--ink); font-weight: 650; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: rgba(10, 14, 20, .05);
  padding: .1em .34em;
  border-radius: 4px;
}

/* ---- table ------------------------------------------------------------ */

.scroll { overflow-x: auto; margin: 28px 0 0; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
thead th {
  color: var(--ink);
  font-weight: 650;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-bottom-color: rgba(10, 14, 20, .18);
}
tbody th { color: var(--ink-3); font-weight: 500; width: 27%; }
td.us { color: var(--ink); background: rgba(2, 132, 199, .045); }

/* ---- callout ---------------------------------------------------------- */

.note {
  margin: 40px 0 0;
  padding: 18px 20px;
  border-left: 2px solid var(--sky-600);
  background: rgba(2, 132, 199, .04);
  font-size: 15.5px;
}
.note p:first-child { margin-top: 0; }

/* ---- cta + footer ----------------------------------------------------- */

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 32px 0 0;
  padding: 0 22px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}
.cta:hover { background: #16202c; }

footer {
  margin: 72px 0 0;
  padding: 24px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
}
footer a { color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
