:root {
  --ink: #18201c;
  --muted: #68736d;
  --paper: #f7f4ec;
  --paper-strong: #fffdf7;
  --line: rgba(24, 32, 28, 0.14);
  --green: #00a86b;
  --red: #e3372f;
  --blue: #006dff;
  --amber: #d88a1f;
  --magenta: #f2a1bc;
  --violet: #a78bfa;
  --teal: #00b8a9;
  --shadow: 0 24px 70px rgba(44, 53, 47, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", sans-serif;
  background:
    linear-gradient(135deg, rgba(15, 143, 109, 0.13), transparent 34%),
    linear-gradient(225deg, rgba(216, 138, 31, 0.14), transparent 38%),
    repeating-linear-gradient(90deg, rgba(24, 32, 28, 0.035) 0 1px, transparent 1px 42px),
    var(--paper);
  min-height: 100vh;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.dashboard {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.86);
  box-shadow: var(--shadow);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 14px;
}

.legend-note {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.chart-note {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.data-view {
  display: grid;
  grid-template-columns: minmax(78px, auto) 1fr;
  gap: 14px;
  align-items: stretch;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.74);
}

.data-view-year {
  display: grid;
  place-items: center;
  min-height: 74px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper-strong);
  font-size: 1.45rem;
  font-weight: 900;
}

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

.data-view-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.data-chip {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--chip-color);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.78);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.data-chip:hover {
  background: rgba(255, 253, 247, 0.96);
}

.data-chip.is-hidden {
  opacity: 0.35;
  border-left-color: var(--muted);
}

.data-chip span,
.data-chip strong {
  display: block;
}

.data-chip span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}

.data-chip strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.2;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 6px 0 14px;
  border-radius: 50%;
}

.dot.actual {
  background: var(--green);
}

.dot.forecast {
  background: var(--amber);
}

.dot.enrollment {
  background: var(--magenta);
}

.chart-wrap {
  position: relative;
  height: min(58vh, 560px);
  min-height: 390px;
}

.sources {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.sources h2 {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
}

.source-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.source-list div {
  display: grid;
  grid-template-columns: minmax(160px, 0.24fr) 1fr;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(24, 32, 28, 0.1);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.58);
}

.source-list dt {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.source-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.scenario-panel {
  margin-bottom: 14px;
}

.scenario-panel-header {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

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

.trend-control {
  flex: 1 1 132px;
  min-width: 120px;
}

.trend-control label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}

.trend-control strong {
  color: var(--scenario-color);
}

.scenario-btn.is-off .trend-control strong {
  color: var(--muted);
}

.trend-control input {
  width: 100%;
  height: 18px;
  accent-color: var(--scenario-color);
  cursor: pointer;
}

.scenario-btn.is-off .trend-control input {
  accent-color: var(--muted);
  cursor: not-allowed;
}

.scenario-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  border: 1.5px solid var(--scenario-color);
  border-top-width: 4px;
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.88);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.scenario-btn:hover:not(.is-off) {
  background: var(--paper-strong);
}

.scenario-btn.is-off {
  opacity: 0.38;
  border-color: var(--line);
  border-top-color: var(--muted);
}

.scenario-tag {
  font-size: 1.3rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--scenario-color);
}

.scenario-btn.is-off .scenario-tag {
  color: var(--muted);
}

.scenario-title {
  margin-top: 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.3;
}

.scenario-formula {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.3;
}

.scenario-footer {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-top: 6px;
}

.scenario-kpi {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1rem;
  font-weight: 900;
  color: var(--scenario-color);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.scenario-btn.is-off .scenario-kpi {
  color: var(--muted);
}



@media (max-width: 820px) {
  .shell {
    width: min(100% - 22px, 1180px);
    padding-top: 24px;
  }

  .chart-header {
    display: block;
  }

  .legend-note {
    margin-top: 10px;
    white-space: normal;
  }

  .dashboard {
    padding: 16px;
  }

  .data-view,
  .data-view-grid {
    grid-template-columns: 1fr;
  }

  .source-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .chart-wrap {
    height: 470px;
    min-height: 470px;
  }
}
