/* ==========================================================================
   components.css — the doPhysics component library + the theme system.
   Loads AFTER ui.css and only adds: theme/accent/type overrides, the library
   page chrome, and the 29 learning components.
   ========================================================================== */

/* ---------- THEME TOKENS (all light) ---------- */
:root {
  --accent-rgb: 37, 99, 235; --accent2-rgb: 124, 58, 237;
  --accent-soft: rgba(var(--accent-rgb), .08); --accent-soft-2: rgba(var(--accent-rgb), .16);
  --sh-3: 0 30px 70px -30px rgba(var(--accent-rgb), .35);
}
html[data-theme="snow"]  { --paper:#FFFFFF; --paper-2:#F3F4F6; --card:#FFFFFF; --ink:#111827; --ink-2:#4B5563; --ink-3:#9CA3AF; --line:rgba(17,24,39,.09); --line-2:rgba(17,24,39,.16); }
html[data-theme="sepia"] { --paper:#F6EFE3; --paper-2:#ECE2D0; --card:#FDF9F1; --ink:#2B2118; --ink-2:#5E4F40; --ink-3:#9A8A78; --line:rgba(43,33,24,.12); --line-2:rgba(43,33,24,.22); }
html[data-theme="mist"]  { --paper:#F3F6FA; --paper-2:#E6EBF2; --card:#FFFFFF; --ink:#0F1A2B; --ink-2:#465468; --ink-3:#8A97AB; --line:rgba(15,26,43,.10); --line-2:rgba(15,26,43,.18); }
html[data-theme="snow"] .ground, html[data-theme="mist"] .ground { background-size: 32px 32px; }
html[data-theme="sepia"] .ground { background-image: none; }
html[data-theme="sepia"] .ground::after { background: radial-gradient(70vw 50vh at 50% -10%, rgba(180,120,60,.10), transparent 60%); }

html[data-accent="blue"]    { --accent:#2563EB; --accent-2:#7C3AED; --accent-rgb:37,99,235;  --accent2-rgb:124,58,237; }
html[data-accent="violet"]  { --accent:#7C3AED; --accent-2:#DB2777; --accent-rgb:124,58,237; --accent2-rgb:219,39,119; }
html[data-accent="green"]   { --accent:#059669; --accent-2:#0891B2; --accent-rgb:5,150,105;  --accent2-rgb:8,145,178; }
html[data-accent="crimson"] { --accent:#D0021B; --accent-2:#EA580C; --accent-rgb:208,2,27;   --accent2-rgb:234,88,12; }
html[data-accent="teal"]    { --accent:#0D9488; --accent-2:#2563EB; --accent-rgb:13,148,136; --accent2-rgb:37,99,235; }

html[data-type="sans"] { --f-display: "Inter", system-ui, sans-serif; --f-body: "Inter", system-ui, sans-serif; --fs: 16.5px; --lh: 1.6; }
html[data-type="sans"] .hero h1, html[data-type="sans"] .comp__h h3, html[data-type="sans"] .cgroup > h2 { letter-spacing: -.03em; font-weight: 700; }

html[data-radius="sharp"] { --r-sm: 4px; --r: 6px; --r-lg: 8px; --r-xl: 10px; }

/* the accent-literal rules in ui.css, re-expressed on the token */
.readline i, .btn--accent, .barrow .fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.check::before { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.concept-section strong { background: linear-gradient(transparent 62%, rgba(var(--accent-rgb), .16) 62%); }

/* ---------- LIBRARY PAGE CHROME ---------- */
.cbar {
  position: sticky; top: 0; z-index: 40; font-family: var(--f-ui);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px var(--gutter); background: rgba(255,255,255,.55); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
html[data-theme="sepia"] .cbar { background: rgba(246,239,227,.7); }
.cbar__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-right: auto; }
.cbar__brand .bolt { width: 20px; height: 20px; fill: var(--brand); }
.cbar__brand small { font-weight: 500; color: var(--ink-3); }
.ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { font-family: var(--f-ui); font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px; color: var(--ink-2); text-transform: none; letter-spacing: 0; transition: .2s; }
.seg button.is-on { background: var(--card); color: var(--ink); box-shadow: var(--sh-1); }
.dots { display: inline-flex; gap: 6px; }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; background: var(--c); box-shadow: inset 0 0 0 2px var(--card); transition: transform .15s; }
.dot.is-on { border-color: var(--ink); transform: scale(1.1); }

.cshell { display: block; }
.cnav { display: none; }
.cmain { padding: 10px var(--gutter) 80px; max-width: 860px; margin: 0 auto; }
.cintro { padding: 28px 0 8px; }
.cintro h1 { font-family: var(--f-display); font-variation-settings: "opsz" 144; font-weight: 600; font-size: clamp(32px, 7vw, 48px); letter-spacing: -.025em; line-height: 1.05; margin: 0 0 10px; }
.cintro h1 em { font-style: italic; font-weight: 400; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cintro p { color: var(--ink-2); margin: 0; font-size: 17px; max-width: 60ch; }
.cchips { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0 6px; scrollbar-width: none; font-family: var(--f-ui); }
.cchips::-webkit-scrollbar { display: none; }
.cchips a { flex: none; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.cgroup { margin-top: 34px; }
.cgroup > h2 { font-family: var(--f-display); font-variation-settings: "opsz" 72; font-weight: 600; font-size: 26px; letter-spacing: -.02em; margin: 0 0 4px; display: flex; align-items: baseline; gap: 10px; }
.cgroup > h2 small { font-family: var(--f-ui); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.cgroup > p { font-family: var(--f-ui); color: var(--ink-3); font-size: 13.5px; margin: 0 0 16px; }

.comp { margin: 0 0 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; scroll-margin-top: 70px; }
.comp__h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); font-family: var(--f-ui); }
.comp__n { font-family: var(--f-display); font-weight: 600; font-size: 13px; color: var(--accent); width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); }
.comp__h h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 18px; letter-spacing: -.015em; }
.comp__h code { width: 100%; font: 11.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-3); background: var(--paper-2); padding: 5px 8px; border-radius: 6px; overflow-wrap: anywhere; }
@media (min-width: 720px) { .comp__h code { width: auto; margin-left: auto; white-space: nowrap; line-height: 1; } }
.comp__demo { padding: 18px 16px 8px; }
.comp__demo > :last-child { margin-bottom: 10px; }
.comp__note { padding: 10px 16px 12px; border-top: 1px dashed var(--line); font-family: var(--f-ui); font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.5; }
.comp__note b { color: var(--ink); font-weight: 600; }
.demo-p { margin: 0 0 12px; }

/* ---------- 03 STATEMENT ---------- */
.statement { position: relative; margin: 14px 0 18px; padding: 16px 18px 14px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.statement::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); }
.statement__k { font-family: var(--f-ui); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: flex; gap: 8px; align-items: center; }
.statement__k i { font-style: normal; color: var(--ink-3); font-weight: 600; letter-spacing: .04em; }
.statement__t { font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: -.015em; margin: 4px 0 6px; }
.statement__b { margin: 0; font-size: 1.02em; }
.statement--law::before, .statement--theorem::before { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.statement--theorem { background: linear-gradient(135deg, var(--card), var(--accent-soft)); }
.statement__b .qed { float: right; color: var(--ink-3); }

/* ---------- 04 FORMULA CARD ---------- */
.formula { margin: 14px 0 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--sh-1); overflow: hidden; }
.formula__top { display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; font-family: var(--f-ui); }
.formula__lab { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.formula__name { font-weight: 600; font-size: 14px; }
.pin { margin-left: auto; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; color: var(--ink-3); transition: .2s; }
.pin svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pin:hover { background: var(--accent-soft); color: var(--accent); }
.pin.is-on { color: #B45309; }
.pin.is-on svg { fill: #F59E0B; stroke: #B45309; }
.formula__tex { text-align: center; padding: 6px 14px 4px; font-size: 1.15em; }
.formula__tex mjx-container { font-size: 125% !important; margin: 8px 0 !important; }
.formula__grid { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.formula__cell { background: var(--paper); padding: 10px 14px; font-family: var(--f-ui); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.formula__cell b { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.formula__cell mjx-container { font-size: 100% !important; }
@media (min-width: 720px) { .formula__grid { grid-template-columns: 1.1fr 1.4fr .8fr; } }

/* ---------- 05 DERIVATION ---------- */
.deriv { margin: 14px 0 18px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.deriv__h { padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--line); font-family: var(--f-ui); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.deriv__h small { margin-left: auto; color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.dstep { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); animation: rise .35s both; }
.dstep:first-of-type { border-top: 0; }
.dstep__n { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--ink); color: #fff; font-family: var(--f-ui); font-size: 12px; font-weight: 700; }
.dstep__m { margin: 0; overflow-x: auto; overflow-y: hidden; }   /* a wide equation scrolls inside its step on a phone; the column never grows past the card (u11c02, 2026-09-24) */
.dstep__why { margin: 4px 0 0; font-family: var(--f-ui); font-size: 13px; color: var(--ink-2); }
.dstep__why b { color: var(--accent); font-weight: 700; }
.dstep.is-goal .dstep__n { background: var(--accent); }
.deriv__foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: space-between; align-items: center; font-family: var(--f-ui); }
.btn--sm { padding: 8px 14px; font-size: 13.5px; }

/* ---------- 06 CALLOUTS ---------- */
.callout { display: grid; grid-template-columns: 36px 1fr; gap: 12px; margin: 14px 0; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--co-line); background: var(--co-bg); }
.callout__i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--co-ink); color: #fff; }
.callout__i svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.callout__k { font-family: var(--f-ui); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--co-ink); margin-bottom: 3px; }
.callout p { margin: 0; font-size: .98em; }
.callout--intuition { --co-ink: #0E7490; --co-bg: rgba(14,116,144,.07); --co-line: rgba(14,116,144,.22); }
.callout--caution   { --co-ink: #B45309; --co-bg: rgba(180,83,9,.07);   --co-line: rgba(180,83,9,.25); }
.callout--deeper    { --co-ink: #6D28D9; --co-bg: rgba(109,40,217,.06); --co-line: rgba(109,40,217,.22); }

/* ---------- 07 COMPARISON ---------- */
.cmp { margin: 14px 0 18px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; font-family: var(--f-ui); }
.cmp__row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--line); }
.cmp__row > div { background: var(--card); padding: 10px 12px; font-size: 13.5px; line-height: 1.45; }
.cmp__row > div:first-child { background: var(--paper); color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.cmp__head > div { background: var(--ink) !important; color: #fff; font-weight: 700; font-size: 13px; }
/* every column heading of every table is the same white (owner, 2026-09-28) */
.cmp__head > div:first-child { background: var(--ink) !important; color: #fff; }
.cmp__row .yes { color: var(--good); font-weight: 700; } .cmp__row .no { color: #B45309; font-weight: 700; }

/* ---------- 08 GLOSSARY ---------- */
.term { position: relative; border-bottom: 2px dotted var(--accent); cursor: pointer; color: inherit; font: inherit; padding: 0; }
.term.is-open { background: var(--accent-soft); }
.termpop { position: absolute; z-index: 30; left: 0; top: calc(100% + 8px); width: min(300px, 80vw); background: var(--ink); color: #fff; font-family: var(--f-ui); font-size: 13.5px; line-height: 1.5; padding: 12px 14px; border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); animation: rise .2s both; text-align: left; font-weight: 400; }
.termpop b { display: block; color: rgba(255,255,255,.6); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.termpop::before { content: ""; position: absolute; top: -6px; left: 18px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--ink); }

/* ---------- 09 STATIC FIGURE (inline) ---------- */
.fig--inline .fig__plate svg { display: block; width: 100%; height: auto; }
.fig--inline text { font-family: 'Bookman Old Style', Bookman, Georgia, serif; }

/* ---------- 11 SIMULATION ---------- */
.sim { margin: 14px 0 18px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); box-shadow: var(--sh-1); }
.sim__plot { padding: 10px 10px 0; }
.sim__plot svg { width: 100%; height: auto; display: block; }
.sim__ctl { display: grid; gap: 10px; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: var(--paper); font-family: var(--f-ui); }
.slider { display: grid; grid-template-columns: 128px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.slider label { font-weight: 600; color: var(--ink-2); }
.slider output { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.slider input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; }
.slider input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }
.slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.slider input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.slider input[type=range]::-moz-range-track { height: 4px; background: var(--line-2); }
.sim__read { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.sim__read b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ax { stroke: var(--ink); stroke-width: 1.4; }
.grid { stroke: var(--line); stroke-width: 1; }
.lab { font-family: var(--f-ui); font-size: 11px; fill: var(--ink-3); }
.lab--axis { fill: var(--ink); font-weight: 600; font-size: 12px; }
.cv { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.cv--v { stroke: var(--vel); } .cv--x { stroke: var(--dis); } .cv--a { stroke: var(--acc); }

/* ---------- 12 GRAPH PROBE ---------- */
.probe { margin: 14px 0 18px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); box-shadow: var(--sh-1); touch-action: none; }
.probe svg { width: 100%; height: auto; display: block; cursor: ew-resize; }
.probe__read { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
@media (min-width: 720px) { .probe__read { grid-template-columns: repeat(4, 1fr); } .probe--signed .probe__read { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 719px) { .probe--signed .probe__read .c-t { grid-column: 1 / -1; } }
.area.area--neg { fill: var(--warn); opacity: .2; } .probe__read .c-d b { color: var(--warn); }
.probe__read div { background: var(--paper); padding: 10px 12px; font-family: var(--f-ui); font-size: 12px; color: var(--ink-3); }
.probe__read b { display: block; font-family: var(--f-display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.probe__read .c-v b { color: var(--vel); } .probe__read .c-a b { color: var(--acc); } .probe__read .c-s b { color: var(--dis); }
.area { fill: var(--dis); opacity: .14; }
.cursor { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 4; }
.tangent { stroke: var(--acc); stroke-width: 2; stroke-dasharray: 6 4; }
.knob { fill: #fff; stroke: var(--ink); stroke-width: 2; }

/* ---------- 13 3-D placeholder ---------- */
.three { margin: 14px 0 18px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(160deg, var(--card), var(--accent-soft)); position: relative; }
.three svg { width: 100%; height: auto; display: block; }
.three__tag { position: absolute; left: 12px; top: 12px; font-family: var(--f-ui); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 5px 9px; border-radius: 8px; background: var(--ink); color: #fff; }
.three__orbit { position: absolute; right: 12px; bottom: 12px; font-family: var(--f-ui); font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--card); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }

/* ---------- 14 PREDICT-THEN-PLAY ---------- */
.predict { margin: 14px 0 18px; }
.predict .fig { margin-top: 12px; }
.predict .fig.is-locked .fig__plate::after { content: "Predict first, then watch"; position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding-top: 64px; font-family: var(--f-ui); font-weight: 700; font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
/* a hand pointing up at the question above: the prediction is made there (owner, 2026-09-28). Lucide "pointer" (ISC), drawn as a mask so it takes the accent */
.predict .fig.is-locked .fig__plate::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: 2; width: 40px; height: 40px; margin: -42px 0 0 -20px; background: var(--accent); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 14a8 8 0 0 1-8 8'/%3E%3Cpath d='M18 11v-1a2 2 0 0 0-2-2a2 2 0 0 0-2 2'/%3E%3Cpath d='M14 10V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1'/%3E%3Cpath d='M10 9.5V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v10'/%3E%3Cpath d='M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 14a8 8 0 0 1-8 8'/%3E%3Cpath d='M18 11v-1a2 2 0 0 0-2-2a2 2 0 0 0-2 2'/%3E%3Cpath d='M14 10V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1'/%3E%3Cpath d='M10 9.5V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v10'/%3E%3Cpath d='M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: predict-point 1.6s ease-in-out infinite; }
@keyframes predict-point { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .predict .fig.is-locked .fig__plate::before { animation: none; } }
.predict .fig.is-locked .fig__dock { display: none; }
.predict .check { margin: 0; }
.predict .check::before { background: var(--warn); }
.predict__verdict { font-family: var(--f-ui); font-size: 14px; margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--paper-2); }

/* ---------- 15/16 EXAMPLES ---------- */
.example { margin: 14px 0 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent-2); border-radius: var(--r); background: var(--card); box-shadow: var(--sh-1); overflow: hidden; }
.example__h { display: flex; align-items: center; gap: 8px; padding: 12px 16px 0; font-family: var(--f-ui); }
.example__h b { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.example__h span { font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.example__q { padding: 6px 16px 12px; }
.example__q p { margin: 0 0 8px; }
.example__try { margin: 0 16px 14px; padding: 12px 14px; border-radius: 12px; background: var(--paper-2); font-family: var(--f-ui); font-size: 13.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.example__try span { flex: 1; color: var(--ink-2); }
.example__sol { border-top: 1px solid var(--line); padding: 12px 16px 6px; background: var(--paper); animation: rise .35s both; }
.example__sol p { margin: 0 0 10px; }
.sstep { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); animation: rise .3s both; }
.sstep:first-child { border-top: 0; }
.sstep__n { font-family: var(--f-ui); font-size: 11px; font-weight: 700; color: var(--accent-2); padding-top: 4px; }
.sstep p { margin: 0; }
.sstep__hint { font-family: var(--f-ui); font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.sstep--hidden { display: none; }

/* ---------- 18 multi / 19 numeric / 20 order / 21 explain ---------- */
.opt--box .opt__key { border-radius: 7px; font-size: 0; position: relative; }
.opt--box .opt__key::after { content: ""; width: 12px; height: 7px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px,-1px); opacity: 0; }
.opt.is-picked { border-color: var(--ink); background: #fff; }
.opt.is-picked .opt__key { background: var(--ink); border-color: var(--ink); }
.opt.is-picked .opt__key::after { opacity: 1; }
.check__actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; font-family: var(--f-ui); }
.numeric { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--f-ui); }
.numeric input { font: 600 18px var(--f-ui); width: 130px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--paper); color: var(--ink); }
.numeric input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.numeric .unit { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.numeric.is-good input { border-color: var(--good); background: var(--good-soft); }
.numeric.is-bad input { border-color: var(--warn); background: var(--warn-soft); }
.order { display: grid; gap: 8px; }
.order .opt__key { transition: .2s; }
.order .opt.is-ranked .opt__key { background: var(--ink); color: #fff; border-color: var(--ink); }
.explain textarea { width: 100%; min-height: 96px; resize: vertical; font: 15px/1.5 var(--f-body); padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--paper); color: var(--ink); }
.explain textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.model { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper-2); animation: rise .3s both; }
.model b { font-family: var(--f-ui); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 4px; }
.model p { margin: 0; font-size: .96em; }
.grade { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.grade button { font-family: var(--f-ui); font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink-2); }
.grade button.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }

/* ---------- 22 SYNTHESIS ---------- */
.synth { margin: 14px 0 18px; border-radius: var(--r-xl); background: var(--ink); color: #fff; padding: 20px 20px 16px; position: relative; overflow: hidden; }
.synth::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb),.6), transparent 65%); filter: blur(12px); }
.synth h4 { position: relative; margin: 0 0 12px; font-family: var(--f-display); font-weight: 500; font-size: 21px; letter-spacing: -.02em; }
.synth__k { position: relative; font-family: var(--f-ui); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); margin: 12px 0 6px; }
.synth ul { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.synth li { font-size: .95em; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.92); }
.synth li b { font-family: var(--f-ui); font-size: 12px; color: rgba(255,255,255,.6); font-weight: 600; margin-right: 6px; }
.synth mjx-container { color: #fff; }

/* ---------- 23 GATE ---------- */
.gate { margin: 14px 0 18px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 14px 16px; background: var(--paper); }
.gate.is-ready { border-style: solid; border-color: var(--good); background: var(--good-soft); }
.gate__h { display: flex; gap: 10px; align-items: center; font-family: var(--f-ui); margin-bottom: 10px; }
.gate__h b { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.gate__h span { font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.gate__h a { margin-left: auto; font-size: 13px; font-weight: 600; }
.gq { display: grid; gap: 6px; margin-bottom: 10px; font-family: var(--f-ui); font-size: 14px; }
.gq__q { font-weight: 500; }
.gq__o { display: flex; gap: 6px; flex-wrap: wrap; }
.gq__o button { font-family: var(--f-ui); font-size: 13.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); }
.gq__o button.is-correct { border-color: var(--good); background: var(--good-soft); color: #065F46; }
.gq__o button.is-wrong { border-color: var(--warn); background: var(--warn-soft); color: #7C2D12; }
.gate__state { font-family: var(--f-ui); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.gate.is-ready .gate__state { color: #065F46; }

/* ---------- 24 FORMULA SHEET ---------- */
.fsheet { display: grid; gap: 8px; }
.fsheet__item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.fsheet__item small { display: block; font-family: var(--f-ui); font-size: 12px; color: var(--ink-3); }
.fsheet__empty { font-family: var(--f-ui); color: var(--ink-3); font-size: 14px; padding: 20px 0; text-align: center; }

/* ---------- 25 CONCEPT MAP ---------- */
.cmap { margin: 14px 0 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--sh-1); overflow: hidden; }
.cmap svg { width: 100%; height: auto; display: block; }
.cmap__edge { stroke: var(--line-2); stroke-width: 1.6; fill: none; marker-end: url(#mArrow); }
.cmap__node rect { fill: var(--paper); stroke: var(--line-2); stroke-width: 1.2; rx: 10; transition: .3s; }
.cmap__node text { font-family: var(--f-ui); font-size: 11.5px; font-weight: 600; fill: var(--ink); text-anchor: middle; }
.cmap__node.m1 rect { fill: rgba(var(--accent-rgb),.12); stroke: var(--accent); }
.cmap__node.m2 rect { fill: var(--good-soft); stroke: var(--good); }
.cmap__node.m0 rect { fill: var(--warn-soft); stroke: var(--warn); }
.cmap__leg { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); font-family: var(--f-ui); font-size: 12px; color: var(--ink-2); }
.cmap__leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- 26 NOTES ---------- */
.notes-demo { position: relative; }
.notes-demo mark { background: rgba(250,204,21,.45); border-radius: 3px; padding: 0 1px; }
.hl-btn { position: absolute; z-index: 20; transform: translate(-50%, -110%); display: flex; gap: 4px; background: var(--ink); padding: 4px; border-radius: 10px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); animation: rise .15s both; }
.hl-btn button { font-family: var(--f-ui); font-size: 12.5px; font-weight: 600; color: #fff; padding: 6px 10px; border-radius: 7px; }
.hl-btn button:hover { background: rgba(255,255,255,.14); }
.noteline { display: flex; gap: 8px; align-items: center; font-family: var(--f-ui); font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.noteline button { font-weight: 600; color: var(--accent); }
.note { margin-top: 8px; display: grid; grid-template-columns: 4px 1fr; gap: 10px; }
.note i { background: #F59E0B; border-radius: 2px; }
.note textarea { width: 100%; min-height: 60px; resize: vertical; font: 14px/1.5 var(--f-ui); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: #FFFBEB; color: var(--ink); }

/* ---------- 27 MASTERY ---------- */
.mastery { display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--f-ui); }
.mpill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mpill .toc__ring { width: 26px; height: 26px; font-size: 9px; }
.mpill .toc__ring circle { stroke-width: 4; }
.mpill.m2 { border-color: var(--good); color: #065F46; } .mpill.m2 .toc__ring .b { stroke: var(--good); }
.mpill.m0 { border-color: var(--warn); color: #7C2D12; } .mpill.m0 .toc__ring .b { stroke: var(--warn); }

/* ---------- 28 REVIEW QUEUE / 29 PRACTICE ---------- */
.queue { display: grid; gap: 8px; font-family: var(--f-ui); }
.queue__item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 14px; }
.queue__item small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.queue__due { font-size: 11.5px; font-weight: 700; color: var(--warn); background: var(--warn-soft); padding: 4px 8px; border-radius: 999px; }
.queue__empty { font-size: 14px; color: var(--ink-3); padding: 14px 0; }
.practice { display: grid; gap: 8px; font-family: var(--f-ui); }
.practice__row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); transition: .2s; text-align: left; }
.practice__row:hover { border-color: var(--ink); transform: translateY(-1px); }
.practice__ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.practice__row b { display: block; font-size: 14.5px; }
.practice__row small { color: var(--ink-3); font-size: 12.5px; }
.practice__row .lcard__go { width: 32px; height: 32px; }

/* ---------- responsive ---------- */
@media (min-width: 1100px) {
  .cshell { display: grid; grid-template-columns: 250px 1fr; }
  .cnav { display: block; position: sticky; top: 62px; height: calc(100vh - 62px); overflow: auto; padding: 22px 14px 40px 22px; border-right: 1px solid var(--line); font-family: var(--f-ui); }
  .cnav b { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 14px 0 6px 10px; }
  .cnav a { display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
  .cnav a:hover { background: var(--card); color: var(--ink); }
  .cnav a i { font-style: normal; font-family: var(--f-display); font-size: 11px; color: var(--accent); width: 18px; }
  .cchips { display: none; }
  .cmain { max-width: 900px; }
}
