/* Rules copied from precept-research.vercel.app/css/styles.css (chapter/lab/desk selectors), then layout overrides for a vertical page */
@media (max-width: 720px) {
  .modules-section {
    margin-top: 0;
  }
}
@media (max-width: 899px) {
  .chapter-card--desk .desk-frame {
    height: 17.5rem;
    min-height: 14rem;
    max-height: min(70vh, 24rem);
  }
  .lab-study-wrap {
    overflow-x: auto;
  }
  .chapter-card--screen:not(.chapter-card--desk) {
    height: min(70vh, 36rem);
    min-height: 22rem;
  }
  .lab {
    position: relative;
    height: 100%;
    min-height: 0;
  }
  .lab-doc {
    position: relative;
    display: flex;
    flex-direction: column;
  }
  .artifact-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    margin: -0.4rem 0.15rem 0.35rem;
    padding: 0;
    border: 0;
  }
  .artifact-nav .dot-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
  }
  .artifact-nav .dot {
    width: 5px;
    height: 5px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
  }
  .artifact-nav .dot[aria-current="true"] {
    background: #f2f0ea;
  }
  .lab.is-reported .lab-scroll {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .lab.is-reported .lab-scroll::-webkit-scrollbar {
    display: none;
  }
  .lab.is-reported .lab-scroll > [data-block] {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
    padding-right: 0.15rem;
  }
  .lab.is-reported .lab-scroll > [data-block] .lab-shot {
    max-height: min(36vh, 11rem);
    width: 100%;
    object-fit: contain;
    object-position: left top;
  }
  .lab.is-reported .lab-scroll > [data-block] .lab-shot + .lab-section {
    margin-top: 0.45rem;
  }
  .lab.is-reported .lab-scroll > [data-block] .lab-shot + .lab-section + .lab-shot {
    max-height: min(28vh, 8.5rem);
  }
  .lab.is-reported .lab-scroll > [data-block] .lab-note {
    font-size: 9px;
    line-height: 1.35;
    margin-top: 0.35rem;
  }
  .lab.is-reported .lab-scroll > [data-block] .lab-scatter {
    max-height: min(18vh, 5.5rem);
    width: 100%;
  }
  .lab.is-reported .lab-scroll > [data-block] .lab-trades {
    font-size: 9.5px;
  }
  .swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #b8b0a4;
    line-height: 0;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
  .swipe-hint svg {
    display: block;
    width: 18px;
    height: 18px;
  }
  .swipe-hint--prev svg {
    transform: scaleX(-1);
  }
  .swipe-hint.is-dismissed {
    opacity: 1;
  }
  .swipe-hint.is-gone {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  .swipe-hint {
    animation: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .modules-section {
    margin-top: 0;
  }
}
.modules-section {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin-top: 0;
  margin-inline: 0;
  padding-block: 0;
  padding-inline: 0;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.modules-section.chapters-section {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}
.modules-section > .chapter {
  width: 100%;
  margin-inline: 0;
  padding-inline: 0;
}
.chapters-section {
  width: 100%;
  margin-inline: 0;
  padding-inline: 0;
}
.chapter {
  border-bottom: 1px solid var(--rule);
}
.chapter:last-child {
  border-bottom: none;
}
.chapter-sticky-frame {
  position: relative;
}
.chapter-sticky-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad-inline);
  box-sizing: border-box;
  overflow: hidden;
  
  background: var(--bg);
}
.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.15rem;
  max-width: 14ch;
  color: var(--ink);
}
.chapter-sub {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-muted);
  margin: 0;
  max-width: 22ch;
}
.chapter-card--screen {
  display: flex;
  flex-direction: column;
}
.chapter-card--screen > .desk-frame,
.chapter-card--screen > .lab {
  flex: 1 1 auto;
  min-height: 0;
}
.chapter-viewport {
  overflow: hidden;
  width: 100%;
  min-width: 0;
}
.chapter-track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1.25rem;
  width: max-content;
  will-change: transform;
}
.chapter-card {
  flex: 0 0 min(28rem, 82vw);
  width: min(28rem, 82vw);
  box-sizing: border-box;
  padding: 1.35rem 1.4rem 1.5rem;
  border: 1px solid transparent;
  background: transparent;
}
.chapter-card p {
  max-width: none;
  color: var(--ink-muted);
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
}
.chapter-card p + p {
  margin-top: 1rem;
}
.chapter-kicker {
  font-family: var(--font-mono) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.85rem !important;
  opacity: 0.85;
}
.chapter-card--claim {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.chapter-card--claim .chapter-kicker {
  color: var(--ink);
  opacity: 0.5;
  margin-bottom: 1.1rem !important;
}
.chapter-card--claim .chapter-kicker--follow {
  margin-top: 1.35rem !important;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
}
.chapter-claim {
  font-family: var(--font-display) !important;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem) !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em;
  line-height: 1.25 !important;
  color: var(--ink) !important;
  margin: 0 0 1rem !important;
  min-height: calc(1.25em * 2);
}
.chapter-support {
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
  color: var(--ink-muted);
  margin: 0 !important;
  max-width: 34ch;
}
.chapter-support-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chapter-sources {
  font-family: var(--font-mono) !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 1.15rem 0 0 !important;
  opacity: 0.55;
  max-width: none !important;
  line-height: 1.45 !important;
}
.chapter-card--figure {
  display: flex;
  padding: 0;
  background: transparent;
  border: none;
}
.chapter-figure {
  border: 1px solid rgba(42, 42, 46, 0.9);
  background:
    linear-gradient(155deg, rgba(52, 50, 46, 0.45) 0%, rgba(20, 20, 22, 0.2) 42%, rgba(12, 12, 14, 0.95) 100%),
    linear-gradient(160deg, #1a1a1c 0%, #0c0c0e 72%);
  min-height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 1.35rem 1.4rem;
  box-shadow: inset 0 1px 0 rgba(242, 240, 234, 0.06);
}
.chapter-figure-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.chapter-figure-ghost {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  opacity: 0.88;
}
.chapter-card--claim:has(.scene) {
  display: flex;
  flex-direction: column;
}
.chapter-card--screen {
  padding: 0;
  background: rgba(20, 20, 22, 0.82);
  border: 1px solid rgba(42, 42, 46, 0.85);
  border-top: 1px solid rgba(242, 240, 234, 0.22);
  box-shadow: inset 0 1px 0 rgba(242, 240, 234, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chapter-card--desk {
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}
.chapter-card--desk.chapter-card--pack {
  background: rgba(20, 20, 22, 0.82);
  border: 1px solid rgba(42, 42, 46, 0.85);
  border-top: 1px solid rgba(242, 240, 234, 0.22);
  box-shadow: inset 0 1px 0 rgba(242, 240, 234, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.desk-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 16rem;
  border: 0;
  background: #000;
}
.chapter-card--pack .desk-frame {
  background: transparent;
}
.desk {
  --desk-text: #e8e6e1;
  --desk-muted: #9a9690;
  --desk-dim: #6e6a64;
  --desk-line: rgba(242, 240, 234, 0.1);
  --desk-mint: #89d185;
  --desk-amber: #cca700;
  --desk-rose: #f14c4c;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 16rem;
  min-height: 0;
  color: var(--desk-text);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
}
.desk-chrome {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex: 0 0 auto;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--desk-line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--desk-dim);
}
.desk-prompt {
  margin: 0.4rem 0.75rem 0;
  padding: 0.28rem 0.55rem;
  min-height: 0;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  background: rgba(12, 12, 14, 0.65);
  border: 1px solid var(--desk-line);
  color: var(--desk-text);
  flex: 0 0 auto;
}
.desk-prompt::-webkit-scrollbar { display: none; }
.desk-mark {
  color: var(--desk-dim);
  margin-right: 0.35rem;
}
.desk-caret {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  margin-left: 1px;
  background: var(--desk-text);
  vertical-align: -1px;
  animation: type-caret 1s steps(1) infinite;
}
.desk.is-reported .desk-caret { visibility: hidden; }
.desk:not([data-desk="cycle"]) .desk-prompt,
.desk:not([data-desk="cycle"]) .desk-status {
  display: none;
}
.desk[data-desk="cycle"].is-reported .desk-prompt,
.desk[data-desk="cycle"].is-reported .desk-status {
  display: none;
}
.desk-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0.45rem 0.75rem 0;
  min-height: 1.1rem;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--desk-dim);
  flex: 0 0 auto;
}
.desk-status span.is-on,
.desk-status span.is-done { color: var(--desk-mint); }
.desk-doc {
  margin: 0.35rem 0 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  display: none;
}
.desk.is-reported .desk-doc {
  display: block;
}
.desk-pane { display: none; height: 100%; min-height: 0; }
.desk.is-reported[data-pane="ask"] .desk-pane[data-pane="ask"],
.desk.is-reported[data-pane="dossier"] .desk-pane[data-pane="dossier"] {
  display: block;
}
.desk-scroll {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.desk-body {
  padding: 0.75rem 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.desk-chips--tight {
  margin-bottom: 0.45rem;
}
.desk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.desk-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.desk-meta {
  margin-top: 0.15rem;
  color: var(--desk-muted);
  font-size: 10px;
}
.desk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.desk-chip {
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--desk-line);
  border-radius: 0.2rem;
  color: var(--desk-muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.desk-chip--mint {
  color: var(--desk-mint);
  border-color: rgba(137, 209, 133, 0.35);
}
.desk-chip--amber {
  color: var(--desk-amber);
  border-color: rgba(204, 167, 0, 0.35);
}
.desk-block {
  border-top: 1px solid var(--desk-line);
  padding-top: 0.55rem;
}
.desk-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--desk-dim);
  margin-bottom: 0.4rem;
}
.desk-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}
.desk-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0.4rem;
  background: rgba(12, 12, 14, 0.55);
  border: 1px solid var(--desk-line);
}
.desk-metric em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--desk-dim);
}
.desk-metric strong {
  font-weight: 600;
  color: var(--ink);
  font-size: 12px;
}
.desk-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--desk-muted);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.desk-excerpt,
.desk-note {
  margin: 0;
  color: var(--desk-muted);
  max-width: 52rem;
}
.desk-excerpt--ok {
  color: var(--desk-mint);
}
.desk-note {
  font-size: 10px;
  border-top: 1px solid var(--desk-line);
  padding-top: 0.45rem;
}
.desk-note--inline {
  border-top: none;
  padding-top: 0.25rem;
  margin-top: 0.2rem;
}
.desk-block--hint {
  border: 1px solid rgba(204, 167, 0, 0.28);
  border-radius: 0.35rem;
  padding: 0.55rem 0.6rem 0.5rem;
  background: rgba(204, 167, 0, 0.06);
}
.desk-hint-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.desk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.desk-table th {
  text-align: left;
  font-weight: 500;
  color: var(--desk-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0.35rem 0.35rem 0;
  border-bottom: 1px solid var(--desk-line);
}
.desk-table td {
  padding: 0.38rem 0.35rem 0.38rem 0;
  border-bottom: 1px solid rgba(242, 240, 234, 0.06);
  color: var(--desk-text);
}
.desk-table td:first-child {
  font-weight: 600;
  color: var(--ink);
}
.desk-mint { color: var(--desk-mint); }
.desk-amber { color: var(--desk-amber); }
.desk-rose { color: var(--desk-rose); }
@media (max-width: 720px) {
  .desk-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.lab {
  --lab-text: #e4e4e4;
  --lab-muted: #9b9b9b;
  --lab-dim: #6e6e6e;
  --lab-line: rgba(255, 255, 255, 0.12);
  --lab-ok: #89d185;
  --lab-warn: #cca700;
  --lab-accent: #3794ff;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 16rem;
  color: var(--lab-text);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
}
.lab-chrome {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--lab-line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lab-dim);
}
.lab-prompt {
  display: flex;
  align-items: center;
  margin: 0.4rem 0.75rem 0;
  padding: 0.22rem 0.55rem;
  min-height: 0;
  overflow: hidden;
  background: #252526;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--lab-text);
}
.lab-prompt-rail {
  flex: 0 0 auto;
  white-space: nowrap;
  will-change: transform;
  transform: translateX(0);
}
.lab-mark {
  flex: 0 0 auto;
  color: var(--lab-dim);
  margin-right: 0.35rem;
}
.lab-caret {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  margin-left: 1px;
  background: var(--lab-text);
  vertical-align: -1px;
  animation: type-caret 1s steps(1) infinite;
}
.lab.is-reported:not(.is-typing) .lab-caret { visibility: hidden; }
.lab-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0.45rem 0.75rem 0;
  min-height: 1.1rem;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--lab-dim);
}
.lab-status span.is-on,
.lab-status span.is-done { color: var(--lab-ok); }
.lab-doc {
  margin: 0.35rem 0.75rem 0.7rem;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.lab-pane { display: none; }
.lab.is-reported[data-pane="study"] .lab-pane[data-pane="study"],
.lab.is-reported[data-pane="forge"] .lab-pane[data-pane="forge"],
.lab.is-reported[data-pane="screen"] .lab-pane[data-pane="screen"] {
  display: block;
  height: 100%;
  min-height: 0;
}
.lab-scroll {
  height: 100%;
  overflow: hidden;
  position: relative;
}
.lab-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--lab-line);
}
.lab-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.lab-meta {
  margin-top: 0.2rem;
  font-size: 10px;
  color: var(--lab-dim);
}
.lab-verdict { text-align: right; }
.lab-verdict em {
  display: block;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lab-dim);
}
.lab-verdict strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--lab-ok);
}
.lab-verdict--sample strong { color: var(--lab-text); }
.lab-section {
  margin: 0.55rem 0 0.4rem;
  padding: 0.28rem 0;
  border-top: 1px solid var(--lab-line);
  border-bottom: 1px solid var(--lab-line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lab-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.4rem;
}
.lab-metric { min-width: 4.5rem; }
.lab-metric em {
  display: block;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lab-dim);
}
.lab-metric strong {
  display: block;
  margin-top: 0.12rem;
  font-size: 12px;
  font-weight: 600;
}
.lab-hist {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 3.4rem;
  margin-bottom: 1.2rem;
}
.lab-hist span {
  flex: 1;
  height: var(--h);
  background: rgba(228, 228, 228, 0.82);
  transform-origin: bottom;
  transform: scaleY(0);
  position: relative;
}
.lab.is-reported .lab-hist span {
  transform: scaleY(1);
  transition: transform 420ms ease;
}
.lab.is-reported .lab-hist span:nth-child(2) { transition-delay: 60ms; }
.lab.is-reported .lab-hist span:nth-child(3) { transition-delay: 120ms; }
.lab.is-reported .lab-hist span:nth-child(4) { transition-delay: 180ms; }
.lab.is-reported .lab-hist span:nth-child(5) { transition-delay: 240ms; }
.lab-hist i {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0.2rem;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--lab-dim);
}
.lab-equity {
  display: block;
  width: 100%;
  height: 4.2rem;
  margin-top: 0.45rem;
  color: var(--lab-text);
}
.lab-equity path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.lab.is-reported .lab-equity path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 900ms ease;
}
.lab-audit { margin-top: 0.35rem; }
.lab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.lab-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lab-dim);
  padding: 0.2rem 0.4rem 0.35rem 0;
}
.lab-table td {
  padding: 0.28rem 0.4rem 0.28rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--lab-muted);
}
.lab-table td:first-child { color: var(--lab-text); }
.lab-config { width: 100%; border-collapse: collapse; }
.lab-config th {
  width: 4.6rem;
  padding: 0.22rem 0.6rem 0.22rem 0;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lab-dim);
  vertical-align: top;
}
.lab-config td {
  padding: 0.22rem 0;
  color: var(--lab-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.lab-config tr:first-child td,
.lab-config tr:first-child th { border-top: 0; }
.chapter-card .lab p {
  max-width: none;
  margin: 0.28rem 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: var(--lab-dim);
}
.chapter-card .lab .lab-banner {
  margin: 0 0 0.35rem;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--lab-warn);
}
.lab-checks { display: flex; flex-direction: column; gap: 0.28rem; }
.lab-checks div {
  display: grid;
  grid-template-columns: 1rem 8.2rem minmax(0, 1fr);
  gap: 0.35rem;
  align-items: baseline;
}
.lab-checks span { font-size: 11px; }
.lab-checks span.ok { color: var(--lab-ok); }
.lab-checks span.warn { color: var(--lab-warn); }
.lab-checks b { font-weight: 600; color: var(--lab-text); font-size: 10px; }
.lab-checks i { font-style: normal; color: var(--lab-muted); font-size: 10px; }
.lab-shot {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.35rem;
}
.lab-study-wrap {
  overflow: hidden;
  margin-top: 0.35rem;
}
.lab-study-heat {
  display: grid;
  gap: 2px;
  min-width: 52rem;
}
.lab-study-heat__col {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  height: 3.2rem;
  font-size: 9px;
  color: var(--lab-dim);
  text-align: left;
}
.lab-study-heat__corner,
.lab-study-heat__row {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #1e1e1e;
}
.lab-study-heat__row {
  display: flex;
  align-items: center;
  font-size: 9px;
  color: var(--lab-text);
}
.lab-study-heat__cell {
  min-height: 2rem;
  border-radius: 2px;
  text-align: center;
  font-size: 10px;
  line-height: 2rem;
  color: #e4e4e4;
  background: rgba(137, 209, 133, calc(0.08 + var(--heat, 0) * 0.72));
}
.lab-pane[data-pane="study"] [data-block] + [data-block] {
  margin-top: 1.15rem;
}
.chapter-card .lab .lab-analyst {
  margin: 0.15rem 0 0;
  max-width: 62rem;
  font-size: 11px;
  line-height: 1.5;
  color: var(--lab-text);
}
.lab-bars { margin-top: 0.15rem; }
.lab-bars h3 {
  margin: 0.55rem 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--lab-muted);
}
.lab-bar {
  display: grid;
  grid-template-columns: minmax(8.5rem, 13rem) minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.28rem;
  font-size: 10px;
}
.lab-bar i {
  font-style: normal;
  color: var(--lab-muted);
}
.lab-bar b {
  font-weight: 500;
  color: var(--lab-dim);
  white-space: nowrap;
}
.lab-bar span {
  display: block;
  height: 8px;
  border-radius: 2px;
  background: #252526;
}
.lab-bar span em {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 2px;
  background: rgba(137, 209, 133, 0.75);
  font-style: normal;
}
.lab-chart, .lab-scatter {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.35rem;
}
.lab-chart text, .lab-scatter text {
  font-family: var(--font-mono);
  font-size: 8px;
}
.chapter-card .lab .lab-note {
  margin: 0.28rem 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: var(--lab-dim);
}
.lab-temporal {
  display: grid;
  grid-template-columns: minmax(7rem, 0.55fr) minmax(0, 1.45fr);
  gap: 0.8rem;
  align-items: start;
}
.lab-hist--years { height: 4.2rem; margin-bottom: 1.1rem; }
.lab-hist--years span { background: rgba(137, 209, 133, 0.82); }
.lab-heat {
  display: grid;
  grid-template-columns: 2rem repeat(12, minmax(0, 1fr));
  gap: 2px;
}
.lab-heat span {
  min-height: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--lab-dim);
}
.lab-heat .pos {
  background: rgba(137, 209, 133, calc(0.10 + var(--heat, 0) * 0.70));
  color: #e4e4e4;
}
.lab-heat .neg {
  background: linear-gradient(
    165deg,
    rgba(241, 76, 76, calc(0.22 + var(--heat, 0) * 0.68)),
    rgba(100, 36, 36, calc(0.38 + var(--heat, 0) * 0.52))
  );
  color: #ffd4d4;
  box-shadow: inset 0 0 0 1px rgba(241, 76, 76, calc(0.14 + var(--heat, 0) * 0.35));
}
.lab-trades { width: 100%; border-collapse: collapse; font-size: 10px; }
.lab-trades th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lab-dim);
  padding: 0.15rem 0.45rem 0.3rem 0;
}
.lab-trades td {
  padding: 0.24rem 0.45rem 0.24rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--lab-muted);
}
.lab-trades td:first-child { color: var(--lab-text); }
.lab-trades .ok { color: var(--lab-ok); }
.lab-trades .bad { color: #f14c4c; }
.lab-trades .time { color: var(--lab-warn); }
@media (max-width: 700px) {
  .lab-temporal { grid-template-columns: 1fr; }
  .lab-checks div { grid-template-columns: 1rem minmax(0, 1fr); }
  .lab-checks i { grid-column: 2; }
}
.lab.is-settled .lab-hist span,
.lab.is-settled .lab-equity path {
  transform: none;
  stroke-dashoffset: 0;
  transition: none;
}
.desk-seal {
  justify-content: center;
  gap: 1rem;
  min-height: 16rem;
}
.chapter-card--bounds .module-not {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
@media (min-width: 900px) {
  .chapters-section {
    overscroll-behavior-x: none;
  }
  .chapter-sticky-panel {
    --chapter-card-inset: calc(var(--pad-inline) + 16rem + clamp(1.5rem, 4vw, 3rem));
    position: sticky;
    top: 3.5rem;
    height: calc(100vh - 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2.5rem; 
    padding-block: 5rem clamp(1.5rem, 3vh, 2.25rem);
    padding-inline: 0;
    overflow: hidden;
    background: var(--bg);
    overscroll-behavior-x: none;
  }
  .chapter-rail {
    align-self: flex-start;
    text-align: left;
    padding-left: var(--pad-inline);
    padding-right: 0.75rem;
    
    max-width: var(--chapter-card-inset);
    box-sizing: border-box;
    position: relative; 
  }
  .chapter-sticky {
    position: relative;
    top: auto;
    padding-bottom: 0;
  }
  .chapter-title {
    max-width: 16ch;
    margin-left: 0;
    margin-bottom: 0.12rem;
    line-height: 1.12;
    text-align: left;
  }
  .chapter-sub {
    max-width: none;
    margin-left: 0;
    text-align: left;
  }
  .chapter-progress {
    position: absolute; 
    left: var(--pad-inline);
    top: calc(100% + 1.1rem);
    width: min(14rem, calc(100% - var(--pad-inline)));
    display: flex;
    gap: 0.35rem;
    pointer-events: none;
  }
  .chapter-progress-seg {
    flex: 1 1 0;
    height: 2px;
    background: rgba(242, 240, 234, 0.14);
    overflow: hidden;
  }
  .chapter-progress-seg > span {
    display: block;
    height: 100%;
    background: var(--ink);
    opacity: 0.7;
    transform-origin: left center;
    transform: scaleX(0);
  }
  .chapter-viewport {
    width: 100%;
    height: min(26rem, 58vh);
    padding-left: var(--chapter-card-inset);
    padding-right: 3rem;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    will-change: padding-left;
  }
  .chapter:has(.chapter-card--desk) .chapter-viewport,
  .chapter-research .chapter-viewport {
    height: min(40.8rem, 84vh);
  }
  .chapter-track {
    height: 100%;
  }
  .chapter-card {
    flex: 0 0 min(26rem, 48vw);
    width: min(26rem, 48vw);
    height: 100%;
    overflow: auto;
  }
  .chapter-card--desk.chapter-card--screen {
    flex: 0 0 min(44rem, 70vw);
    flex-basis: min(44rem, 70vw);
    width: min(44rem, 70vw);
    overflow: hidden;
  }
  .chapter-research .chapter-card--screen {
    flex-basis: min(58rem, 74vw);
    width: min(58rem, 74vw);
    overflow: hidden;
  }
  .chapter-figure {
    min-height: 14rem;
  }
}
@media (max-width: 899px) {
  .chapter-track {
    flex-direction: column;
    width: 100%;
    transform: none !important;
  }
  .chapter-card {
    flex: none;
    width: 100%;
    max-width: 34rem;
  }
  .chapter-card--claim {
    padding-inline: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--rule);
  }
  .chapter-card--claim:last-child {
    border-bottom: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .chapter-sticky-frame {
    height: auto !important;
  }
  .chapter-sticky-panel {
    position: relative;
    top: auto;
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .chapter-track {
    flex-direction: column;
    width: 100%;
    transform: none !important;
  }
  .chapter-card {
    flex: none;
    width: 100%;
    max-width: 34rem;
    height: auto;
  }
  .chapter-card--claim {
    padding-inline: 0;
    border-bottom: 1px solid var(--rule);
  }
  .chapter-card--claim:last-child {
    border-bottom: none;
  }
}
@media (max-width: 720px) {
  .modules-section {
    position: relative;
    margin-top: 0;
    background: var(--bg);
    z-index: 3;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .chapter-sticky-frame {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }
  .chapter-sticky-panel {
    padding-top: calc(1.25rem + 0.35rem);
    padding-bottom: 0.85rem;
    gap: 1.1rem;
  }
  .chapter-title {
    max-width: none;
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  }
  .chapter-sub {
    max-width: 36ch;
  }
  .chapter-card {
    width: 100%;
    max-width: none;
    flex: none;
    padding: 1.1rem 0 1.35rem;
  }
  .chapter-card--screen {
    padding: 0;
  }
  .chapter-card--claim {
    padding: 0.95rem 0 1rem;
  }
  .chapter-card--claim .chapter-kicker--follow {
    margin-top: 1.1rem !important;
    padding-top: 0.95rem;
  }
  .chapter-card--desk .desk-frame {
    height: 17.5rem;
    min-height: 14rem;
    max-height: min(62dvh, 22rem);
    border-radius: 0;
  }
  .chapter-card--screen:not(.chapter-card--desk) {
    height: min(62dvh, 26rem);
    min-height: 18rem;
  }
  .wp-table-wrap,
  .wp-flow,
  .lab-study-wrap {
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .hero-pin-wrap,
  .hero-rise,
  .thesis,
  .modules-section,
  .home-close,
  .chapter-sticky-frame {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }
}
@keyframes type-caret {
  50% { opacity: 0; }
}
/* ---------- precept-site layout overrides ---------- */
.page-architecture .paper-back { margin: 0 0 2.5rem; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; }
.spec-hero .lede a, .spec-chapter .lede a { color: var(--ink); text-underline-offset: 0.2em; }
.spec-hero .lede { max-width: 44rem; }
.spec-hero .spec-name-note { margin: 0 0 1rem; }
.spec-disclaimer { margin: 1.25rem 0 0; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-muted); max-width: 44rem; line-height: 1.6; }
.spec-chapter { padding-block: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--rule); scroll-margin-top: 3.5rem; }
.spec-hero + .spec-chapter { margin-top: clamp(2rem, 5vw, 3.5rem); }
.spec-chapter-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.spec-num { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; color: var(--ink-muted); margin: 0 0 0.9rem; }
.spec-chapter-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 1rem; }
.spec-chapter .lede { max-width: none; }
.spec-step { padding-block: 0 clamp(3rem, 6vw, 4.5rem); }
.spec-claim { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); border-top: 1px solid var(--rule); padding-top: 1.75rem; }
.spec-claim .chapter-claim { min-height: 0; }
.spec-claim-body { display: flex; flex-direction: column; gap: 0.6rem; }
.spec-claim-body .chapter-support { max-width: 40rem; }
.spec-claim-head .chapter-kicker { color: var(--ink); opacity: 0.5; }
/* screens: full content width, fixed reading height */
.spec-step .chapter-card--screen { width: 100%; max-width: none; flex: none; margin-top: 2rem; opacity: 1; box-sizing: border-box; padding: 0; }
.spec-step .chapter-card--screen + .chapter-card--screen { margin-top: 1.5rem; }
.spec-step .chapter-card--screen > .desk-frame, .spec-step .chapter-card--screen > .lab { flex: 1 1 auto; min-height: 0; }
@media (min-width: 900px) {
  .spec-step .chapter-card--desk.chapter-card--screen { width: 100%; height: min(40.8rem, 84vh); overflow: hidden; }
  .spec-step .chapter-card--screen[data-seq="lab"] { height: min(40.8rem, 84vh); overflow: hidden; }
  .spec-step .chapter-card--desk.chapter-card--screen:not(.chapter-card--pack) { max-width: 46rem; }
}
@media (max-width: 899px) {
  .spec-claim { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .spec-step .chapter-card { max-width: none; }
}
