/* Learner's Byte x Oscar IT Solutions: Prompt Lab styles (shared by both pages) */
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: brand bar → compact hero with the CRISP letters → two-column lab (dark capability rail | working stage). */
:root {
  --bg: #f4f3f8;
  --surface: #ffffff;
  --surface-2: #f0eef6;
  --ink: #171a2c;
  --muted: #5a5e75;
  --line: #e1deea;
  --good: #1d9a55;
  --good-ink: #12703c;
  --good-soft: #e3f5ea;
  --master: #6e3c8f;
  --master-ink: #5c2f79;
  --master-soft: #f1e8f7;
  --bad: #b4462b;
  --bad-soft: #fbe9e3;
  --rail: #0d1726;
  --rail-2: #18253a;
  --rail-line: #24324b;
  --on-rail: #eef1f7;
  --on-rail-muted: #9aa6bd;
  --brand-green: #57c97f;
  --code-bg: #faf9fc;
  --shadow: 0 1px 2px rgba(23, 26, 44, 0.06), 0 8px 24px rgba(23, 26, 44, 0.06);
  --plate-line: rgba(23, 26, 44, 0.12);
  --focus: #6e3c8f;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e18; --surface: #111827; --surface-2: #172034; --ink: #e9ecf4; --muted: #a0a8bd; --line: #252f46;
    --good: #3cc779; --good-ink: #6fdb9d; --good-soft: #113022; --master: #b98ad8; --master-ink: #d0aee6; --master-soft: #2a1c38;
    --bad: #f08a6c; --bad-soft: #3a1d15; --rail: #0f1829; --rail-2: #1b2840; --rail-line: #26354f; --on-rail: #eef1f7; --on-rail-muted: #9aa6bd;
    --brand-green: #57c97f; --code-bg: #0d1322; --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.35); --plate-line: rgba(255,255,255,0.14); --focus: #b98ad8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0e18; --surface: #111827; --surface-2: #172034; --ink: #e9ecf4; --muted: #a0a8bd; --line: #252f46;
  --good: #3cc779; --good-ink: #6fdb9d; --good-soft: #113022; --master: #b98ad8; --master-ink: #d0aee6; --master-soft: #2a1c38;
  --bad: #f08a6c; --bad-soft: #3a1d15; --rail: #0f1829; --rail-2: #1b2840; --rail-line: #26354f; --on-rail: #eef1f7; --on-rail-muted: #9aa6bd;
  --brand-green: #57c97f; --code-bg: #0d1322; --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.35); --plate-line: rgba(255,255,255,0.14); --focus: #b98ad8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
.wrap { max-width: 1280px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* Brand bar */
.brandbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.brandbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 14px; }
.logos { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plate { display: block; height: 52px; width: auto; border-radius: 10px; border: 1px solid var(--plate-line); box-shadow: 0 2px 10px rgba(13, 23, 38, 0.12); }
.logo-x { color: var(--muted); font-size: 18px; }
.brand-note { font-size: 13px; color: var(--muted); text-align: right; }
.brand-note b { color: var(--ink); font-weight: 600; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px 56px; align-items: end; padding-block: 44px 32px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--master-ink); margin-bottom: 12px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; }
.hero h1 em { font-style: normal; color: var(--master-ink); }
.hero .lead { margin-top: 16px; font-size: 18px; color: var(--muted); max-width: 58ch; }
.crisp-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.crisp-legend div { padding: 14px 10px 12px; border-left: 1px solid var(--line); min-width: 0; }
.crisp-legend div:first-child { border-left: 0; }
.crisp-legend b { display: block; font-family: var(--font-display); font-size: 40px; line-height: 1; font-weight: 800; color: var(--ink); }
.crisp-legend span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.3; }
.legend-caption { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Lab */
.lab .wrap { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; padding-block: 8px 56px; }
.lab.single .wrap { grid-template-columns: minmax(0, 1fr); }
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); background: var(--rail); color: var(--on-rail); border-radius: var(--radius); padding: 18px 12px 12px; }
.rail-title { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-rail-muted); padding: 0 10px 12px; }
.rail ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cap-btn { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 10px; cursor: pointer; color: var(--on-rail); transition: background 0.15s; }
.cap-btn:hover { background: var(--rail-2); }
.cap-btn[aria-current="true"] { background: var(--rail-2); box-shadow: inset 0 0 0 1px var(--rail-line); }
.cap-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,0.06); color: var(--on-rail-muted); }
.cap-btn[aria-current="true"] .cap-icon { background: rgba(87, 201, 127, 0.16); color: var(--brand-green); }
.cap-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cap-name { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; }
.cap-short { display: block; font-size: 12.5px; color: var(--on-rail-muted); line-height: 1.3; margin-top: 2px; }
.rail-foot { margin: 12px 10px 4px; padding-top: 12px; border-top: 1px solid var(--rail-line); font-size: 12px; color: var(--on-rail-muted); line-height: 1.45; }

.stage { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cap-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; box-shadow: var(--shadow); }
.cap-head .big-icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--rail); color: var(--brand-green); border: 1px solid var(--rail-line); }
.cap-head .big-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cap-head h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; line-height: 1.1; }
.cap-head .desc { margin-top: 8px; color: var(--muted); max-width: 72ch; }
.uses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; align-items: center; }
.uses .uses-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; min-height: 44px; text-align: left; transition: border-color 0.15s, background 0.15s; }
.tab:hover { border-color: var(--muted); }
.tab .tab-kind { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.tab .tab-name { font-weight: 600; font-size: 15px; }
.tab.good .tab-kind { color: var(--good-ink); }
.tab.master .tab-kind { color: var(--master-ink); }
.tab.bad .tab-kind { color: var(--bad); }
.tab[aria-selected="true"].good { background: var(--good-soft); border-color: var(--good); }
.tab[aria-selected="true"].master { background: var(--master-soft); border-color: var(--master); }
.tab[aria-selected="true"].bad { background: var(--bad-soft); border-color: var(--bad); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.panel-intro { color: var(--muted); max-width: 75ch; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.panel-intro strong { color: var(--ink); }

/* Anatomy */
.parts { display: flex; flex-direction: column; gap: 14px; }
.part { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
.letter { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.letter.good { background: var(--good-soft); color: var(--good-ink); }
.letter.master { background: var(--master-soft); color: var(--master-ink); }
.letter.sub { width: 34px; height: 34px; font-size: 16px; border-radius: 9px; background: var(--surface-2); color: var(--master-ink); border: 1px solid var(--line); }
.part h3 { font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; margin-top: 2px; }
.part-text { margin-top: 6px; white-space: pre-wrap; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-wrap: anywhere; }
.nest { margin-left: 22px; padding: 16px 0 4px 22px; border-left: 2px dashed var(--master); display: flex; flex-direction: column; gap: 12px; }
.nest .part { grid-template-columns: 34px minmax(0, 1fr); }
.nest-title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--master-ink); }

.assembled { margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.assembled-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.assembled-head .title { font-weight: 700; font-size: 14px; }
.assembled pre { margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; background: var(--code-bg); max-height: 460px; overflow: auto; }
.counts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; min-height: 40px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; transition: background 0.15s, border-color 0.15s; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.primary:hover { opacity: 0.9; }
.btn.danger-armed { background: var(--bad); border-color: var(--bad); color: #fff; }

/* Builder */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px; align-items: start; }
.fields { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.field { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
.nest .field { grid-template-columns: 34px minmax(0, 1fr); }
.field label { display: block; font-weight: 700; font-size: 14px; margin-top: 2px; }
.field .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.field textarea { margin-top: 8px; width: 100%; min-height: 92px; resize: vertical; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55; color: var(--ink); background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--master-soft); }
.builder-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.meter { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.meter-top b { font-family: var(--font-display); font-size: 18px; }
.meter-top span { font-size: 13px; color: var(--muted); }
.segs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.seg { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 14px; padding: 6px 0; border-radius: 8px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); transition: background 0.2s, color 0.2s; }
.seg.on.good { background: var(--good); border-color: var(--good); color: #fff; }
.seg.on.master { background: var(--master); border-color: var(--master); color: #fff; }
.seg-label { font-size: 12px; color: var(--muted); margin-top: 10px; }
.preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.preview pre { margin: 0; padding: 14px; min-height: 140px; max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; background: var(--code-bg); }
.preview pre.empty { color: var(--muted); font-family: var(--font-body); font-size: 14px; }
.draft-note { font-size: 12px; color: var(--muted); }
.tips { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.tips h3 { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tips ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }

/* Bad prompt view */
.bad-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bad-card pre { margin: 0; padding: 22px; font-family: var(--font-mono); font-size: 17px; white-space: pre-wrap; background: var(--code-bg); }
.bad-card .assembled-head { border-bottom: 1px solid var(--line); }
.missing { margin-top: 18px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.missing div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-width: 0; }
.missing b { font-family: var(--font-display); font-size: 22px; display: block; }
.missing span { font-size: 12.5px; color: var(--muted); display: block; line-height: 1.35; }
.missing .have { background: var(--good-soft); border-color: var(--good); }
.missing .have b { color: var(--good-ink); }
.missing .lack b { color: var(--bad); }
.bad-builder textarea { width: 100%; min-height: 200px; font-family: var(--font-mono); font-size: 14px; line-height: 1.55; color: var(--ink); background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; resize: vertical; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

.site-foot { border-top: 1px solid var(--line); background: var(--surface); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 22px; font-size: 13px; color: var(--muted); }
.site-foot b { color: var(--ink); }

.toast { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 30; }
.toast.show { opacity: 1; transform: none; }

.fade-in { animation: fadeIn 0.25s ease both; }
@keyframes fadeIn { from { opacity: 0.35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } * { transition: none !important; } }

/* Section switcher */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.viewnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--bg); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.viewnav .wrap { display: flex; gap: 6px; padding-block: 10px; overflow-x: auto; scrollbar-width: none; }
.viewnav .wrap::-webkit-scrollbar { display: none; }
.view-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; background: transparent; border-radius: 999px; padding: 9px 16px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--muted); }
.view-btn:hover { color: var(--ink); background: var(--surface); }
.view-btn[aria-selected="true"] { background: var(--rail); color: var(--on-rail); }
.view-btn .count { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.view-btn[aria-selected="true"] .count { background: rgba(255,255,255,0.14); color: var(--on-rail); }
.view .wrap { padding-block: 0 56px; }

/* Shared directory pieces */
.dir-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 18px; }
.dir-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1.1; }
.dir-head .desc { margin-top: 8px; color: var(--muted); max-width: 70ch; }
.dir-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.search { position: relative; max-width: 420px; }
.search input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; padding: 10px 14px 10px 40px; }
.search input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--master-soft); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; min-height: 36px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink); }
.filter:hover { border-color: var(--muted); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.logo-tile { position: relative; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 11px; overflow: hidden; display: grid; place-items: center; background: var(--tile, #3b4a66); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; }
.logo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; background: #ffffff; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dcard { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; transition: border-color 0.15s, transform 0.15s; }
.dcard:hover { border-color: var(--muted); transform: translateY(-1px); }
.dcard-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.dcard-name { font-weight: 700; font-size: 16px; line-height: 1.25; }
.dcard-vendor { font-size: 13px; color: var(--muted); }
.dcard-note { font-size: 14px; color: var(--muted); flex: 1; }
.dcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.t-flagship { background: var(--master-soft); color: var(--master-ink); border-color: transparent; }
.tag.t-open { background: var(--good-soft); color: var(--good-ink); border-color: transparent; }
.tag.t-limited { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.tag.t-india { background: var(--good-soft); color: var(--good-ink); border-color: var(--good); }
.dlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; min-height: 40px; }
.dlink:hover { border-color: var(--ink); }
.dlink svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dcard-date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dir-note { margin-top: 16px; font-size: 13px; color: var(--muted); max-width: 90ch; }
.dir-note a { color: var(--master-ink); }
.empty-state { padding: 32px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.practise-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 600; font-size: 14px; color: var(--good-ink); background: var(--good-soft); border: 0; border-radius: 999px; padding: 7px 14px; min-height: 36px; cursor: pointer; }
.practise-link:hover { text-decoration: underline; }
.practice-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; }
.practice-stage { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cap-head .cap-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 1080px) {
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder-side { position: static; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 28px 20px; }
  .lab .wrap, .practice-layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; padding: 12px; }
  .rail ul { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: thin; }
  .rail li { flex: 0 0 auto; }
  .cap-btn { width: auto; grid-template-columns: 30px auto; gap: 8px; padding: 8px 12px 8px 8px; }
  .cap-icon { width: 30px; height: 30px; }
  .cap-icon svg { width: 18px; height: 18px; }
  .cap-short, .rail-foot { display: none; }
  .brand-note { text-align: left; }
}
@media (max-width: 560px) {
  .plate { height: 40px; }
  .cap-head { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .panel { padding: 16px; }
  .crisp-legend b { font-size: 28px; }
  .crisp-legend span { font-size: 11px; }
  .missing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nest { margin-left: 6px; padding-left: 12px; }
  .tab { flex: 1 1 calc(50% - 8px); }
}
