:root {
  color-scheme: light;
  --bg: #f3f5f0;
  --surface: rgba(255, 255, 252, 0.9);
  --surface-strong: #ffffff;
  --surface-soft: #f8faf6;
  --ink: #14201f;
  --muted: #5f6f6b;
  --line: rgba(20, 32, 31, 0.13);
  --line-strong: rgba(20, 32, 31, 0.23);
  --green: #19725f;
  --blue: #275f87;
  --amber: #96631d;
  --red: #a23a32;
  --violet: #5d5a8b;
  --slate: #3d4a54;
  --green-soft: #e7f3ef;
  --blue-soft: #e8f0f7;
  --amber-soft: #fff3da;
  --red-soft: #fdebe8;
  --violet-soft: #eeeeff;
  --shadow: 0 14px 34px rgba(20, 32, 31, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(25, 114, 95, 0.12), transparent 280px),
    linear-gradient(90deg, rgba(39, 95, 135, 0.05), transparent 46%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(20, 32, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 31, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 86%);
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.1;
}

.private-shell {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 18px 14px 34px;
}

.private-header {
  display: grid;
  gap: 12px;
}

.private-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.private-nav a,
.segmented button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 252, 0.78);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.private-nav a {
  padding: 0 10px;
}

.private-nav a:hover,
.private-nav a:focus-visible,
.segmented button:hover,
.segmented button:focus-visible {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.title-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: stretch;
}

.title-copy,
.cycle-score-card,
.thesis-strip,
.panel,
.score-card,
.source-card,
.roadmap-card,
.decision-context-slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.title-copy {
  min-width: 0;
  padding: 18px;
  overflow-wrap: anywhere;
}

.kicker,
.panel-kicker,
.score-card .label,
.source-card .source-type,
.roadmap-card span,
.timeline-label {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  margin-top: 6px;
  font-size: 34px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

.lead {
  max-width: 1020px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.cycle-score-card {
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(20, 32, 31, 0.95), rgba(31, 49, 47, 0.92)),
    var(--ink);
  color: #fff;
}

.cycle-score-card span,
.cycle-score-card p,
.snapshot-meta span,
.thesis-strip span,
.score-card p,
.score-card li,
.panel-head p,
.panel-tag,
.metric-card span,
.metric-card p,
.funnel-step span,
.funnel-step p,
.dimension-copy,
.dimension-list li,
.metric-table th,
.metric-table td,
.source-card p,
.source-card dd,
.roadmap-card p,
.footer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.cycle-score-card span,
.cycle-score-card p {
  color: rgba(255, 255, 255, 0.72);
}

.cycle-score-card strong {
  color: #fff;
  font-size: 46px;
  line-height: 1;
}

.cycle-spark {
  min-height: 54px;
}

.thesis-strip {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 150px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.thesis-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--amber);
  font-size: 16px;
  line-height: 1.28;
}

.thesis-strip p {
  color: var(--slate);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.snapshot-meta {
  text-align: right;
}

.snapshot-meta strong {
  color: var(--ink);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.score-card {
  display: grid;
  min-height: 284px;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
}

.score-card[data-tone="green"] {
  border-color: rgba(25, 114, 95, 0.28);
}

.score-card[data-tone="blue"] {
  border-color: rgba(39, 95, 135, 0.28);
}

.score-card[data-tone="amber"] {
  border-color: rgba(150, 99, 29, 0.32);
}

.score-card[data-tone="red"] {
  border-color: rgba(162, 58, 50, 0.3);
}

.score-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.score-top strong {
  color: var(--ink);
  font-size: 17px;
}

.score-badge {
  min-width: 54px;
  border-radius: 8px;
  padding: 7px 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  text-align: center;
}

.score-bar {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece7;
}

.score-fill {
  width: var(--score-width);
  height: 100%;
  border-radius: inherit;
  background: var(--tone-color);
}

.sparkline {
  display: block;
  width: 100%;
  height: 54px;
  overflow: visible;
}

.sparkline-grid {
  fill: none;
  stroke: rgba(20, 32, 31, 0.14);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.sparkline-area {
  fill: var(--spark-color);
  opacity: 0.13;
}

.sparkline-line {
  fill: none;
  stroke: var(--spark-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.8;
  vector-effect: non-scaling-stroke;
}

.sparkline-dot {
  fill: #fff;
  stroke: var(--spark-color);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.cycle-score-card .sparkline-grid {
  stroke: rgba(255, 255, 255, 0.18);
}

.cycle-score-card .sparkline-area {
  opacity: 0.2;
}

.cycle-score-card .sparkline-dot {
  fill: var(--ink);
}

.score-card .sparkline {
  height: 48px;
}

.score-card ul,
.dimension-list,
.source-field-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  gap: 10px;
}

.panel {
  min-width: 0;
  padding: 14px;
}

.panel-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.panel-head h2,
.section-head h2 {
  margin-top: 4px;
}

.panel-tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: var(--slate);
  font-weight: 800;
  white-space: nowrap;
}

.liquidity-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.metric-card {
  display: grid;
  min-height: 182px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
  overflow-wrap: anywhere;
}

.metric-card strong {
  display: block;
  margin: 1px 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.metric-card[data-tone="green"] strong {
  color: var(--green);
}

.metric-card[data-tone="blue"] strong {
  color: var(--blue);
}

.metric-card[data-tone="amber"] strong {
  color: var(--amber);
}

.metric-card[data-tone="red"] strong {
  color: var(--red);
}

.exit-funnel {
  display: grid;
  gap: 8px;
}

.funnel-step {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 82px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
  overflow-wrap: anywhere;
}

.funnel-step strong {
  color: var(--ink);
  font-size: 14px;
}

.funnel-value {
  color: var(--blue);
  font-size: 16px;
  font-weight: 850;
  text-align: right;
}

.funnel-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ede9;
}

.funnel-track i {
  display: block;
  width: var(--funnel-width);
  height: 100%;
  border-radius: inherit;
  background: var(--funnel-color);
}

.funnel-step .sparkline {
  height: 42px;
  margin-top: 6px;
}

.dimension-panel {
  display: grid;
  gap: 4px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.segmented button {
  padding: 0 11px;
}

.segmented button[aria-selected="true"] {
  border-color: rgba(25, 114, 95, 0.36);
  background: var(--green-soft);
  color: var(--ink);
}

.dimension-detail {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: 10px;
}

.dimension-summary,
.dimension-metrics {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.dimension-summary {
  display: grid;
  gap: 10px;
}

.dimension-summary strong {
  color: var(--ink);
  font-size: 22px;
}

.dimension-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dimension-metric {
  display: grid;
  gap: 6px;
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  overflow-wrap: anywhere;
}

.dimension-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dimension-metric strong {
  color: var(--ink);
  font-size: 18px;
}

.dimension-metric p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dimension-metric .sparkline {
  align-self: end;
  height: 46px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.metric-table th,
.metric-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.metric-table th {
  background: #f1f5f1;
  color: var(--slate);
  font-weight: 850;
}

.metric-table td {
  color: var(--slate);
}

.metric-table tr:last-child td {
  border-bottom: 0;
}

.dim-pill,
.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.dim-pill {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill[data-status="live"] {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill[data-status="manual"] {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill[data-status="planned"] {
  background: var(--violet-soft);
  color: var(--violet);
}

.source-section {
  display: grid;
  gap: 10px;
}

.section-head > p {
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  text-align: right;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.source-card {
  display: grid;
  gap: 10px;
  min-height: 282px;
  padding: 14px;
  background: var(--surface);
}

.source-card h3 {
  color: var(--ink);
}

.source-card a,
.roadmap-card a {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.source-card a:hover,
.roadmap-card a:hover {
  text-decoration: underline;
}

.source-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.source-card-head strong {
  min-width: 46px;
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.source-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.source-chip-row span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 7px;
  background: #fff;
  color: var(--slate);
  font-size: 11px;
  font-weight: 800;
}

.source-field-list {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.source-field-list div {
  display: grid;
  gap: 4px;
}

.source-field-list dt {
  color: var(--slate);
  font-size: 12px;
  font-weight: 850;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.roadmap-card {
  display: grid;
  gap: 8px;
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.roadmap-card strong {
  color: var(--ink);
  font-size: 14px;
}

.decision-context-slot {
  min-height: 120px;
  padding: 14px;
}

.footer {
  padding: 6px 2px 0;
}

@media (max-width: 1180px) {
  .score-grid,
  .source-grid,
  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-grid,
  .dimension-detail {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .private-shell {
    max-width: 100vw;
    overflow-x: hidden;
    padding: 12px 9px 34px;
  }

  .private-shell > * {
    max-width: calc(100vw - 18px);
  }

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

  .private-nav a,
  .segmented button {
    min-height: 30px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  .private-nav a {
    min-width: 0;
    width: 100%;
  }

  .private-nav a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .segmented button {
    flex: 0 0 auto;
  }

  .title-grid,
  .thesis-strip,
  .score-grid,
  .source-grid,
  .roadmap-grid,
  .liquidity-board,
  .dimension-metrics {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }

  .thesis-strip {
    align-items: start;
  }

  .snapshot-meta {
    text-align: left;
  }

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

  .segmented {
    justify-content: flex-start;
  }

  .funnel-step {
    grid-template-columns: 1fr;
  }

  .funnel-value {
    text-align: left;
  }
}
