:root {
  --ink: #102235;
  --muted: #5b6b7a;
  --line: #dbe4eb;
  --line-strong: #b9c9d5;
  --paper: #ffffff;
  --canvas: #f5f8fa;
  --navy: #0b1f33;
  --navy-soft: #17344d;
  --teal: #087f75;
  --teal-bright: #15b8a6;
  --teal-soft: #e2f6f2;
  --blue-soft: #e9f2fb;
  --amber: #a55b08;
  --amber-soft: #fff3d8;
  --red: #a33b42;
  --radius: 16px;
  --shadow: 0 18px 48px rgba(21, 46, 68, 0.10);
  --content: min(1180px, calc(100vw - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: white;
  background: var(--navy);
  transform: translateY(-140%);
}
.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(185, 201, 213, 0.8);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 650; }
.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  color: var(--teal-bright);
  background: var(--navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand strong { color: var(--teal); }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--teal); }
.nav-toggle { display: none; }

.section-shell { width: var(--content); margin-inline: auto; }
.content-section { padding-block: 96px; }
.tint-section { background: var(--canvas); }
.architecture-section { padding-block: 96px; border-block: 1px solid var(--line); background: #f8fbfd; }

.research-summary-section { border-top: 1px solid var(--line); background: #fff; }
.executive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.research-card { padding: 25px; border: 1px solid var(--line); border-top: 4px solid var(--line-strong); border-radius: var(--radius); background: white; box-shadow: 0 10px 30px rgba(21, 46, 68, 0.05); }
.research-card.status-frozen { border-top-color: var(--teal); }
.research-card.status-closed { border-top-color: var(--red); }
.research-card.status-research { border-top-color: #4b7c9d; }
.research-card.status-experiment { border-top-color: var(--amber); }
.research-card-head { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.research-card-head strong { color: var(--navy); }
.research-card h3 { margin: 14px 0 8px; font-size: 22px; }
.research-card p { margin: 0; color: var(--muted); }
.logic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.logic-grid article { padding: 22px; border-radius: 12px; background: var(--navy); color: white; }
.logic-grid h3 { margin: 8px 0; }
.logic-grid p { margin: 0; color: #c4d2dc; }
.logic-grid code { color: #5eead4; }
.logic-label { color: #5eead4; font: 800 12px "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
.research-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 10px 30px rgba(21, 46, 68, 0.05); }
.research-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.research-table th, .research-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.research-table th { color: var(--muted); background: #eef4f8; font-size: 12px; text-transform: uppercase; }
.research-table th:first-child, .research-table td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: white; font-weight: 750; }
.research-table th:first-child { background: #eef4f8; }
.research-table tbody tr:last-child td { border-bottom: 0; }
.research-table .emphasis { color: var(--teal); font-weight: 850; }
.research-table .risk-best { color: #23628a; font-weight: 850; }
.tradeoff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.tradeoff-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.tradeoff-grid h3 { margin: 0 0 5px; color: var(--muted); font-size: 13px; text-transform: uppercase; }
.tradeoff-grid strong { color: var(--navy); font-size: 20px; }
.tradeoff-grid p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.stress-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stress-grid div { padding: 22px; border-left: 4px solid var(--teal); border-radius: 8px; background: white; }
.stress-grid span { display: block; color: var(--muted); font-size: 13px; font-weight: 850; }
.stress-grid strong { display: block; margin-top: 4px; font-size: 20px; }
.stress-grid p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.research-status-section { color: #eaf2f6; background: var(--navy); }
.research-status-section .kicker, .research-status-section .section-index { color: #5eead4; }
.status-matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid #345069; border-radius: var(--radius); background: #345069; }
.status-matrix article { padding: 22px; background: #10283d; }
.status-matrix span { color: #9fb3c2; font-size: 12px; font-weight: 800; }
.status-matrix strong { display: block; margin: 8px 0; color: #5eead4; }
.status-matrix p { margin: 0; color: #c4d2dc; font-size: 14px; }
.evidence-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.evidence-columns article { padding: 24px; border: 1px solid #345069; border-radius: 12px; background: #10283d; }
.evidence-columns h3, .takeaway-panel h3, .artifact-references h3 { margin-top: 0; color: white; }
.evidence-columns p { color: #c4d2dc; }
.evidence-columns .check-list li { color: #c4d2dc; }
.evidence-columns .callout { color: #164f4a !important; }
.takeaway-panel { margin-top: 22px; padding: 24px; border: 1px solid #345069; border-radius: 12px; background: #10283d; }
.takeaway-panel ol { margin: 0; padding-left: 22px; color: #c4d2dc; }
.takeaway-panel li { padding: 5px 0; }
.artifact-references { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; padding: 24px; border: 1px solid #345069; border-radius: 12px; background: #10283d; }
.artifact-references h3 { grid-column: 1 / -1; }
.artifact-references code { padding: 11px 12px; border-radius: 7px; color: #5eead4; background: #071522; overflow-wrap: anywhere; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(350px, 0.65fr);
  gap: clamp(40px, 7vw, 92px);
  align-items: center;
  min-height: calc(100vh - 70px);
  padding-block: 72px;
}
.eyebrow, .kicker, .definition-label {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero h1 { margin: 12px 0 18px; font-size: clamp(48px, 7vw, 86px); line-height: 0.98; letter-spacing: -0.055em; }
.hero h1 span { color: var(--teal); }
.lede { max-width: 760px; margin: 0; color: #394b5c; font-size: clamp(18px, 2vw, 23px); line-height: 1.65; }

.status-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.badge { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: #425464; font-size: 12px; font-weight: 750; letter-spacing: 0.035em; }
.badge-review { border-color: #87cfc5; color: #05665e; background: var(--teal-soft); }
.badge-wait, .badge-warning { border-color: #efc783; color: #80500e; background: var(--amber-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 11px 18px; border: 1px solid transparent; border-radius: 9px; font-size: 15px; font-weight: 750; text-decoration: none; transition: transform 140ms ease, background 140ms ease, border-color 140ms ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--navy); }
.button-primary:hover { background: var(--navy-soft); }
.button-secondary { border-color: var(--line-strong); background: white; }
.button-secondary:hover { border-color: var(--teal); color: var(--teal); }
.button-quiet { color: var(--teal); background: transparent; }
.button-large { min-height: 56px; padding-inline: 24px; }

.artifact-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.artifact-card-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; }
.signal { display: inline-flex; align-items: center; gap: 7px; }
.signal::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(8, 127, 117, 0.12); }
.signal-pass { color: var(--teal); }
.artifact-file { padding: 22px 20px; border-bottom: 1px solid var(--line); color: var(--navy); font-family: "SFMono-Regular", Consolas, monospace; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.artifact-meta { margin: 0; padding: 8px 20px; }
.artifact-meta div { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 9px 0; border-bottom: 1px solid #edf1f4; }
.artifact-meta div:last-child { border-bottom: 0; }
.artifact-meta dt { color: var(--muted); }
.artifact-meta dd { margin: 0; font-weight: 700; text-align: right; }
.hash-block { position: relative; margin: 14px 20px 0; padding: 15px; border-radius: 10px; background: var(--canvas); }
.hash-block > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; }
.hash-block code { display: block; padding-right: 58px; color: #274053; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.copy-button { cursor: pointer; border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 8px; color: #425464; background: white; font: inherit; font-size: 12px; font-weight: 700; }
.hash-block .copy-button { position: absolute; top: 12px; right: 12px; }
.microcopy { margin: 12px 20px 20px; color: var(--muted); font-size: 13px; }

.section-heading { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 42px; }
.section-index { color: var(--teal); font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; font-weight: 800; }
.section-heading .kicker { margin: 0 0 7px; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: clamp(32px, 4vw, 48px); line-height: 1.15; letter-spacing: -0.035em; }
.section-heading p:last-child { max-width: 760px; margin: 12px 0 0; color: var(--muted); }
.section-intro { max-width: 850px; margin: -16px 0 30px; color: #425464; font-size: 18px; }
.subheading { margin: 42px 0 18px; font-size: 21px; }

.definition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.definition-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.definition-card.featured { border-top: 4px solid var(--teal); }
.definition-card h3 { margin: 9px 0 8px; font-size: 24px; }
.definition-card p { margin: 0; color: var(--muted); }
.not-equal { display: flex; gap: 20px; align-items: baseline; margin: 22px 0; padding: 18px 22px; border-left: 4px solid var(--teal); background: var(--teal-soft); }
.not-equal strong { white-space: nowrap; color: #065d56; font-size: 20px; }
.unchanged-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 24px; padding-top: 18px; }
.unchanged-grid > div { padding: 24px; border: 1px solid var(--line); border-radius: 12px; }
.unchanged-grid h3 { margin: 0 0 8px; }
.unchanged-grid p { margin: 0; color: var(--muted); }
.check-list, .dash-list { margin: 10px 0 0; padding: 0; list-style: none; }
.check-list li, .dash-list li { position: relative; padding: 5px 0 5px 28px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 900; }
.dash-list li::before { content: "—"; position: absolute; left: 0; color: var(--red); font-weight: 900; }

.flow { display: flex; flex-direction: column; align-items: stretch; max-width: 760px; margin: 0 auto 48px; }
.flow-node { padding: 13px 18px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; font-weight: 750; text-align: center; }
.flow-node.platform { color: #244159; background: #eef4f8; }
.flow-node.contract-node { border-color: #85c9c1; color: #055f58; background: var(--teal-soft); }
.flow-node.model { border: 0; color: white; background: var(--navy); }
.flow-node.strategy { border-color: #68bcb1; color: #064f49; background: #d6f1ed; }
.flow-arrow { padding: 3px 0; color: #7490a4; font-weight: 900; text-align: center; }
.model-boundary { padding: 16px; border: 2px solid var(--teal); border-radius: 14px; background: rgba(226, 246, 242, 0.38); }
.boundary-label { align-self: center; margin: 7px 0 -1px; padding: 3px 10px; color: var(--teal); background: #f8fbfd; font-size: 11px; font-weight: 900; letter-spacing: 0.13em; }
.boundary-label-platform { color: #46657b; }
.flow-platform-tail { padding: 16px; border: 1px dashed #89a0b2; border-radius: 14px; background: rgba(238, 244, 248, 0.55); }
.responsibility-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.responsibility-card { padding: 26px; border-radius: var(--radius); background: white; }
.responsibility-card.owns { border: 1px solid #98d5cd; }
.responsibility-card.excludes { border: 1px solid var(--line); }

.multi-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.strategy-tree { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); font-family: "SFMono-Regular", Consolas, monospace; }
.tree-root { padding: 13px 16px; border-radius: 8px; color: white; background: var(--navy); font-weight: 800; }
.tree-branch { position: relative; margin: 22px 0 0 22px; padding-left: 26px; border-left: 2px solid var(--line-strong); }
.tree-branch::before { content: ""; position: absolute; top: 15px; left: 0; width: 18px; border-top: 2px solid var(--line-strong); }
.tree-label { padding: 8px 10px; font-weight: 800; }
.tree-items { margin-left: 10px; border-left: 1px solid var(--line-strong); }
.tree-items div { display: flex; justify-content: space-between; gap: 10px; margin: 9px 0; padding: 8px 10px 8px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tree-items strong { color: var(--muted); font-size: 11px; }
.tree-items .state-active { color: var(--teal); }
.allocator-branch { padding-block: 4px; }
.multi-copy p { color: #405264; font-size: 17px; }
.multi-copy code { padding: 2px 5px; border-radius: 4px; background: var(--canvas); }
.process-list { display: grid; gap: 8px; margin-block: 24px; }
.process-list div { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font-weight: 650; }
.process-list span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 12px; }
.callout { padding: 18px 20px; border-left: 4px solid var(--teal); background: var(--teal-soft); color: #164f4a !important; font-weight: 650; }

.fact-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.fact-strip span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: #405264; background: white; font-size: 13px; font-weight: 700; }
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rule-card { position: relative; min-height: 238px; padding: 28px; border: 1px solid var(--line); border-top-width: 4px; border-radius: var(--radius); background: white; }
.rule-card.rule-ma { border-top-color: #4b7c9d; }
.rule-card.rule-bull { border-top-color: var(--teal); }
.rule-card.rule-bear { border-top-color: #b86060; }
.rule-card.rule-hold { border-top-color: #b88730; }
.rule-number { position: absolute; top: 20px; right: 22px; color: #9aaab7; font-family: monospace; font-size: 12px; }
.rule-card h3 { margin: 0 0 15px; font-size: 22px; }
.rule-card p { margin: 14px 0 0; color: var(--muted); }
.equation { padding: 11px 13px; border-radius: 7px; background: var(--canvas); font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; overflow-wrap: anywhere; }
.intent-table-wrap { overflow-x: auto; margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.intent-table { width: 100%; border-collapse: collapse; }
.intent-table th, .intent-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.intent-table th { color: var(--muted); background: #f8fafb; font-size: 13px; }
.intent-table tr:last-child td { border-bottom: 0; }
.cash-note { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin-top: 20px; padding: 20px 24px; border: 1px solid #8ccfc7; border-radius: 12px; background: var(--teal-soft); }
.cash-note strong { color: #075e56; font-size: 19px; white-space: nowrap; }
.cash-note p { margin: 0; color: #275d58; }

.replay-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
.replay-flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); }
.replay-flow span { flex: 1 1 160px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; font-weight: 700; text-align: center; }
.replay-flow b { color: var(--teal); }
.deterministic-formula { margin-top: 20px; padding: 15px; border-left: 4px solid var(--teal); background: var(--teal-soft); font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; font-weight: 700; }
.failure-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.failure-tags span { padding: 8px 12px; border: 1px solid #efc1c3; border-radius: 7px; color: #81363d; background: #fff4f4; font-size: 14px; font-weight: 650; }

.dark-section { padding-block: 96px; color: #eaf2f6; background: var(--navy); }
.section-heading.inverse h2 { color: white; }
.section-heading.inverse .section-index, .dark-section .kicker { color: #5eead4; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid #345069; border-radius: var(--radius); background: #345069; }
.metric { padding: 24px; background: #10283d; }
.metric strong { display: block; margin-bottom: 7px; color: #5eead4; font-family: "SFMono-Regular", Consolas, monospace; font-size: 27px; }
.metric span { color: #c4d2dc; font-size: 14px; }
.experiment-card { margin-top: 28px; padding: 26px; border: 1px solid #345069; border-radius: var(--radius); background: #10283d; }
.experiment-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.experiment-card-head h3 { margin: 3px 0 0; color: #fff; }
.experiment-card > p { color: #c4d2dc; }
.experiment-comparison { margin: 20px 0 14px; overflow: hidden; border: 1px solid #345069; border-radius: 10px; }
.experiment-row { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 14px; padding: 12px 15px; border-top: 1px solid #345069; color: #c4d2dc; }
.experiment-row:first-child { border-top: 0; }
.experiment-row strong { color: #5eead4; font-family: "SFMono-Regular", Consolas, monospace; font-weight: 600; }
.experiment-header { color: #fff; background: #0b1f33; font-weight: 700; }
.snapshot-hash { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 15px; align-items: center; margin-top: 24px; padding: 18px 20px; border: 1px solid #345069; border-radius: 10px; background: #10283d; }
.snapshot-hash span { color: #9fb3c2; font-size: 13px; font-weight: 750; }
.snapshot-hash code { color: white; font-size: 13px; overflow-wrap: anywhere; }
.copy-dark { color: white; border-color: #537086; background: #17344d; }
.audit-warning { display: grid; grid-template-columns: auto 1fr; gap: 18px; margin-top: 24px; padding: 24px; border: 1px solid #8c6829; border-radius: 12px; background: #2c2a24; }
.warning-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #1d1b17; background: #f0bd60; font-weight: 900; }
.audit-warning h3 { margin: 0 0 8px; color: #ffd889; }
.audit-warning p { margin: 6px 0; color: #d8d2c6; }

.gate-table { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.gate-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.gate-row:nth-child(even) { background: var(--canvas); }
.gate-row:last-child { border-bottom: 0; }
.gate-row strong { font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }
.pass, .none { color: var(--teal); }
.pending { color: var(--amber); }
.evidence-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

.reference-label { display: inline-block; margin-bottom: 28px; padding: 7px 10px; border-radius: 6px; color: #6e470c; background: var(--amber-soft); font-size: 12px; font-weight: 850; letter-spacing: 0.08em; }
.perf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.perf-card { padding: 21px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.perf-card span { display: block; min-height: 48px; color: var(--muted); font-size: 14px; }
.perf-card strong { display: block; color: var(--navy); font-family: "SFMono-Regular", Consolas, monospace; font-size: 22px; }

.steps { margin: 0; padding: 0; list-style: none; }
.steps > li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.steps > li:first-child { border-top: 1px solid var(--line); }
.step-number { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: white; background: var(--navy); font-family: monospace; font-size: 13px; font-weight: 850; }
.steps h3 { margin: 2px 0 8px; font-size: 19px; }
.steps p { margin: 0; color: var(--muted); }
.steps a { color: var(--teal); font-weight: 700; }
.inline-hash { display: block; color: #274053; font-size: 13px; overflow-wrap: anywhere; }
.command-block { position: relative; overflow: auto; padding: 16px 82px 16px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); }
.command-block code { display: block; color: #243d50; font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.command-block .copy-button { position: absolute; top: 10px; right: 10px; }

.package-section { padding-block: 96px; border-block: 1px solid var(--line); background: #f8fbfd; }
.package-tree { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.package-tree div { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.package-tree div:last-child { border-bottom: 0; }
.package-tree code { color: #0a645d; font-weight: 750; }
.package-tree span { color: var(--muted); }

.contract-banner { display: grid; grid-template-columns: 0.7fr 1.3fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.contract-banner div { padding: 26px; }
.contract-banner div:first-child { background: var(--navy); }
.contract-banner div:last-child { background: var(--amber-soft); }
.contract-banner span { display: block; margin-bottom: 5px; color: #8ea4b5; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.contract-banner div:last-child span { color: #8d641f; }
.contract-banner strong { display: block; color: white; font-family: "SFMono-Regular", Consolas, monospace; font-size: clamp(18px, 2.4vw, 28px); overflow-wrap: anywhere; }
.contract-banner div:last-child strong { color: #70460c; }
.contract-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 24px; }
.contract-columns > div { padding: 24px; border: 1px solid var(--line); border-radius: 12px; }
.contract-columns h3 { margin: 0 0 8px; }

.assumption-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.assumption-grid div { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #405264; font-weight: 650; }

.download-section { padding-block: 84px; color: white; background: var(--navy); }
.download-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.download-inner .kicker { color: #5eead4; }
.download-inner h2 { margin: 5px 0; font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.04em; }
.download-inner p { margin: 0; color: #b8c8d3; }
.download-inner .button-primary { color: var(--navy); background: #5eead4; }
.download-meta { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 18px 0 0; overflow: hidden; border: 1px solid #345069; border-radius: 12px; background: #345069; }
.download-meta div { padding: 16px; background: #10283d; }
.download-meta dt { color: #8ea4b5; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.download-meta dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.download-meta code { font-size: 12px; }

footer { color: #8ba0b0; background: #071522; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; padding-block: 24px; font-size: 13px; }
.copy-toast { position: fixed; z-index: 50; right: 20px; bottom: 20px; padding: 10px 14px; border-radius: 8px; color: white; background: var(--navy); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 140ms ease, transform 140ms ease; }
.copy-toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  :root { --content: min(100% - 32px, 760px); }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 64px; }
  .artifact-card { max-width: 620px; }
  .definition-grid, .responsibility-grid, .multi-grid, .rule-grid, .replay-layout, .contract-columns, .logic-grid, .evidence-columns { grid-template-columns: 1fr; }
  .executive-grid, .tradeoff-grid, .status-matrix { grid-template-columns: repeat(2, 1fr); }
  .stress-grid { grid-template-columns: 1fr; }
  .unchanged-grid { grid-template-columns: 1fr; }
  .metric-grid, .perf-grid { grid-template-columns: repeat(2, 1fr); }
  .assumption-grid { grid-template-columns: repeat(2, 1fr); }
  .download-inner { grid-template-columns: 1fr; }
  .download-meta { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 76px; }
  .topbar { min-height: 62px; padding-inline: 16px; }
  .nav-toggle { display: inline-flex; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; font: inherit; font-size: 14px; font-weight: 700; }
  .site-nav { position: absolute; top: 62px; right: 12px; left: 12px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px; }
  .hero h1 { font-size: 50px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .content-section, .architecture-section, .package-section, .dark-section { padding-block: 70px; }
  .section-heading { gap: 12px; margin-bottom: 32px; }
  .not-equal, .cash-note { grid-template-columns: 1fr; flex-direction: column; gap: 8px; }
  .not-equal strong, .cash-note strong { white-space: normal; }
  .metric-grid, .perf-grid, .assumption-grid, .executive-grid, .tradeoff-grid, .status-matrix, .artifact-references { grid-template-columns: 1fr; }
  .artifact-references h3 { grid-column: auto; }
  .experiment-card-head { display: block; }
  .experiment-card-head .badge { display: inline-block; margin-top: 12px; }
  .experiment-row { grid-template-columns: 1fr; }
  .snapshot-hash { grid-template-columns: 1fr; }
  .package-tree div { grid-template-columns: 1fr; gap: 4px; }
  .contract-banner { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .tree-items div { align-items: flex-start; flex-direction: column; }
  .replay-flow { flex-direction: column; align-items: stretch; }
  .replay-flow b { transform: rotate(90deg); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .topbar, .hero-actions, .copy-button, .copy-toast { display: none !important; }
  .hero { min-height: auto; }
  .content-section, .architecture-section, .package-section, .dark-section { padding-block: 36px; }
  .dark-section, .download-section { color: var(--ink); background: white; }
  .section-heading.inverse h2 { color: var(--ink); }
}
