/* Elizabeth Bridge · the shell and the shared parts.
   Tokens from /brand/tokens.css. Space on the 4px ramp (--s1..--s8), type on six roles
   (label 12 · body 13 · title 15 · read 17 serif · head 20 · figure 28), two text inks.
   Two standing inks never share a style: measured = gold, solid; estimate = violet, hatched, serif. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--wall); background-color: var(--ground); background-attachment: fixed;
  color: var(--t1); font: var(--w-body) var(--fs-body)/var(--lh-body-px) var(--sans);
  font-variant-numeric: tabular-nums; font-synthesis: none; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3, h4, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--tint-soft); color: var(--t1); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--fill); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
:focus-visible { outline: 2px solid var(--tint-bar); outline-offset: 2px; }
.i { width: 18px; height: 18px; flex: none; }

/* capture mode · ?capture=1 · no cursor, no scrollbars, nothing blinking */
html.capture, html.capture * { cursor: none !important; scrollbar-width: none !important; }
html.capture ::-webkit-scrollbar { display: none; }
html.capture input, html.capture textarea { caret-color: transparent; }
html.capture .shell { height: calc(100vh / var(--z, 1)); height: calc(100dvh / var(--z, 1)); }

/* ------------------------------------------------------------- the shell */
.shell { display: flex; gap: 10px; padding: 10px; height: 100vh; height: 100dvh; }
.pane { border-radius: var(--r-pane); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow); min-height: 0; }
.rail { flex: 0 0 232px; width: 232px; display: flex; flex-direction: column; background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; text-decoration: none; }
.brand svg { flex: none; }
.brand b { font-size: var(--fs-title); line-height: var(--lh-title-px); font-weight: 600; letter-spacing: var(--tr-title-em); }
.brand-ai { margin-left: -6px; color: var(--t2); font-size: var(--fs-title); line-height: var(--lh-title-px); font-weight: 500; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.nav-group + .nav-group { border-top: 1px solid var(--sep); }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: var(--r-ctl);
  color: var(--t2); text-decoration: none; font-weight: 500;
  transition: background var(--d-state) var(--spring), color var(--d-state) var(--spring); }
.nav a:hover { background: var(--fill3); color: var(--t1); }
.nav a[aria-current="page"] { background: var(--tint-soft); color: var(--t1); }
.nav a[aria-current="page"] .i { color: var(--tint-text); }
.rail-foot { padding: 12px 14px 16px; border-top: 1px solid var(--sep); display: flex; flex-direction: column; gap: 10px; }
.who-foot { display: flex; flex-direction: column; min-width: 0; }
.who-foot b { font-weight: 600; }
.who-foot small { color: var(--t2); font-size: var(--fs-label); line-height: var(--lh-label-px); }
.rail-foot .seg { width: 100%; }
.rail-foot .seg button { flex: 1; }

.sheet { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--sheet); overflow: hidden; }
.bar { flex: none; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px 0 28px; border-bottom: 1px solid var(--sep); }
.bar h1 { font-size: var(--fs-head); line-height: var(--lh-head-px); font-weight: 600; letter-spacing: var(--tr-head-em); white-space: nowrap; }
.bar .date { color: var(--t2); font-size: var(--fs-label); white-space: nowrap; }
.bar .sp { flex: 1; }
.ask { display: flex; align-items: center; gap: 8px; height: 36px; width: 240px; padding: 0 12px; border-radius: var(--r-full);
  border: 1px solid var(--card-line); background: var(--fill3); color: var(--t2); cursor: pointer; text-align: left;
  transition: background var(--d-state) var(--spring); }
.ask:hover { background: var(--fill2); color: var(--t1); }
.ask .i { width: 16px; height: 16px; }
.ask kbd { margin-left: auto; font: 500 var(--fs-label)/16px var(--sans); color: var(--t3); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-full); border: 0;
  background: transparent; color: var(--t2); cursor: pointer; transition: background var(--d-state) var(--spring); }
.icon-btn:hover { background: var(--fill3); color: var(--t1); }
.menu-btn { display: none; }
.me { display: flex; align-items: center; padding: 3px; border-radius: var(--r-full); border: 0; background: transparent; cursor: pointer; }
.me:hover { background: var(--fill3); }
.demo-bar { display: flex; align-items: center; gap: 8px; }
.demo-bar .btn { min-height: 36px; }

.lane { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.lane-in { max-width: 1240px; margin: 0 auto; padding: 28px 32px 56px; }
.lane-in.enter { animation: laneIn var(--d-seg) var(--spring) both; }
@keyframes laneIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.scrim { display: none; }
.shell.first-run .rail, .shell.first-run .menu-btn, .shell.first-run .ask { display: none; }

/* ------------------------------------------------------------- shared parts */
.face { border-radius: 50%; object-fit: cover; flex: none; background: var(--fill2); box-shadow: 0 0 0 1px var(--card-line); }
.face.ini { display: inline-grid; place-items: center; background: var(--fill2); color: var(--t1); font-weight: 600; line-height: 1; }
.face.s18 { width: 18px; height: 18px; font-size: 8px; }
.face.s24 { width: 24px; height: 24px; font-size: 10px; }
.face.s28 { width: 28px; height: 28px; font-size: 11px; }
.face.s30 { width: 30px; height: 30px; font-size: 11px; }
.face.s36 { width: 36px; height: 36px; font-size: 13px; }
.face.s40 { width: 40px; height: 40px; font-size: 14px; }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; vertical-align: middle; }
.who-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .face.s18 { margin-right: -2px; }
.pc { color: var(--t3); font-size: var(--fs-label); font-weight: 500; }
.who-none { color: var(--t2); }

.card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: var(--s5); min-width: 0; }
.sec { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 var(--s3); }
.sec h2 { font-size: var(--fs-title); line-height: var(--lh-title-px); font-weight: 600; letter-spacing: var(--tr-title-em); }
.sec .meta { margin-left: auto; }
.block { margin-top: var(--s7); }
.meta { color: var(--t2); font-size: var(--fs-label); line-height: var(--lh-label-px); }
.label { color: var(--t2); font-size: var(--fs-label); line-height: var(--lh-label-px); font-weight: 500; }
.fig { font-size: var(--fs-fig); line-height: var(--lh-fig-px); font-weight: var(--w-fig); letter-spacing: var(--tr-fig-em); }
.fig small { font-size: var(--fs-body); font-weight: 500; color: var(--t2); letter-spacing: 0; margin-left: 4px; }
.head { font-size: var(--fs-head); line-height: var(--lh-head-px); font-weight: 600; letter-spacing: var(--tr-head-em); text-wrap: balance; }
.title { font-size: var(--fs-title); line-height: var(--lh-title-px); font-weight: 600; letter-spacing: var(--tr-title-em); }
.read { font-family: var(--serif); font-size: var(--fs-read); line-height: var(--lh-read-px); max-width: var(--measure); text-wrap: pretty; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }

/* buttons · one filled per view */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 16px;
  border-radius: var(--r-ctl); border: 0; background: var(--fill2); color: var(--t1); font-weight: 600; font-size: var(--fs-body);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--d-state) var(--spring), transform var(--d-tap) var(--spring); }
.btn:hover { background: var(--fill); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .i { width: 16px; height: 16px; }
.btn.primary { background: var(--tint-bar); color: var(--on-tint); box-shadow: var(--shadow-tint); }
.btn.primary:hover { background: color-mix(in srgb, var(--tint-bar) 88%, white); }
.btn.tinted { background: var(--tint-soft); color: var(--tint-text); }
.btn.tinted:hover { background: color-mix(in srgb, var(--tint-bar) 26%, transparent); }
.btn.quiet { background: transparent; color: var(--t2); padding: 0 10px; }
.btn.quiet:hover { background: var(--fill3); color: var(--t1); }
.btn.danger { background: var(--bad-soft); color: var(--bad-text); }
.btn.lg { min-height: 44px; padding: 0 20px; font-size: var(--fs-title); border-radius: var(--r-row); }
.btn[aria-busy="true"] { cursor: progress; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: var(--r-full);
  background: var(--fill3); border: 1px solid var(--card-line); color: var(--t2); font-size: var(--fs-label); font-weight: 500; white-space: nowrap; text-decoration: none; }
button.chip, a.chip { cursor: pointer; color: var(--t1); transition: background var(--d-state) var(--spring); }
button.chip:hover, a.chip:hover { background: var(--fill2); }
button.chip[aria-pressed="true"] { background: var(--tint-soft); color: var(--tint-text); border-color: var(--tint-line); }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--r-tag);
  font-size: var(--fs-label); line-height: 16px; font-weight: 600; background: var(--fill2); color: var(--t2); white-space: nowrap; }
abbr[title], .hint { text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; cursor: help; }
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-ctl); background: var(--fill3); border: 1px solid var(--card-line); }
.seg button { border: 0; background: transparent; color: var(--t2); min-height: 28px; padding: 0 12px; border-radius: 8px; font-weight: 500; cursor: pointer; }
.seg button:hover { color: var(--t1); }
.seg button[aria-pressed="true"] { background: var(--card-solid); color: var(--t1); box-shadow: var(--shadow-sm); }

/* standing inks · DONE Guardrails 7: measured and estimated never share a style */
.ink-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.tag.ink-m { background: var(--tint-soft); color: var(--tint-text); }
.tag.ink-m .ink-dot { background: var(--tint-bar); }
.tag.ink-e { background: var(--est-soft); color: var(--est-text); }
.tag.ink-e .ink-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--est); transform: rotate(45deg); border-radius: 1px; }
.tag.ink-o { background: var(--fill3); color: var(--t1); }
.tag.ink-o .ink-dot { background: var(--t1); }
.tag.ink-map { background: var(--map-soft); color: var(--map); }
.tag.ink-map .ink-dot { background: var(--map); }
.tag.ink-r { background: var(--fill3); color: var(--t2); }
.tag.ink-r .ink-dot { background: var(--hatch-fill); }
.est { color: var(--est-text); font-family: var(--serif); font-style: italic; }
.est-box { border: 1px dashed color-mix(in srgb, var(--est) 55%, transparent); background: var(--est-soft); border-radius: var(--r-tile); padding: var(--s4); }
.own { font-family: var(--serif); color: var(--t1); }

/* verdicts · a word and a shape, never colour alone; the default (No difference, No change, Too few) carries no colour */
.vd { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 5px; border-radius: var(--r-full);
  font-size: var(--fs-label); line-height: 16px; font-weight: 600; white-space: nowrap; background: var(--fill3); color: var(--t2); }
.vd svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vd-few svg circle { fill: currentColor; stroke: none; }
.vd-better { background: var(--good-soft); color: var(--good-text); }
.vd-worse { background: var(--bad-soft); color: var(--bad-text); }
.vd-few { background: transparent; color: var(--t2); box-shadow: inset 0 0 0 1px var(--sep); }
.vd-watch { background: var(--warn-soft); color: var(--warn-text); }
.vd-change { background: var(--warn-soft); color: var(--warn-text); }
.vd-cause { background: var(--tint-soft); color: var(--tint-text); }
.vd .vd-warn { width: 10px; height: 10px; margin-left: 2px; }
.vd .vd-warn circle { fill: none; stroke: currentColor; stroke-width: 2.5; }

/* range bars · the interval, zero marked, the point as a dot */
.rb { display: inline-block; vertical-align: middle; overflow: visible; }
.rb-none { display: inline-block; width: 1px; }
.rb-axis { stroke: var(--sep); stroke-width: 1.5; }
.rb-zero { stroke: var(--t3); stroke-width: 1; }
.rb-m .rb-band { fill: var(--tint-soft); stroke: var(--tint-line); stroke-width: 1; }
.rb-m .rb-dot { fill: var(--tint-bar); }
.rb-e .rb-band { fill: var(--est-soft); stroke: var(--est); stroke-width: 1; stroke-dasharray: 2 2; }
.rb-e .rb-dot { fill: var(--card-solid); stroke: var(--est); stroke-width: 1.5; }

/* citations · a row id, pressable, that opens the row it names */
.cite { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; margin: 0 1px; border-radius: var(--r-tag);
  background: var(--tint-soft); color: var(--tint-text); font: 600 var(--fs-label)/16px var(--sans); text-decoration: none; vertical-align: 1px; }
a.cite:hover { background: color-mix(in srgb, var(--tint-bar) 30%, transparent); }

/* the AI mark · one marker for every machine-written line */
.ai-head { display: flex; align-items: center; gap: 6px; color: var(--tint-text); font-size: var(--fs-label); line-height: var(--lh-label-px); font-weight: 600; }
.ai-head .mark { width: 14px; height: 14px; flex: none; }
.ai-head .meta { font-weight: 400; }
.ai { font-family: var(--serif); font-size: var(--fs-read); line-height: var(--lh-read-px); color: var(--t1); max-width: var(--measure); text-wrap: pretty; }

/* tiles · few, each a drill-down into the block under it */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); min-height: 116px; padding: var(--s4); text-align: left;
  border-radius: var(--r-tile); border: 1px solid var(--card-line); background: var(--card); box-shadow: var(--shadow-card); color: var(--t1); cursor: pointer;
  transition: background var(--d-state) var(--spring), box-shadow var(--d-state) var(--spring), transform var(--d-state) var(--spring); }
.tile:hover { background: var(--card-hover); box-shadow: var(--shadow); }
.tile[aria-pressed="true"] { box-shadow: var(--shadow-sel); }
.tile .label { display: block; min-height: 32px; }
.tile .t-v { min-height: 22px; display: flex; align-items: center; }
.delta { font-size: var(--fs-label); font-weight: 600; color: var(--t2); white-space: nowrap; }

/* tables · table.js sorts on a left-click and filters on a right-click */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-card); border: 1px solid var(--card-line); background: var(--card); box-shadow: var(--shadow-card); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.tbl th { text-align: left; font-weight: 500; font-size: var(--fs-label); color: var(--t2); padding: 10px 14px; border-bottom: 1px solid var(--sep); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--sep); white-space: nowrap; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--d-state) var(--spring); }
.tbl tbody tr:hover { background: var(--fill3); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }
.tbl td.wrap { white-space: normal; min-width: 14rem; }
.tbl tr.dim td { color: var(--t2); }
/* the moves table (Overview, Messages): the move and what came next wrap, who sits over how many people */
.tbl-moves .c-move, .tbl-moves .c-next { white-space: normal; min-width: 9rem; }
.tbl-moves td.c-with .meta { display: block; }
/* a stacked table, when its box is too narrow for the columns (a container query, so a rail or a card
   decides, not the window): the header stays as one row of sortable labels, each body row becomes a
   small grid whose areas the table names. A cell with data-l says what it is in front of its value.
   .st-m stacks under 860px of box, .st-l under 980px, .st-s under 560px. */
.tbl-wrap { container-type: inline-size; }
@container (max-width: 900px) {
  .tbl.st-l, .tbl.st-l thead, .tbl.st-l tbody { display: block; }
  .tbl.st-l thead tr { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; border-bottom: 1px solid var(--sep); }
  .tbl.st-l thead th { padding: 0; border: 0; }
  .tbl.st-l tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px; border-bottom: 1px solid var(--sep); align-items: center; }
  .tbl.st-l tbody tr:last-child { border-bottom: 0; }
  .tbl.st-l td { padding: 0; border: 0; white-space: normal; min-width: 0; text-align: left; }
  .tbl.st-l .c-rng { display: none; }
  .tbl.st-l td[data-l]::before { content: attr(data-l) " "; color: var(--t2); font-size: var(--fs-label); }
}
@container (max-width: 860px) {
  .tbl.st-m, .tbl.st-m thead, .tbl.st-m tbody { display: block; }
  .tbl.st-m thead tr { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; border-bottom: 1px solid var(--sep); }
  .tbl.st-m thead th { padding: 0; border: 0; }
  .tbl.st-m tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px; border-bottom: 1px solid var(--sep); align-items: center; }
  .tbl.st-m tbody tr:last-child { border-bottom: 0; }
  .tbl.st-m td { padding: 0; border: 0; white-space: normal; min-width: 0; text-align: left; }
  .tbl.st-m .c-rng { display: none; }
  .tbl.st-m td[data-l]::before { content: attr(data-l) " "; color: var(--t2); font-size: var(--fs-label); }
  .tbl-moves tbody tr { grid-template-areas: "move vd" "next chg" "with n"; }
  .tbl-moves .c-move { grid-area: move; }
  .tbl-moves .c-vd { grid-area: vd; justify-self: end; }
  .tbl-moves .c-next { grid-area: next; color: var(--t2); }
  .tbl-moves td.c-chg { grid-area: chg; text-align: right; }
  .tbl-moves .c-with { grid-area: with; color: var(--t2); }
  .tbl-moves td.c-with .meta { display: inline; }
  .tbl-moves td.c-n { grid-area: n; color: var(--t2); text-align: right; }
  .tbl-moves td.c-n::after { content: " turns"; }
}
@container (max-width: 560px) {
  .tbl.st-s, .tbl.st-s thead, .tbl.st-s tbody { display: block; }
  .tbl.st-s thead tr { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; border-bottom: 1px solid var(--sep); }
  .tbl.st-s thead th { padding: 0; border: 0; }
  .tbl.st-s tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px; border-bottom: 1px solid var(--sep); align-items: center; }
  .tbl.st-s tbody tr:last-child { border-bottom: 0; }
  .tbl.st-s td { padding: 0; border: 0; white-space: normal; min-width: 0; text-align: left; }
  .tbl.st-s .c-rng { display: none; }
  .tbl.st-s td[data-l]::before { content: attr(data-l) " "; color: var(--t2); font-size: var(--fs-label); }
}
.lit { animation: lit 2.4s var(--spring) both; }
@keyframes lit { 0%, 60% { background: var(--tint-soft); box-shadow: inset 0 0 0 1px var(--tint-line); } 100% { background: transparent; box-shadow: none; } }

/* family counter · "k of n shown, x expected false" */
.family { display: inline-flex; align-items: center; gap: 6px; color: var(--t2); font-size: var(--fs-label); white-space: nowrap; }

/* empty states · one line, one button */
.eb-empty { min-height: 52vh; display: grid; place-items: center; text-align: center; }
.eb-e-in { display: flex; flex-direction: column; align-items: center; gap: var(--s4); max-width: 26rem; }
.eb-empty .ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint-text); }
.eb-empty .ico .i { width: 26px; height: 26px; }
.eb-e-line { font-size: var(--fs-title); line-height: var(--lh-title-px); color: var(--t1); font-weight: 500; text-wrap: balance; }
.eb-part { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); padding: var(--s4); border-radius: var(--r-tile); border: 1px dashed var(--sep); }
.eb-part p { color: var(--t2); }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.input, .field input, .field select, .field textarea, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--sep);
  background: var(--fill3); color: var(--t1); font-size: var(--fs-read); line-height: 24px; }
.input:focus-visible, .field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 2px solid var(--tint-bar); outline-offset: 1px; }
textarea.input, .field textarea { resize: vertical; min-height: 96px; }
.err { color: var(--bad-text); font-size: var(--fs-body); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); opacity: 0; z-index: 80;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--r-full); max-width: calc(100vw - 32px);
  background: var(--glass2); -webkit-backdrop-filter: var(--blur-pal); backdrop-filter: var(--blur-pal);
  border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg); font-weight: 500; pointer-events: none;
  transition: opacity var(--d-seg) var(--spring), transform var(--d-seg) var(--spring); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast .i { width: 16px; height: 16px; color: var(--tint-text); }
.toast.err .i { color: var(--bad-text); }

/* the face menu */
.me-menu { position: fixed; z-index: 60; min-width: 240px; max-width: calc(100vw - 16px); padding: 6px; border-radius: var(--r-panel);
  background: var(--glass2); -webkit-backdrop-filter: var(--blur-pal); backdrop-filter: var(--blur-pal);
  border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg); transform-origin: top right; animation: mmIn var(--d-state) var(--spring) both; }
.me-menu.out { animation: fadeOut 140ms ease-in both; }
@keyframes mmIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.mm-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.mm-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mm-id b { font-weight: 600; font-size: var(--fs-title); line-height: var(--lh-title-px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu [role=menuitem] { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: var(--r-ctl);
  color: var(--t1); text-decoration: none; font-weight: 500; outline-offset: -2px; }
.me-menu [role=menuitem] .i { width: 16px; height: 16px; color: var(--t2); }
.me-menu [role=menuitem]:hover, .me-menu [role=menuitem]:focus-visible { background: var(--fill3); }
.mm-sep { height: 1px; background: var(--sep); margin: 4px 6px; }

/* the sheet */
.eb-sheet-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.42); animation: fadeIn 160ms linear both; }
.eb-sheet-wrap.out { animation: fadeOut 160ms linear both; }
.eb-sheet { position: relative; width: min(560px, 100%); max-height: min(86vh, 860px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card-solid); border: 1px solid var(--card-line); border-radius: var(--r-pane); box-shadow: var(--shadow-lg);
  padding: var(--s5); animation: sheetIn var(--d-seg) var(--spring) both; }
.eb-sheet-x { position: absolute; top: 12px; right: 12px; }
.eb-sheet-in { display: flex; flex-direction: column; gap: var(--s4); }
.eb-sheet-in > .head { padding-right: 40px; }
.sheet-acts { display: flex; justify-content: flex-end; align-items: center; gap: var(--s3); flex-wrap: wrap; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.wall { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); }
.wall-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint-text); }
.wall-mark .mark { width: 22px; height: 22px; }
.wall-acts { display: flex; gap: var(--s3); justify-content: flex-end; width: 100%; margin-top: var(--s2); flex-wrap: wrap; }

/* busy dots */
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; animation: ebDot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ebDot { 50% { opacity: 1; transform: translateY(-2px); } }

/* ------------------------------------------------------------ narrower */
@media (max-width: 1023px) {
  .shell { padding: 8px; }
  .rail { position: fixed; z-index: 40; top: 8px; bottom: 8px; left: 8px; transform: translateX(calc(-100% - 16px));
    transition: transform var(--d-lift) var(--spring); background: var(--glass2); }
  .shell.nav-open .rail { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity var(--d-lift) var(--spring); }
  .shell.nav-open + .scrim { opacity: 1; pointer-events: auto; }
  .menu-btn { display: grid; margin-left: -8px; }
  .bar { padding: 0 12px 0 16px; }
  .lane-in { padding: 24px 24px 48px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { padding: 0; }
  .sheet { border-radius: 0; border: 0; }
  .ask { width: 36px; padding: 0; justify-content: center; }
  .ask span, .ask kbd { display: none; }
  .bar { gap: 8px; }
  .bar .date { display: none; }
  .bar h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-read); line-height: 24px; }
  .demo-in { display: none; }
  .demo-bar .btn { padding: 0 12px; }
  .lane-in { padding: 20px 16px 40px; }
  .btn { min-height: 44px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .tile { min-height: 104px; padding: var(--s3); }
  .fig { font-size: var(--fs-head); line-height: var(--lh-head-px); }
  .eb-sheet-wrap { place-items: end center; padding: 0; }
  .eb-sheet { width: 100%; max-height: 92vh; border-radius: var(--r-pane) var(--r-pane) 0 0; padding: var(--s5) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); }
  .tbl th, .tbl td { padding: 10px 12px; }
}
@media (max-width: 420px) {
  .has-demo .ask { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lane-in.enter { animation: fadeIn 200ms linear both; }
  .rail, .toast { transition-property: opacity; }
  .me-menu { animation: fadeIn 120ms linear both; }
  .eb-sheet { animation: fadeIn 160ms linear both; }
  .dots i { animation: none; opacity: .7; }
  .lit { animation: none; background: var(--tint-soft); }
}
