/* Drawlogue: one paper, one ink for the assistant, one marker for you. */
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-ext.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Your own words on the board, in a hand that reads the same on a laptop, a tablet and a phone. */
@font-face { font-family: "Shantell Sans Variable"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/fonts/hand.woff2) format("woff2-variations"); }
:root {
  --paper: #fbfaf7;
  --dot: #e4e1d8;
  --ink: #1f2328;          /* the assistant's drawing ink */
  --ink-soft: #5b616a;
  --ink-faint: #6f747c;
  --line: #2b3037;
  --card: #ffffff;
  --group: var(--hover);
  --group-line: #cfcabd;
  --marker: #d9442b;       /* your marker */
  --marker-soft: rgba(217, 68, 43, 0.12);
  --marker-text: #c8391f;  /* small red text needs a little more weight to read */
  --hover: #f3f1ea;
  --hover-strong: #ebe8df;
  --veil: rgba(251, 250, 247, 0.96);
  --note-user: #fff4f1;
  --stale: #d08700;
  --answer: #1d4ed8;       /* the assistant's answers pinned to the board */
  --answer-soft: #eef3ff;
  --ui: #ffffff;
  --ui-line: #dcd8cc;
  --shadow: 0 1px 2px rgba(31, 35, 40, 0.06), 0 6px 24px rgba(31, 35, 40, 0.08);
  --sans: "Inter Variable", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --hand: "Shantell Sans Variable", "Bradley Hand", "Segoe Print", cursive;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Dark board: tuned by hand, not inverted. Follows the system unless you choose in the More menu. */
:root[data-theme="dark"] {
  --paper: #171614; --dot: #2c2a26;
  --ink: #e8e6e1; --ink-soft: #b3b0a8; --ink-faint: #96938b;
  --line: #b9b6ae; --card: #262421;
  --group: #1d1c19; --group-line: #45423c;
  --marker: #f0624a; --marker-soft: rgba(240, 98, 74, 0.16); --marker-text: #f58470;
  --answer: #8fb0ff; --answer-soft: #1a2138;
  --ui: #22211e; --ui-line: #3a3833;
  --hover: #2b2a26; --hover-strong: #34322d; --veil: rgba(23, 22, 20, 0.96); --note-user: #2e1d19; --stale: #e0a021;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
:root[data-theme="dark"] .tint-stone { --tint: #33312c; --tint-line: #8f8b82; --tint-text: #d9d6cf; }
:root[data-theme="dark"] .tint-ochre { --tint: #2e2610; --tint-line: #d3a63c; --tint-text: #f3dc9f; }
:root[data-theme="dark"] .tint-moss  { --tint: #1e2d1a; --tint-line: #7fb06b; --tint-text: #c8e4ba; }
:root[data-theme="dark"] .tint-teal  { --tint: #0f2d2a; --tint-line: #3fa598; --tint-text: #a9e0d8; }
:root[data-theme="dark"] .tint-steel { --tint: #1a2735; --tint-line: #5a84ac; --tint-text: #bcd3e6; }
:root[data-theme="dark"] .tint-plum  { --tint: #35203a; --tint-line: #d48cc8; --tint-text: #f0cdea; }
:root[data-theme="dark"] kbd { background: var(--hover); }
:root[data-theme="dark"] #peek, :root[data-theme="dark"] #tablet, :root[data-theme="dark"] #shortcuts, :root[data-theme="dark"] #sources, :root[data-theme="dark"] #pages { background: rgba(0, 0, 0, 0.5); }
:root[data-theme="dark"] #tablet-qr { background: #e8e6e1; border-radius: 8px; padding: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 120ms !important; }
}
:focus-visible { outline: 2px solid var(--answer); outline-offset: 2px; }
#board:focus-visible, input:focus-visible, textarea:focus-visible { outline: none; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
.spacer { flex: 1; }
.muted { color: var(--ink-soft); }

/* ---------- board ---------- */
#board { position: fixed; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
#board.panning { cursor: grabbing; }
.dot { fill: var(--dot); }
.arrowhead { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#viewport.animate { transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1); }
/* while you drag parts around, they stay under the pen: no easing, no fading in */
#viewport.dragging .node, #viewport.dragging .node :is(rect.shape, path.rough) { transition: none; }
#viewport.dragging .edge { animation: none; }

.node { transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 300ms; }
.node.enter { opacity: 0; }
.node :is(rect.shape, path.rough) { fill: var(--card); stroke: var(--line); stroke-width: 1.25; transition: width 420ms, height 420ms, stroke 150ms; }
.node .label { font: 600 14px var(--sans); fill: var(--ink); }
.node .summary { font: 400 12px var(--sans); fill: var(--ink-soft); }
.node .kind { font: 500 10px var(--sans); fill: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; }
.node.kind-external :is(rect.shape, path.rough) { stroke-dasharray: 5 4; fill: var(--paper); }
.node.kind-store :is(rect.shape, path.rough) { fill: var(--card); }
.node.kind-store .store-line { stroke: var(--line); stroke-width: 1.25; fill: none; }
.node.kind-actor :is(rect.shape, path.rough) { fill: var(--paper); }
.node.has-more .more { fill: var(--ink-faint); font: 500 11px var(--sans); }
.node:hover :is(rect.shape, path.rough) { stroke-width: 1.75; }

/* tints: six quiet colours for telling parts apart. Use one only when it answers a question ("which are stores?"). */
.tint-stone { --tint: #f1efe9; --tint-line: #8f8a7f; --tint-text: #3d3a34; }
.tint-ochre { --tint: #faefcb; --tint-line: #8f6b12; --tint-text: #553d0c; }
.tint-moss  { --tint: #e7f1df; --tint-line: #4c7a3e; --tint-text: #294620; }
.tint-teal  { --tint: #dcf1ee; --tint-line: #1f7f74; --tint-text: #0f4640; }
.tint-steel { --tint: #e3ebf3; --tint-line: #335d85; --tint-text: #1f3b57; }
.tint-plum  { --tint: #f5e8f2; --tint-line: #b86aa8; --tint-text: #5c2553; }
.node.leaf:where([class*="tint-"]) .label { fill: var(--tint-text); }
.node.leaf:where([class*="tint-"]) :is(rect.shape, path.rough) { fill: var(--tint); stroke: var(--tint-line); }
.node.leaf:where([class*="tint-"]) .store-line { stroke: var(--tint-line); }

.node.group :is(rect.shape, path.rough) { fill: var(--group); stroke: var(--group-line); stroke-width: 1; }
.node.group .label { font: 600 13px var(--sans); fill: var(--ink); }
.node.group .summary { fill: var(--ink-soft); }
.node.group:where([class*="tint-"]) :is(rect.shape, path.rough) { fill: color-mix(in srgb, var(--tint) 60%, var(--paper)); stroke: var(--tint-line); }
.node .toggle { cursor: pointer; }
.node .toggle rect { fill: transparent; }
.node .toggle path { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; stroke-linecap: round; }

.node.marked :is(rect.shape, path.rough) { stroke: var(--marker); stroke-width: 2; }
.node.marked .halo { opacity: 1; }
.node .halo { fill: var(--marker-soft); opacity: 0; transition: opacity 150ms; }
.node.fresh :is(rect.shape, path.rough) { animation: fresh 1600ms ease-out; }
@keyframes fresh { 0% { stroke: var(--answer); stroke-width: 2.5; } 100% { } }

/* notes pinned to the board */
.node.note :is(rect.shape, path.rough) { fill: var(--answer-soft); stroke: none; }
.node.note .bar { fill: var(--answer); }
.node.note.by-user :is(rect.shape, path.rough) { fill: var(--note-user); }
.node.note.by-user .bar { fill: var(--marker); }
.node.note .q { font: 500 13px var(--hand); fill: var(--marker); }
.node.note .a { font: 400 12.5px var(--sans); fill: var(--ink); }
.node.note.by-user .a { font: 450 14px var(--hand); fill: var(--marker); }
.node.note .dismiss { cursor: pointer; opacity: 0; transition: opacity 120ms; }
.node.note:hover .dismiss { opacity: 1; }
.node.note .dismiss circle { fill: var(--card); stroke: var(--ui-line); }
.node.note .dismiss path { stroke: var(--ink-soft); stroke-width: 1.3; stroke-linecap: round; }

.edge path.wire { fill: none; stroke: var(--line); stroke-width: 1.25; }
.edge.note-edge path.wire { stroke: var(--answer); stroke-dasharray: 2 4; stroke-width: 1.25; opacity: 0.7; }
.edge.note-edge.by-user path.wire { stroke: var(--marker); }
.edge .edge-label-bg { fill: var(--paper); }
.edge .edge-label { font: 400 11.5px var(--sans); fill: var(--ink-soft); }
.edge.unverified path.wire { stroke-dasharray: 6 4; stroke: var(--ink-faint); } /* no line of code was given for it */
.edge.marked path.wire { stroke: var(--marker); stroke-width: 2; }
.edge { animation: appear 380ms ease-out 200ms both; }
#layer-edges.focusing .edge:not(.near):not(.note-edge) { opacity: 0.3; animation: none; }
#layer-edges.focusing .edge.near path.wire { stroke-width: 1.75; }
#viewport.far .node .summary, #viewport.far .node .kind, #viewport.far .edge-label, #viewport.far .edge-label-bg { opacity: 0; transition: opacity 160ms; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* your ink */
.stroke { fill: var(--marker); opacity: 0.9; }
.stroke.sent { opacity: 0.35; transition: opacity 400ms; }
.stroke.kept { opacity: 0.9; }
.stroke.kept.picked, .ink-text.picked { opacity: 1; filter: drop-shadow(0 0 3px rgba(217, 68, 43, 0.55)); }
.ink-text { font: 450 15px var(--hand); fill: var(--marker); paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; }

/* ---------- chrome ---------- */
#topbar { position: fixed; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
#topbar > * { pointer-events: auto; }
.chip-button, .ghost { background: var(--ui); border: 1px solid var(--ui-line); border-radius: 8px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 1px 2px rgba(31,35,40,0.05); }
.chip-button .brand { font-weight: 700; letter-spacing: -0.01em; }
.chip-button .sep { color: var(--ink-faint); }
.ghost { color: var(--ink-soft); font-size: 13px; }
.ghost .icon { display: none; }
.ghost.icon-only { padding: 7px; }
.ghost:disabled { opacity: 0.38; cursor: default; }
.ghost:disabled:hover { border-color: var(--ui-line); color: var(--ink-soft); }
.ghost:hover, .chip-button:hover { border-color: var(--ink-faint); color: var(--ink); }
.ghost.on { color: var(--ink); border-color: var(--ink); }
#board-title { font-size: 13px; color: var(--ink-soft); padding-left: 6px; pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
button.quiet { background: none; border: none; color: var(--ink-soft); padding: 4px 6px; border-radius: 6px; font-size: 12.5px; }
button.quiet:hover { color: var(--ink); background: rgba(31,35,40,0.05); }

.popover { position: fixed; top: 52px; left: 12px; width: 320px; max-height: 70vh; overflow: auto; background: var(--ui); border: 1px solid var(--ui-line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 20; }
.popover .row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.popover .row:hover { background: var(--hover); }
.popover .row.current { background: var(--hover-strong); }
.popover .row .name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popover .row .meta { color: var(--ink-faint); font-size: 12px; white-space: nowrap; }
.popover .row.new { color: var(--answer); font-weight: 600; border-top: 1px solid var(--ui-line); border-radius: 0; margin-top: 4px; }
.popover .row.all { color: var(--ink-soft); }
.popover .row.session .meta { display: none; }
.popover { width: 360px; }
.popover .label { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 10px 4px; }

/* the dock */
#dock { position: fixed; left: 50%; bottom: calc(16px + var(--keyboard, 0px)); transform: translateX(-50%); width: min(720px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; align-items: stretch; pointer-events: none; z-index: 10; }
#dock > * { pointer-events: auto; }
#composer { display: flex; align-items: center; gap: 6px; background: var(--ui); border: 1px solid var(--ui-line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); }
#composer:focus-within { border-color: var(--ink-faint); }
#composer-input { flex: 1; border: none; outline: none; font: inherit; font-size: 15px; background: none; padding: 6px 4px; min-width: 0; }
#mic-button { width: 34px; height: 34px; border-radius: 8px; border: none; background: none; color: var(--ink-soft); display: grid; place-items: center; flex: none; }
#mic-button:hover { background: var(--hover); color: var(--ink); }
#mic-button.live { background: var(--marker); color: #fff; animation: live 1.2s ease-in-out infinite; }
#mic-button.handsfree { box-shadow: 0 0 0 1.5px var(--marker); color: var(--marker); }
#mic-button.handsfree.live { color: #fff; }
#mic-button.unsupported { opacity: 0.35; cursor: not-allowed; }
@keyframes live { 50% { box-shadow: 0 0 0 6px var(--marker-soft); } }
#send-button { border: none; background: var(--ink); color: var(--paper); border-radius: 8px; padding: 8px 14px; font-weight: 600; flex: none; }
#send-button:disabled { opacity: 0.4; cursor: default; }
#hint { text-align: center; font-size: 11.5px; color: var(--ink-faint); }
/* once there is a board: where it stands instead of how to mark */
#status { display: none; justify-content: center; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--ink-faint); }
body.has-board #status { display: flex; }
body.has-board #hint { display: none; }
#status .sep { opacity: 0.5; }
#status a { color: var(--ink-soft); cursor: pointer; text-decoration: underline; text-decoration-color: var(--ui-line); text-underline-offset: 2px; }
#status a:hover { color: var(--ink); }
#activity { align-self: center; display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 12.5px; max-width: 100%; }
#activity #activity-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#activity .quiet { color: #c9cdd3; }
#activity .quiet:hover { color: #fff; background: rgba(255,255,255,0.12); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #8fb4ff; animation: pulse 1s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: 0.25; } }
#reply { background: var(--ui); border: 1px solid var(--ui-line); border-left: 3px solid var(--answer); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.5; max-height: 30vh; overflow: auto; white-space: pre-wrap; }
#reply.settled { max-height: 5.4em; }
#reply.settled:hover { max-height: 40vh; }
#reply .close { float: right; margin: -4px -6px 0 8px; }

/* writing next to your mark */
/* a card of its own, so what you type is never read through a box underneath */
#mark-bubble { position: fixed; z-index: 15; width: 296px; background: var(--ui); border: 1px solid var(--ui-line); border-left: 3px solid var(--marker); border-radius: 10px; box-shadow: var(--shadow); padding: 9px 12px 10px; }
#mark-understood { font-size: 11.5px; color: var(--marker-text); margin-bottom: 3px; }
#mark-input { width: 100%; border: none; outline: none; resize: none; background: transparent; font: 450 16px/1.35 var(--hand); color: var(--marker); padding: 0; overflow: hidden; }
#mark-input::placeholder { color: rgba(217, 68, 43, 0.45); }
#mark-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
#mark-actions button { background: var(--ui); border: 1px solid var(--ui-line); border-radius: 999px; padding: 3px 10px; font-size: 12px; box-shadow: 0 1px 2px rgba(31,35,40,0.05); }
#mark-actions button:hover { border-color: var(--ink); }
#mark-actions button.quiet { border: none; background: none; box-shadow: none; }
#mark-files { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--ui-line); display: flex; flex-direction: column; gap: 3px; }
#mark-files:empty { display: none; }
#mark-files a { font: 11.5px var(--mono); color: var(--ink-soft); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }

#mark-bubble.away { opacity: 0; pointer-events: none; }
#move-handle { position: fixed; z-index: 14; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: var(--ui); border: 1px solid var(--marker); color: var(--marker); display: grid; place-items: center; box-shadow: var(--shadow); cursor: grab; touch-action: none; }
#move-handle:active { cursor: grabbing; background: var(--marker); color: #fff; }
#mark-files a:hover { color: var(--answer); border-color: var(--answer); }
#mark-files a b { color: var(--ink); font-weight: 600; }
#home-filter { width: 100%; border: 1px solid var(--ui-line); border-radius: 9px; padding: 8px 12px; font: inherit; background: var(--ui); color: var(--ink); outline: none; margin-bottom: 12px; }
#home-filter:focus { border-color: var(--ink-faint); }

/* conversation drawer */
#talk { position: fixed; top: 56px; right: 12px; bottom: 16px; width: 340px; background: var(--ui); border: 1px solid var(--ui-line); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 12; }
.talk-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--ui-line); font-weight: 600; }
#talk-log { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.turn { line-height: 1.5; font-size: 13.5px; white-space: pre-wrap; }
.turn.user { color: var(--marker-text); font-family: var(--hand); font-size: 14.5px; font-weight: 450; }
.turn.user .marks { display: block; font: 11.5px var(--sans); color: var(--ink-faint); }
.turn.assistant { border-left: 2px solid var(--answer); padding-left: 10px; }
.turn .drew { display: block; font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }

/* home: projects, their working sessions, and opening another codebase */
#start { position: fixed; inset: 0; background: var(--veil); z-index: 30; overflow: auto; padding: 56px 24px 48px; }
.start-card { width: min(720px, 100%); margin: 0 auto; }
.start-card h1 { font-size: 34px; letter-spacing: -0.03em; margin: 0 0 4px; }
.start-card .lede { font-size: 17px; color: var(--ink-soft); margin: 0 0 32px; }
#health { margin: -16px 0 28px; padding: 9px 12px; font-size: 13.5px; line-height: 1.45; border: 1px solid var(--ui-line); border-left: 3px solid var(--stale); border-radius: 10px; background: var(--ui); }
.start-card h2 { font-size: 15px; margin: 32px 0 10px; }
.start-card .label { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin: 18px 0 6px; }
#home-empty p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); max-width: 56ch; margin: 0 0 12px; }
#home-empty button { border: 1px solid var(--ui-line); background: var(--ui); color: var(--ink); border-radius: 8px; padding: 6px 12px; font-size: 14px; font-weight: 600; margin-right: 8px; }
#home-empty button:hover { border-color: var(--ink); }
.project { background: var(--ui); border: 1px solid var(--ui-line); border-radius: 12px; padding: 6px; margin-bottom: 12px; }
.project.missing { opacity: 0.6; }
.project-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; }
.project-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.project-title .name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.project-title .path { font: 11.5px var(--mono); color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-head .new { border: 1px solid var(--ui-line); background: var(--ui); border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.project-head .new:hover { border-color: var(--ink); }
.project .empty, #browser .empty { padding: 4px 12px 10px; color: var(--ink-faint); font-size: 13px; }
.row.session { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 12px; border-radius: 8px; cursor: pointer; border-top: 1px solid transparent; }
.row.session:hover { background: var(--hover); }
.row.session.current { background: var(--hover-strong); }
.row.session .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.session .meta { color: var(--ink-faint); font-size: 12px; white-space: nowrap; }
.row.session .name .tag { font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--answer); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 8px; vertical-align: 1px; }
.turn details.read { margin-top: 4px; font-size: 11.5px; color: var(--ink-faint); }
.turn details.read summary { cursor: pointer; }
.turn details.read a { display: block; font: 11.5px var(--mono); color: var(--ink-soft); cursor: pointer; padding: 1px 0 1px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turn details.read a:hover { color: var(--answer); }
.row.session .acts { display: none; }
.row.session:hover .acts, .row.session:focus-within .acts { display: flex; }
.row.session input.rename { flex: 1; min-width: 0; font: inherit; border: 1px solid var(--ink-faint); border-radius: 6px; padding: 3px 6px; outline: none; background: var(--ui); }
#notebook-form { display: flex; gap: 6px; }
#notebook-form input { flex: 1; min-width: 0; border: 1px solid var(--ui-line); border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 15px; background: var(--ui); color: var(--ink); outline: none; }
#notebook-form input:focus { border-color: var(--ink-faint); }
#notebook-form button { border: none; background: var(--ink); color: var(--paper); border-radius: 9px; padding: 0 18px; font-weight: 600; }
#starters { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin-top: 8px; font-size: 12.5px; color: var(--ink-faint); }
#starters span { margin-right: 4px; }
#starters button { text-decoration: underline; text-decoration-color: var(--ui-line); text-underline-offset: 3px; }
#notebook-more { display: flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 28px; }
#notebook-more .spacer { flex: 1; }
#doc-names { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.node.inferred :is(rect.shape, path.rough) { stroke: var(--ink-faint); }
#mark-files .source { font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
#mark-files .source .checked, #mark-files .source .unchecked { display: block; margin-top: 3px; font-size: 11.5px; color: var(--ink-faint); }
#mark-files .source .unchecked { color: var(--marker-text); }
#mark-files .source q { display: block; margin-top: 2px; color: var(--ink); font-style: italic; quotes: "“" "”"; }
#mark-files .source a { display: inline; }
#custom-project { display: flex; gap: 6px; }
#custom-project input { flex: 1; min-width: 0; border: 1px solid var(--ui-line); border-radius: 9px; padding: 9px 12px; font: 13px var(--mono); background: var(--ui); outline: none; }
#custom-project input:focus { border-color: var(--ink-faint); }
#custom-project button { border: none; background: var(--ink); color: var(--paper); border-radius: 9px; padding: 0 16px; font-weight: 600; }
#custom-project button.secondary { background: var(--ui); color: var(--ink); border: 1px solid var(--ui-line); font-weight: 500; }
#browser { margin-top: 8px; background: var(--ui); border: 1px solid var(--ui-line); border-radius: 12px; overflow: hidden; }
#browser-list { max-height: 264px; overflow: auto; padding: 6px; }
#browser-list .row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
#browser-list .row:hover { background: var(--hover); }
#browser-list .row.up { color: var(--ink-soft); }
#browser-list .tag { font: 10.5px var(--mono); color: var(--ink-faint); border: 1px solid var(--ui-line); border-radius: 4px; padding: 0 4px; }
#browser-here { padding: 0 14px 10px; font-size: 12.5px; }
#browser-here:empty { display: none; }
#nearby { display: flex; flex-wrap: wrap; gap: 6px; }
#nearby button { background: var(--ui); border: 1px solid var(--ui-line); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
#nearby button:hover { border-color: var(--ink); }
#start-cancel { margin-top: 24px; }

/* code peek */
#peek { position: fixed; inset: 0; background: rgba(31,35,40,0.25); display: grid; place-items: center; z-index: 40; padding: 24px; }
.peek-card { width: min(900px, 100%); max-height: 100%; background: var(--ui); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.peek-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--ui-line); font: 12.5px var(--mono); }
#peek-body { margin: 0; padding: 14px; overflow: auto; font: 12px/1.55 var(--mono); tab-size: 2; }

#toast { position: fixed; top: 56px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 50; max-width: 80vw; }

/* joining from a tablet */
#tablet { position: fixed; inset: 0; background: rgba(31,35,40,0.25); display: grid; place-items: center; z-index: 40; padding: 24px; }
.tablet-card { width: min(560px, 100%); background: var(--ui); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.tablet-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--ui-line); font-weight: 600; }
.tablet-body { display: flex; gap: 24px; padding: 20px; align-items: center; }
.tablet-body.offline #tablet-qr, .tablet-body.offline #tablet-code { display: none; }
#tablet-qr { width: 176px; height: 176px; flex: none; }
#tablet-qr svg { width: 100%; height: 100%; display: block; }
.tablet-how p { margin: 0 0 12px; line-height: 1.5; }
.tablet-how p.small { font-size: 12.5px; margin: 12px 0 0; }
#tablet-url { font: 12.5px var(--mono); color: var(--ink); }
#tablet-code { font: 600 26px var(--mono); letter-spacing: 0.12em; }
#tablet-devices { border-top: 1px solid var(--ui-line); padding: 6px 10px 10px; }
#tablet-devices:empty { display: none; }
#tablet-devices .label { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 10px 4px; }
#tablet-devices .row { display: flex; align-items: center; gap: 8px; padding: 4px 10px; }
#tablet-devices .row .name { font-weight: 600; flex: 1; }
#tablet-devices .row .meta { color: var(--ink-faint); font-size: 12px; }

/* a finger or pen is the main way in: bigger things to hit, nothing hidden behind hover */
@media (pointer: coarse) {
  .chip-button, .ghost { padding: 9px 13px; font-size: 14px; }
  button.quiet { padding: 8px 10px; font-size: 13.5px; }
  #move-handle { width: 40px; height: 40px; }
  #mark-actions { gap: 6px; margin-top: 8px; }
  #mark-actions button { padding: 8px 14px; font-size: 14px; }
  #mark-files a { padding: 6px 8px; font-size: 12.5px; }
  #mic-button { width: 40px; height: 40px; }
  #send-button { padding: 10px 16px; }
  #composer-input { font-size: 16px; } /* smaller than this and the tablet zooms the page when you tap it */
  .node.note .dismiss, .node.note .tuck { opacity: 0.85; }
  .popover .row, .row.session { padding: 12px 10px; }
  .row.session .acts { display: flex; }
  #reply.settled { max-height: 30vh; }
  #topbar { flex-wrap: wrap; }
}

/* what you marked, and what to do with it, when you are using a pen or finger */
#mark-bar { background: var(--ui); border: 1px solid var(--ui-line); border-left: 3px solid var(--marker); border-radius: 12px; padding: 8px 8px 8px 12px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; }
#bar-understood { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--marker-text); }
#bar-understood .read-as { color: var(--ink); font-family: var(--hand); font-size: 15px; font-weight: 450; cursor: pointer; }
#bar-actions { display: flex; gap: 6px; flex: none; align-items: center; }
#bar-actions button { background: var(--ui); border: 1px solid var(--ui-line); border-radius: 999px; padding: 8px 14px; font-size: 14px; white-space: nowrap; }
#bar-actions button.primary { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
#bar-actions button.quiet { border: none; background: none; padding: 8px 6px; }

/* notes tucked away as a pin on their box; a part that is planned, not built */
.pin { cursor: pointer; }
.pin circle { fill: var(--answer-soft); stroke: var(--answer); stroke-width: 1.25; }
.pin text { font: 600 11px var(--sans); fill: var(--answer); }
.node.note .tuck { cursor: pointer; opacity: 0; transition: opacity 120ms; }
.node.note:hover .tuck { opacity: 1; }
.node.note .tuck circle { fill: var(--card); stroke: var(--ui-line); }
.node.note .tuck path { stroke: var(--ink-soft); stroke-width: 1.3; stroke-linecap: round; }
.node.planned :is(rect.shape, path.rough) { stroke-dasharray: 3 3; fill: var(--paper); }
.node.planned .kind { fill: var(--marker-text); }
#editor-planned-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
#editor-planned-row input { width: auto; margin: 0; accent-color: var(--marker); }

/* a walk-through being played over the diagram */
.flow-badge circle { fill: var(--card); stroke: var(--answer); stroke-width: 1.5; }
.flow-badge text { font: 600 11px var(--sans); fill: var(--answer); }
.flow-badge.on circle { fill: var(--answer); }
.flow-badge.on text { fill: var(--paper); font-size: 13px; }
#viewport.walking .edge:not(.flow-on):not(.note-edge) { opacity: 0.3; animation: none; }
.edge.flow-on path.wire { stroke: var(--answer); stroke-width: 2.25; }
.node.flow-on :is(rect.shape, path.rough) { stroke: var(--answer); stroke-width: 2; }
#flow-bar { background: var(--ui); border: 1px solid var(--ui-line); border-left: 3px solid var(--answer); border-radius: 12px; padding: 8px 8px 10px 12px; box-shadow: var(--shadow); }
.flow-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-faint); }
#flow-title { font-weight: 600; color: var(--ink); font-size: 13px; }
.flow-step { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
#flow-text { flex: 1; min-width: 0; font-size: 15px; line-height: 1.4; }
.flow-step button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ui-line); background: var(--ui); font-size: 18px; line-height: 1; flex: none; }
.flow-step button:hover:not(:disabled) { border-color: var(--ink); }
.flow-step button:disabled { opacity: 0.35; cursor: default; }

/* focus: the parts you chose stay; what they connect to steps back; the rest is out of view */
.node.context { opacity: 0.55; }
#focus-bar { background: var(--ui); border: 1px solid var(--ui-line); border-left: 3px solid var(--ink); border-radius: 12px; padding: 8px 8px 8px 12px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; font-size: 13px; }
#focus-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#focus-clear { border: 1px solid var(--ui-line); background: var(--ui); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
#focus-clear:hover { border-color: var(--ink); }

/* tables, equations, charts and simulations */
.node.item :is(rect.shape, path.rough) { fill: var(--card); stroke: var(--ui-line); stroke-width: 1; }
.node.item .label { font: 600 13px var(--sans); }
.node.item .th { font: 600 11px var(--sans); fill: var(--ink-faint); letter-spacing: 0.04em; }
.node.item .td { font: 400 12px var(--sans); fill: var(--ink); font-variant-numeric: tabular-nums; }
.node.item .td.calc { font-weight: 600; }
.node.item .td.wrong { fill: var(--marker); }
.node.item .rule { stroke: var(--ui-line); stroke-width: 1; opacity: 0.7; }
.node.item .rule.strong { stroke: var(--ink-soft); opacity: 1; }
.node.item .grid { stroke: var(--ui-line); stroke-width: 1; opacity: 0.6; }
.node.item .axis { stroke: var(--ink-soft); stroke-width: 1; fill: none; }
.node.item .tick { font: 400 10.5px var(--sans); fill: var(--ink-faint); font-variant-numeric: tabular-nums; }
.node.item .line { fill: none; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.node.item .s0 { stroke: var(--ink); fill: var(--ink); }
.node.item .s1 { stroke: var(--answer); fill: var(--answer); }
.node.item .s2 { stroke: var(--marker); fill: var(--marker); }
.node.item .line.s0, .node.item .line.s1, .node.item .line.s2 { fill: none; }
.node.item .bar { stroke: none; }
.node.item .dot { stroke: none; }
.node.item-image :is(rect.shape, path.rough) { fill: var(--card); }
#cards { position: fixed; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; pointer-events: none; z-index: 1; }
#cards.animate { transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.card-html { position: absolute; transition: left 420ms cubic-bezier(0.2, 0.7, 0.2, 1), top 420ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.card-math { color: var(--ink); font-size: 17px; }
.card-math .katex-display { margin: 0; }
.card-math.probe { position: fixed; left: -9999px; top: 0; width: max-content; visibility: hidden; }
.sim-frame { display: block; width: 100%; border: 0; border-top: 1px solid var(--ui-line); border-bottom: 1px solid var(--ui-line); background: #fff; pointer-events: none; }
.card-sim.entered .sim-frame { pointer-events: auto; outline: 2px solid var(--answer); outline-offset: -2px; }
.sim-controls { pointer-events: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; padding: 8px 13px 0; font-size: 12px; color: var(--ink-soft); }
.sim-param { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-width: 0; }
.sim-param input { width: 100%; min-width: 0; accent-color: var(--ink); }
.sim-param output { font-variant-numeric: tabular-nums; color: var(--ink); min-width: 3.5em; text-align: right; }
.sim-buttons { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.sim-buttons button { background: var(--ui); border: 1px solid var(--ui-line); border-radius: 999px; padding: 3px 12px; font-size: 12px; color: var(--ink); }
.sim-buttons button:hover { border-color: var(--ink); }
.sim-error { color: var(--marker-text); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#viewport.dragging ~ * .card-html, #cards.still .card-html { transition: none; }

/* an open question from the assistant, with answers you can tap */
.node.item-question :is(rect.shape, path.rough) { fill: #fffbea; stroke: #d9c88a; }
:root[data-theme="dark"] .node.item-question :is(rect.shape, path.rough) { fill: #2b2715; stroke: #6f6335; }
.node.item-question .q-text { font: 500 13.5px var(--sans); fill: var(--ink); }
.node.item-question .q-own { font: 400 12.5px var(--sans); fill: var(--marker-text); }
.node.item-question .option { cursor: pointer; }
.node.item-question .option rect { fill: var(--card); stroke: var(--ui-line); stroke-width: 1; }
.node.item-question .option text { font: 400 12.5px var(--sans); fill: var(--ink); }
.node.item-question .option .tag { font-size: 10.5px; fill: var(--ink-faint); letter-spacing: 0.04em; text-transform: uppercase; }
.node.item-question .option:hover rect { stroke: var(--ink); }
.node.item-question .option.chosen rect { fill: var(--ink); stroke: var(--ink); }
.node.item-question .option.chosen text { fill: var(--paper); font-weight: 600; }
.node.item-question.answered .option:not(.chosen) { opacity: 0.45; }

/* a task from the spec, on the box it builds */
.node.item-task :is(rect.shape, path.rough) { fill: var(--card); stroke: var(--ink-soft); stroke-dasharray: 2 3; }
.node.item-task.is-doing :is(rect.shape, path.rough) { stroke: var(--answer); stroke-dasharray: none; }
.node.item-task.is-done :is(rect.shape, path.rough) { stroke: #4c7a3e; stroke-dasharray: none; }
.node.item-task .task-id { font: 500 10.5px var(--mono); fill: var(--ink-faint); }
.node.item-task .task-title { font: 500 12.5px var(--sans); fill: var(--ink); }
.task-state { cursor: pointer; }
.task-state rect { fill: var(--hover); stroke: var(--ui-line); }
.task-state text { font: 600 10.5px var(--sans); fill: var(--ink-soft); }
.is-doing .task-state rect { fill: var(--answer-soft); stroke: var(--answer); } .is-doing .task-state text { fill: var(--answer); }
.is-done .task-state rect { fill: #e7f1df; stroke: #4c7a3e; } .is-done .task-state text { fill: #294620; }
.task-head .stands { font-size: 11px; border: 1px solid var(--ui-line); border-radius: 999px; padding: 0 8px; color: var(--ink-soft); }
.task-head .stands.is-doing { color: var(--answer); border-color: var(--answer); }
.task-head .stands.is-done { color: #4c7a3e; border-color: #4c7a3e; }

/* the spec drafted from a board */
#spec { position: fixed; inset: 0; background: rgba(31,35,40,0.25); display: grid; place-items: center; z-index: 40; padding: 24px; }
.spec-card { width: min(820px, 100%); max-height: 100%; background: var(--ui); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.spec-card .peek-head { font: 600 14px var(--sans); gap: 2px; }
.spec-body { overflow: auto; padding: 6px 22px 22px; font-size: 14px; line-height: 1.55; }
.spec-body h2 { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; margin: 20px 0 6px; }
.spec-body h3 { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; margin: 24px 0 8px; }
.spec-body ul { margin: 0; padding-left: 18px; }
.spec-body p { margin: 0 0 8px; }
.spec-body .small { font-size: 12.5px; margin-top: 16px; }
#spec-warnings:empty { display: none; }
#spec-warnings { margin: 12px 0 0; padding: 9px 12px; border: 1px solid var(--ui-line); border-left: 3px solid var(--stale); border-radius: 10px; font-size: 13px; }
.task { border: 1px solid var(--ui-line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.task-head { display: flex; align-items: baseline; gap: 8px; }
.task-head b { font-size: 14px; }
.task-head .id { font: 11.5px var(--mono); color: var(--ink-faint); }
.task-head .spacer { flex: 1; }
.task dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 6px 0 0; font-size: 13px; }
.task dt { color: var(--ink-faint); white-space: nowrap; }
.task dd { margin: 0; }
.task code { font: 12px var(--mono); }

/* a quiz: boxes blanked for you to fill in, then judged */
.node.blank :is(rect.shape, path.rough) { fill: var(--paper); stroke: var(--marker); stroke-dasharray: 4 3; }
.node.group.blank :is(rect.shape, path.rough) { fill: var(--group); }
.node.blank .ask { font: 600 20px var(--sans); fill: var(--marker); opacity: 0.55; }
.node.blank .yours { font: 450 15px var(--hand); fill: var(--marker-text); }
.node .verdict { font: 500 11px var(--sans); }
.node.verdict-right :is(rect.shape, path.rough) { stroke: #4c7a3e; stroke-width: 2; } .node.verdict-right .verdict { fill: #4c7a3e; }
.node.verdict-close :is(rect.shape, path.rough) { stroke: #8f6b12; stroke-width: 2; } .node.verdict-close .verdict { fill: #8f6b12; }
.node.verdict-wrong :is(rect.shape, path.rough) { stroke: var(--marker); stroke-width: 2; } .node.verdict-wrong .verdict { fill: var(--marker-text); }
#quiz-bar { background: var(--ui); border: 1px solid var(--ui-line); border-left: 3px solid var(--marker); border-radius: 12px; padding: 8px 8px 8px 12px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; font-size: 13px; }
#quiz-text { flex: 1; min-width: 0; }
#quiz-check { border: none; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* a box the current branch changed */
.node.touched :is(rect.shape, path.rough) { stroke: var(--answer); stroke-width: 2.25; }
#branch { background: var(--ui); border: 1px solid var(--ui-line); border-left: 3px solid var(--answer); border-radius: 12px; padding: 8px 8px 8px 12px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; font-size: 13px; }
#branch-text { flex: 1; min-width: 0; }
#branch-ask { border: 1px solid var(--ui-line); background: var(--ui); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
#branch-ask:hover { border-color: var(--ink); }
#reply .changes { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-faint); }
#reply .changes a { color: var(--answer); cursor: pointer; margin-left: 6px; }

/* a box whose files changed since it was drawn */
.stale-dot { display: none; fill: var(--stale); stroke: var(--paper); stroke-width: 2; }
.node.stale .stale-dot { display: block; }
#stale { background: var(--ui); border: 1px solid var(--ui-line); border-left: 3px solid var(--stale); border-radius: 12px; padding: 8px 8px 8px 12px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; font-size: 13px; }
#stale-text { flex: 1; min-width: 0; }
#stale-recheck { border: 1px solid var(--ui-line); background: var(--ui); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
#stale-recheck:hover { border-color: var(--ink); }

/* find, the more menu, the shortcut sheet */
#find { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 16px)); background: var(--ui); border: 1px solid var(--ui-line); border-radius: 12px; box-shadow: var(--shadow); z-index: 22; overflow: hidden; }
#find-input { width: 100%; border: none; outline: none; padding: 11px 14px; font: inherit; font-size: 15px; background: none; }
#find-results { border-top: 1px solid var(--ui-line); padding: 4px; }
#find-results:empty { display: none; }
#find-results .row { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
#find-results .row.on, #find-results .row:hover { background: var(--hover-strong); }
#find-results .name { font-weight: 600; white-space: nowrap; }
#find-results .meta { color: var(--ink-faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#find-results .empty { padding: 8px 10px; color: var(--ink-faint); font-size: 13px; }
#more-menu { left: auto; right: 12px; width: 264px; }
#find-row { display: none; }
#more-menu .row.on { font-weight: 600; }
#shortcuts { position: fixed; inset: 0; background: rgba(31,35,40,0.25); display: grid; place-items: center; z-index: 40; padding: 24px; }
.shortcuts-card { width: min(680px, 100%); max-height: 100%; overflow: auto; background: var(--ui); border-radius: 12px; box-shadow: var(--shadow); }
.shortcuts-card .peek-head { font: 600 14px var(--sans); position: sticky; top: 0; background: var(--ui); }
.shortcuts-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; padding: 14px 20px 20px; }
.shortcuts-body h3 { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 8px; font-weight: 500; }
.shortcuts-body dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0; font-size: 13px; }
.shortcuts-body dt { white-space: nowrap; }
.shortcuts-body dd { margin: 0; color: var(--ink-soft); }
kbd { font: 11.5px var(--mono); background: var(--hover); border: 1px solid var(--ui-line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; }
.peek-head .spacer { flex: 1; }

/* the line of code behind a connection */
.evidence { flex-basis: 100%; min-width: 0; display: flex; flex-direction: column; gap: 3px; margin-bottom: 4px; }
.evidence code { font: 11.5px var(--mono); color: var(--ink); background: var(--hover); border-radius: 6px; padding: 5px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence a { font: 11.5px var(--mono); color: var(--ink-soft); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence a:hover { color: var(--answer); }
.evidence .none { font-size: 12px; color: var(--ink-faint); }
#peek-body .line-hit { background: var(--marker-soft); display: inline-block; width: 100%; }
#more-menu select { font: inherit; border: 1px solid var(--ui-line); border-radius: 6px; background: var(--ui); color: var(--ink); padding: 2px 4px; margin-left: auto; }
#more-menu .row.field { display: flex; align-items: center; cursor: default; }

/* changing things yourself: colour, edit, connect, delete */
.tools { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ui-line); }
.tools:empty { display: none; }
.tools .swatch { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1.25px solid var(--tint-line); background: var(--tint); }
.tools .swatch.none { --tint: var(--card); --tint-line: var(--line); background: linear-gradient(135deg, transparent 46%, var(--ink-faint) 46%, var(--ink-faint) 54%, transparent 54%), var(--card); }
.tools .swatch.on { box-shadow: 0 0 0 2px var(--ui), 0 0 0 3.5px var(--ink); }
.tools .gap { flex: 1; min-width: 6px; }
.tools button.tool { background: none; border: none; padding: 3px 6px; border-radius: 6px; font-size: 12.5px; color: var(--ink-soft); }
.tools button.tool:hover { color: var(--ink); background: rgba(31,35,40,0.05); }
.tools button.tool.strong { color: var(--ink); font-weight: 600; }
.tools button.tool.danger:hover { color: var(--marker); background: var(--marker-soft); }

#editor, #entry-editor { position: fixed; z-index: 26; width: 320px; background: var(--ui); border: 1px solid var(--ui-line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
#editor-title, #entry-title { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
#editor input, #editor textarea, #entry-editor input { width: 100%; border: 1px solid var(--ui-line); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); background: var(--ui); outline: none; resize: none; }
#editor input { font-weight: 600; }
#editor input:focus, #editor textarea:focus, #entry-editor input:focus { border-color: var(--ink-faint); }
.seg { display: flex; border: 1px solid var(--ui-line); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; background: none; border: none; border-right: 1px solid var(--ui-line); padding: 6px 4px; font-size: 12.5px; color: var(--ink-soft); }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--ink); color: var(--paper); }
.editor-actions { display: flex; gap: 6px; align-items: center; }
.editor-actions .primary { border: none; background: var(--ink); color: var(--paper); border-radius: 8px; padding: 7px 16px; font-weight: 600; }

/* what backs this board */
#sources { position: fixed; inset: 0; z-index: 40; background: rgba(31,35,40,0.25); display: grid; place-items: center; padding: 24px; }
.sources-card { width: min(680px, 100%); max-height: 100%; overflow: auto; background: var(--ui); border-radius: 12px; box-shadow: var(--shadow); }
.sources-card .peek-head, .pages-card .peek-head { font: 600 14px var(--sans); }
.sources-card .peek-head { position: sticky; top: 0; background: var(--ui); }
.pages-card .peek-head { padding: 10px 0; }
#sources-list { padding: 4px 14px 14px; }
.sources-group { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.sources-group b { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.sources-group span { font-size: 12px; color: var(--ink-faint); }
.sources-row { padding: 8px 10px; margin: 6px -10px 0; border-radius: 8px; cursor: pointer; font-size: 13px; }
.sources-row:hover { background: var(--hover); }
.sources-row b { font-weight: 600; }
.sources-row .where { margin-left: 8px; color: var(--ink-faint); font-size: 12px; }
.sources-row q { display: block; margin-top: 3px; color: var(--ink-soft); font-style: italic; quotes: "“" "”"; }

/* choosing a page of a document */
#pages { position: fixed; inset: 0; z-index: 40; background: rgba(31,35,40,0.18); display: grid; place-items: start center; padding-top: 12vh; }
.pages-card { width: min(560px, calc(100vw - 16px)); background: var(--ui); border: 1px solid var(--ui-line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px 14px 12px; }
#pages-list { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 4px; }
.pages-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.pages-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; }
.pages-row input { width: 64px; border: 1px solid var(--ui-line); border-radius: 8px; padding: 6px 8px; font: inherit; color: var(--ink); background: var(--ui); outline: none; text-align: right; }
.pages-row .primary { border: none; background: var(--ink); color: var(--paper); border-radius: 8px; padding: 7px 12px; font-weight: 600; white-space: nowrap; }
.pages-row .primary:disabled { opacity: 0.5; }

/* what if: a slider for each input of a table */
#whatif { position: fixed; z-index: 26; right: 12px; top: 64px; width: 320px; max-height: calc(100vh - 190px); overflow: auto; background: var(--ui); border: 1px solid var(--ui-line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.whatif-head { display: flex; align-items: baseline; gap: 8px; }
.whatif-head span { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.whatif-head b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#whatif-list { display: flex; flex-direction: column; gap: 6px; }
.whatif-row { display: grid; grid-template-columns: 118px 1fr 60px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); }
.whatif-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whatif-row input { width: 100%; accent-color: var(--ink); }
.whatif-row output { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }

/* the table editor: a small grid of cells */
#table-editor { position: fixed; z-index: 26; left: 50%; top: 72px; transform: translateX(-50%); width: max-content; max-width: min(760px, calc(100vw - 16px)); background: var(--ui); border: 1px solid var(--ui-line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.table-editor-head { display: flex; align-items: center; gap: 10px; }
.table-editor-head span { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
#table-title { flex: 1; min-width: 180px; border: 1px solid var(--ui-line); border-radius: 8px; padding: 7px 10px; font: inherit; font-weight: 600; color: var(--ink); background: var(--ui); outline: none; }
#table-scroll { overflow: auto; max-height: min(52vh, 440px); border: 1px solid var(--ui-line); border-radius: 8px; }
#table-grid { display: grid; min-width: max-content; }
#table-grid > * { border-right: 1px solid var(--ui-line); border-bottom: 1px solid var(--ui-line); min-height: 30px; }
#table-grid .guide { display: flex; align-items: center; justify-content: center; font-size: 10.5px; color: var(--ink-faint); background: var(--paper); user-select: none; }
#table-grid .guide.row { position: sticky; left: 0; z-index: 1; }
#table-grid .guide.col { position: sticky; top: 0; z-index: 2; }
#table-grid .guide.col.row { z-index: 3; }
#table-grid input { width: 100%; min-width: 0; border: none; outline: none; padding: 6px 9px; font: 400 13px var(--sans); color: var(--ink); background: var(--ui); font-variant-numeric: tabular-nums; }
#table-grid input.head { font-weight: 600; font-size: 12px; }
#table-grid input:focus { box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
#table-grid input.formula { color: var(--ink-soft); }
#table-hint { font-size: 12px; color: var(--ink-faint); max-width: 520px; }
#table-editor .spacer { flex: 1; }

/* a phone held upright */
@media (max-width: 640px) {
  #topbar { top: 8px; left: 8px; right: 8px; gap: 6px; flex-wrap: nowrap; }
  #board-title, #hint, body.has-board #status { display: none; }
  .shortcuts-body { grid-template-columns: 1fr; }
  #more-menu { right: 8px; }
  .chip-button { min-width: 0; flex: 0 1 auto; padding: 8px 10px; font-size: 14px; }
  .chip-button .brand, .chip-button .sep { display: none; }
  .chip-button #session-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .chip-button svg { flex: none; }
  .ghost { padding: 8px 10px; font-size: 13px; flex: none; white-space: nowrap; }
  #fit-button .text, #talk-toggle .text { display: none; }
  #fit-button .icon, #talk-toggle .icon { display: block; }
  #fit-button, #talk-toggle { padding: 9px; }
  .popover { top: 50px; left: 8px; width: calc(100vw - 16px); }
  #dock { bottom: calc(8px + var(--keyboard, 0px)); width: calc(100vw - 16px); gap: 6px; }
  #mic-button.unsupported { display: none; }
  #composer-input { padding-left: 8px; }
  #mark-bar { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; }
  #bar-actions button { flex: 1; padding: 9px 8px; }
  #bar-actions button.quiet { flex: none; }
  .ghost.icon-only { padding: 9px; }
  #mark-bar .tools { margin-top: 2px; padding-top: 8px; gap: 8px; }
  .tools .swatch { width: 24px; height: 24px; }
  .tools button.tool { font-size: 14px; padding: 6px 8px; }
  #editor, #entry-editor { left: 8px !important; right: 8px; top: 56px !important; width: auto; }
  #table-editor { left: 8px; right: 8px; top: 56px; transform: none; width: auto; max-width: none; }
  #table-grid input, #table-title { font-size: 16px; }
  #table-scroll { max-height: 34vh; }
  #whatif { left: 8px; right: 8px; top: auto; bottom: 84px; width: auto; max-height: 44vh; }
  #table-hint { display: none; }
  #editor input, #editor textarea, #entry-editor input, #entry-editor select { font-size: 16px; }
  /* the top bar holds fewer things on a phone: redo is a three-finger tap, find is in the menu */
  #redo-button, #find-button { display: none; }
  .chip-button { min-width: 96px; }
  #find-row { display: block; }
  #quiz-bar, #focus-bar, #branch, #stale { flex-wrap: wrap; }
  #spec { padding: 8px; }
  .spec-card .peek-head { flex-wrap: wrap; row-gap: 0; }
  .spec-card .peek-head .spacer { flex-basis: 100%; height: 0; }
  .spec-body { padding: 4px 14px 16px; }
  .task dl { grid-template-columns: 1fr; gap: 0; }
  .task dt { margin-top: 6px; }
  #reply { font-size: 13.5px; }
  #reply.settled { max-height: 6em; }
  #talk { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 62vh; z-index: 25; }
  #toast { top: 54px; }
  .start-card h1 { font-size: 28px; }
  #start { padding: 28px 14px 40px; }
  .project-head { flex-wrap: wrap; }
  .row.session { flex-wrap: wrap; }
  .row.session .acts { width: 100%; }
  #custom-project { flex-wrap: wrap; }
  #notebook-form { flex-wrap: wrap; }
  #notebook-form input { flex-basis: 100%; }
  #notebook-form button { padding: 10px 18px; flex: 1; }
  #notebook-more { flex-wrap: wrap; }
  #custom-project input { flex-basis: 100%; }
  #custom-project button { padding: 9px 16px; flex: 1; }
}

.spec-tasks-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- a map on the board ---------- */
.item-map .map-sea { fill: #e6ecee; }
.item-map .tile { filter: saturate(0.7) contrast(0.96) brightness(1.02); }
.item-map .map-edge { fill: none; stroke: var(--ui-line); stroke-width: 1; }
.item-map.entered .map-edge { stroke: var(--answer); stroke-width: 2.5; }
.item-map.entered .map-inner { cursor: grab; }
.item-map .map-credit { font: 400 9.5px var(--sans); fill: #4a4f57; }
.item-map .map-credit-bg { fill: #fff; opacity: 0.78; }
.item-map .map-ctl { cursor: pointer; }
.item-map .map-ctl rect { fill: var(--card); stroke: var(--ui-line); stroke-width: 1; }
.item-map .map-ctl path { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.item-map .map-ctl:hover path { stroke: var(--ink); }
.item-map .route-case { fill: none; stroke: #fff; stroke-width: 6.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.item-map .route { fill: none; stroke: var(--tint-line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.item-map .route.straight { stroke-dasharray: 1.5 7; }
.item-map .mpin { cursor: pointer; }
.item-map .mpin .pin-ring { fill: var(--marker); opacity: 0; }
.item-map .mpin .pin-dot { fill: var(--tint-line); stroke: #fff; stroke-width: 2; }
.item-map .mpin text { font: 700 11px var(--sans); fill: #fff; font-variant-numeric: tabular-nums; }
.item-map .mpin.idea .pin-dot { fill: #fff; stroke: #5b616a; stroke-width: 2; }
.item-map .mpin.guessed .pin-dot { stroke-dasharray: 3 2.2; }
.item-map .mpin .pin-name { font: 600 11px var(--sans); fill: #1f2328; paint-order: stroke; stroke: rgba(255, 255, 255, 0.94); stroke-width: 3.5px; stroke-linejoin: round; }
.item-map .mpin.picked .pin-ring { opacity: 0.3; }
.item-map .mpin.picked .pin-dot { stroke: var(--marker); }
.item-map .day-tag { font: 600 10.5px var(--sans); letter-spacing: 0.08em; fill: var(--tint-line, var(--ink-faint)); }
.item-map .day-name { font: 600 12.5px var(--sans); fill: var(--ink); }
.item-map .day-total, .item-map .leg, .item-map .place-note { font: 400 12px var(--sans); fill: var(--ink-soft); font-variant-numeric: tabular-nums; }
.item-map .place-note.yours, .item-map .place-note.missing { fill: var(--marker-text); }
.item-map .leg.straight { font-style: italic; }
.item-map .place-name { font: 500 12.5px var(--sans); fill: var(--ink); }
.item-map .place-row { cursor: pointer; }
.item-map .place-row .row-bg { fill: transparent; }
.item-map .place-row.picked .row-bg { fill: var(--marker-soft); }
.item-map .chip { fill: var(--tint-line); }
.item-map .place-row.idea .chip { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; }
.item-map .chip-n { font: 700 9.5px var(--sans); fill: #fff; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .item-map .tile { filter: invert(1) hue-rotate(180deg) saturate(0.5) brightness(0.9) contrast(0.86); }
:root[data-theme="dark"] .item-map .map-sea { fill: #1c2225; }
:root[data-theme="dark"] .item-map .route-case { stroke: #141311; }
:root[data-theme="dark"] .item-map .mpin .pin-dot { stroke: #141311; }
:root[data-theme="dark"] .item-map .mpin text, :root[data-theme="dark"] .item-map .chip-n { fill: #141311; }
:root[data-theme="dark"] .item-map .mpin.idea .pin-dot { fill: #141311; stroke: #b3b0a8; }
:root[data-theme="dark"] .item-map .mpin .pin-name { fill: #f1efe9; stroke: rgba(20, 19, 17, 0.92); }
:root[data-theme="dark"] .item-map .map-credit { fill: #c9c6be; }
:root[data-theme="dark"] .item-map .map-credit-bg { fill: #141311; }

/* ---------- a timeline on the board ---------- */
.item-timeline .tgrid { stroke: var(--ui-line); stroke-width: 1; opacity: 0.55; }
.item-timeline .tgrid.major { opacity: 1; }
.item-timeline .ttick { font: 400 10.5px var(--sans); fill: var(--ink-faint); font-variant-numeric: tabular-nums; }
.item-timeline .ttick.major { fill: var(--ink-soft); font-weight: 600; }
.item-timeline .today { stroke: var(--marker); stroke-width: 1.25; stroke-dasharray: 3 3; fill: none; }
.item-timeline .today-tag { font: 500 10px var(--sans); fill: var(--marker-text); }
.item-timeline .link { fill: none; stroke: var(--ink-faint); stroke-width: 1; }
.item-timeline .entry { cursor: pointer; }
.item-timeline .bar-shape { fill: var(--tint); stroke: var(--tint-line); stroke-width: 1.25; }
.item-timeline .entry.done .bar-shape { fill: var(--tint-line); }
.item-timeline .entry.point .bar-shape { fill: var(--tint-line); stroke: var(--card); stroke-width: 1.5; }
.item-timeline .entry-label { font: 500 12px var(--sans); fill: var(--ink); }
.item-timeline .entry-label.in { fill: var(--tint-text); }
.item-timeline .entry-label.out { paint-order: stroke; stroke: var(--card); stroke-width: 5px; stroke-linejoin: round; }
.item-timeline .entry.done .entry-label.in { fill: #fff; }
.item-timeline .entry.point .entry-label { font-weight: 600; }
.item-timeline .entry.picked .bar-shape { stroke: var(--marker); stroke-width: 2.5; }
:root[data-theme="dark"] .item-timeline .entry.done .entry-label.in { fill: #141311; }

/* tools for a pin or an entry, and the form for an entry */
.tools .tool-label { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-right: 2px; }
.tools button.day-chip { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1.25px solid var(--tint-line); background: var(--tint); color: var(--tint-text); font-size: 11.5px; font-weight: 600; }
.tools button.day-chip.on { background: var(--tint-line); color: #fff; }
.tools a.tool { padding: 3px 6px; border-radius: 6px; font-size: 12.5px; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.tools a.tool:hover { color: var(--ink); background: rgba(31,35,40,0.05); }
#entry-editor .field-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
#entry-editor .field-row > span { width: 42px; flex: none; }
#entry-editor .field-row input, #entry-editor .field-row select { flex: 1; min-width: 0; font-weight: 400; padding: 7px 9px; }
#entry-editor #entry-label { font-weight: 600; }
#entry-editor select { border: 1px solid var(--ui-line); border-radius: 8px; font: inherit; color: var(--ink); background: var(--ui); outline: none; }
#entry-editor #entry-length { flex: 0 0 84px; }
#entry-done-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
#entry-done-row input { width: auto; margin: 0; accent-color: var(--marker); }
@media (max-width: 640px) { .tools button.day-chip { width: 28px; height: 28px; font-size: 13px; } }
.item-map .map-ctl.day-row rect { fill: transparent; stroke: none; }
.item-map .map-ctl.day-row:hover rect { fill: var(--hover); }
.item-map .mpin.stay .pin-dot { fill: var(--ink); stroke: #fff; stroke-width: 2; }
.item-map .mpin .pin-glyph { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .item-map .mpin.stay .pin-dot { stroke: #141311; }
:root[data-theme="dark"] .item-map .mpin .pin-glyph { stroke: #141311; }
.item-timeline.entered :is(rect.shape, path.rough) { stroke: var(--answer); stroke-width: 2; }
.item-timeline.entered .entry { cursor: grab; }
.item-timeline .entry.held .bar-shape { stroke: var(--answer); stroke-width: 2.25; }
.item-timeline .drag-tag rect { fill: var(--ink); }
.item-timeline .drag-tag text { font: 500 10.5px var(--sans); fill: var(--paper); font-variant-numeric: tabular-nums; }

/* found pictures, lettering */
.node.item .credit { font: 400 9.5px var(--sans); fill: var(--ink-faint); }
:root[data-lettering="hand"] #viewport { --sans: var(--hand); }
:root[data-lettering="hand"] #viewport .node .label, :root[data-lettering="hand"] #viewport .day-name, :root[data-lettering="hand"] #viewport .place-name { letter-spacing: -0.01em; }

/* the sketch look: outlines and connectors drawn as if by hand */
.node path.rough { fill: none !important; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke 150ms; }
:root[data-look="sketch"] .node rect.shape { stroke: transparent !important; }
.edge.sketched path.wire { stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.15; }
.edge.sketched.marked path.wire { stroke-width: 1.7; }
/* connectors as a trail or a road */
.edge.as-trail path.wire { stroke: var(--ink-soft); stroke-width: 2.1; stroke-dasharray: 6.5 6.5; stroke-linecap: round; }
.edge.as-road path.wire, .edge.as-road.marked path.wire, .edge.as-road.flow-on path.wire, #layer-edges.focusing .edge.as-road.near path.wire { stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: none; }
.edge.as-road path.wire { stroke: color-mix(in srgb, var(--ink-soft) 62%, var(--paper)); }
.edge.as-road path.road-mid { fill: none; stroke: var(--paper); stroke-width: 1.4; stroke-dasharray: 7 7; pointer-events: none; }
.edge.as-trail.marked path.wire, .edge.as-road.marked path.wire { stroke: var(--marker); }
.edge .way-from { fill: var(--paper); stroke: #2f7d5b; stroke-width: 2.4; }
.edge .way-to { fill: var(--marker); stroke: var(--paper); stroke-width: 1.2; stroke-linejoin: round; }
.edge .way-eye { fill: var(--paper); }
/* the corner handle that gives a card more room */
#size-handle { position: fixed; z-index: 14; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--ui); border: 1px solid var(--marker); color: var(--marker); display: grid; place-items: center; box-shadow: var(--shadow); cursor: nwse-resize; touch-action: none; }
#size-handle:active { background: var(--marker); color: #fff; }
#size-ghost { position: fixed; z-index: 13; border: 1.5px dashed var(--marker); border-radius: 10px; background: color-mix(in srgb, var(--marker) 6%, transparent); pointer-events: none; }
#size-ghost span { position: absolute; right: 8px; bottom: 6px; font: 500 11px var(--sans); color: var(--marker-text); background: var(--ui); border-radius: 5px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { #size-handle { width: 36px; height: 36px; } }

/* ---------- hosted mode: signing in, the account, sharing ---------- */
body.hosted .local-only { display: none !important; }
body.signin-page { overflow: auto; }
.signin-card { width: min(440px, 100%); margin: 0 auto; padding: 72px 24px 48px; }
.signin-card h1 { font-size: 34px; letter-spacing: -0.03em; margin: 0 0 4px; }
.signin-card .lede { font-size: 16px; color: var(--ink-soft); margin: 0 0 32px; line-height: 1.5; }
.signin-card h2 { font-size: 15px; margin: 0 0 12px; }
.signin-card p { line-height: 1.5; }
#signin-social { display: flex; flex-direction: column; gap: 8px; }
.signin-provider { border: 1px solid var(--ui-line); background: var(--ui); color: var(--ink); border-radius: 9px; padding: 10px 12px; font-weight: 600; font-size: 14.5px; }
.signin-provider:hover { border-color: var(--ink); }
.signin-or { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); font-size: 12px; margin: 14px 0; }
.signin-or::before, .signin-or::after { content: ""; flex: 1; border-top: 1px solid var(--ui-line); }
#signin-email { display: flex; gap: 6px; }
#signin-email input { flex: 1; min-width: 0; border: 1px solid var(--ui-line); border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 15px; background: var(--ui); color: var(--ink); outline: none; }
#signin-email input:focus { border-color: var(--ink-faint); }
#signin-email button { border: none; background: var(--ink); color: var(--paper); border-radius: 9px; padding: 0 16px; font-weight: 600; white-space: nowrap; }
#signin-email button:disabled { opacity: 0.5; }
.signin-small { font-size: 12.5px; color: var(--ink-faint); }
.signin-error { margin-top: 18px; padding: 10px 14px; font-size: 13.5px; line-height: 1.5; border: 1px solid var(--ink-faint); border-radius: 10px; background: var(--ui); color: var(--ink); }
#account-line { display: flex; align-items: center; gap: 4px 8px; margin: -20px 0 28px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
#account-line .who { font-weight: 600; color: var(--ink); }
.row.session .owner { color: var(--ink-faint); font-size: 12px; white-space: nowrap; }
.popover .row.info { cursor: default; color: var(--ink-soft); font-size: 12.5px; }
.popover .row.info:hover { background: none; }
#share { position: fixed; inset: 0; background: rgba(31,35,40,0.25); display: grid; place-items: center; z-index: 40; padding: 24px; }
:root[data-theme="dark"] #share { background: rgba(0, 0, 0, 0.5); }
.share-card { width: min(460px, 100%); background: var(--ui); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.share-card .peek-head { font: 600 14px var(--sans); }
.share-card > p, #share-list, #share-form { margin: 10px 14px; }
.share-card .small { font-size: 12.5px; line-height: 1.45; }
#share-list .row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--ui-line); font-size: 13.5px; }
#share-list .row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#share-form { display: flex; gap: 6px; }
#share-form input { flex: 1; min-width: 0; border: 1px solid var(--ui-line); border-radius: 9px; padding: 8px 10px; font: inherit; background: var(--ui); color: var(--ink); outline: none; }
#share-form button { border: none; background: var(--ink); color: var(--paper); border-radius: 9px; padding: 0 14px; font-weight: 600; }

/* Hosted: code on your computer (helpers.js) and approving a helper (device.html) */
.computer-how { padding: 12px 16px; }
.computer-how p { margin: 4px 0 8px; line-height: 1.5; }
.computer-cmd { display: inline-block; font: 13px var(--mono); background: var(--hover); border-radius: 6px; padding: 4px 8px; margin: 2px 0 6px; user-select: all; }
#computer .row.session .new { border: 1px solid var(--ui-line); background: var(--ui); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }
#computer .row.session .meta { max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.device-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.device-row input { flex: 1; font: 600 18px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 10px; border: 1px solid var(--ui-line); border-radius: 8px; background: var(--ui); color: var(--ink); }
