/* Manifold LLC - site stylesheet
   Hand-written. No framework. Fonts are self-hosted (see assets/fonts). */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f6f4ee;
  --paper-2: #eeebe3;
  --card: #fbfaf7;
  --ink: #16181d;
  --ink-2: #474b54;
  --ink-3: #62666f;
  --rule: #d9d5cb;
  --rule-strong: #8f8a7e;
  --accent: #1e3a5f;
  --accent-deep: #142a46;
  --accent-tint: #e6ebf2;
  --ok: #2d5a3a;
  --warn: #8a3b1f;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
ul, ol, dl { margin: 0; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: #fff; padding: 0.5rem 0.8rem;
  z-index: 100; font-size: 0.9rem;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.num {
  font-family: var(--mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.nowrap { white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 4rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.75rem 0;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand .word {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand .word small {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-left: 0.55rem;
  vertical-align: 0.15em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 1.9rem);
  font-size: 0.92rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-2);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.site-nav .nav-cta {
  margin-left: 0.5rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  color: var(--ink);
  font-size: 0.86rem;
}
.site-nav .nav-cta:hover { border-color: var(--ink); }

@media (max-width: 760px) {
  .site-header .wrap { min-height: 0; padding-bottom: 0.5rem; }
  .brand { padding: 0.65rem 0 0.2rem; }
  html { scroll-padding-top: 7rem; }
  .site-nav {
    width: 100%;
    overflow-x: auto;
    gap: 1.25rem;
    padding: 0.25rem 0 0.4rem;
    scrollbar-width: none;
    font-size: 0.88rem;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
    padding-right: 2.5rem;
  }
  .site-nav a { white-space: nowrap; }
  .site-nav .nav-cta { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  border: 1px solid transparent;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.05rem, 4.1vw, 3.2rem);
  line-height: 1.07;
  letter-spacing: -0.018em;
  margin: 1.1rem 0 1.4rem;
  text-wrap: balance;
}
.hero .lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 36em;
  margin-bottom: 1.8rem;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }
.hero-figure { position: relative; }
.hero-figure img { width: 100%; height: auto; }
.manifold-stage { position: relative; }
.manifold-stage canvas { display: block; width: 100%; border-radius: 4px; cursor: grab; outline-offset: 4px; }
.manifold-stage canvas.is-dragging { cursor: grabbing; }
.hero-figure figcaption {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 420px; margin-top: 0.5rem; }
  .hero-figure figcaption { font-size: 0.68rem; }
}

/* Facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.facts > div {
  padding: 1.1rem 1.25rem 1.1rem 0;
  border-left: 1px solid var(--rule);
  padding-left: 1.25rem;
}
.facts > div:first-child { border-left: 0; padding-left: 0; }
.facts dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.facts dd { margin: 0; font-size: 0.98rem; line-height: 1.4; overflow-wrap: anywhere; }
.facts dd a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 400px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div { border-left: 0; padding-left: 0; }
  .facts > div:nth-child(n+2) { border-top: 1px solid var(--rule); }
  .datatable > div { grid-template-columns: 6rem minmax(0, 1fr); }
}

/* ---------- Sections ---------- */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  border-bottom: 1px solid var(--rule);
}
.section.alt { background: var(--paper-2); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  align-items: end;
}
.section-head .eyebrow { margin-bottom: 0.6rem; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.section-head .intro {
  font-size: 1.08rem;
  color: var(--ink-2);
  max-width: 40em;
  margin: 0;
}
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: 1rem; }
}

/* ---------- Capabilities ---------- */
.cap-list { border-top: 1px solid var(--rule-strong); }
.cap { border-bottom: 1px solid var(--rule); }
.cap summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 3rem minmax(0, 17rem) minmax(0, 1fr) 1.5rem; gap: 0.4rem 1.5rem; align-items: baseline; padding: 1.15rem 0; }
.cap summary::-webkit-details-marker { display: none; }
.cap summary::after { content: "+"; font: 400 1.3rem/1 var(--sans); color: var(--accent); justify-self: end; }
.cap[open] summary::after { content: "\2212"; }
.cap summary:hover h3 { color: var(--accent); }
.cap summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.cap .num { font-family: var(--mono); font-weight: 500; color: var(--ink-3); font-size: 0.74rem; letter-spacing: 0.06em; }
.cap h3 { font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.01em; }
.cap-lead { color: var(--ink-2); }
.cap-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 3rem; padding: 0.2rem 1.5rem 1.6rem 4.5rem; animation: wf-open 0.3s ease; }
.cap-body p { color: var(--ink-2); margin: 0; }
.cap .deliverables .eyebrow { margin-bottom: 0.4rem; }
.cap .deliverables ul { list-style: none; }
.cap .deliverables li { padding: 0.45rem 0; border-top: 1px solid var(--rule); font-size: 0.95rem; line-height: 1.4; }
@media (max-width: 860px) {
  .cap summary { grid-template-columns: 2.2rem minmax(0, 1fr) 1.5rem; }
  .cap-lead { grid-column: 2 / 3; grid-row: 2; }
  .cap-body { grid-template-columns: 1fr; padding: 0 0 1.4rem 0; }
}
@media (prefers-reduced-motion: reduce) { .cap-body, .person-more p { animation: none !important; } }

/* ---------- Work ---------- */
.work-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.work { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 0 1.35rem 1.2rem; scroll-margin-top: 5rem; }
.work-fig { margin: 0 -1.35rem 1.1rem; border-bottom: 1px solid var(--rule); background: var(--paper); border-radius: 6px 6px 0 0; color: var(--ink-3); }
.work-fig svg { display: block; width: 100%; height: auto; }
.work-fig .a { color: var(--accent); }
.work .eyebrow { color: var(--accent); margin-bottom: 0.5rem; }
.work h3 { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 0.5rem; text-wrap: pretty; }
.work-sum { color: var(--ink-2); font-size: 0.97rem; margin: 0 0 0.8rem; }
.work-links { font-family: var(--mono); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.04em; margin: -0.2rem 0 0.8rem; color: var(--ink-3); }
.work-more { border-top: 1px solid var(--rule); padding-top: 0.7rem; }
.work-more summary { list-style: none; cursor: pointer; font: 500 0.7rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.work-more summary::-webkit-details-marker { display: none; }
.work-more summary::after { content: "+"; font: 400 1.1rem/1 var(--sans); color: var(--accent); }
.work-more[open] summary::after { content: "\2212"; }
.work-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.work-more dl { margin-top: 0.9rem; animation: wf-open 0.3s ease; }
.work dt { font-family: var(--mono); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.2rem; }
.work dd { margin: 0 0 0.8rem; color: var(--ink-2); font-size: 0.93rem; }
.work dd:last-child { margin-bottom: 0; }
@media (max-width: 1000px) { .work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .work-list { grid-template-columns: 1fr; gap: 1.1rem; } }

/* Work figures: small looping line drawings */
.wf-pulse { animation: wf-pulse 4.2s ease-in-out infinite; }
.wf-pulse.d2 { animation-delay: 0.35s; } .wf-pulse.d3 { animation-delay: 0.7s; } .wf-pulse.d4 { animation-delay: 1.05s; } .wf-pulse.d5 { animation-delay: 1.4s; } .wf-pulse.d6 { animation-delay: 1.75s; }
.wf-draw { animation: wf-draw 4.2s ease-in-out infinite; }
.wf-ring { transform-box: fill-box; transform-origin: center; animation: wf-ring 3.6s linear infinite; }
.wf-ring.d2 { animation-delay: 1.2s; } .wf-ring.d3 { animation-delay: 2.4s; }
.wf-travel { animation: wf-travel 3.6s ease-in-out infinite; }
@keyframes wf-pulse { 0%, 100% { opacity: 0.3; } 35%, 60% { opacity: 1; } }
@keyframes wf-draw { 0% { stroke-dashoffset: 150; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes wf-ring { 0% { transform: scale(0.1); opacity: 0.9; } 100% { transform: scale(1); opacity: 0; } }
@keyframes wf-travel { 0%, 10% { transform: translateX(0); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 90%, 100% { transform: translateX(92px); opacity: 0; } }
@keyframes wf-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .work-fig *, .work-more dl { animation: none !important; } .wf-ring { opacity: 0.35; } }

/* ---------- Approach ---------- */
.approach {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  counter-reset: approach;
}
.approach li {
  counter-increment: approach;
  padding: clamp(1.3rem, 2.6vw, 2rem);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.approach li::before {
  content: counter(approach, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.76rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-bottom: 1.1rem;
}
.approach h3 {
  font-family: var(--serif);
  font-size: 1.32rem;
  line-height: 1.2;
  margin-bottom: 0.55rem;
}
.approach p { color: var(--ink-2); margin: 0; font-size: 0.98rem; }
@media (max-width: 960px) { .approach { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .approach { grid-template-columns: 1fr; } }

/* ---------- Company ---------- */
.company-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.prose p { color: var(--ink-2); font-size: 1.05rem; }
.prose p.first {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.prose h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 2rem 0 0.6rem;
}
.datatable {
  border-top: 1px solid var(--rule-strong);
  font-size: 0.95rem;
}
.datatable > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.datatable dt {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.25rem;
}
.datatable dd { margin: 0; overflow-wrap: anywhere; }
.datatable dd .muted { color: var(--ink-3); }
.datatable-note { margin-top: 0.9rem; font-size: 0.86rem; color: var(--ink-3); }
@media (max-width: 860px) {
  .company-grid { grid-template-columns: 1fr; }
}

/* Principals */
.principals-head { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0.5rem 3rem; align-items: end; }
.principals-head h3 { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.15; }
.principals-head p { color: var(--ink-2); margin: 0; }
.principals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.25rem;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.person {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--card);
}
.person .eyebrow { margin-bottom: 0.5rem; }
.person h4 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 0.7rem; }
.person p { color: var(--ink-2); font-size: 0.98rem; }
.person .person-sum { margin: 0; }
.person-more { border-top: 1px solid var(--rule); margin-top: 0.9rem; padding-top: 0.7rem; }
.person-more summary { list-style: none; cursor: pointer; font: 500 0.7rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.person-more summary::-webkit-details-marker { display: none; }
.person-more summary::after { content: "+"; font: 400 1.1rem/1 var(--sans); color: var(--accent); }
.person-more[open] summary::after { content: "\2212"; }
.person-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.person-more p { margin: 0.9rem 0 0; animation: wf-open 0.3s ease; }
.person .person-meta { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.02em; color: var(--ink-3); margin: 0.9rem 0 0; line-height: 1.6; }
@media (max-width: 860px) {
  .principals-head { grid-template-columns: 1fr; }
  .principals { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.86rem; font-weight: 500; color: var(--ink-2); }
.field label .opt { color: var(--ink-3); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--warn); }
.field .err { font-size: 0.84rem; color: var(--warn); min-height: 0; }
.field .err:empty { display: none; }
.form .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.form .status { font-size: 0.92rem; color: var(--ink-2); min-height: 1.4em; }
.form .status.ok { color: var(--ok); }
.form .status.err { color: var(--warn); }
.form .fine { font-size: 0.84rem; color: var(--ink-3); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }

.contact-aside .datatable dd a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.contact-aside .note {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--rule);
  background: var(--card);
  font-size: 0.92rem;
  color: var(--ink-2);
  border-radius: 4px;
}
.contact-aside .note strong { color: var(--ink); font-weight: 500; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2.25rem 0 2.75rem;
  font-size: 0.88rem;
  color: var(--ink-3);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  align-items: flex-start;
}
.site-footer .left { display: flex; align-items: center; gap: 0.6rem; }
.site-footer .left svg { width: 18px; height: 18px; opacity: 0.8; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.site-footer a { text-decoration: none; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.site-footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-footer .colophon { width: 100%; margin-top: 0.4rem; font-size: 0.8rem; }

/* ---------- Utility pages (404) ---------- */
.simple {
  min-height: 60vh;
  display: grid;
  align-content: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.simple h1 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); margin: 0.6rem 0 1rem; }
.simple p { color: var(--ink-2); max-width: 36em; }

/* ---------- Print ---------- */
@media print {
  .site-header, .skip-link, .hero .actions, .form, .site-footer .colophon { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 1.5rem 0; border: 0; }
  a { text-decoration: none; color: inherit; }
  .eyebrow, h2, h3, .section-head { break-after: avoid; }
  .cap-body, .approach li, .work, .datatable > div, .contact-aside .note { break-inside: avoid; }
  .work-fig * { animation: none !important; }
  .hero-figure { max-width: 50%; }
}


/* Principal photos */
.person { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.person-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; filter: grayscale(100%); border: 1px solid var(--rule); }
@media (max-width: 560px) { .person { grid-template-columns: minmax(0, 1fr); gap: 1rem; } .person-photo { width: 6.5rem; } }

/* Manifold lesson */
.lesson { display: flex; align-items: center; gap: 0.9rem; width: 100%; border-top: 1px solid var(--rule); padding-top: 0.7rem; }
.lesson-arrow { width: 2rem; height: 2rem; border: 1px solid var(--rule-strong); border-radius: 50%; background: none; color: var(--ink); font: 400 1rem/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lesson-arrow:hover { border-color: var(--ink); }
.lesson-arrow:disabled { opacity: 0.3; cursor: default; }
.lesson-arrow:focus-visible, .manifold-stage canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lesson-title { font: 500 0.7rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); flex: 1; }
.lesson-title .n { color: var(--accent); margin-right: 0.8em; }
.lesson-text { width: 100%; margin: 0.8rem 0 0; font-family: var(--sans); font-weight: 400; font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); letter-spacing: 0; min-height: 4.5em; transition: opacity 0.25s ease; }
.lesson-text.is-fading { opacity: 0; }
.lesson-text a { color: var(--accent); text-decoration-color: var(--rule-strong); }
.lesson-text a:hover { text-decoration-color: currentColor; }
@media (prefers-reduced-motion: reduce) { .lesson-text { transition: none; } }

/* Hint above the drawing */
.manifold-hint { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem; font: 500 0.68rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); transition: opacity 0.5s ease; }
.manifold-hint svg { width: 1rem; height: 1rem; color: var(--accent); flex: none; }
.manifold-hint.is-done { opacity: 0.35; }
@media (prefers-reduced-motion: reduce) { .manifold-hint { transition: none; } }
