:root {
  --ink: #17201b;
  --muted: #5f6b64;
  --line: #d9ded8;
  --panel: #ffffff;
  --soft: #eef2ec;
  --accent: #315c46;
  --accent-2: #8f5a1f;
  --signal: #164d59;
  --warn: #a46422;
  --good: #557043;
  --shadow: 0 18px 55px rgba(23, 33, 27, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: linear-gradient(180deg, #f7f7f3 0%, #f4f7f2 100%);
  color: var(--ink);
  line-height: 1.45;
}

a,
button {
  font: inherit;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid #bdd0c4;
  border-radius: 999px;
  background: #e7f0ec;
  color: var(--accent);
  font-weight: 850;
  cursor: pointer;
}

.primary-action:hover,
.primary-action:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 30px 22px;
  border-right: 1px solid var(--line);
  background: rgba(247, 247, 243, 0.9);
}

.brand {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 850;
  line-height: 1.15;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent);
  font-weight: 900;
}

.brand .small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #43524a;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 780;
}

.nav a span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  border-color: var(--line);
  background: #eef5f1;
  color: var(--accent);
  outline: none;
}

.main {
  padding: 28px;
}

.topbar,
.section-head,
.source-top,
.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.topbar {
  margin-bottom: 18px;
}

.crumb,
.source-type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #40564e;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(49, 92, 70, 0.12);
}

.hero,
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 18px;
  align-items: stretch;
}

.workspace {
  align-items: start;
  margin-top: 18px;
}

.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-title {
  max-width: 680px;
  margin: 0;
  color: #4f5d56;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 560;
  line-height: 1.22;
  letter-spacing: 0;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero > .panel:first-child > .kicker:first-child {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
}

.question {
  max-width: 620px;
  margin-top: 8px;
  padding: 7px 11px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--soft);
  color: #5d6861;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.3;
}

.summary {
  max-width: 680px;
  margin: 8px 0 0;
  color: #5d6861;
  font-size: 14px;
  line-height: 1.42;
}

.question,
.summary,
.section-copy {
  font-style: italic;
  color: #5d6861;
}

.section-head .section-copy {
  text-align: center;
}

.question-sections .context-note,
.attention-sections .attention-note,
.change-sections .change-note,
.briefing-sections .briefing-note {
  border-color: rgba(120, 135, 130, 0.18);
  background: rgba(248, 251, 249, 0.68);
}

.question-sections .context-note h3,
.attention-sections .attention-note h3,
.change-sections .change-note h3,
.briefing-sections .briefing-note h3 {
  color: #526057;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.question-sections .context-note p,
.attention-sections .attention-note p,
.change-sections .change-note p,
.briefing-sections .briefing-note p {
  text-align: center;
}

.question-sections .context-note p,
.question-sections .context-note ul,
.attention-sections .attention-note p,
.attention-sections .attention-note ul,
.change-sections .change-note p,
.change-sections .change-note ul,
.briefing-sections .briefing-note p,
.briefing-sections .briefing-note ul {
  color: #5d6861;
  font-style: italic;
  line-height: 1.48;
}

.question-sections .context-note.review-note,
.attention-sections .attention-note.review-note,
.change-sections .change-note.review-note,
.briefing-sections .briefing-note.review-note {
  border-color: rgba(146, 91, 45, 0.2);
  background: rgba(255, 250, 242, 0.58);
}

.meter {
  margin-top: 14px;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8e2;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.source-grid,
.flow,
.signal-stack,
.governance-grid,
.hub-grid {
  display: grid;
  gap: 10px;
}

.source-card {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.source-card:hover,
.source-card:focus-visible,
.source-card[aria-pressed="true"] {
  border-color: var(--accent);
  background: #edf7f4;
  outline: none;
}

.source-title {
  display: block;
  font-size: 16px;
  font-weight: 850;
}

.status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fbfbf8;
  color: #5d6861;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  padding: 5px 8px;
  border: 1px solid #dfe7e2;
  border-radius: 999px;
  background: #fbfcfb;
  color: #46534c;
  font-size: 12px;
  font-weight: 700;
}

.flow-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.flow-index {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e6f0ed;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.flow-box,
.signal-line,
.governance-item,
.hub-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-box {
  padding: 12px;
}

.flow-box strong,
.governance-item strong {
  display: block;
  margin-bottom: 3px;
}

.flow-box span,
.governance-item span {
  color: var(--muted);
  font-size: 13px;
}

.detail {
  position: sticky;
  top: 20px;
  overflow: hidden;
  padding: 0;
}

.detail-head {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fbf9;
}

.detail-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.evidence-box {
  padding: 14px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #fff;
}

.evidence-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.evidence-box p,
.evidence-box li {
  color: #435049;
  font-size: 14px;
}

.evidence-box p {
  margin: 0;
}

.evidence-box ul {
  margin: 0;
  padding-left: 18px;
}

.note {
  padding: 12px 14px;
  border-left: 4px solid var(--warn);
  border-radius: 0 8px 8px 0;
  background: #fff7ef;
  color: #3f3428;
  font-size: 14px;
}

.signal-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  font-weight: 800;
}

.signal-line span {
  color: var(--accent);
  text-align: center;
}

.governance-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.governance-item {
  min-height: 86px;
  padding: 12px;
}

.hub-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hub-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
}

.hub-card:hover,
.hub-card:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.hub-card h2 {
  margin: 0;
  font-size: 22px;
}

.hub-card p {
  margin: 0;
  color: var(--muted);
}

h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0;
}

.section-copy {
  margin: 5px 0 0;
  color: #5d6861;
  font-size: 14px;
  line-height: 1.38;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side,
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side {
    padding: 20px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .workspace,
  .hub-grid {
    grid-template-columns: 1fr;
  }

  .compact-two-col {
    grid-template-columns: 1fr;
  }

  .detail {
    position: static;
  }
}

@media (max-width: 760px) {
  .main {
    padding: 18px;
  }

  .topbar,
  .section-head {
    display: grid;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .governance-grid {
    grid-template-columns: 1fr;
  }
}
