/* ============================================================
   ARUS · NOUVEAU
   A dossier, not a scroll.
   ============================================================ */

:root {
  --ink:#1A1915;
  --bone:#F2EDE3;
  --verd:#3D6B5C;
  --terra:#9B5A3E;
  --sur-d:#232320;
  --sur-l:#E8E2D8;
  --brd-d:#2E2E2A;
  --brd-l:#D4CEC4;
  --mut-d:#8A8580;
  --mut-l:#7A6F65;

  --f-disp: 'DM Serif Display', 'Iowan Old Style', Georgia, serif;
  --f-ui:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --dur-fast: .18s;
  --dur-mid:  .32s;
  --dur-slow: .6s;
  --ease:     cubic-bezier(.2, .7, .2, 1);

  --mast-h: 72px;
}

body.bone {
  --bg: var(--bone);
  --tx: var(--ink);
  --muted: var(--mut-l);
  --surface: var(--sur-l);
  --border: var(--brd-l);
  --ac:  var(--verd);
  --ac2: var(--terra);
  --term-bg: rgba(26,25,21,.04);
}
body.dark {
  --bg: var(--ink);
  --tx: var(--bone);
  --muted: var(--mut-d);
  --surface: var(--sur-d);
  --border: var(--brd-d);
  --ac:  var(--verd);
  --ac2: var(--terra);
  --term-bg: rgba(242,237,227,.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--f-ui);
  font-weight: 300;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background var(--dur-mid) var(--ease), color var(--dur-mid) var(--ease);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
a { color: inherit; }

/* ============================================================
   GRAIN (ambient)
   ============================================================ */
#grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 3;
  opacity: .035; mix-blend-mode: multiply;
}
body.dark #grain { mix-blend-mode: screen; opacity: .05; }

/* ============================================================
   MASTHEAD
   ============================================================ */
.mast {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 40px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-mid), border-color var(--dur-mid);
}
.mast-l { display: flex; align-items: baseline; gap: 12px; }
.mark { width: 24px; height: 26px; color: var(--ac); align-self: center; }
.mark #liver-mark-mini {
  transform-origin: 24px 26px;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.mast-word {
  font-family: var(--f-disp);
  font-size: 20px;
  letter-spacing: .28em;
  color: var(--tx);
}
.mast-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.mast-nav { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
  border-radius: 2px;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-btn:hover { color: var(--tx); background: var(--term-bg); }
.nav-btn.active {
  color: var(--tx);
  background: color-mix(in srgb, var(--ac) 14%, transparent);
  box-shadow: inset 0 -2px 0 0 var(--ac);
}
.nav-btn.active .nav-idx { color: var(--ac); }
.nav-idx {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--ac);
  opacity: .75;
}
.mast-connect {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-left: 10px;
  padding: 7px 16px;
  background: var(--ac2);
  color: var(--bone);
  border: none;
  border-radius: 2px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--dur-fast);
  white-space: nowrap;
}
.mast-connect:hover { background: var(--tx); color: var(--bg); }
.theme-tog {
  margin-left: 20px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.tog-track {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  padding: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}
.theme-tog:hover .tog-track {
  border-color: var(--ac);
  box-shadow: 0 1px 4px rgba(0,0,0,.10), 0 0 0 2px color-mix(in srgb, var(--ac) 18%, transparent);
}
.tog-thumb { display: none; }
.tog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 10px;
  border-radius: 10px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  user-select: none;
  transition: background var(--dur-fast), color var(--dur-fast), font-weight var(--dur-fast);
  white-space: nowrap;
}
.tog-sun { background: var(--ac); color: #fff; font-weight: 500; }
.tog-moon { background: color-mix(in srgb, var(--border) 60%, transparent); color: var(--muted); font-weight: 400; }
body.dark .tog-sun { background: color-mix(in srgb, var(--border) 60%, transparent); color: var(--muted); font-weight: 400; }
body.dark .tog-moon { background: var(--ac); color: #fff; font-weight: 500; }

@media (max-width: 900px) {
  .mast { padding: 14px 20px; }
  .mast-nav .nav-btn { display: none; }
  .mast-nav .nav-btn:last-of-type,
  .theme-tog { display: inline-flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  padding: clamp(60px, 8vh, 100px) 40px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}
.hero > * { min-width: 0; max-width: 100%; }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: .18;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

/* Terminal strip */
.term-strip {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: var(--term-bg);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
}
.term-l, .term-r { display: flex; align-items: center; gap: 18px; }
.term-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 0 0 var(--ac);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac) 50%, transparent); }
  100% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--ac) 0%, transparent); }
}
.term-key { color: var(--tx); font-weight: 500; }
.term-v { color: var(--ac2); }
.term-meta { opacity: .8; }
@media (max-width: 800px) {
  .term-r .term-meta:not(:last-child) { display: none; }
}

/* Hero body */
.hero-body {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: clamp(10px, 2vh, 28px) 0;
}
.hero-body > * { min-width: 0; max-width: 100%; }
@media (max-width: 820px) {
  .hero-body { grid-template-columns: 1fr; gap: 20px; }
}

.hero-lede {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ac);
  margin-bottom: clamp(10px, 1.8vh, 24px);
}
.lede-rule {
  display: inline-block; width: 40px; height: 1px; background: var(--ac);
}
.hero-h {
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 66px);
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--tx);
  margin-bottom: clamp(10px, 2.5vh, 32px);
}
.hero-h em { color: var(--ac); font-style: italic; }
.hero-line {
  display: block;
  opacity: 1;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-meta {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-bottom: 30px;
  max-width: 520px;
  opacity: 1;
}
.meta-row {
  display: grid; grid-template-columns: 100px 1fr;
  padding: 7px 0;
  font-size: 12px;
  border-bottom: 1px dotted var(--border);
}
.meta-row:last-child { border-bottom: none; }
.meta-k {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.meta-v { color: var(--tx); font-weight: 400; }

/* New quiet byline (replaces resume-style hero-meta) */
.hero-byline {
  border-top: 1px solid var(--border);
  padding-top: clamp(8px, 1.5vh, 20px);
  margin-top: clamp(8px, 1.5vh, 24px);
  margin-bottom: clamp(8px, 1.5vh, 24px);
  opacity: 1;
  max-width: 640px;
}
.hb-name {
  font-family: var(--f-serif);
  font-size: 19px;
  line-height: 1.2;
  color: var(--tx);
  letter-spacing: -0.005em;
}
.hb-name em {
  font-style: italic;
  color: var(--ac);
}
.hb-sub {
  margin-top: 6px;
  font-family: var(--f-sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: 0.005em;
  margin-bottom: 8px;
}

.hero-cta-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  opacity: 1;
  margin-top: 40px;
}
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 13px;
  letter-spacing: .03em;
  font-weight: 500;
  border-radius: 2px;
  transition: all var(--dur-fast) var(--ease);
}
.cta-p {
  background: var(--ac); color: var(--bone);
}
.cta-p:hover { background: var(--tx); color: var(--bg); transform: translateY(-1px); }
.cta-g {
  border: 1px solid var(--border); color: var(--tx);
}
.cta-g:hover { border-color: var(--tx); background: var(--term-bg); }
.cta .arr { display: inline-block; transition: transform var(--dur-fast); }
.cta:hover .arr { transform: translate(3px, -3px); }

/* ============================================================
   LIVER STAGE
   ============================================================ */
.hero-r { position: relative; min-width: 0; max-width: 100%; min-height: 400px; max-height: 575px; overflow: hidden; }
.liver-stage {
  position: relative;
  width: 100%;
  max-height: 575px;
  height: 575px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--term-bg), transparent 60%);
  overflow: hidden;
}
.liver-label-tl, .liver-label-br {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 3;
}
.liver-cap {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  z-index: 3;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .7;
}
.liver-label-tl { display: none; }
.liver-label-br {
  bottom: 14px; right: 16px;
  text-align: right;
  display: flex; flex-direction: column; gap: 2px; align-items: flex-end;
}
.lr-k { color: var(--muted); }
.lr-v { color: var(--ac); font-weight: 500; }

.liver-svg {
  width: 100%; height: 100%;
  max-width: 100%; max-height: 100%;
  display: block;
  color: var(--tx);
}

.liver-svg #liver-outer {
  animation: liver-breathe 7s ease-in-out infinite;
  transform-origin: 260px 280px;
}
@keyframes liver-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.012); opacity: .85; }
}

/* Unified dots — all three tiers */
.dot {
  cursor: pointer;
  transition: opacity var(--dur-fast);
}
.dot circle {
  fill: var(--bg);
  stroke: var(--ac);
  stroke-width: 1.2;
  transition: fill var(--dur-fast), stroke-width var(--dur-fast);
}
.dot-t1 circle { opacity: .9; }
.dot-t2 circle { opacity: .9; }
.dot-t3 circle { opacity: .9; }
.dot:hover circle,
.dot.active circle {
  fill: var(--ac);
  stroke: var(--ac);
  opacity: 1;
  stroke-width: 1.8;
}
.dot-num {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: .03em;
  fill: var(--ac);
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  transition: fill var(--dur-fast);
}
.dot:hover .dot-num,
.dot.active .dot-num { fill: var(--bone); }

/* Hover panel */
.liver-panel {
  position: absolute;
  bottom: 18px; left: 18px;
  width: 260px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 2px solid var(--ac);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  pointer-events: none;
  z-index: 4;
}
.liver-panel.on {
  opacity: 1; transform: none;
}
.lp-tags { display: flex; align-items: center; gap: 4px; margin-bottom: 11px; flex-wrap: wrap; }
.lp-idx {
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: .08em;
  margin-right: 3px;
  opacity: .6;
}
.lp-field {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ac);
  border: 1px solid var(--border);
  padding: 1px 5px;
}
.lp-tagsep {
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--muted);
  opacity: .35;
  margin: 0 1px;
}
.lp-sth {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 1px 5px;
}
.lp-sth {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 2px;
}
.lp-title {
  font-family: var(--f-disp);
  font-size: 17px;
  line-height: 1.25;
  color: var(--tx);
  margin-bottom: 10px;
}
.lp-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.lp-cta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ac);
  padding: 0;
  transition: color var(--dur-fast);
}
.lp-cta:hover { color: var(--tx); }

/* ============================================================
   REEL — scrolls + pauses on featured engagements
   ============================================================ */
.reel {
  position: relative; z-index: 2;
  margin: 20px -40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--term-bg);
  overflow: visible;
}
.reel-label {
  position: absolute;
  top: 0;
  left: 16px;
  transform: translateY(-50%);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 3;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.reel-viewport {
  position: relative;
  overflow: hidden;
  padding: 16px 0;
  mask-image: linear-gradient(to right, transparent 0, #000 180px, #000 calc(100% - 60px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 180px, #000 calc(100% - 60px), transparent);
}
.reel-track {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  will-change: transform;
  padding: 0 40px;
}
.reel-item {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: color var(--dur-mid), opacity var(--dur-mid);
  flex: 0 0 auto;
}
.reel-item .ri-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
  opacity: .4;
  transition: background var(--dur-mid), opacity var(--dur-mid), transform var(--dur-mid);
}
.reel-item.featured .ri-dot { background: var(--ac); opacity: 1; }
.reel-item:hover,
.reel-item.hov { color: var(--tx); }
.reel-item.hov .ri-dot { transform: scale(1.6); background: var(--ac); opacity: 1; }
.reel-item.featured.hov .ri-label,
.reel-item.hov .ri-label { color: var(--ac); }

/* Hover tooltip — 3-4 keywords + one-line summary, anchored below item */
.reel-tip {
  position: absolute;
  bottom: auto;
  top: auto;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-top-color: var(--ac);
  padding: 10px 14px 11px;
  min-width: 200px;
  max-width: 360px;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  box-shadow: 0 -4px 14px rgba(0,0,0,0.08);
}
.reel-tip.on {
  opacity: 1;
}
.reel-tip .rt-kw {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 7px;
}
.reel-tip .rt-tag {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ac);
  border: 1px solid var(--border);
  padding: 1px 5px;
}
.reel-tip .rt-sum {
  font-family: var(--f-disp);
  font-size: 13px;
  line-height: 1.35;
  color: var(--tx);
  white-space: normal;
}

/* Keep the viewport's mask from clipping the tooltip */
.reel-viewport { mask-image: none; -webkit-mask-image: none; }
.reel-track { mask-image: none; -webkit-mask-image: none; }

/* Reel inside a chamber — different gutter */
.reel.reel-in-chamber {
  margin: 14px -48px 36px;
}

/* ============================================================
   PAGE NAVIGATION ARROWS
   ============================================================ */
.page-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 18px;
  color: var(--muted);
  padding: 24px 18px;
  transition: color var(--dur-mid) var(--ease), opacity var(--dur-mid) var(--ease);
  opacity: 0.35;
  letter-spacing: 0;
  line-height: 1;
  user-select: none;
}
.page-arrow:hover { color: var(--tx); opacity: 1; }
.page-arrow-l { left: 0; right: auto; }
.page-arrow-r { right: 0; left: auto; }
.page-arrow.hidden { opacity: 0; pointer-events: none; }

/* ============================================================
   CHAMBERS — now full-screen pages
   ============================================================ */
.chamber {
  position: fixed;
  top: var(--mast-h); left: 0; right: 0; bottom: 0;
  width: 100%;
  background: var(--bg);
  z-index: 90;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--dur-slow) var(--ease), visibility var(--dur-slow), background var(--dur-mid);
  overflow-y: auto;
  padding: 40px 80px 80px;
}
.chamber.on {
  transform: translateX(0) !important;
  visibility: visible !important;
}
.chamber.prev {
  transform: translateX(-30%) !important;
  visibility: hidden !important;
}

@media (max-width: 900px) {
  .chamber { padding: 28px 28px 60px; }
}

.ch-close {
  position: sticky; top: 0;
  float: right;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
  padding: 8px 12px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  z-index: 2;
  background: var(--bg);
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.ch-close:hover { color: var(--tx); border-color: var(--tx); }

.ch-head {
  display: flex; align-items: baseline; gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.ch-idx {
  font-family: var(--f-disp);
  font-style: italic;
  font-size: 48px;
  color: var(--ac);
  line-height: 1;
}
.ch-crumb {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
}

/* ============================================================
   WORK chamber
   ============================================================ */
.work-stage { display: flex; flex-direction: column; gap: 0px; }
.work-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 11px 24px;
  background: var(--surface);
  cursor: default;
  transition: background var(--dur-fast), transform var(--dur-fast);
  border-left: 2px solid transparent;
}
.work-card:hover {
  background: color-mix(in srgb, var(--surface) 70%, var(--ac) 8%);
  border-left-color: var(--ac);
}
@media (max-width: 800px) { .work-card { grid-template-columns: 1fr; gap: 20px; } }

.wc-l { display: flex; flex-direction: column; gap: 10px; }
.wc-num {
  font-family: var(--f-disp);
  font-size: clamp(36px, 3.6vw, 58px);
  line-height: .9;
  color: var(--ac);
  letter-spacing: -.02em;
  font-feature-settings: "lnum";
}
.wc-num sub {
  font-size: .32em;
  color: var(--muted);
  vertical-align: baseline;
  letter-spacing: .1em;
  margin-left: 6px;
  font-family: var(--f-mono);
  font-style: normal;
}
.wc-delta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ac2);
}
.wc-r { display: flex; flex-direction: column; gap: 8px; }
.wc-client {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ac2);
}
.wc-name {
  font-family: var(--f-disp);
  font-size: 18px;
  line-height: 1.25;
  color: var(--tx);
}
.wc-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
}
.wc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.wc-tag {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--border);
}

/* ============================================================
   DISCIPLINE chamber
   ============================================================ */
.disc-stage { display: flex; flex-direction: column; gap: 20px; }
.disc-intro h2 {
  font-family: var(--f-disp);
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1.1;
  color: var(--tx);
  margin-bottom: 8px;
  font-weight: 400;
}
.disc-intro p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
}
.fw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
@media (max-width: 800px) { .fw-grid { grid-template-columns: 1fr; } }
.fw-cell {
  background: var(--surface);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 14px;
  align-items: start;
  cursor: default;
}
.fw-n {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--ac2);
  grid-column: 1;
  margin-bottom: 4px;
}
.fw-t {
  font-family: var(--f-disp);
  font-size: 15px;
  line-height: 1.25;
  color: var(--tx);
  grid-column: 1;
  margin-bottom: 7px;
}
.fw-diag {
  grid-column: 2;
  grid-row: 1 / span 3;
  color: var(--muted);
}
.fw-diag svg { width: 100%; height: auto; }
.fw-diag .fw-lab {
  font-family: var(--f-mono);
  font-size: 7.5px;
  letter-spacing: .1em;
  fill: var(--muted);
  text-transform: uppercase;
}
.fw-diag .fw-lab.alt { fill: var(--ac2); }
.fw-d {
  grid-column: 1;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ============================================================
   DISCIPLINE — sub-tab toggle (Frameworks ↔ Method)
   ============================================================ */
.disc-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  margin-bottom: 24px;
  align-self: flex-start;
}
.dtog-btn {
  appearance: none;
  background: transparent;
  border: none;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 18px;
  cursor: pointer;
  transition: color var(--dur-fast), background var(--dur-fast);
  border-right: 1px solid var(--border);
}
.dtog-btn:last-child { border-right: none; }
.dtog-btn:hover { color: var(--tx); }
.dtog-btn.dtog-active {
  background: var(--ac);
  color: var(--bone);
}
body.dark .dtog-btn.dtog-active { color: var(--ink); }

/* ============================================================
   METHOD — DICE + CFAE (extensible library)
   ============================================================ */
.disc-method-stage { display: flex; flex-direction: column; gap: 32px; }
.disc-method-stage .disc-intro h2 em { color: var(--ac); font-style: italic; }

.method-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.mm-k { color: var(--ac2); }
.mm-v { color: var(--muted); letter-spacing: .08em; text-transform: none; font-size: 11px; }
.mm-sep { opacity: .4; }

.method-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.method-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 26px 28px 24px;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 18px;
}
.method-cell-empty {
  background: transparent;
  border: 1px dashed var(--border);
  padding: 20px 28px;
  display: block;
  opacity: .65;
}

.m-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.m-num { color: var(--ac); font-weight: 500; }
.m-source { color: var(--muted); letter-spacing: .12em; }
.m-pair { margin-left: auto; color: var(--ac2); letter-spacing: .12em; }

.m-title-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.m-title {
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: .95;
  color: var(--tx);
  letter-spacing: -.01em;
  margin: 0;
}
.m-sub {
  font-family: var(--f-disp);
  font-style: italic;
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--ac);
  line-height: 1.2;
}

.m-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
@media (max-width: 900px) {
  .m-body { grid-template-columns: 1fr; }
}

.m-diag {
  background: color-mix(in srgb, var(--bg) 85%, var(--surface) 15%);
  border: 1px solid var(--border);
  padding: 14px 16px 12px;
  position: relative;
  color: var(--tx);
}
.m-diag svg { width: 100%; height: auto; display: block; }
.m-diag-cap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
.mdc-l { color: var(--ac); }
.mdc-r { letter-spacing: .04em; text-transform: none; font-size: 10px; }

/* DICE diagram styles */
.dice-svg .dice-phase-lbls text {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: .2em;
  fill: var(--muted);
}
.dice-svg .dice-letter {
  font-family: var(--f-disp);
  font-size: 18px;
  fill: var(--ac);
  font-weight: 500;
}
.dice-svg .dice-letter-d { fill: var(--bg); }
.dice-svg .dice-role-name {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .2em;
  fill: var(--tx);
  font-weight: 500;
}
.dice-svg .dice-role-name-d { fill: var(--ac); }
.dice-svg .dice-role-when {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: .04em;
  fill: var(--muted);
}
.dice-svg .dice-foot {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  fill: var(--muted);
}
.dice-svg .dice-pulse {
  filter: drop-shadow(0 0 6px var(--ac));
}

/* CFAE diagram styles */
.cfae-svg .cfae-tier-lbl {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .18em;
  fill: var(--tx);
  font-weight: 500;
}
.cfae-svg .cfae-t1 .cfae-tier-lbl { fill: var(--ac); }
.cfae-svg .cfae-tier-r {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: .04em;
  fill: var(--muted);
}
.cfae-svg .cfae-gate-lbl {
  font-family: var(--f-mono);
  font-size: 6.5px;
  letter-spacing: .12em;
  fill: var(--ac2);
  font-weight: 500;
}
.cfae-svg .cfae-phase {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .18em;
  fill: var(--ac);
  font-weight: 500;
}
.cfae-svg .cfae-phase-rule {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: .03em;
  fill: var(--muted);
}
.cfae-svg .cfae-flow-lbl {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: .18em;
  font-weight: 500;
}
.cfae-svg .cfae-pulse-up,
.cfae-svg .cfae-pulse-dn {
  filter: drop-shadow(0 0 5px currentColor);
}

/* Roles list — right column of m-body */
.m-roles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.m-roles li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--tx);
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border);
}
.m-roles li:last-child { border-bottom: none; padding-bottom: 0; }
.m-roles li b {
  font-weight: 500;
  color: var(--tx);
  margin-right: 4px;
}
.m-role-key {
  font-family: var(--f-disp);
  font-size: 22px;
  line-height: 1;
  color: var(--ac);
  text-align: center;
  border: 1px solid var(--ac);
  padding: 4px 0 5px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--ac) 6%, transparent);
}
.m-tiers .m-role-key {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .1em;
  padding: 8px 0 7px;
}
.m-tiers-extra { padding-top: 4px; }
.m-tiers-extra .m-role-key {
  border-style: dashed;
  color: var(--ac2);
  border-color: var(--ac2);
  background: transparent;
}

/* Context — full-width footer */
.m-context {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.m-ctx-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 800px) {
  .m-ctx-row { grid-template-columns: 1fr; gap: 16px; }
}
.m-ctx-col p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--tx);
  margin: 0;
}
.m-ctx-col em {
  font-style: italic;
  color: var(--ac);
}
.m-ctx-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ac2);
  margin-bottom: 8px;
}
.m-credit {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  color: var(--muted);
  padding-top: 4px;
  font-style: italic;
}

/* Empty placeholder card */
.m-empty {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 14px;
}
.m-empty-rule {
  flex: 0 0 50px;
  height: 1px;
  background: var(--border);
}
.m-empty p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
}

/* Nav dropdown for Discipline */
.nav-drop { position: relative; display: inline-block; }
.nav-btn-drop { display: inline-flex; align-items: center; gap: 4px; }
.nav-caret { font-size: 9px; opacity: .6; margin-left: 2px; }
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 2px solid var(--ac);
  padding: 6px;
  z-index: 100;
  display: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.10);
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu { display: block; }
.nav-drop-item {
  appearance: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  font-family: inherit;
  color: var(--tx);
  border-radius: 1px;
  transition: background var(--dur-fast);
}
.nav-drop-item:hover, .nav-drop-item.active {
  background: color-mix(in srgb, var(--ac) 10%, transparent);
}
.ndi-k { grid-column: 1; grid-row: 1 / span 2; align-self: center; font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em; color: var(--ac); }
.ndi-t { font-family: var(--f-disp); font-size: 16px; line-height: 1.1; color: var(--tx); }
.ndi-d { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .04em; color: var(--muted); margin-top: 2px; }

.disc-foot-hint {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--muted);
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-style: italic;
}

/* ============================================================
   METHOD — clean rebuild
   ============================================================ */

/* Carousel shell */
.method-carousel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 26px;
}
.mc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}
.mc-arrow {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--tx);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
  transition: all var(--dur-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mc-arrow:hover { background: var(--ac); color: var(--bg); border-color: var(--ac); }
.mc-arrow:disabled { opacity: .35; cursor: not-allowed; }
.mc-arrow:disabled:hover { background: transparent; color: var(--tx); border-color: var(--border); }
.mc-arr-x { font-size: 13px; line-height: 1; }
.mc-bullets {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mc-bullet {
  appearance: none;
  background: transparent;
  border: none;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--dur-fast);
}
.mc-bullet.active { color: var(--ac); border-bottom-color: var(--ac); }
.mc-bullet:hover { color: var(--tx); }

.mc-viewport {
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
}
.method-track {
  display: flex;
  flex-direction: row;
  width: 100%;
  transition: transform var(--dur-slow, .6s) cubic-bezier(.2,.7,.2,1);
}
.method-track .method-cell {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  border: none;
  background: transparent;
  padding: 28px 28px 24px;
  box-sizing: border-box;
}
.method-track .method-cell-empty { padding: 60px 28px; }

.mc-hint {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
  opacity: .7;
}
.mc-hint-x { color: var(--ac); margin-right: 6px; }

/* DICE rail (HTML/CSS, no SVG overlap) */
.dice-rail {
  padding: 18px 14px 14px;
  background: color-mix(in srgb, var(--bg) 92%, var(--ac) 4%);
  border: 1px solid var(--border);
}
.dice-axis {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
  position: relative;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 0;
}
.dice-axis-arrow { color: var(--ac); }
.dice-axis-pulse {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent 0%, var(--ac) 50%, transparent 100%);
  background-size: 30% 100%;
  background-repeat: no-repeat;
  animation: diceSweep 5s linear infinite;
}
@keyframes diceSweep {
  0% { background-position: -30% 0; }
  100% { background-position: 130% 0; }
}
.dice-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border-left: 1px solid var(--border);
}
.dice-col {
  padding: 18px 12px 16px;
  border-right: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.dice-col--key { background: color-mix(in srgb, var(--ac) 8%, transparent); }
.dice-phase {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--muted);
  margin-bottom: 4px;
}
.dice-phase--key { color: var(--ac); }
.dice-letter {
  font-family: var(--f-disp);
  font-size: 44px;
  line-height: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ac);
  color: var(--tx);
  background: var(--bg);
  font-weight: 400;
}
.dice-letter--d {
  background: var(--ac);
  color: var(--bg);
  font-size: 50px;
  width: 76px;
  height: 76px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ac) 15%, transparent);
  animation: diceDecide 3s ease-in-out infinite;
}
@keyframes diceDecide {
  0%, 100% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ac) 15%, transparent); }
  50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--ac) 4%, transparent); }
}
.dice-role {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--tx);
  font-weight: 500;
  margin-top: 4px;
}
.dice-when {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--muted);
  font-style: italic;
}
.dice-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 0;
  flex-wrap: wrap;
}
.dice-foot em { color: var(--ac); font-style: normal; }

/* CFAE rail */
.cfae-rail {
  padding: 16px 14px 14px;
  background: color-mix(in srgb, var(--bg) 92%, var(--ac) 4%);
  border: 1px solid var(--border);
}
.cfae-flow {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: stretch;
  gap: 8px;
}
.cfae-flow-up, .cfae-flow-dn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}
.cfae-flow-lbl {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  color: var(--ac2);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-orientation: mixed;
  white-space: nowrap;
}
.cfae-flow-dn .cfae-flow-lbl { color: var(--ac); transform: rotate(0deg); writing-mode: vertical-rl; }
.cfae-flow-bar {
  flex: 1;
  width: 2px;
  position: relative;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ac) 50%, transparent), transparent);
}
.cfae-flow-bar::after {
  content: "";
  position: absolute;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ac2);
  box-shadow: 0 0 8px var(--ac2);
}
.cfae-flow-bar--up::after { animation: cfaeUp 4s ease-in infinite; background: var(--ac2); box-shadow: 0 0 8px var(--ac2); }
.cfae-flow-bar--dn::after { animation: cfaeDn 4s ease-in infinite; background: var(--ac); box-shadow: 0 0 8px var(--ac); }
@keyframes cfaeUp {
  0% { top: 100%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 0%; opacity: 0; }
}
@keyframes cfaeDn {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.cfae-tiers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cfae-tier {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.cfae-tier--1 {
  background: color-mix(in srgb, var(--ac) 10%, var(--bg));
  border-color: var(--ac);
}
.cfae-tier--4 {
  border-style: dashed;
  opacity: .9;
}
.cfae-tier-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.cfae-tier-num {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ac);
  font-weight: 600;
}
.cfae-tier-name {
  font-family: var(--f-disp);
  font-size: 14px;
  color: var(--tx);
  letter-spacing: .02em;
}
.cfae-tier-role {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--muted);
  font-style: italic;
}
.cfae-tier-people {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.cfae-person {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.2px solid var(--ac);
  background: var(--bg);
  display: inline-block;
}
.cfae-person--filled { background: var(--ac); width: 14px; height: 14px; }
.cfae-person--sm { width: 9px; height: 9px; border-width: 1px; }
.cfae-tier-people--async { gap: 3px; }
.cfae-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
  opacity: .6;
}
.cfae-person-cnt {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: var(--muted);
  margin-left: 8px;
  white-space: nowrap;
}

.cfae-gates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 0 4px;
  margin-top: 12px;
  border-top: 1px dashed var(--border);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted);
}
.cfae-gate-lbl {
  letter-spacing: .14em;
  color: var(--tx);
  margin-right: 8px;
}
.cfae-gate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.cfae-gate-x {
  font-weight: 600;
  color: var(--ac);
  letter-spacing: .14em;
}
.cfae-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   M·03 — Naming Evaluation Protocol  (context staircase)
   ============================================================ */
.nep-rail {
  padding: 18px 14px 14px;
  background: color-mix(in srgb, var(--bg) 92%, var(--ac) 4%);
  border: 1px solid var(--border);
}
.nep-stations {
  display: grid;
  grid-template-columns: 1fr 22px 1fr 22px 1fr 22px 1fr;
  align-items: stretch;
  gap: 0;
}
.nep-station {
  padding: 14px 12px 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transform: translateY(8px);
  opacity: 0;
  animation: nepRise .7s cubic-bezier(.2,.7,.2,1) forwards;
}
.nep-s1 { background: color-mix(in srgb, var(--bg) 99%, var(--tx) 1%); animation-delay: .05s; }
.nep-s2 { background: color-mix(in srgb, var(--bg) 96%, var(--ac) 4%); animation-delay: .18s; }
.nep-s3 { background: color-mix(in srgb, var(--bg) 92%, var(--ac) 9%); animation-delay: .31s; }
.nep-s4 {
  background: color-mix(in srgb, var(--bg) 84%, var(--ac) 16%);
  border-color: var(--ac);
  animation-delay: .44s;
}
@keyframes nepRise {
  to { transform: translateY(0); opacity: 1; }
}
.nep-arr {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nep-arr-mark {
  font-family: var(--f-mono);
  color: var(--ac);
  font-size: 14px;
  opacity: .55;
  animation: nepArr 2.6s ease-in-out infinite;
}
.nep-stations .nep-arr:nth-of-type(2) .nep-arr-mark { animation-delay: 0s; }
.nep-stations .nep-arr:nth-of-type(4) .nep-arr-mark { animation-delay: .35s; }
.nep-stations .nep-arr:nth-of-type(6) .nep-arr-mark { animation-delay: .7s; }
@keyframes nepArr {
  0%, 100% { transform: translateX(-3px); opacity: .25; }
  50%      { transform: translateX(3px);  opacity: 1;   }
}
.nep-stage {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  color: var(--ac);
}
.nep-name {
  font-family: var(--f-disp);
  font-size: 18px;
  letter-spacing: .04em;
  color: var(--tx);
  font-weight: 500;
}
.nep-add {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  color: var(--ac2);
  padding: 3px 6px;
  border: 1px dashed var(--border);
  align-self: flex-start;
}
.nep-s4 .nep-add {
  border-style: solid;
  border-color: var(--ac);
  color: var(--ac);
  background: color-mix(in srgb, var(--ac) 10%, transparent);
}
.nep-desc {
  font-family: var(--f-mono);
  font-size: 10px;
  line-height: 1.55;
  color: var(--muted);
}
.nep-meter {
  margin-top: 16px;
}
.nep-meter-cap {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .14em;
}
.nep-meter-lbl { color: var(--tx); }
.nep-meter-rule { color: var(--ac2); font-style: italic; letter-spacing: .04em; text-transform: lowercase; }
.nep-meter-track {
  position: relative;
  height: 8px;
  background: color-mix(in srgb, var(--border) 50%, transparent);
  overflow: visible;
}
.nep-meter-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    transparent 0%,
    color-mix(in srgb, var(--ac) 30%, transparent) 25%,
    color-mix(in srgb, var(--ac) 65%, transparent) 65%,
    var(--ac) 100%);
  transform-origin: left;
  transform: scaleX(0);
  animation: nepFill 1.6s cubic-bezier(.2,.7,.2,1) .6s forwards;
}
@keyframes nepFill { to { transform: scaleX(1); } }
.nep-meter-pulse {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 22px;
  background: linear-gradient(to right, transparent, color-mix(in srgb, var(--ac) 70%, transparent), transparent);
  filter: blur(1px);
  opacity: 0;
  animation: nepPulse 4.2s ease-in-out 2.2s infinite;
}
@keyframes nepPulse {
  0%   { left: 0%;  opacity: 0; }
  10%  { opacity: .9; }
  90%  { opacity: .9; }
  100% { left: calc(100% - 22px); opacity: 0; }
}
.nep-meter-ticks {
  position: relative;
  height: 18px;
  margin-top: 2px;
}
.nep-meter-ticks span {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--muted);
  transform: translateX(-50%);
}
.nep-meter-ticks span:first-child { transform: translateX(0); }
.nep-meter-ticks span:last-child  { transform: translateX(-100%); }

.nep-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-family: var(--f-mono);
  font-size: 9.5px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}
.nep-foot-l { color: var(--tx); }
.nep-foot-r { color: var(--ac2); font-style: italic; }

/* ============================================================
   M·04 — Architecture Evaluation Framework  (rubric × held-across arc)
   ============================================================ */
.bpaef-rail {
  padding: 16px 14px 14px;
  background: color-mix(in srgb, var(--bg) 92%, var(--ac) 4%);
  border: 1px solid var(--border);
}
.bpaef-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--bg);
}
.bpaef-h, .bpaef-c, .bpaef-q {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  line-height: 1.55;
  color: var(--muted);
}
.bpaef-h {
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg) 94%, var(--tx) 6%);
  text-transform: uppercase;
}
.bpaef-h-c { color: var(--tx); }
.bpaef-c {
  background: color-mix(in srgb, var(--bg) 97%, var(--ac) 3%);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bpaef-c b {
  font-family: var(--f-disp);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--tx);
  letter-spacing: .01em;
  margin-top: 2px;
}
.bpaef-c i {
  font-style: italic;
  font-family: var(--f-disp);
  font-size: 11.5px;
  color: var(--muted);
}
.bpaef-n {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--ac);
}
.bpaef-q { display: flex; align-items: center; }

.bpaef-arc {
  margin-top: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px 16px 14px;
}
.bpaef-arc-h {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .14em;
}
.bpaef-arc-lbl { color: var(--ac); }
.bpaef-arc-rule { color: var(--muted); font-style: italic; letter-spacing: .04em; text-transform: lowercase; }

.bpaef-arc-track {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  position: relative;
  padding-top: 8px;
}
.bpaef-arc-track::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  border-top: 1px dashed color-mix(in srgb, var(--ac) 70%, transparent);
}
.bpaef-arc-track::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 8%;
  width: 9px;
  height: 9px;
  background: var(--ac);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--ac);
  animation: bpaefSweep 5.5s ease-in-out infinite;
}
@keyframes bpaefSweep {
  0%   { left: 8%;  opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: calc(92% - 9px); opacity: 0; }
}

.bpaef-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  padding-top: 10px;
}
.bpaef-phase::before {
  content: "";
  position: absolute;
  top: -4px;
  width: 9px;
  height: 9px;
  background: var(--bg);
  border: 1.5px solid var(--ac);
  border-radius: 50%;
  z-index: 1;
}
.bpaef-phase-name {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--tx);
  font-weight: 600;
}
.bpaef-phase-rule {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--muted);
  font-style: italic;
}
.bpaef-phase-dots {
  display: flex;
  gap: 5px;
}
.bpaef-phase-dots span {
  width: 7px;
  height: 7px;
  background: var(--ac);
  opacity: .85;
  border-radius: 1px;
  animation: bpaefDot 2.4s ease-in-out infinite;
}
.bpaef-phase-dots span:nth-child(1) { animation-delay: 0s; }
.bpaef-phase-dots span:nth-child(2) { animation-delay: .12s; }
.bpaef-phase-dots span:nth-child(3) { animation-delay: .24s; }
.bpaef-phase-dots span:nth-child(4) { animation-delay: .36s; }
.bpaef-phase-dots span:nth-child(5) { animation-delay: .48s; }
.bpaef-phase:nth-child(2) .bpaef-phase-dots span { animation-delay: calc(.6s + var(--d, 0s)); }
.bpaef-phase:nth-child(2) .bpaef-phase-dots span:nth-child(1) { --d: 0s; }
.bpaef-phase:nth-child(2) .bpaef-phase-dots span:nth-child(2) { --d: .12s; }
.bpaef-phase:nth-child(2) .bpaef-phase-dots span:nth-child(3) { --d: .24s; }
.bpaef-phase:nth-child(2) .bpaef-phase-dots span:nth-child(4) { --d: .36s; }
.bpaef-phase:nth-child(2) .bpaef-phase-dots span:nth-child(5) { --d: .48s; }
.bpaef-phase:nth-child(3) .bpaef-phase-dots span { animation-delay: calc(1.2s + var(--d, 0s)); }
.bpaef-phase:nth-child(3) .bpaef-phase-dots span:nth-child(1) { --d: 0s; }
.bpaef-phase:nth-child(3) .bpaef-phase-dots span:nth-child(2) { --d: .12s; }
.bpaef-phase:nth-child(3) .bpaef-phase-dots span:nth-child(3) { --d: .24s; }
.bpaef-phase:nth-child(3) .bpaef-phase-dots span:nth-child(4) { --d: .36s; }
.bpaef-phase:nth-child(3) .bpaef-phase-dots span:nth-child(5) { --d: .48s; }
@keyframes bpaefDot {
  0%, 100% { opacity: .35; transform: scale(.92); }
  50%      { opacity: 1;   transform: scale(1.05); }
}

.bpaef-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-family: var(--f-mono);
  font-size: 9.5px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}
.bpaef-foot-l { color: var(--tx); }
.bpaef-foot-r { color: var(--ac2); font-style: italic; }

@media (max-width: 800px) {
  .nep-stations { grid-template-columns: 1fr; }
  .nep-arr { transform: rotate(90deg); padding: 4px 0; }
  .bpaef-grid { grid-template-columns: 1fr; }
  .bpaef-h:nth-child(2), .bpaef-h:nth-child(3) { display: none; }
  .bpaef-q::before {
    content: attr(data-l) " · ";
    color: var(--tx);
    letter-spacing: .14em;
    margin-right: 4px;
  }
  .bpaef-arc-track { grid-template-columns: 1fr; gap: 14px; }
  .bpaef-arc-track::before, .bpaef-arc-track::after { display: none; }
  .bpaef-phase::before { position: static; margin-bottom: 4px; }
}

/* Hover-to-open dropdown (click also pins it open via .open) */
.nav-drop .nav-drop-menu { display: none; }
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu,
.nav-drop.open .nav-drop-menu { display: block; }
/* Invisible bridge so the 6px gap between button and menu doesn't break hover */
.nav-drop::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px;
  pointer-events: auto;
}
.nav-drop:not(:hover):not(:focus-within):not(.open)::after { pointer-events: none; }

/* Mobile */
@media (max-width: 800px) {
  .dice-cols { grid-template-columns: 1fr 1fr; }
  .dice-col { border-bottom: 1px solid var(--border); }
  .dice-letter { font-size: 36px; width: 52px; height: 52px; }
  .dice-letter--d { font-size: 40px; width: 60px; height: 60px; }
  .cfae-flow { grid-template-columns: 36px 1fr 36px; }
  .cfae-tier { grid-template-columns: 1fr; }
  .cfae-tier-people { justify-content: flex-start; }
  .method-track .method-cell { padding: 20px 16px; }
  .mc-arrow { padding: 7px 10px; font-size: 9px; }
}
.field-stage { display: flex; flex-direction: column; gap: 20px; }
.field-intro h2 {
  font-family: var(--f-disp);
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1.1;
  color: var(--tx);
  font-weight: 400;
  margin-bottom: 6px;
}
.field-intro h2 em { color: var(--ac); font-style: italic; }
.field-intro p { font-size: 14px; color: var(--muted); max-width: 560px; line-height: 1.7; }

.field-map {
  position: relative;
  height: 700px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: visible;
}
.field-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.field-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  color: var(--tx);
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.fm-node {
  position: absolute;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  transform: translate(0, -50%);
  z-index: 2;
  cursor: default;
  transition: opacity var(--dur-fast) var(--ease);
  padding: 6px 0;
  max-width: 200px;
}
.fm-node.fm-r { transform: translate(-100%, -50%); }
.fm-node.fm-r .fm-lbl { text-align: right; }
.fm-node.fm-col {
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  gap: 3px;
  text-align: center;
}
.fm-node.fm-col .fm-lbl { text-align: center; }
.fm-node.fm-dimmed { opacity: 0.6; }
.fm-node.fm-active {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 12px;
  z-index: 20;
  gap: 6px 8px;
}
.fm-node.fm-active.fm-col { align-items: center; }
.fm-pt {
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
  opacity: 0.6;
  flex-shrink: 0;
  transition: color var(--dur-fast), opacity var(--dur-fast);
  user-select: none;
}
.fm-node.fm-active .fm-pt { color: var(--ac); opacity: 1; }
.fm-lbl { display: flex; flex-direction: column; gap: 1px; }
.nd-k {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ac);
  opacity: 0.75;
  transition: opacity var(--dur-fast);
}
.nd-t {
  font-family: var(--f-disp);
  font-size: 12px;
  line-height: 1.25;
  color: var(--tx);
  opacity: 0.6;
  max-width: 138px;
  transition: color var(--dur-fast), opacity var(--dur-fast);
}
.fm-node.fm-active .nd-k { opacity: 1; }
.fm-node.fm-active .nd-t { color: var(--tx); opacity: 1; }
.nd-d {
  display: none;
  flex-basis: 100%;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}
.fm-node.fm-active .nd-d { display: block; }
/* Axis labels — outside the map boundary */
.mx-label {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: .2em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 3;
  color: var(--muted);
}
.mx-top    { top: 10px; left: 50%; transform: translateX(-50%); color: var(--ac); }
.mx-bottom { bottom: 10px; left: 50%; transform: translateX(-50%); color: var(--ac2); }
.mx-left   { top: 50%; left: 8px; writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg); }
.mx-right  { top: 50%; right: 8px; writing-mode: vertical-rl; transform: translateY(-50%); }
.mx-name {
  position: absolute;
  top: 10px; right: 14px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
  z-index: 3;
  pointer-events: none;
}
@media (max-width: 800px) {
  .field-map { height: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
  .field-lines { display: none; }
  .fm-node { position: static; transform: none; flex-direction: column; padding: 12px; background: var(--surface); border: 1px solid var(--border); gap: 5px; max-width: none; }
  .fm-node.fm-r { transform: none; }
  .fm-node.fm-col { transform: none; }
  .fm-node.fm-dimmed { opacity: 1; }
  .fm-node.fm-active { background: var(--surface); border-color: var(--border); padding: 12px; }
  .fm-pt { display: none; }
  .fm-lbl { text-align: left !important; }
  .nd-t { max-width: none; color: var(--tx); font-size: 13px; }
  .nd-k { opacity: 1; }
  .nd-d { display: block; }
  .mx-label { display: none; }
  .mx-name { display: none; }
}

/* ============================================================
   FIRM chamber
   ============================================================ */
.firm-stage {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}
@media (max-width: 800px) { .firm-stage { grid-template-columns: 1fr; gap: 32px; } }

.firm-portrait {
  aspect-ratio: 4/5;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.portrait-plate {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      var(--border) 0 1px, transparent 1px 14px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 6px;
}
.pp-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
}
.pp-sub {
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--ac2);
}
.firm-name {
  font-family: var(--f-disp);
  font-size: 18px;
  color: var(--tx);
  margin-top: 12px;
}
.firm-role {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ac2);
  margin-top: 3px;
}
.firm-pedigree {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 200px;
  text-wrap: pretty;
}
.firm-trace {
  display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
}

.firm-h {
  font-family: var(--f-disp);
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.1;
  color: var(--tx);
  font-weight: 400;
  margin-bottom: 16px;
}
.firm-h em { color: var(--ac); font-style: italic; }
.firm-p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
  max-width: 580px;
}

.consilium {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.cons-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ac2);
  margin-bottom: 20px;
}
.cons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
@media (max-width: 800px) { .cons-grid { grid-template-columns: 1fr 1fr; } }
.cons-c {
  background: var(--surface);
  padding: 16px;
  transition: background var(--dur-fast);
}
.cons-c:hover { background: color-mix(in srgb, var(--surface) 70%, var(--ac) 10%); }
.cc-d {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--ac2);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cc-n {
  font-family: var(--f-disp);
  font-size: 15px;
  color: var(--tx);
  margin-bottom: 2px;
}
.cc-r {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ============================================================
   CONTACT chamber
   ============================================================ */
.contact-stage { max-width: 100%; }
.contact-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px;
  align-items: start;
}
.contact-main { max-width: 520px; }
@media (max-width: 820px) {
  .contact-cols { grid-template-columns: 1fr; gap: 32px; }
}
.contact-h {
  font-family: var(--f-disp);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
  color: var(--tx);
  font-weight: 400;
  margin-bottom: 20px;
}
.contact-h em { color: var(--ac2); font-style: italic; }
.contact-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 36px;
}
.contact-em {
  display: block;
  font-family: var(--f-disp);
  font-size: clamp(20px, 2vw, 28px);
  color: var(--ac);
  text-decoration: none;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.contact-em:hover { background: var(--term-bg); color: var(--tx); padding-left: 12px; }

.contact-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}
@media (max-width: 700px) { .contact-meta { grid-template-columns: 1fr; } }
.contact-meta > div { display: flex; flex-direction: column; gap: 6px; }
.cm-k {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.cm-v { font-size: 13px; color: var(--tx); }
.cm-v a { color: var(--ac); text-decoration: none; }
.cm-v a:hover { color: var(--tx); }

/* ============================================================
   TWEAKS panel
   ============================================================ */
.tweaks-panel {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 260px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ac);
  padding: 18px;
  z-index: 95;
  font-family: var(--f-mono);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.25);
}
.tp-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.tp-title {
  font-size: 11px; letter-spacing: .18em;
  color: var(--ac); text-transform: uppercase; font-weight: 500;
}
.tp-x { font-size: 14px; color: var(--muted); }
.tp-x:hover { color: var(--tx); }
.tp-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tp-opts { display: flex; gap: 4px; }
.tp-opt {
  padding: 4px 8px;
  border: 1px solid var(--border);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all var(--dur-fast);
}
.tp-opt:hover { color: var(--tx); }
.tp-opt.on { background: var(--ac); color: var(--bone); border-color: var(--ac); }

/* ============================================================
   CONTACT CLOCKS
   ============================================================ */
.contact-clocks {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.cc-clock-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ac2);
  margin-bottom: 20px;
}
.cc-clock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
@media (max-width: 700px) { .cc-clock-grid { grid-template-columns: repeat(2, 1fr); } }
.cc-clock {
  background: var(--surface);
  padding: 16px 18px;
  border-left: 2px solid transparent;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.cc-clock.cc-active { border-left-color: var(--ac); }
.cc-city {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.cc-time {
  font-family: var(--f-mono);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: .04em;
  color: var(--tx);
  line-height: 1;
  margin-bottom: 4px;
  transition: color var(--dur-fast);
}
.cc-clock.cc-active .cc-time { color: var(--ac); }
.cc-date {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--muted);
  opacity: .6;
}

.term-connect {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bone);
  padding: 5px 14px;
  border: 1px solid var(--ac2);
  border-radius: 2px;
  background: var(--ac2);
  cursor: pointer;
  transition: all var(--dur-fast);
  white-space: nowrap;
}
.term-connect:hover { background: var(--tx); border-color: var(--tx); color: var(--bg); }
body.motion-subtle .liver-svg #liver-outer,
body.motion-subtle .mark #liver-mark-mini { animation: none; }
body.motion-off * { animation: none !important; transition-duration: 0s !important; }

/* ============================================================
   FIELD CHAMBER — specific overrides for compact one-screen fit
   ============================================================ */
#c-field { padding: 16px 48px 4px; }
#c-field .ch-head { margin-bottom: 12px; }
#c-field .field-stage { gap: 14px; }

/* ============================================================
   FIELD TOGGLE
   ============================================================ */
.field-toggle {
  display: flex;
  align-self: flex-end;
  border: 1px solid var(--border);
}
.ftog-btn {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 7px 18px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.ftog-btn + .ftog-btn { border-left: 1px solid var(--border); }
.ftog-btn.ftog-active { background: var(--tx); color: var(--bg); }

/* ============================================================
   FIELD LIST VIEW — service directory
   ============================================================ */
.field-list {
  border: 1px solid var(--border);
  overflow-y: auto;
  max-height: 700px;
}
.fl-head {
  display: grid;
  grid-template-columns: 36px 120px 1fr 140px;
  gap: 24px;
  padding: 13px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2;
}
.fl-h {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tx);
  opacity: 0.5;
}
.fl-h-r { text-align: right; }
.fl-row {
  display: grid;
  grid-template-columns: 36px 120px 1fr 140px;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 0.5px solid var(--border);
  border-left: 2px solid transparent;
  align-items: start;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.fl-row:last-child { border-bottom: none; }
.fl-row:hover {
  background: color-mix(in srgb, var(--surface) 80%, var(--ac) 4%);
  border-left-color: var(--ac);
}
.fl-num {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  opacity: 0.5;
  padding-top: 4px;
}
.fl-cat {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ac);
  padding-top: 4px;
  line-height: 1.4;
}
.fl-body { display: flex; flex-direction: column; gap: 8px; }
.fl-name {
  font-family: var(--f-disp);
  font-size: 17px;
  line-height: 1.2;
  color: var(--tx);
}
.fl-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
}
.fl-pos {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.65;
  text-align: right;
  line-height: 1.8;
  padding-top: 4px;
}

/* ============================================================
   WORK CHAMBER — specific overrides for compact one-screen fit
   ============================================================ */
#c-work { padding-top: 22px; padding-bottom: 12px; }
#c-work .ch-head { padding-bottom: 14px; margin-bottom: 16px; }
#c-work .reel-in-chamber { margin-bottom: 16px; }

/* ============================================================
   MOBILE — appended, zero changes to existing desktop rules
   ============================================================ */

/* Scroll lock — overflow only, no position:fixed on body */
body.scroll-locked { overflow: hidden; }

/* Tap hint below liver diagram */
.liver-tap-hint {
  display: none;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .55;
  padding: 10px 0 4px;
  transition: opacity .35s;
  pointer-events: none;
}
.liver-tap-hint.hidden { opacity: 0; }

/* Tap-again inside panel — mobile only */
.lp-tap-again {
  display: none;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ac);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Mobile bottom nav — hidden on desktop */
.mob-nav { display: none; }

/* Swipe hint — hidden on desktop */
.swipe-hint { display: none; }

/* Disable :hover states on touch devices — prevents double-highlight */
@media (hover: none) {
  .dot:hover circle { fill: var(--bg); stroke: var(--ac); stroke-width: 1.2; }
  .dot:hover .dot-num { fill: var(--ac); }
}

@media (max-width: 820px) {

  /* Masthead */
  .mast { padding: 12px 16px; }
  .mast-sub { display: none; }
  .mast-nav .nav-btn { display: none; }
  .mast-connect { padding: 6px 12px; font-size: 9px; }

  /* Hide desktop arrows — replaced by swipe + bottom nav */
  .page-arrow { display: none !important; }

  /* Bottom nav */
  .mob-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 120;
    background: color-mix(in srgb, var(--bg) 95%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 6px 0 max(8px, env(safe-area-inset-bottom));
  }
  .mob-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px;
    color: var(--muted);
    transition: color var(--dur-fast);
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
  }
  .mob-nav-btn.active { color: var(--ac); }
  .mn-idx { font-family: var(--f-mono); font-size: 8px; letter-spacing: .1em; }
  .mn-label { font-family: var(--f-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }

  /* Swipe hint */
  .swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 0 4px;
    font-family: var(--f-mono);
    font-size: 9px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: .5;
    transition: opacity .6s;
  }
  .swipe-hint.hidden { opacity: 0; pointer-events: none; }
  .sh-arrow { font-size: 13px; color: var(--ac); }

  /* Hero */
  .hero {
    height: auto;
    min-height: 100svh;
    overflow: visible;
    padding: 76px 20px calc(72px + env(safe-area-inset-bottom)) 20px;
  }
  .hero-body { grid-template-columns: 1fr; gap: 24px; padding-top: 10px; }
  .hero-h { font-size: clamp(26px, 7.5vw, 44px); }
  .hero-byline { margin-top: 10px; margin-bottom: 10px; }
  .hb-sub { font-size: 12px; }
  .hero-cta-row { margin-top: 18px; }

  /* Liver stage — aspect-ratio matches SVG viewBox 520:560 exactly */
  .hero-r {
    width: 100%;
    aspect-ratio: 520 / 560;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin-top: 20px;
  }
  .liver-stage {
    width: 100%;
    aspect-ratio: 520 / 560;
    height: auto !important;
    max-height: none !important;
    overflow: hidden;
  }

  /* Larger dot hit targets */
  .dot circle { r: 22; }
  .dot-num { font-size: 10.5px; }

  /* Liver cap single line so it doesn't cover dot 13 */
  .liver-cap { white-space: nowrap; overflow: hidden; font-size: 8px; }

  /* Panel touch-friendly */
  .liver-tap-hint { display: block; }
  .lp-tap-again { display: block; }
  #liver-readout { display: none; }
  .liver-panel {
    pointer-events: none; /* keep none when hidden */
    width: calc(100% - 24px);
    left: 12px;
    bottom: 10px;
    padding: 14px;
  }
  .liver-panel.on { pointer-events: auto; }
  .lp-title { font-size: 15px; }
  .lp-desc { font-size: 11px; line-height: 1.5; }

  /* Reel edge-to-edge */
  .reel { margin-left: -20px; margin-right: -20px; }
  .reel.reel-in-chamber { margin-left: -20px; margin-right: -20px; }

  /* Chambers — keep position:fixed from base, only override padding */
  .chamber { padding: 24px 20px calc(80px + env(safe-area-inset-bottom)); }
  #c-work { padding-top: 20px; }

  /* Work cards */
  .work-card { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .wc-num { font-size: clamp(22px, 6vw, 36px); }
  .wc-desc { -webkit-line-clamp: unset; display: block; overflow: visible; }

  /* Discipline */
  .fw-cell { grid-template-columns: 1fr; }
  .fw-diag { grid-column: 1; grid-row: auto; max-width: 180px; }

  /* Field */
  #c-field { padding: 24px 20px calc(80px + env(safe-area-inset-bottom)); }
  .field-toggle { display: none; }
  #field-matrix { display: none !important; }
  #field-list { display: block !important; max-height: none; border: none; }
  .fl-head { display: none; }
  .fl-row { grid-template-columns: 36px 1fr; gap: 12px; padding: 16px 0; border-left: none; border-bottom: 0.5px solid var(--border); }
  .fl-row:hover { background: none; }
  .fl-cat { display: none; }
  .fl-pos { display: none; }
  .fl-name { font-size: 15px; }
  .fl-desc { font-size: 13px; }

  /* Firm */
  .firm-stage { grid-template-columns: 1fr; gap: 24px; }
  .firm-portrait { aspect-ratio: 4 / 5; max-width: 220px; }
  .firm-pedigree { max-width: 100%; }
  .cons-grid { grid-template-columns: 1fr; }

  /* Contact */
  .contact-cols { grid-template-columns: 1fr; gap: 28px; }
  .contact-h { font-size: clamp(26px, 7vw, 40px); }
  .contact-meta { grid-template-columns: 1fr; gap: 14px; }
  .cc-clock-grid { grid-template-columns: repeat(2, 1fr); }

  .ch-idx { font-size: 36px; }
}

@media (max-width: 380px) {
  .hero { padding-left: 14px; padding-right: 14px; }
  .hero-h { font-size: clamp(22px, 8.5vw, 32px); }
  .mn-label { font-size: 8px; }
}


/* M·05 placeholder — "more to come" ghost card */
.method-cell--ghost { opacity: .98; }
.m-body--ghost { display: block; }
.m-ghost-card {
  display: grid;
  grid-template-columns: 1.05fr 1.4fr;
  gap: 28px;
  align-items: stretch;
  padding: 22px 4px 6px;
}
.m-ghost-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 10px;
  min-height: 220px;
  border: 1px dashed color-mix(in srgb, var(--border) 90%, transparent);
  padding: 14px;
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0 7px,
      color-mix(in srgb, var(--muted) 14%, transparent) 7px 8px
    );
}
.m-ghost-cell {
  display: block;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: var(--bg);
  position: relative;
}
.m-ghost-cell::after {
  content: "";
  position: absolute;
  inset: 14% 18%;
  border-top: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
}
.m-ghost-cell:nth-child(2)::after { inset: 22% 14% 50% 14%; border-bottom: none; }
.m-ghost-cell:nth-child(3)::after { inset: 30% 20%; border-bottom: none; }
.m-ghost-cell:nth-child(4)::after { inset: 18% 12% 50% 30%; border-bottom: none; }
.m-ghost-cell:nth-child(5)::after { inset: 26% 22% 40% 18%; border-bottom: none; }
.m-ghost-cell:nth-child(6)::after { inset: 20% 28% 50% 14%; border-bottom: none; }
.m-ghost-copy {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.m-ghost-copy p {
  margin: 0;
  font-family: var(--f-serif, Georgia, serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg);
  text-wrap: pretty;
}
.m-ghost-copy p em { font-style: italic; color: var(--ac); }
.m-ghost-copy .m-ghost-note {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: none;
  color: var(--muted);
  border-left: 2px solid var(--ac2);
  padding-left: 12px;
  font-style: normal;
}
@media (max-width: 760px) {
  .m-ghost-card { grid-template-columns: 1fr; gap: 18px; }
  .m-ghost-grid { min-height: 160px; }
}
