/* ecuGenie web pages — same look as the app (src/theme/colors.ts):
   deep indigo surfaces, electric cyan accents, metallic silver text,
   circuit-board artwork, rows with a cyan bar, uppercase section labels. */

:root {
  --bg: #0A111F;            /* palette.deepIndigo */
  --accent: #00FFFF;        /* palette.electricCyan */
  --accent-soft: #E0FFFF;   /* palette.paleCyan */
  --text: #A0A9B0;          /* palette.metallicSilver */
  --text-hi: #FFFFFF;       /* palette.brightWhite */
  --text-dim: #8A939D;      /* palette.secondaryGrey */
  --on-accent: #000000;
  --warning: #FF8C00;       /* colors.scanning (Banner) */
  --card: rgba(10, 17, 31, 0.85);       /* overlay.card */
  --row: rgba(28, 44, 66, 0.92);        /* ResultRow */
  --field: rgba(10, 17, 31, 0.94);      /* overlay.field */
  --accent-fill: rgba(0, 255, 255, 0.12);
  --accent-border: rgba(0, 255, 255, 0.35);
  --line: rgba(0, 255, 255, 0.18);
  --mono: ui-monospace, Menlo, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Circuit artwork behind the top of every page, fading into the indigo like the app's ScreenBackground. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1000px;
  background:
    linear-gradient(180deg, rgba(10, 17, 31, 0.30) 0%, rgba(10, 17, 31, 0.70) 50%, var(--bg) 100%),
    url("img/circuit.jpg") center top / cover no-repeat;
  z-index: -1;
  pointer-events: none;
}
body.legal::before { height: 520px; opacity: 0.75; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px 96px; }
.narrow { max-width: 760px; }

/* Header bar: icon tile + title + right action, with a cyan hairline below (app header). */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.topbar a.brand { display: flex; align-items: center; gap: 12px; border: 0; color: var(--text-hi); }
.topbar img.icon {
  width: 44px; height: 44px; border-radius: 11px;
  border: 1px solid var(--accent-border);
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.25);
}
.topbar .name { font-weight: 800; font-size: 20px; letter-spacing: 0.3px; line-height: 1.1; }
.topbar .by { color: var(--text-dim); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a {
  border: 1px solid transparent; border-radius: 999px;
  padding: 6px 13px; color: var(--text); font-size: 14px; font-weight: 700;
}
.topbar nav a:hover { color: var(--accent); border-color: var(--accent-border); }
.topbar nav a[aria-current="page"] { color: var(--on-accent); background: var(--accent); }

h1 {
  color: var(--text-hi);
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.08;
  margin: 0 0 14px;
  text-shadow: 0 0 24px rgba(0, 255, 255, 0.18);
}
h1 .glow { color: var(--accent); text-shadow: 0 0 22px rgba(0, 255, 255, 0.55); }

/* Section labels: small, uppercase, letter-spaced, like Section titles in the app. */
h2 {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 44px 0 14px;
}
h3 { color: var(--text-hi); font-size: 17px; font-weight: 700; margin: 26px 0 8px; }

p, li { color: var(--text); }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 7px; }
strong { color: var(--text-hi); }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(0, 255, 255, 0.35); }
a:hover { color: var(--accent-soft); border-bottom-color: var(--accent-soft); }

.lede { font-size: 18px; color: #C9D1D7; max-width: 60ch; }
.updated { color: var(--text-dim); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 30px; }

/* Card: translucent indigo with a cyan border (Section). */
.card {
  background: var(--card);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 22px 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card.tight { padding: 14px 18px; }
.card > :last-child { margin-bottom: 0; }

/* Row: lighter panel with the 4px cyan bar on the left (ResultRow). */
.row {
  position: relative;
  background: var(--row);
  border-radius: 12px;
  padding: 14px 18px 14px 22px;
  overflow: hidden;
}
.row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: rgba(0, 255, 255, 0.65); }

/* Pills / tags (accent fill chips). */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-fill);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Buttons: primary cyan with black text, secondary outlined (app Button). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font-weight: 700; font-size: 16px; border: 1px solid var(--accent);
}
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 26px rgba(0, 255, 255, 0.35); }
.btn.primary:hover { background: var(--accent-soft); color: var(--on-accent); border-color: var(--accent-soft); }
.btn.secondary { background: var(--field); color: var(--accent); }
.btn.secondary:hover { color: var(--accent-soft); border-color: var(--accent-soft); }

/* Amber notice (Banner). */
.banner {
  border: 1px solid var(--warning);
  background: rgba(255, 140, 0, 0.12);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 22px 0;
}
.banner .title { color: var(--warning); font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.banner p { margin: 0; font-size: 15px; }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-dim); font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
td { color: var(--text); }

code, .mono { font-family: var(--mono); color: var(--accent-soft); }

footer {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 14px;
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
  align-items: center;
}
footer .spacer { flex: 1; }
footer a { border: 0; color: var(--text); }
footer a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px 72px; }
  .topbar { flex-wrap: wrap; margin-bottom: 26px; }
  .topbar nav { margin-left: 0; width: 100%; justify-content: flex-start; }
  .topbar nav a { padding: 5px 11px; }
  table, thead, tbody, th, td, tr { display: block; }
  th { border: none; padding-bottom: 2px; }
  td { border-bottom: 1px solid var(--line); padding-top: 2px; }
}
