@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/alegreya-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/alegreya-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/alegreya-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/alegreya-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 600; font-display: swap; src: url("/assets/fonts/alegreya-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/alegreya-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/alegreya-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/alegreya-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 800; font-display: swap; src: url("/assets/fonts/alegreya-latin-800-italic.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/alegreya-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 900; font-display: swap; src: url("/assets/fonts/alegreya-latin-900-italic.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/alegreya-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/atkinson-hyperlegible-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
:root {
  --bg-light-base: #faf7f0;
  --fg-light-base-body: #1e2b40;
  --fg-light-base-heading: #1e2b40;
  --fg-light-base-muted: #4b5668;
  --fg-light-base-link: #2e4c78;
  --fg-light-base-inverse: #1e2b40;
  --bg-light-card: #fffdf8;
  --fg-light-card-body: #1e2b40;
  --fg-light-card-heading: #1e2b40;
  --fg-light-card-muted: #4b5668;
  --fg-light-card-link: #2e4c78;
  --fg-light-card-inverse: #1e2b40;
  --bg-light-elevated: #f0ebdf;
  --fg-light-elevated-body: #1e2b40;
  --fg-light-elevated-heading: #1e2b40;
  --fg-light-elevated-muted: #4b5668;
  --fg-light-elevated-link: #2e4c78;
  --fg-light-elevated-inverse: #1e2b40;
  --brand-light-accent: #2e4c78;
  --brand-light-accent-hover: #1c355a;
  --brand-light-on-accent: #ffffff;
  --focus-light-ring: #2e4c78;
  --border-light-default: #7a8495;
  --border-light-subtle: #d7d1c3;
}
.bg-surface-base { background: var(--bg-light-base); --fg-body: var(--fg-light-base-body); --fg-heading: var(--fg-light-base-heading); --fg-muted: var(--fg-light-base-muted); --fg-link: var(--fg-light-base-link); --fg-inverse: var(--fg-light-base-inverse); }
.bg-surface-card { background: var(--bg-light-card); --fg-body: var(--fg-light-card-body); --fg-heading: var(--fg-light-card-heading); --fg-muted: var(--fg-light-card-muted); --fg-link: var(--fg-light-card-link); --fg-inverse: var(--fg-light-card-inverse); }
.bg-surface-elevated { background: var(--bg-light-elevated); --fg-body: var(--fg-light-elevated-body); --fg-heading: var(--fg-light-elevated-heading); --fg-muted: var(--fg-light-elevated-muted); --fg-link: var(--fg-light-elevated-link); --fg-inverse: var(--fg-light-elevated-inverse); }
.text-role-body { color: var(--fg-body); overflow-wrap: anywhere; }
.text-role-heading { color: var(--fg-heading); overflow-wrap: anywhere; }
.text-role-muted { color: var(--fg-muted); }
.text-role-link { color: var(--fg-link); }
.text-role-inverse { color: var(--fg-inverse); }
.text-role-link { text-decoration: underline; }
.text-role-link:hover { color: var(--brand-light-accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus-light-ring); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.site-logo { max-width: 100%; height: auto; }
.site-menu > summary { list-style: none; cursor: pointer; }
.site-menu > summary::-webkit-details-marker { display: none; }
:where(section[data-section][style]) { background-size: cover; background-position: center; padding: clamp(1.5rem, 4vw, 3rem); }
:where(section[data-section][style] > .bg-surface-card) { padding: clamp(1rem, 3vw, 2rem); }
:where(section[data-section][style] > .bg-surface-card > :first-child) { margin-top: 0; }
:where(section[data-section][style] > .bg-surface-card > :last-child) { margin-bottom: 0; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: static; padding: 0.25rem 0.5rem; outline: 2px solid var(--focus-light-ring); }

:root {
  --serif: 'Alegreya', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible', Arial, sans-serif;
  --rule: 1px solid var(--border-light-default);
  --rule-soft: 1px solid var(--border-light-subtle);
  --measure: 38rem;
  --margin-col: 11rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-body {
  flex: 1 0 auto;
}

a {
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: var(--rule);
}

.header-row {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.85rem var(--gutter) 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}

.brand .site-logo {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0.005em;
}

.brand:hover .brand-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.nav-bar {
  display: none;
}

.nav-bar .site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
}

.nav-bar .site-nav a {
  display: inline-block;
  padding: 0.55rem 0;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-bar .site-nav a:hover {
  border-bottom-color: var(--brand-light-accent);
}

.menu-toggle {
  flex: none;
}

.site-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.25rem 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--serif);
  font-variant: small-caps;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.site-menu > summary::-webkit-details-marker {
  display: none;
}

.menu-icon {
  position: relative;
  display: inline-block;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.9rem;
  height: 1.5px;
  margin: -0.75px 0 0 -0.45rem;
  background: currentColor;
}

.menu-icon::after {
  transform: rotate(90deg);
}

.site-menu[open] .menu-icon::after {
  transform: none;
}

.site-menu > summary:focus-visible {
  outline: 2px solid var(--focus-light-ring);
  outline-offset: 3px;
}

.site-menu > ul {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 0;
  padding: 1rem var(--gutter) 1.5rem;
  list-style: none;
  counter-reset: menu;
  background: var(--bg-light-elevated);
  border-top: 3px double var(--border-light-default);
  border-bottom: var(--rule);
}

.site-menu > ul::before {
  content: 'Contents';
  display: block;
  padding-bottom: 0.5rem;
  font-family: var(--serif);
  font-variant: small-caps;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
}

.site-menu > ul > li {
  counter-increment: menu;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: baseline;
  border-bottom: 1px dotted var(--border-light-default);
}

.site-menu > ul > li::before {
  content: counter(menu, upper-roman) '.';
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--fg-muted);
}

.site-menu > ul a {
  display: block;
  padding: 0.75rem 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.25;
  text-decoration: none;
}

.site-menu > ul a:hover {
  text-decoration: underline;
}

.site-menu > ul ul {
  grid-column: 2;
  list-style: none;
  margin: 0;
  padding: 0 0 0.5rem;
}

.site-menu > ul ul a {
  font-size: 1.05rem;
  padding: 0.4rem 0;
}

@media (max-width: 30rem) {
  .brand-name {
    font-size: 1rem;
    line-height: 1.15;
  }

  .brand .site-logo {
    width: 1.9rem;
    height: 1.9rem;
  }

  .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (min-width: 52rem) {
  html {
    scroll-padding-top: 9rem;
  }

  .menu-toggle {
    display: none;
  }

  .nav-bar {
    display: block;
    max-width: 68rem;
    margin: 0 auto;
    padding: 0 var(--gutter);
  }

  .nav-bar .site-nav {
    border-top: var(--rule-soft);
  }
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1rem var(--gutter) 0;
  font-size: 0.875rem;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.breadcrumbs li + li::before {
  content: '/';
  margin-right: 0.5rem;
  color: var(--fg-muted);
}

/* ---------- Page frame and prose ---------- */

.page {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
}

.page h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: var(--fg-heading);
  text-wrap: balance;
}

.prose {
  max-width: var(--measure);
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.1em;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.45em;
}

.prose h2 {
  margin: 2.4em 0 0.7em;
  padding-top: 1.1em;
  border-top: var(--rule-soft);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--fg-heading);
}

.prose h3 {
  margin: 1.8em 0 0.5em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--fg-heading);
}

.prose strong {
  font-weight: 700;
}

.prose blockquote {
  margin: 1.5em 0;
  padding-left: 1.1em;
  border-left: 3px solid var(--border-light-default);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
}

.prose figure {
  margin: 0 0 2rem;
}

.prose img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Home: handbook title page ---------- */

.title-page {
  padding: clamp(1.5rem, 4vw, 2.75rem) 0;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  border-top: 3px double var(--border-light-default);
  border-bottom: var(--rule);
}

.title-block h1 {
  font-size: clamp(2.3rem, 6.2vw, 4.4rem);
  max-width: 14ch;
}

.title-lines {
  margin-top: 1.5rem;
}

.title-lines .display-line {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

.title-lines .display-line:last-child {
  margin-bottom: 0;
}

@media (min-width: 52rem) {
  .title-page {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 3rem;
    align-items: end;
  }

  .title-lines {
    margin-top: 0;
    padding-left: 1.5rem;
    border-left: var(--rule-soft);
  }
}

.home-body {
  margin: 0 auto;
  max-width: 44rem;
}

.home-body .photo-hero {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  padding: 0.6rem;
  border: var(--rule);
  outline: 1px solid var(--border-light-subtle);
  outline-offset: 4px;
  background: var(--bg-light-card);
}

.home-body ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  counter-reset: contents;
  border-top: var(--rule);
}

.home-body ul > li {
  counter-increment: contents;
  position: relative;
  margin: 0;
  padding: 0.85rem 0 0.85rem 2.25rem;
  border-bottom: 1px dotted var(--border-light-default);
}

.home-body ul > li::before {
  content: counter(contents);
  position: absolute;
  left: 0;
  top: 0.8rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--fg-heading);
}

/* ---------- Topic hub: chapter opener ---------- */

.chapter-head {
  max-width: 44rem;
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  border-bottom: var(--rule);
}

.chapter-head h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.hub-body > p:first-of-type {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.5;
}

.hub-body .photo-hero {
  margin-bottom: 2rem;
  border: var(--rule);
  padding: 0.5rem;
  background: var(--bg-light-card);
}

.hub-body ol {
  list-style: none;
  padding: 0;
  counter-reset: articles;
}

.hub-body ol > li {
  counter-increment: articles;
  position: relative;
  padding: 0.6rem 0 0.6rem 2.5rem;
  border-bottom: var(--rule-soft);
}

.hub-body ol > li::before {
  content: counter(articles);
  position: absolute;
  left: 0;
  top: 0.55rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--fg-heading);
}

.chapter-contents {
  max-width: var(--measure);
  margin-top: 3rem;
  padding: 1.5rem 1.75rem;
  border: var(--rule);
}

.chapter-contents h2 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
}

.chapter-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chapter-list li {
  padding: 0.5rem 0;
  border-top: var(--rule-soft);
}

.chapter-list li:first-child {
  border-top: 0;
}

/* ---------- Article and preface: two columns with a ruled margin ---------- */

.article-head,
.preface-head {
  max-width: 48rem;
  padding-bottom: 1.25rem;
  margin-bottom: 2.25rem;
  border-bottom: var(--rule);
}

.article-head h1,
.preface-head h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
}

.margin-grid {
  counter-reset: section;
}

.margin-grid h2 {
  counter-increment: section;
}

.margin-grid h2::before {
  content: counter(section) '. ';
  font-weight: 500;
  color: var(--fg-muted);
}

.margin-grid .photo-hero {
  border: var(--rule);
  padding: 0.5rem;
  background: var(--bg-light-card);
}

.article-body strong {
  font-variant: small-caps;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.preface-body {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.65;
}

.preface-body h2 {
  font-size: 1.45rem;
}

@media (min-width: 60rem) {
  .margin-grid {
    max-width: none;
    display: grid;
    grid-template-columns: var(--margin-col) minmax(0, var(--measure));
    column-gap: 3rem;
    align-items: start;
  }

  .margin-grid > * {
    grid-column: 2;
  }

  .margin-grid > .photo-hero {
    grid-column: 1;
    grid-row: 1 / span 3;
    margin: 0.35rem 0 0;
    padding: 0.4rem 0.4rem 0;
    border: 0;
    border-top: var(--rule);
    border-right: var(--rule-soft);
    background: transparent;
  }

  .margin-grid h2 {
    position: relative;
    margin-top: 1.6em;
  }

  .margin-grid h2::before {
    content: counter(section);
    position: absolute;
    left: calc(-3rem - 2.5rem);
    top: 1.1em;
    width: 2.5rem;
    text-align: right;
    font-size: 1.3rem;
    color: var(--fg-heading);
  }
}

/* ---------- Contact: reply card ---------- */

.page-contact {
  max-width: 46rem;
}

.reply-card {
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: var(--rule);
  outline: 1px solid var(--border-light-subtle);
  outline-offset: 5px;
}

.reply-head h1 {
  font-size: clamp(1.8rem, 4.4vw, 2.5rem);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: var(--rule-soft);
}

.reply-body .photo-hero {
  margin-bottom: 1.5rem;
}

.reply-form {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: var(--rule);
}

.field {
  margin: 0 0 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: inherit;
  background: var(--bg-light-base);
  border: var(--rule);
  border-radius: 2px;
}

.field textarea {
  resize: vertical;
  min-height: 9rem;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--focus-light-ring);
  outline-offset: 2px;
}

@media (min-width: 40rem) {
  .field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.25rem;
  }
}

.form-actions {
  margin: 0.5rem 0 0;
}

.reply-button {
  min-height: 2.9rem;
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-weight: 700;
  color: var(--brand-light-on-accent);
  background: var(--brand-light-accent);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.reply-button:hover {
  background: var(--brand-light-accent-hover);
}

.reply-button:focus-visible {
  outline: 2px solid var(--focus-light-ring);
  outline-offset: 3px;
}

/* ---------- Thank you: colophon ---------- */

.colophon {
  max-width: 36rem;
  margin: clamp(1rem, 5vw, 3rem) auto 0;
  padding-top: 2rem;
  border-top: var(--rule);
  text-align: center;
}

.colophon-head h1 {
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
  margin-bottom: 1.5rem;
}

.colophon-body {
  margin: 0 auto;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.colophon-body h2 {
  font-size: 1.2rem;
  border-top: 0;
  padding-top: 0;
  margin-top: 2em;
}

.colophon-body .photo-hero {
  max-width: 24rem;
  margin: 0 auto 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: var(--rule);
}

.footer-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 2.5rem;
}

.footer-inner p {
  margin: 0 0 0.6rem;
}

.footer-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1rem;
}

.footer-note {
  max-width: 36rem;
  font-size: 0.95rem;
}

.footer-client {
  margin-top: 1rem;
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none;
    animation: none;
  }
}
