/* EdgeFit AI V2: Android-aligned dark system (tokens provisional —
   pending refinement against the physical screenshots, H10/WEB-V2-01).
   Deep navy surfaces, cyan action accents, violet used sparingly. */
:root {
  --bg: #070d1a;
  --bg-raise: #0b1426;
  --card: #101d33;
  --line: #24344d;
  --ink: #f2f6fb;
  --muted: #93a5bd;
  --accent: #35cfff;
  --accent-ink: #04121f;
  --violet: #7a6cff;
  --good: #4ade80;
  --warn: #fbbf24;
  --radius-card: 14px;
  --radius-btn: 10px;
  --width: 60rem;
  --width-prose: 44rem;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- header / nav ---- */
header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-raise);
  position: sticky;
  top: 0;
}
nav {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  flex-wrap: wrap;
}
nav a { text-decoration: none; }
nav a:not(.brand):hover { text-decoration: underline; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand b { color: var(--accent); font-weight: 800; }
main { max-width: var(--width); margin: 0 auto; padding: 1.5rem 1rem 3rem; }
main.prose { max-width: var(--width-prose); }
footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
footer p { max-width: var(--width); margin: 0 auto; padding: 1rem; }

/* ---- type ---- */
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.25rem; margin-top: 2.25rem; }
.standfirst { font-size: 1.05rem; color: var(--muted); }
.rule {
  height: 3px;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  margin: 1.5rem 0;
}

/* ---- hero (asymmetric: text + phone) ---- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1rem;
}
.hero .lede { color: var(--muted); }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.btn {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-btn);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { border-color: var(--accent); color: var(--accent); }
.btn-ghost:hover {
  text-decoration: none;
  background: rgba(53, 207, 255, 0.08);
}

/* ---- phone frame + screenshot placeholder ---- */
.phone {
  background: #04070f;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 0.7rem;
  max-width: 300px;
  margin: 0 auto;
}
.phone .screen {
  aspect-ratio: 9 / 19.5;
  max-height: 480px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem;
}
.phone img {
  width: 100%;
  aspect-ratio: 955 / 2048;
  max-height: 480px;
  object-fit: contain;
  background: #04070f;
  border-radius: 18px;
}
.caption { color: var(--muted); font-size: 0.85rem; text-align: center; }

/* ---- cards, grids, panels ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.25rem;
  margin: 1rem 0;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 0.75rem 0 0;
}
.metric {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}
.metric .k { color: var(--muted); font-size: 0.78rem; }
.metric .v { font-weight: 700; }
.demo-tag, .status-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
  color: var(--muted);
  vertical-align: middle;
}
.status-tag.ok { color: var(--good); border-color: var(--good); }
.status-tag.pending { color: var(--warn); border-color: var(--warn); }
.dot {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  margin-right: 0.4em;
  vertical-align: baseline;
}
.dot.good { background: var(--good); }
.dot.warn { background: var(--warn); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #04121f;
  font-weight: 800;
  margin-right: 0.5em;
}
ul.tight li, ol.tight li { margin-bottom: 0.35rem; }

/* ---- demo widget ---- */
.demo label { display: block; margin: 0.8rem 0 0.3rem; font-weight: 600; }
.demo select {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
  color: var(--ink);
  font-size: 1rem;
}
.demo output { display: block; margin-top: 1rem; }
.demo .verdict {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0.8rem;
  background: var(--bg-raise);
  border-radius: 0 8px 8px 0;
  margin-top: 0.6rem;
}

/* ---- dashboard ---- */
.kpi .k { color: var(--muted); font-size: 0.85rem; }
.kpi .v {
  font-size: 1.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin: 0.15rem 0;
}
.kpi .note { color: var(--muted); font-size: 0.82rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); }
.chart .bar.thin { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.chart .whisker { stroke: var(--ink); stroke-width: 2; }
.chart .quorum { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart text { fill: var(--ink); font-size: 13px; }
.chart .chart-label { fill: var(--muted); font-size: 12px; }
.chart-data { margin-top: 0.75rem; }
.chart-data summary { cursor: pointer; color: var(--accent); }
.chart-data table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.chart-data th, .chart-data td {
  text-align: left;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.chart-data th { color: var(--muted); font-weight: 600; }
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}
.filters label { display: block; font-weight: 600; font-size: 0.9rem; }
.filters select {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
  color: var(--ink);
  font-size: 1rem;
}
.filters .caption { grid-column: 1 / -1; text-align: left; }
.dash-state h3 { margin-top: 0; }
button.btn { font: inherit; cursor: pointer; }

/* ---- responsive ---- */
@media (max-width: 48rem) {
  .hero { grid-template-columns: 1fr; }
  .phone { max-width: 260px; }
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 1.5rem; }
  nav { gap: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
