/* Neutron Slingshot — page shell + game card (alphanur.com/slingshot).
   Dark only, by design (see CLAUDE.md). Everything the game needs is scoped
   under .anx-sling so the card can also be dropped into another page.

   No web font is loaded on purpose: the isotope labels (²³⁵U, ¹⁴¹Ba, n₁) need
   every superscript and subscript digit from ONE font, and the hosted subsets
   of Montserrat/Inter carry only some of them. The system font has them all. */

:root{ color-scheme:dark; }
html{ background:#02191f; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body{ margin:0; padding:0 12px 28px; background:#02191f; color:#ffffff;
  font-family:'Montserrat','Inter',system-ui,sans-serif; }

/* ---- page shell ---- */
.sl-top{ max-width:min(1040px,100%); margin:0 auto; padding:4px 2px 2px; }
.sl-home{ display:inline-flex; align-items:center; min-height:28px;
  font-size:12px; font-weight:600; letter-spacing:.14em; text-transform:uppercase;
  color:#c4deef; text-decoration:none; }
.sl-home:hover{ color:#ffffff; }
.sl-home:focus-visible{ outline:2px solid #ffffff; outline-offset:4px; border-radius:4px; }

/* ---- game card ---- */
.anx-sling{
  --bg:#02191f; --cherenkov:#c4deef; --navy:#073763;
  --bg-soft:rgba(7,55,99,.16); --panel:rgba(7,55,99,.35);
  --muted:#91a1ad; --text:#ffffff;
  --glow:rgba(196,222,239,.35); --line:rgba(196,222,239,.16);
  --symw:50px;                                   /* isotope-symbol column left of the map strips */
  display:block;
  font-family:'Montserrat','Inter',system-ui,sans-serif;
  max-width:min(1040px,100%); width:100%; margin:0 auto; box-sizing:border-box;
  background:var(--bg); color:var(--text);
  border:1px solid var(--line); border-radius:14px; padding:18px 18px 20px;
  user-select:none; -webkit-user-select:none; -webkit-tap-highlight-color:transparent;
}
.anx-sling *{ box-sizing:border-box; }
.anx-sling :focus-visible{ outline:2px solid #ffffff; outline-offset:2px; }
.anx-sling .sl-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.anx-sling .sl-title{ margin:0; min-width:0; font-size:15px; font-weight:600; letter-spacing:.3em; text-transform:uppercase;
  color:var(--cherenkov); text-shadow:0 0 14px var(--glow); }
.anx-sling .sl-hint{ margin:8px 0 10px; font-size:12.5px; line-height:1.45; color:var(--muted); }
.anx-sling .sl-hbtns{ display:flex; gap:7px; flex:0 0 auto; }

/* ---- buttons ---- */
.anx-sling .sl-reset,.anx-sling .sl-mode{ flex:0 0 auto; min-height:36px;
  font:600 10.5px/1 'Montserrat','Inter',system-ui,sans-serif;
  letter-spacing:.14em; text-transform:uppercase; color:#ffffff; background:var(--bg-soft);
  border:1px solid var(--line); border-radius:999px; padding:9px 16px; cursor:pointer;
  white-space:nowrap; transition:box-shadow .2s, background .2s, border-color .2s; }
.anx-sling .sl-reset:hover,.anx-sling .sl-reset:focus-visible,
.anx-sling .sl-mode:hover,.anx-sling .sl-mode:focus-visible{ background:var(--panel); box-shadow:0 0 14px var(--glow); }
/* out of neutrons: the one useful control is brought forward */
.anx-sling .sl-reset.sl-attn{ background:var(--panel); border-color:rgba(196,222,239,.7);
  box-shadow:0 0 16px var(--glow); }
.anx-sling .sl-pal{ display:none; gap:6px; margin:0 0 10px; }
.anx-sling.sl-free .sl-pal{ display:flex; }
.anx-sling .sl-pal-btn{ flex:1 1 0; min-height:34px; font:600 12px/1 'Montserrat','Inter',system-ui,sans-serif;
  letter-spacing:.04em; color:#ffffff; background:var(--bg-soft);
  border:1px solid var(--line); border-radius:999px; padding:8px 4px; cursor:pointer;
  white-space:nowrap; transition:box-shadow .2s, background .2s, color .2s, border-color .2s; }
.anx-sling .sl-pal-btn:hover,.anx-sling .sl-pal-btn:focus-visible{ background:var(--panel); }
.anx-sling .sl-pal-on,.anx-sling .sl-pal-on:hover,.anx-sling .sl-pal-on:focus-visible{
  color:#ffffff; border-color:rgba(196,222,239,.55); background:var(--panel);
  box-shadow:0 0 13px var(--glow); text-shadow:0 0 9px var(--glow); }
@media (pointer:coarse){                          /* fingers: full-size targets */
  .anx-sling .sl-reset,.anx-sling .sl-mode,.anx-sling .sl-pal-btn{ min-height:44px; }
  .sl-home{ min-height:40px; }
}

/* ---- round bar: round chip, shot dots, energy goal ---- */
.anx-sling .sl-round{ display:flex; align-items:center; gap:9px; margin:0 0 10px; }
.anx-sling .sl-shots{ display:flex; align-items:center; gap:5px; flex:0 0 auto; }
.anx-sling .sl-shot{ display:inline-block; width:9px; height:9px; border-radius:50%;
  border:1px solid rgba(196,222,239,.35); background:transparent; }
.anx-sling .sl-shot-on{ background:#ffffff; border-color:rgba(196,222,239,.85);
  box-shadow:0 0 7px var(--glow); }
.anx-sling .sl-shots-inf{ font:600 15px/1 'Montserrat','Inter',system-ui,sans-serif;
  color:#ffffff; text-shadow:0 0 8px var(--glow); }
.anx-sling .sl-goal{ position:relative; flex:1 1 auto; height:18px; border-radius:999px;
  background:var(--bg-soft); border:1px solid var(--line); overflow:hidden; }
.anx-sling .sl-goal-fill{ position:absolute; left:0; top:0; bottom:0; width:0%;
  background:var(--cherenkov); box-shadow:0 0 10px var(--glow); transition:width .25s ease; }
.anx-sling .sl-goal-label{ position:absolute; left:0; right:0; top:0; bottom:0;
  display:flex; align-items:center; justify-content:center;
  font-size:10.5px; font-weight:600; letter-spacing:.06em; color:#ffffff;
  font-variant-numeric:tabular-nums;
  text-shadow:0 0 4px rgba(2,25,31,.95),0 0 2px rgba(2,25,31,.95); }

/* ---- caption: the live narration, kept ABOVE the chamber so it is on screen
   with the action. Height is reserved for the longest caption at each width
   (one line wide, two mid, three on a phone) so the chamber never jumps
   mid-aim; the text sits on the bottom of that box, next to the chamber. ---- */
.anx-sling .sl-caption{ display:flex; align-items:flex-end; margin:0 2px 8px; min-height:1.4em;
  font-size:12.5px; line-height:1.4; color:var(--cherenkov); }
@media (max-width:840px){ .anx-sling .sl-caption{ min-height:2.8em; } }
.anx-sling .sl-caption.sl-cap-on{ animation:anx-sl-capfade .35s ease-out; }
@keyframes anx-sl-capfade{ from{ opacity:0; transform:translateY(3px);} to{ opacity:1; transform:none;} }

/* ---- the chamber ----
   Never taller than the screen: the caption and the WHOLE chamber fit in view
   together, so the sling and its targets are visible at once (the portrait
   stage is 470×820, taller than a phone screen at full width). --stage-ar is
   the stage's width/height, set by the script per orientation. svh is the
   viewport with the browser bars showing, so the size holds still on scroll. */
.anx-sling .sl-stage{ border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--bg);
  margin:0 auto;
  max-width:max(250px, calc((100vh - 78px) * var(--stage-ar, 1.75)));
  max-width:max(250px, calc((100svh - 78px) * var(--stage-ar, 1.75))); }
/* touch-action stays permissive: the script cancels scrolling only for a touch
   that actually grabs something, so the rest of a tall chamber still scrolls */
.anx-sling .sl-canvas{ display:block; width:100%; touch-action:manipulation; cursor:grab; }
.anx-sling .sl-canvas.sl-grab{ cursor:grabbing; }
.anx-sling .sl-canvas:focus-visible{ outline:2px solid var(--cherenkov); outline-offset:-3px; border-radius:10px; }
.anx-sling .sl-noscript{ margin:10px 2px 0; font-size:12.5px; color:var(--muted); }

/* ---- reaction map: the SOLE energy/odds display ---- */
.anx-sling .sl-map{ position:relative; margin-top:13px; }
/* band-label axis — log-axis segments above the strips, offset by the symbol
   column; the segments and ticks are built by the script from its band table */
.anx-sling .sl-bands{ position:relative; height:13px; margin:0 0 4px;
  margin-left:var(--symw); width:calc(100% - var(--symw)); }
.anx-sling .sl-bands span{ position:absolute; top:0; text-align:center; font-size:9px; line-height:13px;
  letter-spacing:.06em; text-transform:uppercase; color:var(--muted); white-space:nowrap; overflow:hidden; }
.anx-sling .sl-bands .sl-bc{ color:var(--cherenkov); text-shadow:0 0 7px var(--glow); }
.anx-sling .sl-bands i{ font-style:normal; }
.anx-sling .sl-ba{ display:none; }
.anx-sling .sl-btick{ position:absolute; top:-2px; bottom:-2px; width:1px; background:rgba(196,222,239,.3);
  transform:translateX(-50%); }
.anx-sling .sl-map-rows{ display:flex; flex-direction:column; gap:3px; }
.anx-sling .sl-map-row{ display:flex; align-items:center; gap:6px; }
.anx-sling .sl-map-sym{ flex:0 0 calc(var(--symw) - 6px); font-size:11px; font-weight:600; color:var(--cherenkov);
  text-shadow:0 0 8px var(--glow); white-space:nowrap; }
.anx-sling .sl-map-strip{ flex:1 1 0; min-width:0; height:14px; display:block; border-radius:3px;
  background:var(--bg-soft); }
.anx-sling .sl-map-ov{ position:absolute; left:var(--symw); top:0; width:calc(100% - var(--symw)); height:100%;
  pointer-events:none; }
/* map legend — lightness carries the meaning (bright / mid / faint), words name it */
.anx-sling .sl-olegend{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; margin-top:9px;
  font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.anx-sling .sl-olead{ color:var(--cherenkov); font-weight:600; }
.anx-sling .sl-ldot{ display:inline-block; width:9px; height:9px; border-radius:2px;
  margin-right:5px; vertical-align:-1px; border:1px solid rgba(196,222,239,.35); }
.anx-sling .sl-f-fission{ background:rgba(196,222,239,.85); box-shadow:0 0 8px var(--glow); }
.anx-sling .sl-f-capture{ background:rgba(92,130,162,.8); }
.anx-sling .sl-f-scatter{ background:rgba(196,222,239,.13); }
/* per-neutron readouts — one line each, change-cached */
.anx-sling .sl-nread{ margin:9px 0 0; display:flex; flex-direction:column; gap:2px; min-height:17px;
  font-size:12px; line-height:1.35; color:var(--text); font-variant-numeric:tabular-nums; }
.anx-sling .sl-nread .sl-nr-n{ color:var(--cherenkov); font-weight:600; text-shadow:0 0 7px var(--glow); }

/* ---- session tally ---- */
.anx-sling .sl-tally{ display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin-top:12px; }
.anx-sling .sl-chip{ background:var(--bg-soft); border:1px solid var(--line); border-radius:999px; padding:3px 10px;
  font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); white-space:nowrap; }
.anx-sling .sl-chip b{ color:var(--cherenkov); font-weight:600; font-variant-numeric:tabular-nums; }

/* ---- portrait stage (the script switches orientation at the same 560px) ---- */
@media (max-width:584px){
  body{ padding:0 8px 20px; }
  .anx-sling .sl-caption{ min-height:4.2em; }     /* long captions run to three lines */
}
@media (max-width:380px){
  .anx-sling{ --symw:46px; padding:14px 12px 16px; }
  .anx-sling .sl-title{ font-size:12.5px; letter-spacing:.2em; }
  .anx-sling .sl-reset,.anx-sling .sl-mode{ font-size:9.5px; padding:8px 11px; letter-spacing:.1em; }
  .anx-sling .sl-pal-btn{ font-size:10.5px; padding:7px 2px; letter-spacing:.02em; }
  .anx-sling .sl-map-sym{ font-size:10px; }
  .anx-sling .sl-bf{ display:none; }
  .anx-sling .sl-ba{ display:inline; }
  .anx-sling .sl-nread{ font-size:11px; }
  .anx-sling .sl-chip{ font-size:10px; padding:3px 8px; }
  .anx-sling .sl-round{ gap:6px; }
  .anx-sling .sl-shot{ width:7px; height:7px; }
  .anx-sling .sl-goal-label{ font-size:9.5px; letter-spacing:.03em; }
}

/* ---- reduced motion: no entrance animation or easing (the script also
   drops the shakes, jitter and flicker inside the chamber) ---- */
@media (prefers-reduced-motion:reduce){
  .anx-sling .sl-caption.sl-cap-on{ animation:none; }
  .anx-sling .sl-goal-fill,.anx-sling .sl-reset,.anx-sling .sl-mode,.anx-sling .sl-pal-btn{ transition:none; }
}
