:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-soft: #0e1a2d;
  --panel: rgba(12, 26, 46, 0.88);
  --panel-strong: rgba(18, 38, 68, 0.95);
  --line: rgba(145, 196, 255, 0.14);
  --text: #ecf4ff;
  --muted: #96aac8;
  --accent: #5ec8ff;
  --accent-strong: #35a0ff;
  --good: #3ad17f;
  --warn: #ffc252;
  --bad: #ff6b6b;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(46, 133, 255, 0.34), transparent 32%),
    radial-gradient(circle at top right, rgba(43, 198, 255, 0.22), transparent 28%),
    linear-gradient(180deg, #0a1630 0%, #08111f 48%, #060d18 100%);
}

.page-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 4px 24px;
}

.governance-strip {
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
  padding: 0;
  border: 1px solid rgba(255, 211, 75, 0.2);
  border-radius: 16px;
  background: #164f79;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.governance-strip img {
  display: block;
  width: min(100%, 421px);
  height: auto;
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar h1,
.project-copy h2,
.band-head h3,
.hero-copy h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(30px, 4vw, 42px);
}

.topbar-status {
  display: grid;
  gap: 10px;
  min-width: min(420px, 42vw);
}

.status-pill {
  min-width: 190px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 25, 45, 0.76);
  color: var(--muted);
  text-align: center;
}

.system-status-pill {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 25, 45, 0.86);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.system-status-good {
  border-color: rgba(58, 209, 127, 0.42);
  box-shadow: inset 0 0 0 1px rgba(58, 209, 127, 0.12);
}

.system-status-warn {
  border-color: rgba(255, 194, 82, 0.46);
  box-shadow: inset 0 0 0 1px rgba(255, 194, 82, 0.12);
}

.system-status-bad {
  border-color: rgba(255, 107, 107, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.12);
}

.system-status-neutral {
  color: var(--muted);
}

.project-intro {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(94, 200, 255, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(45, 149, 255, 0.17), rgba(9, 24, 43, 0.82)),
    var(--panel);
  box-shadow: var(--shadow);
}

.project-brand {
  width: 132px;
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid rgba(145, 196, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
}

.project-brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-copy {
  min-width: 0;
}

.project-copy h2 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.project-copy p:not(.section-label) {
  max-width: 880px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.project-copy .project-executor {
  color: #d9ecff;
  font-weight: 700;
}

.project-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.project-proof-grid div {
  min-height: 98px;
  padding: 12px;
  border: 1px solid rgba(145, 196, 255, 0.16);
  border-radius: 12px;
  background: rgba(5, 18, 34, 0.42);
}

.project-proof-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-proof-grid strong {
  display: block;
  color: #eef7ff;
  font-size: 14px;
  line-height: 1.35;
}

.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.project-badges span {
  padding: 8px 11px;
  border: 1px solid rgba(94, 200, 255, 0.2);
  border-radius: 999px;
  background: rgba(6, 18, 32, 0.45);
  color: #cfe9ff;
  font-size: 13px;
  font-weight: 700;
}

.dashboard {
  display: grid;
  gap: 18px;
}

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

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

.recommendations-head h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

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

.recommendation-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(14, 29, 51, 0.82);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.recommendation-item-good {
  border-color: rgba(58, 209, 127, 0.34);
}

.recommendation-item-warn {
  border-color: rgba(255, 194, 82, 0.38);
}

.recommendation-item-bad {
  border-color: rgba(255, 107, 107, 0.42);
}

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

.attention-card {
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(14, 29, 51, 0.82);
}

.attention-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
}

.attention-card .value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}

.attention-card .note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.attention-card-warn {
  border-color: rgba(255, 194, 82, 0.38);
}

.attention-card-bad {
  border-color: rgba(255, 107, 107, 0.44);
}

.hero,
.plan-roadmap,
.band {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.plan-roadmap {
  margin: 0 0 18px;
  padding: 20px;
  border-radius: 18px;
}

.band-head > p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.roadmap-grid article {
  position: relative;
  min-height: 170px;
  padding: 15px;
  border: 1px solid rgba(145, 196, 255, 0.14);
  border-radius: 14px;
  background: rgba(7, 20, 36, 0.5);
}

.roadmap-grid .roadmap-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border: 1px solid rgba(94, 200, 255, 0.24);
  border-radius: 10px;
  color: var(--accent);
  font-weight: 800;
}

.roadmap-status {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.roadmap-done {
  border-color: rgba(58, 209, 127, 0.28);
}

.roadmap-done .roadmap-status {
  background: rgba(58, 209, 127, 0.14);
  color: var(--good);
}

.roadmap-active {
  border-color: rgba(94, 200, 255, 0.28);
}

.roadmap-active .roadmap-status {
  background: rgba(94, 200, 255, 0.14);
  color: var(--accent);
}

.roadmap-grid h4 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0;
}

.roadmap-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  border-radius: 18px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  padding: 14px 16px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(72, 164, 255, 0.16), rgba(11, 24, 42, 0.08)),
    rgba(9, 24, 43, 0.55);
}

.hero-copy h2 {
  font-size: clamp(64px, 11vw, 136px);
  line-height: 0.96;
}

.hero-subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0 0;
  font-size: 19px;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

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

.metric-panel-wide {
  grid-column: 1 / -1;
}

.metric-panel,
.chart-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
}

.metric-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 148px;
  padding: 18px;
}

.metric-title,
.metric-note,
.chart-head span {
  color: var(--muted);
}

.metric-title {
  margin: 0 0 10px;
  font-size: 14px;
}

.metric-value {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
}

.metric-value.metric-text {
  font-size: clamp(28px, 4vw, 40px);
}

.metric-unit,
.metric-note {
  margin: 8px 0 0;
  font-size: 14px;
}

.band {
  border-radius: 18px;
  padding: 22px;
}

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

.band-status {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

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

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

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

.band-head-compact {
  margin-bottom: 14px;
}

.summary-strip {
  margin-bottom: 14px;
}

.metric-strip-feed {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.small-metric {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(14, 29, 51, 0.82);
}

.metric-strip-4 .small-metric {
  min-height: 120px;
}

.small-metric-good {
  border-color: rgba(58, 209, 127, 0.36);
  box-shadow: inset 0 0 0 1px rgba(58, 209, 127, 0.12);
}

.small-metric-warn {
  border-color: rgba(255, 194, 82, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 194, 82, 0.1);
}

.small-metric-bad {
  border-color: rgba(255, 107, 107, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.1);
}

.small-metric-neutral {
  border-color: var(--line);
}

.small-metric h4,
.chart-head h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.small-metric .value {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
}

.small-metric .value-device {
  font-size: 24px;
  line-height: 1.2;
}

.small-metric .unit {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.small-metric .note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.water-level-strip .water-level-main {
  grid-column: span 2;
}

.water-level-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.water-level-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.water-level-unit {
  font-size: 20px;
  color: var(--muted);
}

.water-level-state {
  max-width: 160px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.water-level-bar {
  height: 12px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.water-level-fill {
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--accent);
  transition: width 240ms ease;
}

.water-level-fill-good {
  background: linear-gradient(90deg, rgba(58, 209, 127, 0.72), var(--good));
}

.water-level-fill-warn {
  background: linear-gradient(90deg, rgba(255, 194, 82, 0.72), var(--warn));
}

.water-level-fill-bad {
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.72), var(--bad));
}

.water-level-fill-neutral {
  background: linear-gradient(90deg, rgba(94, 200, 255, 0.6), var(--accent));
}

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

.feed-chart-grid {
  margin-top: 14px;
}

.chart-panel {
  padding: 16px;
}

.chart-panel.wide {
  grid-column: 1 / -1;
}

.feed-chart-grid .chart-panel {
  overflow-x: auto;
}

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

.chart-note-inline {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  min-height: 220px;
  display: flex;
  align-items: center;
}

.chart {
  width: 100%;
  height: 220px;
  display: block;
}

.chart-grid .wide .chart {
  height: 240px;
}

.feed-chart-grid .wide .chart {
  min-width: 780px;
}

.empty-state {
  fill: none;
}

.chart-label {
  fill: var(--muted);
  font-size: 12px;
}

.chart-value-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.chart-date-label {
  font-size: 10px;
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  opacity: 0.16;
}

.chart-gridline {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.value-good {
  color: var(--good);
}

.value-warn {
  color: var(--warn);
}

.value-bad {
  color: var(--bad);
}

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

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

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

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

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

  .water-level-strip .water-level-main {
    grid-column: 1 / -1;
  }

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

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

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 1240px);
    padding-top: 18px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-status {
    width: 100%;
    min-width: 0;
  }

  .project-intro {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .project-brand {
    width: min(180px, 52vw);
  }

  .status-pill {
    width: 100%;
  }

  .hero,
  .band {
    padding: 16px;
    border-radius: 16px;
  }

  .topbar h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  .project-copy h2 {
    font-size: 30px;
    line-height: 1.12;
  }

  .project-copy p:not(.section-label) {
    font-size: 15px;
  }

  .project-proof-grid div {
    min-height: 0;
  }

  .roadmap-grid article {
    min-height: 0;
  }

  .hero-grid,
  .metric-strip,
  .chart-grid,
  .attention-grid,
  .project-proof-grid,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip-4,
  .metric-strip-3,
  .metric-strip-feed {
    grid-template-columns: 1fr;
  }

  .water-level-row {
    flex-direction: column;
  }

  .water-level-state {
    max-width: none;
  }

  .recommendations-head {
    display: block;
  }

  .hero-copy {
    min-height: 220px;
  }

  .chart {
    height: 210px;
  }

  .chart-grid .wide .chart {
    height: 260px;
  }
}
