:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --ink: #111827;
  --muted: #64748b;
  --line: #d9e2ec;
  --brand: #0f766e;
  --brand-2: #2563eb;
  --brand-soft: #e6f5f2;
  --danger: #dc2626;
  --warn: #b45309;
  --ok: #047857;
  --shadow: 0 18px 50px rgba(15, 23, 42, .08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: #0b1220;
  color: #eef6ff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: #9fb0c9;
  font-size: 12px;
}

.rail-nav {
  display: grid;
  gap: 6px;
}

.rail-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 14px;
}

.rail-nav a:hover,
.rail-nav a:focus {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.rail-note {
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 12px;
  color: #cbd5e1;
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
  background: #f59e0b;
  margin-right: 8px;
}

.main {
  padding: 28px;
  display: grid;
  gap: 22px;
}

.hero {
  min-height: 430px;
  border-radius: 8px;
  padding: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 28px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .95), rgba(37, 99, 235, .92)),
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.2), transparent 32%);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 44px;
  line-height: 1.08;
  margin: 10px 0 18px;
  max-width: 920px;
}

.hero p {
  max-width: 760px;
  line-height: 1.75;
  color: rgba(255,255,255,.88);
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #c6fffa;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.button,
button.button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  min-height: 40px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.button.primary,
button.primary {
  border-color: transparent;
  background: #0f766e;
  color: #fff;
}

.hero .button {
  border-color: rgba(255,255,255,.45);
}

.hero .button:not(.primary) {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.hero-panel,
.plan-card,
.recap-card,
.copy-card,
.decision-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.hero-panel {
  background: rgba(255,255,255,.95);
  color: var(--ink);
  align-self: end;
}

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

.panel-head {
  align-items: center;
  margin-bottom: 16px;
  font-weight: 800;
}

.pill,
.mock-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.danger {
  color: var(--danger);
  background: #fee2e2;
}

.small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.status-grid,
.metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.status-grid div,
.metric {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

dt,
.metric span {
  color: var(--muted);
  font-size: 12px;
}

dd,
.metric strong {
  display: block;
  margin: 5px 0 0;
  font-size: 20px;
  font-weight: 850;
}

.toolbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(240px, 1fr) auto auto;
  align-items: end;
  gap: 14px;
  box-shadow: var(--shadow);
}

label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 15px;
  line-height: 1.3;
  background: #fff;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

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

.section h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.section-title {
  margin-bottom: 18px;
}

.section-title.full {
  grid-column: 1 / -1;
}

.explain-inline,
.notice {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 18px;
  color: #334155;
  line-height: 1.7;
}

.watch-grid,
.guide-grid,
.risk-grid,
.gap-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.watch-card,
.guide-card,
.risk-card,
.gap-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.watch-card h3,
.guide-card h3,
.risk-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.watch-card p,
.guide-card p,
.risk-card p,
.gap-card p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 16px;
}

.summary {
  color: #334155;
  line-height: 1.7;
  margin-bottom: 18px;
}

.budget-bars {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 84px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

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

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: inherit;
}

.compact h3 {
  margin: 0 0 12px;
}

.number-list,
.plain-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

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

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f8fafc;
}

.progress {
  display: grid;
  gap: 6px;
}

.progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
}

.progress-fill {
  height: 8px;
  background: var(--brand);
  border-radius: 999px;
}

.tabs,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab,
.chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 11px;
  font-weight: 700;
  cursor: pointer;
}

.tab.active,
.chip.active {
  background: #0b1220;
  color: #fff;
  border-color: #0b1220;
}

.copy-card {
  min-height: 260px;
  line-height: 1.75;
}

.copy-card h3 {
  margin-top: 0;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 16px;
}

.decision-panel {
  position: sticky;
  top: 24px;
  align-self: start;
}

.decision-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.decision-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.risk-score {
  font-weight: 850;
}

.risk-low {
  color: var(--ok);
}

.risk-medium {
  color: var(--warn);
}

.risk-high {
  color: var(--danger);
}

.recap-card {
  display: grid;
  gap: 18px;
}

.funnel {
  display: grid;
  gap: 10px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 10px;
}

.funnel-bar {
  min-height: 32px;
  border-radius: 8px;
  background: #e6f5f2;
  position: relative;
  overflow: hidden;
}

.funnel-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #14b8a6, #2563eb);
  border-radius: inherit;
}

.gap-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gap-card {
  background: #f8fafc;
}

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

  .rail {
    position: static;
    height: auto;
  }

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

  .hero,
  .split,
  .review-layout {
    grid-template-columns: 1fr;
  }

  .watch-grid,
  .guide-grid,
  .risk-grid,
  .gap-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 680px) {
  .main {
    padding: 14px;
  }

  .hero {
    padding: 24px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .watch-grid,
  .guide-grid,
  .risk-grid,
  .gap-list,
  .toolbar,
  .status-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

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