/* Exported /experiments/ pages (teaching/remilab-labs) in the current Open Lab shell. book-bar.mjs links this sheet,
   with bar.css, only on exported pages that still carried the retired family rows (the Python debugger, the interactive
   references and the other workbench pages). It maps their own tokens to the l1 tokens of open.css, sets the l1 faces,
   lifts their text to the 15 px floor and drops ALL-CAPS tracked labels (lab-web-design §1, §2, §4). Figure-kit drawing
   sizes inside SVG plots stay with the figures' owner. Their stylesheets set sizes with !important in places, so this
   layer does too. */
@font-face{font-family:"Pretendard Variable";src:url('./pretendard.woff2') format('woff2');font-weight:100 900;font-display:swap}

html:root:not([data-theme="dark"]),html[data-theme="light"]{
  --bg-body:#ffffff;--bg-card:#ffffff;--bg-control:#f3f5f8;--border:#e1e5ec;
  --text-primary:#0d1421;--text-secondary:#4a5466;--text-muted:#4a5466;--text-dim:#c8cfda;
  --accent:#1f4fd8;--accent-bg:#1f4fd8;--accent-text:#ffffff;--input-bg:#ffffff;--select-bg:#ffffff;
  --dbg-page-top:transparent;--dbg-hero-radial:transparent;--dbg-hero-bg:#ffffff;--dbg-surface:#ffffff;--dbg-surface-muted:#f3f5f8;
  --dbg-border:#e1e5ec;--dbg-code-bg:#ffffff;--dbg-code-gutter:#f3f5f8;--dbg-code-text:#0d1421;--dbg-gutter-text:#4a5466;
  --dbg-empty-bg:#f3f5f8;--dbg-empty-border:#e1e5ec;--dbg-empty-text:#0d1421;--dbg-local-row:#e5ecfd;--dbg-global-row:#f3f5f8;
}
html:root{
  --ink:#0d1421;--muted:#4a5466;--paper:#ffffff;--line:#e1e5ec;--blue:#1f4fd8;
  --remi-font:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  --family-font:var(--remi-font);--family-ink:#0d1421;--family-muted:#4a5466;--family-accent:#1f4fd8;--family-paper:#ffffff;
  --family-line:#e1e5ec;--family-radius:12px;--family-ui-size:15px;
}
html[data-theme="dark"]{
  --ink:var(--text-primary,#0d1421);--muted:var(--text-secondary,#4a5466);
  --paper:var(--bg-body,#ffffff);--line:var(--border,#e1e5ec);--blue:var(--accent,#1f4fd8);
}
html body{font-family:var(--remi-font);background:var(--bg-body,var(--paper));color:var(--text-primary,var(--ink));word-break:keep-all;overflow-wrap:anywhere}
html body :is(code,pre,kbd,samp,textarea,.editor,.editor-line-numbers,.code-output,.line-text){font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-variant-ligatures:none;font-feature-settings:"liga" 0,"calt" 0}
html body.remi-debugger :is(.line-toggle,.line-number){font-variant-ligatures:none;font-feature-settings:"liga" 0,"calt" 0}
/* Keep the native links and theme control after the introduction on phones.
   Only the family bar and course context then precede the title. */
@media(max-width:760px){.remi-debugger .app-shell{display:flex;flex-direction:column}.remi-debugger .hero{order:-1}}
html body a{color:var(--accent,var(--blue))}
/* Legacy controls and badges contain literal backgrounds; pair them with their theme's text tokens. */
html[data-theme="light"] .controls button{background:var(--bg-control)!important;color:var(--text-primary)!important}
html[data-theme="light"] .controls button.active{background:var(--accent-bg)!important;color:var(--accent-text)!important}
html[data-theme="light"] .controls .preset-btn span{color:inherit}
html[data-theme="light"] .status.ok{color:#146c35!important}
html body .controls .btn{background:var(--accent-bg)!important;color:var(--accent-text)!important}
html body .controls .btn:hover{background:color-mix(in srgb,var(--accent-bg) 90%,#000)!important}
html[data-theme="dark"] .metric .value.bad{color:#fca5a5}
html[data-theme="dark"] .control-group small{color:var(--text-secondary)!important}
html body.remi-debugger :is(.meta-badge,.status-chip,.scope-button.is-active){background:var(--bg-control);border-color:var(--border)}
html body.remi-debugger .step-count{color:var(--accent)}
html body :is(.preset-note,.process-guide,#loadStatus,.transfer-arrow,.symbol-comparison,.flow-arrow,.bridge-arrow){color:var(--text-secondary,var(--family-muted))}
/* Improve the glyph contrast of formula annotations without changing the figures' SVG palettes. */
html body[data-family-site="interactive"] [data-figure],
html body[data-family-site="interactive"] [data-figure] :not(svg,svg *){
  -webkit-text-fill-color:color-mix(in srgb,currentColor 70%,#000);
}
html body[data-family-site="interactive"] [data-figure] :is(.dc-out,.dc-eq){color:var(--text-secondary)}
html body[data-family-site="interactive"] [data-figure] :is(svg,button,select,input,textarea),
html body[data-family-site="interactive"] [data-figure] :is(svg,button,select) *{-webkit-text-fill-color:initial}
html body[data-family-site="interactive"] [data-figure] button .katex-html :not(svg,svg *){-webkit-text-fill-color:color-mix(in srgb,currentColor 70%,#000)}

/* The page column on the shell's grid: 1280 px with 32 px gutters (16 px on phones), under the bar's logo. */
html body.remi-debugger .app-shell{max-width:1280px;padding-inline:32px}
html body.remi-workbench .lab-context{max-width:1280px;padding:16px 32px 0;gap:24px}
@media(max-width:760px){html body.remi-debugger .app-shell,html body.remi-workbench .lab-context{padding-inline:16px}}

html body :is(.crumb-link,.theme-toggle,.hero p,.chip,.hero-link,.panel-head p,.status-chip,.meta-badge,.helper-text,
  .scrubber-wrap label,.step-count,.line-toggle,thead th,td code,.value-cell code,.empty-state,.empty-kicker,.output-log.is-empty,
  .notes-box.is-empty,.notes-box code,.footer-note,.editor-line-numbers,.editor,.code-output,.line-text,.output-log,.notes-box,
  .example-select,.lab-context,.lab-context>span,.lab-sequence a,.header p,.control-group h3,label,label .val,select,
  input[type=number],.info-box,.info-box code,.metric .label,.play-btn,.primary-button,button[data-tone=primary],.step-btn,
  .secondary-button,.control-button,.toggle-group button,.status,.mobile-controls-toggle,.lab-explanation,
  .lab-mobile-result-bar label,.lab-mobile-result-bar select,.lab-drawer-head strong,.lab-drawer-head button,
  .topic-nav,.family-nav,.scene-index span,.catalog-page footer,.scene-bar,.scene-bar a,.scene-bar button,.scene-bar select,
  .scene-footer,.reading-list p,.sidebar-home,.chapter-kicker,.page-nav,.page-nav small,.page-count,.page-chapter,.quiet,
  .source-note,.course-name small){font-size:15px!important;line-height:1.6}
html body :is(.panel-head h2,.panel-head h3,.metric .value,.source-note h2){font-size:17px!important}
html body tbody td::before,html body .controls::before{font-size:15px!important}
html body :is(thead th,.empty-kicker,tbody td::before,.control-group h3,.controls::before){text-transform:none!important;letter-spacing:0!important}
/* One control shape: 12 px corners (form controls) and the l1 focus ring. */
html body :is(button,select,input,textarea,.chip,.hero-link,.crumb-link){border-radius:12px}
html body :is(button,a,select,input,textarea,summary):focus-visible{outline:3px solid #1f4fd8;outline-offset:2px}
