:root {
  --paper: #eeebe3;
  --ink: #161512;
  --muted: #6a655b;
  --rule: #d3cdbf;
  --accent: #e2401c;
  --screen: #141412;
  --screen-2: #1d1c19;
  --screen-ink: #e8e4d9;
  --screen-muted: #8b867b;
  --screen-rule: #2e2c28;
  --good: #59b36f;
  --bad: #ff6a46;
  --c1: #e2b33c;
  --c2: #5ab0d6;
  --sq-light: #d8d0bb;
  --sq-dark: #8a7f68;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12110f;
    --ink: #ece7db;
    --muted: #8f897d;
    --rule: #2b2925;
    --accent: #ff5a32;
    --screen: #1b1a17;
    --screen-2: #24221f;
    --screen-rule: #35322d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12110f;
  --ink: #ece7db;
  --muted: #8f897d;
  --rule: #2b2925;
  --accent: #ff5a32;
  --screen: #1b1a17;
  --screen-2: #24221f;
  --screen-rule: #35322d;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 56px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; }
a:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  padding: 1px 5px;
  border-radius: 2px;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ---------------- top bar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.topbar-in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 48px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mark {
  font-family: var(--display);
  font-variation-settings: "wdth" 125, "wght" 900;
  font-size: 15px;
  letter-spacing: 0;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  padding: 2px 7px;
}
.mark:hover { background: var(--accent); }
.now { color: var(--muted); }
.now::before { content: "§ "; color: var(--accent); }
.topnav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.topnav a { text-decoration: none; }
.topnav a:hover { color: var(--accent); }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------- hero ---------------- */

.hero { padding-top: 40px; padding-bottom: 56px; }

.name {
  margin: 0;
  font-weight: 400;
  font-size: 180px; /* fitted by JS */
  line-height: 0.8;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  user-select: none;
  cursor: default;
}
.name .line { display: block; width: max-content; }
.name .line + .line { margin-top: 0.06em; }
.name .l, .name .dot {
  display: inline-block;
  font-variation-settings: "wdth" var(--w, 100), "wght" var(--g, 850);
  transition: font-variation-settings 0.35s cubic-bezier(.2,.7,.2,1);
}
.name .dot { color: var(--accent); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}
.intro {
  margin: 0;
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.35;
  font-variation-settings: "wdth" 92, "wght" 450;
  max-width: 30ch;
}
.intro mark {
  background: none;
  color: inherit;
  box-shadow: inset 0 -0.38em 0 color-mix(in srgb, var(--accent) 32%, transparent);
}
.hero-facts { margin: 0; }
.hero-facts div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.hero-facts div:first-child { padding-top: 4px; }
.hero-facts dt, .p-meta, .kicker-note, .small, .t-stack, .t-num {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.hero-facts dt { padding-top: 4px; }
.hero-facts dd { margin: 0; }

/* ---------------- section heads / tiles ---------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px 0 16px;
  border-top: 4px solid var(--ink);
}
.kicker {
  margin: 0;
  font-size: 15px;
  font-variation-settings: "wdth" 125, "wght" 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.kicker-note { margin: 0; text-transform: none; letter-spacing: 0; }

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.tiles li { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.tiles a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 210px;
  padding: 16px 18px 18px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.t-name {
  margin-top: auto;
  font-size: 30px;
  line-height: 1;
  font-variation-settings: "wdth" 112, "wght" 800;
  letter-spacing: -0.01em;
}
.t-line { font-size: 15px; line-height: 1.35; }
.tiles a:hover { background: var(--ink); color: var(--paper); }
.tiles a:hover .t-num { color: var(--accent); }
.tiles a:hover .t-stack { color: color-mix(in srgb, var(--paper) 60%, transparent); }

/* ---------------- project ---------------- */

.project { padding-top: 120px; }

.p-head {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 300px;
  grid-template-areas: "num title title" ". tag side";
  column-gap: 24px;
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 4px solid var(--ink);
}
.p-title { display: contents; }
.p-title h2 { grid-area: title; min-width: 0; }
.p-title .p-tag { grid-area: tag; }
.p-side { grid-area: side; }
.p-num {
  grid-area: num;
  align-self: start;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  padding-top: 10px;
}
.p-title h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(40px, 8vw, 118px); /* shrunk by JS if it would overflow */
  line-height: 0.88;
  font-variation-settings: "wdth" 125, "wght" 850;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.p-tag {
  margin: 18px 0 0;
  max-width: 44ch;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.4;
  font-variation-settings: "wdth" 95, "wght" 420;
}
.p-side { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.p-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.p-meta li + li::before { content: "/"; margin-right: 14px; color: var(--rule); }
.p-links { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  display: inline-block;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--accent); color: #fff; }

.p-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 56px;
  padding-top: 40px;
}
.p-text { grid-column: 1; grid-row: 1; padding-left: 114px; }
.p-demo { grid-column: 2; grid-row: 1; }
.p-demo .demo { position: sticky; top: 72px; }

.p-text h3, .about-side h3 {
  margin: 36px 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}
.p-text h3:first-child { margin-top: 0; }
.p-text p { margin: 0 0 12px; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 10px 0 10px 40px;
  border-top: 1px solid var(--rule);
}
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 13px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.steps b, .calls b { font-variation-settings: "wdth" 100, "wght" 700; font-weight: normal; }

.calls { margin: 0; padding: 0; list-style: none; }
.calls li { position: relative; padding: 6px 0 6px 26px; }
.calls li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }

.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  margin: 4px 0 12px;
}
.figures div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 16px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.figures b {
  font-size: 40px;
  line-height: 1;
  font-weight: normal;
  font-variation-settings: "wdth" 75, "wght" 800;
  font-variant-numeric: tabular-nums;
}
.figures span { font-size: 14px; line-height: 1.35; color: var(--muted); }
.small { text-transform: none; letter-spacing: 0; line-height: 1.6; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid var(--rule);
}

/* ---------------- demo shell ---------------- */

.demo {
  background: var(--screen);
  color: var(--screen-ink);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  border: 1px solid var(--screen-rule);
}
.demo-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--screen-rule);
  color: var(--screen-muted);
  font-size: 11.5px;
}
.demo-tag { color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; font-size: 10.5px; padding-top: 1px; }
.demo-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--screen-rule);
}
.demo-hint { margin: 0; padding: 10px 14px; border-top: 1px solid var(--screen-rule); color: var(--screen-muted); font-size: 11.5px; }
.demo-hint b { color: var(--screen-ink); font-weight: 500; }
.demo button { font: inherit; cursor: pointer; }

.run {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 6px 14px;
  font-weight: 700 !important;
}
.run:hover { background: var(--screen-ink); color: var(--screen); }
.run:disabled { opacity: 0.45; cursor: default; }
.run:disabled:hover { background: var(--accent); color: #fff; }

/* ---- syscora ---- */
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--screen-rule);
}
.seg { display: flex; flex-wrap: wrap; border: 1px solid var(--screen-rule); }
.seg button {
  background: none;
  color: var(--screen-muted);
  border: 0;
  padding: 5px 10px;
}
.seg button + button { border-left: 1px solid var(--screen-rule); }
.seg button[aria-pressed="true"] { background: var(--screen-ink); color: var(--screen); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--screen-ink); }
.toggles { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sw { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--screen-muted); }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw span::before { content: "[ ] "; white-space: pre; }
.sw:hover span { color: var(--screen-ink); }
.sw input:checked + span { color: var(--screen-ink); }
.sw input:checked + span::before { content: "[x] "; color: var(--accent); }

.log { min-height: 372px; padding: 12px 14px; }
.log > div { padding: 2px 0; animation: in 0.2s ease-out both; }
@keyframes in { from { opacity: 0; transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .log > div { animation: none; } }
.log .user { color: var(--screen-ink); padding-bottom: 8px; }
.log .user b, .log .agent b { color: var(--accent); font-weight: 700; margin-right: 8px; }
.log .sys { color: var(--screen-muted); }
.log .tool { display: flex; justify-content: space-between; gap: 12px; color: var(--screen-ink); }
.log .tool::before { content: "→ "; color: var(--screen-muted); white-space: pre; }
.log .tool span { flex: 1; overflow-wrap: anywhere; }
.log .ok { color: var(--good); font-style: normal; }
.log .check { color: var(--c2); padding-top: 8px; }
.log .check::before { content: "⟲ "; }
.log .agent { margin-top: 10px; padding: 8px 10px; background: var(--screen-2); border-left: 2px solid var(--screen-muted); }
.log .agent.good { border-left-color: var(--good); }
.log .agent.warn { border-left-color: var(--c1); }
.log .reality { margin-top: 8px; color: var(--screen-muted); }
.log .reality.bad { color: var(--bad); }
.log .reality.bad::before { content: "✕ "; }
.log .receipt {
  margin-top: 8px;
  border: 1px dashed var(--screen-muted);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 1px 10px;
}
.receipt span { color: var(--screen-muted); }
.receipt .v-ok { color: var(--good); font-weight: 700; }
.receipt .v-bad { color: var(--bad); font-weight: 700; }

/* ---- researchgraph ---- */
.rg-q { margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--screen-rule); }
.rg-q span { background: var(--accent); color: #fff; padding: 0 5px; margin-right: 8px; font-weight: 700; }
.rg-nodes { list-style: none; margin: 0; padding: 10px 14px; }
.rg-nodes > li {
  display: grid;
  grid-template-columns: 14px 128px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 3px 0;
  color: var(--screen-muted);
}
.rg-nodes .d {
  width: 8px;
  height: 8px;
  border: 1px solid var(--screen-muted);
  align-self: center;
}
.rg-nodes li.active { color: var(--screen-ink); }
.rg-nodes li.active .d { background: var(--accent); border-color: var(--accent); animation: blink 0.8s steps(2) infinite; }
.rg-nodes li.done { color: var(--screen-ink); }
.rg-nodes li.done .d { background: var(--screen-ink); border-color: var(--screen-ink); }
.rg-nodes li.wait .d { background: var(--c1); border-color: var(--c1); }
.rg-nodes li.loop .st { color: var(--c1); }
@keyframes blink { 50% { opacity: 0.2; } }
.rg-nodes .st { overflow-wrap: anywhere; }
.rg-nodes .st em { font-style: normal; color: var(--screen-muted); }

.rg-plan { grid-column: 2 / -1; margin: 6px 0 4px; padding: 8px 10px; background: var(--screen-2); color: var(--screen-ink); }
.rg-plan ol { margin: 0 0 8px; padding-left: 18px; }
.rg-plan button { background: var(--screen-ink); color: var(--screen); border: 0; padding: 4px 10px; font-weight: 700; }
.rg-plan button:hover { background: var(--accent); color: #fff; }

.lanes { grid-column: 2 / -1; display: grid; gap: 4px; margin: 4px 0 2px; }
.lane { display: grid; grid-template-columns: 22px minmax(0, 1fr) 70px; gap: 8px; align-items: center; font-size: 11.5px; }
.lane .bar { height: 6px; background: var(--screen-2); position: relative; }
.lane .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--screen-ink); }
.lane.thin .bar i { background: var(--c1); }
.lane .cnt { color: var(--screen-muted); text-align: right; }

.rg-report { margin: 0 14px 12px; padding: 12px; border: 1px solid var(--screen-rule); }
.rg-report h4 { margin: 0 0 8px; font-size: 11px; font-weight: 500; color: var(--screen-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.rg-report p { margin: 0 0 6px; }
.rg-report sup { color: var(--accent); font-size: 10px; margin-left: 2px; }
.rg-report del { color: var(--screen-muted); text-decoration-color: var(--bad); }
.rg-report .why { display: block; color: var(--bad); font-size: 11px; }
.rg-report .bib { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--screen-rule); color: var(--screen-muted); font-size: 11px; }
.rg-report .bib div { overflow-wrap: anywhere; }

/* ---- syncraft ---- */
.sc-panes { display: grid; grid-template-columns: 1fr 1fr; }
.sc-pane + .sc-pane { border-left: 1px solid var(--screen-rule); }
.sc-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--screen-rule);
  color: var(--screen-ink);
  font-size: 11.5px;
}
.sc-tab i { width: 8px; height: 8px; background: var(--c); }
.sc-tab span { margin-left: auto; color: var(--screen-muted); }
.sc-pane textarea {
  display: block;
  width: 100%;
  height: 230px;
  resize: none;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  background: var(--screen);
  color: var(--screen-ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
  overflow: auto;
  caret-color: var(--c);
  tab-size: 2;
}
.sc-pane textarea:focus { outline: none; background: var(--screen-2); }
.sc-foot {
  padding: 5px 12px;
  border-top: 1px solid var(--screen-rule);
  font-size: 11px;
  color: var(--screen-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-foot b { font-weight: 500; }
.sc-run { justify-content: space-between; }
.sc-lang { color: var(--screen-muted); }
.sc-out {
  margin: 0;
  min-height: 104px;
  padding: 10px 14px;
  border-top: 1px solid var(--screen-rule);
  background: var(--screen-2);
  font: inherit;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--screen-muted);
}
.sc-out .h { color: var(--screen-muted); display: block; margin-bottom: 4px; }
.sc-out .o { color: var(--screen-ink); }
.sc-out .e { color: var(--bad); }
.sc-out .t { color: var(--c1); }

/* ---- chess pal ---- */
.cp-steps {
  list-style: none;
  margin: 0;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--screen-rule);
}
.cp-steps li { padding: 1px 7px; color: var(--screen-muted); border: 1px solid var(--screen-rule); font-size: 11px; }
.cp-steps li.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cp-steps li.done { color: var(--screen-ink); border-color: var(--screen-muted); }

.cp-stage { padding: 26px 14px; display: flex; justify-content: center; overflow: hidden; }
.cp-board-wrap {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  outline: 2px solid transparent;
  outline-offset: 6px;
  transition: transform 0.9s cubic-bezier(.2,.7,.2,1), outline-color 0.3s;
}
.cp-board-wrap.skew { transform: perspective(900px) rotateX(24deg) rotateZ(-5deg) scale(0.86); }
.cp-board-wrap.found { outline-color: var(--accent); }
.cp-board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); width: 100%; height: 100%; }
.cp-board .sq { position: relative; display: grid; place-items: center; background: var(--sq-light); }
.cp-board .sq.dk { background: var(--sq-dark); }
.cp-board.split .sq { box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.cp-board .sq.scan { box-shadow: inset 0 0 0 2px var(--accent); }
.cp-board .pc {
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", "Apple Symbols", serif;
  font-size: clamp(22px, 5.6vw, 34px);
  line-height: 1;
}
.cp-board .pc.w { color: #fbf8f0; -webkit-text-stroke: 1px #1a1916; }
.cp-board .pc.b { color: #1a1916; }
.cp-board .lb {
  position: absolute;
  left: 2px;
  top: 1px;
  font-size: 8.5px;
  line-height: 1;
  color: #1a1916;
  background: rgba(255,255,255,.72);
  padding: 1px 2px;
}
.cp-board .lb.empty { background: none; color: rgba(0,0,0,.4); }
.cp-arrow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.cp-arrow line { stroke-dasharray: 7; stroke-dashoffset: 7; }
.cp-arrow.on { opacity: 0.92; }
.cp-arrow.on line { animation: draw 0.6s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.cp-read { border-top: 1px solid var(--screen-rule); padding: 10px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; }
.cp-read div { display: flex; flex-direction: column; min-width: 0; }
.cp-read span { font-size: 10.5px; color: var(--screen-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cp-read b { font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cp-fen b { font-size: 11.5px; }
#cp-best { color: var(--accent); }

/* ---------------- about ---------------- */

.about { padding-top: 140px; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 64px;
  padding-top: 32px;
}
.about-text p { margin: 0 0 16px; max-width: 58ch; }
.about-text .about-lead {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  font-variation-settings: "wdth" 88, "wght" 700;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  max-width: 22ch;
}
.about-side h3:first-child { margin-top: 0; }
.also, .find { list-style: none; margin: 0; padding: 0; }
.also li { padding: 10px 0; border-top: 1px solid var(--rule); }
.also a, .find a { font-variation-settings: "wdth" 110, "wght" 700; text-decoration: none; }
.also a:hover, .find a:hover { color: var(--accent); }
.also span { display: block; font-size: 15px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.cert { margin: 0; font-size: 15px; }
.find li { padding: 4px 0; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 120px;
  padding-top: 18px;
  padding-bottom: 40px;
  border-top: 4px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------------- responsive ---------------- */

@media (max-width: 1100px) {
  .p-head { grid-template-columns: 60px minmax(0, 1fr); grid-template-areas: "num title" ". tag" ". side"; row-gap: 0; }
  .p-side { margin-top: 20px; }
  .p-text { padding-left: 0; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .p-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .p-text, .p-demo { grid-column: 1; grid-row: auto; }
  .p-demo .demo { position: static; }
  .hero-grid, .about-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar-in { gap: 14px; font-size: 11px; }
  .topnav { gap: 14px; }
  .topnav a { display: none; }
  .hero { padding-top: 28px; padding-bottom: 40px; }
  .hero-grid { margin-top: 32px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tiles a { min-height: 0; padding: 14px; }
  .t-name { margin-top: 18px; font-size: 26px; }
  .project { padding-top: 88px; }
  .p-head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "num" "title" "tag" "side"; }
  .p-num { padding: 0 0 10px; }
  .figures b { font-size: 32px; }
  .sc-panes { grid-template-columns: 1fr; }
  .sc-pane + .sc-pane { border-left: 0; border-top: 1px solid var(--screen-rule); }
  .sc-pane textarea { height: 160px; }
  .rg-nodes > li { grid-template-columns: 14px 104px minmax(0, 1fr); }
  .cp-read { grid-template-columns: minmax(0, 1fr) auto; }
  .cp-fen { grid-column: 1 / -1; grid-row: 2; }
  .about { padding-top: 100px; }
}
