/* Chat reader */
/* Search stays visible; secondary controls live in a native modal drawer.
   Messages read like a messaging app: each sender has a fixed colour (avatar,
   name, bubble tint and edge), Nayiem sits on the right, everyone else on the left. */

/* ---------- Sender identity tokens (dark is the default theme) ----------
   Contrast checked (WCAG AA): name on bubble tint >= 7.9:1 dark, >= 5.4:1 light;
   body ink >= 13:1; muted time >= 5.4:1; avatar initials >= 6.1:1. */
:root {
  --s-n: #8fb0ff; --s-n-bg: #131b31;   /* Nayiem: blue */
  --s-c: #5fd3ad; --s-c-bg: #0e211d;   /* Chuck: teal green */
  --s-m: #f290c8; --s-m-bg: #27131f;   /* Mike (deleted account): rose magenta */
  --s-o: #aeb8c9; --s-o-bg: #161b26;   /* anyone else: neutral grey */
  --s-ink: #0a0c12;                     /* avatar initials */
}
:root[data-theme="light"] {
  --s-n: #2f56b0; --s-n-bg: #ebf0fc;
  --s-c: #0b6b53; --s-c-bg: #e5f3ed;
  --s-m: #a22a6e; --s-m-bg: #fbebf4;
  --s-o: #586278; --s-o-bg: #eef1f6;
  --s-ink: #ffffff;
}
/* Any element with a sender class gets --s (strong colour) and --s-bg (tint). */
.s-n { --s: var(--s-n); --s-bg: var(--s-n-bg); }
.s-c { --s: var(--s-c); --s-bg: var(--s-c-bg); }
.s-m { --s: var(--s-m); --s-bg: var(--s-m-bg); }
.s-o { --s: var(--s-o); --s-bg: var(--s-o-bg); }

/* ---------- Page and drawer ---------- */
/* overflow-x: clip (not hidden) keeps the sticky bar working; it stops the hover
   action pill of a wide bubble from adding a horizontal scrollbar. */
.chat-app { max-width: 60rem; margin: 0 auto; padding: 0 var(--gutter); overflow-x: clip; }
.panel { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(26rem, 100%); height: 100dvh; max-height: 100dvh; padding: 0 1.5rem 2rem; border: 0; border-left: 1px solid var(--rule); border-radius: 0; overflow-y: auto; overscroll-behavior: contain; font-size: .95rem; background: var(--surface); }
.panel[open] { animation: menu-enter .18s ease-out; }
.panel h2 { font-family: var(--font-display); font-size: 1.375rem; margin: 0; }
.panel-close { display: flex; position: sticky; top: 0; background: var(--surface); justify-content: space-between; align-items: center; padding: 1rem 0; margin-bottom: 1.5rem; border-bottom: 1px solid var(--rule); z-index: 2; }
.panel-close .icon-btn { font-size: 1.4rem; }
.panel legend { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; font-weight: 500; letter-spacing: .12em; color: var(--accent); }
.panel-section { padding-bottom: 1.5rem; margin-bottom: .75rem; border-bottom: 1px solid var(--rule); }
.panel-section:last-of-type { border: 0; margin-bottom: 0; }
.panel .field { margin-bottom: .6rem; }
.panel .row-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.panel .note { font-size: .875rem; color: var(--muted); margin: .4rem 0 0; }
.filter-position { display: flex; gap: .75rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
body.filters-open { overflow: hidden; }

.check { display: flex; align-items: center; gap: .65rem; padding: .4rem 0; min-height: 2.75rem; cursor: pointer; line-height: 1.45; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.check .n { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
.swatch { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: var(--s, var(--s-o)); }
.date-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; }
.date-pair .field { min-width: 0; }
.date-pair .input, .date-pair .btn { min-width: 0; width: 100%; }
.date-pair .input { padding: .45rem .5rem; font-size: .88rem; }

/* ---------- Search ---------- */
.search-box { position: relative; }
.search-box .input { padding-right: .8rem; text-overflow: ellipsis; }
.search-box:has(.search-clear:not([hidden])) .input { padding-right: 2.2rem; }
.search-clear { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: var(--muted); width: 2rem; height: 2rem; border-radius: 4px; }
.search-clear:hover { color: var(--accent); background: var(--accent-soft); }
.search-meta { font-size: .85rem; color: var(--muted); margin: .5rem 0 .4rem; }
.hits { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }
.hits:empty { display: none; }
.hits li + li { border-top: 1px solid var(--rule); }
.hits button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .8rem 1rem; cursor: pointer; }
.hits button:hover, .hits button:focus-visible { background: var(--accent-soft); }
.hits .h-meta { display: block; font-size: .8125rem; color: var(--muted); margin-bottom: .2rem; }
.hits .h-who { color: var(--s); font-weight: 700; }
.hits .h-text { display: -webkit-box; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hits mark, .msg mark, .note-card mark { background: var(--target); color: var(--target-ink); border-radius: 2px; padding: 0 1px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* ---------- Sticky toolbar ---------- */
.stream { min-width: 0; padding-bottom: 4rem; }
.stream-bar { position: sticky; top: var(--header-h); z-index: 20; pointer-events: none; }
/* The bar's own box is click-through, so a folded day header lets clicks reach the chat. */
.stream-bar > * { pointer-events: auto; }
.bar-main { position: relative; z-index: 5; background: var(--paper); padding: 1.25rem 0 .6rem; border-bottom: 1px solid var(--rule); }
.chat-toolbar { display: flex; align-items: end; gap: .75rem; }
.chat-search { position: relative; flex: 1; min-width: 0; }
.chat-search .input { min-height: 2.8rem; }
.search-results { position: absolute; top: calc(100% + .5rem); left: 0; width: max(100%, 20rem); max-width: calc(100vw - 2 * var(--gutter)); border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; z-index: 2; }
.search-results .search-meta { margin: .75rem; font-size: .875rem; }
.search-results .hits { border: 0; border-top: 1px solid var(--rule); border-radius: 0; max-height: min(45dvh, 25rem); }
.filters-btn { display: inline-flex; flex-shrink: 0; min-height: 2.8rem; }
.jump-form { min-width: 0; }
.jump-form > label { display: block; color: var(--muted); font-size: .875rem; margin-bottom: .25rem; }
.jump-controls { display: flex; align-items: center; gap: .4rem; }
.jump-controls .input { width: 10rem; min-width: 0; min-height: 2.8rem; }
.stream-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .35rem 1rem; color: var(--muted); font-size: .875rem; padding-top: .7rem; }
.stream-meta .status { font-variant-numeric: tabular-nums; }
.date-context { display: flex; flex-wrap: wrap; gap: .35rem; }
.current-date { color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.current-date, .day, .m-meta, .mid, .note-label .meta, .check .n, .date-pair .input, .jump-controls .input { font-family: var(--font-mono); }
.tz-note { font-size: .8125rem; color: var(--muted); margin: .7rem 0 0; }

/* Sender legend: also a one-click sender filter. */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .25rem; }
.legend-item {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 1.9rem; padding: .15rem .6rem;
  border: 1px solid transparent; border-radius: 999px; background: none; cursor: pointer;
  font-family: var(--font-ui); font-size: .8125rem; font-weight: 700; color: var(--s);
}
.legend-item .dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--s); flex: none; }
.legend-item:hover { background: var(--s-bg); border-color: color-mix(in srgb, var(--s) 45%, transparent); }
.legend-item[aria-pressed="true"] { background: var(--s-bg); border-color: var(--s); }
.legend.filtering .legend-item[aria-pressed="false"] { color: var(--muted); font-weight: 600; }

/* ---------- Stream ---------- */
#rows { padding-top: .25rem; }
.row { border-radius: 4px; scroll-margin-top: calc(var(--chat-sticky, 0px) + 1rem); }
.row [tabindex="-1"]:focus { outline: none; }

.day { display: flex; align-items: center; text-align: center; margin: 1.25rem 0 .55rem; font-size: .75rem; font-weight: 500; letter-spacing: .025em; color: var(--ink-2); }
.day::before, .day::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.day span { display: inline-block; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); padding: .2rem .8rem; }

/* ---------- Message ---------- */
.msg { --s: var(--s-o); --s-bg: var(--s-o-bg); display: flex; align-items: flex-start; gap: .5rem; margin-top: .65rem; }
.msg.s-n { --s: var(--s-n); --s-bg: var(--s-n-bg); }
.msg.s-c { --s: var(--s-c); --s-bg: var(--s-c-bg); }
.msg.s-m { --s: var(--s-m); --s-bg: var(--s-m-bg); }
.msg.cont { margin-top: 2px; }
.msg.me { flex-direction: row-reverse; }

.avatar {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--s); color: var(--s-ink); font-family: var(--font-display); font-size: .8125rem; font-weight: 700; line-height: 1; user-select: none;
}
.msg.cont .avatar { visibility: hidden; height: 0; }

.bubble {
  position: relative; flex: 0 1 auto; min-width: 0; width: fit-content; max-width: min(70ch, 100%);
  font-size: .9375rem; background: var(--s-bg);
  border: 1px solid var(--rule); border-color: color-mix(in srgb, var(--s) 22%, transparent);
  border-left: 3px solid var(--s); border-radius: 4px 12px 12px 12px; padding: .3rem .7rem .3rem .65rem;
}
.bubble:has(> .reply-prev) { min-width: min(16rem, 100%); }
.msg.more .bubble { border-bottom-left-radius: 4px; }
.msg.me .bubble { border-left-width: 1px; border-left-color: color-mix(in srgb, var(--s) 22%, transparent); border-right: 3px solid var(--s); border-radius: 12px 4px 12px 12px; padding: .3rem .65rem .3rem .7rem; }
.msg.me.more .bubble { border-bottom-left-radius: 12px; border-bottom-right-radius: 4px; }

.m-head { line-height: 1.3; margin-bottom: .1rem; }
.m-head .who { color: var(--s); font-size: .8125rem; font-weight: 700; }
.msg.cont .m-head { display: none; }

.m-text { display: flow-root; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.42; }
.m-text a { overflow-wrap: anywhere; }

/* Time (and a question count, when there is one) sits on the last text line. */
.m-meta {
  float: right; display: inline-flex; align-items: center; gap: .35rem; margin: .5em -.2rem 0 .8rem;
  font-size: .6875rem; line-height: 1.2; color: var(--muted); white-space: nowrap; user-select: none; font-variant-numeric: tabular-nums;
}
.m-meta.block { float: none; display: flex; justify-content: flex-end; margin: .1rem -.2rem 0 0; }
.fwd { font-size: .78rem; color: var(--accent); margin-bottom: .1rem; }
.fwd b { font-weight: 700; }

.reply-prev {
  display: block; width: 100%; text-align: left; cursor: pointer; color: var(--ink);
  border: 0; border-left: 3px solid var(--s, var(--accent)); border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--s, var(--accent)) 12%, transparent);
  padding: .25rem .55rem; margin: .15rem 0 .3rem; font-size: .8125rem; line-height: 1.35;
}
.reply-prev:hover { background: color-mix(in srgb, var(--s, var(--accent)) 20%, transparent); }
.reply-prev b { display: block; font-size: .75rem; color: var(--s, var(--accent)); }
.reply-prev span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 0; min-width: 100%; color: var(--ink-2); }
.reply-prev.missing { border-left-color: var(--rule-strong); background: var(--surface-2); cursor: default; }
.reply-prev.missing b { color: var(--muted); }

.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr)); gap: .4rem; margin: .3rem 0 .3rem; width: 26rem; max-width: 100%; }
.media:has(> :only-child) { width: 17rem; grid-template-columns: minmax(0, 1fr); }
.media-thumb { display: block; padding: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; aspect-ratio: 16 / 10; width: 100%; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-video, .media-file, .withheld {
  display: flex; flex-direction: column; justify-content: center; gap: .2rem; aspect-ratio: 16 / 10;
  border: 1px solid var(--rule); border-radius: 8px; padding: .6rem .75rem; font-size: .8125rem; background: var(--surface-2);
  color: var(--ink); text-decoration: none; text-align: left; width: 100%;
}
.media-video { cursor: pointer; }
/* Videos (no thumbnail) and withheld media are compact rows, not 16:10 boxes: icon left, label and reason stacked. */
.media-video, .withheld { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: center; gap: .05rem .6rem; aspect-ratio: auto; padding: .45rem .75rem; line-height: 1.35; }
.media-video svg, .withheld svg { grid-row: span 2; }
.media-video span:empty { display: none; }
.media-video svg, .media-file svg, .withheld svg { width: 1.3rem; height: 1.3rem; }
.media-file { aspect-ratio: auto; flex-direction: row; align-items: center; gap: .6rem; }
.withheld { border-style: dashed; border-color: var(--rule-strong); color: var(--muted); cursor: default; }
.withheld strong { color: var(--ink-2); font-size: .8125rem; }
.withheld .reason { display: inline-block; }

/* ---------- Ask about this ---------- */
.ask {
  display: inline-flex; align-items: center; gap: .35rem; border: 1px solid transparent; background: none; cursor: pointer;
  font-size: .8125rem; color: var(--muted); padding: .3rem .4rem; border-radius: 4px; white-space: nowrap;
}
.ask svg { width: .95rem; height: .95rem; flex: none; }
.ask:hover, .ask:focus-visible { color: var(--accent); border-color: var(--rule); background: var(--surface-2); }
.ask .count { display: inline-block; min-width: 1.2rem; padding: 0 .3rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); font-weight: 700; font-size: .75rem; text-align: center; }
/* Count badge on the bubble: icon and number only. */
.ask-count { gap: .2rem; padding: .05rem .3rem; margin: -.1rem 0; font-family: var(--font-mono); font-size: .6875rem; color: var(--s); border-radius: 999px; }
.ask-count svg { width: .8rem; height: .8rem; }
.ask-count .count { background: none; color: inherit; padding: 0; min-width: 0; font-size: inherit; }
.ask-count:hover, .ask-count:focus-visible { color: var(--s); border-color: color-mix(in srgb, var(--s) 45%, transparent); background: none; }

/* Action row (#id permalink, Ask). Small screens and touch: visually hidden but
   focusable; shown in the bubble on tap, keyboard focus, or when linked. */
.m-actions { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.msg.reveal .m-actions, .msg:focus-within .m-actions, .row.is-target .m-actions {
  position: static; width: auto; height: auto; overflow: visible; clip-path: none;
  display: flex; justify-content: flex-end; align-items: center; gap: .25rem;
  margin: .3rem -.35rem 0; padding-top: .25rem; border-top: 1px solid color-mix(in srgb, var(--s) 22%, transparent);
}
.m-actions .mid { display: inline-flex; align-items: center; min-height: 2rem; padding: 0 .5rem; border-radius: 999px; color: var(--accent); text-decoration: none; font-size: .75rem; font-weight: 500; }
.m-actions .mid:hover { text-decoration: underline; }
.m-actions .ask { min-height: 2rem; padding: 0 .55rem; border-radius: 999px; font-size: .75rem; color: var(--ink-2); }
.m-actions .ask svg { width: .85rem; height: .85rem; }

/* Wider screens with a mouse: a floating action pill beside the bubble on hover or focus. */
@media (hover: hover) and (min-width: 40.01rem) {
  .bubble { max-width: min(70ch, 100% - 8rem); }
  .m-actions,
  .msg.reveal .m-actions, .msg:focus-within .m-actions, .row.is-target .m-actions {
    position: absolute; top: 0; left: calc(100% + .4rem); right: auto; width: auto; height: auto; overflow: visible; clip-path: none;
    display: flex; align-items: center; gap: .1rem; margin: 0; padding: .1rem; border: 1px solid var(--rule); border-radius: 999px;
    background: var(--surface); box-shadow: 0 4px 14px rgb(0 0 0 / .12); opacity: 0; pointer-events: none; transition: opacity .12s ease-out;
  }
  .msg.me .m-actions { left: auto; right: calc(100% + .4rem); }
  .msg:hover .m-actions, .msg:focus-within .m-actions, .msg.reveal .m-actions, .row.is-target .m-actions { opacity: 1; pointer-events: auto; }
  .m-actions .mid, .m-actions .ask { min-height: 1.6rem; }
}

/* ---------- Service messages and markers ---------- */
.svc { text-align: center; margin: .45rem 0; font-size: .78rem; color: var(--muted); }
.svc span { display: inline-block; padding: .1rem .7rem; border-radius: 999px; }
.gap-row {
  margin: .5rem auto; max-width: 40rem; width: fit-content; padding: .35rem .8rem; font-size: .78rem; line-height: 1.4; color: var(--muted);
  border: 1px dashed var(--rule-strong); border-radius: 8px; background: var(--surface);
  display: flex; gap: .3rem .5rem; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center;
}
.gap-row .bar { display: inline-block; width: 1.8rem; height: .5rem; background: var(--bar); border-radius: 1px; }

/* ---------- 2025-2026 annotation card: full width, distinct from the chat ---------- */
.note-card {
  margin: .8rem 0 1rem; background: var(--note); color: var(--note-ink);
  border: 1px solid var(--rule); border-left: 4px solid var(--note-edge); border-radius: 0 10px 10px 0;
  padding: .7rem 1rem .45rem;
}
.note-label { display: flex; align-items: center; gap: .3rem .5rem; flex-wrap: wrap; color: var(--note-ink); font-size: .8125rem; font-weight: 700; line-height: 1.5; margin-bottom: .45rem; padding-bottom: .4rem; border-bottom: 1px solid var(--note-edge); }
.note-label svg { width: 1rem; height: 1rem; }
.note-label .meta { display: block; width: 100%; font-size: .75rem; font-weight: 400; }
.note-label a { color: inherit; }
.note-card .m-text { color: var(--note-ink); font-family: var(--font-ui); font-size: .9375rem; line-height: 1.55; max-width: 75ch; }
.note-card .m-text a { color: var(--note-ink); }
.note-card .m-foot { display: flex; align-items: center; gap: .5rem; margin-top: .2rem; }
.note-card .m-foot .ask { margin-left: -.4rem; color: var(--note-ink); }

/* ---------- Linked (#id) message ---------- */
.row.is-target { display: flex; flex-direction: column; background: var(--accent-soft); margin: .5rem -.5rem; padding: .5rem; border-radius: 10px; }
.row.is-target > .day { order: -2; margin-top: .25rem; }
.row.is-target::before { order: -1; content: "Linked message"; display: block; margin: 0 0 .3rem 2.5rem; color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.row.is-target.row-me::before { text-align: right; margin: 0 2.5rem .3rem 0; }
.row.is-target > .msg .bubble, .row.is-target > .note-card, .row.is-target > .gap-row { box-shadow: 0 0 0 2px var(--accent); }
.row.is-target > .msg { margin-top: 0; }
.row.is-target > .svc { outline: 2px solid var(--accent); outline-offset: 4px; }
.row.is-target .msg.cont .avatar { visibility: visible; height: 2rem; }
.row.is-target .msg.cont .m-head { display: block; }
.row.is-target .mid { background: var(--accent); color: var(--accent-ink); }

.load-more { display: flex; justify-content: center; padding: 1rem 0; }
.end-note { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 0 1rem; }

/* ---------- Small screens ---------- */
@media (max-width: 40rem) {
  .chat-toolbar { flex-wrap: wrap; gap: .65rem; align-items: end; }
  .chat-search { flex-basis: calc(100% - 6rem); }
  .filters-btn { padding-inline: .75rem; }
  .panel .jump-form { margin-top: .9rem; }
  .panel .jump-controls .input { flex: 1; width: auto; min-height: 2.75rem; }
  .bar-main { padding: .65rem 0 .5rem; }
  .stream-meta { font-size: .8125rem; padding-top: .5rem; gap: .2rem .75rem; }
  .legend { order: 3; width: 100%; margin-left: -.5rem; }
  .legend-item { padding-inline: .5rem; }
  .msg { gap: .4rem; }
  .msg:not(.me) { padding-right: 1.25rem; }
  .msg.me { padding-left: 1.25rem; }
  .avatar { width: 1.75rem; height: 1.75rem; font-size: .75rem; }
  .row.is-target .msg.cont .avatar { height: 1.75rem; }
  .bubble { padding: .3rem .6rem .3rem .55rem; }
  .msg.me .bubble { padding: .3rem .55rem .3rem .6rem; }
  .note-card { padding: .65rem .8rem .4rem; }
  .row.is-target::before { margin-left: 2.15rem; }
  .row.is-target.row-me::before { margin: 0 2.15rem .3rem 0; }
  .note-card .ask .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Day notes: sticky header under the toolbar, Details card (wide) or bottom sheet (narrow) ----------
   The header keeps its full layout height at all times; folding on scroll only
   clips it (clip-path) and moves the track up, so the chat never shifts under it.
   --c is 0 (full) or 1 (compact); every folded value is derived from it, so hover,
   keyboard focus and dragging can unfold it by resetting one property. */
.day-head {
  --c: 0;
  --dh-pad: .4rem; --dh-row1: 2.25rem; --dh-gap: .2rem;
  --rail-full: 26px; --tl-h: 42px;
  --rail: calc(var(--rail-full) - (var(--rail-full) - 4px) * var(--c));
  --dh-compact: calc(var(--dh-pad) + var(--dh-row1) + var(--dh-gap) + 14px);
  position: relative; z-index: 1; padding: var(--dh-pad) 0 .3rem; background: var(--paper);
  clip-path: inset(-12px -12px calc((100% - var(--dh-compact)) * var(--c)) -12px);
  transition: clip-path .22s ease;
}
.day-head::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--rule); pointer-events: none;
  top: calc(100% - 1px - (100% - var(--dh-compact)) * var(--c)); transition: top .22s ease;
}
.day-head.compact { --c: 1; }
.day-head.compact:has(:focus-visible), .day-head.compact:has(.tl-box.dragging) { --c: 0; }
@media (hover: hover) { .day-head.compact:hover { --c: 0; } }

.dn-host { font-size: .9rem; }
.dh-row1 { display: flex; align-items: center; gap: .6rem; height: var(--dh-row1); min-width: 0; white-space: nowrap; }
.dh-row1 .dn-date { flex: none; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -.025em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.dh-incident { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.dh-incident[data-side="on"] { color: var(--danger); }
.inc-short { display: none; }
.dh-rel { flex: none; display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; font-weight: 700; color: var(--ink); }
.dh-dots { display: inline-flex; gap: 3px; }
.dh-dots .seg { width: .5rem; height: .5rem; border-radius: 50%; border: 1px solid var(--rule-strong); }
.dh-dots .seg.on { background: var(--accent); border-color: var(--accent); }
.dh-title { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .875rem; font-weight: 600; color: var(--ink); }
.dh-title.none { color: var(--muted); font-weight: 500; }
.dh-title:empty { display: none; }
.dh-incident::before, .dh-rel::before, .dh-title::before { content: "·"; margin-right: .6rem; color: var(--muted); font-weight: 400; }
.dh-row1 .dn-nav { margin-left: auto; }
.dh-row1 .dn-step { width: var(--dh-row1); height: var(--dh-row1); }
.dh-toggle {
  flex: none; display: inline-flex; align-items: center; gap: .3rem; height: var(--dh-row1); padding: 0 .65rem 0 .75rem;
  border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer;
  font: inherit; font-size: .8125rem; font-weight: 700;
}
.dh-toggle:hover { border-color: var(--accent); background: var(--surface-2); }
.dh-toggle[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.dh-toggle svg { width: 1rem; height: 1rem; transition: transform .15s ease-out; }
.dh-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.dh-row2 { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: .75rem; margin-top: var(--dh-gap); }
/* Below the 14px strip that stays visible when folded, so a faded button is never hit. */
.dh-imp {
  align-self: start; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1px;
  height: 28px; margin-top: 14px; padding: 0 .5rem; border: 1px solid var(--rule-strong); border-radius: 6px;
  background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; line-height: 1.1; white-space: nowrap;
  opacity: calc(1 - var(--c)); transition: opacity .18s ease;
}
.dh-imp.next { align-items: flex-end; text-align: right; }
.dh-imp:hover:not([disabled]) { border-color: var(--accent); background: var(--surface-2); }
.dh-imp[disabled] { opacity: calc(.5 * (1 - var(--c))); cursor: not-allowed; }
.dh-imp-label { font-size: .6875rem; font-weight: 700; }
.dh-imp-date { font-family: var(--font-mono); font-size: .625rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Timeline scrubber ----------
   Main track Jul 2019 to Oct 2021, then a short end segment for the 2025-26 notes.
   Everything hangs off --rail (the rail's top edge): ticks over the weekly
   message-volume chart above it, phase bands below it. .tl-scrub (42px, 48px on
   touch-width screens) is the pointer target. Folded, the rail moves to 4px and
   the ticks shrink to short marks across it.
   Graphic contrast against --paper: key >= 11:1 / 6.3:1, important >= 6.4:1 / 3.9:1 (dark / light). */
.dn-timeline { --tl-endw: 3.2rem; --tl-gap: .55rem; display: block; min-width: 0; }
.ph-building { --ph: var(--indigo); }
.ph-running { --ph: var(--accent); }
.ph-incident { --ph: var(--danger); }
.ph-claims { --ph: #7cc4e8; }
.ph-refunds { --ph: var(--ok); }
.ph-winding { --ph: var(--muted); }
.ph-later { --ph: var(--note-edge); }
:root[data-theme="light"] .ph-claims { --ph: #1f6d96; }

.dn-phase { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; font-size: .75rem; line-height: 1.4; color: var(--ink-2); white-space: nowrap; }
.dn-phase .ph-text { overflow: hidden; text-overflow: ellipsis; }
.dn-phase b { color: var(--ink); font-weight: 700; }
.ph-dot { flex: none; width: .75rem; height: .3rem; border-radius: 1px; background: var(--ph, var(--muted)); }

.tl-box { position: relative; }
.tl-scrub {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--tl-endw); column-gap: var(--tl-gap);
  height: var(--tl-h); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.tl-main, .tl-endseg { position: relative; min-width: 0; }
.tl-density {
  position: absolute; left: 0; top: calc(var(--rail) - 22px); width: 100%; height: 20px; overflow: visible;
  fill: color-mix(in srgb, var(--muted) 30%, transparent); opacity: calc(1 - var(--c)); transition: opacity .18s ease, top .22s ease;
}
.tl-rail { position: absolute; left: 0; right: 0; top: var(--rail); height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--muted) 34%, transparent); overflow: hidden; transition: top .22s ease; }
.tl-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 60%, transparent); transition: width .2s ease-out; }
.tl-endseg .tl-rail { background: color-mix(in srgb, var(--note-edge) 30%, transparent); }
.tl-endseg::before { content: ""; position: absolute; left: calc(-1 * var(--tl-gap) / 2 - 3px); top: calc(var(--rail) - 3px); width: 6px; height: 12px; border-left: 2px solid var(--rule-strong); border-right: 2px solid var(--rule-strong); transform: skewX(-20deg); transition: top .22s ease; }
.tl-phases { position: absolute; left: 0; right: 0; top: calc(var(--rail) + 9px); height: 5px; opacity: calc(1 - var(--c)); transition: opacity .18s ease, top .22s ease; }
.tl-phase { position: absolute; top: 0; bottom: 0; border-radius: 1px; background: color-mix(in srgb, var(--ph) 70%, transparent); }
.tl-dots { position: absolute; inset: 0; }
.tl-dot { position: absolute; top: calc(var(--rail) + 1px); width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--note-edge); transition: top .22s ease; }

/* Markers: pointer-transparent (the track handles pointers), keyboard-focusable. */
.tl-marks { position: absolute; inset: 0; pointer-events: none; }
.tl-mark { position: absolute; padding: 0; border: 0; margin: 0 0 0 -1.5px; width: 3px; border-radius: 1px; pointer-events: none; cursor: pointer; transition: top .22s ease, height .22s ease; }
.tl-mark.rel-5 { top: calc(var(--rail) - 18px + 16px * var(--c)); height: calc(18px - 8px * var(--c)); background: var(--ev-key); }
.tl-mark.rel-4 { top: calc(var(--rail) - 11px + 10px * var(--c)); height: calc(11px - 3px * var(--c)); background: var(--ev-imp); }
.tl-mark.off { opacity: .35; }
.tl-mark.tl-inc { top: calc(var(--rail) - 28px + 26px * var(--c)); width: 12px; height: calc(34px - 24px * var(--c)); margin-left: -6px; background: none; }
.tl-inc::before { content: ""; position: absolute; left: 2px; top: 1px; width: 8px; height: 8px; background: var(--danger); transform: rotate(45deg); border-radius: 1px; opacity: calc(1 - var(--c)); transition: opacity .18s ease; }
.tl-inc::after { content: ""; position: absolute; left: 5px; top: calc(9px * (1 - var(--c))); bottom: 0; width: 2px; background: var(--danger); transition: top .22s ease; }
.tl-mark:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.tl-thumb {
  position: absolute; top: calc(var(--rail) + 3px); z-index: 3; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent), 0 1px 4px rgb(0 0 0 / .35);
  cursor: grab; transform: scale(calc(1 - .3 * var(--c))); transition: left .2s ease-out, top .22s ease, transform .22s ease;
}
.tl-thumb.later { background: var(--note-edge); box-shadow: 0 0 0 1px var(--note-edge), 0 1px 4px rgb(0 0 0 / .35); }
.tl-thumb:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 50%; }
.tl-box.dragging .tl-thumb { cursor: grabbing; transition: none; box-shadow: 0 0 0 1px var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 28%, transparent); }
.tl-box.dragging .tl-fill { transition: none; }
.tl-box.dragging, .tl-box.dragging .tl-scrub { cursor: grabbing; }
@media (pointer: coarse) { .tl-thumb { width: 24px; height: 24px; margin: -12px 0 0 -12px; } }

/* Floating label: hover, focus and drag. A child of the sticky bar, placed under the track. */
.tl-tip {
  --arrow: 50%;
  position: absolute; top: 0; left: 0; z-index: 4; width: max-content; max-width: min(16.5rem, 100%);
  padding: .4rem .6rem .45rem; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow); pointer-events: none !important; font-size: .75rem; line-height: 1.35;
}
.tl-tip::after { content: ""; position: absolute; left: var(--arrow); top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--surface); border: solid var(--rule-strong); border-width: 0 1px 1px 0; transform: rotate(-135deg); }
.tl-tip-date { display: block; font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-tip-title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: .1rem; font-weight: 600; overflow-wrap: anywhere; }
.tl-tip-meta { display: block; margin-top: .15rem; color: var(--muted); }

/* Axis: year and quarter ticks; labels placed by layoutAxis() in chat.js. */
.tl-axis {
  position: relative; display: block; height: 13px; font-family: var(--font-mono); font-size: .6875rem; line-height: 13px; color: var(--muted); white-space: nowrap;
  opacity: calc(1 - var(--c)); transition: opacity .18s ease;
}
.tl-ax-tick { position: absolute; top: 0; width: 1px; height: 3px; margin-left: -.5px; background: var(--rule-strong); }
.tl-ax-tick.year { height: 6px; background: var(--muted); }
.tl-ax-label { position: absolute; top: 1px; left: 0; }
.tl-ax-label b { font-weight: 500; color: var(--ink-2); }
.ax-ph { margin-left: .4em; font-family: var(--font-ui); color: var(--muted); }
.ax-inc b { font-weight: 700; color: var(--danger); }
.tl-ax-later { position: absolute; top: 1px; right: 0; width: var(--tl-endw); text-align: center; }

.tl-legend { display: flex; flex-wrap: wrap; gap: .15rem .8rem; margin: 0; padding: 0; list-style: none; font-size: .75rem; line-height: 1.5; color: var(--muted); }
.tl-legend li { display: inline-flex; align-items: center; gap: .35rem; }
.lg { display: inline-block; flex: none; }
.lg-key { width: 3px; height: 12px; border-radius: 1px; background: var(--ev-key); }
.lg-imp { width: 3px; height: 8px; border-radius: 1px; background: var(--ev-imp); align-self: center; }
.lg-inc { width: 7px; height: 7px; margin: 0 1px; background: var(--danger); transform: rotate(45deg); }
.lg-now { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.lg-vol { width: 14px; height: 9px; background: color-mix(in srgb, var(--muted) 55%, transparent); clip-path: polygon(0 100%, 0 70%, 25% 70%, 25% 20%, 50% 20%, 50% 0, 75% 0, 75% 55%, 100% 55%, 100% 100%); }

/* Key evidence days: collapsible quick list in the details. */
.dn-keydays { margin: 1rem 0 0; border: 1px solid var(--rule); border-radius: 8px; }
.dn-keydays > summary {
  display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .35rem .75rem; cursor: pointer; list-style: none;
  font-size: .8125rem; font-weight: 700; color: var(--ink); border-radius: 8px;
}
.dn-keydays > summary::-webkit-details-marker { display: none; }
.dn-keydays > summary::after { content: ""; width: .45rem; height: .45rem; margin: 0 .15rem 0 .1rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .15s ease-out; }
.dn-keydays[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.dn-keydays > summary:hover { background: var(--surface-2); }
.kd-count { margin-left: auto; padding: 0 .45rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; line-height: 1.6; }
.kd-list { display: grid; gap: 2px; margin: 0; padding: 0 .3rem .35rem; list-style: none; border-top: 1px solid var(--rule); padding-top: .35rem; }
.kd {
  display: grid; grid-template-columns: 3px 5.6rem minmax(0, 1fr); align-items: start; column-gap: .55rem; width: 100%; min-height: 2.75rem;
  padding: .4rem .5rem; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--ink); cursor: pointer; text-align: left; font: inherit;
}
.kd:hover { background: var(--surface-2); border-color: var(--rule); }
.kd[aria-current="true"] { background: var(--accent-soft); border-color: var(--accent); }
.kd[aria-current="true"] .kd-date { color: var(--ink); font-weight: 700; }
.kd.off .kd-title, .kd.off .kd-date { color: var(--muted); }
.kd-chip { align-self: stretch; width: 3px; min-height: 1rem; border-radius: 1px; }
.kd-chip.rel-5 { background: var(--ev-key); }
.kd-chip.rel-4 { background: var(--ev-imp); margin-block: .25rem; }
.kd-date { font-family: var(--font-mono); font-size: .75rem; line-height: 1.45; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kd-title { font-size: .8125rem; line-height: 1.4; overflow-wrap: anywhere; }
/* Evidence colours for the ticks, legend and quick list. */
.dn-host { --ev-key: #c4b0ff; --ev-imp: #8d86d6; }
:root[data-theme="light"] .dn-host { --ev-key: #4b2fb8; --ev-imp: #7a70c4; }

/* ---------- Details content (card or sheet) ---------- */
.dd-top { margin: 0 0 .8rem; }
.dd-date { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); }
.dd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .9rem; margin: .3rem 0 0; min-width: 0; }
.dd-incident { font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.dd-incident[data-side="on"] { color: var(--danger); }
.dn-title { margin: 0 0 .4rem; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.dn-summary { margin: 0; font-size: .875rem; line-height: 1.6; color: var(--ink-2); }
.dn-relevance { display: flex; align-items: center; gap: .6rem; margin: .95rem 0 0; font-size: .8125rem; color: var(--ink); }
.dn-rel-label { font-weight: 700; }
.dn-meter { display: inline-flex; gap: 3px; }
.dn-meter .seg { width: 1.05rem; height: .5rem; border-radius: 2px; border: 1px solid var(--rule-strong); }
.dn-meter .seg.on { background: var(--accent); border-color: var(--accent); }
.dn-why { margin: .4rem 0 0; font-size: .8125rem; line-height: 1.5; color: var(--ink-2); }
.dn-why b { color: var(--ink); }
.dn-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.dn-tag { padding: .1rem .55rem; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .75rem; line-height: 1.5; }
.dn-sub { margin: 1.15rem 0 .45rem; font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dn-keys { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.dn-keys a {
  display: flex; align-items: flex-start; gap: .55rem; padding: .45rem .6rem; text-decoration: none; color: var(--ink);
  border: 1px solid var(--rule); border-left: 3px solid var(--s); border-radius: 4px 8px 8px 4px; background: var(--surface-2);
}
.dn-keys a:hover { background: var(--s-bg); border-color: color-mix(in srgb, var(--s) 45%, transparent); border-left-color: var(--s); }
.dn-keys .swatch { margin-top: .3rem; }
.k-body { display: block; min-width: 0; flex: 1; }
.k-head { display: flex; align-items: baseline; gap: .5rem; font-size: .75rem; }
.k-head b { color: var(--s); }
.k-id { margin-left: auto; font-family: var(--font-mono); font-size: .6875rem; color: var(--muted); }
.k-text { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .8125rem; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.dd-nav { display: none; }
.dd-steps { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.1rem; }
.dd-steps .dn-sub { margin: 0; }
.dn-nav { display: flex; gap: .3rem; flex: none; }
.dn-step {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; cursor: pointer;
  border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); color: var(--ink);
}
.dn-step:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); background: var(--surface-2); }
.dn-step[disabled] { opacity: .4; cursor: not-allowed; }
.dn-step svg { width: 1.1rem; height: 1.1rem; }
.dn-imp-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .4rem; margin-top: .6rem; }
.dn-important { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .1rem; width: 100%; min-height: 2.75rem; height: auto; padding: .4rem .6rem; line-height: 1.3; text-align: left; white-space: normal; }
.dn-important.next { align-items: flex-end; text-align: right; }
.dn-imp-label { font-size: .8125rem; }
.dn-imp-date { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; color: var(--muted); }
.dn-disclaimer { margin: .9rem 0 0; padding-top: .75rem; border-top: 1px solid var(--rule); font-size: .75rem; line-height: 1.45; color: var(--muted); }

/* Details card under the header (wide screens): an overlay, never pushing the chat. */
.dn-details {
  position: absolute; top: calc(100% + .35rem); right: 0; z-index: 3; width: min(36rem, 100%);
  max-height: min(50vh, calc(100dvh - var(--chat-sticky, 16rem) - 1rem)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  padding: 0 1.15rem 1.1rem; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  animation: card-enter .16s ease-out;
}
@keyframes card-enter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Bottom sheet (modal dialog, narrow screens). */
.day-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 88dvh; padding: 0 1rem 1.25rem;
  border: 0; border-top: 1px solid var(--rule-strong); border-radius: 14px 14px 0 0; background: var(--surface); color: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
}
.day-sheet[open] { animation: sheet-enter .2s ease-out; }
@keyframes sheet-enter { from { transform: translateY(100%); } to { transform: translateY(0); } }
.dn-sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: .6rem 0 .5rem; margin-bottom: .75rem; background: var(--surface); border-bottom: 1px solid var(--rule); }
.dn-sheet-head h2 { margin: 0; font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.dn-sheet-head .icon-btn { font-size: 1.4rem; }
body:has(.day-sheet[open]) { overflow: hidden; }

/* Mid widths: the short offset leaves room for the title. */
@media (max-width: 899.98px) {
  .inc-full { display: none; }
  .inc-short { display: inline; }
}
/* ---------- Narrow screens: date · offset · dots · Details, then a full-width touch track ---------- */
@media (max-width: 699.98px) {
  .day-head { --dh-pad: .35rem; --dh-row1: 2.25rem; --rail-full: 30px; --tl-h: 48px; }
  .dh-row1 { gap: .55rem; }
  .dh-row1 .dn-date { font-size: 1.05rem; }
  .dh-incident { font-size: .75rem; }
  .dh-incident::before, .dh-rel::before { content: none; }
  .dh-dots { gap: 2px; }
  .dh-dots .seg { width: 7px; height: 7px; }
  .inc-full { display: none; }
  .inc-short { display: inline; }
  .dh-title, .dh-row1 .dn-nav { display: none; }
  .dh-rel-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .dh-toggle { margin-left: auto; padding: 0 .55rem 0 .65rem; }
  .dh-row2 { grid-template-columns: minmax(0, 1fr); }
  .dh-imp { display: none; }
  .dn-details { display: none !important; }
  .dd-nav { display: block; }
  .date-context { display: none; }
  .stream-bar:not(.is-filtered) .stream-meta { display: none; }
  .legend.in-panel { width: 100%; margin: 0 0 .5rem -.5rem; }
}
@media (max-width: 24rem) {
  .dh-row1 { gap: .45rem; }
  .dh-toggle { gap: .2rem; padding: 0 .4rem 0 .55rem; }
  .dh-toggle-label { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-app *, .chat-app *::before, .chat-app *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  :root, :root[data-theme] {
    --s-n: #2f56b0; --s-c: #0b6b53; --s-m: #a22a6e; --s-o: #586278; --s-ink: #ffffff;
    --s-n-bg: #ffffff; --s-c-bg: #ffffff; --s-m-bg: #ffffff; --s-o-bg: #ffffff;
    --accent-soft: #e2eff3; --accent-ink: #ffffff;
    --target: #d3e3ff; --target-ink: #172638;
  }
  .stream-bar, .panel, .ask, .m-actions, .load-more, .day-head, .dn-details, .tl-tip, .day-sheet { display: none !important; }
  .chat-app { max-width: none; padding: 0; }
  .stream { padding-bottom: 0; }
  .bubble, .note-card { break-inside: avoid; box-shadow: none; }
  .row.is-target { background: transparent; }
  .row.is-target::before { display: none; }
  .row.is-target > .msg .bubble, .row.is-target > .note-card, .row.is-target > .gap-row { box-shadow: none; }
}
