/* Neon Sign Shop: the atom + ladder column, the shop wall and sign, the spectroscope rows and spectrum strip, the gas
 * rack and the AP keypad in the practice shell's stage. Colours use --tlg-* tokens so dark mode works; the sign wall,
 * spectroscope and sample cards stay dark (they are lit by the glow). */
.nss { position: absolute; inset: 0; display: grid; grid-template-columns: 396px minmax(0, 1fr); gap: 12px; padding: 10px 12px; color: var(--tlg-text); }
.nss-left, .nss-right { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.nss-left { padding: 8px 10px; border-radius: var(--tlg-radius-lg); border: var(--tlg-border-width) solid var(--tlg-border); background: var(--tlg-surface); overflow: hidden; }
.nss-right { overflow: hidden; }
.nss-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; overflow: visible; }
.nss-photon { fill: none; stroke-width: 3.5; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .55)); }

/* atom + ladder */
.nss-atom { display: flex; align-items: center; gap: 10px; }
.nss-atom-svg { flex: none; color: var(--tlg-text); }
.nss-atom-svg svg { display: block; }
.nss-atom-svg text { fill: currentColor; font-family: var(--tlg-font, system-ui), system-ui, sans-serif; }
.nss-atom-cap { margin: 0; font-size: 16px; line-height: 1.3; }
.nss-left .pel { align-self: center; }

/* the wall and its sign */
.nss-wall { position: relative; flex: none; height: 150px; border-radius: var(--tlg-radius-lg); overflow: hidden; background: #1b1618; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4); }
.nss-wall[hidden] { display: none; }
.nss--k-flame .nss-tube-svg { width: 66px; height: 138px; }
.nss-wall-svg { display: block; width: 100%; height: 100%; }
.nss--jump .nss-wall, .nss--line .nss-wall { height: 200px; }
.nss-wall-tag { position: absolute; right: 10px; bottom: 8px; padding: 2px 10px; border-radius: var(--tlg-radius-full); background: rgba(0, 0, 0, .55); color: #f4f1ea; font-size: 16px; font-weight: var(--tlg-weight-bold); }
.nss-wall-tag:empty { display: none; }

/* spectroscope rows + strip */
.nss-strip { position: relative; flex: none; padding: 8px 10px 4px; border-radius: var(--tlg-radius-lg); border: var(--tlg-border-width) solid var(--tlg-border); background: var(--tlg-surface); }
.nss-strip-svg { position: relative; }
.nss-strip-svg svg { display: block; color: var(--tlg-text); }
.nss-strip-svg text { fill: currentColor; font-family: var(--tlg-font, system-ui), system-ui, sans-serif; font-size: 16px; }
.nss-strip-svg .nss-zone { font-weight: 800; fill: #fff; }
.nss-strip-svg .nss-tick { font-variant-numeric: tabular-nums; opacity: .85; }
.nss-strip-svg .nss-rowlab { font-weight: 700; }
.nss-strip-svg .nss-marklab { font-weight: 800; font-variant-numeric: tabular-nums; }
.nss-strip-svg .nss-marklab.is-want { font-weight: 600; opacity: .8; }
.nss-slots { position: absolute; left: 0; right: 0; }
.nss-slot { position: absolute; top: -6px; bottom: -6px; padding: 0; border-radius: 8px; border: 2px dashed rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .12);
  color: #fff; font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
.nss-slot--zone { background: rgba(0, 0, 0, .25); }
.nss-slot:hover:not(:disabled) { background: rgba(255, 255, 255, .22); }
.nss-slot[aria-checked="true"] { border: 3px solid #fff; background: rgba(255, 255, 255, .32); box-shadow: 0 0 0 2px #111, 0 0 0 5px var(--ps-accent); }
.nss-slot:focus-visible { outline: var(--tlg-focus-width) solid var(--tlg-focus); outline-offset: 3px; }
.nss-slot:disabled { cursor: default; }
.nss-slot.is-ok { border: 3px solid #fff; box-shadow: 0 0 0 2px #0f5132, 0 0 0 5px #2fb36a; }
.nss-slot.is-bad { border: 3px solid #fff; box-shadow: 0 0 0 2px #5c1010, 0 0 0 5px #e5484d; }
.nss-slot.is-ok::after, .nss-slot.is-bad::after { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); font-size: 18px; font-weight: 900; }
.nss-slot.is-ok::after { content: '✓'; color: #2fb36a; }
.nss-slot.is-bad::after { content: '✗'; color: #e5484d; }

/* control area */
.nss-ctl { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nss-ticket { padding: 12px 16px; border-radius: var(--tlg-radius-lg); border: 2px dashed var(--tlg-border-strong); background: var(--tlg-surface); }
.nss-ticket p { margin: 0; font-size: 16px; }
.nss-ticket-job { font-size: 18px !important; margin-bottom: 6px !important; }
.nss-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.nss kbd { font: inherit; font-size: 16px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--tlg-border-strong); background: var(--tlg-surface-2); }

/* rack */
.nss-rack { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.nss-rack--flame { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nss-tube { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: var(--tlg-radius-md, 12px);
  border: 2px solid var(--tlg-border-strong); background: #1a1d23; color: #f2f4f7; font: inherit; cursor: pointer; }
.nss-tube:hover:not(:disabled) { border-color: #9aa3ad; }
.nss-tube[aria-pressed="true"] { border-color: var(--ps-accent); box-shadow: 0 0 0 3px var(--ps-accent); }
.nss-tube:focus-visible { outline: var(--tlg-focus-width) solid var(--tlg-focus); outline-offset: 3px; }
.nss-tube:disabled { cursor: default; }
.nss-tube-sym { font-size: 20px; font-weight: 900; line-height: 1.1; }
.nss-tube-name { font-size: 16px; }
.nss-tube-svg .nss-tglass { stroke: #6b737d; }
.nss-tube-svg .nss-tcore { stroke: #9aa3ad; stroke-opacity: .5; }
.nss-tube-svg .nss-tbloom { stroke: var(--glow); fill: var(--glow); opacity: 0; }
.nss-tube-svg .nss-wflame { fill: var(--glow); opacity: 0; }
.nss-rack--flame .nss-tube-svg .nss-tbloom { stroke: none; }
.nss-tube[aria-pressed="true"] .nss-tglass { stroke: var(--glow); }
.nss-tube[aria-pressed="true"] .nss-tcore { stroke: var(--glow-core); stroke-opacity: 1; }
.nss-tube[aria-pressed="true"] .nss-tbloom { opacity: .7; }
.nss-rack--gas .nss-tube[aria-pressed="true"] .nss-tbloom { fill: none; }
.nss-tube[aria-pressed="true"] .nss-wflame { opacity: .95; }
.nss-badge { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 20px; font-weight: 900; }
.nss-tube.is-ok { border-color: #2fb36a; box-shadow: 0 0 0 3px #2fb36a; }
.nss-tube.is-ok .nss-badge { color: #4fd18a; }
.nss-tube.is-bad { border-color: #e5484d; box-shadow: 0 0 0 3px #e5484d; }
.nss-tube.is-bad .nss-badge { color: #ff7a7f; }

/* left-column cards */
.nss-card { display: flex; flex-direction: column; gap: 8px; }
.nss-card-title { margin: 0; font-size: 18px; }
.nss-card-note { margin: 0; font-size: 16px; color: var(--tlg-text-muted); }
.nss-sample-svg, .nss-photon-src { display: block; width: 100%; height: auto; border-radius: 12px; }
.nss-given { margin: 0; padding-left: 20px; font-size: 18px; }
.nss-sheet { padding: 10px 12px; border-radius: var(--tlg-radius-md, 12px); background: var(--tlg-surface-2); }
.nss-sheet p { margin: 0 0 4px; font-size: 16px; }
.nss-sheet-h { font-weight: var(--tlg-weight-bold); }

/* AP keypad + exponent */
.nss-num { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 0; }
.nss-num .pn { padding: 0; }
.nss-num .pn-pad .pn-key { min-height: 40px; }


/* Briefing worked example */
.nss-ex { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-start; }
.nss-ex-r { display: flex; flex-direction: column; gap: 8px; color: var(--tlg-text); }
.nss-ex-r svg text { fill: currentColor; font-family: var(--tlg-font, system-ui), system-ui, sans-serif; font-size: 16px; }
.nss-ex-r .nss-zone { fill: #fff; font-weight: 800; }
.nss-ex-sign { border-radius: 12px; overflow: hidden; height: 120px; }
.nss-ex-sign .nss-wall[hidden] { display: none; }
.nss--k-flame .nss-tube-svg { width: 66px; height: 138px; }
.nss-wall-svg { width: 100%; height: 100%; display: block; }
.nss-ex-sign .nss--jump .nss-wall, .nss--line .nss-wall { height: 200px; }
.nss-wall-tag { display: none; }

@media (max-width: 1100px) { .nss { grid-template-columns: 380px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .nss { position: static; grid-template-columns: 1fr; }
  .nss-left, .nss-right { overflow: visible; }
}
