:root {
  color-scheme: light dark;
  /* palette */
  --m-paper-50: #FCF9F2;
  --m-paper-100: #F6F0E2;
  --m-paper-200: #ECE3CF;
  --m-paper-300: #DCD0B6;
  --m-ink-400: #8A8778;
  --m-ink-450: #6E6C62;
  --m-ink-500: #5C5E66;
  --m-ink-700: #2E3240;
  --m-ink-800: #1F2330;
  --m-ink-900: #161922;
  --m-ink-950: #0F1118;
  --m-binding-100: #F4E1DC;
  --m-binding-300: #D9A196;
  --m-binding-500: #9B3328;
  --m-binding-700: #74231B;
  --m-binding-on-dark: #E8907F;
  --m-binding-on-dark-pressed: #F0AE9F;
  --m-gilt-400: #C9A04A;
  --m-gilt-300: #DDBE74;

  /* semantic roles, light */
  --m-bg: #F6F0E2;
  --m-surface: #FCF9F2;
  --m-surface-inset: #ECE3CF;
  --m-line: #DCD0B6;
  --m-text: #1F2330;
  --m-text-muted: #5C5E66;
  --m-text-faint: #6E6C62;
  --m-action: #9B3328;
  --m-action-pressed: #74231B;
  --m-action-tint: #F4E1DC;
  --m-action-border: #D9A196;
  --m-on-action: #FCF9F2;
  --m-ornament: #C9A04A;
  --m-mark-ink: #1F2330;
  --m-mark-eye: #C9A04A;
  --m-footer-bg: #161922;
  --m-footer-text: #ECE3CF;
  --m-footer-faint: #8A8778;

  /* type */
  --m-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --m-font-body: "Source Sans 3", system-ui, -apple-system, Segoe UI, sans-serif;
  --m-display-family: var(--m-font-display);
  --m-display-weight: 400;
  --m-display-size: 64px;
  --m-display-min: 40px;
  --m-display-line: 1.0625;
  --m-display-tracking: -0.02em;
  --m-title-family: var(--m-font-display);
  --m-title-weight: 600;
  --m-title-size: 32px;
  --m-title-line: 1.1875;
  --m-title-tracking: -0.01em;
  --m-subhead-family: var(--m-font-display);
  --m-subhead-weight: 600;
  --m-subhead-size: 22px;
  --m-subhead-line: 1.2727;
  --m-subhead-tracking: 0em;
  --m-lede-family: var(--m-font-body);
  --m-lede-weight: 400;
  --m-lede-size: 21px;
  --m-lede-line: 1.5238;
  --m-lede-tracking: 0em;
  --m-body-family: var(--m-font-body);
  --m-body-weight: 400;
  --m-body-size: 18px;
  --m-body-line: 1.5556;
  --m-body-tracking: 0em;
  --m-caption-family: var(--m-font-body);
  --m-caption-weight: 400;
  --m-caption-size: 15px;
  --m-caption-line: 1.4667;
  --m-caption-tracking: 0em;
  --m-label-family: var(--m-font-body);
  --m-label-weight: 600;
  --m-label-size: 13px;
  --m-label-line: 1.2308;
  --m-label-tracking: 0.12em;

  /* space */
  --m-space-xs: 4px;
  --m-space-sm: 8px;
  --m-space-md: 12px;
  --m-space-lg: 16px;
  --m-space-xl: 24px;
  --m-space-xxl: 40px;
  --m-space-xxxl: 64px;

  /* radius */
  --m-radius-input: 6px;
  --m-radius-card: 10px;
  --m-radius-card-large: 16px;
  --m-radius-pill: 999px;

  /* buttons */
  --m-button-md-font-size: 17px;
  --m-button-md-min-height: 44px;
  --m-button-md-padding-vertical: 10px;
  --m-button-md-padding-horizontal: 20px;
  --m-button-lg-font-size: 19px;
  --m-button-lg-min-height: 52px;
  --m-button-lg-padding-vertical: 12px;
  --m-button-lg-padding-horizontal: 28px;

  /* the one shadow */
  --m-shadow-card: 0 1px 3px rgba(22, 25, 34, 0.06);
  --m-breakpoint-compact: 520px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --m-bg: #161922;
    --m-surface: #1F2330;
    --m-surface-inset: #0F1118;
    --m-line: #2E3240;
    --m-text: #F6F0E2;
    --m-text-muted: #DCD0B6;
    --m-text-faint: #8A8778;
    --m-action: #E8907F;
    --m-action-pressed: #F0AE9F;
    --m-action-tint: #2E3240;
    --m-action-border: #74231B;
    --m-on-action: #161922;
    --m-ornament: #DDBE74;
    --m-mark-ink: #F6F0E2;
    --m-mark-eye: #DDBE74;
    --m-footer-bg: #0F1118;
    --m-footer-text: #ECE3CF;
    --m-footer-faint: #8A8778;
  }
}

/* =============================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, svg { max-width: 100%; }
a { color: inherit; }
/* Never set overflow on one axis alone — see CLAUDE.md. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =============================================================================
   Ground
   ========================================================================== */
body {
  background: var(--m-bg);
  color: var(--m-text);
  font-family: var(--m-body-family);
  font-weight: var(--m-body-weight);
  font-size: var(--m-body-size);
  line-height: var(--m-body-line);
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.page { flex: 1; display: flow-root; }

/* =============================================================================
   Type
   ========================================================================== */
.t-display, .t-title, .t-subhead { text-wrap: balance; }
.t-display {
  font-family: var(--m-display-family);
  font-weight: var(--m-display-weight);
  font-size: clamp(var(--m-display-min), 7vw, var(--m-display-size));
  line-height: var(--m-display-line);
  letter-spacing: var(--m-display-tracking);
  /* Fraunces' optical-size axis: the display cut is tighter and more
     characterful than the text cut. */
  font-optical-sizing: auto;
}
.t-display em { font-style: italic; color: var(--m-action); }
.t-title {
  font-family: var(--m-title-family);
  font-weight: var(--m-title-weight);
  font-size: var(--m-title-size);
  line-height: var(--m-title-line);
  letter-spacing: var(--m-title-tracking);
}
.t-subhead {
  font-family: var(--m-subhead-family);
  font-weight: var(--m-subhead-weight);
  font-size: var(--m-subhead-size);
  line-height: var(--m-subhead-line);
  margin-bottom: var(--m-space-sm);
}
.t-body { font-size: var(--m-body-size); line-height: var(--m-body-line); }
.t-caption { font-size: var(--m-caption-size); line-height: var(--m-caption-line); color: var(--m-text-faint); }
.t-label {
  font-family: var(--m-label-family);
  font-weight: var(--m-label-weight);
  font-size: var(--m-label-size);
  line-height: var(--m-label-line);
  letter-spacing: var(--m-label-tracking);
  text-transform: uppercase;
  color: var(--m-text-muted);
}
.t-muted { color: var(--m-text-muted); }
.lede {
  max-width: 34em;
  font-family: var(--m-lede-family);
  font-size: clamp(var(--m-body-size), 2.2vw, var(--m-lede-size));
  line-height: var(--m-lede-line);
  color: var(--m-text-muted);
  margin-top: var(--m-space-xl);
}

/* =============================================================================
   Layout
   ========================================================================== */
.wrap { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: clamp(var(--m-space-lg), 5vw, var(--m-space-xxl)); }
.section { padding-block: clamp(var(--m-space-xxl), 7vw, var(--m-space-xxxl)); }
.section__head { margin-bottom: var(--m-space-xl); }
.section__head > .t-label { display: block; margin-bottom: var(--m-space-sm); }
.prose { max-width: 38rem; }
.prose > * + * { margin-top: var(--m-space-lg); }
.prose a { color: var(--m-action); text-underline-offset: 0.2em; }
.prose a:hover { color: var(--m-action-pressed); }

/* The fleuron: a printer's ornament between sections, in gilt. */
.ornament {
  display: flex;
  align-items: center;
  gap: var(--m-space-lg);
  color: var(--m-ornament);
  font-family: var(--m-font-display);
  font-size: var(--m-subhead-size);
  line-height: 1;
}
.ornament::before, .ornament::after { content: ""; flex: 1; border-top: 1px solid var(--m-line); }

/* =============================================================================
   Header and footer
   ========================================================================== */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--m-space-lg);
  padding-block: var(--m-space-xl);
}
.nav { display: flex; gap: var(--m-space-lg); flex-wrap: wrap; }
.nav a {
  font-weight: 600;
  font-size: var(--m-caption-size);
  color: var(--m-text-muted);
  text-decoration: none;
}
.nav a:hover { color: var(--m-action); }

.site-footer {
  background: var(--m-footer-bg);
  color: var(--m-footer-faint);
  padding-block: var(--m-space-xxl);
  margin-top: var(--m-space-xxl);
}
.site-footer .wordmark { color: var(--m-footer-text); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--m-space-xl); align-items: flex-end; justify-content: space-between; }
.site-footer a { color: var(--m-footer-text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--m-space-lg); font-size: var(--m-caption-size); }
.site-footer__meta { margin-top: var(--m-space-md); color: var(--m-footer-faint); }

/* =============================================================================
   Buttons. The binding red is the verb: the only colour that means "you can
   do something here". Corners match cards, not pills.
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--m-space-sm);
  font-family: var(--m-font-body);
  font-weight: 600;
  font-size: var(--m-button-md-font-size);
  min-height: var(--m-button-md-min-height);
  padding: var(--m-button-md-padding-vertical) var(--m-button-md-padding-horizontal);
  border: 1px solid transparent;
  border-radius: var(--m-radius-card);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn--primary { background: var(--m-action); color: var(--m-on-action); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--m-action-pressed); }
.btn--secondary { background: transparent; color: var(--m-action); border-color: var(--m-action-border); }
.btn--secondary:hover, .btn--secondary:focus-visible { background: var(--m-action-tint); }
.btn--lg {
  font-size: var(--m-button-lg-font-size);
  min-height: var(--m-button-lg-min-height);
  padding: var(--m-button-lg-padding-vertical) var(--m-button-lg-padding-horizontal);
}
:where(a, button, summary):focus-visible {
  outline: 2px solid var(--m-action);
  outline-offset: 3px;
  border-radius: var(--m-radius-input);
}
.actions { display: flex; flex-wrap: wrap; gap: var(--m-space-md); margin-top: var(--m-space-xl); }

/* =============================================================================
   Cards
   ========================================================================== */
.grid { display: grid; gap: var(--m-space-lg); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.card {
  background: var(--m-surface);
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius-card-large);
  box-shadow: var(--m-shadow-card);
  padding: var(--m-space-xl);
}
.card .t-body { color: var(--m-text-muted); }

/* =============================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(var(--m-space-xxl), 8vw, calc(var(--m-space-xxxl) * 1.5)); }
.eyebrow { display: block; margin-bottom: var(--m-space-lg); }

/* =============================================================================
   Call to action — a bookplate: inset surface, gilt rule.
   ========================================================================== */
.cta {
  background: var(--m-surface);
  border: 1px solid var(--m-line);
  outline: 1px solid var(--m-ornament);
  outline-offset: calc(var(--m-space-sm) * -1);
  border-radius: var(--m-radius-card-large);
  padding: clamp(var(--m-space-xl), 5vw, var(--m-space-xxxl));
  text-align: center;
}
.cta .lede { margin-inline: auto; }
.cta .actions { justify-content: center; }

/* =============================================================================
   Design page specimens
   ========================================================================== */
.swatches { display: grid; gap: var(--m-space-md); grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); }
.swatch { border: 1px solid var(--m-line); border-radius: var(--m-radius-card); overflow: hidden; background: var(--m-surface); }
.swatch__chip { height: 4.5rem; }
.swatch__meta { padding: var(--m-space-sm) var(--m-space-md); display: grid; gap: 2px; }
.swatch__meta code { font-size: var(--m-caption-size); color: var(--m-text-muted); }
.specimen { display: grid; gap: var(--m-space-xl); }
.specimen__row { display: grid; gap: var(--m-space-xs); }
.marks { display: flex; flex-wrap: wrap; gap: var(--m-space-xl); align-items: center; }
.marks__tile { width: 6rem; height: 6rem; }
.marks__tile--sm { width: 2rem; height: 2rem; }
.marks__ground { padding: var(--m-space-xl); border-radius: var(--m-radius-card-large); border: 1px solid var(--m-line); }
.marks__ground--ink { background: var(--m-footer-bg); }
.marks__ground--ink .wordmark { color: var(--m-footer-text); }

/* Skip link */
.skip {
  position: absolute;
  left: var(--m-space-md);
  top: calc(var(--m-space-md) * -10);
  z-index: 20;
  background: var(--m-surface);
  border: 1px solid var(--m-action-border);
  border-radius: var(--m-radius-input);
  padding: var(--m-space-sm) var(--m-space-lg);
}
.skip:focus { top: var(--m-space-md); }

/* --- The deck (/deck) ------------------------------------------------------ */
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.slide { padding-block: clamp(var(--m-space-xxl), 6vw, var(--m-space-xxxl)); border-top: 1px solid var(--m-line); }
.slide .t-title em { font-style: italic; color: var(--m-action); }
.slide__body { margin-bottom: var(--m-space-xl); }
.slide__figures { display: grid; gap: var(--m-space-lg); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin-bottom: var(--m-space-xl); }
.slide__figure { margin: 0; }
.slide__figure img { display: block; width: 100%; height: auto; border-radius: var(--m-radius-card-large); box-shadow: var(--m-shadow-card); }
.slide__figure figcaption { margin-top: var(--m-space-sm); font-size: var(--m-caption-size); line-height: var(--m-caption-line); color: var(--m-text-muted); }
.slide__figure strong { color: var(--m-text); font-weight: 600; }
.slide__items { margin-bottom: var(--m-space-xl); }
.slide__item .t-label { display: block; margin-bottom: var(--m-space-sm); color: var(--m-action); }
.slide__item .t-subhead { margin-bottom: var(--m-space-sm); }
.slide__list { margin: 0; padding-left: 1.1em; color: var(--m-text-muted); font-size: var(--m-body-size); line-height: var(--m-body-line); }
.slide__list li + li { margin-top: var(--m-space-xs); }
.slide__table { overflow: auto; margin-bottom: var(--m-space-xl); border: 1px solid var(--m-line); border-radius: var(--m-radius-card-large); background: var(--m-surface); }
.slide__table table { width: 100%; border-collapse: collapse; font-size: var(--m-caption-size); line-height: var(--m-caption-line); }
.slide__table th, .slide__table td { text-align: left; vertical-align: top; padding: var(--m-space-md) var(--m-space-lg); border-bottom: 1px solid var(--m-line); }
.slide__table thead th { font-size: var(--m-label-size); letter-spacing: var(--m-label-tracking); text-transform: uppercase; color: var(--m-text-faint); }
.slide__table tbody th { font-weight: 600; color: var(--m-text); }
.slide__table td { color: var(--m-text-muted); }
.slide__table tr:last-child > * { border-bottom: 0; }
.slide__notes { display: grid; gap: var(--m-space-sm); max-width: 48rem; }
@media print {
  .site-header, .site-footer, .skip { display: none; }
  .slide { break-before: page; border-top: 0; }
  .hero { break-after: page; }
}

@media (max-width: 520px) {
  .actions .btn { width: 100%; }
  .card { padding: var(--m-space-lg); }
}

/* --- the lockup ---------------------------------------------------------- */
.wordmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.3em;
  font-size: var(--m-subhead-size);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  color: var(--m-mark-ink);
}
.wordmark .mouse {
  width: 1.5em;
  height: 1.5em;
  flex: none;
  /* The mouse's baseline is at y=48 of 64; pull it down so it sits on the
     text baseline rather than floating above it. */
  margin-bottom: -0.3em;
}
.wordmark__word { font-family: var(--m-font-display); letter-spacing: -0.01em; }
.wordmark__the {
  font-style: italic;
  font-weight: 400;
  font-size: 0.78em;
  margin-right: 0.12em;
}
.wordmark__name { font-weight: 600; }
.wordmark--hero { font-size: var(--m-title-size); }
