/*!
 * ElecGen - styles
 * Copyright (c) 2026 Fresh Twig (Brett G. Mowat). All rights reserved.
 * https://elecgen.braaiville.com  -  info@braaiville.com
 * Not to be copied, re-hosted, rebranded or sold without written permission.
 */
/* The palette is BraaiVille's, deliberately. Someone arriving here from the
   game should recognise it as the same hand without being told. */

:root {
  --bg:       #0a0f1e;
  --panel:    #0f1929;
  --panel2:   #162236;
  --border:   #1e3a5f;
  --text:     #e6eefb;
  --dim:      #9ab0cc;
  --dimmer:   #7d93b0;
  --primary:  #e94560;
  --gold:     #f5a623;
  --eg-accent:#8d6e63;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.eg-wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px 70px; }

/* ── Masthead ─────────────────────────────────────────────────────────── */
header.eg-head {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #101a2e, var(--bg));
  padding: 26px 18px 22px;
  margin-bottom: 26px;
}
.eg-head-inner { max-width: 1040px; margin: 0 auto; }
.eg-brand {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 25px; font-weight: 700; color: #fff; margin-bottom: 6px;
}
.eg-brand .eg-spark { color: var(--gold); }
.eg-brand a { color: var(--primary); text-decoration: none; font-size: 13px; font-weight: 600; }
.eg-brand a:hover { text-decoration: underline; }
.eg-strap { color: var(--dim); font-size: 14.5px; max-width: 70ch; }

/* ── Controls ─────────────────────────────────────────────────────────── */
.eg-controls {
  display: flex; gap: 16px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px; margin-bottom: 10px;
}
.eg-control { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.eg-control-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--dim); font-weight: 700;
}
.eg-select {
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 12px; font-size: 15px; font-family: inherit;
  cursor: pointer; width: 100%;
}
.eg-select:hover  { border-color: #2b456d; }
.eg-select:focus  { outline: 2px solid var(--gold); outline-offset: 1px; }

.eg-level-hint {
  color: var(--dimmer); font-size: 12.5px; margin: 0 2px 22px;
  font-style: italic;
}

/* ── Headline card ────────────────────────────────────────────────────── */
.eg-card {
  background: var(--panel); border: 1px solid var(--border);
  border-left: 4px solid var(--eg-accent);
  border-radius: 10px; padding: 22px 24px; margin-bottom: 18px;
}
.eg-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.eg-card-icon { font-size: 40px; line-height: 1; }
.eg-card h2   { font-size: 26px; color: #fff; line-height: 1.2; }
.eg-tagline   { color: var(--eg-accent); font-size: 13.5px; font-weight: 600; }
.eg-story     { font-size: 15.5px; color: var(--text); max-width: 72ch; }

.eg-facts { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.eg-fact {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 13px;
}
.eg-fact-label {
  color: var(--dim); text-transform: uppercase; letter-spacing: .07em;
  font-size: 10.5px; font-weight: 700; min-width: 130px; padding-top: 2px;
}
.eg-fact-value { color: var(--text); flex: 1 1 320px; }

/* ── The six questions ────────────────────────────────────────────────── */
.eg-grid {
  display: grid; gap: 14px; margin-bottom: 34px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.eg-cell {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px;
}
.eg-cell-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.eg-cell-icon { font-size: 18px; }
.eg-cell h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--gold); font-weight: 700;
}
.eg-cell p { font-size: 14px; color: var(--text); }

/* ── Comparison table ─────────────────────────────────────────────────── */
.eg-compare-title { font-size: 19px; color: #fff; margin-bottom: 4px; }
.eg-basis { color: var(--dimmer); font-size: 12.5px; margin-bottom: 14px; max-width: 72ch; }

/* Wide content scrolls inside its own box; the page never scrolls sideways. */
.eg-table-wrap {
  overflow-x: auto; border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel);
}
.eg-compare table { border-collapse: collapse; width: 100%; min-width: 620px; }
.eg-compare th, .eg-compare td {
  padding: 11px 14px; text-align: left; font-size: 13.5px;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.eg-compare thead th {
  color: var(--dim); font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; background: var(--panel2); white-space: nowrap;
}
.eg-compare tbody tr:last-child th,
.eg-compare tbody tr:last-child td { border-bottom: none; }
.eg-row-label { color: var(--dim); font-weight: 600; white-space: nowrap; }
.eg-compare .eg-col-on {
  background: rgba(245, 166, 35, .07);
  box-shadow: inset 2px 0 0 var(--eg-accent), inset -2px 0 0 var(--eg-accent);
  color: #fff;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
footer.eg-foot {
  border-top: 1px solid var(--border); margin-top: 44px; padding-top: 22px;
  color: var(--dimmer); font-size: 12.5px; max-width: 78ch;
}
footer.eg-foot p { margin-bottom: 10px; }
footer.eg-foot a { color: var(--primary); }

.eg-note {
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 8px; padding: 14px 17px; margin: 30px 0 0;
  font-size: 13px; color: var(--dim); max-width: 78ch;
}
.eg-note strong { color: var(--text); }

@media (max-width: 620px) {
  .eg-brand { font-size: 21px; }
  .eg-card  { padding: 18px; }
  .eg-card-icon { font-size: 32px; }
  .eg-card h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
