/* Palette: karma saffron (events), fascia thread blue (network), brahma verdigris
   (emergent state), bruise (negative propagation) on a cool bone ground. */
:root {
  --ground: #ECEFF3;
  --ground-2: #E1E6EC;
  --ink: #1A2233;
  --ink-soft: #4A556B;
  --thread: #8A97BF;
  --saffron: #C9820F;
  --verdigris: #2D7A70;
  --bruise: #9A3F5E;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;
  --measure: 36rem;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #141A26; --ground-2: #1C2433; --ink: #E4E8EF; --ink-soft: #A3ADC2;
    --thread: #6B79A3; --saffron: #E6A63A; --verdigris: #52AE9F; --bruise: #D0708F;
  }
}
:root[data-theme="dark"] {
  --ground: #141A26; --ground-2: #1C2433; --ink: #E4E8EF; --ink-soft: #A3ADC2;
  --thread: #6B79A3; --saffron: #E6A63A; --verdigris: #52AE9F; --bruise: #D0708F;
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1.0625rem/1.7 var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; }
p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--thread); }
a:hover { text-decoration-color: var(--saffron); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--ground); padding: .5rem 1rem; z-index: 10; }
.fine { font-size: .82rem; color: var(--ink-soft); }

/* ── Header ─────────────────────────────────────────────────────────── */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 5vw, 4rem); flex-wrap: wrap;
}
.mark { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 600 1rem var(--display); }
.mark svg { width: 28px; height: 28px; }
.mark .k { fill: var(--saffron); } .mark .f { fill: var(--thread); } .mark .b { fill: var(--verdigris); }
.mark .t { stroke: var(--thread); stroke-width: 1.5; }
.top nav { display: flex; gap: 1.5rem; font: 500 .95rem var(--display); }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

section { padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 4rem); }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-top: clamp(1.5rem, 4vw, 3rem);
}
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.9rem); font-weight: 750; letter-spacing: -.035em;
  font-variation-settings: "opsz" 96; max-width: 12ch; margin-bottom: .45em;
}
.lede { font-size: 1.18rem; max-width: 32rem; color: var(--ink-soft); }
.fire {
  margin-top: .5rem; font: 600 1.02rem var(--display); color: var(--ground);
  background: var(--saffron); border: 0; padding: .85rem 1.4rem; border-radius: 999px; cursor: pointer;
  box-shadow: 0 0 0 0 var(--saffron); transition: box-shadow .5s ease, transform .1s;
}
.fire:active { transform: scale(.98); }
.fire.pulsing { box-shadow: 0 0 0 14px transparent; }
.counter { margin-top: 1rem; font-size: .9rem; color: var(--ink-soft); min-height: 1.5em; }

.nets { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.net { background: var(--ground-2); border-radius: 18px 18px 4px 4px; padding: .75rem .9rem 1rem; }
.net svg { width: 100%; height: auto; display: block; }
.net figcaption { font-size: .88rem; line-height: 1.4; color: var(--ink-soft); margin-top: .4rem; }
.net figcaption strong { display: block; font: 650 1.02rem var(--display); color: var(--ink); }
.out { display: block; margin-top: .6rem; font: 600 .95rem/1.35 var(--display); min-height: 2.7em; }
.out.good { color: var(--verdigris); } .out.bad { color: var(--bruise); }
.nets > .fine { grid-column: 1 / -1; margin: 0; }

.edge { stroke: var(--thread); stroke-width: 1.2; opacity: .55; transition: stroke .35s, opacity .35s, stroke-width .35s; }
.edge.lit { stroke: var(--saffron); opacity: 1; stroke-width: 2.2; }
.node { fill: var(--ground); stroke: var(--thread); stroke-width: 1.6; transition: fill .4s, stroke .4s, r .4s; }
.node.entry { stroke: var(--saffron); stroke-width: 2.4; }
.node.hot { fill: var(--saffron); stroke: var(--saffron); }
.node.adapted { stroke: var(--verdigris); }
.node.strained { fill: var(--bruise); stroke: var(--bruise); }

/* ── Model ──────────────────────────────────────────────────────────── */
.model { background: var(--ground-2); }
.chain {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem);
  counter-reset: layer;
}
.chain li { position: relative; }
.chain h2 {
  font-size: clamp(3rem, 7vw, 5.6rem); font-weight: 300; letter-spacing: -.04em;
  font-variation-settings: "opsz" 96; margin-bottom: .1em;
}
.chain li:not(:last-child) h2::after {
  content: "→"; font-weight: 300; color: var(--thread); position: absolute; right: -0.2em; top: 0;
  font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.6;
}
.c-karma h2 { color: var(--saffron); } .c-fascia h2 { color: var(--thread); } .c-brahma h2 { color: var(--verdigris); }
.gloss { font: italic 1.12rem var(--text); color: var(--ink); }
.chain p:last-child { color: var(--ink-soft); max-width: var(--measure); }

.formal { margin-top: clamp(3rem, 7vw, 5rem); }
.eq {
  font: 400 clamp(1.5rem, 4.2vw, 3.2rem)/1.2 var(--display); letter-spacing: -.02em;
  overflow-x: auto; white-space: nowrap; margin-bottom: .5em; padding-bottom: .2em;
}
.eq .op { color: var(--ink-soft); } .v-k { color: var(--saffron); } .v-f { color: var(--thread); }
.v-s { color: var(--verdigris); } .v-r { color: var(--ink-soft); }
.eq-key, .recursion p { max-width: var(--measure); color: var(--ink-soft); }
.recursion { margin-top: 2.5rem; border-left: 3px solid var(--verdigris); padding-left: 1.25rem; }

/* ── Analysis ───────────────────────────────────────────────────────── */
.analysis > h2, .lib-head h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 650; letter-spacing: -.025em; margin-bottom: 1.5rem; }
.dirs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); max-width: 64rem; }
.dirs h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: .75rem; }
.dirs ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.dirs ol li::marker { font-family: var(--display); color: var(--saffron); font-weight: 600; }
.dirs article > p { color: var(--ink-soft); font-size: .95rem; }
.applied { margin-top: 2.5rem; max-width: var(--measure); font-style: italic; }

/* ── Library ────────────────────────────────────────────────────────── */
.library { background: var(--ground-2); }
.lib-head p { max-width: var(--measure); color: var(--ink-soft); }
.papers { display: grid; gap: 0; margin-top: 2rem; max-width: 56rem; }
.papers .entry {
  display: block; text-decoration: none; padding: 1.4rem 0;
  border-top: 1px solid color-mix(in srgb, var(--thread) 45%, transparent);
}
.papers .entry:hover h3 { color: var(--saffron); }
.entry h3 { font-size: 1.45rem; font-weight: 600; margin-bottom: .35rem; transition: color .2s; }
.entry .meta { font: 500 .88rem var(--display); color: var(--ink-soft); margin-bottom: .5rem; }
.entry p { max-width: var(--measure); margin: 0; }
.status { color: var(--ink-soft); }
.status code { font-size: .9em; background: var(--ground); padding: .1em .35em; border-radius: 4px; }

.paper { max-width: 44rem; margin-top: 2rem; }
.paper .back { font: 600 .95rem var(--display); display: inline-block; margin-bottom: 1.5rem; }
.paper h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: .5rem; }
.paper h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.case { border-left: 3px solid var(--thread); padding: .25rem 0 .25rem 1.2rem; margin-bottom: 2rem; }
.case.positive { border-color: var(--verdigris); } .case.negative { border-color: var(--bruise); }
.case h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.case dl { display: grid; grid-template-columns: 5.5rem 1fr; gap: .35rem 1rem; margin: 0 0 .75rem; }
.case dt { font: 600 .92rem/1.7 var(--display); }
.case dt.k { color: var(--saffron); } .case dt.f { color: var(--thread); } .case dt.b { color: var(--verdigris); }
.case dd { margin: 0; }
.refs { padding-left: 1.2rem; font-size: .95rem; }
.refs li { margin-bottom: .5rem; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.foot { padding: 3rem clamp(1.25rem, 5vw, 4rem); font-size: .95rem; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr; }
  .chain li:not(:last-child) h2::after { content: "↓"; position: static; margin-left: .3em; font-size: .6em; }
}
@media (max-width: 600px) {
  .dirs { grid-template-columns: 1fr; }
  .nets { gap: .6rem; } .net { padding: .5rem .6rem .75rem; } .out { font-size: .85rem; }
  .top nav { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* ═══════════════════════ v2: multi-page components ═══════════════════════ */
.top nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; }
.top nav { flex-wrap: wrap; }

.page-head { padding-bottom: 1rem; }
.page-head h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); font-weight: 750; letter-spacing: -.035em; max-width: 16ch; margin-bottom: .4em; font-variation-settings: "opsz" 96; }
.block > h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 650; letter-spacing: -.025em; margin-bottom: 1.25rem; max-width: 22ch; }
.block.alt, .manifesto { background: var(--ground-2); }
.section-lede { max-width: var(--measure); color: var(--ink-soft); font-size: 1.08rem; }
.more { margin-top: 2rem; font: 600 1rem var(--display); }

.button {
  display: inline-block; font: 600 1rem var(--display); text-decoration: none; cursor: pointer;
  background: var(--ink); color: var(--ground); border: 2px solid var(--ink); padding: .7rem 1.25rem; border-radius: 999px;
}
.button.ghost { background: transparent; color: var(--ink); }
.button.small { padding: .45rem .9rem; font-size: .92rem; }
.button:hover { background: var(--saffron); border-color: var(--saffron); color: var(--ground); }
.linkish { background: none; border: 0; padding: 0; font: 500 .95rem var(--display); color: var(--ink-soft); text-decoration: underline; cursor: pointer; }

/* Lens bar */
.lensbar {
  position: sticky; top: 0; z-index: 5; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap;
  padding: calc(.6rem + env(safe-area-inset-top, 0px)) clamp(1.25rem, 5vw, 4rem) .6rem;
  background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--thread) 35%, transparent);
}
.lensbar-label { font: 500 .9rem var(--display); color: var(--ink-soft); margin-right: .3rem; }
.lensbar button, .ke-presets button {
  font: 500 .9rem var(--display); color: var(--ink); background: transparent; cursor: pointer;
  border: 1.5px solid var(--thread); border-radius: 999px; padding: .35rem .85rem;
}
.lensbar button[aria-pressed="true"], .ke-presets button[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }

.lens-pair { display: grid; gap: 2rem; margin: 1.25rem 0; }
.lens-pair > div > p, .lens-pair > div > .scroll { max-width: 40rem; }
.lens-tag { display: none; font: 600 .85rem var(--display); color: var(--ink-soft); margin-bottom: .4rem; }
:root[data-lens="plain"] .lens-pair .physics, :root[data-lens="physics"] .lens-pair .plain { display: none; }
:root[data-lens="both"] .lens-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
:root[data-lens="both"] .lens-tag { display: block; }
:root[data-lens="both"] .lens-pair .physics { border-left: 2px solid var(--thread); padding-left: 1.5rem; }
.plain p:first-of-type, .plain .lens-tag + p { font-size: 1.12rem; }

.tex-block { overflow-x: auto; overflow-y: hidden; padding: .6rem 0; font: 400 1.15rem var(--display); color: var(--ink); }
.tex-block .katex { font-size: 1.18em; }
.katex { color: inherit; }

/* Tables */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prim { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.5; }
.prim th, .prim td { text-align: left; vertical-align: top; padding: .65rem .9rem .65rem 0; border-top: 1px solid color-mix(in srgb, var(--thread) 40%, transparent); }
.prim thead th { font: 600 .88rem var(--display); color: var(--ink-soft); border-top: 0; }
.prim td:first-child { font-family: var(--display); font-weight: 600; white-space: nowrap; }
.versus th[scope="row"] { font: 600 .92rem var(--display); white-space: nowrap; }
.versus td:first-child { font-family: var(--text); font-weight: 400; white-space: normal; }
.matrix { min-width: 860px; }
.matrix th[scope="row"] { font: 650 1rem var(--display); min-width: 9rem; }
.matrix td:first-child { font-family: var(--text); font-weight: 400; white-space: normal; }

.code { background: var(--ground-2); border-radius: 10px; padding: 1rem 1.2rem; overflow-x: auto; font-size: .85rem; line-height: 1.55; max-width: 44rem; }
.block.alt .code { background: var(--ground); }

/* Home */
.manifesto { padding-top: clamp(4rem, 9vw, 7rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.manifesto-line { font: 300 clamp(2rem, 4.8vw, 4rem)/1.12 var(--display); letter-spacing: -.03em; max-width: 22ch; margin-bottom: .8em; }
.manifesto-line span { display: block; }
.m-k { color: var(--saffron); } .m-f { color: var(--thread); } .m-b { color: var(--verdigris); }
.manifesto-note { max-width: var(--measure); color: var(--ink-soft); font-size: 1.1rem; }
.model { background: var(--ground); }
.ways h2, .cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 650; letter-spacing: -.025em; margin-bottom: .75rem; }
.domains { margin: 2rem 0 0; max-width: 60rem; }
.domains > div { display: grid; grid-template-columns: minmax(13rem, 1fr) 2fr; gap: .5rem 2rem; padding: 1.2rem 0; border-top: 1px solid color-mix(in srgb, var(--thread) 45%, transparent); }
.domains dt { font: 600 1.05rem var(--display); }
.domains dd { margin: 0; color: var(--ink-soft); }
.domains dd strong { color: var(--ink); font-weight: 600; }
.cta-band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); background: var(--ink); color: var(--ground); }
.cta-band p { color: color-mix(in srgb, var(--ground) 78%, transparent); max-width: 30rem; }
.cta-band .button { background: var(--saffron); border-color: var(--saffron); color: #fff; }
.cta-band .button.ghost { background: transparent; color: var(--ground); border-color: var(--ground); }

/* Memory lab */
.memlab { margin: 2rem 0 0; display: grid; grid-template-columns: minmax(14rem, 1fr) 2.4fr; gap: 1.5rem 2.5rem; align-items: start; max-width: 64rem; }
.memlab-controls label, .ke-controls label, .scrub-ctl { display: block; font: 600 .95rem var(--display); margin-bottom: 1.2rem; }
.memlab-controls output, .ke-controls output, .scrub-ctl output { float: right; font-variant-numeric: tabular-nums; color: var(--saffron); }
input[type="range"] { width: 100%; accent-color: var(--saffron); margin-top: .5rem; }
.memlab-verdict { font: 600 1rem/1.4 var(--display); }
.memlab-verdict.good { color: var(--verdigris); } .memlab-verdict.bad { color: var(--bruise); }
#memChart { width: 100%; height: auto; }
#memChart .grid { stroke: var(--thread); opacity: .2; }
#memChart .tick { fill: var(--ink-soft); font: 12px var(--display); }
#memChart .thresh { stroke: var(--bruise); stroke-dasharray: 5 5; stroke-width: 1.5; }
#memChart .thresh-lbl { fill: var(--bruise); }
#memChart .ref { fill: none; stroke: var(--thread); stroke-width: 2; opacity: .6; }
#memChart .mine { fill: none; stroke: var(--verdigris); stroke-width: 3; }
#memChart .mine.bad { stroke: var(--bruise); }
.memlab figcaption { grid-column: 1 / -1; }

.loop { width: min(100%, 26rem); height: auto; display: block; margin-top: 1.5rem; }
.loop .load { fill: none; stroke: var(--saffron); stroke-width: 2.5; }
.loop .unload { fill: none; stroke: var(--verdigris); stroke-width: 2.5; }
.loop .area { fill: var(--bruise); opacity: .14; }
.loop .axis { stroke: var(--ink-soft); }
.loop text { font: 12px var(--display); fill: var(--ink-soft); }
.loop .lbl-load { fill: var(--saffron); } .loop .lbl-unload { fill: var(--verdigris); } .loop .lbl-area { fill: var(--bruise); font-weight: 600; }

/* Reverse: steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; max-width: 46rem; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 2rem 3.5rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -.15rem; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  display: grid; place-items: center; font: 650 1.05rem var(--display); background: var(--saffron); color: #fff;
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 1.12rem; top: 2.4rem; bottom: .3rem; width: 2px; background: var(--thread); opacity: .45; }
.steps h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.steps p { color: var(--ink-soft); }

/* Reverse: kinetic energy */
.ke { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(14rem, 1fr); gap: 1.5rem 3rem; margin-top: 2rem; max-width: 64rem; }
.ke-presets { border: 0; padding: 0; margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.ke-presets legend { font: 600 .95rem var(--display); margin-bottom: .5rem; padding: 0; }
.ke-big { font: 750 clamp(3rem, 7vw, 4.8rem)/1 var(--display); letter-spacing: -.03em; margin-bottom: .3rem; font-variant-numeric: tabular-nums; color: var(--saffron); }
.ke-big .unit { font-size: .4em; font-weight: 500; color: var(--ink-soft); }
.ke-sub { color: var(--ink-soft); margin-bottom: .6rem; }
.ke-bar { height: 12px; background: var(--ground); border-radius: 6px; overflow: hidden; margin: .4rem 0 .6rem; }
.ke-bar span { display: block; height: 100%; background: var(--saffron); transition: width .25s; }
.ke > .scroll { grid-column: 1 / -1; }
.ke-table td { font-variant-numeric: tabular-nums; }
.ke-table th[scope="row"] { font: 600 .95rem var(--display); }

/* Reverse: scrubber */
.scrub { max-width: 52rem; margin-top: 1.5rem; }
#web { width: 100%; height: auto; display: block; margin-bottom: 1rem; }
.wedge { fill: none; stroke: var(--thread); transition: stroke .3s, stroke-width .3s; }
.wedge.strained { stroke: var(--saffron); }
.wedge.severed { stroke: var(--bruise); stroke-dasharray: 6 6; opacity: .7; }
.wedge.hot { stroke: var(--bruise); }
.wnode { fill: var(--ground); stroke: var(--thread); stroke-width: 2.5; transition: fill .3s, stroke .3s; }
.wnode.strained { stroke: var(--saffron); fill: color-mix(in srgb, var(--saffron) 25%, var(--ground)); }
.wnode.missing { stroke: var(--bruise); stroke-dasharray: 4 4; fill: transparent; }
.wnode.hit { fill: var(--bruise); stroke: var(--bruise); }
.wlabel { font: 600 13px var(--display); fill: var(--ink); }
.scrub-steps { display: flex; justify-content: space-between; list-style: none; padding: 0; margin: -.6rem 0 1rem; font: 500 .82rem var(--display); color: var(--ink-soft); }
.scrub-caption { font-size: 1.08rem; max-width: 42rem; min-height: 5.2em; }

/* Origins */
.phases { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.phases > li { padding: 0 0 2.5rem 1.6rem; border-left: 2px solid var(--thread); position: relative; }
.phases > li::before { content: ""; position: absolute; left: -8px; top: .35rem; width: 14px; height: 14px; border-radius: 50%; background: var(--ground); border: 2.5px solid var(--saffron); }
.phases > li:last-child { border-left-color: transparent; }
.phases h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 650; letter-spacing: -.02em; margin-bottom: .3rem; }
.where { font: 500 .95rem var(--display); color: var(--ink-soft); }
.memorial { background: var(--ink); color: var(--ground); text-align: center; }
.memorial-name { font: 300 clamp(1.8rem, 4vw, 2.8rem) var(--display); letter-spacing: -.02em; margin-bottom: .5rem; }
.memorial p:last-child { max-width: 34rem; margin: 0 auto; color: color-mix(in srgb, var(--ground) 80%, transparent); }

/* Workspace */
.ws { display: grid; grid-template-columns: minmax(14rem, 1fr) 2.6fr; gap: 2rem clamp(2rem, 5vw, 4rem); align-items: start; }
.ws-side { position: sticky; top: 1rem; }
.acct { margin-bottom: 1.5rem; }
.ws-h { font-size: 1.15rem; margin-bottom: .6rem; }
.mine { list-style: none; padding: 0; margin: 0; }
.mine li { display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; padding: .5rem 0; border-top: 1px solid color-mix(in srgb, var(--thread) 35%, transparent); }
.mine li.on .mine-open { color: var(--saffron); }
.mine-open { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: 600 .95rem var(--display); color: var(--ink); display: grid; }
.mine-del { background: none; border: 0; cursor: pointer; font: 500 .82rem var(--display); color: var(--bruise); }
.ws-form { max-width: 44rem; }
.fld { display: block; margin-bottom: 1.2rem; }
.fld span { display: block; font: 600 .98rem var(--display); margin-bottom: .35rem; }
.fld input, .fld textarea, .prompt-out {
  width: 100%; font: 400 1rem/1.55 var(--text); color: var(--ink); background: var(--ground-2);
  border: 1.5px solid transparent; border-radius: 10px; padding: .7rem .85rem; resize: vertical;
}
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--saffron); }
.fld input::placeholder, .fld textarea::placeholder { color: var(--ink-soft); opacity: .75; }
.ws-actions { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; margin-top: .5rem; }
.ws-msg { margin-top: 1rem; font: 500 .95rem var(--display); }
.ws-msg.good { color: var(--verdigris); } .ws-msg.bad { color: var(--bruise); }
.prompt-out { margin-top: .6rem; font-size: .85rem; }

/* Footer v2 */
.foot { border-top: 1px solid color-mix(in srgb, var(--thread) 35%, transparent); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.foot-grid p { max-width: 34rem; }
.foot-domains { list-style: none; padding: 0; margin: 0; font: 500 .92rem/1.9 var(--display); }

@media (max-width: 900px) {
  :root[data-lens="both"] .lens-pair { grid-template-columns: 1fr; }
  :root[data-lens="both"] .lens-pair .physics { border-left: 0; padding-left: 0; border-top: 2px solid var(--thread); padding-top: 1.25rem; }
  .memlab, .ke, .ws, .cta-band, .foot-grid { grid-template-columns: 1fr; }
  .ws-side { position: static; }
  .domains > div { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .scrub-steps { font-size: .72rem; }
  .lensbar-label { width: 100%; }
}
.memorial-for { font: 500 1rem var(--display); color: color-mix(in srgb, var(--ground) 70%, transparent); margin-bottom: .2rem; }
.memorial-words { margin: 2rem auto; max-width: 34rem; padding: 0; }
.memorial-words p { font: italic 1.2rem/1.6 var(--text); color: var(--ground); margin-bottom: .9rem; }
.memorial-sign { font: 600 .95rem var(--display); color: color-mix(in srgb, var(--ground) 80%, transparent); }
