/* ==========================================================================
   GenderLens — base layer
   Tokens, reset, typography, layout, navigation, footer, controls.
   Page-specific modules live in pages.css.
   ========================================================================== */

/* ---------- Fonts (self-hosted variable subsets) ---------- */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("../fonts/newsreader-normal-200-700-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;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("../fonts/newsreader-normal-200-700-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;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 700;
  font-display: swap;
  src: url("../fonts/newsreader-italic-200-700-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;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 700;
  font-display: swap;
  src: url("../fonts/newsreader-italic-200-700-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;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/google-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;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/google-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;
}
@font-face {
  font-family: "Google Sans";
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/google-sans-italic-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;
}
@font-face {
  font-family: "Google Sans";
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/google-sans-italic-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;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/google-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;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/google-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;
}
@font-face {
  font-family: "Google Sans";
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/google-sans-italic-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;
}
@font-face {
  font-family: "Google Sans";
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/google-sans-italic-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;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --paper: #f7f2e9;
  --paper-2: #efe7d9;
  --paper-3: #e7ddcb;
  --surface: #fdfaf4;
  --ink: #1a1620;
  --ink-2: #3e3648;
  --muted: #675e72;
  --line: #d9cebc;
  --line-strong: #bbae99;

  --indigo: #332e7e;
  --indigo-deep: #26225f;
  --indigo-soft: #e5e2f4;
  --indigo-ink: #fbf7f0;

  --gold: #7d5a19;
  --gold-soft: #f2e6cd;

  --ok: #1f6b48;
  --ok-bg: #e2efe5;
  --bad: #93362f;
  --bad-bg: #f3e1dd;
  --info: #2f4a6d;
  --info-bg: #e3e9f1;

  --focus: #1f1a66;
  --shadow: 0 1px 2px rgba(26, 22, 32, 0.06), 0 12px 32px -18px rgba(26, 22, 32, 0.35);

  --font-display: "Google Sans", "Product Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-reading: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Google Sans", "Product Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: 1.4375rem;
  --step-3: 1.75rem;
  --step-4: clamp(2rem, 1.35rem + 2.1vw, 2.875rem);
  --step-5: clamp(2.5rem, 1.35rem + 3.9vw, 4.25rem);
  --step-6: clamp(2.9rem, 1.2rem + 6.2vw, 6rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 68ch;
  --radius: 4px;
  --radius-lg: 10px;

  --space-1: 0.5rem;
  --space-2: 0.875rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;
  --space-6: clamp(4rem, 8vw, 7.5rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 240ms;
}

[data-theme="dark"] {
  color-scheme: dark;

  --paper: #121016;
  --paper-2: #1b1822;
  --paper-3: #24202e;
  --surface: #17141d;
  --ink: #f4eee4;
  --ink-2: #d6cdbf;
  --muted: #aca3b5;
  --line: #322d3c;
  --line-strong: #4a4357;

  --indigo: #b7b0f4;
  --indigo-deep: #6f66d6;
  --indigo-soft: #221f37;
  --indigo-ink: #16121f;

  --gold: #d9b26a;
  --gold-soft: #2c2416;

  --ok: #8fd3b0;
  --ok-bg: #17332a;
  --bad: #f0a69e;
  --bad-bg: #3a1e1c;
  --info: #a9bfe0;
  --info-bg: #1a2433;

  --focus: #cfc8ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px -24px rgba(0, 0, 0, 0.9);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img,
svg,
video {
  max-width: 100%;
  height: auto;
}
img {
  display: block;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--indigo);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
a:hover {
  color: var(--indigo-deep);
  text-decoration-thickness: 2px;
}
::selection {
  background: var(--indigo);
  color: var(--indigo-ink);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-5) 0;
}

/* Paragraph rhythm is owned by the prose modules. */
p,
ul,
ol,
dl,
blockquote {
  margin: 0 0 1em;
}
p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}
ul,
ol {
  padding-left: 1.15em;
}
li + li {
  margin-top: 0.35em;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: var(--step-6);
}
h2 {
  font-size: var(--step-5);
}
h3 {
  font-size: var(--step-3);
  line-height: 1.15;
}
h4 {
  font-size: var(--step-2);
  line-height: 1.2;
}
strong,
b {
  font-weight: 600;
}
em {
  font-style: italic;
}

/* ---------- Utilities ---------- */
.wrap {
  width: min(100% - 2 * var(--gutter), 78rem);
  margin-inline: auto;
}
.wrap-narrow {
  width: min(100% - 2 * var(--gutter), 52rem);
  margin-inline: auto;
}
.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;
}
.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-200%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: var(--step--1);
  transition: transform 160ms var(--ease);
}
.skip:focus-visible {
  transform: translateY(0);
  color: var(--paper);
  outline-color: var(--paper);
}
.stack > * + * {
  margin-top: var(--space-3);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-5 {
  margin-top: var(--space-5);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: var(--step--1);
  line-height: 1.5;
}
.sans {
  font-family: var(--font-sans);
}
.serif {
  font-family: var(--font-display);
}
.center {
  text-align: center;
}
.nowrap {
  white-space: nowrap;
}
.tnum {
  font-variant-numeric: tabular-nums;
}
[hidden] {
  display: none !important;
}

/* Small caps-style label used for metadata, never as a decorative kicker. */
.label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Layout ---------- */
main {
  display: block;
}
.section {
  padding-block: var(--space-6);
}
.section--tight {
  padding-block: var(--space-5);
}
.section--rule {
  border-top: 1px solid var(--line);
}
.section--paper2 {
  background: var(--paper-2);
}
.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.section--ink a {
  color: var(--paper);
}
[data-theme="dark"] .section--ink {
  background: var(--paper-2);
  color: var(--ink);
}
[data-theme="dark"] .section--ink a {
  color: var(--indigo);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
}
.grid > * {
  min-width: 0;
}
.col-4 {
  grid-column: span 4;
}
.col-5 {
  grid-column: span 5;
}
.col-6 {
  grid-column: span 6;
}
.col-7 {
  grid-column: span 7;
}
.col-8 {
  grid-column: span 8;
}
.col-12 {
  grid-column: span 12;
}

/* Editorial page header */
.page-head {
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.page-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.page-head h1 {
  max-width: 18ch;
}
.page-head__lede {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}
.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: var(--space-4);
  color: var(--muted);
}

.prose {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.68;
  max-width: var(--measure);
  text-wrap: pretty;
}
.prose p + p {
  margin-top: 1em;
}
.prose--sans {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
}

.lead {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}

/* ---------- Buttons & controls ---------- */
.btn {
  --btn-bg: var(--indigo);
  --btn-ink: var(--indigo-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border: 1px solid var(--btn-bg);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  transition: transform 160ms var(--ease), background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover {
  background: var(--indigo-deep);
  border-color: var(--indigo-deep);
  color: var(--indigo-ink);
}
[data-theme="dark"] .btn:hover {
  background: #cfc8ff;
  border-color: #cfc8ff;
  color: #16121f;
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  --btn-bg: var(--paper-2);
  --btn-ink: var(--ink);
  border-color: var(--ink);
}
[data-theme="dark"] .btn--ghost:hover {
  background: var(--paper-3);
  color: var(--ink);
}
.btn--light {
  --btn-bg: var(--paper);
  --btn-ink: var(--ink);
  border-color: var(--paper);
}
.btn--light:hover {
  --btn-bg: var(--paper-3);
  border-color: var(--paper-3);
  color: var(--ink);
}
.btn--sm {
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.15rem;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.text-link svg {
  width: 16px;
  height: 16px;
  transition: transform 220ms var(--ease);
}
.text-link:hover {
  color: var(--indigo);
  border-color: var(--indigo);
}
.text-link:hover svg {
  transform: translateX(3px);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}
.icon-btn:hover {
  background: var(--paper-3);
  color: var(--ink);
}

/* Display the correct icon for the current theme */
[data-theme="dark"] .icon-moon,
:root:not([data-theme="dark"]) .icon-sun {
  display: none;
}

/* ---------- Site header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}
.site-head.is-stuck {
  border-bottom-color: var(--line);
}
.head-inner {
  width: min(100% - 2 * var(--gutter), 84rem);
  margin-inline: auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand:hover {
  color: var(--ink);
}
.brand-word {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.brand-word em {
  font-style: italic;
}
.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--indigo);
}
.primary-nav {
  margin-left: auto;
}
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.8vw, 1.7rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav li {
  margin: 0;
}
.primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0.35rem;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.005em;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease);
}
.primary-nav a:hover {
  color: var(--ink);
}
.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
.primary-nav a[aria-current="page"] {
  color: var(--ink);
}
.head-tools {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 0 0 auto;
}
.menu-btn {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}
.menu-btn:hover {
  background: var(--paper-3);
}
.menu-btn svg {
  width: 20px;
  height: 20px;
}

/* Full-screen mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding: 1rem var(--gutter) 2rem;
  overflow-y: auto;
}
.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}
.mobile-menu nav {
  margin-top: clamp(1rem, 6vh, 3rem);
}
.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-menu li {
  margin: 0;
  border-top: 1px solid var(--line);
}
.mobile-menu li:last-child {
  border-bottom: 1px solid var(--line);
}
.mobile-menu a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ink);
  text-decoration: none;
}
.mobile-menu a span {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.mobile-menu a:hover {
  color: var(--indigo);
}
.mobile-menu__foot {
  margin-top: auto;
  padding-top: 2rem;
  color: var(--muted);
  font-size: var(--step--1);
}
body.menu-open {
  overflow: hidden;
}

/* ---------- Site footer ---------- */
.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3rem, 7vw, 5.5rem) 2rem;
  margin-top: 0;
}
[data-theme="dark"] .site-foot {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.site-foot a {
  color: var(--paper);
  text-decoration-color: rgba(247, 242, 233, 0.35);
}
.site-foot a:hover {
  color: var(--paper);
  text-decoration-color: var(--paper);
}
[data-theme="dark"] .site-foot a {
  color: var(--ink);
  text-decoration-color: var(--line-strong);
}
.foot-statement {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  text-wrap: balance;
}
.foot-statement em {
  font-style: italic;
  color: #cfc8ff;
}
[data-theme="dark"] .foot-statement em {
  color: var(--indigo);
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(247, 242, 233, 0.18);
}
[data-theme="dark"] .foot-grid {
  border-top-color: var(--line);
}
.foot-grid h2 {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(247, 242, 233, 0.62);
  margin: 0 0 0.9rem;
}
[data-theme="dark"] .foot-grid h2 {
  color: var(--muted);
}
.foot-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}
.foot-grid li + li {
  margin-top: 0.55rem;
}
.foot-grid a {
  text-decoration: none;
}
.foot-grid a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.foot-note {
  max-width: 34ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(247, 242, 233, 0.72);
}
[data-theme="dark"] .foot-note {
  color: var(--muted);
}
.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(247, 242, 233, 0.18);
  font-size: 0.8125rem;
  color: rgba(247, 242, 233, 0.62);
}
[data-theme="dark"] .foot-base {
  border-top-color: var(--line);
  color: var(--muted);
}
.foot-base p {
  margin: 0;
}
.foot-reset {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: none;
  border: 0;
  padding: 0.4rem 0;
  color: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.foot-reset:hover {
  color: var(--paper);
}
[data-theme="dark"] .foot-reset:hover {
  color: var(--ink);
}

/* ---------- Search dialog ---------- */
.search-dialog {
  width: min(100% - 2rem, 44rem);
  max-height: min(80vh, 40rem);
  margin: 8vh auto auto;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-dialog::backdrop {
  background: rgba(18, 16, 22, 0.55);
}
.search-dialog__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
}
.search-dialog__head svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex: 0 0 auto;
}
.search-dialog input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 1.05rem;
  padding: 0.4rem 0;
}
.search-dialog input[type="search"]:focus {
  outline: none;
}
.search-dialog__close {
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.35rem 0.7rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  overflow-y: auto;
  max-height: calc(80vh - 8rem);
}
.search-results li {
  margin: 0;
}
.search-results a {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}
.search-results a:hover,
.search-results a:focus-visible {
  background: var(--paper-2);
}
.search-results .r-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.3;
}
.search-results .r-meta {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.search-empty {
  padding: 1.5rem 1rem 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- Section furniture ---------- */
.rule-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--ink);
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}
.rule-head h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.25rem);
}
.rule-head .label {
  white-space: nowrap;
}
[data-theme="dark"] .rule-head {
  border-bottom-color: var(--line-strong);
}

.note {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 58ch;
}

.callout {
  border: 1px solid var(--line);
  border-top: 3px solid var(--indigo);
  background: var(--surface);
  padding: clamp(1.25rem, 2.4vw, 1.9rem);
  border-radius: 0 0 var(--radius) var(--radius);
}
.callout h2,
.callout h3 {
  font-size: var(--step-2);
  margin-bottom: 0.5rem;
}
.callout p {
  font-size: 0.9375rem;
  line-height: 1.6;
}
.callout--note {
  border-top-color: var(--gold);
  background: var(--gold-soft);
}
.callout--note p {
  color: var(--ink-2);
}
[data-theme="dark"] .callout--note p {
  color: var(--ink);
}

/* ---------- Figures / photographs ---------- */
.photo {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}
.photo:hover img {
  transform: scale(1.025);
}
@media (prefers-reduced-motion: reduce) {
  .photo img,
  .photo:hover img {
    transition: none;
    transform: none;
  }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] .enter {
    animation: enter-rise 900ms var(--ease) both;
  }
  [data-enter] .enter:nth-child(2) {
    animation-delay: 90ms;
  }
  [data-enter] .enter:nth-child(3) {
    animation-delay: 180ms;
  }
  [data-enter] .enter:nth-child(4) {
    animation-delay: 270ms;
  }
  @keyframes enter-rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  .draw-lens circle,
  .draw-lens path {
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    transition: stroke-dashoffset 2.2s var(--ease);
  }
  .draw-lens.is-in circle,
  .draw-lens.is-in path {
    stroke-dashoffset: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .primary-nav {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
  .head-tools {
    margin-left: auto;
  }
}
@media (max-width: 900px) {
  .page-head__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }
  .page-head__lede {
    max-width: 58ch;
  }
  .col-4,
  .col-5,
  .col-6,
  .col-7,
  .col-8 {
    grid-column: span 12;
  }
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }
}
@media (max-width: 560px) {
  :root {
    --step-6: clamp(2.35rem, 1.35rem + 4.2vw, 3.2rem);
    --step-5: clamp(2.1rem, 1rem + 7vw, 3rem);
  }
  .head-inner {
    min-height: 60px;
  }
  .brand-word {
    font-size: 1.2rem;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot-statement {
    font-size: 2.1rem;
  }
  .btn {
    width: 100%;
  }
  .btn--inline {
    width: auto;
  }
  .section {
    padding-block: clamp(3rem, 12vw, 4.5rem);
  }
}

/* ---------- Print ---------- */
@media print {
  .site-head,
  .site-foot,
  .skip,
  .menu-btn,
  .icon-btn,
  .search-dialog,
  .btn {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  .section {
    padding-block: 1rem;
  }
}

/* Narrow phones: keep the header chrome inside 320 px */
@media (max-width: 400px) {
  .head-inner {
    gap: 0.5rem;
  }
  .head-tools {
    gap: 0;
  }
  .menu-btn span {
    display: none;
  }
  .brand-word {
    font-size: 1.1rem;
  }
}
@media (max-width: 360px) {
  :root {
    --gutter: 0.9rem;
  }
  .brand-mark {
    width: 23px;
    height: 23px;
  }
}
/* Long legal URLs and titles must never widen the page */
.paper-sheet {
  overflow-wrap: anywhere;
}
.paper-refs {
  word-break: break-word;
}
