/* ==========================================================================
   Samuel A. W. Klein — site stylesheet
   Palette and type per spec section 8; card metrics taken directly from
   _reference/card-style-reference.html (the approved card style).
   ========================================================================== */

:root {
  /* Palette — spec section 8. One accent across the whole site. */
  --bg: #F4F6F7;
  --text: #2E3538;
  /* Darkened from the spec's #788084, which measured 3.71:1 on --bg and 4.02:1
     on white — below the 4.5:1 WCAG AA threshold for small text. This value
     measures 4.58:1 and 4.96:1. Rest of the palette is unchanged. */
  --muted: #6A7175;
  --border: #DEE3E5;
  --accent: #0F6E56;
  --accent-soft: rgba(15, 110, 86, 0.08);
  --surface: #FFFFFF;
  --thumb-bg: #EDEFF0;
  --thumb-text: #9AA1A4;

  --font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 780px;
  --measure-wide: 1040px;

  --radius-card: 10px;
  --radius-row: 8px;
  --radius-thumb: 6px;
  --hairline: 0.5px solid var(--border);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; font-weight: 600; }
h1 { font-size: 30px; letter-spacing: -0.01em; }
h2 { font-size: 21px; margin-top: 40px; }
h3 { font-size: 17px; margin-top: 28px; }
h4 { font-size: 15px; margin-top: 20px; }

p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

hr { border: 0; border-top: var(--hairline); margin: 32px 0; }

blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 0 6px 6px 0;
}
blockquote p:last-child { margin-bottom: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--thumb-bg);
  padding: 1px 5px;
  border-radius: 4px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--accent);
  padding: 10px 16px;
  z-index: 100;
  border: 1px solid var(--border);
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px;
}
.wrap--wide { max-width: var(--measure-wide); }

main { display: block; padding: 40px 0 72px; }

.page-header { margin-bottom: 36px; }
.page-header p { color: var(--muted); margin-bottom: 0; }

section + section { margin-top: 56px; }

/* ---------- Top nav --------------------------------------------------- */

.site-nav {
  background: var(--surface);
  border-bottom: var(--hairline);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-nav__inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
}
.site-nav__brand {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin-right: auto;
  white-space: nowrap;
}
.site-nav__brand:hover { text-decoration: none; color: var(--accent); }

.site-nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__links > li { margin: 0; position: relative; }

.site-nav__link {
  display: block;
  padding: 8px 10px;
  font-size: 14.5px;
  color: var(--text);
  border-radius: 6px;
  white-space: nowrap;
}
.site-nav__link:hover { text-decoration: none; background: var(--bg); }
.site-nav__link[aria-current="page"],
.site-nav__link.is-active { color: var(--accent); font-weight: 600; }

/* Dropdown (Methods & Models) */
.site-nav__dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.site-nav__dropdown-btn:hover { background: var(--bg); }
.site-nav__dropdown-btn.is-active { color: var(--accent); font-weight: 600; }
.site-nav__caret { font-size: 10px; line-height: 1; transition: transform 0.15s; }
.site-nav__dropdown-btn[aria-expanded="true"] .site-nav__caret { transform: rotate(180deg); }

.site-nav__menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 224px;
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--radius-row);
  padding: 6px;
  list-style: none;
  margin: 0;
  box-shadow: 0 4px 16px rgba(46, 53, 56, 0.09);
}
.site-nav__dropdown-btn[aria-expanded="true"] + .site-nav__menu { display: block; }
.site-nav__menu li { margin: 0; }
.site-nav__menu a {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--text);
  border-radius: 5px;
}
.site-nav__menu a:hover { text-decoration: none; background: var(--bg); }
.site-nav__menu a[aria-current="page"] { color: var(--accent); font-weight: 600; }

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

.site-footer {
  border-top: var(--hairline);
  background: var(--surface);
  padding: 28px 0;
  margin-top: auto;
}
.site-footer__inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__links li { margin: 0; }
.footer-btn {
  display: inline-block;
  padding: 7px 15px;
  font-size: 13.5px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 18px;
  background: var(--surface);
}
.footer-btn:hover { text-decoration: none; background: var(--accent); color: #fff; }
.site-footer__meta {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
}

body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }

/* ---------- Editorial placeholder markers ----------------------------- */
/* Rendered from [INSERT: ...] markers in the /content markdown files, so
   unwritten copy is visible on the page rather than silently missing. */

.insert-marker {
  border: 1px dashed var(--muted);
  border-radius: var(--radius-row);
  background: var(--surface);
  padding: 14px 16px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.insert-marker__label {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

/* ---------- Home ------------------------------------------------------ */

.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
.intro__headshot {
  width: 190px;
  max-width: 60%;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(46, 53, 56, 0.13);
  display: block;
}
.intro__name { margin-bottom: 4px; }
.intro__title {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 14px;
}
.contact-line {
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 0;
}
.contact-line a { color: var(--accent); }
.contact-line .sep { margin: 0 7px; color: var(--border); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 { margin: 0; }
.section-head a { font-size: 14px; white-space: nowrap; }

/* ---------- Publication card (full) ----------------------------------- */
/* Metrics copied from card-style-reference.html */

.card {
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.card__thumb {
  width: 120px;
  height: 90px;
  flex-shrink: 0;
  background: var(--thumb-bg);
  border: var(--hairline);
  border-radius: var(--radius-thumb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--thumb-text);
  object-fit: cover;
  overflow: hidden;
  text-align: center;
}
img.card__thumb { display: block; }
.card__body { min-width: 0; }
.card__title { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--accent); }
.card__meta { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.card__abstract { font-size: 12.5px; line-height: 1.5; margin: 0 0 10px; }

.pill {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  color: var(--accent);
  margin-right: 6px;
  margin-bottom: 6px;
  display: inline-block;
  background: var(--surface);
}
a.pill:hover { text-decoration: none; background: var(--accent); color: #fff; }

/* ---------- Publications page (compact rows) -------------------------- */

.year-group + .year-group { margin-top: 30px; }
.year-header { font-size: 13px; font-weight: 600; margin: 0 0 6px; }

.row-card {
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--radius-row);
  margin-bottom: 8px;
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  width: 100%;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.row:hover { background: var(--bg); }
.row__thumb {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--thumb-bg);
  border-radius: 5px;
  object-fit: cover;
}
.row__text { min-width: 0; }
/* Spans, not <p>: a <button> may only contain phrasing content. */
.row__title { display: block; font-size: 13px; font-weight: 500; margin: 0; line-height: 1.35; }
.row__meta { display: block; font-size: 11.5px; color: var(--muted); margin: 2px 0 0; line-height: 1.35; }
.chevron {
  font-size: 16px;
  color: var(--muted);
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.row[aria-expanded="true"] .chevron { color: var(--accent); transform: rotate(180deg); }

.expanded-body { padding: 0 14px 14px 62px; }
.expanded-body[hidden] { display: none; }
.expanded-body__img {
  display: block;
  width: 120px;
  height: 90px;
  object-fit: cover;
  background: var(--thumb-bg);
  border: var(--hairline);
  border-radius: var(--radius-thumb);
  margin-bottom: 10px;
}

.empty-note {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-row);
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Segmented control ----------------------------------------- */
/* Two-option discrete toggle (spec 3A) — styled after the Prejudice Map's
   segmented control in reference_website_screenshots/screenshot_hehman_6.png */

/* Built on real radio inputs (visually hidden) plus styled labels, so keyboard
   arrow-key navigation and screen-reader semantics come from the platform
   rather than from hand-rolled ARIA. */

.segmented-wrap, .trial-tabs-wrap {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.segmented-wrap legend, .trial-tabs-wrap legend { padding: 0; }

.segmented {
  display: inline-flex;
  border: 1px solid var(--accent);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  max-width: 100%;
}
.segmented__option {
  background: var(--surface);
  color: var(--accent);
  font-size: 13.5px;
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.segmented__option + .segmented__option { border-left: 1px solid var(--accent); }
.segmented__option:hover { background: var(--accent-soft); }
.segmented input:checked + .segmented__option {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.segmented input:focus-visible + .segmented__option,
.trial-tabs input:focus-visible + .trial-tab {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.quad-tool__spec-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 62ch;
}

.control-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

/* ---------- Quad Model interactive ------------------------------------ */

.quad-tool {
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--radius-card);
  padding: 20px;
  margin: 28px 0;
}
.quad-tool__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: var(--hairline);
  margin-bottom: 20px;
}
.quad-tool__control { min-width: 0; }

.trial-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.trial-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.trial-tab:hover { border-color: var(--accent); color: var(--accent); }
.trial-tabs input:checked + .trial-tab {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.trial-tabs__block-label {
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0 2px;
}
.trial-tabs__block-label:first-child { margin-top: 0; }

.quad-tool__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.quad-diagram { min-width: 0; overflow-x: auto; }
/* Never shrink the tree below legibility — scroll the container instead. */
.quad-diagram svg { display: block; width: 100%; min-width: 500px; height: auto; }

/* The whole tree is drawn for every trial type. Branches the selected trial
   type traverses are highlighted root-to-leaf; the rest are faint. */
.tree-edge { stroke: var(--border); stroke-width: 1.5; fill: none; }
.tree-edge.is-correct { stroke: var(--accent); stroke-width: 2.5; }
.tree-edge.is-incorrect { stroke: var(--muted); stroke-width: 2.5; stroke-dasharray: 5 3; }
.tree-edge.is-inactive { stroke: var(--border); stroke-width: 1.25; stroke-dasharray: 1 4; }
.tree-edge-label { font-size: 11px; fill: #AEB5B8; }
.tree-edge-label.is-active { fill: var(--text); font-weight: 600; }
.tree-edge-caption { font-size: 9.5px; fill: #AEB5B8; font-style: italic; }
.tree-edge-caption.is-active { fill: var(--muted); }
.tree-node { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.tree-leaf-correct { fill: var(--accent); }
.tree-leaf-incorrect { fill: var(--muted); }
.tree-leaf-absent { fill: #EDEFF0; stroke: var(--border); stroke-width: 1; }
.tree-leaf-label { font-size: 11px; font-weight: 600; fill: #fff; }
.tree-leaf-label.is-absent { fill: #9AA1A4; font-weight: 400; font-style: italic; }
.tree-leaf-caption { font-size: 10.5px; fill: var(--muted); }

.quad-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.quad-legend span { display: inline-flex; align-items: center; gap: 6px; }
.quad-legend i {
  width: 20px; height: 0;
  border-top: 2.5px solid var(--accent);
  display: inline-block;
}
.quad-legend i.incorrect { border-top: 2.5px dashed var(--muted); }
.quad-legend i.absent { border-top: 1.25px dotted var(--border); }

.quad-readout { min-width: 0; }
.quad-readout__title { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.quad-readout__sub { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }

.equation {
  background: var(--bg);
  border: var(--hairline);
  border-radius: var(--radius-thumb);
  padding: 11px 13px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}
.equation__label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.equation__body { white-space: nowrap; }
.equation--correct { border-left: 3px solid var(--accent); }
.equation--incorrect { border-left: 3px solid var(--muted); }
.equation sub { font-size: 0.72em; }

.diagnostic-note {
  font-size: 13px;
  background: var(--accent-soft);
  border-radius: var(--radius-thumb);
  padding: 11px 13px;
  margin-top: 14px;
}
.diagnostic-note strong { color: var(--accent); }

.param-key {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
}
.param-key dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 6px 0 0; }
.param-key dt { font-weight: 600; color: var(--text); white-space: nowrap; }
.param-key dd { margin: 0; }

/* ---------- Impression Trajectories demo ------------------------------ */

.demo {
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--radius-card);
  padding: 20px;
  margin: 28px 0;
}
.demo__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.demo__video-wrap { position: relative; min-width: 0; }
.demo__video {
  width: 100%;
  height: auto;
  border-radius: var(--radius-thumb);
  background: #000;
  display: block;
  cursor: pointer;
}
.demo__notice {
  font-size: 13.5px;
  margin: 10px 0 0;
  color: var(--muted);
  font-style: italic;
  min-height: 1.6em;
}
.demo__notice--warn { color: #A6412F; font-style: normal; }

.demo__panel { min-width: 0; display: flex; flex-direction: column; }
.word-list {
  border: var(--hairline);
  border-radius: var(--radius-thumb);
  padding: 8px;
  min-height: 96px;
  max-height: 190px;
  overflow-y: auto;
  margin-bottom: 12px;
  background: var(--bg);
}
.word-list__empty { color: var(--muted); font-size: 13px; margin: 6px; }
.word-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: var(--hairline);
  border-radius: 14px;
  padding: 3px 5px 3px 11px;
  font-size: 12.5px;
  margin: 0 5px 5px 0;
}
.word-chip__time { color: var(--muted); font-size: 11px; }
.word-chip__remove {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 50%;
}
.word-chip__remove:hover { color: var(--text); }

.demo__form { display: flex; gap: 0; margin-bottom: 8px; }
.demo__input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: var(--surface);
  color: var(--text);
}
.demo__input:disabled { background: var(--bg); color: var(--muted); }
.btn {
  appearance: none;
  font: inherit;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: #0c5a46; border-color: #0c5a46; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--add { border-radius: 0 6px 6px 0; padding: 9px 15px; }
.btn--secondary { background: var(--surface); color: var(--accent); }
.btn--secondary:hover:not(:disabled) { background: var(--accent); color: #fff; }
.btn--block { width: 100%; }
.btn--wide { display: inline-block; padding: 11px 22px; font-size: 15px; font-weight: 600; }
a.btn:hover { text-decoration: none; color: #fff; }

.demo__hint { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; min-height: 1.5em; }
.demo__hint--warn { color: #A6412F; }

.suggestions {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.suggestions button {
  font: inherit;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.suggestions button:hover { border-color: var(--accent); color: var(--accent); }

.demo__plot { min-width: 0; margin-top: 8px; }
.demo__plot svg { display: block; width: 100%; height: auto; }
.plot-axis { stroke: var(--border); stroke-width: 1; }
.plot-axis-label { font-size: 10.5px; fill: var(--muted); }
.plot-trail { stroke: var(--accent); stroke-width: 1.5; fill: none; opacity: 0.4; }
.plot-point { fill: var(--accent); }
.plot-point--latest { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.plot-point-label { font-size: 11px; fill: var(--text); }

.study-link-wrap { margin-top: 24px; }
.study-link--disabled {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  cursor: not-allowed;
}
.study-link__note { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

.privacy-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
  padding-top: 12px;
  border-top: var(--hairline);
}

/* ---------- Blog ------------------------------------------------------ */

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { margin: 0 0 8px; }
.post-list__link {
  display: block;
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--radius-row);
  padding: 14px 16px;
}
.post-list__link:hover { text-decoration: none; border-color: var(--accent); }
.post-list__title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 3px; }
.post-list__meta { font-size: 12px; color: var(--muted); margin: 0; }

.post-body { max-width: 68ch; }
.post-meta { font-size: 13px; color: var(--muted); margin: -6px 0 28px; }

/* ---------- Methods & Models index ------------------------------------ */

.model-list { list-style: none; margin: 0; padding: 0; }
.model-list li { margin: 0 0 10px; }
.model-card {
  display: block;
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
a.model-card:hover { text-decoration: none; border-color: var(--accent); }
.model-card__title { font-size: 15.5px; font-weight: 600; color: var(--text); margin: 0 0 3px; }
.model-card__desc { font-size: 13px; color: var(--muted); margin: 0; }
.model-card--unpublished { opacity: 0.65; }
.badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- Responsive ------------------------------------------------ */

@media (min-width: 640px) {
  .intro {
    grid-template-columns: 190px 1fr;
    gap: 36px;
  }
  .intro__headshot { width: 190px; max-width: 100%; }
  h1 { font-size: 34px; }
}

@media (min-width: 900px) {
  .quad-tool__layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .demo__layout { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .site-nav__toggle { display: block; }
  .site-nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: var(--hairline);
    padding: 8px;
  }
  .site-nav__links.is-open { display: flex; }
  .site-nav__inner { position: relative; flex-wrap: wrap; }
  .site-nav__link, .site-nav__dropdown-btn { width: 100%; text-align: left; }
  .site-nav__menu {
    display: block;
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 12px;
    min-width: 0;
  }
  .site-nav__dropdown-btn { display: flex; justify-content: space-between; }
  .card { flex-direction: column; gap: 12px; }
  .card__thumb { width: 100%; height: 150px; }
  .expanded-body { padding: 0 14px 14px 14px; }
  .site-footer__meta { margin-left: 0; width: 100%; }
  .equation__body { white-space: normal; }
}

/* The two specification labels are long; stack them rather than overflow. */
@media (max-width: 560px) {
  .segmented { flex-direction: column; width: 100%; }
  .segmented__option { text-align: center; white-space: normal; }
  .segmented__option + .segmented__option {
    border-left: 0;
    border-top: 1px solid var(--accent);
  }
  .quad-tool, .demo { padding: 16px 14px; }
  .quad-tool__controls { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
