/* =========================================================
   JetStream Aerospace Club — global stylesheet
   Brand: navy base (from the JetStream logo) + yellow & red.
   ========================================================= */
:root {
  --bg: #0b111d;
  --bg-2: #0e1625;
  --panel: #121b2e;
  --panel-2: #172239;
  --line: #222e47;
  --line-2: #33415f;
  --text: #f4f1e8;
  --muted: #a9b0c2;
  --dim: #737d95;
  --accent: #ffc83d;      /* JetStream yellow */
  --accent-ink: #1d1400;
  --red: #e63946;         /* JetStream red */
  --violet: #e63946;
  --orange: #ff7a2f;
  --good: #46e3a1;
  --warn: #ffcc4d;
  --danger: #ff5d73;
  --hi: #ff5a5a;   /* high pressure */
  --lo: #3d8bff;   /* low pressure */
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1200px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
sub, sup { font-size: .7em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 10, 20, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--display); font-size: 1.2rem; letter-spacing: .02em; }
.brand-text small { color: var(--muted); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: .94rem; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--panel-2); }
.nav-links a.btn { color: var(--accent-ink); margin-left: 8px; }
.nav-links a.btn:hover { background: #ffd970; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--panel); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 12px 16px 18px; gap: 2px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links a.btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .98rem;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .15s; font-family: var(--font);
}
.btn:hover { text-decoration: none; background: #ffd970; transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(255, 200, 61, .6); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--panel-2); box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Sections ---------- */
section { padding: 88px 0; position: relative; }
.section-tight { padding: 56px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.section-head { margin-bottom: 44px; max-width: 780px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .lead { margin-left: auto; margin-right: auto; }
.alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 72px 0 56px; border-bottom: 1px solid var(--line); overflow: hidden;
  background:
    radial-gradient(800px 300px at 85% -10%, rgba(230, 57, 70, .18), transparent 60%),
    radial-gradient(700px 300px at 0% 0%, rgba(255, 200, 61, .14), transparent 60%),
    var(--bg);
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); }
.breadcrumb { color: var(--dim); font-size: .88rem; margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Home hero ---------- */
.hero { padding: 0; min-height: calc(100vh - 68px); display: flex; align-items: center; overflow: hidden; }
.hero canvas#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 500px at 20% 50%, rgba(6, 10, 20, .85), transparent 70%),
              linear-gradient(180deg, transparent 70%, var(--bg));
}
.hero-inner { position: relative; z-index: 2; padding: 80px 16px 96px; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--violet) 55%, var(--orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 1.22rem; margin: 22px 0 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 64px; max-width: 760px; }
.stat { border-left: 2px solid var(--line-2); padding-left: 14px; }
.stat b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }
@media (max-width: 640px) { .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: linear-gradient(180deg, var(--panel), rgba(14, 23, 41, .6));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: border-color .2s, transform .2s;
  position: relative;
}
.card:hover { border-color: var(--line-2); }
.card.lift:hover { transform: translateY(-3px); }
.card h3 { margin-top: 4px; }
.card p { color: var(--muted); margin-bottom: 0; }
.card .num { font-family: var(--mono); color: var(--dim); font-size: .8rem; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(255, 200, 61, .1); color: var(--accent); border: 1px solid rgba(255, 200, 61, .25);
}
.icon svg { width: 24px; height: 24px; }
.icon.v { background: rgba(230, 57, 70, .1); color: var(--violet); border-color: rgba(230, 57, 70, .3); }
.icon.o { background: rgba(255, 138, 61, .1); color: var(--orange); border-color: rgba(255, 138, 61, .3); }
.icon.g { background: rgba(70, 227, 161, .1); color: var(--good); border-color: rgba(70, 227, 161, .3); }

.tag {
  display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .04em; padding: 3px 10px;
  border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); background: var(--bg-2);
}
.tag.c { color: var(--accent); border-color: rgba(255, 200, 61, .35); }
.tag.v { color: var(--violet); border-color: rgba(230, 57, 70, .4); }
.tag.o { color: var(--orange); border-color: rgba(255, 138, 61, .4); }
.tag.g { color: var(--good); border-color: rgba(70, 227, 161, .4); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.feature {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
@media (max-width: 900px) { .feature { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.checklist { list-style: none; padding: 0; margin: 0 0 28px; }
.checklist li { padding: 8px 0 8px 32px; position: relative; color: var(--muted); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 18px; height: 18px; border-radius: 6px;
  background: rgba(70, 227, 161, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2346e3a1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}
.checklist li b { color: var(--text); font-weight: 600; }

.frame {
  border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: #050913;
  box-shadow: var(--shadow);
}
.frame-bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); align-items: center; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.frame-bar span { margin-left: 10px; color: var(--dim); font-size: .78rem; font-family: var(--mono); }

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .timeline { grid-template-columns: minmax(0, 1fr); } }
.tl { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); position: relative; overflow: hidden; }
.tl::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c, var(--accent)); }
.tl .wk { font-family: var(--mono); font-size: .78rem; color: var(--c, var(--accent)); }
.tl h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.tl p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--line-2); border-radius: 22px; padding: 56px 32px; text-align: center; overflow: hidden; position: relative;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(255, 200, 61, .18), transparent 70%),
    radial-gradient(500px 240px at 50% 120%, rgba(255, 138, 61, .14), transparent 70%),
    var(--panel);
}
.cta-band .lead { margin: 0 auto 28px; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); background: var(--panel); font-weight: 600; }
tr:last-child td { border-bottom: none; }
td b { font-family: var(--display); }
tbody tr:hover td { background: rgba(18, 29, 53, .5); }

/* ---------- Equations ---------- */
.eq {
  font-family: "Cambria Math", "Times New Roman", serif; font-size: 1.35rem; text-align: center; padding: 20px 14px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 14px 0 16px; overflow-x: auto;
  white-space: nowrap; color: #fff;
}
.eq i { font-style: italic; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .15em; }
.frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 .2em; }
.frac > span { line-height: 1.25; }
.vars { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.vars li { color: var(--muted); font-size: .94rem; }
.vars li i, .vars li b { color: var(--text); font-family: "Cambria Math", "Times New Roman", serif; font-size: 1.05rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; font-weight: 600; color: var(--muted); }
input[type=text], input[type=email], input[type=search], input[type=number], select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
  padding: 12px 14px; border-radius: 10px; font: inherit; font-size: .96rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 200, 61, .15); }
textarea { min-height: 120px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); padding: 8px 14px; border-radius: 999px;
  font: inherit; font-size: .88rem; cursor: pointer; transition: .15s;
}
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip.active, .chip[aria-pressed="true"] { background: rgba(255, 200, 61, .12); border-color: var(--accent); color: var(--accent); }
.check { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .92rem; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- FAQ ---------- */
details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); padding: 0 20px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); font-size: .94rem; }
.site-footer a:hover { color: var(--text); }
.site-footer p { color: var(--muted); font-size: .92rem; max-width: 340px; margin-top: 14px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--dim); font-size: .85rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Research hub ---------- */
.tree {
  font-family: var(--mono); font-size: .92rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; color: var(--muted); line-height: 2; overflow-x: auto; white-space: pre;
}
.tree b { color: var(--text); }
.tree button { all: unset; cursor: pointer; color: var(--accent); }
.tree button:hover { text-decoration: underline; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.toolbar input[type=search] { max-width: 340px; }
.bib-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .bib-grid { grid-template-columns: minmax(0, 1fr); } }
.bib { display: flex; flex-direction: column; gap: 12px; }
.bib .author { font-size: .86rem; color: var(--dim); font-weight: 600; letter-spacing: .02em; }
.bib h3 { font-size: 1.15rem; margin: 0; font-style: italic; }
.bib .pub { color: var(--dim); font-size: .88rem; }
.bib .focus { color: var(--muted); font-size: .95rem; margin: 0; }
.bib .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.bib .foot a { font-size: .88rem; font-weight: 600; }
.level { font-size: .76rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.level i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.level i.on { background: var(--accent); }
.empty { text-align: center; color: var(--dim); padding: 40px; border: 1px dashed var(--line-2); border-radius: var(--radius); display: none; }
.path { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.path li { counter-increment: step; position: relative; padding-left: 40px; color: var(--muted); font-size: .94rem; }
.path li::before {
  content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text);
}
.path li b { color: var(--text); }

/* ---------- Curriculum ---------- */
.unit { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px; padding: 40px 0; border-top: 1px solid var(--line); }
.unit:first-of-type { border-top: none; }
@media (max-width: 820px) { .unit { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.unit-side .wk { font-family: var(--mono); color: var(--c, var(--accent)); font-size: .85rem; }
.unit-side h3 { font-size: 1.5rem; margin-top: 6px; }
.unit-badge { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; border: 1px solid var(--c, var(--accent)); color: var(--c, var(--accent)); font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-bottom: 14px; }
.unit-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 680px) { .unit-body { grid-template-columns: minmax(0, 1fr); } }
.unit-body .card { padding: 20px; }
.unit-body .card h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 10px; }
.unit-body .card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .94rem; }
.unit-body .card ul li { margin-bottom: 4px; }
.unit-body .span2 { grid-column: 1 / -1; }
.note {
  border: 1px solid rgba(255, 204, 77, .35); background: rgba(255, 204, 77, .06); color: #f3dfa6;
  border-radius: var(--radius-sm); padding: 14px 18px; font-size: .92rem;
}
.note b { color: var(--warn); }

/* ---------- Join ---------- */
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.info-list li { display: flex; gap: 14px; }
.info-list .icon { margin: 0; flex: none; width: 42px; height: 42px; }
.info-list b { display: block; }
.info-list span { color: var(--muted); font-size: .94rem; }
.form-status { display: none; border-radius: 10px; padding: 14px 16px; font-size: .94rem; }
.form-status.ok { display: block; background: rgba(70, 227, 161, .1); border: 1px solid rgba(70, 227, 161, .4); color: var(--good); }

/* =========================================================
   Wind tunnel simulator
   ========================================================= */
.sim-shell { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1080px) { .sim-shell { grid-template-columns: minmax(0, 1fr); } }
.sim-stage { position: relative; }
.sim-canvas-wrap { position: relative; background: #040811; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
#tunnel { width: 100%; height: auto; aspect-ratio: 5 / 2.8; cursor: crosshair; }
.sim-hud {
  position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; right: 12px;
}
.hud-pill {
  background: rgba(6, 10, 20, .78); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; font-size: .78rem;
  font-family: var(--mono); color: var(--muted); backdrop-filter: blur(6px);
}
.hud-pill b { color: var(--text); font-weight: 600; }
@media (max-width: 600px) { .sim-hud { top: 6px; left: 6px; gap: 4px; } .hud-pill { font-size: .64rem; padding: 3px 8px; } #hud-shape { display: none; } }
.hud-pill.regime-lam { border-color: rgba(70, 227, 161, .6); color: var(--good); }
.hud-pill.regime-tr { border-color: rgba(255, 204, 77, .6); color: var(--warn); }
.hud-pill.regime-tu { border-color: rgba(255, 93, 115, .6); color: var(--danger); }
.hud-pill.alert { border-color: var(--danger); color: #fff; background: rgba(255, 93, 115, .3); }
.sim-probe {
  position: absolute; pointer-events: none; background: rgba(6, 10, 20, .9); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 10px; font-family: var(--mono); font-size: .74rem; color: var(--muted); display: none; white-space: nowrap; z-index: 3;
}
.sim-probe b { color: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; padding: 12px 4px 0; font-size: .82rem; color: var(--muted); }
.cbar { display: flex; align-items: center; gap: 10px; }
.cbar .bar { width: 160px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--lo), #b9c7ea 50%, var(--hi)); }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.legend .key i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); margin-bottom: 14px; }
.shape-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shape-btn {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 6px 8px; color: var(--muted);
  font: inherit; font-size: .76rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: .15s;
}
.shape-btn svg { width: 46px; height: 22px; }
.shape-btn:hover { color: var(--text); border-color: var(--dim); }
.shape-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: rgba(255, 200, 61, .08); }
.ctrl { margin-bottom: 16px; }
.ctrl:last-child { margin-bottom: 0; }
.ctrl-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; gap: 8px; }
.ctrl-head label { font-size: .88rem; color: var(--text); font-weight: 500; }
.ctrl-head output { font-family: var(--mono); font-size: .84rem; color: var(--accent); }
.ctrl small { color: var(--dim); font-size: .76rem; display: block; margin-top: 4px; }
.ctrl.disabled { opacity: .4; pointer-events: none; }
input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; background: transparent; height: 22px; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--line-2) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 5px; border-radius: 3px; background: var(--line-2); }
input[type=range]::-moz-range-progress { height: 5px; border-radius: 3px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); margin-top: -6.5px; box-shadow: 0 0 0 4px rgba(255, 200, 61, .15); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.mini-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini-btns button { font: inherit; font-size: .74rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); cursor: pointer; }
.mini-btns button:hover { color: var(--text); border-color: var(--dim); }
.toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sim-actions { display: flex; gap: 8px; margin-top: 16px; }
.sim-actions .btn { flex: 1; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.metric .k { font-size: .8rem; color: var(--dim); font-weight: 500; letter-spacing: .02em; }
.metric .v { font-family: var(--display); font-size: 1.45rem; font-weight: 600; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .v small { font-size: .8rem; color: var(--muted); font-weight: 500; margin-left: 3px; }
.metric .s { font-size: .78rem; color: var(--muted); }
.metric.hl { border-color: rgba(255, 200, 61, .4); }
.metric.hl-o { border-color: rgba(255, 138, 61, .4); }

.live-eq { margin-top: 20px; }
.live-eq .row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); align-items: baseline; }
.live-eq .row:first-of-type { border-top: none; }
.live-eq .lbl { color: var(--dim); font-size: .82rem; }
.live-eq .ex { font-family: "Cambria Math", "Times New Roman", serif; font-size: 1.05rem; overflow-x: auto; white-space: nowrap; }
.live-eq .ex b { color: var(--accent); font-weight: 600; }
@media (max-width: 600px) { .live-eq .row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.experiments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .experiments { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .experiments { grid-template-columns: minmax(0, 1fr); } }
.exp { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.exp h3 { font-size: 1rem; }
.exp p { font-size: .88rem; }
.exp .go { margin-top: 12px; color: var(--accent); font-size: .85rem; font-weight: 600; }
.regime-scale { display: grid; grid-template-columns: 1fr 1.4fr 1fr; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); margin: 18px 0; }
.regime-scale div { padding: 14px; font-size: .85rem; }
.regime-scale div b { display: block; font-family: var(--display); font-size: .98rem; }
.regime-scale .r1 { background: rgba(70, 227, 161, .1); color: var(--good); }
.regime-scale .r2 { background: rgba(255, 204, 77, .08); color: var(--warn); border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.regime-scale .r3 { background: rgba(255, 93, 115, .1); color: var(--danger); }
@media (max-width: 560px) { .regime-scale { grid-template-columns: minmax(0, 1fr); } .regime-scale .r2 { border: none; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); } }
