:root {
  color-scheme: light dark;
  --bg: light-dark(#f6f5f1, #151514); --side: light-dark(#efede8, #1a1a18); --surface: light-dark(#ffffff, #1f1f1d); --you: light-dark(#ebe9e3, #262623);
  --text: light-dark(#2d2c2a, #e7e5e0); --soft: light-dark(#5f5d58, #b5b2ab); --muted: light-dark(#6a6760, #908e88); --line: light-dark(#e4e1da, #2b2a27);
  --accent: light-dark(#516e60, #8fb3a0); --amber: light-dark(#c2913e, #d8ae63); --danger: light-dark(#a15048, #d98a82); --focus: light-dark(#5e7f6f55, #8fb3a044);
  --blue: light-dark(#4f6f9a, #8ea9d4); --plum: light-dark(#8a5677, #c995b6); --added: light-dark(#e3eee7, #1d2a23); --removed: light-dark(#f5e3e0, #2f201e);
  --tile-invert: light-dark(#0000, #fff); --tile-tone: light-dark(#0000, #808080); --tile-lift: light-dark(#0000, #0e0e0d);
  --scrim: #0000002e;
  --shadow: 0 1px 2px light-dark(#0000000a, #00000033), 0 8px 28px light-dark(#0000000d, #00000040);
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --t-2xs: 11px; --t-xs: 12px; --t-s: 13px; --t-m: 14px; --t-l: 16px; --t-display: clamp(24px, 3.4vw, 32px);
  --r-s: 6px; --r-m: 9px; --r-l: 12px; --r-xl: 20px; --r-full: 999px;
  --fast: .16s; --slow: .3s;
  --hover: color-mix(in srgb, var(--surface) 70%, transparent); --pick: var(--surface); --pick-shadow: var(--shadow); --well: var(--surface);
  --column: 44rem; --gutter: 24px;
}
:where(*) { box-sizing: border-box; }
:where(.icon) { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:where(.icon.s) { width: 12px; height: 12px; stroke-width: 2.25; }
body { background: var(--bg); color: var(--text); font: var(--t-l)/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
:where(button), :where(input), :where(textarea), :where(select) { font: inherit; color: inherit; }
:where(button) { background: none; border: 0; padding: 0; cursor: pointer; }
:where(p) { margin: 0; }
:where(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-m); }
[hidden] { display: none !important; }

:where(.ds-icon) { display: grid; place-items: center; flex-shrink: 0; color: var(--muted); border-radius: var(--r-m); }
:where(.ds-icon.xs) { width: 20px; height: 20px; border-radius: var(--r-s); }
:where(.ds-icon.s) { width: 24px; height: 24px; border-radius: var(--r-s); }
:where(.ds-icon.m) { width: 30px; height: 30px; }
:where(.ds-icon.l) { width: 34px; height: 34px; border-radius: var(--r-full); }
:where(.ds-icon:hover) { color: var(--text); background: var(--hover); }
:where(.ds-icon[aria-expanded="true"]) { color: var(--text); background: var(--surface); }
:where(.ds-icon.on) { color: var(--accent); background: var(--surface); box-shadow: var(--shadow); }
:where(.ds-icon.solid), :where(.ds-icon[aria-pressed="true"]) { color: var(--surface); background: var(--text); }
:where(.ds-icon.outline) { color: var(--soft); box-shadow: inset 0 0 0 1.5px var(--line); }
:where(.ds-icon.outline .icon) { fill: currentColor; }
:where(.ds-icon:disabled) { opacity: .18; cursor: default; }

:where(.ds-button) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-full); font-size: var(--t-m); white-space: nowrap; transition: opacity var(--fast), transform .1s; }
:where(.ds-button:active:not(:disabled)) { transform: scale(.98); }
:where(.ds-button:disabled) { opacity: .5; cursor: default; }
:where(.ds-button.s) { padding: 5px 12px; font-size: var(--t-s); }
:where(.ds-button.l) { padding: 13px 22px; box-shadow: var(--shadow); }
:where(.ds-button.primary) { background: var(--accent); color: var(--surface); }
:where(.ds-button.strong) { background: var(--text); color: var(--surface); }
:where(.ds-button.soft) { background: var(--surface); color: var(--soft); box-shadow: var(--shadow); }
:where(.ds-button.soft:hover) { color: var(--text); }
:where(.ds-button.quiet) { padding: 7px 10px; border-radius: var(--r-m); color: var(--muted); }
:where(.ds-button.quiet:hover) { color: var(--soft); }

:where(.ds-row) { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; padding: 6px 8px; border-radius: var(--r-m); text-align: left; font-size: var(--t-m); color: var(--soft); }
:where(.ds-row:hover) { background-color: var(--hover); color: var(--text); }
:where(.ds-row.on) { background-color: var(--pick); color: var(--text); box-shadow: var(--pick-shadow); }
:where(.ds-row.unread) { color: var(--text); }
:where(.ds-row.unread .label) { font-weight: 600; }
:where(.ds-row .label) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.ds-row small) { margin-left: auto; flex-shrink: 0; color: var(--muted); font-size: var(--t-xs); }

:where(.ds-menu) { --hover: var(--you); --pick: var(--you); --pick-shadow: none; min-width: 190px; padding: 6px; display: grid; gap: 1px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); }
:where(.ds-menu.floating) { position: fixed; z-index: 6; animation: rise var(--fast) ease-out both; }
:where(.ds-menu .ds-row) { gap: 8px; padding: 7px 9px; }
:where(.ds-menu .ds-row:focus-visible) { background: var(--hover); color: var(--text); }
:where(.ds-menu .tick) { width: 12px; flex-shrink: 0; color: var(--accent); font-size: var(--t-xs); }

:where(.ds-dot) { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-full); background: var(--hue, var(--accent)); }
:where(.ds-dot.ok) { --hue: var(--accent); }
:where(.ds-dot.wait) { --hue: var(--amber); }
:where(.ds-dot.off) { --hue: var(--muted); }
:where(.ds-dot.bad) { --hue: var(--danger); }
:where(.ds-dot.live) { animation: breathe 1.6s ease-in-out infinite; }

:where(.ds-chip) { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--t-s); color: var(--muted); }
:where(.ds-chip.filled) { padding: 2px 10px; border-radius: var(--r-full); background: var(--you); color: var(--soft); }
:where(button.ds-chip:hover) { color: var(--text); }

:where(.ds-card), :where(.ds-sheet) { --well: var(--bg); --hover: var(--you); display: grid; gap: 10px; padding: 14px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); }
:where(button.ds-card) { text-align: left; }
:where(.ds-sheet) { overflow-y: auto; animation: rise var(--fast) ease-out both; }
:where(.ds-actions) { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
:where(.ds-actions .spacer) { flex: 1; }

:where(.ds-field) { display: grid; gap: 4px; font-size: var(--t-xs); color: var(--muted); }
:where(.ds-input) { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--well); color: var(--text); font-size: var(--t-m); line-height: 1.5; }
:where(textarea.ds-input:not(.bare)) { resize: vertical; min-height: 76px; }
:where(.ds-input)::placeholder { color: var(--muted); }
:where(.ds-input.bare) { padding: 0; border: 0; border-radius: 0; background: none; outline: 0; }
:where(.ds-toggle) { display: flex; align-items: center; gap: 8px; font-size: var(--t-s); color: var(--soft); }
:where(.ds-toggle input) { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }

:where(.ds-search) { --hover: var(--you); display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 3px 0 8px; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow); color: var(--muted); }
:where(.ds-search .ds-input) { flex: 1; height: 30px; font-size: var(--t-m); }
:where(.ds-search .ds-input)::-webkit-search-cancel-button { -webkit-appearance: none; }

:where(.ds-disclosure > summary) { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--t-s); color: var(--muted); }
:where(.ds-disclosure > summary)::-webkit-details-marker { display: none; }
:where(.ds-disclosure > summary:hover) { color: var(--soft); }
:where(.ds-disclosure > summary .icon) { transition: transform var(--fast) ease; }
:where(.ds-disclosure[open] > summary .icon) { transform: rotate(90deg); }

:where(.ds-toast) { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: var(--r-full); background: var(--surface); box-shadow: var(--shadow); font-size: var(--t-m); color: var(--soft); white-space: nowrap; animation: rise var(--fast) ease-out both; }

:where(.ds-light) { color-scheme: light; background: var(--bg); color: var(--text); }
:where(.ds-dark) { color-scheme: dark; background: var(--bg); color: var(--text); }
:where(.ds-heading) { margin: 0; font-size: var(--t-2xs); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

:where(.ds-link) { color: var(--accent); text-underline-offset: 3px; }

:where(.ds-table) { overflow-x: auto; overflow-wrap: break-word; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
:where(.ds-table table) { width: 100%; border-collapse: collapse; font-size: var(--t-s); font-variant-numeric: tabular-nums; }
:where(.ds-table th) { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
:where(.ds-table td) { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text); }
:where(.ds-table tr:last-child td) { border-bottom: 0; }
:where(.ds-table .num) { text-align: right; }

:where(.ds-prose) { overflow-wrap: anywhere; min-width: 0; }
:where(.ds-prose p), :where(.ds-prose ul), :where(.ds-prose ol), :where(.ds-prose blockquote), :where(.ds-prose pre) { margin: 0 0 14px; }
:where(.ds-prose h1), :where(.ds-prose h2), :where(.ds-prose h3) { font-size: 1em; font-weight: 600; margin: 22px 0 8px; }
:where(.ds-prose ul), :where(.ds-prose ol) { padding-left: 22px; }
:where(.ds-prose li + li) { margin-top: 4px; }
:where(.ds-prose blockquote) { border-left: 2px solid var(--line); padding-left: 14px; color: var(--soft); }
:where(.ds-prose code) { font: .88em/1.5 var(--mono); background: var(--you); padding: 1px 6px; border-radius: var(--r-s); }
:where(.ds-prose pre) { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px 16px; overflow-x: auto; }
:where(.ds-prose pre code) { background: none; padding: 0; font-size: var(--t-m); }
:where(.ds-widget), :where(.ds-stats), :where(.ds-prose > .ds-table) { margin: 0 0 14px; }
:where(.ds-stats) { display: flex; flex-wrap: wrap; gap: 10px; }
:where(.ds-stats .ds-widget) { margin: 0; }
:where(.ds-stat) { display: grid; align-content: start; gap: 2px; min-width: 128px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
:where(.ds-stat .label), :where(.ds-stat .note) { font-size: var(--t-xs); color: var(--muted); }
:where(.ds-stat .value) { font-size: var(--t-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
:where(.ds-steps ol), :where(.ds-sources ol) { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
:where(.ds-prose .ds-steps li + li), :where(.ds-prose .ds-sources li + li) { margin-top: 0; }
:where(.ds-steps li) { display: flex; align-items: baseline; gap: 10px; }
:where(.ds-steps .mark) { flex: none; display: inline-grid; place-items: center; width: 12px; color: var(--muted); }
:where(.ds-steps [data-state="done"] .mark) { color: var(--accent); }
:where(.ds-steps [data-state="done"] .text) { color: var(--soft); }
:where(.ds-steps [data-state="doing"] .text) { font-weight: 500; }
:where(.ds-steps [data-state="failed"] .mark), :where(.ds-steps [data-state="failed"] .text) { color: var(--danger); }
:where(.ds-sources ol) { counter-reset: source; border-top: 1px solid var(--line); padding-top: 10px; gap: 4px; }
:where(.ds-sources li) { counter-increment: source; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: var(--t-s); }
:where(.ds-sources li)::before { content: counter(source); min-width: 12px; font-size: var(--t-2xs); color: var(--muted); font-variant-numeric: tabular-nums; }
:where(.ds-sources small) { font-size: var(--t-xs); color: var(--muted); }
:where(.ds-widget .s1) { --series: var(--accent); }
:where(.ds-widget .s2) { --series: var(--blue); }
:where(.ds-widget .s3) { --series: var(--amber); }
:where(.ds-widget .s4) { --series: var(--plum); }
:where(.ds-chart), :where(.ds-diagram) { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
:where(.ds-chart) { display: grid; gap: 8px; }
:where(.ds-chart .plot) { min-width: 0; }
:where(.ds-chart svg), :where(.ds-diagram svg) { display: block; max-width: 100%; height: auto; overflow: visible; }
:where(.ds-chart svg) { touch-action: pan-y; }
:where(.ds-chart .readout) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-height: 1.5em; font-size: var(--t-s); color: var(--soft); font-variant-numeric: tabular-nums; }
:where(.ds-chart .readout .when) { color: var(--muted); }
:where(.ds-chart .readout b) { font-weight: 600; color: var(--text); }
:where(.ds-chart .swatch) { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: var(--r-full); background: var(--series); }
:where(.ds-chart .grid) { stroke: var(--line); }
:where(.ds-chart .axis) { stroke: var(--muted); }
:where(.ds-chart .tick) { fill: var(--muted); font-size: var(--t-2xs); font-variant-numeric: tabular-nums; }
:where(.ds-chart .line) { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
:where(.ds-chart .point) { fill: var(--surface); stroke: var(--series); stroke-width: 2; }
:where(.ds-chart .bar) { fill: var(--series); }
:where(.ds-chart .guide) { stroke: var(--muted); stroke-dasharray: 3 3; }
:where(.ds-diagram) { overflow-x: auto; }
:where(.ds-diagram svg) { margin-inline: auto; }
:where(.ds-diagram rect) { fill: var(--bg); stroke: var(--line); }
:where(.ds-diagram .node text) { fill: var(--text); font-size: var(--t-xs); }
:where(.ds-diagram .edge) { fill: none; stroke: var(--muted); stroke-width: 1.25; }
:where(.ds-diagram .head) { fill: var(--muted); }
:where(.ds-diagram .edge-label) { fill: var(--muted); font-size: var(--t-2xs); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
:where(.ds-diff .file) { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
:where(.ds-diff summary) { padding: 8px 12px; font-size: var(--t-s); }
:where(.ds-diff summary code) { font: var(--t-xs)/1.5 var(--mono); color: var(--text); }
:where(.ds-diff summary small) { margin-left: 8px; font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
:where(.ds-diff summary .add) { color: var(--accent); }
:where(.ds-diff summary .del) { color: var(--danger); }
:where(.ds-diff pre) { margin: 0; padding: 6px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; overflow-x: auto; font: var(--t-xs)/1.6 var(--mono); }
:where(.ds-diff pre span) { display: block; min-width: max-content; padding: 0 12px; white-space: pre; color: var(--soft); }
:where(.ds-diff pre .add) { background: var(--added); color: var(--text); }
:where(.ds-diff pre .del) { background: var(--removed); color: var(--text); }
:where(.ds-diff pre .hunk) { color: var(--muted); }
:where(.ds-choices) { display: grid; gap: 8px; }
:where(.ds-choices .question) { margin: 0; color: var(--text); }
:where(.ds-choices .options) { display: flex; flex-wrap: wrap; gap: 8px; }
:where(.ds-choices .ds-button[aria-pressed="true"]) { opacity: 1; background: var(--accent); color: var(--surface); }
:where(.ds-map) { display: grid; gap: 10px; }
:where(.ds-map .view) { position: relative; height: 260px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--well); isolation: isolate; touch-action: pan-y; cursor: grab; user-select: none; }
:where(.ds-map .view:active) { cursor: grabbing; }
:where(.ds-map .tiles), :where(.ds-map .pins) { position: absolute; inset: 0; }
:where(.ds-map .tiles img) { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
:where(.ds-map .tiles)::after, :where(.ds-map .pins)::before, :where(.ds-map .pins)::after { content: ""; position: absolute; inset: -1000px; pointer-events: none; }
:where(.ds-map .tiles)::after { background: var(--tile-invert); mix-blend-mode: difference; }
:where(.ds-map .pins)::before { background: var(--tile-tone); mix-blend-mode: saturation; }
:where(.ds-map .pins)::after { background: var(--tile-lift); mix-blend-mode: screen; }
:where(.ds-map .marker) { position: absolute; display: grid; place-items: center; width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 1; border-radius: var(--r-full); background: var(--accent); color: var(--surface); box-shadow: 0 0 0 2px var(--surface), var(--shadow); font-size: var(--t-2xs); font-weight: 600; font-variant-numeric: tabular-nums; }
:where(.ds-map .marker.on) { background: var(--text); }
:where(.ds-map .zoom) { position: absolute; top: 8px; right: 8px; display: grid; gap: 2px; padding: 2px; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow); }
:where(.ds-map .credit) { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: var(--r-s); background: var(--surface); font-size: var(--t-2xs); color: var(--muted); }
:where(.ds-map .places) { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
:where(.ds-prose .ds-map li + li) { margin-top: 0; }
:where(.ds-map .places li) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: var(--t-s); }
:where(.ds-map .places .n) { min-width: 16px; font-size: var(--t-2xs); color: var(--muted); font-variant-numeric: tabular-nums; }
:where(.ds-map .places .name) { padding: 2px 6px; margin-left: -6px; color: var(--text); font-weight: 500; }
:where(.ds-map .places .note) { font-size: var(--t-xs); color: var(--muted); }
:where(.ds-map .places .ds-link) { margin-left: auto; font-size: var(--t-xs); }
:where(.ds-timeline ol) { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--line); display: grid; gap: 12px; }
:where(.ds-prose .ds-timeline li + li) { margin-top: 0; }
:where(.ds-timeline li) { position: relative; display: grid; gap: 2px; }
:where(.ds-timeline li)::before { content: ""; position: absolute; left: -22.5px; top: 6px; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--bg); box-shadow: 0 0 0 1.5px var(--accent); }
:where(.ds-timeline .when) { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
:where(.ds-report) { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
:where(.ds-report .summary) { margin: 0; color: var(--text); }
:where(.ds-report ul) { margin: 8px 0 0; color: var(--soft); }
:where(.ds-prose > :first-child) { margin-top: 0; }
:where(.ds-prose > :last-child) { margin-bottom: 0; }

aside { background: var(--side); }
.brand { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 0 10px; }
.brand b { font-size: var(--t-m); font-weight: 600; letter-spacing: .02em; }
.account { gap: 5px; padding: 3px 6px 3px 3px; border-radius: var(--r-full); }
.account:hover, .account[aria-expanded="true"] { color: var(--soft); background: var(--hover); }
.avatar { width: 22px; height: 22px; display: grid; place-items: center; border-radius: var(--r-full); background: var(--surface); box-shadow: var(--shadow); }
.account .chev { opacity: .7; }
.toolbar { display: flex; gap: 2px; }
.heading { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 0; }
.grp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; min-width: 0; }
.group { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 20px 20px; align-items: center; gap: 2px; padding-right: 2px; border-radius: var(--r-m); min-width: 0; }
.group:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.group.active { --hover: var(--you); background: var(--surface); box-shadow: var(--shadow); }
.fold { width: 16px; height: 26px; opacity: 0; color: var(--muted); background: none; }
.group:hover .fold, .fold:focus-visible, .group.active .fold { opacity: 1; }
.fold svg { transition: transform var(--fast) ease; }
.fold[aria-expanded="false"] svg { transform: rotate(-90deg); }
.gname { padding: 6px 2px; font-weight: 500; }
.gname:hover { background: none; color: var(--text); }
.group.holds .gname, .group.pending .gname, .group.active .gname { color: var(--text); }
.group.unread .gname .label { font-weight: 600; }
.count { flex-shrink: 0; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; padding: 0 2px; }
.reveal { opacity: 0; }
.reveal:focus-visible, .reveal[aria-expanded="true"], .group:hover .reveal, .group.active .rowmenu, .crow:hover .reveal, .crow.on .reveal { opacity: 1; }
.crow { --hover: var(--you); position: relative; min-width: 0; }
.rowmenu[aria-expanded="true"] { background: var(--hover); }
.crow .rowmenu { position: absolute; right: 4px; top: 50%; translate: 0 -50%; }
.crow:hover .convo .when, .crow.on .convo .when, .crow:has(.rowmenu[aria-expanded="true"]) .convo .when { visibility: hidden; }
.kids { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin: 1px 0 2px; min-width: 0; }
.convo { --depth: 0; --step: 16px; --guide: color-mix(in srgb, var(--muted) 32%, transparent); padding-left: calc(var(--depth) * var(--step) + 22px - var(--step)); border-radius: var(--r-m); background-image: repeating-linear-gradient(to right, var(--guide) 0 1px, transparent 1px var(--step)); background-size: calc(var(--depth) * var(--step)) 100%; background-position: 7.5px 0; background-repeat: no-repeat; }
.convo:hover { background-color: color-mix(in srgb, var(--surface) 60%, transparent); }
.convo.deep { font-size: var(--t-m); }
.convo.flat { padding-left: 10px; }
.convo .when, .gname .when { margin-left: auto; flex-shrink: 0; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.convo.on .when { color: var(--soft); }
.pin { display: inline-grid; place-items: center; flex-shrink: 0; color: var(--amber); }
.tag { font-size: var(--t-2xs); letter-spacing: .03em; text-transform: uppercase; color: var(--muted); flex-shrink: 0; padding-right: 2px; }
.kind { flex-shrink: 0; display: grid; color: var(--muted); }
.convo.snoozed .label { color: var(--muted); }
.none { margin: 0; padding: 8px 10px; font-size: var(--t-s); color: var(--muted); }
#project-form { display: grid; gap: 4px; }
.err { color: var(--danger); font-size: var(--t-s); min-height: 0; }
#project-form .err:empty { display: none; }

#auth h1 { margin: 0 0 18px; font-size: var(--t-m); font-weight: 600; letter-spacing: -.01em; }
#auth p { color: var(--soft); font-size: var(--t-m); }
#auth .err { min-height: 1.6em; }
#auth .ds-button.l:disabled { opacity: .35; }

#menu { color: var(--soft); }
.crumb { min-width: 0; justify-content: flex-start; gap: 8px; align-items: baseline; color: var(--muted); overflow: hidden; text-align: left; padding: 2px 0; }
.crumb strong { font-weight: 500; color: var(--soft); overflow: hidden; text-overflow: ellipsis; }
.crumb:hover strong, .crumb:hover span { color: var(--text); }
#light { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: var(--t-s); color: var(--muted); }
#light .where { gap: 7px; color: var(--soft); padding: 8px; margin: -8px; }
#light .where:hover { color: var(--text); }
#light .note { white-space: nowrap; }

#settings .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#keys .head { display: flex; align-items: center; justify-content: space-between; }
#keys .keylist { display: grid; gap: 6px; }
#keys .keyline { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; }
#keys .keyline .name { justify-self: start; margin-left: -8px; color: var(--text); font-weight: 500; }
#keys .keyline .ds-input { font-weight: 500; }
#keys .keyline .meta { grid-column: 1; font-size: var(--t-xs); color: var(--muted); }
#keys .keyline .meta:empty { display: none; }
#keys .keyline .drop { grid-column: 2; grid-row: 1 / span 2; }
#keys .note { font-size: var(--t-s); color: var(--muted); }
#keys .ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: var(--r-m); background: var(--well); font-size: var(--t-s); }
#keys > .ds-button { justify-self: start; }
#keys .err:empty { display: none; }
#where[open] > summary { margin-bottom: 10px; }
#where > summary { font-size: var(--t-xs); }
#where > .pair + .pair, #where > .pair + #keyhelp { margin-top: 10px; }
#keyhelp { display: grid; gap: 6px; font-size: var(--t-s); color: var(--soft); }
#keyhelp code { user-select: all; overflow-wrap: anywhere; font: var(--t-xs)/1.5 var(--mono); background: var(--bg); padding: 8px 10px; border-radius: var(--r-m); }
#keyhelp .ds-button { justify-self: start; padding-left: 0; color: var(--accent); }

.you { justify-self: end; max-width: 85%; background: var(--you); padding: 11px 17px; border-radius: var(--r-xl) var(--r-xl) var(--r-s) var(--r-xl); white-space: pre-wrap; overflow-wrap: anywhere; }
.turn { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.who { justify-self: start; max-width: 100%; white-space: nowrap; }
.working > .who .ds-dot { animation: breathe 1.6s ease-in-out infinite; }
.steps ol { margin: 8px 0 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); list-style: none; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 8px; font: var(--t-xs)/20px var(--mono); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.steps li .icon { margin-top: 4px; }
.note { font-size: var(--t-m); color: var(--soft); }
.note.bad { color: var(--danger); }
.said { display: grid; justify-items: end; gap: 8px; }
.route { display: flex; align-items: center; gap: 8px; padding-right: 8px; font-size: var(--t-s); color: var(--muted); }
.route button.ds-chip:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.turn.speaking > .now { display: none; }
.now { font-size: var(--t-s); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead:not(li) { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lead:not(li) > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fade { animation: rise var(--slow) ease-out both; }
.earlier { display: flex; width: fit-content; margin: 20px auto 0; }
#jump .icon { flex-shrink: 0; }
.notice { justify-self: stretch; gap: 6px; padding: 10px 14px; box-shadow: none; border: 1px solid var(--line); font-size: var(--t-s); color: var(--muted); }
.notice .head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; padding: 0; width: 100%; color: inherit; }
.notice .head:hover { background: none; }
.notice .line { display: flex; gap: 8px; min-width: 0; }
.notice .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.notice .head:hover .what { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.notice .summary { margin: 0; color: var(--text); font-size: var(--t-m); overflow-wrap: anywhere; }
.notice .points { margin: 0; padding-left: 20px; color: var(--soft); font-size: var(--t-s); }
.notice code { font: .88em/1.5 var(--mono); background: var(--you); padding: 1px 6px; border-radius: var(--r-s); }
.notice[data-act="asks"] .how { color: var(--accent); }
.notice[data-act="failed"] .how { color: var(--danger); }
.brief { justify-self: start; max-width: 100%; padding: 8px 12px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); }
.brief[open] { justify-self: stretch; }
.brief .ds-prose { margin-top: 8px; font-size: var(--t-m); color: var(--soft); }
#empty h1 { margin: 0; font-size: var(--t-display); font-weight: 400; letter-spacing: -.02em; color: var(--soft); }
#empty p { margin: 0; color: var(--muted); font-size: var(--t-m); }

#composer { background: linear-gradient(transparent, var(--bg) 38%); }
main.blank #composer { background: none; }
.box { --hover: var(--you); position: relative; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 14px 20px 12px; display: grid; gap: 6px; }
.box:focus-within { box-shadow: var(--shadow), 0 0 0 1px var(--focus); }
.box.drop { box-shadow: var(--shadow), 0 0 0 1.5px var(--accent); }
.box textarea { resize: none; padding: 4px 46px 4px 0; max-height: 38vh; line-height: 1.55; font-size: var(--t-l); }
.box:has(#stop:not([hidden])) textarea, .box:has(#talk:not([hidden])) textarea { padding-right: 88px; }
.box:has(#stop:not([hidden])):has(#talk:not([hidden])) textarea { padding-right: 130px; }
.box:focus-within .ds-icon:not(.outline):not([aria-pressed="true"]) { color: var(--soft); }
.mention { color: var(--hue); font-weight: 500; }
.you img.shot { display: block; margin: 6px 0; max-width: 100%; max-height: 320px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--bg); }
#shots { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 2px; }
.thumb { position: relative; }
.thumb img { display: block; width: 76px; height: 76px; object-fit: cover; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--bg); }
.thumb .ds-icon { position: absolute; top: -6px; right: -6px; border-radius: var(--r-full); box-shadow: var(--shadow); }
#talk[aria-pressed="true"] { box-shadow: 0 0 0 calc(var(--level, 0) * 7px) color-mix(in srgb, var(--text) 16%, transparent); transition: box-shadow .08s linear; }
#talk[data-state="thinking"] svg { animation: breathe 1.4s ease-in-out infinite; }
#talk[data-state="speaking"] svg { animation: talking .9s ease-in-out infinite; }
#update .ds-button { padding: 5px 12px; }

@keyframes breathe { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
@keyframes talking { 50% { transform: scaleY(1.25); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (hover: none) {
  .fold, .plus { opacity: 1; }
  .group:hover .rowmenu, .crow:hover .rowmenu { opacity: 0; }
  .group.active .rowmenu, .crow.on .rowmenu { opacity: 1; }
  .crow:hover:not(.on) .convo .when { visibility: visible; }
}
@media (min-width: 761px) {
  .grp, .kids { gap: 2px; }
  .group { margin-bottom: 2px; }
  .gname { padding: 8px 2px; font-weight: 600; color: var(--text); }
  .convo { --step: 20px; padding-top: 8px; padding-bottom: 8px; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 760px) {
  aside { transform: translateX(-100%); transition: transform var(--slow) ease; }
  body.menu aside { transform: none; box-shadow: var(--shadow); }
  body.menu::after { content: ""; position: fixed; inset: 0; background: var(--scrim); z-index: 2; }
  :root { --gutter: 14px; }
  :where(.ds-icon.l) { width: 40px; height: 40px; }
  .thumb img { width: 62px; height: 62px; }
  .box textarea { padding-right: 52px; }
  .box:has(#stop:not([hidden])) textarea, .box:has(#talk:not([hidden])) textarea { padding-right: 98px; }
  .box:has(#stop:not([hidden])):has(#talk:not([hidden])) textarea { padding-right: 146px; }
  .you img.shot { max-height: 240px; }
  #settings .pair { grid-template-columns: 1fr; }
  #light.waiting .note { display: none; }
  .crumb:has(strong:not(:empty)) span { display: none; }
}
