:root {
  --bg: #eef3f0;
  --ink: #17211c;
  --muted: #66736d;
  --panel: #ffffff;
  --panel-2: #f7faf8;
  --line: #dbe5df;
  --forest: #176b4d;
  --mint: #5bbf9a;
  --blue: #3867b7;
  --gold: #d08a19;
  --red: #bd3f36;
  --shadow: 0 16px 36px rgba(27, 46, 36, .10);
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(23,107,77,.10), rgba(56,103,183,.08) 46%, rgba(208,138,25,.10)),
    var(--bg);
  font-family: "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

button, input, select { font: inherit; }

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 312px;
  padding: 24px;
  overflow: auto;
  color: #f7fff9;
  background: #14231c;
  border-right: 1px solid rgba(255,255,255,.12);
}

.brand span {
  display: block;
  color: #9ee6c7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand h1 {
  margin: 10px 0 8px;
  font-size: 27px;
  line-height: 1.18;
}

.brand p {
  margin: 0;
  color: #bed3c8;
  font-size: 13px;
  line-height: 1.5;
}

.nav {
  display: grid;
  gap: 8px;
  margin: 26px 0;
}

.nav button,
.ghost {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  color: #e9f7ef;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}

.nav button {
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
}

.nav button:hover,
.nav button.active {
  color: #071912;
  background: #9ee6c7;
  border-color: #9ee6c7;
}

.filters {
  padding: 16px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
}

.filters label {
  display: block;
  margin-bottom: 12px;
  color: #cfe1d7;
  font-size: 12px;
  font-weight: 800;
}

.filters select,
.filters input {
  width: 100%;
  height: 40px;
  margin-top: 6px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.ghost {
  width: 100%;
  font-weight: 900;
}

.stage {
  margin-left: 312px;
  padding: 30px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 900;
}

.hero h2 {
  margin: 0;
  font-size: 38px;
  letter-spacing: 0;
}

.hero-note {
  width: min(440px, 42vw);
  padding: 15px 16px;
  border-left: 5px solid var(--forest);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
}

.hero-note strong {
  display: block;
  margin-bottom: 5px;
}

.hero-note span {
  color: var(--muted);
  line-height: 1.55;
}

.view-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  grid-column: span 6;
  min-height: 330px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}

.panel.wide { grid-column: 1 / -1; }
.panel.third { grid-column: span 4; }
.panel.tall { min-height: 520px; }

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

.panel h3 {
  margin: 0;
  font-size: 20px;
}

.panel-sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #0a4632;
  background: #dff7ec;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pill.warn { color: #6a3b05; background: #fff0c9; }
.pill.blue { color: #143b7d; background: #dfeafe; }
.pill.red { color: #7a1e18; background: #ffe2df; }
.pill.gray { color: #415149; background: #eef2ef; }

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

.kpi {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.kpi .label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.kpi .value {
  margin-top: 7px;
  font-size: 27px;
  font-weight: 950;
}

.kpi .hint {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.talk {
  display: grid;
  gap: 11px;
}

.talk-step {
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--forest);
  border-radius: var(--radius);
  background: #fbfdfb;
}

.talk-step strong {
  display: block;
  margin-bottom: 5px;
}

.talk-step span {
  color: var(--muted);
  line-height: 1.5;
}

.chart {
  width: 100%;
  min-height: 250px;
}

.axis text,
.chart-label {
  fill: #17211c;
  font-size: 12px;
  font-weight: 900;
  paint-order: stroke fill;
  stroke: rgba(255,255,255,.92);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 132px 1fr 112px;
  gap: 10px;
  align-items: center;
}

.bar-name {
  overflow: hidden;
  color: #2b3a33;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--forest), var(--mint));
  opacity: .72;
}

.bar-value {
  color: #26342e;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  line-height: 1.45;
}

.table th {
  color: var(--muted);
  font-size: 12px;
}

.table td.num,
.table th.num { text-align: right; }

.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover { background: #edf7f1; }

.profile-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-title h4 {
  margin: 0;
  font-size: 24px;
}

.meta-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.solution-box {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid #bfe9d3;
  border-radius: var(--radius);
  background: #effaf4;
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

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

.quadrant-card {
  min-height: 106px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.quadrant-card strong {
  display: block;
  margin-bottom: 7px;
}

.quadrant-card .count {
  font-size: 27px;
  font-weight: 950;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 35, 28, .68);
  z-index: 10;
}

.modal.hidden { display: none; }

.modal-card {
  position: relative;
  width: min(920px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: 26px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.26);
}

.icon-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #edf3ef;
  color: #18251f;
  font-size: 24px;
  cursor: pointer;
}

.empty {
  padding: 24px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfdfb;
}

@media (max-width: 1120px) {
  .rail {
    position: relative;
    width: auto;
    inset: auto;
  }

  .stage { margin-left: 0; }
  .hero { display: block; }
  .hero-note { width: auto; margin-top: 16px; }
  .panel, .panel.third { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .stage { padding: 18px; }
  .hero h2 { font-size: 30px; }
  .kpis { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 96px 1fr 88px; }
  .quadrant-grid { grid-template-columns: 1fr; }
}
