
:root{
  --bg:#0b0f14;
  --card:#0f1622;
  --card2:#121c2a;
  --text:#e8eef7;
  --muted:#a6b3c7;
  --line:rgba(255,255,255,.08);
  --pill:#131d2a;
  --pill2:#162234;
  --accent:#7dd3fc;
  --accent2:#a78bfa;
  --danger:#e11d48;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--bg);
  color: var(--text);
}

.bg{
  position:fixed;
  inset:-20vh -20vw;
  background:
    radial-gradient(60vw 50vh at 20% 10%, rgba(125,211,252,.12), transparent 60%),
    radial-gradient(70vw 55vh at 90% 20%, rgba(167,139,250,.10), transparent 60%),
    radial-gradient(60vw 55vh at 50% 90%, rgba(34,197,94,.06), transparent 60%);
  pointer-events:none;
}

a{ color:inherit; text-decoration:none; }

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background: rgba(11,15,20,0.78);
  backdrop-filter: blur(10px);
}

.brand{ display:flex; align-items:center; gap:12px; }
.brand-mark{
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(125,211,252,.18), rgba(167,139,250,.12));
  border:1px solid var(--line);
}
.brandTitle{ font-weight:800; letter-spacing:0.2px; }
.brandSub{ color: var(--muted); font-size:12px; margin-top:2px; }

.navBtns{ display:flex; gap:10px; }
.btn{
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background: #0d1520;
  color: var(--text);
  font-weight:700;
}
.btn:hover{ border-color: rgba(125,211,252,.22); }
.btn.primary{
  background: linear-gradient(135deg, rgba(125,211,252,.18), rgba(167,139,250,.14));
  border-color: rgba(125,211,252,.22);
}

.wrap{
  max-width: 1200px;
  margin: 18px auto 60px;
  padding: 0 14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.card{
  background: linear-gradient(180deg, rgba(17,24,39,0.72), rgba(15,22,32,0.72));
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow: 0 22px 50px rgba(0,0,0,0.35);
  overflow:hidden;
}

.hero{ padding:16px; }
.heroTop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding-bottom:12px;
  border-bottom:1px solid var(--line);
}

.kicker{
  color: var(--muted);
  font-weight:800;
  letter-spacing:0.6px;
  text-transform:uppercase;
  font-size:12px;
}

.heroTitle h1{
  margin:6px 0 0;
  font-size:30px;
  line-height:1.1;
}
.subtitle{ margin-top:6px; color: var(--muted); font-weight:650; }

.heroPills{ display:flex; gap:8px; }
.pillMini{
  padding:8px 10px;
  border-radius:999px;
  background: rgba(255,255,255,0.06);
  border:1px solid var(--line);
  font-weight:800;
}
.pillMini:hover{ border-color:#2a3a4e; }

.heroGrid{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap:14px;
}

@media (max-width: 980px){
  .heroGrid{ grid-template-columns: 1fr; }
}

.diagram{
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0));
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
}

.field{
  width:100%;
  height:auto;
  display:block;
  border-radius:14px;
  background: #0b0f14;
}

.diagramLegend{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:10px;
  color: var(--muted);
  font-size:12px;
  font-weight:700;
}
.legendItem{ display:flex; align-items:center; gap:8px; }
.dot{ width:10px; height:10px; border-radius:999px; display:inline-block; border:1px solid rgba(255,255,255,0.25); }
.dot.black{ background:#0b0f14; border-color: rgba(255,255,255,0.20); }
.dot.red{ background: var(--danger); border-color: rgba(255,255,255,0.20); }
.dot.white{ background:#ffffff; }

.explain{
  padding: 6px 2px 2px;
}

.explainCols{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

@media (max-width: 520px){
  .explainCols{ grid-template-columns: 1fr; }
}

.posRow{
  display:flex;
  gap:10px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,0.03);
}
.posKey{
  min-width: 38px;
  height: 28px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background: rgba(96,165,250,0.12);
  border:1px solid rgba(96,165,250,0.22);
  font-weight:900;
  letter-spacing:0.3px;
}
.posBody{ flex:1; }
.posName{ font-weight:900; margin-bottom:2px; }
.posText{ color: var(--text); line-height:1.35; font-weight:600; }

.noteBoxes{
  margin-top:10px;
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}

.callout{
  padding:12px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.calloutTitle{ font-weight:900; margin-bottom:6px; }
.calloutText{ color: var(--muted); line-height:1.35; font-weight:650; }
.callout.comms{
  border-color: rgba(96,165,250,0.22);
  background: rgba(96,165,250,0.08);
}

.picker{ padding:14px 16px 16px; }
.pickerTitle{ font-weight:900; color: var(--muted); margin-bottom:10px; }

.pillGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}

@media (max-width: 980px){
  .pillGrid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .pillGrid{ grid-template-columns: 1fr; }
}

.pill{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.pill:hover{ border-color:#2a3a4e; }
.pill.active{
  border-color: rgba(96,165,250,0.35);
  background: rgba(96,165,250,0.08);
}

.pillNum{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background: rgba(255,255,255,0.06);
  border:1px solid var(--line);
  font-weight:900;
}
.pillText{ font-weight:850; line-height:1.2; }
.pillSub{ color: var(--muted); font-weight:700; }

.footer{
  color: var(--muted);
  text-align:center;
  font-size:12px;
  margin-top:4px;
}
code{
  padding:2px 6px;
  border-radius:10px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

/* Slightly soften SVG labels */
.field text { user-select:none; }
