:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8eef7;
  background: #07111f;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #07111f;
  --bg-soft: #0b1727;
  --panel: rgba(15, 29, 47, 0.93);
  --panel-2: #122238;
  --line: rgba(153, 178, 210, 0.17);
  --line-strong: rgba(197, 216, 239, 0.28);
  --text: #ecf3fc;
  --muted: #94a8bf;
  --gold: #e7ba58;
  --gold-2: #ffd77e;
  --cyan: #6ed6e8;
  --green: #76d8a1;
  --red: #ef8d8d;
  --orange: #f2ad6e;
  --purple: #b8a1ff;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background:
  radial-gradient(circle at 12% -10%, rgba(73, 128, 180, 0.19), transparent 34rem),
  radial-gradient(circle at 90% 5%, rgba(231, 186, 88, 0.1), transparent 30rem),
  var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

h1, h2, h3, p { margin-top: 0; }
h1 { letter-spacing: -0.04em; }
h2, h3 { letter-spacing: -0.025em; }
small { color: var(--muted); }

.app-shell { width: min(1480px, calc(100% - 40px)); margin: 0 auto; }
.setup-shell { padding: 44px 0 80px; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; padding: 30px 6px 38px; }
.hero h1 { margin: 3px 0 12px; font-size: clamp(3rem, 8vw, 6.6rem); line-height: .84; font-weight: 850; }
.hero h1 span, .brand-button span { color: var(--gold); font-weight: 600; }
.hero-copy { max-width: 800px; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.55; color: #b7c8db; }
.eyebrow { margin-bottom: 7px; color: var(--gold-2); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.doctrine-card { min-width: 285px; padding: 20px 24px; border: 1px solid rgba(231,186,88,.34); border-radius: var(--radius); background: linear-gradient(145deg, rgba(231,186,88,.12), rgba(15,29,47,.85)); box-shadow: var(--shadow); }
.doctrine-card strong { color: var(--gold-2); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.doctrine-card p { margin: 8px 0 5px; font-size: 1.12rem; font-weight: 750; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .8fr); gap: 18px; }
.setup-main, .settings-panel, .agents-section { padding: 25px; }
.agents-section, .launch-bar { grid-column: 1 / -1; }
.section-heading, .panel-heading, .drawer-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.section-heading h2, .panel-heading h2, .drawer-heading h3 { margin-bottom: 0; }
.section-copy { color: var(--muted); max-width: 800px; }
.template-category { display: inline-block; margin: 10px 0 18px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--cyan); font-size: .78rem; }

label { display: grid; gap: 7px; margin-bottom: 16px; color: #cdd9e8; font-size: .84rem; font-weight: 700; }
label > span small { font-weight: 500; color: var(--muted); }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; color: var(--text); background: #091522; padding: 11px 12px; transition: border-color .18s ease, box-shadow .18s ease; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231,186,88,.12); }
select { cursor: pointer; }
.compact-field { min-width: 230px; margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.advanced-box { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
fieldset { margin: 0 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
legend { color: var(--muted); font-size: .8rem; }
.checkbox { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; margin: 7px 0; font-weight: 600; }
.checkbox input { width: auto; accent-color: var(--gold); }
.provider-note { display: grid; gap: 6px; padding: 14px; border-radius: 11px; background: rgba(110,214,232,.08); color: var(--muted); font-size: .82rem; }
.provider-note strong { color: var(--cyan); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 15px; cursor: pointer; font-weight: 800; transition: transform .12s ease, border-color .15s ease, background .15s ease, opacity .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.primary { background: linear-gradient(135deg, var(--gold), #cd9138); color: #18202a; box-shadow: 0 7px 22px rgba(231,186,88,.2); }
.button.secondary { border-color: rgba(110,214,232,.35); background: rgba(110,214,232,.1); color: #bfeef5; }
.button.ghost { border-color: var(--line-strong); background: rgba(255,255,255,.025); color: #d4dfec; }
.button.danger-ghost { border-color: rgba(239,141,141,.35); background: rgba(239,141,141,.08); color: #ffc1c1; }
.button.small { padding: 8px 11px; font-size: .78rem; }
.button.full { width: 100%; }
.button.launch { min-width: 220px; padding: 15px 22px; font-size: 1rem; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; font-size: 1.35rem; }

.agent-editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.agent-editor { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 12, 21, .42); }
.agent-editor-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 16px; }
.agent-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(231,186,88,.28); border-radius: 10px; background: rgba(231,186,88,.08); }
.agent-avatar.large { width: 46px; height: 46px; font-size: 1.2rem; }
.launch-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 25px; border: 1px solid rgba(231,186,88,.23); border-radius: var(--radius); background: linear-gradient(90deg, rgba(231,186,88,.08), rgba(15,29,47,.9)); }
.launch-bar > div { display: grid; gap: 5px; }
.launch-bar span { color: var(--muted); font-size: .85rem; }
.form-error, .runtime-error { margin: 0; color: #ffadad; }

.center-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.error-card, .loading-card { width: min(620px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.loading-card { text-align: center; }
.spinner { width: 42px; height: 42px; margin: 0 auto 20px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.session-shell { min-height: 100vh; }
.session-header { position: sticky; top: 0; z-index: 20; min-height: 68px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: rgba(7,17,31,.92); backdrop-filter: blur(18px); }
.brand-lockup { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand-button { border: 0; background: transparent; padding: 0; cursor: pointer; color: white; font-size: 1.08rem; font-weight: 900; letter-spacing: -.02em; }
.brand-lockup > div { display: grid; min-width: 0; }
.brand-lockup strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-lockup small { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .67rem; }
.header-status, .header-actions { display: flex; align-items: center; gap: 8px; }
.connection, .stage-badge, .role-badge, .status-pill, .release-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.connection::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.connection.online::before { background: var(--green); box-shadow: 0 0 9px var(--green); }
.connection.offline::before { background: var(--orange); }
.stage-badge { color: var(--gold-2); border-color: rgba(231,186,88,.28); }
.role-badge { color: var(--cyan); }
.status-pill.success { color: var(--green); }
.status-pill.warning { color: var(--orange); }
.release-badge { color: var(--green); border-color: rgba(118,216,161,.3); background: rgba(118,216,161,.08); }
.error-banner { position: sticky; top: 68px; z-index: 19; padding: 10px 20px; background: #512a30; color: #ffd7db; border-bottom: 1px solid rgba(255,255,255,.1); }

.session-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr) 330px; min-height: calc(100vh - 68px); }
.left-sidebar { position: sticky; top: 68px; align-self: start; height: calc(100vh - 68px); overflow: auto; padding: 18px 14px; border-right: 1px solid var(--line); background: rgba(8,19,33,.74); }
.stage-rail { display: grid; gap: 6px; }
.stage-node { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: start; padding: 10px; border-radius: 10px; color: var(--muted); }
.stage-node > span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; font-size: .72rem; font-weight: 800; }
.stage-node > div { display: grid; gap: 2px; }
.stage-node strong { font-size: .78rem; line-height: 1.2; }
.stage-node small { font-size: .65rem; }
.stage-node.active { background: rgba(231,186,88,.1); color: var(--gold-2); }
.stage-node.active > span { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(231,186,88,.08); }
.stage-node.done { color: #b3ddc5; }
.stage-node.done > span { border-color: rgba(118,216,161,.3); background: rgba(118,216,161,.1); }
.budget-card { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.budget-card > div { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--muted); font-size: .72rem; }
.budget-card strong { color: var(--text); }
.runtime-error { margin-top: 10px; font-size: .68rem; word-break: break-word; }

.session-main { min-width: 0; padding: 20px; }
.question-banner { position: relative; padding: 22px 24px; border: 1px solid rgba(231,186,88,.2); border-radius: var(--radius); background: linear-gradient(120deg, rgba(231,186,88,.09), rgba(15,29,47,.88)); }
.question-banner h1 { max-width: 1050px; margin-bottom: 0; font-size: clamp(1.4rem, 2.4vw, 2.2rem); line-height: 1.25; }
.question-banner .release-badge { margin-top: 14px; }
.tabs { display: flex; gap: 5px; margin: 16px 0; overflow-x: auto; }
.tabs button { border: 1px solid transparent; border-radius: 9px; background: transparent; padding: 9px 13px; color: var(--muted); cursor: pointer; font-weight: 800; text-transform: capitalize; }
.tabs button.active { border-color: var(--line); background: rgba(255,255,255,.04); color: var(--text); }
.room-layout { display: grid; gap: 16px; }
.agent-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.agent-card { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: 0 10px 28px rgba(0,0,0,.16); }
.agent-card-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.agent-card-head > div { display: grid; gap: 2px; }
.agent-card-head small { font-size: .7rem; }
.model-identifier { margin-top: 2px; color: #72849a; font-size: .58rem !important; font-weight: 600; letter-spacing: .015em; overflow-wrap: anywhere; }
.run-dot { width: 8px; height: 8px; border-radius: 50%; background: #69798c; }
.run-dot.thinking { background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: pulse 1.2s ease infinite; }
.run-dot.done { background: var(--green); }
.run-dot.error { background: var(--red); }
@keyframes pulse { 50% { opacity: .35; } }
.position { min-height: 44px; margin: 13px 0; color: #c2d0e0; font-size: .82rem; line-height: 1.45; }
.confidence-row { display: flex; justify-content: space-between; color: var(--muted); font-size: .7rem; }
.meter, .vote-bar { height: 5px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); }
.meter i, .vote-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--gold)); }
.agent-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.agent-meta span { padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.04); color: var(--muted); font-size: .62rem; }
.unfinished { margin: 10px 0 0; color: var(--orange); font-size: .68rem; }

.transcript-panel { overflow: hidden; }
.sticky-heading { position: sticky; top: 68px; z-index: 4; padding: 16px 18px; border-bottom: 1px solid var(--line); background: rgba(15,29,47,.95); backdrop-filter: blur(12px); }
.switch { display: flex; grid-template-columns: auto auto auto; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: .72rem; }
.switch input { display: none; }
.switch > span { position: relative; width: 33px; height: 19px; border-radius: 999px; background: #314155; }
.switch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: white; transition: transform .15s; }
.switch input:checked + span { background: #a77d32; }
.switch input:checked + span::after { transform: translateX(14px); }
.transcript-list { max-height: min(56vh, 680px); overflow: auto; padding: 12px 18px 20px; }
.message { padding: 13px 0; border-bottom: 1px solid var(--line); }
.message:last-child { border-bottom: 0; }
.message-meta { display: flex; align-items: center; gap: 8px; }
.message-meta strong { font-size: .82rem; }
.message-meta span { padding: 3px 6px; border-radius: 5px; background: rgba(110,214,232,.08); color: var(--cyan); font-size: .6rem; font-weight: 800; }
.message-meta time { margin-left: auto; color: var(--muted); font-size: .65rem; }
.message p { margin: 7px 0 4px; color: #d6e1ee; line-height: 1.58; }
.message > small { font-size: .65rem; }
.action-question { border-left: 3px solid var(--purple); padding-left: 12px; }
.action-propose, .action-amend, .action-merge { border-left: 3px solid var(--gold); padding-left: 12px; }
.action-concede, .action-reconsider { border-left: 3px solid var(--green); padding-left: 12px; }

.teacher-drawer { position: sticky; top: 68px; align-self: start; height: calc(100vh - 68px); overflow: auto; padding: 18px; border-left: 1px solid var(--line); background: rgba(9,21,36,.88); }
.drawer-heading { padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.drawer-heading h3 { font-size: 1rem; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 0; }
.teacher-section { display: grid; gap: 9px; padding: 14px 0; border-top: 1px solid var(--line); }
.teacher-section.attention { margin: 4px -7px 0; padding: 14px 7px; border: 1px solid rgba(231,186,88,.25); border-radius: 11px; background: rgba(231,186,88,.06); }
.teacher-section textarea, .teacher-section select { margin: 0; }
.inline-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-actions select { flex: 1; min-width: 150px; }

.blackboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; padding: 16px; }
.panel > .panel-heading { padding: 18px 20px 0; }
.count-badge { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--muted); font-size: .72rem; }
.blackboard-column { min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(4,12,21,.38); }
.blackboard-column > header { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .7rem; letter-spacing: .05em; }
.blackboard-column > div { max-height: 520px; overflow: auto; padding: 8px; }
.blackboard-item { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.blackboard-item + .blackboard-item { margin-top: 7px; }
.blackboard-item p { margin-bottom: 8px; font-size: .79rem; line-height: 1.45; }
.blackboard-item > div { display: flex; justify-content: space-between; color: var(--muted); font-size: .64rem; }
.blackboard-item small { display: block; margin-top: 5px; font-size: .58rem; word-break: break-all; }
.type-scenario_fact > header { color: var(--gold-2); }
.type-tool_verified > header, .type-source_supported > header { color: var(--green); }
.type-hypothesis > header { color: var(--purple); }
.type-contested > header, .type-disproven > header { color: var(--red); }

.ledger-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.ledger-card { overflow: hidden; }
.ledger-card > header { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.ledger-card h3 { margin: 0; font-size: .95rem; }
.ledger-card > div { max-height: 470px; overflow: auto; padding: 8px 13px 13px; }
.ledger-item { padding: 11px 3px; border-bottom: 1px solid var(--line); }
.ledger-item > div { display: flex; justify-content: space-between; gap: 10px; }
.ledger-item strong { color: var(--cyan); font-size: .72rem; }
.ledger-item span { color: var(--muted); font-size: .62rem; }
.ledger-item p { margin: 5px 0; font-size: .8rem; line-height: 1.45; }
.ledger-item small { font-size: .67rem; line-height: 1.4; }
.empty-inline { padding: 12px 0; color: var(--muted); font-size: .75rem; }

.proposal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.proposal-list { display: grid; gap: 14px; }
.proposal-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.proposal-card.status-selected { border-color: rgba(118,216,161,.42); box-shadow: 0 0 0 2px rgba(118,216,161,.08), var(--shadow); }
.proposal-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.proposal-head h3 { margin: 8px 0 0; font-size: 1.25rem; }
.proposal-card > p { margin: 16px 0; color: #cdd9e8; line-height: 1.6; }
.proposal-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-list { padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.mini-list > strong { color: var(--gold-2); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; }
.mini-list ul { margin: 7px 0 0; padding-left: 17px; color: #c0cedd; font-size: .73rem; line-height: 1.5; }
.proposal-card footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; }
.decision-card { position: sticky; top: 84px; padding: 20px; }
.decision-outcome { display: inline-block; padding: 6px 9px; border-radius: 7px; font-size: .7rem; font-weight: 900; }
.decision-outcome.adopted { background: rgba(118,216,161,.12); color: var(--green); }
.decision-outcome.not_adopted, .decision-outcome.unresolved { background: rgba(239,141,141,.12); color: var(--red); }
.decision-card h2 { margin-top: 12px; }
.decision-card > p { color: var(--muted); line-height: 1.5; }
.vote-counts { display: flex; justify-content: space-between; margin: 8px 0 15px; color: var(--muted); font-size: .68rem; }

.reflection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.reflection-card, .reflection-summary { padding: 20px; }
.reflection-card .arrow { margin: -4px 0; color: var(--gold); }
.reflection-card > p { color: #cdd9e8; line-height: 1.45; }
.reflection-card .mini-list { margin-top: 10px; }
.reflection-note { margin-top: 11px; padding: 11px; border-radius: 10px; background: rgba(239,141,141,.07); color: #ddb8bd; font-size: .73rem; line-height: 1.45; }
.reflection-summary { grid-column: 1 / -1; }
.reflection-summary .mini-list { margin-top: 10px; }

.empty-state { display: grid; place-items: center; text-align: center; min-height: 180px; padding: 25px; color: var(--muted); }
.empty-state > span { font-size: 2rem; color: var(--gold); }
.empty-state h3 { margin: 8px 0 4px; color: var(--text); }
.empty-state p { max-width: 540px; margin-bottom: 0; }

@media (max-width: 1250px) {
  .session-layout { grid-template-columns: 205px minmax(0, 1fr); }
  .teacher-drawer { position: static; grid-column: 1 / -1; height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .teacher-drawer .control-grid { grid-template-columns: repeat(4, 1fr); }
  .teacher-section { display: inline-grid; vertical-align: top; width: calc(33.333% - 10px); margin-right: 10px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .doctrine-card { min-width: 0; }
  .setup-grid { grid-template-columns: 1fr; }
  .settings-panel { grid-row: auto; }
  .session-header { grid-template-columns: 1fr auto; }
  .header-actions { grid-column: 1 / -1; overflow-x: auto; }
  .session-layout { grid-template-columns: 1fr; }
  .left-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .stage-rail { grid-template-columns: repeat(5, minmax(140px, 1fr)); overflow-x: auto; }
  .budget-card { display: none; }
  .proposal-layout { grid-template-columns: 1fr; }
  .decision-card { position: static; }
  .teacher-drawer .control-grid { grid-template-columns: 1fr 1fr; }
  .teacher-section { width: 100%; margin-right: 0; }
}

@media (max-width: 620px) {
  .app-shell { width: min(100% - 22px, 1480px); }
  .setup-shell { padding-top: 20px; }
  .hero { padding-bottom: 22px; }
  .setup-main, .settings-panel, .agents-section { padding: 17px; }
  .section-heading, .panel-heading { display: grid; }
  .compact-field { min-width: 0; }
  .field-row, .proposal-columns { grid-template-columns: 1fr; }
  .launch-bar { align-items: stretch; flex-direction: column; }
  .button.launch { width: 100%; }
  .session-header { position: static; grid-template-columns: 1fr; }
  .header-status { flex-wrap: wrap; }
  .error-banner { top: 0; }
  .session-main { padding: 11px; }
  .question-banner { padding: 17px; }
  .sticky-heading { top: 0; }
  .ledger-grid { grid-template-columns: 1fr; }
  .blackboard-grid { grid-template-columns: 1fr; padding: 11px; }
}

.source-box { margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 12, 21, .36); }
.compact-heading { align-items: center; }
.compact-heading h3 { margin: 0; }
.source-help { margin: 12px 0 14px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.file-button { position: relative; margin: 0; overflow: hidden; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.source-empty { padding: 16px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: .78rem; }
.source-list { display: grid; gap: 12px; }
.source-editor { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.source-editor-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-bottom: 12px; }
.source-editor-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cyan); font-size: .83rem; }
.source-editor label:last-child { margin-bottom: 0; }
