/* The look of the author's tools and of the apps the plans ask for: paper and ink, one deep red, serif
   titles, a few small monospace labels, thin rules; the chat behaves like any chatbot's. */
:root {
  --bg: #ece8de;
  --panel: #f4f1ea;
  --surface: #fbf9f4;          /* controls, cards, inputs */
  --ink: #1d1b18;
  --muted: #57524a;
  --faint: #67615a;            /* 4.5:1 or more on --bg and --panel */
  --line: #d9d2c3;
  --accent: #9b2335;
  --accent-hover: #7f1c2b;
  --accent-ink: #ffffff;
  --accent-soft: #f1e4e2;
  --code-bg: #1d1b18;
  --code-bar: #2a2724;
  --code-ink: #ece5d6;
  --model: #c47f00;
  --script: #2ea043;
  --ai: #8957e5;
  --danger: #a4410e;           /* rust, so an error is never mistaken for the accent */
  --err-bg: #fbeee4;
  --err-line: #ecc9b0;
  --ok-bg: #e7f0e3;
  --ok-ink: #1f5f30;
  --warn-bg: #fbf1dc;
  --warn-ink: #7d4a00;
  --note-bg: #fbf5e6;
  --note-line: #e8d9b5;
  --assist-bg: #fbf9f4;
  --lesson-ink: #3a352e;
  --truth-bg: #eef5ea;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(29, 27, 24, .05), 0 6px 22px rgba(29, 27, 24, .07);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --top-h: 56px;
  --foot-h: 34px;
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  color-scheme: light;
}
/* dark mode: the system's choice, or the footer's switch; a dark paper, not navy */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #141311; --panel: #1b1a17; --surface: #23211e; --ink: #ede8de; --muted: #b5aea2; --faint: #958f84; --line: #37332d;
    --accent: #e0707f; --accent-hover: #ea8c98; --accent-ink: #1b0a0d; --accent-soft: #3a1f23;
    --code-bg: #0f0e0d; --code-bar: #1a1917; --err-bg: #3a1d10; --err-line: #6b3a20; --danger: #f0a070;
    --ok-bg: #16281a; --ok-ink: #8fd3a0; --warn-bg: #33270f; --warn-ink: #f1c26b; --note-bg: #2a2412; --note-line: #4d421f;
    --assist-bg: #1b1a17; --lesson-ink: #d9d3c7; --truth-bg: #15241a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 22px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --bg: #141311; --panel: #1b1a17; --surface: #23211e; --ink: #ede8de; --muted: #b5aea2; --faint: #958f84; --line: #37332d;
  --accent: #e0707f; --accent-hover: #ea8c98; --accent-ink: #1b0a0d; --accent-soft: #3a1f23;
  --code-bg: #0f0e0d; --code-bar: #1a1917; --err-bg: #3a1d10; --err-line: #6b3a20; --danger: #f0a070;
  --ok-bg: #16281a; --ok-ink: #8fd3a0; --warn-bg: #33270f; --warn-ink: #f1c26b; --note-bg: #2a2412; --note-line: #4d421f;
  --assist-bg: #1b1a17; --lesson-ink: #d9d3c7; --truth-bg: #15241a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 22px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); }
button, select, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8cbbe6; outline-offset: 2px; }

/* the mark: three bars in the colours of the three layers (model, script, AI) */
.logo { display: block; height: 28px; width: auto; flex: none; }
/* the logo's prompt, as in a terminal: the cursor blinks (not for those who asked their system for less motion) */
.logo .cursor { animation: cursor-blink 1.06s steps(1, end) infinite; }
@keyframes cursor-blink { 50% { fill-opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .logo .cursor { animation: none; } }

/* top bar */
.top {
  height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.name { font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.event { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.session, .seg { display: flex; background: var(--bg); border-radius: 9px; padding: 3px; gap: 2px; flex: none; }
.session button, .seg button { border: 0; background: none; border-radius: 7px; padding: 4px 11px; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.session button[aria-selected=true], .seg button[aria-selected=true] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 30, 54, .18); }
.session .ss { display: none; }
.top-mid { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: center; min-width: 0; }
.top-right { display: flex; align-items: center; gap: 12px; flex: none; }
.chip { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.chip.country { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px 2px 6px; cursor: pointer; }
.chip.country select { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; max-width: 180px; cursor: pointer; padding: 2px 0; }
.chip.country option, .chip.country optgroup { color: var(--ink); background: var(--surface); }
.country-count { font-weight: 400; font-size: 14px; }
.model-pick { display: flex; align-items: center; gap: 6px; }
.model-pick .lbl { font-size: 13px; color: var(--muted); }
.model-pick select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--surface); font-size: 15px; max-width: 210px; }
.badge { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.badge b { color: var(--ink); font-weight: 600; }
.zdr { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; background: var(--ok-bg); color: var(--ok-ink); font-size: 12px; font-weight: 600; }
.top-link { font-size: 14px; color: var(--accent); text-decoration: none; font-weight: 600; }
.top-link:hover { text-decoration: underline; }
.route { font-size: 13px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.route::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.route.ok { background: var(--ok-bg); color: var(--ok-ink); }
.route.warn { background: var(--warn-bg); color: var(--warn-ink); }
.budget { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* work area */
/* --chat-w is the participant's own split, set by dragging the divider (kept in the browser) */
.work { --chat-default: clamp(340px, 31vw, 440px); display: grid; grid-template-columns: var(--chat-w, var(--chat-default)) 1fr; height: calc(100% - var(--top-h) - var(--foot-h)); }
.chat { position: relative; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--panel); min-height: 0; min-width: 0; }
.splitter { position: absolute; top: 0; right: -5px; bottom: 0; width: 10px; cursor: col-resize; z-index: 6; touch-action: none; }
.splitter::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; background: transparent; transition: background .15s; }
.splitter:hover::after, .splitter:focus-visible::after, body.resizing .splitter::after { background: var(--accent); }
.splitter:focus-visible { outline: none; }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing iframe { pointer-events: none; }   /* the app must not swallow the drag */
.log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.log > * { flex-shrink: 0; }   /* a full log scrolls; it must never squeeze a message to a sliver */
.msg { border-radius: var(--radius); padding: 10px 12px; max-width: 100%; }
.msg.user { background: var(--accent-soft); align-self: flex-end; white-space: pre-wrap; font-size: 15px; max-width: 92%; }
.msg.user.clamped { max-height: 9.5em; overflow: hidden; cursor: pointer; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.msg.user .files { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; white-space: normal; }
.msg.assistant { background: var(--assist-bg); border: 1px solid var(--line); }
.msg.note { background: var(--note-bg); border: 1px solid var(--note-line); font-size: 15px; }
.msg.note b { color: var(--warn-ink); }
.msg.err { background: var(--err-bg); color: var(--danger); border: 1px solid var(--err-line); margin-top: 8px; }
.msg .who { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 4px; }
.summary { white-space: pre-wrap; font-size: 15px; }
.answer-md { font-size: 15px; }
.answer-md p { margin: 0 0 8px; }
.answer-md p:last-child, .answer-md ul:last-child, .answer-md ol:last-child { margin-bottom: 0; }
.answer-md ul, .answer-md ol { margin: 0 0 8px; padding-left: 22px; }
.answer-md li { margin: 2px 0; }
/* code, keyboard keys and sample output everywhere: the mono stack, not the browser's default Courier */
code, kbd, samp, pre { font-family: var(--mono); }
.answer-md code { font: 13px var(--mono); background: var(--bg); padding: 1px 4px; border-radius: 4px; }
.answer-md h4 { margin: 8px 0 4px; font-size: 15px; }
.code {
  margin-top: 8px; background: var(--code-bg); color: var(--code-ink); border-radius: 8px;
  font: 12px/1.45 var(--mono); overflow: hidden;
}
.code pre { margin: 0; padding: 10px 12px; max-height: 260px; overflow: auto; white-space: pre; }
.code .bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: var(--code-bar); color: #9fb6cc; font-family: system-ui, sans-serif; font-size: 13px; }
.code .bar button { background: none; border: 0; color: #9fb6cc; cursor: pointer; text-decoration: underline; padding: 0; }
.code.collapsed pre { display: none; }
.lesson { margin-top: 10px; font-size: 14px; color: var(--lesson-ink); background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; }
.lesson .lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); font-weight: 700; margin-bottom: 2px; }
.row { display: flex; gap: 8px; align-items: center; }

/* suggestions: they fill the message box, as in any chatbot */
.suggest { display: flex; flex-direction: column; gap: 5px; padding: 0 16px 10px; }
.suggest .lbl { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; margin-top: 4px; }
.suggest button {
  display: grid; grid-template-columns: 1fr auto; column-gap: 10px; text-align: left; border: 1px solid var(--line);
  background: var(--surface); border-radius: 10px; padding: 6px 12px; cursor: pointer;
}
.suggest button b { font-size: 15px; font-weight: 600; }
.suggest button span { grid-column: 1; font-size: 13px; color: var(--muted); }
.suggest button::after { content: "↗"; grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--faint); }
.suggest button:hover { border-color: var(--accent); }
.suggest button:hover::after { color: var(--accent); }
/* after the first app: small chips that wrap, so the conversation keeps the room */
.suggest.compact { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 16px; border-top: 1px solid var(--line); }
.suggest.compact .lbl { display: none; }
.suggest.compact button { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); border-color: transparent; }
.suggest.compact button b { font-size: 13px; color: var(--accent); }
.suggest.compact button span { display: none; }
.suggest.compact button::after { font-size: 12px; color: var(--accent); }
.suggest.compact button.new { background: var(--surface); border: 1px dashed var(--line); }
.suggest.compact button.new b { color: var(--ink); font-weight: 500; }
.suggest.compact button.new b::before { content: "New app: "; color: var(--faint); font-weight: 400; }
.suggest.compact button.new::after { color: var(--faint); }

/* the message box */
.composer { position: relative; border-top: 1px solid var(--line); padding: 8px 16px 10px; display: flex; flex-direction: column; gap: 6px; }
.composer textarea { width: 100%; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; min-height: 42px; max-height: 40vh; background: var(--surface); font-size: 15px; line-height: 1.45; }
.composer textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
.composer-row { display: flex; align-items: center; gap: 8px; }
.hint { font-size: 12px; color: var(--faint); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continuing { font-size: 13px; color: var(--muted); }
.needs { font-size: 14px; color: var(--warn-ink); background: var(--warn-bg); border-radius: 8px; padding: 6px 10px; }
.attach { display: flex; flex-wrap: wrap; gap: 6px; }
.filechip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 8px 3px 6px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 600; max-width: 100%; }
.filechip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filechip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 2px; font-size: 15px; line-height: 1; }
.ficon { flex: none; font: 700 9px/1 var(--sans); letter-spacing: .03em; color: #fff; border-radius: 3px; padding: 3px 3px; }
.ficon.pdf, .ficon.pdfs { background: #c0392b; }
.ficon.html { background: #2c5f8a; }
.ficon.csv { background: #2e8b57; }
.ficon.lib { background: #7a3e9d; }
.ficon.wiki { background: #8a5a00; }
.ficon.json { background: #5b6b2e; }
.ficon.xlsx { background: #1d6f42; }
.ficon.docx { background: #2b579a; }
.ficon.own { background: var(--faint); font-size: 13px !important; padding: 3px 7px !important; }
.drop-hint { position: absolute; inset: 6px 10px; border: 2px dashed var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--accent-soft) 92%, transparent); color: var(--accent); font-weight: 700; display: none; place-items: center; z-index: 3; pointer-events: none; }
.chat.dragging .drop-hint { display: grid; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 9px; padding: 8px 18px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.primary:hover { background: var(--accent-hover); }
.primary:disabled { opacity: .5; cursor: progress; }
.send { padding: 6px 14px; }
.send::after { content: " ↑"; }
.ghost { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; cursor: pointer; }
.ghost:hover { border-color: var(--accent); }
.ghost.small { padding: 4px 10px; font-size: 14px; }
.ghost.icon { padding: 4px 10px; font-size: 18px; line-height: 1; color: var(--muted); }
.linkish { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-size: inherit; }
.linkish:hover { text-decoration: underline; }

/* stage */
.stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.versions { position: relative; display: flex; gap: 4px; align-items: stretch; min-width: 44px; }
.versions button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 3px 10px; font-size: 14px; cursor: pointer; flex: none; }
.versions .vnav { padding: 3px 9px; font-size: 16px; }
.versions .vnav:disabled { opacity: .35; cursor: default; }
.versions .vcur { max-width: 340px; display: flex; gap: 5px; align-items: baseline; white-space: nowrap; }
.versions .vcur .vapp { overflow: hidden; text-overflow: ellipsis; max-width: 220px; color: var(--muted); }
.versions .vcur b { color: var(--accent); }
.versions .vcur .vof { color: var(--faint); font-size: 12px; }
.vmenu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; width: min(440px, 80vw); max-height: 60vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; }
.vmenu .vglab { font: 600 11px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 8px 6px 4px; }
.vmenu button { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; width: 100%; text-align: left; border: 0; border-radius: 4px; padding: 5px 6px; background: none; }
.vmenu button:hover, .vmenu button:focus { background: var(--bg); }
.vmenu button[aria-checked=true] b { color: var(--accent); }
.vmenu button span { font-size: 13px; }
.vmenu button i { grid-column: 2; font-size: 11px; font-style: normal; color: var(--faint); }
.tools { display: flex; gap: 8px; margin-left: auto; align-items: center; flex: none; }
.tool { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 6px 12px; font-size: 14px; cursor: pointer; white-space: nowrap; color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.tool:hover { border-color: var(--accent); }
.tool:disabled { opacity: .45; cursor: default; }
.look { font-weight: 600; }
.caret { width: 0; height: 0; border: 5px solid transparent; border-top-color: currentColor; margin-top: 5px; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; text-align: center; font-weight: 600; }
.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); width: 340px; z-index: 20; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(16, 30, 54, .22);
  display: flex; flex-direction: column;
}
.mi { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 0; background: none; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.mi:hover { background: var(--bg); }
.mi b { font-size: 15px; }
.mi span { font-size: 13px; color: var(--muted); }
.mi[aria-pressed=true] b::after { content: " · on"; color: var(--accent); }
#linkBtn[aria-pressed=false] b { color: var(--danger); }

.viewport { position: relative; flex: 1; background: var(--panel); min-height: 0; overflow: hidden; }
.viewport > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }   /* the app's frames, not a PDF in the drawer */
.viewport > iframe.back { visibility: hidden; }

/* the file shelf: where the data comes from, before the first app */
.empty { position: absolute; inset: 0; overflow-y: auto; padding: 36px clamp(20px, 5%, 64px); background: radial-gradient(ellipse at 50% 0%, var(--accent-soft) 0, var(--panel) 60%); }
.shelf-head h2 { margin: 0 0 4px; font-size: 24px; }
.shelf-head p { margin: 0 0 18px; color: var(--muted); }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.fcard { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); cursor: grab; transition: transform .12s ease, border-color .12s ease; }
.fcard:hover { border-color: var(--accent); transform: translateY(-1px); }
.fcard:active { cursor: grabbing; }
.fcard.needed { border-color: var(--warn-ink); box-shadow: 0 0 0 3px var(--warn-bg); animation: nudge 1s ease 2; }
.fcard.used { border-color: var(--script); }
@keyframes nudge { 50% { transform: translateY(-3px); } }
.fcard-top { display: flex; align-items: center; gap: 10px; }
.fcard .ficon { font-size: 11px; padding: 5px 5px; border-radius: 4px; }
.fcard h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.fcard p { margin: 0; font-size: 13px; color: var(--muted); flex: 1; }
.fcard .meta { font-size: 12px; color: var(--faint); }
.fcard.add-own { border-style: dashed; box-shadow: none; cursor: default; }
.fcard.add-own:hover { transform: none; }
.own-samples { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--muted); }
.own-samples input { margin: 1px 0 0; }
.own-preview { width: 100%; border-collapse: collapse; font-size: 12px; margin: 10px 0; }
.own-sent { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.own-preview caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.own-preview th, .own-preview td { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: left; vertical-align: top; }
.fcard .row { flex-wrap: wrap; }
.fcard .ghost { font-size: 14px; padding: 5px 10px; }
.shelf-note { margin: 18px 0 0; font-size: 14px; color: var(--muted); max-width: 720px; }
.drawer-body .shelf { grid-template-columns: 1fr; }

/* the plan for a workshop app, on the stage: a document to read, like one in any chatbot */
.planview { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; background: var(--bg, #f5f7fa); }
.plan-bar { display: flex; align-items: center; gap: 12px; padding: 12px clamp(16px, 4%, 40px); background: var(--panel); border-bottom: 1px solid var(--line); }
.plan-name { flex: 1; min-width: 0; }
.plan-kicker { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.plan-bar h2 { margin: 2px 0 0; font-size: 20px; line-height: 1.25; }
.plan-scroll { flex: 1; overflow-y: auto; padding: 20px clamp(16px, 4%, 40px) 40px; }
.plan-doc { max-width: 820px; margin: 0 auto; padding: 26px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 17px; line-height: 1.6; }
.plan-doc h4 { margin: 22px 0 6px; font-size: 19px; }
.plan-doc h4.sub { margin-top: 14px; font-size: 17px; }
.plan-doc h4:first-child { margin-top: 0; }
.plan-doc p, .plan-doc ul, .plan-doc ol { margin: 0 0 8px; }
.plan-doc li { margin-bottom: 4px; }
.plan-doc code { font-size: .88em; padding: 1px 4px; border-radius: 4px; background: var(--accent-soft); }
@media (max-width: 1150px) { .plan-doc { padding: 20px; font-size: 16px; } }
/* the code behind the app */
.codeview { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: var(--code-bg); color: var(--code-ink); }
.codeview-note { margin: 0; padding: 10px 16px; font-size: 14px; color: #b9cbdc; background: var(--code-bar); border-bottom: 1px solid #22303f; }
.codeview-note b { color: #fff; }
.codeview pre { flex: 1; margin: 0; overflow: auto; padding: 12px 0; display: flex; align-items: flex-start; font: 13px/1.55 var(--mono); }
.codeview .gutter { flex: none; min-width: 52px; padding: 0 14px 0 8px; text-align: right; color: #4b5d70; user-select: none; white-space: pre; }
.codeview code { flex: 1; padding-right: 16px; white-space: pre; font: inherit; }
.tk-tag { color: #7cc4ff; }
.tk-attr { color: #c8a6ff; }
.tk-str { color: #a5e3a0; }
.tk-com { color: #6f8396; font-style: italic; }
.tk-kw { color: #ffb86b; }
.tk-num { color: #f5d67b; }
/* a JSON file in the drawer, as a code editor shows it */
.json-view { margin: 0 0 12px; padding: 12px 14px; max-height: 68vh; overflow: auto; border-radius: 10px; background: var(--code-bg); color: var(--code-ink); font: 12.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

.building, .apperror {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 5; border-radius: 999px;
  padding: 7px 16px; font-size: 14px; box-shadow: 0 4px 18px rgba(16, 30, 54, .14);
}
.building { top: 14px; background: var(--code-bg); color: #fff; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #58a6ff; animation: pulse 1s infinite alternate; flex: none; }
@keyframes pulse { from { opacity: .3; } to { opacity: 1; } }
/* the model's thinking fills the stage until the first line of code arrives */
.mind {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; gap: 18px;
  padding: 36px clamp(24px, 6%, 80px) 28px; color: #cfe3f7;
  background: radial-gradient(ellipse at 30% 0%, #18263a 0, #0e1621 60%);
  opacity: 0; pointer-events: none; transition: opacity .6s ease;
}
.viewport.thinking .mind { opacity: 1; pointer-events: auto; }
.viewport.thinking .building { display: none; }
.mind-head { display: flex; align-items: baseline; gap: 10px; font-size: 16px; color: #9fb6cc; letter-spacing: .02em; flex-wrap: wrap; }
.mind-head .pulse { align-self: center; }
.mind-head #mindTitle { color: #fff; font-weight: 600; }
.mind-where { font-size: 13px; color: #7f95ab; }
.mind-time { margin-left: auto; font-variant-numeric: tabular-nums; }
.mind-text {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: clamp(16px, 1.45vw, 20px); line-height: 1.6;
  max-width: 980px; width: 100%; margin: 0 auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%); mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
}
.mind.code .mind-text { font: 14px/1.5 var(--mono); color: #9fc4e8; }
.mind-note { margin: 0 auto; max-width: 980px; width: 100%; font-size: 14px; color: #8aa0b5; border-top: 1px solid #1f2d3d; padding-top: 12px; }
.apperror { bottom: 14px; background: var(--err-bg); color: var(--danger); display: flex; gap: 12px; align-items: center; max-width: 90%; border-radius: 12px; }
.apperror details { font-size: 13px; }
.apperror summary { cursor: pointer; }
.apperror button { background: var(--danger); color: #fff; border: 0; border-radius: 7px; padding: 5px 12px; cursor: pointer; white-space: nowrap; }
.apperror button.recorded { background: transparent; color: var(--danger); border: 1px solid var(--danger); }

/* drawer: files, trace, run x3, ask x3, take it further */
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(540px, 92%); z-index: 10;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(16, 30, 54, .14);
  display: flex; flex-direction: column;
}
.drawer.wide { width: min(860px, 74%); }
.drawer.wide .drawer-body { overflow: hidden; flex: 1; min-height: 0; }   /* the PDF fills the drawer; nothing scrolls the header away */
.drawer-body iframe.pdf { flex: 1; min-height: 0; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.src-head { font-size: 14px; color: var(--muted); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 18px; }
.drawer-body { overflow-y: auto; padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.drawer-body p { margin: 0; }
.drawer-body h4 { margin: 6px 0 0; font-size: 15px; }
.tot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tot div { background: var(--bg); border-radius: 8px; padding: 10px; }
.tot b { display: block; font-size: 22px; }
.tot .kept b { color: var(--script); }
.tot small { color: var(--muted); }
.req { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; }
.req h4 { margin: 0 0 4px; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.req h4 span { font-weight: 400; color: var(--muted); font-size: 13px; }
.req .meta { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.req ul { margin: 4px 0; padding-left: 18px; }
.req .out li::marker { color: var(--danger); }
.req .kept li::marker { color: var(--script); }
.req .lab { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-top: 6px; }
.req details { margin-top: 6px; font-size: 13px; }
.req details pre { white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; background: var(--bg); padding: 8px; border-radius: 6px; }
.runs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.runs div { background: var(--bg); border-radius: 8px; padding: 10px; text-align: center; font-size: 14px; }
.runs code { font-size: 18px; font-weight: 700; display: block; margin-top: 4px; }
.verdict { padding: 10px 12px; border-radius: 8px; }
.verdict.same { background: var(--ok-bg); color: var(--ok-ink); }
.verdict.diff { background: var(--warn-bg); color: var(--warn-ink); }
.answers { display: flex; flex-direction: column; gap: 8px; }
.answer { border: 1px solid var(--line); border-radius: 8px; padding: 10px; white-space: pre-wrap; font-size: 14px; }
.answer .who, .truth .who { font-size: 12px; text-transform: uppercase; color: var(--faint); letter-spacing: .06em; }
.truth { border: 2px solid var(--script); border-radius: 8px; padding: 10px; background: var(--truth-bg); }
.question { font-style: italic; color: var(--muted); }
.seg { align-self: flex-start; }
.tool-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.tool-card h4 { margin: 0 0 2px; }
.tool-card p { font-size: 14px; color: var(--muted); }
.tool-card .row { margin-top: 6px; font-size: 14px; }
.prompt-box { position: relative; }
.prompt-box textarea { width: 100%; min-height: 170px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); font: 13px/1.5 var(--mono); resize: vertical; }
.caution { font-size: 14px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 8px 10px; }

/* footer: who made this, and the open tools it comes from */
.foot { height: var(--foot-h); display: flex; align-items: center; gap: 14px; padding: 0 16px; border-top: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }
.foot-who b { color: var(--ink); font-weight: 600; }
.foot-links { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.foot-end { display: flex; gap: 14px; flex: none; }
.foot .linkish { font-size: 13px; }

dialog { border: 0; border-radius: 16px; padding: 22px 24px; width: min(440px, 92vw); box-shadow: 0 20px 60px rgba(16, 30, 54, .3); background: var(--panel); color: var(--ink); }
dialog h2 { margin: 0 0 6px; }
dialog input { width: 100%; font-size: 24px; letter-spacing: .2em; text-transform: uppercase; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; margin: 10px 0; background: var(--surface); }
dialog .row { justify-content: space-between; margin-top: 8px; }
#seatForm .row { flex-direction: row-reverse; }   /* Start is first in the markup (Enter presses it) and stays on the right */
dialog .err { color: var(--danger); margin: 0; }
dialog::backdrop { background: rgba(14, 22, 33, .45); }

/* the model's thinking, streamed before the code */
.thought { margin: 2px 0 8px; font-size: 14px; color: var(--muted); }
.thought summary { cursor: pointer; font-weight: 600; }
.thought .tt { margin-top: 6px; max-height: 140px; overflow-y: auto; white-space: pre-wrap; font-style: italic; border-left: 3px solid var(--line); padding-left: 8px; }
.thought .tt.md { white-space: normal; }
.thought .tt.md p, .thought .tt.md ul, .thought .tt.md ol { margin: 0 0 6px; }
.thought .tt.md ul, .thought .tt.md ol { padding-left: 18px; }

/* plan mode: the pill above the box, the planner's steps and questions, the plan as a card */
.planmode { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 2px 11px 2px 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.planmode::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 2px solid currentColor; }
.planmode[aria-pressed=true] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.planmode[aria-pressed=true]::before { background: currentColor; }
.sim { margin: 2px 0 8px; font-size: 13px; line-height: 1.45; color: var(--muted); background: var(--bg); border-left: 3px solid var(--ai); border-radius: 4px; padding: 6px 9px; }
.sim b { color: var(--ink); }
.sim.mock { border-left-color: var(--danger); }
.flow { display: flex; flex-direction: column; gap: 6px; }
.flow:empty { display: none; }
.flow .thought { margin: 0; }
.step { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.msg.assistant > .step { margin-bottom: 8px; }
.step-ico { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
.step-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.step-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.step-label { font-weight: 600; overflow-wrap: anywhere; }
.step-detail { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.step-pages { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; }
.step-pages:empty { display: none; }
.step-pages .linkish { text-align: left; }
.step.running .step-ico { animation: pulse .5s infinite alternate; }
.step.running .step-detail, .step.running .step-pages { visibility: hidden; }
.plan-msg .status { margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan-msg .summary { margin-top: 6px; }
.plan-msg .summary:empty { display: none; }
.msg.ask { background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--shadow); }
.msg.ask.answered { background: var(--assist-bg); border-color: var(--line); box-shadow: none; }
.ask-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ask-chip { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.ask-n { margin-left: auto; font-size: 12px; color: var(--faint); }
.ask-q { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.msg.ask.answered .ask-q { margin: 0; font-weight: 400; color: var(--muted); }
.ask-opts { display: flex; flex-direction: column; gap: 6px; }
.ask-opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.ask-opt:hover, .ask-opt:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.ask-k { flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.ask-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.ask-body b { font-size: 15px; }
.ask-body small { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.rec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ok-ink); background: var(--ok-bg); border-radius: 4px; padding: 0 5px; }
.ask-note { margin: 8px 0 0; font-size: 13px; color: var(--warn-ink); }
.plan-card { display: flex; gap: 10px; align-items: center; width: 100%; margin-top: 8px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.plan-card:hover { border-color: var(--accent); }
.plan-card-ico { flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.plan-card-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.plan-card b { display: block; font-size: 15px; }
.plan-card small { color: var(--muted); font-size: 13px; }
.approve { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
.approve p { margin: 0 0 8px; font-weight: 600; font-size: 15px; }
.approve .row { flex-wrap: wrap; gap: 6px; }
.approve .primary, .approve .ghost { padding: 6px 12px; }
.approve button:disabled { opacity: .5; cursor: default; }
/* what md() makes of tables and fenced code */
.answer-md .md-table { overflow-x: auto; margin: 0 0 8px; }
.answer-md table { border-collapse: collapse; font-size: .92em; }
.answer-md th, .answer-md td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
.answer-md th { background: var(--bg); }
.answer-md pre.md-code { margin: 0 0 8px; padding: 8px 10px; background: var(--code-bg); color: var(--code-ink); border-radius: 8px; overflow-x: auto; white-space: pre; font: 13px/1.5 var(--mono); }
.answer-md pre.md-code code { background: none; padding: 0; color: inherit; font: inherit; }
/* a reference-shelf page and the facilitator's brief, in the drawer */
.drawer-body .lab { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 4px; }
.sent-excerpt { border: 1px solid var(--line); border-left: 3px solid var(--danger); border-radius: 8px; padding: 8px 10px; background: var(--bg); }
.brief { border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; }

/* phone: hand over to the laptop */
body.handoff-mode .top, body.handoff-mode .work, body.handoff-mode .foot { display: none; }
.handoff { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.handoff-card { background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); padding: 24px 20px; max-width: 420px; width: 100%; }
.handoff-card .logo { height: 36px; }
.handoff h1 { font-size: 24px; line-height: 1.25; margin: 14px 0 8px; }
.handoff p { color: var(--muted); }
.handoff-code { font: 700 34px/1.2 var(--mono); letter-spacing: .18em; padding: 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); text-align: center; }
.handoff .row { flex-wrap: wrap; margin-top: 8px; }

/* projector: ?wall=1 shows the app alone */
body.wall .chat, body.wall .toolbar, body.wall .foot { display: none; }
body.wall .work { grid-template-columns: 1fr; height: calc(100% - var(--top-h)); }

@media (max-width: 1500px) { .event { display: none; } }
@media (max-width: 1400px) { .model-pick .lbl { display: none; } .foot-links .tb { display: none; } }
@media (max-width: 1366px) { .badge { display: none; } }
@media (max-width: 1200px) {
  .badge { display: none; }
  .work { --chat-default: 340px; }
}
/* a 13-inch laptop at a larger text size: the bar keeps every control, in fewer words */
@media (max-width: 1150px) {
  .top { gap: 12px; }
  .brand .name, .brand .event { display: none; }
  .session .sl { display: none; }
  .session .ss { display: inline; }
  .country-count { display: none; }
  .chip.country select { max-width: 150px; }
  .model-pick select { max-width: 170px; }
  .foot-links { display: none; }
}

/* a library PDF drawn by PDF.js, the quoted passage marked */
.pdf-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.pdf-note .pdf-found { flex-basis: 100%; }
.pdfview { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pdfpage { position: relative; margin: 0 auto; }
.pdfpage canvas { display: block; width: 100%; height: 100%; }
.pdfmark { position: absolute; background: rgba(155, 35, 53, .22); border-bottom: 2px solid #9b2335; pointer-events: none; }
.fcard .from { font-size: 13px; color: var(--muted); }
.fcard .from .from-icon { margin-right: 3px; }
.runs3 { width: 100%; border-collapse: collapse; font-size: 14px; }
.runs3 th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 4px 6px; }
.runs3 td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.runs3 td.mark { color: var(--ok, #2ea043); font-weight: 700; text-align: center; width: 1.5em; }
.runs3 tr.differs td { background: rgba(207, 34, 46, .08); }
.runs3 tr.differs td.mark { color: #cf222e; }
.drawer-body .small { font-size: 12px; }

/* the tour: the screen dimmed around one lit element, a card beside it */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour-hole { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(10, 14, 22, .55); outline: 2px solid #fff; transition: all .25s ease; pointer-events: none; }
.tour-card { position: fixed; max-width: 360px; background: var(--panel); color: var(--ink); border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); padding: 16px 18px; transition: top .25s ease, left .25s ease; }
.tour-n { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tour-card h3 { margin: 4px 0 6px; font-size: 18px; }
.tour-card p { margin: 0 0 14px; font-size: 15px; line-height: 1.5; }
.tour-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tour-card.wide { max-width: min(540px, calc(100vw - 32px)); padding: 24px 28px 20px; }
.tour-card.wide h3 { font-size: 26px; margin-bottom: 12px; }
.tour-card.wide p { margin-bottom: 10px; }
.tour-card.wide .tour-row { margin-top: 18px; }

/* ---------- the look: paper, with a chat that behaves like any chatbot's ---------- */
/* serif for names and headings; monospace only for sessions, the App/Code switch and small labels */
.name { font-family: var(--serif); font-weight: 400; font-size: 19px; }
.shelf-head h2, .drawer-head h3, .fcard h3, .plan-doc h4, .tour-card h3, .handoff-card h1 { font-family: var(--serif); font-weight: 400; }
.shelf-head h2 { font-size: 30px; }
.session button, .seg button, .msg .who, .suggest .lbl, .lesson .lbl { font-family: var(--mono); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
/* tabs underlined in red, as in the author's tools */
.session, .seg { background: none; border-radius: 0; padding: 0; gap: 0; border-bottom: 1px solid var(--line); }
.session button, .seg button { border-radius: 0; border-bottom: 2px solid transparent; padding: 6px 10px 5px; }
.session button[aria-selected=true], .seg button[aria-selected=true] { background: none; box-shadow: none; color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
/* nearly square corners, thin rules */
.primary, .ghost, .tool, .versions > button, .suggest button, .fcard, .filechip, .needs, .msg.note, .msg.err, .drawer .verdict, .tour-card { border-radius: 3px; }
.chip { border-radius: 3px; background: none; border: 1px solid var(--line); }
.fcard { box-shadow: none; }
.fcard:hover { border-color: var(--accent); }
.empty { background: var(--panel); }
.lesson { background: none; border-radius: 0; border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; }
/* the chat, as in ChatGPT and Claude: the model's replies without a frame, yours in a soft bubble,
   the message box as a card that floats above the bottom edge */
.msg.assistant { background: transparent; border: 0; padding-left: 2px; padding-right: 2px; }
.msg.user { background: color-mix(in srgb, var(--ink) 7%, var(--panel)); border-radius: 14px; }
.composer { margin: 0 12px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); padding: 8px 10px; }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { border: 0; border-radius: 0; background: transparent; padding: 6px 4px; }
.composer textarea:focus { outline: none; }
/* the app on the stage: a sheet on the desk, so it is clear where the studio ends and the app begins */
.viewport { background: var(--bg); }
.viewport > iframe { inset: auto; top: 10px; left: 10px; width: calc(100% - 20px); height: calc(100% - 20px); border: 1px solid var(--line); box-shadow: var(--shadow); }
body.wall .viewport > iframe { top: 0; left: 0; width: 100%; height: 100%; border: 0; box-shadow: none; }
dialog { border-radius: 6px; }
dialog h2 { font-family: var(--serif); font-weight: 400; }
#feedbackDialog { width: min(560px, 92vw); }
#feedbackText { width: 100%; resize: vertical; font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); margin: 8px 0; }
.feedback-ctx { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.feedback-ctx ul { margin: 6px 0 0; padding-left: 18px; max-height: 160px; overflow: auto; }
.feedback-ctx b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.retry-note { margin: 4px 0 8px; font-size: 14px; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 10px; }
/* the footer: the author on the left, the buttons on the right (the tools moved into About, 4.11.2026) */
.foot .foot-end { margin-left: auto; }

/* screenshots in a message */
.filechip.pic img { width: 28px; height: 20px; object-fit: cover; border-radius: 2px; }
.msg.user .files img.pic { max-width: 160px; max-height: 110px; border: 1px solid var(--line); border-radius: 4px; display: block; }

/* a question about the data: the table the browser computed */
.qcard { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px 12px; }
.qcard .qhead { font: 600 11px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.qcard table { width: 100%; border-collapse: collapse; font-size: 13px; }
.qcard caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.qcard th, .qcard td { border-bottom: 1px solid var(--line); padding: 3px 6px; text-align: left; vertical-align: top; }
.qcard td.num { text-align: right; font-variant-numeric: tabular-nums; }
.qcard .qnote { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.qcard .qerr { color: var(--warn-ink); margin: 0; }
.qcard pre { white-space: pre-wrap; font-size: 12px; max-height: 260px; overflow: auto; }
.qcard .row { margin-top: 6px; }

/* Basic (the default): one path through the exercises; Advanced (footer) shows the rest */
body.basic .adv { display: none !important; }

/* Suggest improvements: the ways to review, to pick from */
.msg.lenses button { display: block; width: 100%; text-align: left; margin-top: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.msg.lenses button:hover { border-color: var(--accent); }
.msg.lenses button span { display: block; font-size: 12px; color: var(--muted); }
.mi:disabled { opacity: .45; cursor: default; }
/* one toolbar row on a 1280 px laptop: the app's name gives way first */
@media (max-width: 1400px) { .versions .vcur .vapp { max-width: 120px; } .versions .vcur .vof { display: none; } }

/* Venice, the session on one's own idea: the participant's own files without Advanced */
body.basic.own-ok .fcard.own.adv, body.basic.own-ok .fcard.add-own.adv { display: flex !important; }

/* the room chat: the facilitator's newest message, and the Messages drawer (studio.js, Room) */
.room-btn { border: 0; background: none; cursor: pointer; padding: 0; font-family: inherit; position: relative; }
.room-dot { position: absolute; top: -3px; right: -9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.room-strip { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); width: min(780px, calc(100% - 32px)); z-index: 30;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent); color: var(--ink); box-shadow: 0 10px 28px rgba(16, 30, 54, .18); }
.room-lab { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.room-lab span { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); margin-left: 4px; }
.room-text { flex: 1 1 320px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30vh; overflow-y: auto; }
.room-text a, .room-msg a { color: var(--accent); font-weight: 600; }
.room-x { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
.room-list { display: flex; flex-direction: column; gap: 10px; }
.room-msg { padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.room-msg .who { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; white-space: normal; }
.room-msg.mine { align-self: flex-end; max-width: 88%; background: var(--accent-soft); border-color: transparent; }
.room-form { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.room-form textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); resize: vertical; min-height: 64px; }
.room-form .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.room-form small { color: var(--muted); }
.room-err { color: var(--danger); font-size: 14px; }
.room-empty { color: var(--muted); }
.room-btn { margin-right: 6px; }
