/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/fraunces-normal-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/fraunces-normal-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cormorant-garamond-italic-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cormorant-garamond-italic-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-normal-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-normal-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-normal-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-normal-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =============================================================
   CoMPhy Lab QR catalogue. Generated by scripts/generate.py.
   Do not hand-edit: site/ is build output.
   Self-hosted faces are SIL OFL; see assets/fonts/OFL.txt.
   ============================================================= */

:root {
  color-scheme: light dark;

  /* ---------- Brand hues ---------- */
  --c-brand-purple: #68236d;
  /* Design-system hero stops, with stop 1 deepened from #ff6b6b so every
     stop clears 3:1 for large text on the paper (2.42 was below). */
  --hero-grad-1: #e2555b;
  --hero-grad-2: #68236d;
  --hero-grad-3: #4c6ef5;
  --hero-grad-4: #2d1b69;

  /* ---------- Interactive accent (the only one) ---------- */
  --c-accent-teal: #254c4a;
  --c-accent-teal-fg: #ffffff;
  --c-accent-teal-hover: #1d3c3a;

  /* ---------- Paper + ink ---------- */
  --c-paper: #f3efe8;
  --c-paper-tint: #ebe5da;
  --c-surface-strong: #fffdf9;
  --c-surface: var(--c-surface-strong);

  --fg-strong: #0f0c08;
  --fg-1: #1f1a15;
  --fg-2: #625648;
  --fg-3: #857867;

  --c-border: rgba(15, 12, 8, 0.09);
  --c-border-strong: rgba(15, 12, 8, 0.18);

  --grid-line: rgba(15, 12, 8, 0.035);
  --eyebrow-fg: #68236d;
  --code-bg: color-mix(in srgb, var(--c-brand-purple) 7%, transparent);
  --code-fg: var(--fg-strong);

  /* ---------- Typography ---------- */
  --t-display: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  --t-serif: 'Fraunces', 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --t-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --t-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --t-hero: clamp(36px, 4.5vw, 60px);
  --t-h1: clamp(28px, 3.4vw, 36px);
  --t-h2: clamp(22px, 2.6vw, 28px);
  --t-h3: 20px;
  --t-body-lg: 18px;
  --t-body: 16px;
  --t-small: 14px;
  --t-eyebrow: 12px;

  --t-track-tight: -0.01em;
  --t-track-wide: 0.08em;

  /* ---------- Spacing, radius, shadow ---------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 12, 8, 0.04), 0 1px 3px rgba(15, 12, 8, 0.06);
  --shadow-md: 0 4px 10px rgba(15, 12, 8, 0.06), 0 2px 4px rgba(15, 12, 8, 0.04);
  --shadow-soft: 0 12px 40px rgba(15, 12, 8, 0.06), 0 4px 12px rgba(15, 12, 8, 0.04);

  /* ---------- Layout + motion ---------- */
  --maxw-page: 1200px;
  --maxw-read: 68ch;
  --shell-pad: 14px;
  --tap: 44px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-fast: 160ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-paper: #12100d;
    --c-paper-tint: #1a1713;
    --c-surface-strong: #1c1915;

    --fg-strong: #f8f4ec;
    --fg-1: #e6dfd0;
    --fg-2: #9a8e7d;
    --fg-3: #6e6455;

    --c-border: rgba(248, 244, 236, 0.08);
    --c-border-strong: rgba(248, 244, 236, 0.16);

    --grid-line: rgba(248, 244, 236, 0.04);
    --eyebrow-fg: #c09bc4;
    /* Lift the two darkest hero stops on dark paper (1.85 and 1.33 otherwise). */
    --hero-grad-2: #c09bc4;
    --hero-grad-4: #9b8cf2;
    --code-bg: color-mix(in srgb, var(--c-brand-purple) 22%, transparent);
    --code-fg: #f1dcf4;

    --c-accent-teal: #6ac2bd;
    --c-accent-teal-fg: #0f1c1b;
    --c-accent-teal-hover: #88d2ce;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.45);
    --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

/* =============================================================
   Base
   ============================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  min-width: 20rem;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  overflow-x: clip;
  /* Column flow so the footer strip reaches the bottom of a short page. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  background: var(--c-paper);
  color: var(--fg-1);
  font-family: var(--t-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Soft grid overlay: the only decoration, and it never takes a click. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 3px solid var(--c-accent-teal);
  outline-offset: 3px;
}

strong { color: inherit; }

h1,
h2,
h3 {
  margin: 0;
  color: var(--fg-strong);
  font-family: var(--t-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }

code {
  padding: 0.08em 0.35em;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--code-fg);
  font-family: var(--t-mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0;
  color: var(--eyebrow-fg);
  font-family: var(--t-sans);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--t-track-wide);
  text-transform: uppercase;
}

.lede {
  margin: 0;
  max-width: var(--maxw-read);
  color: var(--fg-2);
  font-size: var(--t-body-lg);
  line-height: 1.55;
}

.quiet {
  color: var(--fg-2);
  list-style: none;
}

.shell {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--maxw-page);
  margin: 0 auto;
  padding: var(--s-6) var(--shell-pad) var(--s-8);
}

/* =============================================================
   Header
   ============================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--c-border);
  background: color-mix(in srgb, var(--c-paper) 86%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 var(--s-3);
  max-width: var(--maxw-page);
  margin: 0 auto;
  padding: var(--s-1) var(--shell-pad);
}

.brand {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  color: var(--fg-strong);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-pill);
  background: var(--c-accent-teal);
  color: var(--c-accent-teal-fg);
  font-family: var(--t-display);
  font-style: italic;
  font-size: var(--t-h3);
  line-height: 1;
}

.brand-name {
  font-family: var(--t-serif);
  font-weight: 600;
  font-size: var(--t-body-lg);
  letter-spacing: var(--t-track-tight);
}

.header-link {
  grid-column: -2;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s-1);
  color: var(--fg-2);
  font-size: var(--t-small);
  font-weight: 600;
}

.jump {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: var(--s-2);
  scrollbar-width: none;
}

.jump a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s-4);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  color: var(--fg-1);
  font-size: var(--t-small);
  font-weight: 600;
  white-space: nowrap;
}

/* =============================================================
   Index
   ============================================================= */

.hero {
  display: grid;
  gap: var(--s-3);
}

.hero-title {
  margin: 0;
  max-width: 26ch;
  font-family: var(--t-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--t-hero);
  line-height: 1.02;
  letter-spacing: -0.015em;
  background: linear-gradient(
    90deg,
    var(--hero-grad-1) 0%,
    var(--hero-grad-2) 45%,
    var(--hero-grad-3) 55%,
    var(--hero-grad-4) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Clipped gradient type has no forced-colours meaning; fall back to ink. */
@media (forced-colors: active) {
  .hero-title {
    background: none;
    -webkit-text-fill-color: CanvasText;
    color: CanvasText;
  }
}

.group { margin-top: var(--s-7); }

.group-head {
  display: grid;
  gap: var(--s-1);
  margin-bottom: var(--s-4);
}

.group-intro {
  margin: 0;
  max-width: var(--maxw-read);
  color: var(--fg-2);
  font-size: var(--t-small);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Flex column rather than grid so a short card still pins its action row to
   the bottom edge instead of leaving a void (audit M5). */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--c-border-strong);
}

.card h3 {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: var(--t-track-tight);
  overflow-wrap: anywhere;
}

.card-summary {
  margin: 0;
  color: var(--fg-2);
  font-size: var(--t-small);
  line-height: 1.5;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin-top: auto;
  padding-top: var(--s-2);
}

.link-group { margin-top: var(--s-5); }
.link-group h2 { font-size: var(--t-h3); }

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--s-5);
  padding: 0;
  margin: var(--s-5) 0 0;
  list-style: none;
}

.logo { min-width: 0; }
.logo h3 { font-size: var(--t-h3); }
.logo img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  padding: var(--s-4);
  margin-top: var(--s-3);
  background: #fff;
}

/* =============================================================
   Pills — the single interactive shape
   ============================================================= */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--s-4);
  border: 1px solid var(--c-accent-teal);
  border-radius: var(--r-pill);
  background: var(--c-accent-teal);
  color: var(--c-accent-teal-fg);
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.pill--secondary {
  border-color: var(--fg-3);
  background: var(--c-surface-strong);
  color: var(--fg-1);
}

/* Decorative; every external pill also carries an aria-label. */
.pill--external::after { content: " \2197"; }

/* =============================================================
   Detail page
   ============================================================= */

.detail {
  display: grid;
  gap: var(--s-5);
}

.detail-copy {
  display: grid;
  gap: var(--s-3);
  align-content: start;
}

.actions,
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.actions .pill { font-size: var(--t-body); }

.qr-panel {
  margin: 0;
  max-width: 14rem;
  padding: var(--s-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface-strong);
  box-shadow: var(--shadow-soft);
}

/* The quiet zone stays white in both themes so cameras can still read it. */
.qr-frame {
  padding: 12px;
  border-radius: var(--r-sm);
  background: #fff;
}

.qr-panel img {
  display: block;
  width: 100%;
  height: auto;
}

.qr-panel figcaption {
  margin-top: var(--s-3);
  color: var(--fg-2);
  font-size: var(--t-eyebrow);
  line-height: 1.6;
}

.stub {
  display: grid;
  gap: var(--s-3);
  /* The shell flexes to fill the viewport; keep the rows packed at the top
     instead of letting grid stretch them across the page. */
  align-content: start;
  justify-items: start;
  max-width: var(--maxw-read);
}

.stub p { margin: 0; }

/* =============================================================
   Footer
   ============================================================= */

.site-footer {
  position: relative;
  z-index: 1;
  flex: none;
  margin-top: var(--s-7);
  border-top: 1px solid var(--c-border);
  background: var(--c-paper-tint);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  max-width: var(--maxw-page);
  margin: 0 auto;
  padding: var(--s-4) var(--shell-pad);
}

.footer-mark {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--fg-strong);
  font-family: var(--t-serif);
  font-size: var(--t-small);
  font-weight: 600;
}

.footer-meta {
  margin: 0;
  color: var(--fg-2);
  font-family: var(--t-mono);
  font-size: 11px;
  line-height: 1.5;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =============================================================
   Interaction — hover only where a real pointer exists
   ============================================================= */

@media (hover: hover) and (pointer: fine) {
  .pill,
  .card,
  .jump a,
  .brand-name,
  .header-link,
  .footer-mark,
  .footer-link {
    transition:
      background var(--dur-fast) var(--ease),
      border-color var(--dur-fast) var(--ease),
      box-shadow var(--dur-fast) var(--ease),
      color var(--dur-fast) var(--ease);
  }

  .pill:hover {
    border-color: var(--c-accent-teal-hover);
    background: var(--c-accent-teal-hover);
  }

  .pill--secondary:hover {
    border-color: var(--c-accent-teal);
    background: var(--c-surface-strong);
    color: var(--c-accent-teal);
  }

  .card:hover,
  .card:focus-within {
    border-color: color-mix(in srgb, var(--c-accent-teal) 45%, var(--c-border-strong));
  }

  .jump a:hover {
    border-color: var(--c-accent-teal);
    color: var(--c-accent-teal);
  }

  .brand:hover .brand-name,
  .header-link:hover,
  .footer-mark:hover,
  .footer-link:hover { color: var(--c-accent-teal); }
}

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

/* =============================================================
   Responsive steps
   ============================================================= */

@media (min-width: 721px) {
  body::before { background-size: 32px 32px; }

  .header-inner {
    grid-template-columns: auto auto;
    gap: 0 var(--s-5);
    padding: var(--s-1) 28px;
  }

  .jump {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0;
  }

  .shell { padding-left: 28px; padding-right: 28px; }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-5);
    padding-left: 28px;
    padding-right: 28px;
  }

  .footer-meta { text-align: right; }
}

/* The QR panel only earns a column of its own once the copy keeps 16rem. */
@media (min-width: 900px) {
  .detail {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
    align-items: start;
    gap: var(--s-6);
  }

  .qr-panel { max-width: none; }
}

@media (min-width: 1100px) {
  .shell { padding-top: var(--s-7); }

  .group { margin-top: var(--s-8); }
}
