:root {
  --bg: #f7f5ef;
  --panel: #fffdf8;
  --ink: #1e2a25;
  --muted: #66736d;
  --line: #ded8cb;
  --accent: #315f4d;
  --accent-soft: #e3eee8;
  --risk: #8a4b32;
  --risk-soft: #f3e5dc;
  --assumption: #735d1f;
  --assumption-soft: #f4edcf;
  --shadow: 0 12px 30px rgba(30, 42, 37, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; }
a { color: inherit; }
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 22px; border-right: 1px solid var(--line); background: rgba(255,253,248,.72); backdrop-filter: blur(8px); }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 30px; text-decoration: none; }
.mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--accent); color: white; font-weight: 800; }
.brand small { display: block; color: var(--muted); }
nav { display: grid; gap: 6px; }
nav a { padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--muted); }
nav a:hover { background: var(--accent-soft); color: var(--ink); }
main { max-width: 1180px; width: 100%; padding: 48px; }
.hero, .pagehead { margin-bottom: 44px; }
h1 { font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: .95; letter-spacing: 0; margin: 16px 0; }
h2 { letter-spacing: 0; line-height: 1.1; }
h3 { margin-bottom: 4px; }
.lead { font-size: 1.22rem; max-width: 760px; color: var(--muted); }
.muted { color: var(--muted); }
.hero-grid, .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cards.single { grid-template-columns: 1fr; }
.card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px; box-shadow: var(--shadow); }
a.card { text-decoration: none; display: grid; gap: 8px; }
a.card span { color: var(--muted); }
.card.tall { display: grid; gap: 8px; align-content: start; }
.grid { display: grid; gap: 18px; margin: 28px 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.highlight { background: #eef5ef; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 28px 0; }
.metric-card { display: grid; gap: 8px; min-height: 190px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.metric-card strong { font-size: clamp(1.45rem, 2.4vw, 2.2rem); line-height: 1; letter-spacing: 0; }
.metric-card span:last-child { color: var(--muted); font-size: .93rem; }
.metric-label { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; }
.bar-list, .range-list, .value-stack { display: grid; gap: 14px; margin-top: 18px; }
.bar-row, .range-row { display: grid; grid-template-columns: minmax(210px, 1.25fr) minmax(180px, 1fr) minmax(100px, auto); gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bar-row:last-child, .range-row:last-child { border-bottom: 0; }
.bar-row span, .range-row span { display: block; color: var(--muted); font-size: .9rem; }
.bar-track, .range-track { position: relative; height: 14px; border-radius: 999px; background: #ece6da; overflow: hidden; }
.bar-track span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #829b56); }
.range-track span { position: absolute; left: var(--left); width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #829b56); }
.value-stack article { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.value-stack article:last-child { border-bottom: 0; }
.value-stack .bar-track span { width: var(--w); }
.value-stack p { margin: 0; color: var(--muted); font-size: .92rem; }
.workflow-chain { display: grid; grid-template-columns: repeat(9, minmax(92px, 1fr)); gap: 10px; margin: 20px 0; }
.chain-node { position: relative; display: grid; gap: 8px; align-content: start; min-height: 112px; padding: 12px; border: 1px solid #cfd9d1; border-radius: 8px; background: var(--accent-soft); }
.chain-node::after { content: ""; position: absolute; right: -12px; top: 50%; width: 14px; height: 2px; background: var(--accent); }
.chain-node:last-child::after { display: none; }
.chain-node span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: white; font-size: .78rem; font-weight: 800; }
.chain-node strong { font-size: .92rem; line-height: 1.15; }
.badge { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: .78rem; font-weight: 700; border: 1px solid transparent; }
.badge.evidence { background: var(--accent-soft); color: var(--accent); border-color: #bdd0c5; }
.badge.assumption { background: var(--assumption-soft); color: var(--assumption); border-color: #ded19b; }
.badge.risk { background: var(--risk-soft); color: var(--risk); border-color: #e1bda8; }
.badge.neutral { background: #eee; color: #555; border-color: #ddd; }
.row { display: flex; gap: 14px; align-items: center; }
.between { justify-content: space-between; }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; }
.facts dt { color: var(--muted); font-weight: 700; }
ul { padding-left: 1.2rem; }
.checklist li { margin: 8px 0; }
.tablewrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.tablewrap.compact { box-shadow: none; border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { color: var(--muted); font-size: .9rem; }
tfoot th { color: var(--ink); }
.timeline { display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 46px 1fr; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: white; font-weight: 800; }
.question { padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); }
.compact-head { margin-top: 54px; }
.factsheet-grid { margin: 12px 0; }
.factsheet h3 { margin-top: 0; }
.source-line { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.source-line a { color: var(--accent); font-weight: 700; }
.calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.calc label { display: grid; gap: 6px; color: var(--muted); font-weight: 700; }
.calc input { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; }
.calc output { grid-column: 1 / -1; display: block; padding: 16px; background: var(--accent-soft); border-radius: 16px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 28px 18px; }
  .hero-grid, .cards, .grid.two, .calc, .metric-grid { grid-template-columns: 1fr; }
  .bar-row, .range-row { grid-template-columns: 1fr; }
  .workflow-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain-node::after { display: none; }
  .facts { grid-template-columns: 1fr; }
}
