/* Benchtop in the muqing.ai homepage style (2026-10-17 mockup). Loaded after app.css.
   Tokens are copied from /css/site.css, not linked (its resets would fight app.css, and its class names may change).
   One top bar like the homepage (mq logo first = home link), a sticky subject bar under it, a tab bar on phones; no sidebar.
   Accents: chemistry green, physics black/white; mq red only on the mq logo that leads back to muqing.ai. */

:root {
  --gap: 12px; --gnav: 48px; --snav: 52px;
  --font-sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-sf-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --brand-green: #1e6b2e;
}

/* ---------- neutral tokens (white page, #f5f5f7 tiles) for every subject ---------- */
:root[data-subject] {
  --font-body: var(--font-sf); --font-display: var(--font-sf-display);
  --bg: #ffffff; --grid: transparent; --surface: #ffffff; --surface-2: #f5f5f7; --surface-3: #e8e8ed;
  --ink: #1d1d1f; --muted: #6e6e73; --faint: #86868b; --line: #d2d2d7; --line-strong: #b9b9c0;
  --shadow: 0 2px 6px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .10);
  --r: 14px;
  --glass: rgba(255, 255, 255, .8); --glass-line: rgba(0, 0, 0, .08); --nav-link: rgba(0, 0, 0, .8);
  --seg-bg: rgba(0, 0, 0, .06); --seg-on: #ffffff; --pop-bg: #ffffff;
  --hero-bg: #f5f5f7; --card-bg: #f5f5f7;
  --phys-tile-bg: #000000; --phys-tile-ink: #f5f5f7; --phys-tile-muted: #a1a1a6;
}
:root[data-subject="home"], :root[data-subject="chem"] { --accent: #1e6b2e; --accent-ink: #ffffff; --accent-soft: #e3efe0; --good: #1e6b2e; --focus: #1e6b2e; }
:root[data-subject="phys"] { --accent: #1d1d1f; --accent-ink: #ffffff; --accent-soft: #ececf0; --focus: #1d1d1f; }

@media (prefers-color-scheme: dark) {
  :root[data-subject]:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #161617; --surface-3: #2c2c2e;
    --ink: #f5f5f7; --muted: #a1a1a6; --faint: #6e6e73; --line: #2c2c30; --line-strong: #3a3a3f;
    --shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .5);
    --glass: rgba(22, 22, 23, .8); --glass-line: rgba(255, 255, 255, .1); --nav-link: rgba(255, 255, 255, .82);
    --seg-bg: rgba(255, 255, 255, .12); --seg-on: #48484a; --pop-bg: #1c1c1e;
    --hero-bg: #161617; --card-bg: #161617;
    --phys-tile-bg: #f5f5f7; --phys-tile-ink: #1d1d1f; --phys-tile-muted: #6e6e73;
  }
  :root[data-subject="home"]:not([data-theme="light"]), :root[data-subject="chem"]:not([data-theme="light"]) { --accent: #6ad16f; --accent-ink: #062109; --accent-soft: #15301a; --good: #6ad16f; --focus: #6ad16f; }
  :root[data-subject="phys"]:not([data-theme="light"]) { --accent: #f5f5f7; --accent-ink: #000000; --accent-soft: #2c2c2e; --focus: #f5f5f7; }
}
:root[data-subject][data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #161617; --surface-3: #2c2c2e;
  --ink: #f5f5f7; --muted: #a1a1a6; --faint: #6e6e73; --line: #2c2c30; --line-strong: #3a3a3f;
  --shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .5);
  --glass: rgba(22, 22, 23, .8); --glass-line: rgba(255, 255, 255, .1); --nav-link: rgba(255, 255, 255, .82);
  --seg-bg: rgba(255, 255, 255, .12); --seg-on: #48484a; --pop-bg: #1c1c1e;
  --hero-bg: #161617; --card-bg: #161617;
  --phys-tile-bg: #f5f5f7; --phys-tile-ink: #1d1d1f; --phys-tile-muted: #6e6e73;
}
:root[data-subject="home"][data-theme="dark"], :root[data-subject="chem"][data-theme="dark"] { --accent: #6ad16f; --accent-ink: #062109; --accent-soft: #15301a; --good: #6ad16f; --focus: #6ad16f; }
:root[data-subject="phys"][data-theme="dark"] { --accent: #f5f5f7; --accent-ink: #000000; --accent-soft: #2c2c2e; --focus: #f5f5f7; }

/* ---------- old chrome off: sidebar, floating calculator. The shared script (v8, data-logo="off") only plays the launch screen;
   the mq logo in our top bar is the home link (site rule 2026-10-17: logo only, no shared top bar). ---------- */
.sidebar, .topbar, .drawer-scrim, .calc-fab { display: none !important; }
.shell, html[data-sidebar] .shell { display: block; min-height: 0; }

html { scroll-padding-top: calc(var(--snav) + 12px); }
body { background: var(--bg); background-image: none; font: 400 16px/1.5 var(--font-body); letter-spacing: -.012em; -webkit-font-smoothing: antialiased; }
main { padding: 28px 20px 80px; }
.gn a, .gn button, .sn a, .tabbar a, .bt-grade button, .bt-btn { -webkit-tap-highlight-color: transparent; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- top bar (copied from the homepage .gnav) ---------- */
.gn { position: relative; z-index: 30; height: var(--gnav); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
html[data-subject="home"] .gn { position: sticky; top: 0; border-bottom: 1px solid var(--glass-line); }
.gn-row { position: relative; display: flex; align-items: center; gap: 26px; max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 20px; }
.gn-mq { display: grid; place-items: center; height: 100%; }
.gn-mq img { width: 30px; height: auto; display: block; }
.gn-brand { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; color: var(--ink); text-decoration: none; font: 600 17px/1 var(--font-display); letter-spacing: -.01em; }
.gn-brand .brand-mark { width: 22px; height: 22px; }
.gn-brand .brand-mark rect { fill: var(--brand-green); } .gn-brand .brand-mark circle { fill: #fff; } .gn-brand .brand-mark g { stroke: #fff; }
.gn-links { display: flex; gap: 30px; }
.gn-links a { font-size: 12px; letter-spacing: -.01em; color: var(--nav-link); text-decoration: none; white-space: nowrap; transition: color .2s ease; }
.gn-links a:hover, .gn-links a[aria-current] { color: var(--ink); }
.gn-links a[aria-current] { font-weight: 600; }
.gn-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gn-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 999px; background: none; color: var(--ink); }
.gn-btn:hover { background: var(--seg-bg); }
.gn-btn .ico { width: 17px; height: 17px; }
.gn-grade { display: inline-flex; align-items: center; gap: 1px; height: 26px; padding: 0 6px 0 10px; border: 0; border-radius: 999px; background: var(--seg-bg); color: var(--ink); font: 600 11.5px/1 var(--font-body); }
.gn-grade .ico { width: 14px; height: 14px; stroke-width: 2.2; transition: transform .2s ease; }
.gn-grade[aria-expanded="true"] .ico { transform: rotate(180deg); }
/* Language globe (LangKit, mounted by nav.js). */
.gn-lang { display: inline-flex; }

/* settings pop-over under the grade button */
.gn-pop { position: absolute; top: calc(100% + 6px); right: 20px; z-index: 50; width: 290px; padding: 14px; background: var(--pop-bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.gn-pop-t { margin: 2px 4px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.gn-pop-grades { display: grid; gap: 6px; }
.gn-pop-grades button { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: none; text-align: left; color: var(--ink); }
.gn-pop-grades button:hover { border-color: var(--line-strong); }
.gn-pop-grades button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.gn-pop-grades b { min-width: 38px; font-size: 15px; font-weight: 600; }
.gn-pop-grades span { font-size: 13px; color: var(--muted); }
/* The site-wide light / dark moon (assets/theme/theme-kit.js), left of the globe: the same chip as the grade and globe pills.
   Also used by /calc and /circuit (they link this file). */
.gn-theme { display: inline-flex; }
:root[data-subject][data-theme] { --st-size: 26px; --st-icon: 15px; --st-bg: var(--seg-bg); --st-fg: var(--ink); --st-hover: color-mix(in oklab, var(--seg-bg), var(--ink) 8%); }
.gn-only-phone { display: none !important; }

/* ---------- subject bar: sticks to the top once the top bar scrolls away (Apple's local nav) ---------- */
.sn { position: sticky; top: 0; z-index: 29; height: var(--snav); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--glass-line); }
.sn-row { display: flex; align-items: center; gap: 28px; max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 20px; }
.sn-title { flex: none; margin-right: auto; color: var(--ink); text-decoration: none; font: 600 21px/1 var(--font-display); letter-spacing: .01em; }
.sn-links { display: flex; gap: 24px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sn-links::-webkit-scrollbar { display: none; }
.sn-links a { flex: none; padding: 6px 0; font-size: 12px; color: var(--ink); opacity: .82; text-decoration: none; white-space: nowrap; }
.sn-links a:hover { opacity: 1; }
.sn-links a[aria-current] { opacity: 1; font-weight: 600; color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- phone tab bar ---------- */
.tabbar { display: none; }

/* ---------- shared bits, homepage look ---------- */
.eyebrow { margin: 0 0 6px; font: 600 17px/1.25 var(--font-display); letter-spacing: -.01em; text-transform: none; color: var(--accent); }
h1.page { font: 600 clamp(32px, 4.4vw, 48px)/1.08 var(--font-display); letter-spacing: -.015em; }
:root[data-subject="phys"] h1.page { padding-bottom: 0; background: none; }
.lede { margin-top: 10px; font-size: 19px; line-height: 1.42; color: var(--muted); max-width: 62ch; }
.card { border: 0; background: var(--surface-2); border-radius: var(--r); }
:root[data-subject] .card { box-shadow: none; }
.chip { border: 0; background: var(--seg-bg); padding: 6px 12px; font-weight: 500; color: var(--ink); }
.chip:hover { background: color-mix(in oklab, var(--seg-bg), var(--ink) 6%); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.btn { border-radius: 980px; padding: 8px 16px; font-weight: 500; }
.input { border-radius: 12px; }
.seg { border-radius: 999px; border: 0; background: var(--seg-bg); }
.seg button { border-radius: 999px; }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ph-calc { top: calc(var(--snav) + 16px); max-height: calc(100vh - var(--snav) - 32px); }

/* ---------- periodic table page ---------- */
.pt-head { margin: 4px 0 24px; }
.bt-panel { padding: 18px 18px 16px; border-radius: 24px; background: var(--surface-2); }
.bt-panel .pt-tools { margin-bottom: 14px; }
.bt-panel .search .input { background: var(--surface); border-color: transparent; box-shadow: 0 0 0 1px var(--line); }
.bt-panel .colorby .label { flex: none; white-space: nowrap; font: 600 12px/1 var(--font-body); letter-spacing: 0; text-transform: none; }
.bt-panel .legend { margin-top: 14px; }
.pt-foot { margin-top: 24px; }
.pt-foot h3 { font: 600 19px/1.25 var(--font-display); }

/* ---------- landing page (#/) ---------- */
html[data-subject="home"] main { max-width: none; padding: 0 0 24px; }
html[data-subject="home"] .site-foot { max-width: 1100px; margin: 0 auto; padding: 0 22px 40px; }
.bt-home { padding-top: var(--gap); }
.bt-hero { display: flex; flex-direction: column; align-items: center; overflow: hidden; margin: 0 var(--gap) var(--gap); padding: 56px 24px 0; min-height: 660px; background: var(--hero-bg); text-align: center; }
.bt-hero-copy { position: relative; z-index: 1; max-width: 680px; }
.bt-hero h1 { margin: 0; font: 600 56px/1.07 var(--font-display); letter-spacing: -.005em; }
.bt-hero-sub { margin: 6px 0 0; font-size: 28px; line-height: 1.14; letter-spacing: .007em; }
.bt-grade { display: inline-flex; margin-top: 22px; padding: 3px; border-radius: 999px; background: var(--seg-bg); }
.bt-grade button { border: 0; background: none; padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); }
.bt-grade button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.bt-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 20px; }
.bt-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 21px; border-radius: 980px; font-size: 17px; line-height: 1.18; letter-spacing: -.022em; text-decoration: none; transition: background-color .2s ease, color .2s ease, filter .2s ease; }
.bt-btn--fill { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink); }
.bt-btn--fill:hover { filter: brightness(.9); }
.bt-btn--line { border: 1px solid var(--accent); color: var(--accent); }
.bt-btn--line:hover { background: var(--accent); color: var(--accent-ink); }
.bt-btn--phys { background: var(--phys-hue); border: 1px solid var(--phys-hue); color: var(--bg); }
.bt-btn--phys:hover { filter: brightness(.82); }
.bt-hero-stage { position: relative; width: min(100%, 1180px); margin: auto auto 0; padding-top: 18px; }
.bt-hero-art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 8.4; object-fit: cover; object-position: 50% 52%; }
/* a live physics model floating in front of the periodic table, so the first screen shows both subjects */
.bt-hero-float { position: absolute; right: 1%; top: 2%; width: min(31%, 360px); padding: 12px 14px; border-radius: 18px; background: var(--surface); color: var(--ink); text-align: left; text-decoration: none; box-shadow: 0 22px 60px rgba(0, 0, 0, .2), 0 2px 8px rgba(0, 0, 0, .06); transition: transform .3s ease, box-shadow .3s ease; }
.bt-hero-float:hover { transform: translateY(-3px); box-shadow: 0 28px 70px rgba(0, 0, 0, .24), 0 2px 8px rgba(0, 0, 0, .06); }
.bt-float-art { display: block; aspect-ratio: 480 / 300; }
.bt-float-cap { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.bt-float-cap b { color: var(--ink); font-weight: 600; }
.bt-float-cap span { margin-left: auto; font-size: 18px; line-height: 1; }

/* Physics in motion: a swipeable row with one live model per topic */
.bt-motion { margin: 64px 0 52px; --row-pad: max(22px, calc((100vw - 1100px) / 2 + 22px)); }
.bt-motion-head { max-width: 1100px; margin: 0 auto 22px; padding: 0 22px; }
.bt-motion-head h2 { margin: 0; font: 600 40px/1.1 var(--font-display); }
.bt-motion-head p { max-width: 46ch; margin: 8px 0 0; font-size: 19px; line-height: 1.4; color: var(--muted); }
.bt-motion-row { display: flex; gap: 16px; margin: 0; padding: 4px var(--row-pad) 22px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--row-pad); scrollbar-width: none; }
.bt-motion-row::-webkit-scrollbar { display: none; }
.bt-motion-row li { flex: none; width: 330px; scroll-snap-align: start; content-visibility: auto; contain-intrinsic-size: 330px 360px; }
.bt-mcard { display: flex; flex-direction: column; height: 100%; padding: 18px 20px 22px; border-radius: 18px; background: var(--card-bg); color: var(--ink); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.bt-mcard:hover { transform: scale(1.015); box-shadow: 0 4px 24px rgba(0, 0, 0, .08); }
.bt-mcard-art { display: block; aspect-ratio: 480 / 300; margin-bottom: 16px; }
.bt-mcard-area { font-size: 12px; font-weight: 600; color: var(--muted); }
.bt-mcard b { margin-top: 3px; font: 600 21px/1.2 var(--font-display); }
.bt-mcard-f { margin-top: auto; padding-top: 10px; font-size: 16px; }
.bt-motion-nav { display: flex; justify-content: flex-end; gap: 12px; max-width: 1100px; margin: 0 auto; padding: 0 22px; }
.bt-motion-nav button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0 0 3px; border: 0; border-radius: 50%; background: var(--seg-bg); color: var(--ink); font-size: 24px; line-height: 1; }
.bt-motion-nav button:disabled { opacity: .35; cursor: default; }

.bt-duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin: 0 var(--gap) var(--gap); }
.bt-card { display: flex; flex-direction: column; align-items: center; overflow: hidden; min-height: 580px; padding: 52px 28px 0; text-align: center; }
.bt-card--chem { background: var(--card-bg); color: var(--ink); }
.bt-card--phys { background: var(--phys-tile-bg); color: var(--phys-tile-ink); }
.bt-eyebrow { margin: 0 0 6px; font: 600 17px/1.2 var(--font-display); color: var(--chem-hue); }
.bt-card--phys .bt-eyebrow { color: var(--phys-tile-muted); }
.bt-card h2 { margin: 0; font: 600 40px/1.1 var(--font-display); letter-spacing: 0; }
.bt-card-sub { max-width: 32ch; margin: 12px auto 0; font-size: 19px; line-height: 1.4; color: var(--muted); }
.bt-card--phys .bt-card-sub { color: var(--phys-tile-muted); }
.bt-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin: 18px 0 0; }
.bt-more { font-size: 17px; color: var(--chem-hue); text-decoration: none; }
.bt-card--phys .bt-more { color: var(--phys-tile-ink); }
.bt-more:hover { text-decoration: underline; }
.bt-elements { display: grid; grid-template-columns: repeat(6, 78px); gap: 8px; margin-top: auto; padding: 48px 0 56px; }
.bt-elements .tile { pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.bt-elements .tile:nth-child(even) { transform: translateY(16px); }
.bt-elements .tile .nm { font-size: 9.5px; }
.bt-formulas { display: grid; grid-template-columns: auto auto; gap: 14px 40px; margin-top: auto; padding: 44px 0 64px; font: 600 30px/1.2 var(--font-display); letter-spacing: -.01em; }
.bt-formulas span:nth-child(2), .bt-formulas span:nth-child(3) { color: var(--phys-tile-muted); }

.bt-tools { max-width: 1100px; margin: 64px auto 0; padding: 0 22px; }
.bt-tools h2, .bt-dir-t { margin: 0 0 22px; font: 600 40px/1.1 var(--font-display); }
.bt-tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.bt-tool { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 156px; padding: 24px 56px 24px 24px; border-radius: 18px; background: var(--card-bg); color: var(--ink); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.bt-tool:hover { transform: scale(1.015); box-shadow: 0 4px 24px rgba(0, 0, 0, .08); }
.bt-tool::before { content: ""; width: 10px; height: 10px; margin-bottom: 8px; border-radius: 3px; background: var(--chem-hue); }
.bt-tool--phys::before { background: var(--phys-hue); }
.bt-tool b { font: 600 21px/1.2 var(--font-display); }
.bt-tool span { font-size: 15px; color: var(--muted); }
.bt-tool .bt-tool-go { position: absolute; right: 18px; bottom: 18px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--seg-bg); color: var(--ink); font-size: 19px; line-height: 1; }

.bt-dir { max-width: 1100px; margin: 72px auto 0; padding: 22px 22px 8px; border-top: 1px solid var(--line); }
.bt-dir-t { margin-bottom: 14px; font: 600 12px/1.3 var(--font-body); color: var(--muted); }
.bt-dir-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.bt-dir h3 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--ink); }
.bt-dir ul { margin: 0; padding: 0; list-style: none; }
.bt-dir li { margin: 0 0 7px; }
.bt-dir a { font-size: 12px; color: var(--muted); text-decoration: none; }
.bt-dir a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- smaller screens ---------- */
@media (max-width: 1068px) {
  .gn-links { gap: 20px; }
  .bt-hero h1 { font-size: 48px; }
  .bt-hero-sub { font-size: 24px; }
  .bt-card h2 { font-size: 32px; }
  .bt-elements { grid-template-columns: repeat(6, 62px); }
  .bt-formulas { font-size: 24px; }
}
@media (max-width: 900px) {
  .gn-links a[data-lab] { display: none; }
  .bt-tool-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 734px) {
  :root { --snav: 46px; }
  .gn-links { display: none; }
  .gn-only-phone { display: block !important; }
  .gn-row, .sn-row { padding: 0 16px; gap: 16px; }
  .gn-pop { right: 12px; width: min(300px, calc(100vw - 24px)); }
  .sn-title { font-size: 17px; }
  .sn-links { gap: 18px; }
  main { padding: 20px 16px 40px; }
  .lede { font-size: 17px; }
  .bt-panel { margin: 0 -10px; padding: 14px 10px 12px; border-radius: 18px; }
  .bt-panel .pt-tools { flex-wrap: nowrap; flex-direction: column; align-items: stretch; }
  .bt-panel .search { width: 100%; }
  .bt-panel .colorby { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 10px 2px; }
  .bt-panel .colorby::-webkit-scrollbar { display: none; }

  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--glass-line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 3px 0; font-size: 10.5px; font-weight: 500; color: var(--faint); text-decoration: none; }
  .tabbar a[aria-current] { color: var(--accent); }
  .tabbar .ico { width: 24px; height: 24px; stroke-width: 1.7; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }

  .bt-hero { min-height: 0; padding: 44px 16px 0; }
  .bt-hero h1 { font-size: 40px; }
  .bt-hero-sub { font-size: 19px; }
  .bt-grade button { padding: 6px 13px; }
  .bt-btn { font-size: 15px; padding: 9px 17px; }
  .bt-hero-stage { width: 130%; max-width: none; margin: auto -15% 0; }
  .bt-hero-float { position: relative; right: auto; top: auto; display: block; width: min(76%, 300px); margin: -16% auto 28px; padding: 10px 12px; }
  .bt-motion { margin: 44px 0 36px; --row-pad: 16px; }
  .bt-motion-head { padding: 0 16px; }
  .bt-motion-head h2 { font-size: 32px; }
  .bt-motion-head p { font-size: 17px; }
  .bt-motion-row { gap: 10px; }
  .bt-motion-row li { width: 78vw; max-width: 320px; }
  .bt-motion-nav { display: none; }
  .bt-duo { grid-template-columns: 1fr; }
  .bt-card { min-height: 0; padding: 40px 18px 0; }
  .bt-card h2 { font-size: 30px; }
  .bt-card-sub { font-size: 17px; }
  .bt-elements { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; width: 100%; max-width: 380px; padding: 36px 0 44px; }
  .bt-elements .tile:nth-child(even) { transform: translateY(10px); }
  .bt-elements .tile .nm, .bt-elements .tile .val { display: none; }
  .bt-formulas { font-size: 22px; gap: 10px 28px; padding: 32px 0 44px; }
  .bt-tools { margin-top: 44px; padding: 0 16px; }
  .bt-tools h2 { font-size: 32px; }
  .bt-tool-grid { grid-template-columns: 1fr; gap: 10px; }
  .bt-tool { min-height: 0; padding: 18px 52px 18px 18px; }
  .bt-dir { margin-top: 48px; padding: 18px 16px 4px; }
  .bt-dir-cols { grid-template-columns: 1fr 1fr; }
  html[data-subject="home"] .site-foot { padding: 0 16px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .bt-tool, .bt-btn, .gn-grade .ico, .bt-mcard, .bt-hero-float { transition: none; }
}

/* ================= shared building blocks for inner pages =================
   Contract: /Volumes/home/www-backups/2026-10-17-benchtop-inner/CONTRACT.md. Owned by the orchestrator chat;
   page chats use these classes and put their own rules in css/pages/<part>.css, scoped to their page. */
.bt-sec { padding: 24px; border-radius: 24px; background: var(--surface-2); }
.bt-sec-h { margin: 0 0 14px; font: 600 24px/1.2 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.bt-sec-sub { margin: -8px 0 14px; font-size: 15px; color: var(--muted); }
.bt-inset { padding: 16px 18px; border-radius: 16px; background: var(--surface); }
.bt-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 20px; margin: 0; }
.bt-spec { min-width: 0; margin: 0; padding: 12px 0 14px; border-top: 1px solid var(--line); }
.bt-spec dt, .bt-spec .bt-spec-l { font-size: 12px; font-weight: 600; color: var(--muted); }
.bt-spec dd, .bt-spec .bt-spec-v { margin: 4px 0 0; font: 600 21px/1.2 var(--font-display); color: var(--ink); }
.bt-spec small { display: block; margin-top: 2px; font: 400 13px/1.35 var(--font-body); color: var(--muted); }
.bt-seg { display: inline-flex; max-width: 100%; padding: 3px; border-radius: 999px; background: var(--seg-bg); overflow-x: auto; scrollbar-width: none; }
.bt-seg::-webkit-scrollbar { display: none; }
.bt-seg > button, .bt-seg > a { flex: none; padding: 6px 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.bt-seg > button:hover, .bt-seg > a:hover { color: var(--ink); }
.bt-seg > [aria-pressed="true"], .bt-seg > [aria-selected="true"], .bt-seg > [aria-current] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.bt-field { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 8px 0 18px; border-radius: 14px; background: var(--surface-2); transition: box-shadow .15s ease; }
.bt-field:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.bt-field input, .bt-field textarea { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: 19px; }
.bt-field .ico { color: var(--faint); }
.bt-chiprow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.bt-chiprow::-webkit-scrollbar { display: none; }
.bt-chiprow > * { flex: none; }
.bt-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--seg-bg); color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.4; vertical-align: middle; white-space: nowrap; }
.bt-list { margin: 0; padding: 0; list-style: none; overflow: hidden; border-radius: 18px; background: var(--surface-2); }
.bt-list > li + li { border-top: 1px solid var(--line); }
.bt-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 0; background: none; color: var(--ink); text-align: left; text-decoration: none; }
.bt-row:hover { background: color-mix(in oklab, var(--surface-2), var(--ink) 4%); }
.bt-btn--sm { padding: 7px 15px; font-size: 14px; }
.cfg .ss { display: inline-block; white-space: nowrap; } /* electron configuration: wrap between subshells only */
.bt-sheet-scrim { display: none; }
@media (max-width: 734px) {
  .bt-sec { padding: 18px 16px; border-radius: 20px; }
  .bt-sec-h { font-size: 21px; }
  .bt-field input, .bt-field textarea { font-size: 17px; }
  /* phone bottom sheet: the page adds .is-open to both; the sheet and its scrim sit above the tab bar */
  .bt-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 42; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; background: var(--bg); box-shadow: 0 -8px 40px rgba(0, 0, 0, .2); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
  .bt-sheet.is-open { transform: none; }
  .bt-sheet::before { content: ""; display: block; width: 36px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: var(--line-strong); }
  .bt-sheet-scrim { display: block; position: fixed; inset: 0; z-index: 41; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .bt-sheet-scrim.is-open { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) { .bt-sheet, .bt-sheet-scrim { transition: none; } }

/* Narrow phones: the moon chip joined the top bar (2026-10-18), so the bar's gaps get a little tighter to fit 375px. */
@media (max-width: 430px) {
  .gn-row { gap: 10px; }
  .gn-tools { gap: 5px; }
  .gn-btn { width: 28px; }
  .gn-lang .lang-kit .lk-btn { padding: 0 7px; }
}
