/* Nuclear Chemistry Explorer — sim-scoped styles. All classes are .nce-* prefixed so they can't
 * collide with site.css. Reuses --tlg-* tokens (color/radius/shadow/type) so dark mode and the
 * site's look come for free. Calm-by-default: one accent (chemistry blue), muted surfaces, no
 * competing motion. */

.nce-app [hidden] { display: none !important; }   /* the [hidden] attribute always wins over component display rules */
.nce-course-btn[hidden] { display: none !important; }
.nce-app { max-width: 900px; margin: 0 auto; padding: 18px 16px 60px; font-family: var(--tlg-font-body); color: var(--tlg-ink); }
.nce-app h1, .nce-app h2, .nce-app h3 { font-family: var(--tlg-font-heading); }
/* --tlg-chemistry-dark has no dark-mode override (it's meant to pair with the also-invariant
 * --tlg-chemistry-tint background). --nce-link is for chemistry-blue text/icons that instead sit
 * directly on the page's own background, which DOES change with the theme — so it needs its own
 * dark-mode-safe value here, scoped to this sim only. */
.nce-app { --nce-link: var(--tlg-chemistry-dark); }
html[data-theme="dark"] .nce-app { --nce-link: #8ab4f8; }

/* ── Toolbar + Info Layers panel ─────────────────────────────────────── */
.nce-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 14px; }
.nce-ab-slot { display: inline-flex; align-items: center; }
.nce-layers-btn { display: inline-flex; align-items: center; gap: 7px; min-height: var(--tlg-tap); padding: 0 14px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.nce-layers-btn:hover { background: var(--tlg-chip-bg); }
.nce-layers-btn svg { width: 17px; height: 17px; }

.nce-panel { position: relative; z-index: 20; margin-bottom: 14px; padding: 16px; border: 1px solid var(--tlg-border); border-radius: var(--tlg-radius-card); background: var(--tlg-surface); box-shadow: var(--tlg-shadow-card); }
.nce-panel[hidden] { display: none; }
.nce-panel-title { margin: 0 0 4px; font-size: 16px; }
.nce-panel-sub { margin: 0 0 12px; color: var(--tlg-muted); font-size: 13px; }
.nce-toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--tlg-border); }
.nce-toggle-row:last-of-type { border-bottom: none; }
.nce-toggle-copy strong { display: block; font-size: 14px; }
.nce-toggle-copy span { display: block; margin-top: 1px; color: var(--tlg-muted); font-size: 12px; max-width: 46ch; }
.nce-switch { position: relative; flex: none; width: 42px; height: 24px; border: none; border-radius: var(--tlg-radius-pill); background: var(--tlg-border-strong); cursor: pointer; padding: 0; }
.nce-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s ease; }
.nce-switch[aria-checked="true"] { background: var(--tlg-chemistry); }
.nce-switch[aria-checked="true"]::after { left: 20px; }
.nce-panel-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--tlg-border); }
.nce-reset-btn { min-height: 38px; padding: 0 14px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: transparent; color: var(--tlg-ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.nce-panel-close { min-height: 38px; padding: 0 14px; border: none; border-radius: var(--tlg-radius-pill); background: var(--tlg-chemistry); color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.nce-force-note { margin: 0 0 10px; padding: 7px 12px; border-radius: 10px; background: var(--tlg-chemistry-tint); color: var(--tlg-chemistry-dark); font-size: 12.5px; font-weight: 700; }

/* ── Home screen ─────────────────────────────────────────────────────── */
.nce-home-sub { color: var(--tlg-muted); margin-top: 2px; }
.nce-home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.nce-home-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 120px; padding: 16px 16px 40px; border: 2px solid var(--tlg-border); border-radius: var(--tlg-radius-card); background: var(--tlg-surface); color: var(--tlg-ink); text-align: left; cursor: pointer; font: inherit; }
.nce-home-card:hover:not(:disabled) { border-color: var(--tlg-chemistry); }
.nce-home-card:disabled { opacity: .55; cursor: not-allowed; }
.nce-home-card-title { font-family: var(--tlg-font-heading); font-size: 17px; font-weight: 800; padding-right: 34px; }   /* room for the ✓ badge */
.nce-home-card-desc { color: var(--tlg-muted); font-size: 13px; }
.nce-home-card-check { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #16a34a; color: #fff; font-size: 14px; font-weight: 900; }
.nce-home-card-check[hidden] { display: none; }
.nce-home-card-lock { position: absolute; top: 12px; right: 12px; color: var(--tlg-muted); font-size: 12px; font-weight: 700; }

/* ── Section shell ────────────────────────────────────────────────────── */
.nce-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.nce-back-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 12px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: transparent; color: var(--tlg-ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.nce-section-title { margin: 0; font-size: 20px; flex: 1; }
.nce-show-intro-btn { min-height: 34px; padding: 0 10px; border: none; background: transparent; color: var(--nce-link); font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; text-decoration: underline; }

.nce-intro { margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: var(--tlg-chemistry-tint); color: var(--tlg-chemistry-dark); }
.nce-intro[hidden] { display: none; }
.nce-intro p { margin: 0 0 8px; font-size: 14px; }
.nce-intro-dismiss { min-height: 34px; padding: 0 12px; border: none; border-radius: var(--tlg-radius-pill); background: var(--tlg-chemistry); color: #fff; font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* ── Objective banner + drawer ───────────────────────────────────────── */
.nce-obj-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.nce-obj-banner { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 220px; padding: 10px 14px; border-radius: 14px; background: var(--tlg-surface); border: 1.5px solid var(--tlg-chemistry); font-size: 14px; }
.nce-obj-count { flex: none; padding: 2px 9px; border-radius: var(--tlg-radius-pill); background: var(--tlg-chemistry); color: #fff; font-size: 11px; font-weight: 800; }
.nce-obj-text { font-weight: 700; }
.nce-obj-done { font-weight: 700; color: #16a34a; }
.nce-obj-drawer-trigger { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.nce-obj-drawer-badge { padding: 1px 7px; border-radius: var(--tlg-radius-pill); background: var(--tlg-chip-bg); font-size: 11px; }
.nce-obj-drawer { margin-bottom: 12px; }
.nce-obj-drawer[hidden] { display: none; }
.nce-obj-list { list-style: none; margin: 0; padding: 0; }
.nce-obj-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 13.5px; color: var(--tlg-muted); }
.nce-obj-item.is-done { color: var(--tlg-ink); }
.nce-obj-mark { flex: none; color: #16a34a; font-weight: 900; }

/* ── Stage / controls ─────────────────────────────────────────────────── */
.nce-stage { position: relative; margin-bottom: 12px; padding: 14px; border-radius: var(--tlg-radius-card); background: var(--tlg-chip-bg); border: 1px solid var(--tlg-border); min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.nce-stage[hidden] { display: none; }
.nce-stage canvas { max-width: 100%; touch-action: pan-y; }
/* Scene canvases: fill the lab column, 16:9 or taller, never under 320 px high (brief section 1). Only
 * canvases that take drags/pinches opt out of touch scrolling (.nce-touch-none), so a phone user can
 * still scroll past a graph with a finger. */
.nce-stage-canvas { display: block; width: 100%; max-width: none; aspect-ratio: 16 / 9; min-height: 320px; max-height: max(320px, min(56vh, 440px)); height: auto; border-radius: 12px; }
.nce-stage-canvas--tall { aspect-ratio: 4 / 3; }
.nce-app canvas.nce-touch-none { touch-action: none; }
.nce-app canvas:focus-visible { outline: 3px solid var(--tlg-chemistry); outline-offset: 2px; }
.nce-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.nce-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tlg-tap); padding: 0 16px; border: 2px solid var(--tlg-chemistry); border-radius: var(--tlg-radius-pill); background: var(--tlg-chemistry); color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.nce-btn:hover:not(:disabled) { filter: brightness(1.08); }
.nce-btn:disabled { opacity: .5; cursor: not-allowed; }
.nce-btn--ghost { background: transparent; color: var(--nce-link); }
.nce-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.nce-tab { min-height: 40px; padding: 0 16px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.nce-tab[aria-selected="true"] { border-color: var(--tlg-chemistry); background: var(--tlg-chemistry); color: #fff; }

.nce-slider-row { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 520px; }
.nce-slider-row label { font-size: 13px; font-weight: 700; flex: none; }
.nce-slider-row input[type="range"] { flex: 1; }
.nce-slider-val { flex: none; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--tlg-muted); min-width: 3.5em; text-align: right; }

.nce-qual { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); border: 1px solid var(--tlg-border); font-size: 12.5px; font-weight: 700; }
.nce-qual-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tlg-border-strong); }
.nce-qual--low .nce-qual-dot { background: #3b82f6; } .nce-qual--low { color: #1d4ed8; }
.nce-qual--stable .nce-qual-dot, .nce-qual--medium .nce-qual-dot { background: #16a34a; } .nce-qual--stable, .nce-qual--medium { color: #15803d; }
.nce-qual--high .nce-qual-dot { background: #b45309; } .nce-qual--high { color: #b45309; }
.nce-qual--critical .nce-qual-dot { background: #16a34a; } .nce-qual--critical { color: #15803d; }
.nce-qual--subcritical .nce-qual-dot { background: #64748b; } .nce-qual--subcritical { color: #475569; }
.nce-qual--supercritical .nce-qual-dot { background: #b45309; } .nce-qual--supercritical { color: #92400e; }

.nce-warn { margin: 4px 0 10px; padding: 9px 13px; border-radius: 12px; background: #fef3c7; color: #92400e; font-size: 13px; font-weight: 700; }
.nce-warn[hidden] { display: none; }
.nce-meters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.nce-meter { padding: 5px 10px; border-radius: 10px; background: var(--tlg-surface); border: 1px solid var(--tlg-border); font-size: 12px; }
.nce-meter b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }

.nce-equation { margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: var(--tlg-surface); border: 1px dashed var(--tlg-border-strong); font-family: 'Atkinson Hyperlegible', monospace; font-size: 14px; letter-spacing: .02em; min-height: 1.4em; }
.nce-equation[hidden] { display: none; }
.nce-label-tag { position: absolute; transform: translate(-50%, -140%); padding: 1px 6px; border-radius: 6px; background: rgba(15,23,42,.85); color: #fff; font-size: 10.5px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.nce-explain { margin: 8px 0; padding: 9px 12px; border-radius: 12px; background: var(--tlg-chip-bg); color: var(--tlg-muted); font-size: 13px; }
.nce-explain[hidden] { display: none; }

/* ── CFU cards ────────────────────────────────────────────────────────── */
.nce-cfu { margin: 14px 0; padding: 14px; border-radius: 14px; background: var(--tlg-surface); border: 1px solid var(--tlg-border); }
.nce-cfu-prompt { margin: 0 0 10px; font-weight: 700; font-size: 14px; }
.nce-cfu-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.nce-cfu-choice { min-height: 40px; padding: 0 14px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-size: 13.5px; cursor: pointer; }
.nce-cfu-choice:disabled { cursor: default; }
.nce-cfu-choice.is-right { border-color: #16a34a; background: #dcfce7; color: #14532d; }
.nce-cfu-choice.is-wrong { border-color: #dc2626; background: #fee2e2; color: #7f1d1d; }
.nce-cfu-feedback { margin: 10px 0 0; font-size: 13.5px; font-weight: 700; }
.nce-cfu-feedback[hidden] { display: none; }
.nce-why-btn { margin-left: 6px; border: none; background: none; color: var(--nce-link); font: inherit; font-size: 12.5px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.nce-why { margin: 6px 0 0; font-size: 13px; color: var(--tlg-muted); }
.nce-why[hidden] { display: none; }

/* ── Hint offer ───────────────────────────────────────────────────────── */
.nce-hint-offer { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: var(--tlg-chip-bg); font-size: 13px; }
.nce-hint-offer-btn { min-height: 32px; padding: 0 10px; border: none; border-radius: var(--tlg-radius-pill); background: var(--tlg-chemistry); color: #fff; font: inherit; font-weight: 700; font-size: 12px; cursor: pointer; }

/* ── Section-complete screen ─────────────────────────────────────────── */
.nce-complete { padding: 20px; border-radius: var(--tlg-radius-card); background: var(--tlg-surface); border: 1px solid var(--tlg-border); text-align: center; }
.nce-complete-bullets { list-style: none; margin: 14px 0; padding: 0; text-align: left; max-width: 46ch; margin-left: auto; margin-right: auto; }
.nce-complete-bullets li { padding: 6px 0 6px 22px; position: relative; font-size: 14px; }
.nce-complete-bullets li::before { content: '\2713'; position: absolute; left: 0; color: #16a34a; font-weight: 900; }
.nce-more-btn { display: block; margin: 4px auto 0; border: none; background: none; color: var(--nce-link); font: inherit; font-weight: 700; font-size: 13px; text-decoration: underline; cursor: pointer; }
.nce-more-detail { max-width: 50ch; margin: 8px auto 0; color: var(--tlg-muted); font-size: 13.5px; text-align: left; }
.nce-more-detail[hidden] { display: none; }
.nce-back-home { display: flex; margin: 16px auto 0; }

/* ── My Observations drawer (Radiation Lab) ──────────────────────────── */
.nce-obs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.nce-obs-table th, .nce-obs-table td { border: 1px solid var(--tlg-border); padding: 6px 8px; text-align: left; }
.nce-obs-table th { background: var(--tlg-chip-bg); }
.nce-obs-table td.is-empty { color: var(--tlg-muted); font-style: italic; }

/* ── Element Forge tray (Fusion Lab) ─────────────────────────────────── */
.nce-forge-trigger { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.nce-forge-badge { padding: 1px 7px; border-radius: var(--tlg-radius-pill); background: var(--tlg-chemistry); color: #fff; font-size: 11px; }
.nce-forge-tray[hidden] { display: none; }
.nce-forge-tray { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.nce-forge-item { padding: 6px 10px; border-radius: 10px; background: var(--tlg-surface); border: 1px solid var(--tlg-border); font-size: 12.5px; font-weight: 700; }
.nce-forge-item.is-wall { border-color: #b45309; background: #fdf5e6; color: #92400e; }

/* ── Test Mode ────────────────────────────────────────────────────────── */
.nce-test-picker { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.nce-test-picker button { flex: 1; min-width: 200px; padding: 20px; border: 2px solid var(--tlg-border); border-radius: var(--tlg-radius-card); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; text-align: left; cursor: pointer; }
.nce-test-picker button:hover { border-color: var(--tlg-chemistry); }
.nce-test-progress { height: 8px; border-radius: 999px; background: var(--tlg-chip-bg); overflow: hidden; margin-bottom: 16px; }
.nce-test-progress > span { display: block; height: 100%; background: var(--tlg-chemistry); }
.nce-test-q { padding: 18px; border-radius: var(--tlg-radius-card); background: var(--tlg-surface); border: 1px solid var(--tlg-border); }
.nce-test-q h3 { margin-top: 0; }
.nce-test-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.nce-test-choice { text-align: left; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--tlg-border-strong); border-radius: 12px; background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-size: 14px; cursor: pointer; }
.nce-test-choice[aria-pressed="true"] { border-color: var(--tlg-chemistry); background: var(--tlg-chemistry-tint); color: var(--tlg-chemistry-dark); }
.nce-test-match-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.nce-test-nav { display: flex; justify-content: space-between; margin-top: 16px; }
.nce-test-input { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--tlg-border-strong); border-radius: 10px; font: inherit; font-size: 14px; width: 100%; max-width: 240px; }
.nce-results-score { font-size: 40px; font-family: var(--tlg-font-heading); font-weight: 800; margin: 6px 0; }
.nce-breakdown-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.nce-breakdown-table th, .nce-breakdown-table td { border: 1px solid var(--tlg-border); padding: 6px 8px; text-align: left; }
.nce-cr-box { width: 100%; min-height: 90px; padding: 10px; border: 1.5px solid var(--tlg-border-strong); border-radius: 12px; font: inherit; font-size: 14px; resize: vertical; }

/* ── Lab 1: Nucleus Builder & Stability ───────────────────────────────── */
.nce-nuc-canvas-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; max-height: max(320px, min(56vh, 440px)); margin: 0 auto; }
.nce-nuc-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.nce-nuc-readout { text-align: center; margin: 6px 0; }
.nce-nuc-notation { font-family: var(--tlg-font-heading); font-size: 30px; font-weight: 800; line-height: 1; }
.nce-nuc-notation sup, .nce-nuc-notation sub { font-size: 15px; }
.nce-nuc-name { color: var(--tlg-muted); font-size: 14px; margin-top: 2px; }
.nce-nuc-stats { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.nce-nuc-stats b { display: block; font-variant-numeric: tabular-nums; font-size: 15px; }
.nce-nuc-builder-controls { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 12px 0; }
.nce-nuc-stepper { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.nce-nuc-stepper-label { font-weight: 700; font-size: 13px; }
.nce-nuc-stepper-row { display: flex; align-items: center; gap: 8px; }
.nce-nuc-step-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--tlg-chemistry); background: var(--tlg-chemistry); color: #fff; font-size: 20px; font-weight: 900; cursor: pointer; line-height: 1; }
.nce-nuc-step-btn:disabled { opacity: .4; cursor: not-allowed; }
.nce-nuc-step-btn--minus { background: transparent; color: var(--nce-link); }
.nce-nuc-step-count { min-width: 2.4em; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.nce-nuc-scale-label { position: absolute; bottom: 4px; left: 8px; font-size: 11px; color: var(--tlg-muted); }
.nce-nuc-chart-canvas-wrap, .nce-nuc-force-canvas-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; max-height: max(320px, min(56vh, 440px)); margin: 0 auto; }
.nce-nuc-chart-canvas-wrap canvas, .nce-nuc-force-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.nce-nuc-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; font-size: 12px; }
.nce-nuc-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.nce-nuc-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.nce-nuc-ratio { text-align: center; font-size: 13px; margin-top: 6px; font-weight: 700; }

/* ── Lab 2: Radioactive Decay & Nuclear Equations ────────────────────── */
.nce-decay-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.nce-decay-canvas-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; max-height: max(320px, min(56vh, 440px)); margin: 0 auto; }
.nce-decay-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.nce-property-card { margin: 10px auto 0; max-width: 420px; border-radius: var(--tlg-radius-card); border: 1px solid var(--tlg-border); background: var(--tlg-surface); padding: 12px 16px; }
.nce-property-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--tlg-border); font-size: 13.5px; }
.nce-property-row:last-child { border-bottom: none; }
.nce-property-row b { text-align: right; }
.nce-balancer-eq { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 14px 0; font-family: 'Atkinson Hyperlegible', monospace; font-size: 16px; }
.nce-balancer-slot { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 40px; padding: 0 10px; border: 2px dashed var(--tlg-border-strong); border-radius: 10px; background: var(--tlg-chip-bg); font-weight: 700; }
.nce-balancer-slot.is-filled { border-style: solid; border-color: var(--tlg-chemistry); background: var(--tlg-chemistry-tint); color: var(--tlg-chemistry-dark); cursor: pointer; }
.nce-balancer-slot.is-correct { border-color: #16a34a; background: #dcfce7; color: #14532d; }
.nce-balancer-slot.is-wrong { border-color: #dc2626; background: #fee2e2; color: #7f1d1d; }
.nce-balancer-choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.nce-balancer-chip { min-height: 40px; padding: 0 14px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-size: 13.5px; cursor: pointer; }
.nce-balancer-msg { text-align: center; font-size: 13px; font-weight: 700; margin-top: 8px; min-height: 1.4em; }
.nce-chain-track { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 12px 0; }
.nce-chain-node { padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--tlg-border-strong); background: var(--tlg-surface); font-size: 12.5px; font-weight: 700; text-align: center; }
.nce-chain-node.is-current { border-color: var(--tlg-chemistry); background: var(--tlg-chemistry-tint); color: var(--tlg-chemistry-dark); }
.nce-chain-node.is-done { opacity: .65; }
.nce-chain-arrow { font-size: 13px; color: var(--tlg-muted); }
.nce-tunnel-canvas-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; max-height: max(320px, min(56vh, 440px)); margin: 0 auto; }
.nce-tunnel-canvas-wrap canvas { width: 100%; height: 100%; display: block; }

/* ── Lab 3: Half-Life & Decay Kinetics ────────────────────────────────── */
.nce-hl-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.nce-hl-dots-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; max-height: max(320px, min(56vh, 440px)); margin: 0 auto; }
.nce-hl-dots-wrap canvas { width: 100%; height: 100%; display: block; }
.nce-hl-note { text-align: center; font-size: 11.5px; color: var(--tlg-muted); margin-top: 2px; }
.nce-hl-graph-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; max-height: max(320px, min(56vh, 440px)); margin: 10px auto 0; }
.nce-hl-graph-wrap canvas { width: 100%; height: 100%; display: block; }
.nce-hl-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.nce-hl-pair .nce-hl-graph-wrap { margin: 0; }
@media (min-width: 900px) { .nce-hl-pair { grid-template-columns: 1fr 1fr; } .nce-hl-pair > div { aspect-ratio: 4 / 3; max-height: 340px; } }
.nce-hl-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; font-size: 12px; }
.nce-hl-transport { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.nce-hl-table { width: 100%; max-width: 420px; margin: 12px auto; border-collapse: collapse; font-size: 13px; }
.nce-hl-table th, .nce-hl-table td { border: 1px solid var(--tlg-border); padding: 6px 8px; text-align: center; }
.nce-hl-table input { width: 70px; min-height: 34px; border: 1.5px solid var(--tlg-border-strong); border-radius: 8px; font: inherit; text-align: center; }
.nce-hl-table td.is-right { background: #dcfce7; }
.nce-hl-table td.is-wrong { background: #fee2e2; }
.nce-hl-calc { max-width: 420px; margin: 12px auto; padding: 14px; border-radius: var(--tlg-radius-card); border: 1px solid var(--tlg-border); background: var(--tlg-surface); }
.nce-hl-calc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; font-size: 13.5px; }
.nce-hl-calc input { width: 110px; min-height: 36px; border: 1.5px solid var(--tlg-border-strong); border-radius: 8px; font: inherit; text-align: center; }

/* ── Lab 4: Mass Defect & Binding Energy ──────────────────────────────── */
.nce-bind-picker { display: flex; justify-content: center; margin-bottom: 10px; }
.nce-bind-picker select { min-height: 40px; border-radius: var(--tlg-radius-pill); border: 1.5px solid var(--tlg-border-strong); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; padding: 0 14px; }
.nce-bind-scale-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; max-height: max(320px, min(56vh, 440px)); margin: 0 auto; }
.nce-bind-scale-wrap canvas { width: 100%; height: 100%; display: block; }
.nce-bind-readout { max-width: 420px; margin: 10px auto 0; border-radius: var(--tlg-radius-card); border: 1px solid var(--tlg-border); background: var(--tlg-surface); padding: 12px 16px; }
.nce-bind-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--tlg-border); font-size: 13.5px; }
.nce-bind-row:last-child { border-bottom: none; }
.nce-bind-row.is-highlight { font-weight: 800; }
.nce-bind-curve-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; max-height: max(320px, min(56vh, 440px)); margin: 0 auto; }
.nce-bind-curve-wrap canvas { width: 100%; height: 100%; display: block; }

/* ── Tap-to-define tooltip term ──────────────────────────────────────── */
.nce-term { border: none; background: none; padding: 0; margin: 0; font: inherit; color: var(--nce-link); font-weight: 700; text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; }
.nce-term-pop { position: fixed; z-index: 60; max-width: 260px; padding: 8px 12px; border-radius: 10px; background: rgba(15,23,42,.95); color: #fff; font-size: 12.5px; line-height: 1.4; box-shadow: var(--tlg-shadow-card); }

/* ── Course-level gate + toolbar switcher ────────────────────────────── */
.nce-course-btn { display: inline-flex; align-items: center; gap: 7px; min-height: var(--tlg-tap); padding: 0 14px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.nce-course-btn:hover { background: var(--tlg-chip-bg); }
.nce-course-btn svg { width: 18px; height: 18px; flex: none; }
.nce-gate { max-width: 560px; margin: 40px auto; text-align: center; }
.nce-gate h1 { margin-bottom: 4px; }
.nce-gate-sub { color: var(--tlg-muted); margin: 0 0 20px; }
.nce-gate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; text-align: left; }
.nce-gate-card { padding: 16px; border: 2px solid var(--tlg-border); border-radius: var(--tlg-radius-card); background: var(--tlg-surface); color: var(--tlg-ink); text-align: left; cursor: pointer; font: inherit; }
.nce-gate-card:hover { border-color: var(--tlg-chemistry); }
.nce-gate-card-title { display: block; font-family: var(--tlg-font-heading); font-size: 16px; font-weight: 800; }
.nce-gate-card-desc { display: block; margin-top: 3px; color: var(--tlg-muted); font-size: 13px; }
.nce-course-panel-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.nce-course-panel-row + .nce-course-panel-row { border-top: 1px solid var(--tlg-border); }

/* ── "Recommended for your course" tag on home-screen lab cards ─────── */
.nce-rec-tag { position: absolute; bottom: 12px; left: 16px; padding: 2px 9px; border-radius: var(--tlg-radius-pill); background: var(--tlg-chemistry-tint); color: var(--tlg-chemistry-dark); font-size: 11px; font-weight: 800; }
.nce-opt-tag { position: absolute; bottom: 12px; left: 16px; padding: 2px 9px; border-radius: var(--tlg-radius-pill); background: var(--tlg-chip-bg); color: var(--tlg-muted); font-size: 11px; font-weight: 700; }

/* ── Shared engine widgets (nuclear-chem-widgets.js) ────────────────── */
.nce-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nce-time { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 8px 0; }
.nce-time-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.nce-time-btn:disabled { opacity: .45; cursor: not-allowed; }
.nce-time-speeds { display: inline-flex; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); overflow: hidden; }
.nce-time-speed { min-height: 33px; min-width: 44px; padding: 0 9px; border: none; border-right: 1px solid var(--tlg-border); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-weight: 700; font-size: 12px; cursor: pointer; }
.nce-time-speed:last-child { border-right: none; }
.nce-time-speed[aria-checked="true"] { background: var(--tlg-chemistry); color: #fff; }
.nce-model-notes { margin: 8px 0; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--tlg-border-strong); background: var(--tlg-surface); font-size: 12.5px; color: var(--tlg-muted); }
.nce-model-notes[hidden] { display: none; }
.nce-model-notes-title { display: block; font-weight: 800; color: var(--tlg-ink); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.nce-model-notes ul { margin: 0; padding-left: 18px; }
.nce-model-notes li { margin: 2px 0; }
.nce-stopwatch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.nce-stopwatch-val { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 9em; }
.nce-story { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.nce-story-label { font-size: 13px; font-weight: 700; min-width: 12em; text-align: center; }
.nce-predict-tag { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: var(--tlg-radius-pill); background: var(--tlg-chemistry); color: #fff; font-size: 11px; font-weight: 800; vertical-align: 1px; }
.nce-cfu-choice.is-picked { border-color: var(--tlg-chemistry); }
.nce-zoom { margin: 12px 0; }
.nce-zoom-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.nce-zoom-facts { font-size: 13px; color: var(--tlg-muted); margin: 6px 0 0; }
.nce-id-pop { pointer-events: none; }
.nce-inspect { margin: 6px 0; font-size: 13px; }
.nce-inspect summary { cursor: pointer; color: var(--nce-link); font-weight: 700; }
.nce-inspect-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nce-controls-drawer-trigger { margin-top: 4px; }

/* ── Lab 6 (visual upgrade) ───────────────────────────────────────── */
.nce-src-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.nce-stage--flush { padding: 0; min-height: 0; overflow: hidden; }
.nce-stage--flush > canvas { border-radius: var(--tlg-radius-card); }
.nce-tabs--sm .nce-tab { min-height: 36px; font-size: 12.5px; }
.nce-tabs--sm { justify-content: center; }
.nce-readout { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 0 0 10px; }
.nce-slab-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 0 0 10px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid #facc15; background: var(--tlg-surface); }
.nce-slab-ctl[hidden] { display: none; }
.nce-slab-ctl-name { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; margin-right: 6px; }
.nce-slab-ctl-sub { color: var(--tlg-muted); font-size: 12px; }
.nce-slab-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--tlg-border-strong); display: inline-block; }
.nce-ctl-label { margin: 10px 0 6px; font-size: 12.5px; font-weight: 700; color: var(--tlg-muted); }
.nce-ctl-row { display: flex; flex-wrap: wrap; gap: 6px; }
.nce-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 6px 10px 0 0; }
.nce-sub-h { margin: 20px 0 4px; font-size: 16px; }
.nce-sub-p { margin: 0 0 10px; font-size: 13.5px; color: var(--tlg-muted); }
.nce-inset-canvas { display: block; width: 100%; aspect-ratio: 3 / 1; min-height: 180px; }
.nce-dose-bar { flex-basis: 100%; height: 8px; border-radius: 999px; background: var(--tlg-chip-bg); overflow: hidden; max-width: 520px; }
.nce-dose-bar > span { display: block; height: 100%; }
.nce-sh-hint { border-color: #facc15; }

/* ── Test Mode hint ── */
.nce-test-hint { margin: 4px 0 0; font-size: 12px; color: #b45309; }

/* ── Lab 1 (visual upgrade) ───────────────────────────────────────── */
.nce-nuc-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 900px) { .nce-nuc-main { grid-template-columns: minmax(0, 1fr) 270px; align-items: start; } }
.nce-nuc-stagewrap { position: relative; margin-bottom: 4px; }
.nce-nuc-event { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; max-height: none; background: var(--tlg-chip-bg); }
.nce-nuc-hint { margin: 2px 0 0; font-size: 12px; color: var(--tlg-muted); text-align: center; }
.nce-nuc-side { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--tlg-radius-card); border: 1px solid var(--tlg-border); background: var(--tlg-surface); }
.nce-nuc-side .nce-nuc-readout { margin: 0; }
.nce-nuc-side .nce-nuc-builder-controls { margin: 0; gap: 12px; }
.nce-nuc-side .nce-btn { width: 100%; }
.nce-nuc-path { margin: 0; font-size: 12.5px; color: var(--tlg-muted); }
.nce-src-tag { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: var(--tlg-radius-pill); background: #dcfce7; color: #14532d; font-size: 11px; font-weight: 800; }
.nce-src-tag.is-model { background: #fef3c7; color: #92400e; }
.nce-badge-sub { margin-top: 4px; font-size: 12px; color: var(--tlg-muted); }
.nce-drawer-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.nce-chart-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; color: var(--tlg-muted); }
.nce-chart-zoom { display: inline-flex; gap: 6px; }
.nce-chart-wrap { position: relative; }
.nce-chart-pop { position: absolute; z-index: 5; width: 250px; padding: 8px 10px; border-radius: 10px; background: var(--tlg-surface); border: 1px solid var(--tlg-border-strong); box-shadow: var(--tlg-shadow-card); font-size: 12.5px; color: var(--tlg-ink); }

/* ── Lab 2 (visual upgrade) ───────────────────────────────────────── */
.nce-eq-term { font-weight: 700; }
.nce-balancer-chip { touch-action: none; user-select: none; font-size: 15px; }
.nce-balancer-chip.is-dragging { opacity: .35; }
.nce-balancer-slot.is-over { border-color: var(--tlg-chemistry); background: var(--tlg-chemistry-tint); }
.nce-drag-ghost { position: fixed; z-index: 80; transform: translate(-50%, -50%); pointer-events: none; padding: 8px 14px; border-radius: var(--tlg-radius-pill); background: var(--tlg-chemistry); color: #fff; font-weight: 700; font-size: 15px; box-shadow: var(--tlg-shadow-card); }
.nce-bal-scale { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; color: var(--tlg-ink); margin: 6px 0; }

/* ── Reduce Motion: strip transitions/animations sim-wide ───────────── */
.nce-app.nce-reduce-motion *, .nce-app.nce-reduce-motion *::before, .nce-app.nce-reduce-motion *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
@media (prefers-reduced-motion: reduce) { .nce-app * { transition-duration: .001ms !important; animation-duration: .001ms !important; } }

@media (max-width: 640px) {
  .nce-obj-banner { min-width: 0; }
  .nce-test-picker button { min-width: 0; }
}

/* ── Isotopes & Mass Spectrometry (Explore station, nuclear-chem-lab-massspec.js) — 15px minimum ── */
.ncms-explore-tag { position: absolute; bottom: 12px; left: 16px; padding: 2px 9px; border-radius: var(--tlg-radius-pill); border: 1.5px dashed var(--tlg-border-strong); color: var(--tlg-muted); font-size: 12px; font-weight: 800; }
.ncms-explore-tag--head { position: static; font-size: 15px; padding: 4px 12px; }
.ncms-root { font-size: 15px; }
.ncms-root .nce-section-title { font-size: 22px; }
.ncms-root .nce-back-btn, .ncms-root .nce-tab, .ncms-root .nce-btn, .ncms-root .nce-forge-trigger, .ncms-root .nce-check,
.ncms-root .nce-cfu-choice, .ncms-root .nce-time-btn, .ncms-root .nce-time-speed, .ncms-root .nce-slider-row label,
.ncms-root .nce-slider-val, .ncms-root .nce-model-notes, .ncms-root .nce-model-notes-title, .ncms-root .nce-obs-table { font-size: 15px; }
.ncms-root .nce-tab, .ncms-root .nce-forge-trigger, .ncms-root .nce-cfu-choice { min-height: 44px; }
.ncms-root .nce-stage { min-height: 0; padding: 10px; }
.ncms-lede { margin: 0 0 10px; line-height: 1.5; }
.ncms-toprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.ncms-practice { text-decoration: none; }
.ncms-panel { line-height: 1.5; }
.ncms-h3 { margin: 0 0 8px; font-size: 18px; }
.ncms-list { margin: 0 0 10px; padding-left: 20px; }
.ncms-list li { margin: 4px 0; }
.ncms-note { margin: 6px 0; color: var(--tlg-muted); font-size: 15px; line-height: 1.45; }
.ncms-tabs { margin-top: 4px; }
.ncms-pane[hidden] { display: none; }
.ncms-canvas { display: block; width: 100%; border-radius: 12px; touch-action: pan-y; }
.ncms-canvas--hero { height: clamp(400px, 60vh, 480px); }
.ncms-canvas--nuc { height: 340px; }
.ncms-canvas--spec { height: 300px; }
.ncms-canvas--bal { height: 340px; }
.ncms-app canvas.nce-touch-none, .ncms-root canvas.nce-touch-none { touch-action: none; }
.ncms-build { display: grid; gap: 14px; align-items: start; }
@media (min-width: 760px) { .ncms-build { grid-template-columns: minmax(0, 1fr) 290px; } }
.ncms-side { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--tlg-radius-card); border: 1px solid var(--tlg-border); background: var(--tlg-surface); }
.ncms-field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.ncms-field select, .ncms-input { min-height: 44px; padding: 0 10px; border: 1.5px solid var(--tlg-border-strong); border-radius: 10px; background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-size: 15px; }
.ncms-field--inline { flex-direction: row; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.ncms-field--inline select { min-width: 0; max-width: 100%; }
.ncms-input { width: 9em; }
.ncms-azx-wrap { display: flex; align-items: center; gap: 12px; }
.ncms-azx { display: inline-flex; align-items: center; font-family: var(--tlg-font-heading); font-size: 46px; font-weight: 800; line-height: 1; }
.ncms-azx-n { display: inline-flex; flex-direction: column; align-items: flex-end; margin-right: 3px; font-size: 20px; line-height: 1.1; }
.ncms-isoname { font-size: 18px; font-weight: 700; }
.ncms-stats { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.ncms-stats span { color: var(--tlg-muted); }
.ncms-stats b { color: var(--tlg-ink); margin-left: 4px; }
.ncms-stepper { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.ncms-stepper b { min-width: 2.2em; text-align: center; font-size: 20px; font-variant-numeric: tabular-nums; }
.ncms-step { min-width: 48px; padding: 0; font-size: 22px; }
.ncms-stab { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ncms-badge { display: inline-block; padding: 4px 12px; border-radius: var(--tlg-radius-pill); border: 2px solid var(--tlg-border-strong); font-weight: 800; }
.ncms-badge.is-stable { border-color: #16a34a; color: #15803d; }
.ncms-badge.is-rad { border-color: #d97706; color: #b45309; }
.ncms-badge.is-none { border-color: #94a3b8; color: var(--tlg-muted); }
.ncms-badge-sub { color: var(--tlg-muted); }
.ncms-natural { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.ncms-natural-title { font-weight: 700; }
.ncms-chip { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--tlg-border-strong); border-radius: var(--tlg-radius-pill); background: var(--tlg-surface); color: var(--tlg-ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.ncms-chip.is-on { border-color: var(--tlg-chemistry); background: var(--tlg-chemistry-tint); color: var(--tlg-chemistry-dark); }
.ncms-specbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ncms-runbtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.ncms-kbd { margin-left: 4px; padding: 0 6px; border-radius: 6px; background: rgba(255,255,255,.22); font-size: 15px; font-weight: 600; }
.ncms-caption { min-height: 2.9em; margin: 4px 0 6px; padding: 8px 12px; border-radius: 12px; background: var(--tlg-chemistry-tint); color: var(--tlg-chemistry-dark); font-weight: 700; line-height: 1.4; }
.ncms-general { margin: 0 0 12px; line-height: 1.5; }
.ncms-specgrid { display: grid; gap: 14px; align-items: start; }
@media (min-width: 760px) { .ncms-specgrid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.ncms-counts { padding: 12px 14px; border-radius: var(--tlg-radius-card); border: 1px solid var(--tlg-border); background: var(--tlg-surface); }
.ncms-countlist { list-style: none; margin: 0 0 6px; padding: 0; }
.ncms-countlist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--tlg-border); }
.ncms-countnum { margin-left: auto; font-variant-numeric: tabular-nums; }
.ncms-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.ncms-seed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ncms-seed label { font-weight: 700; }
.ncms-formula { margin: 0 0 8px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--tlg-border-strong); background: var(--tlg-chip-bg); font-size: 18px; }
.ncms-root .nce-slider-row { max-width: none; margin: 8px 0; }
.ncms-tablewrap { overflow-x: auto; margin: 8px 0; }
.ncms-table td, .ncms-table th { font-variant-numeric: tabular-nums; }
.ncms-sumrow td { font-weight: 800; }
.ncms-flag { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: var(--tlg-radius-pill); background: #fef3c7; color: #92400e; font-weight: 800; }
.ncms-flagline { margin: 10px 0 6px; }
.ncms-baltitle { font-weight: 700; }
.ncms-src { margin: 0; }
.ncms-balstate { margin: 6px 0; font-size: 17px; }
.ncms-compare { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.ncms-cmp { display: flex; flex-direction: column; min-width: 150px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--tlg-border); background: var(--tlg-surface); }
.ncms-cmp b { font-size: 24px; font-variant-numeric: tabular-nums; }
.ncms-cmp small { color: var(--tlg-muted); font-size: 15px; }
.ncms-cmp.is-pt { border-color: var(--tlg-chemistry); }
.ncms-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ncms-answer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.ncms-feedback { min-height: 1.4em; font-weight: 700; line-height: 1.45; }
.ncms-feedback.is-right { color: #15803d; }
.ncms-feedback.is-wrong { color: #b91c1c; }
html[data-theme="dark"] .ncms-feedback.is-right { color: #86efac; }
html[data-theme="dark"] .ncms-feedback.is-wrong { color: #fca5a5; }
html[data-theme="dark"] .ncms-badge.is-stable { color: #86efac; }
html[data-theme="dark"] .ncms-badge.is-rad { color: #fcd34d; }
html[data-theme="dark"] .ncms-flag { background: #422006; color: #fde68a; }
.ncms-root kbd { padding: 1px 6px; border: 1px solid var(--tlg-border-strong); border-radius: 6px; font: inherit; font-size: 15px; }
@media (max-width: 640px) { .ncms-canvas--hero { height: 420px; } .ncms-canvas--bal { height: 360px; } }
