@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Source+Sans+3:wght@300..900&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #1a1714;
  --ink-soft: #2a2622;
  --paper: #f3eee6;
  --paper-2: #e8dfd2;
  --paper-3: #ddd3c4;
  --slate: #3d4f5c;
  --slate-2: #2f3e49;
  --muted: #6b6459;
  --subtle: #8a8378;
  --line: #d5ccbf;
  --line-strong: #c4b9a8;
  --surface: #faf6ef;
  --danger: #8b3a32;
  --ok: #3d5c47;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-sans: "Source Sans 3", "Source Sans Pro", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --shadow-border: 0 0 0 1px rgba(26,23,20,.08), 0 1px 2px -1px rgba(26,23,20,.06), 0 8px 24px -16px rgba(26,23,20,.18);
  --r-xs: 2px; --r-sm: 4px; --r-lg: 14px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--paper);
  color: var(--ink);
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: clip;
  font-size: 1rem;
  line-height: 1.6;
}

img, svg, video, canvas { max-width: 100%; display: block; }
img { outline: 1px solid rgba(26,23,20,.1); outline-offset: -1px; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
  line-height: 1.1;
}
p { text-wrap: pretty; }
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
::selection { background: var(--slate); color: var(--paper); }

/* ── Layout ── */
.site-wrap { display: flex; flex-direction: column; min-height: 100dvh; background: var(--paper); color: var(--ink); overflow-x: clip; }
main { flex: 1; min-width: 0; }

.container {
  width: 100%;
  max-width: 1152px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) { .container { padding-left: 1.5rem; padding-right: 1.5rem; } }

/* ── Kicker ── */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--slate);
}
@media (min-width: 640px) { .kicker { font-size: 0.72rem; letter-spacing: 0.2em; } }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(243,238,230,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 4rem;
  max-width: 1152px; margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .header-inner { padding: 0 1.5rem; } }

.site-logo {
  display: flex; align-items: center; gap: 0.625rem;
  color: var(--ink); text-decoration: none;
}
.site-logo-text {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 500;
  letter-spacing: -0.03em;
}

.primary-nav { display: none; align-items: center; gap: 2px; }
@media (min-width: 1024px) { .primary-nav { display: flex; } }
.primary-nav a {
  display: inline-flex; align-items: center; height: 2.75rem;
  padding: 0 0.75rem; font-size: 0.92rem;
  color: var(--muted); text-decoration: none;
  transition: color 0.15s;
}
.primary-nav a:hover, .primary-nav a.active { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 0.25rem; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  background: none; border: none; color: var(--ink);
}
.support-link {
  display: none; align-items: center; height: 2.75rem;
  padding: 0 0.75rem; font-size: 0.92rem; color: var(--slate);
  text-decoration: none;
}
@media (min-width: 640px) { .support-link { display: inline-flex; } }
.menu-btn { background: none; border: none; color: var(--ink); }
@media (min-width: 1024px) { .menu-btn { display: none; } }

.mobile-nav {
  display: none; flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem 1rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  display: flex; align-items: center; min-height: 3rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  font-size: 1rem;
}
.mobile-nav a:last-child { color: var(--slate); }

/* Search overlay */
.search-overlay {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(26,23,20,.4);
}
.search-overlay.open { display: block; }
.search-box {
  max-width: 36rem; margin: 4rem auto 0;
  padding: 0 1rem;
}
.search-inner { background: var(--paper); padding: 1rem; box-shadow: var(--shadow-border); }
.search-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.search-input {
  display: block; width: 100%; margin-top: 0.5rem;
  height: 3rem; border: none; border-bottom: 1px solid var(--ink);
  background: transparent; font-size: 1.125rem; color: var(--ink);
  outline: none; font-family: var(--font-sans);
}
.search-results { list-style: none; max-height: 20rem; overflow-y: auto; margin-top: 0.75rem; }
.search-results li a { display: block; padding: 0.75rem 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.search-results li:last-child a { border-bottom: none; }
.search-result-title { color: var(--ink); font-size: 0.95rem; }
.search-result-blurb { font-size: 0.85rem; color: var(--muted); }
.search-empty { padding: 0.75rem 0; font-size: 0.875rem; color: var(--muted); }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line); background: var(--ink); color: var(--paper); }
.footer-grid {
  display: grid; gap: 2.5rem; padding: 3.5rem 1rem;
  max-width: 1152px; margin: 0 auto;
}
@media (min-width: 640px) { .footer-grid { padding: 3.5rem 1.5rem; } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-brand .site-logo { color: var(--paper); margin-bottom: 1rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.6; color: var(--paper-3); max-width: 18rem; }
.footer-brand a { display: inline-flex; min-height: 2.75rem; align-items: center; margin-top: 1.25rem; font-size: 0.875rem; color: var(--paper); text-decoration: underline; text-decoration-color: var(--paper-3); text-underline-offset: 4px; }

.footer-col h2 { font-family: var(--font-sans); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--paper-3); font-weight: 400; }
.footer-col ul { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul li a { font-size: 0.875rem; color: var(--paper); text-decoration: none; }
.footer-col ul li a:hover { text-decoration: underline; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner {
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: 1152px; margin: 0 auto;
  padding: 1.25rem 1rem; font-size: 0.75rem; color: var(--paper-3);
}
@media (min-width: 640px) {
  .footer-bottom-inner {
    flex-direction: row; justify-content: space-between;
    padding: 1.25rem 1.5rem;
  }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0 1.25rem;
  font-family: var(--font-sans); font-size: 0.9rem; font-weight: 500;
  border: none; cursor: pointer; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-soft); }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-outline:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn-inverse { background: var(--paper); color: var(--ink); }
.btn-inverse:hover { background: var(--paper-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(26,23,20,.06); }
.btn-ghost-light { background: transparent; color: var(--paper); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); }

/* ── Photo component ── */
.photo-wrap { }
.photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.photo-caption { margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }

/* ── Hero (home) ── */
.hero {
  position: relative; min-height: 88svh;
  overflow: hidden; background: var(--ink); color: var(--paper);
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.7; outline: none;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--ink) 0%, rgba(26,23,20,.55) 40%, rgba(26,23,20,.25) 100%);
}
.hero-content {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 88svh; padding-top: 7rem; padding-bottom: 3.5rem;
}
.hero h1 {
  margin-top: 1rem;
  font-size: clamp(1.85rem, 7.2vw, 4.5rem);
  font-weight: 500; line-height: 1.08; letter-spacing: -0.03em;
  max-width: 56rem;
}
.hero-sub { margin-top: 1.5rem; max-width: 42rem; font-size: 1.05rem; line-height: 1.65; color: var(--paper-2); }
@media (min-width: 640px) { .hero-sub { font-size: 1.125rem; } }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── Banner strip ── */
.banner-strip { border-bottom: 1px solid var(--line); background: var(--paper-2); }
.banner-grid { display: grid; gap: 2rem; padding: 2.5rem 0; }
@media (min-width: 768px) { .banner-grid { grid-template-columns: repeat(3, 1fr); } }
.banner-grid p:first-child { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--slate); }
.banner-grid p:last-child { margin-top: 0.5rem; color: var(--ink); }

/* ── Section ── */
.section { padding-top: 5rem; padding-bottom: 5rem; }
.section-sm { padding-top: 3rem; padding-bottom: 3rem; }
.section-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.section-title { margin-top: 0.5rem; font-size: 2.25rem; }
@media (min-width: 640px) { .section-title { font-size: 3rem; } }
.section-link { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; color: var(--slate); text-decoration: none; font-size: 0.95rem; }
.section-link:hover { text-decoration: underline; }

/* ── Practice cards ── */
.practice-grid { margin-top: 2.5rem; display: grid; gap: 2rem; }
@media (min-width: 768px) { .practice-grid { grid-template-columns: repeat(3, 1fr); } }
.practice-card { display: block; text-decoration: none; }
.practice-card:hover img { opacity: 0.9; }
.practice-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; transition: opacity 0.2s; }
.practice-card .kicker { margin-top: 1rem; }
.practice-card h3 { margin-top: 0.25rem; font-size: 1.5rem; line-height: 1.2; }
.practice-card p { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.65; color: var(--muted); }

/* ── Dark section (consulting philosophy) ── */
.dark-section { background: var(--ink); color: var(--paper); padding: 5rem 0; }
.dark-section .container { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .dark-section .container { grid-template-columns: 1fr 1fr; align-items: center; } }
.dark-section p { color: var(--paper-2); margin-top: 1.25rem; line-height: 1.65; }
.dark-section p + p { margin-top: 1rem; color: var(--paper-3); }

/* ── Audit feed ── */
.audit-feed { background: var(--ink); padding: 1.25rem; }
@media (min-width: 640px) { .audit-feed { padding: 1.5rem; } }
.audit-feed-label { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--paper-3); }
.audit-feed-pre {
  margin-top: 1rem; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.75;
  color: var(--paper-2); white-space: pre-wrap; word-break: break-word;
  max-width: 100%; overflow-x: auto;
}
.audit-cursor { display: inline-block; width: 0.5rem; background: var(--paper); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.audit-feed-note { margin-top: 1rem; font-size: 0.75rem; color: var(--paper-3); }

/* ── Research paper list ── */
.paper-list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.paper-list li { border-bottom: 1px solid var(--line); }
.paper-list li:last-child { border-bottom: none; }
.paper-list a { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 0; text-decoration: none; }
@media (min-width: 640px) {
  .paper-list a { flex-direction: row; align-items: baseline; justify-content: space-between; }
}
.paper-list-title { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }
.paper-list-meta { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.paper-list a:hover .paper-list-title { text-decoration: underline; }

/* ── Director strip ── */
.director-strip { border-top: 1px solid var(--line); background: var(--paper-2); padding: 4rem 0; }
.director-strip .container { display: grid; gap: 2rem; }
@media (min-width: 768px) { .director-strip .container { grid-template-columns: 1.2fr 0.8fr; align-items: center; } }
.director-strip h2 { margin-top: 0.5rem; font-size: 2.25rem; }
.director-strip p { margin-top: 1rem; max-width: 36rem; color: var(--muted); line-height: 1.65; }
.director-strip .actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; font-family: var(--font-mono); font-size: 0.875rem; }
.stat-box { border: 1px solid var(--line); background: var(--paper); padding: 1rem; }
.stat-num { font-size: 1.5rem; color: var(--ink); }
.stat-label { margin-top: 0.25rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

/* ── Page hero (interior) ── */
.page-hero { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); min-height: 42vh; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; outline: none; }
.page-hero-overlay { position: absolute; inset: 0; background: rgba(26,23,20,.45); }
.page-hero-content { position: relative; padding: 6rem 0; }
.page-hero h1 { max-width: 48rem; font-size: clamp(2rem, 5vw, 3.75rem); font-weight: 500; margin-top: 0.75rem; }
.page-hero p { margin-top: 1.25rem; max-width: 42rem; font-size: 1.125rem; color: var(--paper-2); line-height: 1.65; }

/* ── Two-col layout ── */
.two-col { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .two-col { grid-template-columns: 1.1fr 0.9fr; } }
.two-col-reverse { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .two-col-reverse { grid-template-columns: 0.9fr 1.1fr; } }
.two-col-even { display: grid; gap: 3rem; }
@media (min-width: 768px) { .two-col-even { grid-template-columns: 1fr 1fr; } }

/* ── Prose ── */
.prose { font-size: 1.0625rem; line-height: 1.65; color: var(--ink); }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-size: 1.65rem; margin: 2.2em 0 0.6em; font-weight: 500; }
.prose h3 { font-size: 1.2rem; margin: 1.8em 0 0.5em; font-weight: 500; }
.prose ul, .prose ol { margin: 1em 0 1em 1.2em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { border-left: 2px solid var(--slate); padding-left: 1.1rem; margin: 1.6em 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.45; color: var(--ink-soft); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--slate); }
.max-prose { max-width: 48rem; }

/* ── Legal page ── */
.legal-page { padding: 4rem 0; }

/* ── Research index ── */
.research-hero { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); }
.research-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; outline: none; }
.research-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, var(--ink), rgba(26,23,20,.7) 50%, rgba(26,23,20,.3)); }
.research-hero-content { position: relative; padding: 6rem 0; }

.paper-article { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.paper-article:first-child { border-top: 1px solid var(--line); }
.paper-article-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--slate); }
.paper-article h2 { margin-top: 0.5rem; font-size: 1.875rem; }
.paper-article h2 a { text-decoration: none; color: var(--ink); }
.paper-article h2 a:hover { text-decoration: underline; }
.paper-article .subtitle { margin-top: 0.25rem; color: var(--ink-soft); }
.paper-article .abstract { margin-top: 1rem; max-width: 42rem; color: var(--muted); line-height: 1.65; }
.paper-article .read-link { margin-top: 1rem; display: inline-flex; min-height: 2.75rem; align-items: center; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); }

/* Research sidebar */
.research-aside { display: flex; flex-direction: column; gap: 1.5rem; }
.aside-box { border: 1px solid var(--line); background: var(--surface); padding: 1.25rem; }
.aside-box .kicker { margin-bottom: 0.75rem; }
.aside-box ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.aside-box ul li a { font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); }

/* Research three-col */
.research-grid-3 { display: grid; gap: 1.5rem; margin-top: 4rem; }
@media (min-width: 768px) { .research-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ── Chronicle ── */
.essays-list { list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.essay-item { padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.essay-item:last-child { border-bottom: none; }
.essay-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--slate); }
.essay-title { margin-top: 0.5rem; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.03em; }
@media (min-width: 640px) { .essay-title { font-size: 1.875rem; } }
.essay-title a { text-decoration: none; color: var(--ink); }
.essay-title a:hover { text-decoration: underline; }
.essay-dek { margin-top: 0.5rem; max-width: 36rem; color: var(--muted); line-height: 1.65; }
.essay-link { margin-top: 0.75rem; display: inline-flex; min-height: 2.75rem; align-items: center; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; }

/* ── Publications ── */
.book-article { padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.book-article:first-child { border-top: 1px solid var(--line); }
.book-article h2 { font-size: 1.875rem; }
.book-article .subtitle { margin-top: 0.25rem; font-style: italic; color: var(--muted); }
.book-article .isbn { margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--slate); }
.book-article p { margin-top: 0.75rem; color: var(--ink); }
.book-article .book-link { margin-top: 0.75rem; display: inline-flex; min-height: 2.75rem; align-items: center; text-decoration: underline; text-underline-offset: 4px; }

.pub-links-grid { display: grid; gap: 1.5rem; margin-top: 4rem; }
@media (min-width: 768px) { .pub-links-grid { grid-template-columns: repeat(3, 1fr); } }
.pub-link-box { border: 1px solid var(--line); padding: 1.25rem; }
.pub-link-box h3 { font-size: 1.5rem; }
.pub-link-box p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); line-height: 1.6; }
.pub-link-box a { margin-top: 0.75rem; display: inline-flex; min-height: 2.75rem; align-items: center; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; }

/* ── About ── */
.credentials-dl { border: 1px solid var(--line); background: var(--surface); padding: 1.25rem; font-size: 0.875rem; }
.credentials-dl .cred-row { padding: 0.75rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.25rem; }
.credentials-dl .cred-row:last-child { border-bottom: none; }
.credentials-dl dt { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--slate); }
.coordinates { padding: 3.5rem 0; border-top: 1px solid var(--line); background: var(--paper-2); }
.coord-list { margin-top: 1.5rem; display: grid; gap: 0.75rem; list-style: none; }
@media (min-width: 640px) { .coord-list { grid-template-columns: 1fr 1fr; } }
.coord-list a { text-decoration: underline; text-underline-offset: 4px; font-size: 0.875rem; }
.ssh-toggle { min-height: 2.75rem; background: none; border: none; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); font-family: var(--font-sans); }
.ssh-pre { display: none; margin-top: 0.75rem; background: var(--ink); padding: 1rem; font-family: var(--font-mono); font-size: 0.7rem; line-height: 1.5; color: var(--paper-2); overflow-x: auto; }
.ssh-pre.open { display: block; }

/* ── Engagement form ── */
.form-grid { display: grid; gap: 1.25rem; }
.form-row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-field { display: grid; gap: 0.5rem; }
label, .field-label { font-size: 0.875rem; color: var(--ink); font-family: var(--font-sans); }
.field-input, .field-textarea, .field-select {
  height: 2.75rem; padding: 0 0.75rem;
  background: var(--surface); color: var(--ink);
  border: none; box-shadow: inset 0 0 0 1px var(--line-strong);
  font-family: var(--font-sans); font-size: 1rem;
  width: 100%;
}
.field-input:focus, .field-textarea:focus, .field-select:focus { outline: 2px solid var(--slate); outline-offset: 1px; }
.field-textarea { height: 7rem; padding: 0.625rem 0.75rem; resize: vertical; }
.field-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6459' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; }
.form-note { font-size: 0.875rem; color: var(--muted); }
.form-success { border: 1px solid var(--line); background: var(--surface); padding: 1.5rem; display: none; }
.form-success.visible { display: block; }
.form-success h3 { font-family: var(--font-display); font-size: 1.5rem; }
.form-success p { margin-top: 0.75rem; max-width: 36rem; color: var(--muted); }
.form-error-msg { font-size: 0.875rem; color: var(--danger); display: none; }
.form-error-msg.visible { display: block; }

/* Engagement info box */
.info-box { border: 1px solid var(--line); background: var(--surface); padding: 1.25rem; font-size: 0.875rem; line-height: 1.65; }
.info-box p + p { margin-top: 0.75rem; color: var(--muted); }

/* ── Support page ── */
.donate-grid { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .donate-grid { grid-template-columns: 1fr 1fr; } }
.donate-bmc { border: 1px solid var(--line); background: var(--surface); padding: 1.5rem; }
.donate-bmc h2 { margin-top: 0.5rem; font-size: 1.875rem; }
.donate-bmc p { margin-top: 0.75rem; color: var(--muted); line-height: 1.65; }
.amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 1.5rem; }
.amount-btn {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 4rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--line); background: var(--paper);
  text-decoration: none; color: var(--ink);
}
.amount-btn:hover { border-color: var(--ink); }
.amount-btn-num { font-family: var(--font-display); font-size: 1.25rem; }
.amount-btn-note { font-size: 0.75rem; color: var(--muted); }
.donate-stripe { border: 1px solid var(--line); background: var(--ink); padding: 1.5rem; color: var(--paper); }
.donate-stripe h2 { margin-top: 0.5rem; font-size: 1.875rem; }
.donate-stripe p { margin-top: 0.75rem; color: var(--paper-3); line-height: 1.65; }
.donate-stripe .actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.donate-stripe .note { margin-top: 1.5rem; font-size: 0.75rem; color: var(--paper-3); }

/* ── Practice index ── */
.practice-articles { display: grid; gap: 3.5rem; }
.practice-article { display: grid; gap: 2rem; }
@media (min-width: 768px) { .practice-article { grid-template-columns: 1fr 1fr; align-items: center; } }
.practice-article .article-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; outline: 1px solid rgba(26,23,20,.1); outline-offset: -1px; }
.practice-article .kicker { font-size: 0.75rem; }
.practice-article h2 { margin-top: 0.5rem; font-size: 1.875rem; }
.practice-article p { margin-top: 0.75rem; color: var(--muted); line-height: 1.65; }
.practice-article .btn { margin-top: 1.5rem; }

.engagement-box { margin-top: 4rem; border: 1px solid var(--line); background: var(--surface); padding: 2rem; }
.engagement-box h2 { font-size: 1.875rem; }
.engagement-steps { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 768px) { .engagement-steps { grid-template-columns: repeat(3, 1fr); } }
.engagement-step .step-num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--slate); }
.engagement-step h3 { margin-top: 0.25rem; font-size: 1.5rem; }
.engagement-step p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); line-height: 1.6; }
.engagement-box .btn { margin-top: 2rem; }

/* ── Assessment ── */
.assessment-box { border: 1px solid var(--line); background: var(--surface); padding: 1.25rem; }
@media (min-width: 640px) { .assessment-box { padding: 2rem; } }
.scope-options { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.scope-btn {
  min-height: 4rem; border: 1px solid var(--line); background: var(--paper);
  padding: 1rem; text-align: left; cursor: pointer; width: 100%;
  font-family: var(--font-sans);
}
.scope-btn:hover { border-color: var(--ink); }
.scope-btn-title { font-weight: 500; font-size: 0.95rem; color: var(--ink); }
.scope-btn-dek { font-size: 0.875rem; color: var(--muted); margin-top: 0.2rem; }
.question-options { display: grid; gap: 0.5rem; margin-top: 1.5rem; }
.option-btn {
  min-height: 3.5rem; border: 1px solid var(--line); background: var(--paper);
  padding: 0.75rem 1rem; text-align: left; cursor: pointer; width: 100%;
  font-family: var(--font-sans); font-size: 0.9rem; color: var(--ink);
}
.option-btn:hover { border-color: var(--ink); }
.back-btn { margin-top: 1.5rem; min-height: 2.75rem; background: none; border: none; font-size: 0.875rem; color: var(--muted); cursor: pointer; font-family: var(--font-sans); }
.result-ok { color: var(--ok); }
.result-exposed { color: var(--slate); }
.result-open { color: var(--danger); }
.result-score { margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); }
.result-note { margin-top: 1rem; max-width: 36rem; }
.result-list { margin-top: 1.5rem; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; color: var(--muted); }
.result-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.copy-result-btn { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.25rem; border: none; box-shadow: inset 0 0 0 1px var(--line-strong); background: transparent; cursor: pointer; font-family: var(--font-sans); font-size: 0.9rem; }
.copy-result-btn:hover { box-shadow: inset 0 0 0 1px var(--ink); }

/* ── Paper detail ── */
.paper-header { padding: 4rem 0 3rem; border-bottom: 1px solid var(--line); }
.paper-header .kicker { margin-bottom: 1rem; }
.paper-header h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); max-width: 48rem; }
.paper-header .subtitle { margin-top: 0.75rem; font-size: 1.125rem; color: var(--muted); font-family: var(--font-display); font-style: italic; }
.paper-header .meta { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--slate); }
.paper-body { padding: 3rem 0; }
.paper-body-grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .paper-body-grid { grid-template-columns: 1fr 0.38fr; align-items: start; } }
.paper-abstract { padding: 1.5rem; border: 1px solid var(--line); background: var(--surface); margin-bottom: 2.5rem; }
.paper-abstract p { font-size: 1.0625rem; line-height: 1.65; color: var(--ink-soft); font-family: var(--font-display); font-style: italic; }
.paper-section { margin-bottom: 2.5rem; }
.paper-section h2 { font-size: 1.65rem; margin-bottom: 0.75rem; }
.paper-section p { font-size: 1.0625rem; line-height: 1.65; color: var(--ink); }
.paper-section p + p { margin-top: 1.1em; }
.paper-sidebar { position: sticky; top: 5rem; display: flex; flex-direction: column; gap: 1rem; }
.paper-sidebar .aside-box a { display: block; }
.paper-citation { background: var(--ink); padding: 1.25rem; }
.paper-citation p:first-child { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--paper-3); }
.paper-citation p + p { margin-top: 0.75rem; font-size: 0.8rem; color: var(--paper-2); line-height: 1.65; }

/* ── Misc ── */
.link-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.link-row a { font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); }

.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.mt-8 { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── About page ── */
.credentials-dl { display: grid; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.cred-row { display: grid; grid-template-columns: 6rem 1fr; gap: 0.75rem; font-size: 0.875rem; line-height: 1.5; }
.cred-row dt { font-weight: 600; color: var(--ink); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; padding-top: 0.25rem; }
.cred-row dd { color: var(--muted); }
.photo-caption { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.25rem; }
.coordinates { border-top: 1px solid var(--line); padding: 3rem 0; }
.coord-list { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.25rem; list-style: none; }
.coord-list a { font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; }
.ssh-toggle { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; background: none; border: 1px solid var(--line); padding: 0.4rem 0.75rem; cursor: pointer; color: var(--muted); }
.ssh-toggle:hover { border-color: var(--ink); color: var(--ink); }
.ssh-pre { max-height: 0; overflow: hidden; font-family: var(--font-mono); font-size: 0.75rem; margin-top: 0.75rem; padding: 0; background: var(--paper-2); border: 1px solid var(--line); transition: max-height 0.3s, padding 0.3s; color: var(--muted); word-break: break-all; }
.ssh-pre.open { max-height: 6rem; padding: 0.75rem; }

/* ── Chronicle ── */
.essays-list { display: grid; gap: 2.5rem; }
.essay-item { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.essay-date { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.essay-title { font-family: var(--font-display); font-size: 1.375rem; letter-spacing: -0.02em; margin-top: 0.5rem; }
.essay-title a { color: var(--ink); text-decoration: none; }
.essay-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.essay-dek { margin-top: 0.5rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; max-width: 48rem; }
.essay-link { display: inline-block; margin-top: 0.75rem; font-size: 0.8125rem; font-family: var(--font-mono); letter-spacing: 0.05em; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); }

/* ── Publications ── */
.book-article { border-top: 1px solid var(--line); padding: 1.5rem 0; }
.book-article h2 { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.02em; }
.book-article .subtitle { font-size: 0.875rem; color: var(--muted); margin-top: 0.2rem; }
.book-article .isbn { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--muted); margin-top: 0.4rem; }
.book-article p:not(.subtitle):not(.isbn) { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--ink); line-height: 1.6; }
.book-link { display: inline-block; margin-top: 0.75rem; font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 4px; }
.pub-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.pub-link-box h3 { font-family: var(--font-display); font-size: 1.125rem; }
.pub-link-box p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); line-height: 1.5; }
.pub-link-box a { display: inline-block; margin-top: 0.75rem; font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 4px; }

/* ── Engagement form ── */
.form-success { display: none; background: var(--paper-2); border: 1px solid var(--line); padding: 1.5rem; margin-bottom: 1.5rem; }
.form-success.visible { display: block; }
.form-success h3 { font-family: var(--font-display); font-size: 1.375rem; letter-spacing: -0.02em; }
.form-success p { margin-top: 0.5rem; color: var(--muted); }
.form-error-msg { display: none; color: var(--danger); font-size: 0.875rem; margin-bottom: 1rem; }
.form-error-msg.visible { display: block; }
.form-grid { display: grid; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-field { display: grid; gap: 0.4rem; }
.field-label { font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.field-input, .field-select, .field-textarea { background: var(--paper-2); border: 1px solid var(--line); padding: 0.6rem 0.75rem; font-size: 1rem; font-family: var(--font-sans); color: var(--ink); outline: none; }
.field-input:focus, .field-select:focus, .field-textarea:focus { border-color: var(--ink); }
.field-textarea { min-height: 8rem; resize: vertical; }
.form-note { font-size: 0.8125rem; color: var(--muted); line-height: 1.5; }
.info-box { background: var(--paper-2); border: 1px solid var(--line); padding: 1.25rem; font-size: 0.875rem; color: var(--muted); line-height: 1.6; display: grid; gap: 0.75rem; }
.info-box a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ── Support / Donate ── */
.page-hero { position: relative; overflow: hidden; min-height: 44vh; display: flex; align-items: flex-end; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,23,20,.82) 30%, rgba(26,23,20,.25)); }
.page-hero-content { position: relative; padding-bottom: 3rem; color: var(--paper); }
.page-hero-content h1 { font-family: var(--font-display); font-size: clamp(1.75rem,4vw,3rem); letter-spacing: -0.03em; max-width: 44rem; margin-top: 0.75rem; }
.page-hero-content p { margin-top: 1rem; max-width: 42rem; color: var(--paper-2); font-size: 1.0625rem; line-height: 1.65; }
.donate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 700px) { .donate-grid { grid-template-columns: 1fr; } }
.donate-bmc { padding: 2rem; background: var(--paper-2); border: 1px solid var(--line); }
.donate-bmc h2 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; margin-top: 0.5rem; }
.donate-bmc p { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--muted); line-height: 1.6; }
.donate-stripe { padding: 2rem; background: var(--ink); color: var(--paper); }
.donate-stripe h2 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; margin-top: 0.5rem; color: var(--paper); }
.donate-stripe p { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--paper-3); line-height: 1.6; }
.donate-stripe .note { font-size: 0.8125rem; color: var(--paper-3); margin-top: 1rem; }
.amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.25rem; }
.amount-btn { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.85rem; background: var(--paper); border: 1px solid var(--line); text-decoration: none; transition: border-color 0.15s; }
.amount-btn:hover { border-color: var(--ink); }
.amount-btn-num { font-family: var(--font-display); font-size: 1.375rem; letter-spacing: -0.02em; color: var(--ink); }
.amount-btn-note { font-size: 0.75rem; color: var(--muted); }

/* ── Practice index ── */
.practice-articles { display: grid; gap: 3rem; }
.practice-article { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2rem; align-items: center; }
@media (max-width: 700px) { .practice-article { grid-template-columns: 1fr; } }
.practice-article .article-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; outline: 1px solid rgba(26,23,20,.1); outline-offset: -1px; }
.practice-article h2 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; margin-top: 0.5rem; }
.practice-article p { margin-top: 0.75rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; max-width: 38rem; }
.practice-article a.btn { margin-top: 1.25rem; }
.engagement-box { margin-top: 3.5rem; padding: 2.5rem; background: var(--paper-2); border: 1px solid var(--line); }
.engagement-box h2 { font-family: var(--font-display); font-size: 1.625rem; letter-spacing: -0.02em; }
.engagement-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 1.5rem; }
@media (max-width: 600px) { .engagement-steps { grid-template-columns: 1fr; } }
.engagement-step h3 { font-family: var(--font-display); font-size: 1.125rem; margin-top: 0.5rem; }
.engagement-step p { font-size: 0.875rem; color: var(--muted); margin-top: 0.4rem; line-height: 1.5; }
.step-num { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.engagement-box > a.btn { margin-top: 2rem; }

/* ── Research index / hero ── */
.research-hero { position: relative; overflow: hidden; min-height: 50vh; display: flex; align-items: flex-end; }
.research-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.research-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,23,20,.88) 40%, rgba(26,23,20,.2)); }
.research-hero-content { position: relative; padding-bottom: 3.5rem; }
.paper-article { border-top: 1px solid var(--line); padding: 1.5rem 0; }
.paper-article-meta { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.paper-article h2 { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.02em; margin-top: 0.4rem; }
.paper-article h2 a { color: var(--ink); text-decoration: none; }
.paper-article h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.paper-article .subtitle { font-size: 0.875rem; color: var(--muted); margin-top: 0.2rem; }
.paper-article .abstract { font-size: 0.9375rem; color: var(--muted); line-height: 1.6; margin-top: 0.75rem; max-width: 44rem; }
.read-link { display: inline-block; margin-top: 0.75rem; font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 4px; }
.research-aside img { outline: 1px solid rgba(26,23,20,.1); outline-offset: -1px; }
.aside-box { background: var(--paper-2); border: 1px solid var(--line); padding: 1.25rem; }
.aside-box ul { list-style: none; display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.aside-box a { font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); }

/* ── Research paper detail ── */
.paper-header { padding: 4rem 0 2rem; border-bottom: 1px solid var(--line); }
.paper-header h1 { font-family: var(--font-display); font-size: clamp(1.75rem,4vw,2.75rem); letter-spacing: -0.03em; max-width: 52rem; margin-top: 0.75rem; }
.paper-header .subtitle { margin-top: 0.5rem; font-size: 1.0625rem; color: var(--muted); }
.paper-header .meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.75rem; }
.paper-body { padding: 3rem 0 5rem; }
.paper-body-grid { display: grid; grid-template-columns: 1fr 22rem; gap: 4rem; }
@media (max-width: 860px) { .paper-body-grid { grid-template-columns: 1fr; } }
.paper-abstract { background: var(--paper-2); border-left: 3px solid var(--ink); padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; font-size: 1.0625rem; line-height: 1.7; color: var(--muted); }

/* ── Assessment ── */
.assessment-box { background: var(--paper-2); border: 1px solid var(--line); padding: 2rem; }
.scope-options { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.scope-btn { text-align: left; background: var(--paper); border: 1px solid var(--line); padding: 1rem 1.25rem; cursor: pointer; transition: border-color 0.15s; }
.scope-btn:hover { border-color: var(--ink); }
.scope-btn-title { font-family: var(--font-display); font-size: 1.125rem; }
.scope-btn-dek { font-size: 0.8125rem; color: var(--muted); margin-top: 0.25rem; }
.question-options { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.option-btn { text-align: left; background: var(--paper); border: 1px solid var(--line); padding: 0.85rem 1rem; cursor: pointer; font-size: 0.9375rem; line-height: 1.5; transition: border-color 0.15s; }
.option-btn:hover { border-color: var(--ink); background: var(--paper-2); }
.back-btn { margin-top: 1.25rem; background: none; border: none; font-size: 0.8125rem; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.result-ok { color: var(--ok); }
.result-exposed { color: var(--slate); }
.result-open { color: var(--danger); }
.result-score { margin-top: 0.4rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; }
.result-note { margin-top: 1rem; font-size: 1.0625rem; color: var(--muted); line-height: 1.6; max-width: 38rem; }
.result-list { margin-top: 1.5rem; padding-left: 1.25rem; display: grid; gap: 0.5rem; font-size: 0.9375rem; color: var(--muted); line-height: 1.5; }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.copy-result-btn { background: none; border: 1px solid var(--line); padding: 0.5rem 1rem; cursor: pointer; font-size: 0.875rem; color: var(--ink); }

/* ── Legal pages ── */
.legal-page { padding: 4rem 0 6rem; }
.legal-page .prose h2 { margin-top: 2rem; }
.max-prose { max-width: 46rem; }

/* ── Two-col helpers ── */
.two-col { grid-template-columns: 1fr 1fr; }
.two-col-reverse { grid-template-columns: 1.5fr 1fr; }
@media (max-width: 768px) { .two-col, .two-col-reverse { grid-template-columns: 1fr; } }
.two-col-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .two-col-even { grid-template-columns: 1fr; } }
