/* ==========================================================================
   IdealFace — legal site
   Calm, editorial, paper-like. One restrained gold accent.
   Fonts are self-hosted (SIL Open Font License): no third-party requests.
   ========================================================================== */

/* ---------- Fonts ---------- */

/* Cormorant Garamond — wordmark & headings */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-garamond-vietnamese-500-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-ext-500-normal.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;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-500-normal.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;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-vietnamese-600-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-ext-600-normal.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;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-600-normal.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;
}

/* Be Vietnam Pro — body text (full Vietnamese coverage) */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-vietnamese-400-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-ext-400-normal.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;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-400-normal.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;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-vietnamese-400-italic.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-ext-400-italic.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;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-400-italic.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;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-vietnamese-500-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-ext-500-normal.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;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-500-normal.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;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-vietnamese-600-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-ext-600-normal.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;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-600-normal.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;
}

/* ---------- Tokens ---------- */

/* Hanken Grotesk (OFL) for the homepage body text. */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/hanken-grotesk-vietnamese-300-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/hanken-grotesk-vietnamese-500-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/hanken-grotesk-vietnamese-600-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/hanken-grotesk-latin-ext-300-normal.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; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/hanken-grotesk-latin-ext-500-normal.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; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/hanken-grotesk-latin-ext-600-normal.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; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/hanken-grotesk-latin-300-normal.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; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/hanken-grotesk-latin-500-normal.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; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/hanken-grotesk-latin-600-normal.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; }

:root {
  color-scheme: light;

  --paper: #f5f0e7;          /* page */
  --surface: #fffdf9;        /* cards */
  --surface-tint: #f8f2e8;   /* inset surfaces inside cards */
  --ink: #1e1a16;            /* headings, emphasis */
  --text: #3a332c;           /* body copy */
  --muted: #6f655a;          /* metadata, labels */
  --hairline: rgba(30, 26, 22, 0.085);
  --gold: #a8843f;           /* the single accent — used sparingly */
  --gold-soft: rgba(168, 132, 63, 0.45);
  --gold-wash: rgba(168, 132, 63, 0.16);

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Hanken Grotesk", "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;

  --shadow-card:
    0 1px 2px rgba(58, 44, 26, 0.04),
    0 4px 12px -4px rgba(58, 44, 26, 0.05),
    0 22px 48px -24px rgba(58, 44, 26, 0.16);
  --shadow-card-hover:
    0 1px 2px rgba(58, 44, 26, 0.05),
    0 8px 18px -6px rgba(58, 44, 26, 0.07),
    0 30px 60px -26px rgba(58, 44, 26, 0.22);

  --column: 680px;
  --gutter: clamp(16px, 4.5vw, 28px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --rule: rgba(30, 26, 22, 0.14);
  --rule-soft: rgba(30, 26, 22, 0.08);
  --rule-strong: rgba(30, 26, 22, 0.3);
}

/* Dark: the same warm palette turned over, not a cold grey. Chosen with the toggle or the system setting. */
html[data-theme="dark"] {
  color-scheme: dark;

  --paper: #14110d;
  --surface: #1d1914;
  --surface-tint: #26211a;
  --ink: #f3ede2;
  --text: #d6cdbf;
  --muted: #bdb2a3;
  --hairline: rgba(243, 237, 226, 0.1);
  --gold: #c9a35a;
  --gold-soft: rgba(201, 163, 90, 0.5);
  --gold-wash: rgba(201, 163, 90, 0.2);

  --shadow-card:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 4px 12px -4px rgba(0, 0, 0, 0.35),
    0 22px 48px -24px rgba(0, 0, 0, 0.6);
  --shadow-card-hover:
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 8px 18px -6px rgba(0, 0, 0, 0.4),
    0 30px 60px -26px rgba(0, 0, 0, 0.7);

  --rule: rgba(243, 237, 226, 0.18);
  --rule-soft: rgba(243, 237, 226, 0.1);
  --rule-strong: rgba(243, 237, 226, 0.4);
}

/* Theme switch: a sun or moon, shown for the mode you would switch to. */
.theme-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.theme-btn:hover { color: var(--ink); background: var(--surface-tint); }
.theme-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme-btn svg { display: block; width: 20px; height: 20px; }
.theme-btn .i-sun { display: none; }
html[data-theme="dark"] .theme-btn .i-sun { display: block; }
html[data-theme="dark"] .theme-btn .i-moon { display: none; }
.masthead { position: relative; }
.masthead > .theme-btn { position: absolute; right: var(--gutter); top: calc(env(safe-area-inset-top, 0px) + clamp(22px, 6vw, 42px)); }

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
@media (min-width: 720px) {
  body { font-size: 16.5px; }
}

::selection { background: var(--gold-wash); color: var(--ink); }

strong, b { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--gold-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.25s var(--ease), color 0.25s var(--ease);
}
a:hover { text-decoration-color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Masthead ---------- */

.masthead {
  padding: calc(env(safe-area-inset-top, 0px) + clamp(28px, 7vw, 48px)) var(--gutter) 0;
  text-align: center;
}

.wordmark {
  display: inline-block;
  font-family: var(--serif);
  font-variant-numeric: lining-nums;
  font-weight: 500;
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0.015em;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 4px;
}
.wordmark span { color: inherit; }
a.wordmark:hover { color: var(--ink); }

/* ---------- Page column ---------- */

.wrap {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(36px, 9vw, 64px) var(--gutter) 0;
}

/* Small uppercase label — used for metadata and section labels */
.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.date,
.back {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

/* ---------- Document page ---------- */

.doc-head {
  text-align: center;
  padding: 0 4px;
  margin-bottom: clamp(32px, 8vw, 48px);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  padding: 4px 6px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.back:hover { color: var(--ink); }
.back .icon {
  display: inline-grid;
  place-items: center;
  color: currentColor;
  transition: transform 0.3s var(--ease);
}
.back:hover .icon { transform: translateX(-2px); }
.back svg { display: block; width: 14px; height: 14px; }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-variant-numeric: lining-nums;
  font-weight: 500;
  font-size: clamp(38px, 10.5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}

.date {
  margin: 16px 0 0;
}
/* A sentence rather than a date: keep it in sentence case */
.date--note {
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  text-transform: none;
  text-wrap: balance;
}

/* The document "sheet" */
.sheet {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(26px, 6.5vw, 56px) clamp(22px, 6vw, 60px) clamp(30px, 7vw, 60px);
}

.sheet > :first-child { margin-top: 0; }
.sheet > :last-child { margin-bottom: 0; }

.sheet p,
.sheet li { margin: 0 0 1em; }
.sheet li { margin-bottom: 0.55em; }
.sheet li:last-child { margin-bottom: 0; }

.sheet ul,
.sheet ol {
  margin: 0 0 1.15em;
  padding-left: 1.25em;
}
.sheet li { padding-left: 0.3em; }
.sheet ul li::marker { color: var(--gold); }
.sheet ol li::marker {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92em;
}

.sheet h2 {
  margin: 2.4em 0 0.6em;
  font-family: var(--serif);
  font-variant-numeric: lining-nums;
  font-weight: 600;
  font-size: clamp(25px, 6.4vw, 29px);
  line-height: 1.18;
  letter-spacing: -0.003em;
  color: var(--ink);
  text-wrap: balance;
  scroll-margin-top: 24px;
}

.sheet h3 {
  margin: 1.9em 0 0.5em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1em;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--ink);
}
.sheet h2 + h3 { margin-top: 1.1em; }

.sheet a { overflow-wrap: anywhere; }

/* Highlighted passage */
.callout {
  position: relative;
  margin: 1.5em 0;
  margin-left: -6px;
  margin-right: -6px;
  padding: 20px 20px 21px;
  background: var(--surface-tint);
  border-radius: var(--radius-md);
  color: var(--text);
}
@media (min-width: 720px) {
  .callout { margin-left: 0; margin-right: 0; padding: 26px 30px 28px; }
}

/* ---------- Tables ---------- */

.table-wrap {
  margin: 1.4em 0 1.6em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
  line-height: 1.6;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  vertical-align: top;
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.table-wrap th:last-child,
.table-wrap td:last-child { padding-right: 0; }

.table-wrap th {
  padding-top: 0;
  padding-bottom: 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.table-wrap td:first-child {
  font-weight: 500;
  color: var(--ink);
}
.table-wrap tr:last-child td { border-bottom: 0; }

/* Phones: each row becomes a quiet stacked entry */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; }
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td { display: block; width: 100%; }
  .table-wrap table { font-size: 0.94em; }
  .table-wrap tr.head { display: none; }

  .table-wrap tr {
    padding: 18px 0;
    border-top: 1px solid var(--hairline);
  }
  .table-wrap tr.head + tr { border-top: 0; padding-top: 4px; }
  .table-wrap tr:last-child { padding-bottom: 0; }

  .table-wrap td {
    padding: 0;
    border: 0;
  }
  .table-wrap td + td { margin-top: 10px; }
  .table-wrap td:first-child { font-size: 1.04em; }

  .table-wrap td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  /* First cell reads as the entry's title; two-column tables need no labels */
  .table-wrap td:first-child::before,
  .table-wrap table.cols-2 td::before { display: none; }
  .table-wrap table.cols-2 td + td { margin-top: 4px; }
}

/* ---------- Index page ---------- */

.index-head {
  text-align: center;
  margin-bottom: clamp(30px, 8vw, 46px);
}

.entries {
  display: grid;
  gap: 14px;
  counter-reset: entry;
}

a.card {
  counter-increment: entry;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "num   arrow"
    "title arrow"
    "sub   arrow";
  column-gap: 18px;
  align-items: center;
  padding: 22px 22px 24px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
a.card::before {
  grid-area: num;
  content: counter(entry, decimal-leading-zero);
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
a.card b {
  grid-area: title;
  display: block;
  font-family: var(--serif);
  font-variant-numeric: lining-nums;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.003em;
  color: var(--ink);
}
a.card small {
  grid-area: sub;
  display: block;
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
a.card .arrow {
  grid-area: arrow;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-tint);
  color: var(--ink);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}
a.card .arrow svg { display: block; }

@media (hover: hover) {
  a.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
  }
  a.card:hover .arrow {
    background: var(--gold);
    color: var(--surface);
    transform: translateX(2px);
  }
}
a.card:active { transform: translateY(0); }
a.card:focus-visible { outline-offset: 4px; border-radius: var(--radius-lg); }

@media (min-width: 720px) {
  .entries { gap: 16px; }
  a.card { padding: 28px 30px 30px 34px; column-gap: 28px; }
  a.card b { font-size: 28px; }
  a.card small { font-size: 15px; }
}

/* ---------- Footer ---------- */

.site-footer {
  margin: clamp(44px, 11vw, 72px) 0 0;
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + clamp(36px, 9vw, 56px));
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
}
.site-footer nav a {
  text-decoration: none;
  white-space: nowrap;
  padding: 2px 0;
}
@media (min-width: 600px) {
  .site-footer nav { gap: 6px 0; }
  .site-footer nav a + a::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 12px;
    border-radius: 50%;
    background: var(--gold);
    vertical-align: 0.25em;
  }
}

/* ---------- Continuous ("squircle") corners where supported ---------- */

@supports (corner-shape: squircle) {
  .sheet, a.card { corner-shape: squircle; border-radius: 44px; }
  .callout { corner-shape: squircle; border-radius: 32px; }
}

/* ---------- Print ---------- */

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .masthead, .back, .site-footer { display: none; }
  .wrap { padding: 0; max-width: none; }
  .sheet, a.card { box-shadow: none; padding: 0; background: none; }
  .callout { background: none; border: 1px solid #ccc; }
  a { color: #000; }
}
