:root {
  --ink: #182d2b;
  --muted: #526764;
  --paper: #f6f8f7;
  --green: #123d35;
  --line: #d5dfdb;
  --accent: #126e58;
  --lime: #d7ed96;
  --gold: #9a5e20;
  --radius: 8px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #b1681f;
  outline-offset: 5px;
}
.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 99;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
.workspace {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100dvh;
}
.rail {
  background: var(--green);
  color: #edf5f1;
  padding: 32px 24px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.identity {
  display: flex;
  gap: 13px;
  align-items: center;
  color: white;
  text-decoration: none;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
}
.identity small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #c0d5cd;
  margin-top: 3px;
}
.monogram {
  display: grid;
  place-items: center;
  border: 1px solid #78938a;
  border-radius: 50%;
  height: 45px;
  width: 45px;
  font-size: 18px;
  letter-spacing: -2px;
  font-weight: 400;
}
.nav-label {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #b3cec3;
  margin: 40px 10px 18px;
}
nav a {
  display: block;
  color: #e0eee8;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.25;
  padding: 11px 12px;
  border-left: 2px solid transparent;
  margin: 3px 0;
  border-radius: 0 5px 5px 0;
}
nav a span {
  display: block;
  color: #b3ccc2;
  font-size: 11px;
  margin-top: 5px;
}
nav a:hover {
  background: #224c40;
}
nav a[aria-current="page"] {
  border-left-color: var(--lime);
  background: #2b5548;
  color: white;
}
nav a[aria-current="page"] span {
  color: #d4e8dc;
}
.rail-bottom {
  margin-top: auto;
  padding-top: 28px;
  font-size: 13px;
}
.rail-bottom a {
  display: flex;
  justify-content: space-between;
  color: #eff6ef;
  text-decoration: none;
  padding: 6px 10px;
}
.rail-bottom p {
  color: #a9c4b8;
  font-size: 11px;
  padding-left: 10px;
  margin-bottom: 0;
}
#menu-toggle {
  display: none;
}
main {
  min-width: 0;
  padding: 0 6%;
  outline: none;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.07em;
}
.topbar span:nth-child(2) {
  color: var(--muted);
  letter-spacing: 0;
}
.contact-small {
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}
#reading {
  max-width: 1160px;
  margin: auto;
  min-height: 75vh;
  padding: 56px 0 70px;
  animation: appear 0.3s ease-out;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
  font-weight: 600;
}
h1,
h2,
h3 {
  font-weight: 550;
  letter-spacing: -0.035em;
  line-height: 1.13;
  margin: 0;
}
h1 {
  font-size: clamp(38px, 4.7vw, 70px);
  max-width: 960px;
  margin-bottom: 28px;
}
h2 {
  font-size: 31px;
  margin: 0 0 18px;
}
h3 {
  font-size: 21px;
  margin: 0 0 12px;
}
p {
  margin: 0 0 20px;
}
.lead {
  font-size: 22px;
  line-height: 1.55;
  max-width: 820px;
  color: #334c47;
}
.start-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.65fr);
  gap: 48px;
  margin-top: 44px;
}
.owner-note {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  font-size: 18px;
  margin: 0;
}
.owner-note p {
  font-size: 21px;
  letter-spacing: -0.015em;
}
.owner-note cite {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 30px 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 21px;
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
}
.button.secondary {
  background: transparent;
  color: var(--green);
}
.button:hover {
  background: #215d4b;
  color: #fff;
}
.method {
  margin: 44px 0 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.method-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 24px;
}
.method-flow strong {
  font-size: 16px;
  display: block;
}
.method-flow p {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0;
}
.method-flow .flow-symbol {
  font-size: 24px;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.section {
  margin: 44px 0;
  padding-top: 8px;
}
.case-header {
  margin-bottom: 32px;
}
.case-status {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  padding: 5px 0;
  margin-bottom: 18px;
  border-bottom: 1px solid #a2bcae;
}
.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 48px;
}
.prose {
  max-width: 790px;
  min-width: 0;
  width: 100%;
}
.prose p {
  line-height: 1.8;
  margin-bottom: 22px;
}
.margin-notes {
  font-size: 12px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.margin-notes strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 9px;
}
.margin-notes div {
  margin-bottom: 30px;
}
.chapter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 17px 0;
  margin: 28px 0;
  border-block: 1px solid var(--line);
  font-size: 12px;
}
.chapter-links a {
  text-decoration: none;
}
.architecture {
  background: #e9f0ed;
  padding: 28px;
  border-radius: var(--radius);
  margin: 30px 0;
}
.architecture h3 {
  margin-bottom: 22px;
}
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.pipeline .node {
  flex: 1;
  min-width: 0;
  border-top: 2px solid #487762;
  padding: 14px 0 0;
  font-size: 14px;
  line-height: 1.5;
}
.node strong {
  display: block;
  color: var(--green);
  margin-bottom: 7px;
}
.node small {
  font-size: 12px;
  color: var(--muted);
}
.code-panel {
  background: #122a26;
  color: #dfebe4;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0;
}
.code-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #375048;
  font-size: 12px;
  color: #abc8bb;
}
.code-panel header a {
  color: #d7ed96;
}
.code-panel pre {
  margin: 0;
  padding: 24px;
  overflow: auto;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.8;
  tab-size: 2;
}
.annotation {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.note {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.quote-line {
  font-size: 25px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  border-left: 3px solid #7a9f80;
  margin: 40px 0;
  padding: 8px 0 8px 24px;
}
.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ledger th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.ledger th,
.ledger td {
  padding: 15px 12px 15px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ledger td:last-child {
  font-variant-numeric: tabular-nums;
}
.table-wrap {
  overflow: auto;
  margin: 24px 0;
}
.invest-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  border-block: 1px solid var(--line);
  margin: 32px 0;
  padding: 24px 0;
}
.invest-summary strong {
  display: block;
  font-size: 35px;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.invest-summary span {
  font-size: 13px;
  color: var(--muted);
}
.bars {
  display: grid;
  gap: 18px;
  margin: 28px 0;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  gap: 20px;
  margin-bottom: 6px;
}
.bar-track {
  height: 12px;
  display: flex;
  background: #dae4df;
  border-radius: 3px;
  overflow: hidden;
}
.bar-fresh {
  background: #1c6652;
}
.bar-cached {
  background: #96b694;
}
.bar-output {
  background: #bd8847;
  min-width: 2px;
}
.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
}
.record {
  padding: 21px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 22px;
}
.record time,
.record .tag {
  font-size: 12px;
  color: var(--accent);
}
.record p {
  font-size: 15px;
  margin-bottom: 10px;
}
.record a {
  font-size: 12px;
}
.disclosure {
  margin: 20px 0;
  border-block: 1px solid var(--line);
  padding: 16px 0;
}
.disclosure summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--accent);
  padding: 3px 0;
}
.disclosure div {
  padding-top: 18px;
}
.try-panel {
  background: #e9f0ed;
  padding: 28px;
  border-radius: var(--radius);
  margin: 30px 0;
}
.try-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.try-panel label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.try-panel input,
.try-panel select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #90a99c;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
.result {
  grid-column: 1/-1;
  border-top: 1px solid #b7ccc0;
  padding-top: 22px;
  font-size: 18px;
  margin: 0;
}
.result strong {
  color: var(--accent);
}
.role-list .record {
  grid-template-columns: 220px 1fr;
}
.role-list .tag {
  font-size: 16px;
  color: var(--ink);
}
.phase {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 30px;
}
.phase .tag {
  color: var(--accent);
  font-size: 13px;
}
.phase p {
  font-size: 16px;
}
.repo-tree {
  font:
    13px/1.9 Consolas,
    monospace;
  white-space: pre;
  overflow: auto;
  padding: 25px;
  background: #e9f0ed;
  border-radius: var(--radius);
}
.contact-page {
  max-width: 750px;
  padding: 30px 0 65px;
}
.contact-page h1 {
  font-size: 60px;
}
.contact-address {
  font-size: 23px;
}
.copy-status {
  font-size: 13px;
  min-height: 25px;
}
footer {
  max-width: 1160px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 24px 0 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
}
footer span {
  margin-right: auto;
}
footer a {
  color: var(--muted);
}
.live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.error-state {
  padding: 40px 0;
}
.small {
  font-size: 13px;
  color: var(--muted);
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1600px) {
  main {
    padding-inline: 8%;
  }
}
@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: 236px 1fr;
  }
  .rail {
    padding: 25px 16px;
  }
  .start-intro,
  .case-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .margin-notes {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
  }
  .margin-notes div {
    max-width: 280px;
    margin-bottom: 8px;
  }
  .method-flow {
    grid-template-columns: repeat(2, 1fr);
  }
  .topbar span:nth-child(2) {
    display: none;
  }
  .role-list .record {
    grid-template-columns: 170px 1fr;
  }
}
@media (max-width: 740px) {
  body {
    font-size: 16px;
  }
  .workspace {
    display: block;
  }
  .rail {
    position: relative;
    height: auto;
    padding: 18px 22px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    overflow: visible;
  }
  .identity {
    font-size: 16px;
  }
  .identity small {
    font-size: 10px;
  }
  .monogram {
    width: 36px;
    height: 36px;
  }
  #menu-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #e7f2eb;
    background: transparent;
    border: 1px solid #65897a;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 11px;
  }
  #chapters {
    display: none;
    grid-column: 1/-1;
    padding-top: 10px;
  }
  #chapters.open {
    display: block;
  }
  .nav-label {
    margin: 18px 12px 10px;
  }
  .rail-bottom {
    display: none;
  }
  main {
    padding: 0 24px;
  }
  .topbar {
    padding: 18px 0;
    font-size: 9px;
  }
  #reading {
    padding: 35px 0 45px;
  }
  h1 {
    font-size: 43px;
    line-height: 1.12;
  }
  h2 {
    font-size: 27px;
  }
  .lead {
    font-size: 19px;
  }
  .start-intro {
    margin-top: 28px;
  }
  .owner-note p {
    font-size: 19px;
  }
  .method-flow {
    gap: 18px;
  }
  .pipeline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .architecture,
  .try-panel {
    padding: 20px;
  }
  .case-layout {
    gap: 26px;
  }
  .prose p {
    line-height: 1.75;
  }
  .margin-notes {
    padding-left: 16px;
  }
  .invest-summary {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .invest-summary > div {
    display: flex;
    align-items: baseline;
    gap: 20px;
  }
  .invest-summary strong {
    font-size: 29px;
    min-width: 120px;
  }
  .ledger {
    font-size: 12px;
  }
  .record,
  .role-list .record,
  .phase {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .try-grid {
    gap: 15px;
  }
  .contact-page h1 {
    font-size: 43px;
  }
  .contact-address {
    font-size: 19px;
  }
  .code-panel pre {
    font-size: 11px;
    padding: 18px;
  }
  .actions {
    gap: 10px;
  }
  .button {
    padding: 11px 15px;
    font-size: 13px;
  }
  .contact-small {
    font-size: 12px;
  }
  .chapter-links {
    gap: 10px 18px;
  }
  footer {
    gap: 12px;
  }
  .quote-line {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  #reading {
    animation: none;
  }
}
@media print {
  .rail,
  .topbar,
  footer,
  .actions,
  #menu-toggle {
    display: none;
  }
  .workspace {
    display: block;
  }
  main {
    padding: 0;
  }
  body {
    background: white;
    color: black;
  }
  .code-panel {
    background: #eee;
    color: black;
  }
  #reading {
    padding: 0;
  }
  .case-layout {
    display: block;
  }
  .margin-notes {
    margin-top: 25px;
  }
}
