/* demo10 · data dashboard
 * Information-dense. Widgets, metrics, charts. Mint-green for positive,
 * amber for caveat, monospace for numbers.
 */

:root {
  --bg: #0e131a;
  --bg-2: #161d28;
  --fg: #e6ebf2;
  --muted: #8a96a8;
  --line: rgba(255,255,255,0.07);
  --ok: #10b981;
  --warn: #f59e0b;
  --accent: #3b82f6;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", "Menlo", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.topbar .brand {
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.16em;
}
.topbar .env {
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.topbar .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
  margin-left: auto;
  box-shadow: 0 0 0 0 currentColor;
  animation: ping 2s infinite;
}
.topbar .dot.ok { background: var(--ok); }
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  100% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
}
.topbar .status { color: var(--ok); font-weight: 600; letter-spacing: 0.08em; }
.topbar .meta { color: var(--muted); }

main { max-width: 1320px; margin: 0 auto; padding: 24px; }

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  padding: 24px 0;
  align-items: center;
}
.hero h1 {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.hero p { color: var(--muted); font-size: 16px; max-width: 560px; margin-bottom: 24px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.btn.primary {
  background: var(--ok);
  color: #07120e;
  font-weight: 600;
}
.btn.primary:hover { background: #34d399; transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
.btn.ghost:hover { border-color: var(--ok); color: var(--ok); }

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.stat .label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.stat .value { display: block; font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--fg); }
.stat .value small { font-size: 14px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.stat .trend { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; font-family: var(--mono); }
.stat .trend.ok { color: var(--ok); }

/* grid of widgets */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.widget {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.widget h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  font-weight: 600;
}

.ascii {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  white-space: pre;
  overflow-x: auto;
  color: var(--muted);
}

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
table td:last-child { text-align: right; }
table tr:last-child td { border-bottom: 0; }
table .num { font-family: var(--mono); color: var(--fg); }
table .meta { color: var(--muted); font-size: 12px; }

.tariff td:first-child { color: var(--fg); font-weight: 500; }
.tariff td:nth-child(2) { color: var(--ok); font-weight: 600; text-align: right; }
.tariff td:nth-child(3) { text-align: right; }
.footnote { font-size: 11px; color: var(--muted); margin-top: 10px; }

.threat td:last-child { font-family: var(--mono); font-size: 11px; font-weight: 600; }
.threat .ok   { color: var(--ok); }
.threat .warn { color: var(--warn); }

.checks { list-style: none; }
.checks li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.checks li:last-child { border-bottom: 0; }
.bullet {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.bullet.ok   { background: var(--ok); }
.bullet.warn { background: var(--warn); }

/* chart */
.chart {
  width: 100%;
  height: 200px;
  display: block;
}
.chart .grid-lines line {
  stroke: var(--line);
  stroke-dasharray: 2 4;
}
.chart-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

/* download */
.dl thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.dl tbody td {
  padding: 10px 8px 10px 0;
}
.dl td:nth-child(4) a { color: var(--accent); font-family: var(--mono); font-size: 12px; }

/* footer */
footer {
  max-width: 1320px;
  margin: 24px auto 32px;
  padding: 16px 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  border-top: 1px solid var(--line);
}

::selection { background: var(--ok); color: var(--bg); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .col-2, .col-3 { grid-column: span 1; }
}
