:root {
  --bg: #07100f;
  --panel: #101a18;
  --panel-raised: #15231f;
  --line: #28443c;
  --line-strong: #5c7662;
  --muted: #a6b5a9;
  --text: #f0eadc;
  --ink: #08100e;
  --green: #36d59a;
  --amber: #e0a847;
  --red: #d86675;
  --blue: #82c8ce;
  --cream: #f4e9d4;
  --copper: #c9784a;
  --shadow: rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

:focus-visible {
  outline: 3px solid rgba(224, 168, 71, 0.92);
  outline-offset: 3px;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    linear-gradient(90deg, rgba(244, 233, 212, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(244, 233, 212, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, #0b1512 0%, #07100f 44%, #050907 100%);
  background-size: 42px 42px, 42px 42px, auto;
  color: var(--text);
  font-family: "Aptos", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.shell {
  width: min(1450px, 94vw);
  margin: 18px auto 22px;
  display: grid;
  gap: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 4px;
}

.brand-mark,
.nav-links,
.hero-actions,
.card-actions {
  display: flex;
  align-items: center;
}

.brand-mark {
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
}

.brand-symbol {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(244, 233, 212, 0.22);
  border-radius: 8px;
  background: #12201c;
  color: var(--amber);
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.brand-mark strong,
.brand-mark small {
  display: block;
}

.brand-mark strong {
  font-size: 14px;
}

.brand-mark small {
  color: var(--muted);
  font-size: 11px;
}

.nav-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a,
.text-link {
  color: #d6dfd2;
  text-decoration: none;
}

.nav-links a {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  transition: background 0.16s, color 0.16s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(244, 233, 212, 0.08);
  color: var(--cream);
}

.nav-links .nav-cta {
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
}

.brand-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  gap: 24px;
  align-items: center;
  min-height: clamp(380px, 50vh, 540px);
  padding: clamp(24px, 3.6vw, 42px) 0 clamp(22px, 3vw, 34px);
  border-bottom: 1px solid rgba(244, 233, 212, 0.12);
}

.hero-copy {
  display: grid;
  gap: 14px;
  max-width: 860px;
}

.hero-eyebrow,
.product-kicker,
.proof-label,
.section-heading span {
  color: var(--amber);
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  max-width: 860px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.6vw, 58px);
  font-weight: 600;
  line-height: 1;
}

.hero-summary {
  margin: 0;
  max-width: 700px;
  color: #cbd8ca;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.55;
}

.hero-actions,
.card-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}

.primary-action {
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.secondary-action {
  border: 1px solid rgba(244, 233, 212, 0.28);
  color: var(--cream);
}

.primary-action:hover,
.secondary-action:hover,
.tool-btn:hover {
  transform: translateY(-1px);
}

.hero-visual {
  display: grid;
  justify-items: stretch;
}

.signal-console {
  border: 1px solid rgba(244, 233, 212, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(224, 168, 71, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(21, 35, 31, 0.98), rgba(8, 16, 14, 0.98));
  box-shadow: 0 26px 90px var(--shadow);
  padding: 14px;
}

.console-topline,
.console-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.console-topline {
  color: var(--muted);
  margin-bottom: 12px;
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.console-topline strong {
  color: var(--green);
}

.console-step {
  justify-content: flex-start;
  padding: 10px 0;
  border-top: 1px solid rgba(244, 233, 212, 0.11);
}

.console-step > span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(244, 233, 212, 0.16);
  color: var(--amber);
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

.console-step strong,
.console-step small {
  display: block;
}

.console-step strong {
  font-size: 15px;
}

.console-step small {
  color: var(--muted);
  margin-top: 2px;
}

.console-step.active > span {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}

.console-meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.console-meter span {
  height: 7px;
  border-radius: 99px;
  background: rgba(244, 233, 212, 0.13);
}

.console-meter span:nth-child(-n + 3) {
  background: var(--green);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(21, 35, 31, 0.97), rgba(10, 17, 15, 0.96)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(244, 233, 212, 0.05), 0 20px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(224, 168, 71, 0.05), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.panel-title {
  color: var(--muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 11px;
  margin-bottom: 8px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid rgba(244, 233, 212, 0.16);
  background: rgba(10, 17, 15, 0.72);
  color: #dbe6d8;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.91fr 0.91fr;
  gap: 14px;
}

.product-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 244px;
}

.product-card-primary {
  border-color: rgba(224, 168, 71, 0.48);
}

.product-card h2,
.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.05;
}

.product-card p,
.proof-band p {
  margin: 0;
  color: #c4d2c3;
  font-size: 14px;
  line-height: 1.55;
}

.text-link {
  color: var(--blue);
  font-size: 12px;
}

.text-link:hover,
.footer-link:hover {
  color: var(--cream);
}

.proof-band {
  display: grid;
  grid-template-columns: 0.86fr 1fr;
  gap: 18px;
  align-items: center;
  border-top: 1px solid rgba(244, 233, 212, 0.12);
  border-bottom: 1px solid rgba(244, 233, 212, 0.12);
  padding: 20px 0;
}

.proof-band strong {
  display: block;
  margin-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.08;
}

.ticker {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(7, minmax(0, auto));
  align-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 36, 32, 0.95), rgba(10, 17, 15, 0.97));
  padding: 8px 10px;
  gap: 8px;
}

.ticker-item {
  padding: 2px 10px;
  border-left: 1px solid rgba(244, 233, 212, 0.16);
  min-width: 132px;
}

.ticker-item:first-child {
  border-left: 0;
}

.ticker-item span {
  display: inline-block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.09em;
  margin-right: 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker-item strong {
  font-weight: 600;
  font-size: 13px;
  display: inline-block;
}

.grow {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.freshness {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-style: normal;
}

.freshness.fresh {
  color: #6ed6a9;
  border-color: rgba(110, 214, 169, 0.32);
}

.freshness.stale {
  color: #d7b95a;
  border-color: rgba(215, 185, 90, 0.34);
}

.freshness.old,
.freshness.unknown {
  color: #df8291;
  border-color: rgba(222, 130, 145, 0.34);
}

.layout {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 12px;
}

.global-panel {
  display: grid;
  grid-template-columns: 290px 1fr;
  align-items: center;
  gap: 8px 18px;
  min-height: 340px;
}

.global-panel > .panel-title {
  grid-column: 1 / -1;
}

.dial-wrap {
  display: grid;
  place-items: center;
}

.dial {
  width: 270px;
  height: 270px;
}

.dial-track,
.confidence-track {
  fill: none;
}

.dial-track {
  stroke: #24423b;
  stroke-width: 12;
}

.dial-tick {
  stroke: #6d806e;
  stroke-linecap: round;
}

.dial-arc {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}

.confidence-track {
  stroke: #203a34;
  stroke-width: 6;
}

.confidence-ring {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.dial-score {
  font-size: 58px;
  font-weight: 700;
}

.global-metrics {
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.global-metrics strong {
  margin-left: 8px;
  font-weight: 600;
}

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

.region-panel {
  min-height: 158px;
}

.region-stats {
  display: grid;
  gap: 5px;
  margin-bottom: 4px;
  font-size: 12px;
}

.region-stats div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(244, 233, 212, 0.1);
  padding-bottom: 4px;
}

.region-stats strong {
  font-weight: 600;
}

.sparkline,
.line-chart {
  width: 100%;
  display: block;
}

.sparkline {
  height: 92px;
  margin-top: 6px;
}

.line-chart {
  height: 240px;
}

.line-wrap {
  position: relative;
}

.history-line,
.history-conf-line {
  fill: none;
  stroke-linecap: round;
}

.history-line {
  stroke: var(--blue);
  stroke-width: 2;
}

.history-conf-line {
  stroke: #9db4a3;
  stroke-width: 1.2;
  opacity: 0.5;
}

.history-grid {
  stroke: #223c35;
  stroke-width: 1;
}

.history-grid.thick {
  stroke: #38564e;
  opacity: 0.85;
}

.history-grid.dashed {
  stroke-dasharray: 3 5;
  opacity: 0.35;
}

.chart-panel .panel-title {
  margin-bottom: 4px;
}

.tooltip {
  position: absolute;
  pointer-events: none;
  background: #0c1512;
  color: var(--cream);
  border: 1px solid var(--line);
  font-size: 11px;
  padding: 4px 7px;
  display: none;
  z-index: 5;
  border-radius: 3px;
}

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

.observatory-panel {
  min-height: 196px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.observatory-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.observatory-name {
  font-size: 19px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.observatory-copy,
.observatory-meta {
  margin: 0;
}

.observatory-copy {
  color: #e5ebdf;
}

.observatory-meta {
  color: var(--muted);
  font-size: 11px;
}

.module-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(244, 233, 212, 0.18);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.module-state.live,
.module-state.ok {
  color: #7edeb1;
  border-color: rgba(110, 214, 169, 0.32);
}

.module-state.pending,
.module-state.insufficient {
  color: #e0c36b;
  border-color: rgba(224, 195, 107, 0.3);
}

.module-state.guarded,
.module-state.muted {
  color: #b8c7b8;
  border-color: rgba(184, 199, 184, 0.24);
}

.module-state.alert {
  color: #f19ca9;
  border-color: rgba(222, 100, 115, 0.32);
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.event-item {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(244, 233, 212, 0.12);
  background: rgba(8, 16, 14, 0.72);
}

.event-item strong {
  font-size: 12px;
}

.event-item span {
  color: var(--muted);
  font-size: 11px;
}

.event-item.ok strong {
  color: var(--green);
}

.event-item.warn strong {
  color: var(--amber);
}

.event-item.alert strong {
  color: var(--red);
}

.event-item.muted strong {
  color: #dce6d8;
}

.window-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.info-trigger {
  display: inline-flex;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(157, 176, 196, 0.4);
  color: var(--muted);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  line-height: 1;
  font-size: 10px;
  margin-left: 3px;
  vertical-align: 0;
}

.score-high { color: var(--green); }
.score-mid { color: var(--amber); }
.score-low { color: var(--red); }

.unavailable {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 9, 7, 0.86);
  color: #aebcac;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  z-index: 4;
}

.show-unavailable {
  display: flex;
}

.status {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.status.ok { color: #43d89a; }
.status.warn { color: #d7b447; }
.status.err { color: #e87b87; }

.status-error {
  color: #f0b3bd;
  font-size: 11px;
  max-width: 75%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tools-section {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.section-heading {
  display: grid;
  gap: 6px;
  max-width: 720px;
}

.section-heading h2 {
  font-size: 32px;
}

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

.tool-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.tool-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(19, 33, 29, 0.9);
  color: var(--cream);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s, background 0.15s, border-color 0.15s;
}

.tool-btn:hover {
  background: rgba(31, 51, 44, 0.96);
  border-color: var(--cream);
}

.tool-btn.strong {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
  font-weight: 800;
}

.tool-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.diag-result {
  display: grid;
  gap: 6px;
}

.diag-classification {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.diag-classification.local { color: var(--green); }
.diag-classification.regional { color: var(--amber); }
.diag-classification.global-issue { color: var(--red); }

.diag-confidence {
  font-size: 12px;
  color: var(--muted);
}

.diag-confidence strong {
  color: var(--text);
}

.diag-explanation {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.incident-list {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.incident-empty {
  color: var(--muted);
  font-size: 11px;
  padding: 12px 0;
  text-align: center;
}

.incident-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(244, 233, 212, 0.12);
  background: rgba(8, 16, 14, 0.6);
}

.incident-region {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.incident-drop {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  text-align: right;
}

.incident-time {
  font-size: 10px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.asn-table-wrap {
  max-height: 300px;
  overflow-y: auto;
}

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

.asn-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 6px 6px;
  border-bottom: 1px solid var(--line);
}

.asn-table td {
  padding: 6px;
  border-bottom: 1px solid rgba(244, 233, 212, 0.08);
}

.asn-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.asn-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 0 4px;
}

.footer-link {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 233, 212, 0.18);
  padding-bottom: 1px;
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--blue);
}

@media (max-width: 1220px) {
  .brand-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    max-width: 680px;
  }

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

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

@media (max-width: 1100px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .proof-band {
    grid-template-columns: 1fr;
  }

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

  .global-panel {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .global-metrics {
    width: 100%;
    margin-top: 4px;
  }

  .panel-stack {
    grid-template-columns: 1fr;
  }
  .ticker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grow {
    justify-self: stretch;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(96vw, 560px);
    margin-top: 12px;
  }

  .brand-mark {
    align-items: flex-start;
  }

  .hero-title {
    font-size: 34px;
  }

  .brand-hero {
    padding-top: 18px;
    gap: 18px;
    min-height: auto;
  }

  .hero-actions,
  .card-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

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

  .nav-links .nav-cta {
    grid-column: 1 / -1;
  }

  .nav-links a,
  .primary-action,
  .secondary-action,
  .tool-btn,
  .text-link {
    width: 100%;
  }

  .text-link {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
  }

  .signal-console {
    padding: 14px;
  }

  .hero-visual {
    display: none;
  }

  .console-step:not(.active),
  .console-meter {
    display: none;
  }

  .console-topline {
    margin-bottom: 8px;
  }

  .console-step {
    align-items: flex-start;
    padding: 8px 0 0;
  }

  .product-card,
  .tool-panel {
    min-height: auto;
  }

  .panel-stack {
    grid-template-columns: 1fr;
  }

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

  .ticker-item {
    min-width: 0;
    border-left: 0;
    border-top: 1px solid rgba(244, 233, 212, 0.16);
    padding: 8px 0;
  }

  .ticker-item:nth-child(-n + 2) {
    border-top: 0;
  }

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

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

  .line-chart {
    height: 220px;
  }
}

@media (max-width: 460px) {
  .hero-title {
    font-size: 36px;
  }

  .product-card h2,
  .section-heading h2 {
    font-size: 26px;
  }

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

  .ticker-item:nth-child(-n + 2) {
    border-top: 1px solid rgba(244, 233, 212, 0.16);
  }

  .ticker-item:first-child {
    border-top: 0;
  }

  .global-panel {
    padding: 12px;
  }

  .dial {
    width: 238px;
    height: 238px;
  }
}
