/* Carby's laboratory: a cinematic Home specimen, a quiet and legible study surface. */
:root {
  --bg: #f4f7fc; --bg2: #fff; --panel: #fff; --ink: #18243b; --ink2: #54627b;
  --line: #dbe3ef; --soft: #eaf0fa; --brand: #6548cd; --brand-d: #5033b0;
  --shadow-1: 0 3px 16px #21355808; --shadow-2: 0 10px 28px #21355812;
  --display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090f20; --bg2: #0e1629; --panel: #141e35; --ink: #edf5ff; --ink2: #afbed5;
    --line: #2b3b57; --soft: #1e2b47; --brand: #a99aff; --brand-d: #6650cf; --teal-d: #67e8df;
    --shadow-1: 0 3px 16px #00000014; --shadow-2: 0 10px 28px #00000028;
  }
}
:root[data-theme="dark"] {
  --bg: #090f20; --bg2: #0e1629; --panel: #141e35; --ink: #edf5ff; --ink2: #afbed5;
  --line: #2b3b57; --soft: #1e2b47; --brand: #a99aff; --brand-d: #6650cf; --teal-d: #67e8df;
  --shadow-1: 0 3px 16px #00000014; --shadow-2: 0 10px 28px #00000028;
}
body::before { background: radial-gradient(ellipse at 90% 0%, #7963ce0c, transparent 55%); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.035em; }
.sidebar { border-right-width: 1px; background: var(--bg2); }
.brand { letter-spacing: -.035em; font-family: var(--display); font-size: 18px; }
.brand small { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11px; }
.nav a { border-width: 1px; border-radius: 10px; font-weight: 700; }
.nav a.active { background: color-mix(in srgb, var(--brand) 12%, var(--panel)); border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); }
.nav .nav-group { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; margin-top: 20px; }
.topbar { border-bottom-width: 1px; }
.stat-chip { border-width: 1px; font-weight: 700; }
.btn { text-transform: none; letter-spacing: 0; border-radius: 10px; box-shadow: none; font-weight: 800; }
.btn.primary { background: #7051df; border-color: #7051df; color: #fff; box-shadow: 0 3px 10px #7051df28; }
.btn.primary:active { box-shadow: none; }
/* Accent text can be luminous; filled controls need a darker color behind white text. */
.skip-link, .seg button.on, .sec-help[aria-expanded="true"] > span:first-child,
.loop-n, .rank-item .n, .msg.me .mb, .chip-btn.on, .dc-n { background: #6548cd; color: #fff; }
.btn.teal, .exam-tag.ok { background: #007d6d; border-color: #007d6d; color: #fff; }
.lvl .badge-num, .lx-chin { background: linear-gradient(135deg, #6548cd, #ad2975); }
.card { border-width: 1px; border-radius: 16px; }
.section-title h2 { font-size: 23px; }
.section-title h2::before { display: none; }
.section-title a { font-size: 13px; font-weight: 700; }
.progress-note > b { text-transform: none; letter-spacing: 0; font-size: 13px; }
.progress-note { border-style: solid; border-color: var(--line); }
.badge-tile.locked { opacity: 1; background: var(--bg); border-style: dashed; }
.badge-tile.locked .bi { opacity: .55; }
.bar { height: 6px; }
:is(.action-card, .course-head, .unit-card) .bar:has(> i[style^="width:0%"]) { animation: none; background: var(--soft); }
.home-start a { color: var(--brand); }

/* Large type occupies the left; the molecular scene occupies the right. */
.lab-hero {
  --scene-ink: #edf5ff; --scene-muted: #b9c7df;
  grid-template-columns: 1.15fr 1fr; gap: 0; padding: 0;
  background: radial-gradient(ellipse at 76% 40%, #28495880, transparent 45%), radial-gradient(ellipse at 40% 0%, #34285d88, transparent 70%), #0e152a;
  border: 1px solid #34455e; border-radius: 24px; color: var(--scene-ink);
  box-shadow: 0 24px 70px #060a1926; isolation: isolate;
}
.lab-hero::before {
  inset: 0; z-index: 0; opacity: .25;
  background-image: linear-gradient(#819cb519 1px, transparent 1px), linear-gradient(90deg, #819cb519 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(90deg, transparent, #000);
}
.lab-hero::after { display: none; }
.lab-copy { z-index: 2; padding: 38px 0 32px 36px; min-width: 0; align-self: center; }
.lab-hero .lab-greeting { font-size: 13px; color: #c7baff; margin: 0 0 22px; font-weight: 700; }
.lab-hero h1 { font-size: clamp(38px, 4vw, 60px); line-height: 1.02; letter-spacing: -.055em; font-weight: 650; margin: 0 0 20px; color: #f3f6ff; }
.lab-hero .lab-intro { color: var(--scene-muted); line-height: 1.65; font-size: 16px; margin: 0 0 26px; }
.lab-hero .next-step { display: flex; gap: 8px; flex-wrap: wrap; background: transparent; color: #f3f6ff; border: 0; box-shadow: none; padding: 0; margin: 0; transform: none; }
.lab-hero .next-step .ns-ico { display: none; }
.lab-hero .next-step .ns-body { width: 100%; flex: auto; }
.lab-hero .next-step .ns-lbl { color: #67e8df; font-size: 12px; text-transform: none; letter-spacing: 0; }
.lab-hero .next-step h2 { font-size: 19px; letter-spacing: -.025em; margin: 3px 0 8px; color: #edf5ff; }
.lab-hero .next-step p { color: var(--scene-muted); font-size: 13px; max-width: 42ch; line-height: 1.5; }
.lab-hero .next-step .btn { background: #a4f2e4; color: #123b3e; border-color: #a4f2e4; margin-top: 12px; padding: 12px 19px; box-shadow: 0 0 25px #67e8df16; animation: none; }
.lab-hero .next-step:hover .btn { background: #ccfff5; border-color: #ccfff5; box-shadow: 0 0 30px #67e8df30; }
.lab-hero .next-step:focus-visible { outline-color: #67e8df; outline-offset: 7px; }
.lab-specimen { position: relative; min-width: 0; align-self: stretch; min-height: 430px; overflow: hidden; }
.lab-molecule { display: block; width: 100%; height: 330px; position: relative; z-index: 2; margin-top: 20px; }
.lab-orbit { position: absolute; border: 1px solid #74d7d942; border-radius: 50%; width: 80%; height: 45%; top: 19%; left: 10%; transform: rotate(-28deg); box-shadow: 0 0 24px #67e8df07; }
.lab-orbit-two { width: 68%; height: 67%; left: 16%; top: 9%; transform: rotate(36deg); border-color: #b0a0ff28; }
.lab-element { position: absolute; top: 28px; right: 24px; display: grid; gap: 4px; padding: 8px 12px; border: 1px solid #95bbc449; border-radius: 8px; color: #a9d9dd; transform: rotate(7deg); line-height: 1.3; }
.lab-element span { font: 10px var(--mono); }.lab-element b { font: 40px var(--display); }.lab-element small { font-size: 9px; }
.lab-carby { position: absolute; bottom: 112px; left: 0; z-index: 3; display: flex; align-items: center; pointer-events: none; }
.lab-carby .hero-carby { width: 128px; height: 128px; background: none; filter: drop-shadow(0 5px 14px #9180ff55); }
.lab-carby > span { font-size: 11px; color: #c3cce3; line-height: 1.35; transform: rotate(-5deg); }
.lab-carby > span b { color: #fff; font-size: 17px; font-family: 'Patrick Hand', var(--font); }
.lab-molecule-caption { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 5px; margin: 0 14px 17px; }
.lab-molecule-caption b { font-family: var(--display); font-size: 18px; font-weight: 600; }.lab-molecule-caption b span { color: #67e8df; margin-left: 8px; }
.lab-molecule-caption > span { font-size: 11px; color: var(--scene-muted); }
.lab-controls { display: grid; grid-template-columns: auto minmax(45px, 1fr) auto; align-items: center; gap: 9px; margin: 0 24px 24px; color: var(--scene-muted); }
.lab-controls label { font-size: 11px; }
.lab-controls input { width: 100%; min-width: 0; accent-color: #86e9de; cursor: pointer; height: 28px; }
.lab-controls input:focus-visible { outline: 2px solid #86e9de; outline-offset: 4px; border-radius: 4px; }
.lab-motion { border: 1px solid #52637e; border-radius: 7px; padding: 7px 9px; background: #16253c; color: #e0edff; font-size: 11px; min-height: 34px; white-space: nowrap; }
.lab-motion:hover { background: #233651; }.lab-motion:focus-visible { outline-color: #86e9de; }
.lab-bottom { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; padding: 18px 30px; background: #0a1124a6; border-top: 1px solid #34455e; }
.lab-bottom .carby-daily { margin: 0; flex: 1; font-size: 13px; max-width: 58ch; color: #c2cee4; line-height: 1.65; }
.lab-bottom .hero-stats { flex: none; gap: 12px; margin: 0 0 0 auto; }
.lab-hero .ring.sm { width: 64px; height: 64px; --c: #a99aff; background: conic-gradient(var(--c) calc(var(--p) * 1%), #35405a 0); }
.lab-hero .ring.sm::before { inset: 3px; background: #111c31; }
.lab-hero .ring.sm > span { font-size: 17px; }.lab-hero .ring.sm > span small { font-size: 9.5px; color: #c2cee4; }
.lab-paused *, .lab-paused *::before, .lab-paused *::after { animation-play-state: paused !important; }
.home-cards .action-card { padding: 20px 22px; background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 5%, var(--panel)), var(--panel)); }
.home-cards h3 { font-size: 20px; margin-top: 10px; }.home-cards p { line-height: 1.6; }
.home-cards .chip { align-self: flex-start; background: transparent; padding-left: 0; border-radius: 0; }
.home-cards .big-ico { font-size: 30px; }
.jump { gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.jump a { border: 0; border-radius: 0; box-shadow: inset 0 -1px var(--line); padding: 17px 16px; background: transparent; }
.jump a:hover { background: var(--soft); transform: none; }
.home-start { font-size: 13px; padding: 3px 0; }
@media (min-width: 1450px) { #view, #secbar { max-width: 1240px; }.lab-hero h1 { font-size: 66px; }.lab-copy { padding: 42px; }.lab-molecule { height: 360px; } }
@media (max-width: 1100px) and (min-width: 761px) {
  .lab-hero { grid-template-columns: 1fr 1fr; }.lab-copy { padding-left: 24px; }.lab-hero h1 { font-size: 39px; }
  .lab-controls { grid-template-columns: 1fr auto; margin: 0 18px 20px; }.lab-controls label { grid-column: 1 / -1; }
  .lab-carby { left: -8px; bottom: 142px; }.lab-carby > span { display: none; }.lab-carby .hero-carby { width: 82px; height: 82px; }
}
@media (max-width: 760px) {
  .lab-hero { grid-template-columns: 1fr; border-radius: 19px; }.lab-copy { padding: 28px 24px 0; }
  .lab-hero h1 { font-size: clamp(32px, 8vw, 56px); }.lab-hero .lab-greeting { margin-bottom: 18px; }
  .lab-hero .lab-intro { font-size: 15px; margin-bottom: 20px; }.lab-hero .next-step h2 { font-size: 18px; }
  .lab-specimen { min-height: 0; }.lab-molecule { height: 245px; margin-top: 2px; }
  .lab-element { top: 20px; right: 24px; }.lab-element b { font-size: 30px; }
  .lab-carby { bottom: 92px; left: 6px; }.lab-carby .hero-carby { width: 92px; height: 92px; }.lab-carby > span { display: none; }
  .lab-molecule-caption { margin-bottom: 12px; }.lab-controls { margin: 0 18px 18px; gap: 7px; }
  .lab-bottom { padding: 16px 20px; flex-wrap: wrap; gap: 14px; }.lab-bottom .carby-daily { flex-basis: 100%; font-size: 12px; }
  .lab-bottom .hero-stats { margin: 0; width: 100%; justify-content: space-around; }
  .lab-hero .ring.sm { width: 64px; height: 64px; }.lab-hero .ring.sm > span { font-size: 17px; }
  .home-cards .action-card { padding: 18px; }.section-title h2 { font-size: 21px; }
  .section-title { gap: 10px; }.section-title a { font-size: 12px; text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-hero *, .lab-hero *::before, .lab-hero *::after { animation: none !important; transition: none !important; }
}
@media print { .lab-specimen { display: none; }.lab-hero { display: block; background: white; color: black; }.lab-copy { padding: 0; } }
