/* Tokens, type, masthead, footer, buttons. Palette follows the institute draft. */
:root {
  --paper: oklch(0.968 0.012 85);
  --panel: oklch(0.94 0.016 85);
  --ink: oklch(0.23 0.035 258);
  --ink-2: oklch(0.32 0.04 258);
  --body: oklch(0.35 0.03 258);
  --muted: oklch(0.43 0.025 258);
  --gold: oklch(0.66 0.1 75);
  --gold-light: oklch(0.78 0.1 78);
  --link: oklch(0.48 0.085 68);
  --rule: oklch(0.23 0.035 258 / 0.18);
  --display: "Libre Caslon Display", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --measure: 68ch;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-wrap: pretty;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
::selection { background: oklch(0.85 0.07 80); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
h1, h2, h3 { font-weight: 400; margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font: 400 clamp(40px, 6vw, 80px)/1.04 var(--display); letter-spacing: -0.01em; }
h2 { font: 400 clamp(30px, 3.6vw, 46px)/1.1 var(--display); }
h3 { font: 400 22px/1.3 var(--serif); }
p { margin: 0 0 1em; }
.lede { font: 400 clamp(18px, 1.5vw, 20px)/1.7 var(--serif); color: var(--body); max-width: 58ch; }
.prose { max-width: var(--measure); color: var(--body); }
.prose h2 { font-size: clamp(26px, 3vw, 36px); margin: 1.8em 0 0.6em; }
.prose h3 { margin: 1.4em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 0.3em 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.diamond { display: inline-block; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.double { border-bottom: 3px double var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Affiliation strip and masthead */
.strip {
  text-align: center; padding: 9px 20px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule);
}
.masthead { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px var(--gutter) 0; }
.masthead > a { display: flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.seal { width: 76px; height: 76px; border-radius: 50%; border: 1.5px solid var(--ink); padding: 4px; }
.seal span {
  width: 100%; height: 100%; border-radius: 50%; border: 1px solid var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  font: 13px/1 var(--display); letter-spacing: 0.1em;
}
.seal span::before { content: ""; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.seal span::after { content: ""; width: 24px; height: 1px; background: var(--gold); }
.wordmark { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.wordmark b { font: 400 clamp(21px, 2.4vw, 30px)/1.1 var(--display); letter-spacing: 0.04em; }
.wordmark i { font: italic 400 clamp(15px, 1.4vw, 18px)/1.3 var(--serif); color: var(--muted); }
.nav {
  width: 100%; max-width: var(--wrap); border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink);
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 34px; padding: 13px 0;
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; }
.nav a:hover, .nav a[aria-current] { color: var(--link); }
.nav .cart-link { color: var(--link); border-bottom: 1px solid var(--gold); }
.cart-count:empty { display: none; }
.cart-count::before { content: "("; } .cart-count::after { content: ")"; }

/* Buttons: one filled, one outline, as in the draft */
.btn {
  display: inline-block; background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  font: 600 13px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 16px 26px; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink-2); color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--panel); }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Breadcrumb */
.crumbs { font-size: 14px; color: var(--muted); padding: 22px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 8px; color: var(--gold); }

/* Page head used by every inner page */
.page-head { padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 56px); display: grid; gap: 22px; }
.page-head h1 { max-width: 18ch; }
.kicker { font: italic 400 18px/1.3 var(--serif); color: var(--link); }

/* Footer */
.footer { margin-top: clamp(80px, 9vw, 128px); border-top: 3px double var(--ink); padding: 48px 0 40px; font-size: 15px; color: var(--muted); }
.footer-grid { display: grid; gap: 36px 48px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.footer h2 { font: 400 18px/1.3 var(--serif); margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { color: var(--link); }
.affil { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--rule); }
.affil img { width: 200px; height: auto; }
.affil p { margin: 0; max-width: 60ch; font-size: 14px; }
.legal { margin-top: 22px; font-size: 13px; }

/* Phones: the body is the scroll box so fixed bars never bounce; text boxes stay 16px to stop focus zoom. */
@media (max-width: 900px) {
  html, body { overscroll-behavior-y: none; scroll-padding-top: 24px; }
  html { height: 100%; overflow: hidden; }
  body { position: relative; height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; }
  table { display: block; overflow-x: auto; }
  :is(input, textarea, select, .input) { font-size: 16px; }
  .masthead { gap: 12px; padding-top: 18px; }
  .masthead > a { flex-direction: row; gap: 12px; }
  .seal { width: 54px; height: 54px; flex: none; padding: 3px; }
  .seal span { font-size: 10px; gap: 3px; }
  .seal span::after { width: 16px; }
  .wordmark { align-items: flex-start; text-align: left; }
  .wordmark b { font-size: 18px; }
  .wordmark i { font-size: 14px; }
  .nav { gap: 4px 20px; font-size: 11px; letter-spacing: 0.12em; }
  .strip { font-size: 10px; letter-spacing: 0.14em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
