/* ============================================================================
   Workshop Console 3.1.0 — the project sheet
   ----------------------------------------------------------------------------
   Loaded last and unlayered, after hash*.css (in @layer) and hds-core/hds-app
   (unlayered). Every correction to the design system lives here, in lettered
   sections, each saying why it exists. The HDS files are never edited.

   rem is 10px (hash.css sets the root to 62.5%).
============================================================================ */

/* ============================================================================
   A. TOKENS — two corrections, dark mode, layout
   --muted and --warn-ink are the HDS contrast fixes (4.5:1 on every tint).
   Dark mode re-points the semantic tokens only; components read those.
============================================================================ */
:root {
  --muted: #6f6779;
  --warn-ink: #a05800;
  --ink-yellow: #866600;
  --suite-h: 6rem;
  --sub-h: 6.4rem;
  --rail-w: 26rem;
  --gap: 1.6rem;
}

:root[data-mode="dark"] {
  color-scheme: dark;
  --paper: #1f1b2b;
  --desk: #17141f;
  --sunken: #262035;
  --raised: #2e2740;
  --edge: #362e4a;
  --edge-strong: #4a3f68;
  --ink: #f4f2fb;
  --ink-2: #cdc7dd;
  --ink-3: #b3abc6;
  --muted: #a39bb6;
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --brand-50: #271e38;
  --brand-100: #33264b;
  --brand-200: #4b3470;
  --brand-300: #6d4a98;
  --brand-ink: #d7a8ea;
  --tint-green: #1c3226; --tint-yellow: #342d12; --tint-orange: #3a2a17; --tint-blue: #16303a; --tint-purple: #2d2138; --tint-lav: #2a2540;
  --ink-green: #8fd9a8; --ink-yellow: #f2d36b; --ink-orange: #ffbf7a; --ink-blue: #8fd3ea; --ink-purple: #d7a8ea;
  --ok-bg: #1c3226; --ok-ink: #8fd9a8;
  --warn-bg: #3a2a17; --warn-ink: #ffbf7a;
  --danger-bg: #3a1f24; --danger-ink: #ff9f9f;
  --info-bg: #16303a; --info-ink: #8fd3ea;
  --shadow-1: 0 1px 6px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 6px 24px rgba(0, 0, 0, 0.45);
}

/* ============================================================================
   B. BASE
============================================================================ */
html { overflow-x: clip; }  /* clip, not hidden: hidden breaks position: sticky */
body.wd-page { background: var(--sunken); color: var(--fg-2); font-size: var(--fs-3); line-height: 1.6; min-height: 100vh; }
[hidden] { display: none !important; }

/* The primary button is the brand, not ink: HDS paints it ink and flips to
   yellow, and dark surfaces are kept to the one ink block. */
.btn-primary { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.btn-primary:hover { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.btn-primary .ico, .btn-ghost .ico, .btn-soft .ico { width: 1.8rem; height: 1.8rem; }
.btn-ghost { background: var(--paper); }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.8rem;
  font: 700 var(--fs-2)/1 var(--font-primary); padding: 1.1rem 2.2rem; border-radius: var(--rad-pill);
  background: var(--danger-bg); color: var(--danger-ink); border: 2px solid transparent; cursor: pointer;
}
.btn-danger:hover { background: #e05c5c; color: #fff; }
.btn-danger .ico { width: 1.8rem; height: 1.8rem; }
.btn-primary[disabled], .btn-ghost[disabled], .btn-danger[disabled], .btn-soft[disabled] { opacity: 0.45; pointer-events: none; }
.btn-xs .ico { width: 1.5rem; height: 1.5rem; }
.icon-btn.sm { width: 3.4rem; height: 3.4rem; }
.icon-btn.sm .ico { width: 1.7rem; height: 1.7rem; }
.icon-btn.plain { background: transparent; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--brand-ink); cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wd-code { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.08em; color: var(--fg); background: var(--raised); padding: 0.3rem 0.8rem; border-radius: 0.6rem; }
.status.live::before { animation: wd-pulse 1.8s ease-in-out infinite; }
@keyframes wd-pulse { 50% { opacity: 0.35; } }

/* ============================================================================
   C. THE SHELL — suite bar (areas), sub-bar (this screen), rail + main
   The suite pattern: switching area changes the rail and the kind of
   record, because it is a different job — planning versus running.
============================================================================ */
.suite-bar {
  display: flex; align-items: center; gap: 1.6rem;
  background: var(--paper); border-block-end: 1px solid var(--edge);
  padding: 0 2rem; block-size: var(--suite-h);
  position: sticky; inset-block-start: 0; z-index: 700; min-inline-size: 0;
}
.suite-bar > .grow { flex: 1 1 auto; }
.suite-brand { display: inline-flex; align-items: center; gap: 1rem; color: var(--fg); flex-shrink: 0; }
.suite-brand:hover { text-decoration: none; }
.wd-mark { width: 3.6rem; height: 3.6rem; border-radius: 1.1rem; background: var(--brand-500); color: #fff; display: grid; place-items: center; }
.wd-mark .ico { width: 2rem; height: 2rem; stroke-width: 2.4; }
.wd-word { font: 800 var(--fs-4)/1 var(--font-display); letter-spacing: -0.02em; }

.suite-nav { display: flex; align-items: center; gap: 0.4rem; min-inline-size: 0; }
.sn-item {
  display: inline-flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1.5rem; border-radius: var(--rad-pill);
  font-size: var(--fs-3); font-weight: 700; color: var(--fg-2); white-space: nowrap;
}
.sn-item .ico { width: 2rem; height: 2rem; color: var(--muted); }
.sn-item:hover { background: var(--sunken); color: var(--fg); text-decoration: none; }
.sn-item.is-on { background: var(--brand-100); color: var(--brand-ink); }
.sn-item.is-on .ico { color: var(--brand-500); }
.sn-live {
  display: inline-flex; align-items: center; gap: 0.5rem; font: 700 var(--fs-1)/1 var(--font-primary);
  background: var(--ok-bg); color: var(--ok-ink); border-radius: var(--rad-pill); padding: 0.4rem 0.9rem;
}
.sn-live::before { content: ''; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--band-green); animation: wd-pulse 1.8s ease-in-out infinite; }

.wd-user { position: relative; }
.wd-user-btn {
  display: inline-flex; align-items: center; gap: 1rem; border: 1px solid var(--edge); background: var(--paper);
  border-radius: var(--rad-pill); padding: 0.4rem 1.2rem 0.4rem 0.4rem; cursor: pointer; font: inherit; color: var(--fg);
}
.wd-user-btn:hover { border-color: var(--brand-300); }
.wd-user-btn .avatar { align-self: center; }
.wd-user-btn > .ico { width: 1.6rem; height: 1.6rem; color: var(--muted); }
.wd-user-txt { display: grid; text-align: start; line-height: 1.25; max-inline-size: 18rem; }
.wd-user-txt b { font-size: var(--fs-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wd-menu {
  position: absolute; inset-block-start: calc(100% + 0.6rem); inset-inline-end: 0; z-index: 760;
  min-inline-size: 22rem; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-sm);
  box-shadow: var(--shadow-2); padding: 0.6rem; display: grid; gap: 0.2rem;
}
.wd-menu-item {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: var(--rad-xs);
  font: 600 var(--fs-2)/1.3 var(--font-primary); color: var(--fg); background: none; border: 0; cursor: pointer; text-align: start; width: 100%;
}
.wd-menu-item .ico { width: 1.8rem; height: 1.8rem; color: var(--muted); }
.wd-menu-item:hover { background: var(--sunken); text-decoration: none; }
.wd-menu-item.danger { color: var(--danger-ink); }
.wd-menu-item.danger .ico { color: var(--danger-ink); }
.wd-menu hr { border: 0; border-top: 1px solid var(--edge); margin: 0.4rem 0; }

.ws-sub {
  display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
  background: var(--paper); border-block-end: 1px solid var(--edge);
  padding: 1rem 2rem; min-block-size: var(--sub-h);
  position: sticky; inset-block-start: var(--suite-h); z-index: 600;
}
.ws-crumbs { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-1); color: var(--muted); min-inline-size: 0; flex-wrap: wrap; }
.ws-crumbs a { color: var(--muted); font-weight: 600; }
.ws-crumbs .ico { width: 1.2rem; height: 1.2rem; }
.ws-head { display: grid; gap: 0.2rem; min-inline-size: 0; flex: 1 1 28rem; }
.ws-title { margin: 0; font-size: var(--fs-5); line-height: 1.2; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; letter-spacing: -0.02em; }
.ws-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }

.wd-body {
  display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: var(--gap);
  padding: var(--gap) 2rem 4rem; max-inline-size: 176rem; margin-inline: auto; align-items: start;
}
.wd-main { min-inline-size: 0; display: grid; gap: var(--gap); align-content: start; outline: none; }

/* ---- the rail ---------------------------------------------------------- */
.wd-rail {
  position: sticky; inset-block-start: calc(var(--suite-h) + var(--sub-h) + var(--gap));
  max-block-size: calc(100vh - var(--suite-h) - var(--sub-h) - var(--gap) * 2);
  overflow-y: auto; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md);
  padding: 1.2rem; display: grid; gap: 0.2rem; align-content: start; scrollbar-width: thin;
}
.rail-label {
  padding: 1.4rem 0.8rem 0.5rem; font: 600 var(--fs-1)/1 var(--font-mono); color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 0.6rem;
}
.rail-label::before { content: '#'; opacity: 0.55; }
.rail-label:first-child { padding-block-start: 0.4rem; }
.rail-label .grow { flex: 1; }
.rail-item {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 0.9rem; border-radius: var(--rad-xs);
  font-size: var(--fs-2); font-weight: 600; color: var(--fg-2); background: none; border: 0; width: 100%;
  text-align: start; cursor: pointer; font-family: inherit; min-inline-size: 0;
}
.rail-item > span:not([class]) { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-item:hover { background: var(--sunken); color: var(--fg); text-decoration: none; }
.rail-item.is-on { background: var(--brand-100); color: var(--brand-ink); }
.rail-item .ico { width: 1.8rem; height: 1.8rem; color: var(--muted); flex-shrink: 0; }
.rail-item.is-on .ico { color: var(--brand-500); }
.rail-item.child { padding-inline-start: 3.4rem; font-weight: 500; }
.rail-count { margin-inline-start: auto; font: 600 var(--fs-1)/1 var(--font-mono); background: var(--sunken); border-radius: var(--rad-pill); padding: 0.3rem 0.8rem; color: var(--fg-2); }
.rail-item.is-on .rail-count { background: var(--paper); }
.rail-count.is-warn { background: var(--band-orange); color: var(--ink); }
.rail-count.is-dot { width: 0.9rem; height: 0.9rem; padding: 0; background: var(--band-orange); }
.q-dot { inline-size: 0.9rem; block-size: 0.9rem; border-radius: 50%; flex-shrink: 0; background: var(--edge-strong); }
.q-dot.b-green { background: var(--band-green); } .q-dot.b-blue { background: var(--band-blue); }
.q-dot.b-orange { background: var(--band-orange); } .q-dot.b-purple { background: var(--band-purple); }
.q-dot.b-yellow { background: var(--band-yellow); }
.rail-back { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-1); font-weight: 700; color: var(--muted); padding: 0.4rem 0.8rem; }
.rail-back .ico { width: 1.4rem; height: 1.4rem; }
.rail-card { background: var(--sunken); border-radius: var(--rad-sm); padding: 1.2rem; display: grid; gap: 0.6rem; margin: 0.4rem 0 0.6rem; min-inline-size: 0; }
.rail-card b { color: var(--fg); font-size: var(--fs-3); line-height: 1.3; overflow-wrap: anywhere; }
.rail-foot { margin-block-start: 1rem; padding-block-start: 1.2rem; border-block-start: 1px solid var(--edge); display: grid; gap: 0.6rem; }
.rail-toggle { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 0.9rem; font-size: var(--fs-2); font-weight: 600; }
.rail-toggle > span:first-child { flex: 1; }

/* ============================================================================
   D. FILTERS AND TILES
   Search, then dropdown filters, then a clear link, in one row above what they
   scope. The tiles above are filters too: a number you cannot click is a poster.
============================================================================ */
.wd-filters { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.wd-filters .t-search { width: auto; flex: 1 1 24rem; background: var(--paper); border: 1px solid var(--edge); }
.wd-filters .t-search input { color: var(--fg); }
.wd-select-chip {
  appearance: none; font: 600 var(--fs-2)/1.2 var(--font-primary); color: var(--fg); background: var(--paper);
  border: 1px solid var(--edge-strong); border-radius: var(--rad-pill); padding: 0.9rem 3.2rem 0.9rem 1.4rem; cursor: pointer; max-inline-size: 26rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.7rem) 55%, calc(100% - 1.2rem) 55%; background-size: 0.5rem 0.5rem; background-repeat: no-repeat;
}
.wd-select-chip.is-set { border-color: var(--brand-500); background-color: var(--brand-50); color: var(--brand-ink); }
.wd-filter-note { font-size: var(--fs-1); color: var(--muted); }

.wd-tiles { display: flex; flex-wrap: wrap; gap: 1rem; }
.wd-tile {
  flex: 1 1 16rem; background: var(--paper); border: 2px solid var(--edge); border-radius: var(--rad-sm);
  padding: 1.2rem 1.4rem; display: grid; gap: 0.2rem; text-align: start; cursor: pointer; font: inherit; color: inherit; min-inline-size: 0;
}
.wd-tile:hover { border-color: var(--brand-300); }
.wd-tile.is-on { border-color: var(--brand-500); background: var(--brand-50); }
.wd-tile b { font: 800 var(--fs-6)/1.1 var(--font-display); color: var(--fg); }
.wd-tile span { font-size: var(--fs-1); font-weight: 600; color: var(--fg-2); }
.wd-tile small { font-size: var(--fs-1); color: var(--muted); }
.wd-tile.is-warn b { color: var(--warn-ink); }
div.wd-tile { cursor: default; }
div.wd-tile:hover { border-color: var(--edge); }

/* No card row leaves dead width; no row is ragged. */
.wd-cards { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: stretch; }
.wd-cards > * { flex: 1 1 32rem; min-inline-size: 0; max-inline-size: 100%; }
.wd-cards.wide > * { flex-basis: 40rem; }
/* Session cards keep one width: a lone upcoming card should not stretch across the page. */
.wd-cards.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(34rem, 100%), 1fr)); }

/* ============================================================================
   E. CARDS — an activity, a session. Essential information only.
============================================================================ */
.wd-card {
  position: relative; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md);
  padding: 1.8rem; display: flex; flex-direction: column; gap: 1.2rem; min-inline-size: 0; overflow: hidden;
  transition: border-color var(--dur-2) ease, box-shadow var(--dur-2) ease, transform var(--dur-1) ease;
}
.wd-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow-1); transform: translateY(-2px); }
.wd-card:focus-within { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.wd-card-open { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.wd-card-open span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.wd-card .wd-card-top, .wd-card .wd-card-menu { position: relative; }
.wd-card button, .wd-card a:not(.wd-card-open) { position: relative; z-index: 2; }
.wd-card-edge { position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 0.5rem; }
.wd-card-edge.b-green { background: var(--band-green); } .wd-card-edge.b-blue { background: var(--band-blue); }
.wd-card-edge.b-purple { background: var(--band-purple); } .wd-card-edge.b-muted { background: var(--edge-strong); }
.wd-card-top { display: flex; align-items: flex-start; gap: 1rem; }
.wd-card-top > div { flex: 1; min-inline-size: 0; display: grid; gap: 0.3rem; }
.wd-card h3 { margin: 0; font-size: var(--fs-4); line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.wd-card .clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wd-path { font: 500 var(--fs-1)/1.4 var(--font-mono); color: var(--brand-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.wd-chips .chip { align-self: center; }
.wd-card-foot { margin-block-start: auto; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block-start: 1.2rem; border-block-start: 1px solid var(--edge); }
.wd-card-foot .grow { flex: 1; }

.wd-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.6rem; }
.wd-fig { background: var(--sunken); border-radius: var(--rad-xs); padding: 0.9rem 1.1rem; display: grid; gap: 0.1rem; min-inline-size: 0; }
.wd-fig b { font: 800 var(--fs-5)/1.1 var(--font-display); color: var(--fg); }
.wd-fig span { font-size: var(--fs-1); color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-fig.is-warn b { color: var(--warn-ink); }
.wd-fig.is-ok b { color: var(--ok-ink); }

.wd-mentors { display: inline-flex; align-items: center; }
.wd-mentors .avatar { width: 2.8rem; height: 2.8rem; font-size: 1.05rem; border: 2px solid var(--paper); margin-inline-start: -0.8rem; align-self: center; }
.wd-mentors .avatar:first-child { margin-inline-start: 0; }

/* ============================================================================
   F. THE RECORD — header, figures, two columns
============================================================================ */
.rf-head {
  position: relative; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md);
  padding: 2rem 2.4rem 2rem 2.8rem; display: flex; align-items: flex-start; gap: 1.6rem; flex-wrap: wrap; overflow: hidden;
}
.rf-edge { position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 0.6rem; background: var(--brand-500); }
.rf-edge.b-green { background: var(--band-green); } .rf-edge.b-blue { background: var(--band-blue); } .rf-edge.b-muted { background: var(--edge-strong); }
.rf-id { min-inline-size: 0; flex: 1 1 30rem; display: grid; gap: 0.6rem; }
.rf-id h2 { margin: 0; font-size: var(--fs-5); line-height: 1.2; }
.rf-id p { margin: 0; }
.rf-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.rf-figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1px;
  background: var(--edge); border: 1px solid var(--edge); border-radius: var(--rad-md); overflow: hidden;
}
.rf-fig { background: var(--paper); padding: 1.4rem 1.8rem; display: grid; gap: 0.2rem; text-align: start; border: 0; font: inherit; color: inherit; }
button.rf-fig { cursor: pointer; }
button.rf-fig:hover { background: var(--brand-50); }
.rf-fig b { font: 800 var(--fs-6)/1.05 var(--font-display); color: var(--fg); }
.rf-fig span { font-size: var(--fs-1); color: var(--fg-2); font-weight: 600; }
.rf-fig small { font-size: var(--fs-1); color: var(--muted); }
.rf-fig.is-warn b { color: var(--warn-ink); }
.rf-fig.is-ok b { color: var(--ok-ink); }
.rf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 38rem; gap: var(--gap); align-items: start; }
.rf-col { display: grid; gap: var(--gap); min-inline-size: 0; }

.panel { padding: 2rem; }
.panel-head { gap: 1rem; flex-wrap: wrap; margin-block-end: 1.4rem; }
.panel-head h3 { font-size: var(--fs-4); }
.panel-head .small { color: var(--muted); }
.wd-list { display: grid; }
.wd-row {
  display: flex; align-items: center; gap: 1.2rem; padding: 1.1rem 0; border-block-start: 1px solid var(--edge); min-inline-size: 0;
}
.wd-row:first-child { border-block-start: 0; padding-block-start: 0.2rem; }
.wd-row > div { min-inline-size: 0; flex: 1; display: grid; gap: 0.1rem; }
.wd-row b { color: var(--fg); font-size: var(--fs-2); overflow-wrap: anywhere; }
a.wd-row:hover, button.wd-row:hover { background: var(--sunken); text-decoration: none; }
button.wd-row { background: none; border: 0; border-block-start: 1px solid var(--edge); font: inherit; color: inherit; text-align: start; width: 100%; cursor: pointer; }
button.wd-row:first-child { border-block-start: 0; }

.empty-state { background: var(--paper); border: 1px dashed var(--edge-strong); border-radius: var(--rad-md); }
.empty-state .icon-box { margin: 0 auto 1.2rem; }
.wd-loading { display: flex; align-items: center; justify-content: center; gap: 1.2rem; padding: 6rem 2rem; color: var(--muted); }
.wd-spinner { width: 2rem; height: 2rem; border-radius: 50%; border: 0.25rem solid currentColor; border-block-start-color: transparent; animation: wd-spin 0.7s linear infinite; flex-shrink: 0; }
.btn-primary .wd-spinner, .btn-ghost .wd-spinner { width: 1.6rem; height: 1.6rem; }
@keyframes wd-spin { to { transform: rotate(360deg); } }
.is-refreshing { opacity: 0.6; transition: opacity var(--dur-2) ease; }
.notice { border-radius: var(--rad-sm); }
.notice .code { font-family: var(--font-mono); font-size: var(--fs-1); opacity: 0.85; }

/* ============================================================================
   G. TASK CONTROL — the live view's main panel
   Status bars: approved green · to review yellow · capturing purple · sent back
   danger red. Checked with the dataviz validator over ALL pairs, because a
   segment that is zero makes any two others touch: the worst normal-vision
   pair is 21.4 (floor 15). Band orange and blue were dropped here: orange
   beside yellow scored 14.9 and blue beside green 13.6. Green↔red is 7.8 for
   deuteranopes — legal only with secondary encoding, which is the 2px surface
   gap, the always-visible legend with counts, and the per-segment tooltip.
   Yellow and green sit under 3:1 against paper, so the counts are never
   colour-only.
============================================================================ */
.tc-row { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: 1.2rem 1.4rem; padding: 1.6rem 0; border-block-start: 1px solid var(--edge); align-items: start; }
.tc-row:first-child { border-block-start: 0; padding-block-start: 0.2rem; }
.tc-num { width: 4rem; height: 4rem; border-radius: var(--rad-xs); display: grid; place-items: center; background: var(--sunken); font: 800 var(--fs-3)/1 var(--font-mono); color: var(--fg); }
.tc-num .ico { width: 1.8rem; height: 1.8rem; color: var(--muted); }
.tc-row.is-open .tc-num { background: var(--tint-green); color: var(--ok-ink); }
.tc-row.is-now .tc-num { background: var(--brand-100); color: var(--brand-ink); }
.tc-main { display: grid; gap: 0.8rem; min-inline-size: 0; }
.tc-title { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.tc-title b { font-size: var(--fs-3); color: var(--fg); }
.tc-side { display: grid; gap: 0.8rem; justify-items: end; }
.tc-quiz { display: flex; align-items: center; gap: 1rem; font-size: var(--fs-1); color: var(--muted); }

.split { display: flex; gap: 2px; block-size: 1.2rem; }
.split i { display: block; block-size: 100%; flex: none; cursor: default; }
.split i:first-child { border-radius: 4px 0 0 4px; }
.split i:last-child { border-radius: 0 4px 4px 0; }
.split i:only-child { border-radius: 4px; }
.split i.s-ok { background: var(--band-green); }
.split i.s-wait { background: var(--band-yellow); }
.split i.s-cap { background: var(--band-purple); }
.split i.s-bad { background: var(--danger); }
.split i.s-rest { background: var(--raised); flex: 1 1 auto; min-inline-size: 0.4rem; }
.split i:hover, .split i:focus-visible { filter: brightness(1.08); outline: 2px solid var(--fg); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: var(--fs-1); color: var(--fg-2); }
.legend span { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.legend i { width: 1rem; height: 1rem; border-radius: 0.2rem; display: inline-block; }
.legend b { color: var(--fg); font-variant-numeric: tabular-nums; }

.meter { display: block; block-size: 0.8rem; border-radius: var(--rad-pill); background: var(--raised); overflow: hidden; }
.meter i { display: block; block-size: 100%; border-radius: var(--rad-pill); background: var(--brand-500); }
.meter.ok i { background: var(--band-green); }

.toggle { align-self: center; }
.toggle .tk { background: var(--edge-strong); }
.toggle input:disabled { cursor: not-allowed; }
.toggle input:disabled + .tk { opacity: 0.45; }

/* ============================================================================
   H. THE ROOM — attention, online, feed, the last hour
============================================================================ */
.att-group { display: grid; gap: 0.6rem; padding: 1.2rem 0; border-block-start: 1px solid var(--edge); }
.att-group:first-of-type { border-block-start: 0; padding-block-start: 0; }
.att-head { display: flex; align-items: center; gap: 0.8rem; font-size: var(--fs-2); font-weight: 700; color: var(--fg); }
.att-head .grow { flex: 1; }
.att-item { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0.8rem; border-radius: var(--rad-xs); font-size: var(--fs-2); background: none; border: 0; width: 100%; text-align: start; font-family: inherit; color: var(--fg-2); cursor: pointer; }
.att-item:hover { background: var(--sunken); }
.att-item span:not(.avatar):not(.tiny) { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-item .avatar { width: 2.6rem; height: 2.6rem; font-size: 1rem; align-self: center; }

.people { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.people .avatar { width: 3.2rem; height: 3.2rem; font-size: 1.1rem; position: relative; align-self: auto; cursor: default; }
.people .avatar::after { content: ''; position: absolute; inset-block-end: -1px; inset-inline-end: -1px; width: 1rem; height: 1rem; border-radius: 50%; background: var(--band-green); border: 2px solid var(--paper); }
.avatar.h1 { background: #e6f4ec; color: #2e6b47; } .avatar.h2 { background: #fff3cf; color: #7a5d00; }
.avatar.h3 { background: #ffe9d4; color: #8f4f08; } .avatar.h4 { background: #dff2f9; color: #1b6178; } .avatar.h5 { background: #efe3f6; color: #6f3389; }
.avatar.staff { background: var(--brand-500); color: #fff; }

.feed { display: grid; position: relative; }
.feed::before { content: ''; position: absolute; inset-block: 1rem; inset-inline-start: 0.5rem; inline-size: 2px; background: var(--edge); }
.feed-row { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr) auto; gap: 1.2rem; padding: 0.7rem 0; align-items: baseline; position: relative; }
.feed-dot { inline-size: 1.1rem; block-size: 1.1rem; border-radius: 50%; background: var(--edge-strong); box-shadow: 0 0 0 3px var(--paper); z-index: 1; align-self: center; }
.feed-dot.t-join { background: var(--band-blue); } .feed-dot.t-submit { background: var(--band-yellow); }
.feed-dot.t-approve { background: var(--band-green); } .feed-dot.t-sendback { background: var(--danger); }
.feed-dot.t-quiz { background: var(--band-purple); } .feed-dot.t-question { background: var(--brand-300); }
.feed-row p { margin: 0; font-size: var(--fs-2); line-height: 1.45; }
.feed-row p b { color: var(--fg); }

/* Single-series columns: one per 5 minutes, no legend (the heading names it). */
.hour { display: grid; gap: 1rem; }
.hour-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; align-items: end; block-size: 9rem; border-block-end: 1px solid var(--edge); position: relative; }
.hour-col { display: flex; align-items: flex-end; justify-content: center; block-size: 100%; cursor: default; border: 0; background: none; padding: 0; }
.hour-col i { display: block; inline-size: min(100%, 2.4rem); background: var(--brand-500); border-radius: 4px 4px 0 0; min-block-size: 2px; }
.hour-col.is-zero i { background: var(--edge); }
.hour-col:hover i, .hour-col:focus-visible i { background: var(--brand-600); }
.hour-axis { display: flex; justify-content: space-between; font: 500 var(--fs-1)/1 var(--font-mono); color: var(--muted); }
.hour-tabs { display: inline-flex; gap: 0.4rem; background: var(--sunken); border-radius: var(--rad-pill); padding: 0.3rem; }
.hour-tabs button { border: 0; background: none; font: 700 var(--fs-1)/1 var(--font-primary); color: var(--fg-2); padding: 0.6rem 1rem; border-radius: var(--rad-pill); cursor: pointer; }
.hour-tabs button[aria-pressed="true"] { background: var(--paper); color: var(--brand-ink); box-shadow: var(--shadow-1); }

.wd-tip {
  position: fixed; z-index: 950; pointer-events: none; background: var(--paper); color: var(--fg-2); border: 1px solid var(--edge);
  border-radius: var(--rad-xs); box-shadow: var(--shadow-2); padding: 0.8rem 1.1rem; font-size: var(--fs-1); display: grid; gap: 0.2rem; max-inline-size: 26rem;
}
.wd-tip b { font-size: var(--fs-3); color: var(--fg); }

/* ============================================================================
   I. TABLES — the register
============================================================================ */
.table-scroll { overflow-x: auto; border-radius: var(--rad-md); }
.data-table th { position: sticky; inset-block-start: 0; background: var(--paper); }
.data-table td, .data-table th { white-space: nowrap; }
.data-table td.wrap { white-space: normal; min-inline-size: 18rem; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:focus-visible { outline: 2px solid var(--brand-500); outline-offset: -2px; }
.who { display: flex; align-items: center; gap: 1rem; min-inline-size: 0; }
.who .avatar { align-self: center; position: relative; }
.who .avatar.is-online::after { content: ''; position: absolute; inset-block-end: -1px; inset-inline-end: -1px; width: 1rem; height: 1rem; border-radius: 50%; background: var(--band-green); border: 2px solid var(--paper); }
.who > div, .who > span:not(.avatar) { display: grid; min-inline-size: 0; }
.who b { color: var(--fg); }
.pips { display: inline-flex; gap: 0.4rem; }
.pip { inline-size: 2.4rem; block-size: 2.4rem; border-radius: 0.6rem; display: grid; place-items: center; font: 700 1.05rem/1 var(--font-mono); background: var(--sunken); color: var(--muted); border: 0; padding: 0; }
.pip.s-correct { background: var(--band-green); color: #fff; }
.pip.s-pending { background: var(--band-yellow); color: var(--ink); }
.pip.s-incorrect { background: var(--danger); color: #fff; }
.pip.s-draft { background: var(--brand-50); color: var(--brand-ink); box-shadow: inset 0 0 0 2px var(--band-purple); }
.pip.s-locked { background: transparent; box-shadow: inset 0 0 0 1px var(--edge); color: var(--edge-strong); }
.pip .ico { width: 1.2rem; height: 1.2rem; }

/* ============================================================================
   J. SUBMISSIONS — cards with a slider, the matrix, the review drawer
   One card per submission with all its
   shots in one slider (one card per shot said the same name three times);
   a real table for By student, first column sticky so a name never scrolls
   away from its row.
============================================================================ */
.switch { display: inline-flex; gap: 0.4rem; padding: 0.5rem; background: var(--raised); border-radius: var(--rad-pill); flex-wrap: wrap; }
.switch button {
  font: 700 var(--fs-2)/1 var(--font-primary); padding: 1rem 1.8rem; border: 0; border-radius: var(--rad-pill);
  background: transparent; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 0.8rem; white-space: nowrap;
}
.switch button .ico { width: 1.7rem; height: 1.7rem; }
.switch button:hover { color: var(--fg); }
.switch button[aria-pressed="true"] { background: var(--paper); color: var(--brand-ink); box-shadow: var(--shadow-1); }

.task-tabs { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.task-tab {
  font: 700 var(--fs-2)/1 var(--font-primary); padding: 0.9rem 1.6rem; border-radius: var(--rad-pill); border: 2px solid var(--edge);
  background: var(--paper); color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 0.8rem;
}
.task-tab:hover { border-color: var(--brand-300); color: var(--fg); }
.task-tab[aria-pressed="true"] { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.task-tab .n { font: 600 var(--fs-1)/1 var(--font-mono); background: var(--sunken); color: var(--ink-3); border-radius: var(--rad-pill); padding: 0.3rem 0.8rem; }
.task-tab[aria-pressed="true"] .n { background: rgba(255, 255, 255, 0.2); color: #fff; }

.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(32rem, 1fr)); gap: var(--gap); }
.sub-card { background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); overflow: hidden; display: flex; flex-direction: column; min-inline-size: 0; }
.sub-card:hover { box-shadow: var(--shadow-1); }
.sub-card.is-correct { border-color: var(--band-green); }
.sub-card.is-incorrect { border-color: var(--danger); }
.sub-card.is-pending { border-color: var(--band-yellow); }
.sub-head { display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 1.6rem; min-inline-size: 0; }
.sub-head .grow { flex: 1; }
.sub-head .sh-body { min-inline-size: 0; display: grid; }
.sub-head b { color: var(--fg); font-size: var(--fs-3); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-head .sh-body > span { font: 500 var(--fs-1)/1.4 var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-feedback { padding: 1rem 1.6rem; font-size: var(--fs-2); background: var(--sunken); color: var(--fg-2); border-block-start: 1px solid var(--edge); }
.sub-feedback b { color: var(--fg); }
/* margin-block-start: auto lines footers up across a row of unequal cards */
.sub-foot { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.6rem; border-block-start: 1px solid var(--edge); margin-block-start: auto; flex-wrap: wrap; }
.sub-foot .grow { flex: 1; }

/* The slider stays dark in both modes: screenshots read best on near-black. */
.slider { position: relative; background: #1b1523; overflow: hidden; border-radius: 0; min-inline-size: 0; }
.task-card .slider, .sp-body > .slider { border-radius: var(--rad-sm); }
.slider-track { display: flex; transition: transform var(--dur-3) var(--ease-out); }
.slider-slide { flex: 0 0 100%; min-inline-size: 0; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.slider-slide img { inline-size: 100%; block-size: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.slider.is-single .slider-nav, .slider.is-single .slider-dots, .slider.is-single .slider-count { display: none; }
.slider.is-empty { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--sunken); }
.slider-none { display: grid; justify-items: center; gap: 0.6rem; color: var(--muted); font-size: var(--fs-2); }
.slider-none .ico { width: 2.8rem; height: 2.8rem; }
.slider-nav {
  position: absolute; inset-block-start: 50%; transform: translateY(-50%); inline-size: 4rem; block-size: 4rem; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.92); color: #241b2e; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-2); z-index: 2;
}
.slider-nav:hover { background: #fff; }
.slider-nav[disabled] { opacity: 0.3; pointer-events: none; }
.slider-nav.prev { inset-inline-start: 1rem; }
.slider-nav.next { inset-inline-end: 1rem; }
.slider-nav .ico { width: 2rem; height: 2rem; }
/* The label chips name each shot — "HTML", "Your design" — because a mentor
   looks for a specific one. Yellow on ink for the one on screen. */
.slider-tabs { position: absolute; inset-block-start: 1rem; inset-inline-start: 1rem; inset-inline-end: 6rem; display: flex; gap: 0.5rem; flex-wrap: wrap; z-index: 2; }
.slider-tabs button {
  font: 700 var(--fs-1)/1 var(--font-mono); padding: 0.6rem 1.1rem; border: 0; border-radius: var(--rad-pill); cursor: pointer;
  background: rgba(36, 27, 46, 0.6); color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(6px); max-inline-size: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slider-tabs button[aria-pressed="true"] { background: var(--band-yellow); color: #241b2e; }
.slider-dots { position: absolute; inset-block-end: 1rem; inset-inline: 0; display: flex; justify-content: center; gap: 0.6rem; z-index: 2; }
.slider-dots button { inline-size: 0.9rem; block-size: 0.9rem; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.45); cursor: pointer; }
.slider-dots button[aria-pressed="true"] { background: var(--band-yellow); transform: scale(1.25); }
.slider-count { position: absolute; inset-block-start: 1rem; inset-inline-end: 1rem; font: 600 var(--fs-1)/1 var(--font-mono); padding: 0.6rem 1rem; border-radius: var(--rad-pill); background: rgba(36, 27, 46, 0.6); color: #fff; z-index: 2; }

.lightbox { position: fixed; inset: 0; z-index: 980; display: none; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(20, 15, 26, 0.95); }
.lightbox.is-open { display: grid; }
.lightbox-head { display: flex; align-items: center; gap: 1.6rem; padding: 1.6rem 2.4rem; color: #fff; }
.lightbox-head > div { flex: 1; min-inline-size: 0; display: grid; }
.lightbox-head b { font-size: var(--fs-4); color: #fff; }
.lightbox-head span { font: 500 var(--fs-1)/1.4 var(--font-mono); color: rgba(255, 255, 255, 0.65); }
.lightbox-head .icon-btn { background: rgba(255, 255, 255, 0.12); color: #fff; }
.lightbox-head .icon-btn:hover { background: #fff; color: #241b2e; }
.lightbox .slider { background: transparent; block-size: 100%; min-block-size: 0; }
.lightbox .slider-track { block-size: 100%; }
.lightbox .slider-slide { aspect-ratio: auto; block-size: 100%; padding: 0 7rem 5rem; }
.lightbox .slider-slide img { cursor: default; }
.lightbox .slider-tabs { inset-block: auto 1.2rem; inset-inline: 0; justify-content: center; }
.lightbox .slider-dots { display: none; }
.lightbox .slider-count { inset-inline-end: 2.4rem; }
.lightbox-foot { margin: 0; text-align: center; padding: 1.2rem; font-size: var(--fs-1); color: rgba(255, 255, 255, 0.55); }
.no-scroll, .no-scroll body { overflow: hidden; }

.matrix-wrap { overflow-x: auto; border: 1px solid var(--edge); border-radius: var(--rad-md); background: var(--paper); }
.matrix { inline-size: 100%; border-collapse: separate; border-spacing: 0; min-inline-size: 64rem; }
.matrix th { font: 600 var(--fs-1)/1 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 1.4rem 1rem; border-block-end: 1px solid var(--edge); background: var(--paper); white-space: nowrap; }
.matrix td { padding: 0.8rem; border-block-end: 1px solid var(--edge); text-align: center; vertical-align: middle; }
.matrix tr:last-child td { border-block-end: 0; }
.matrix th.who-col, .matrix td.who-col { text-align: start; position: sticky; inset-inline-start: 0; background: var(--paper); z-index: 2; min-inline-size: 22rem; }
.matrix tbody tr:hover td { background: var(--sunken); }
.matrix .sum-line { display: inline-flex; align-items: center; gap: 0.8rem; }
.cell {
  inline-size: 100%; min-inline-size: 9rem; min-block-size: 5.6rem; border: 2px solid var(--edge); border-radius: var(--rad-xs); background: var(--paper);
  font: inherit; color: var(--fg-2); padding: 0.8rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem; cursor: pointer;
}
.cell:hover:not([disabled]) { border-color: var(--brand-300); transform: translateY(-1px); }
.cell-label { font: 700 var(--fs-1)/1 var(--font-primary); white-space: nowrap; }
.cell-shots { font: 500 1.05rem/1 var(--font-mono); opacity: 0.8; }
.cell.is-correct { background: var(--tint-green); border-color: var(--band-green); color: var(--ok-ink); }
.cell.is-pending { background: var(--tint-yellow); border-color: var(--band-yellow); color: var(--ink-yellow); }
.cell.is-incorrect { background: var(--danger-bg); border-color: var(--danger); color: var(--danger-ink); }
.cell.is-draft { background: var(--brand-50); border-color: var(--band-purple); color: var(--brand-ink); }
.cell.is-empty { background: var(--sunken); border-style: dashed; border-color: var(--edge-strong); color: var(--muted); }
.cell.is-locked { background: repeating-linear-gradient(135deg, var(--sunken) 0 6px, transparent 6px 12px); border-style: dashed; color: var(--muted); cursor: default; }
.cells-legend span { gap: 0.6rem; }
.cells-legend span::before { content: ''; inline-size: 1.2rem; block-size: 1.2rem; border-radius: 0.4rem; border: 2px solid var(--edge-strong); background: var(--sunken); }
.cells-legend .c-correct::before { background: var(--tint-green); border-color: var(--band-green); }
.cells-legend .c-pending::before { background: var(--tint-yellow); border-color: var(--band-yellow); }
.cells-legend .c-incorrect::before { background: var(--danger-bg); border-color: var(--danger); }
.cells-legend .c-draft::before { background: var(--brand-50); border-color: var(--band-purple); }
.cells-legend .c-empty::before { border-style: dashed; }

.quick-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

/* The student drawer: one card per task. */
.st-top { display: flex; align-items: center; gap: 1.4rem; }
.st-top > div { display: grid; gap: 0.4rem; min-inline-size: 0; }
.st-top b { font: 800 var(--fs-5)/1.2 var(--font-display); color: var(--fg); }
.now-line { display: inline-flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.task-card { background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); padding: 1.6rem; display: grid; gap: 1.2rem; min-inline-size: 0; }
.task-card.is-locked { padding-block: 1.2rem; background: var(--sunken); }
.tk-head { display: flex; align-items: center; gap: 1rem; }
.tk-head b { flex: 1; min-inline-size: 0; font-size: var(--fs-4); color: var(--fg); }
.task-card.is-locked .tk-head b { font-size: var(--fs-3); color: var(--muted); }
.tk-note { margin: 0; font-size: var(--fs-2); }
.tk-note b { color: var(--fg); }
.tk-foot { display: flex; align-items: center; gap: 1rem; }
.tk-foot .grow { flex: 1; }
.tk-quiz { display: grid; gap: 0.8rem; border-block-start: 1px solid var(--edge); padding-block-start: 1.2rem; }
.tk-q { display: grid; gap: 0.2rem; font-size: var(--fs-2); }
.tk-q b { color: var(--fg); }
.tk-q .ico { width: 1.4rem; height: 1.4rem; vertical-align: -0.2rem; margin-inline-end: 0.4rem; }
.ok-ink { color: var(--ok-ink); font-weight: 700; }
.bad-ink { color: var(--danger-ink); font-weight: 700; }
.warn-ink { color: var(--warn-ink); font-weight: 700; }

/* ============================================================================
   K. RESULTS AND LIVE READOUTS — tiles, bar lists, per-question bars
============================================================================ */
.tile-row { display: flex; flex-wrap: wrap; gap: var(--gap); }
.tile-row > * { flex: 1 1 18rem; min-inline-size: 0; }
.ltile { background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); padding: 1.6rem 1.8rem; display: grid; gap: 0.4rem; color: inherit; align-content: start; }
a.ltile:hover { border-color: var(--brand-300); text-decoration: none; box-shadow: var(--shadow-1); }
.ltile .k { font: 600 var(--fs-1)/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: flex; align-items: center; gap: 0.6rem; }
.ltile .k .ico { width: 1.5rem; height: 1.5rem; }
.ltile .v { font: 800 3.4rem/1.05 var(--font-display); color: var(--fg); }
.ltile .v small { font: 600 var(--fs-3)/1 var(--font-primary); color: var(--muted); }
.ltile .note { font-size: var(--fs-1); color: var(--muted); }
.ltile.is-warn { background: var(--tint-orange); border-color: transparent; }
.ltile.is-warn .note { color: var(--warn-ink); font-weight: 700; }

.bar-list { display: grid; gap: 0.9rem; }
.bl-row { display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr) 4rem; gap: 1.2rem; align-items: center; font-size: var(--fs-2); }
.bl-row .lbl { color: var(--fg-2); display: flex; align-items: center; gap: 0.6rem; min-inline-size: 0; }
.bl-row .lbl em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-row .lbl .ico { width: 1.5rem; height: 1.5rem; color: var(--muted); flex-shrink: 0; }
.bl-row .lbl img { inline-size: 3.6rem; block-size: 2.7rem; object-fit: cover; border-radius: 0.5rem; border: 1px solid var(--edge); flex-shrink: 0; }
.bl-row.is-zero .lbl { color: var(--muted); }
.bl-track { block-size: 1.2rem; background: var(--sunken); border-radius: var(--rad-pill); overflow: hidden; }
.bl-track i { display: block; block-size: 100%; inline-size: var(--w); background: var(--brand-400); border-radius: var(--rad-pill); min-inline-size: 2px; }
.bl-row .val { font: 700 var(--fs-2)/1 var(--font-mono); color: var(--fg); text-align: end; }
.bl-row.is-right .lbl { color: var(--ok-ink); font-weight: 700; }
.bl-row.is-right .lbl .ico { color: var(--ok-ink); }
.bl-row.is-right .bl-track i { background: var(--band-green); }

.qr { display: grid; gap: 1rem; padding-block: 1.8rem 0.4rem; border-block-start: 1px solid var(--edge); margin-block-start: 1.6rem; }
.qr-head { display: flex; align-items: baseline; gap: 1.2rem; }
.qr-head b { flex: 1; min-inline-size: 0; color: var(--fg); font-size: var(--fs-4); overflow-wrap: anywhere; }
.qr-pct { font: 800 var(--fs-5)/1 var(--font-display); color: var(--fg); }
.qr-img { max-inline-size: 24rem; border-radius: var(--rad-sm); }

/* ============================================================================
   L. TALK — the room with who is in it, the questions inbox
============================================================================ */
.room { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); overflow: hidden;
  block-size: calc(100vh - var(--suite-h) - var(--sub-h) - 16rem); min-block-size: 46rem; }
.room.has-side { grid-template-columns: minmax(0, 1fr) 26rem; }
.room-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-block-size: 0; min-inline-size: 0; }
.room-head { display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 1.6rem; border-block-end: 1px solid var(--edge); flex-wrap: wrap; }
/* 22rem basis: on a phone the title keeps a readable width and the
   "students can post" switch drops under it instead of squeezing it. */
.room-head > div { flex: 1 1 22rem; min-inline-size: 0; display: grid; }
.room-head b { color: var(--fg); }
.room-scroll { overflow-y: auto; padding: 1.6rem; background: var(--sunken); display: flex; flex-direction: column; gap: 0.2rem; position: relative; }
.room-side { border-inline-start: 1px solid var(--edge); display: flex; flex-direction: column; min-block-size: 0; }
.room-side h3 { font-size: var(--fs-3); margin: 0; padding: 1.6rem 1.6rem 0.8rem; }
.room-people { overflow-y: auto; padding: 0 0.8rem 1.6rem; display: grid; align-content: start; }
.person-row { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0.8rem; border-radius: var(--rad-xs); background: none; border: 0; font: inherit; color: inherit; text-align: start; cursor: pointer; inline-size: 100%; }
.person-row:hover { background: var(--sunken); }
.person-row .avatar { position: relative; align-self: center; }
.person-row .avatar.is-online::after { content: ''; position: absolute; inset-block-end: -1px; inset-inline-end: -1px; width: 1rem; height: 1rem; border-radius: 50%; background: var(--band-green); border: 2px solid var(--paper); }
.person-row .txt { min-inline-size: 0; display: grid; }
.person-row b { font-size: var(--fs-2); color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row .s { font-size: var(--fs-1); color: var(--muted); }
.day-sep { align-self: center; margin: 1.2rem 0 0.8rem; font: 700 var(--fs-1)/1 var(--font-primary); color: var(--muted); background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-pill); padding: 0.6rem 1.2rem; }
.mgroup { display: flex; gap: 1rem; margin-block-start: 1rem; align-items: flex-end; max-inline-size: 72rem; }
.mgroup .avatar { width: 3rem; height: 3rem; font-size: 1.05rem; align-self: flex-end; }
.mgroup-body { display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start; min-inline-size: 0; flex: 1; }
.mname { display: flex; align-items: center; gap: 0.6rem; font: 700 var(--fs-1)/1.2 var(--font-primary); color: var(--fg-2); padding-inline: 0.4rem; }
.role-tag { font: 800 1rem/1 var(--font-primary); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.3rem 0.6rem; border-radius: var(--rad-pill); background: var(--brand-100); color: var(--brand-ink); }
.bubble { max-inline-size: min(84%, 56rem); padding: 0.9rem 1.3rem; border-radius: 1.8rem; background: var(--paper); color: var(--fg); border: 1px solid var(--edge); font-size: var(--fs-3); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { float: right; margin: 0.6rem 0 0 0.8rem; font: 500 1.05rem/1 var(--font-mono); color: var(--muted); }
.mgroup.staff .bubble { background: var(--brand-50); border-color: var(--brand-200); }
.mgroup.me { margin-inline-start: auto; }
.mgroup.me .mgroup-body { align-items: flex-end; }
.mgroup.me .bubble { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.mgroup.me .bubble time { color: rgba(255, 255, 255, 0.8); }
.composer { display: flex; gap: 1rem; align-items: flex-end; padding: 1.2rem 1.6rem; border-block-start: 1px solid var(--edge); background: var(--paper); }
.composer textarea { flex: 1; min-inline-size: 0; font: 500 var(--fs-3)/1.4 var(--font-primary); color: var(--fg); background: var(--sunken); border: 2px solid transparent; border-radius: 2.2rem; padding: 1rem 1.6rem; min-block-size: 4.4rem; max-block-size: 16rem; resize: none; }
.composer textarea:focus { outline: none; border-color: var(--brand-300); background: var(--paper); }
.send-btn { inline-size: 4.4rem; block-size: 4.4rem; border-radius: 50%; border: 0; background: var(--brand-500); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.send-btn:hover { background: var(--brand-600); }
.send-btn[disabled] { opacity: 0.4; pointer-events: none; }
.send-btn .ico { width: 2rem; height: 2rem; }
.jump-pill { position: sticky; inset-block-end: 0.4rem; align-self: center; border: 0; background: var(--brand-600); color: #fff; border-radius: var(--rad-pill); padding: 0.8rem 1.4rem; font: 700 var(--fs-1)/1 var(--font-primary); cursor: pointer; box-shadow: var(--shadow-2); }

.inbox { display: grid; grid-template-columns: minmax(28rem, 38rem) minmax(0, 1fr); background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); overflow: hidden; min-block-size: 52rem; }
.inbox-list { border-inline-end: 1px solid var(--edge); display: flex; flex-direction: column; min-block-size: 0; min-inline-size: 0; }
.inbox-tabs { display: flex; gap: 0.8rem; padding: 1.2rem; border-block-end: 1px solid var(--edge); flex-wrap: wrap; align-items: center; }
.inbox-items { overflow-y: auto; flex: 1; max-block-size: 70rem; }
.iq { display: grid; gap: 0.4rem; padding: 1.4rem 1.6rem; border: 0; border-block-end: 1px solid var(--edge); background: none; inline-size: 100%; text-align: start; font: inherit; color: inherit; cursor: pointer; box-shadow: inset 4px 0 0 transparent; }
.iq:hover { background: var(--sunken); }
.iq.is-on { background: var(--brand-50); box-shadow: inset 4px 0 0 var(--brand-500); }
.iq-top { display: flex; align-items: center; gap: 0.8rem; min-inline-size: 0; }
.iq-top b { font-size: var(--fs-2); color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iq-top .grow { flex: 1; }
.iq p { margin: 0; font-size: var(--fs-2); color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inbox-detail { padding: 2.4rem; display: flex; flex-direction: column; gap: 1.6rem; min-inline-size: 0; }
.inbox-detail > .empty-state { border: 0; }
.iq-who { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.iq-who > div { display: grid; min-inline-size: 0; }
.iq-who b { font-size: var(--fs-4); color: var(--fg); }
.iq-who .grow { flex: 1; }
.q-bubble { background: var(--sunken); border-radius: 0.6rem 1.8rem 1.8rem 1.8rem; padding: 1.4rem 1.8rem; font-size: var(--fs-4); color: var(--fg); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.a-bubble { background: var(--tint-green); border-radius: 1.8rem 0.6rem 1.8rem 1.8rem; padding: 1.4rem 1.8rem; font-size: var(--fs-3); color: var(--fg); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-act="inbox-back"] { display: none; align-self: flex-start; }

.seg-tabs { display: inline-flex; gap: 0.3rem; background: var(--raised); border-radius: var(--rad-pill); padding: 0.4rem; flex-wrap: wrap; }
.seg-tabs button { border: 0; background: none; font: 700 var(--fs-2)/1 var(--font-primary); color: var(--fg-2); padding: 0.9rem 1.4rem; border-radius: var(--rad-pill); cursor: pointer; display: inline-flex; gap: 0.6rem; align-items: center; }
.seg-tabs button .n { font: 600 var(--fs-1)/1 var(--font-mono); opacity: 0.8; }
.seg-tabs button[aria-pressed="true"] { background: var(--paper); color: var(--brand-ink); box-shadow: var(--shadow-1); }

/* ============================================================================
   M. THE BUILDER — tasks, slides, quizzes, picture answers
============================================================================ */
.tb { display: grid; gap: var(--gap); }
.tb-task { background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); overflow: hidden; }
.tb-task.has-problem { border-color: var(--band-orange); }
.tb-head { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; padding: 1.4rem 1.6rem; }
.tb-head .tc-num { background: var(--brand-100); color: var(--brand-ink); }
.tb-title { font: 800 var(--fs-4)/1.3 var(--font-display); color: var(--fg); border: 2px solid transparent; background: transparent; border-radius: var(--rad-xs); padding: 0.6rem 0.8rem; inline-size: 100%; min-inline-size: 0; letter-spacing: -0.01em; }
.tb-title:hover { border-color: var(--edge); }
.tb-title:focus { outline: none; border-color: var(--brand-400); background: var(--paper); }
.tb-title::placeholder { color: var(--muted); font-weight: 600; }
.tb-tools { display: flex; align-items: center; gap: 0.4rem; }
.tb-summary { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0 1.6rem 1.4rem 7.2rem; }
.tb-body { border-block-start: 1px solid var(--edge); padding: 1.8rem 1.6rem 2rem 7.2rem; display: grid; gap: 2rem; background: var(--desk); }
.tb-section { display: grid; gap: 1rem; }
.tb-section > h4 { margin: 0; font-size: var(--fs-3); display: flex; align-items: center; gap: 0.8rem; }
.tb-section > h4 .grow { flex: 1; }
.tb-hint { font-size: var(--fs-1); color: var(--muted); margin: -0.4rem 0 0; }
.tb-add { align-items: center; }
button.chip { cursor: pointer; font-family: inherit; }
button.chip:hover { border-color: var(--brand-400); color: var(--brand-ink); }
button.chip:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; }
.slide-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap: 0.8rem; align-items: center; }
.q-edit { background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-sm); padding: 1.4rem; display: grid; gap: 1.2rem; }
.q-edit.has-problem { border-color: var(--band-orange); }
.q-edit-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.q-edit-head b { font: 600 var(--fs-1)/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-ink); }
.q-edit-head .grow { flex: 1; }
.opt-edit { display: grid; grid-template-columns: auto 6.4rem minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; }
.opt-correct { position: relative; inline-size: 3.6rem; block-size: 3.6rem; }
.opt-correct input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.opt-correct span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--edge-strong); background: var(--paper); color: transparent; }
.opt-correct.multi span { border-radius: 0.8rem; }
.opt-correct input:checked + span { background: var(--band-green); border-color: var(--band-green); color: #fff; }
.opt-correct input:focus-visible + span { outline: 3px solid var(--brand-300); outline-offset: 2px; }
.opt-correct .ico { width: 1.8rem; height: 1.8rem; stroke-width: 2.6; }
.pic-slot { inline-size: 6.4rem; block-size: 4.8rem; border-radius: var(--rad-xs); border: 2px dashed var(--edge-strong); background: var(--paper); display: grid; place-items: center; color: var(--muted); cursor: pointer; overflow: hidden; padding: 0; position: relative; }
.pic-slot:hover { border-color: var(--brand-400); color: var(--brand-ink); }
.pic-slot img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.pic-slot.has-pic { border-style: solid; border-color: var(--edge); }
.pic-slot .ico { width: 2rem; height: 2rem; }
.q-image { display: flex; align-items: center; gap: 1rem; }
.q-image .pic-slot { inline-size: 12rem; block-size: 8rem; }
.tb-add { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.dashed-add {
  display: flex; align-items: center; justify-content: center; gap: 0.8rem; inline-size: 100%; padding: 1.6rem;
  border: 2px dashed var(--edge-strong); border-radius: var(--rad-md); background: transparent; color: var(--brand-ink);
  font: 700 var(--fs-3)/1 var(--font-primary); cursor: pointer;
}
.dashed-add:hover { border-color: var(--brand-400); background: var(--brand-50); }
.dashed-add[disabled] { opacity: 0.5; pointer-events: none; }
.dashed-add .ico { width: 2rem; height: 2rem; }

.savebar {
  position: sticky; inset-block-end: 1.6rem; z-index: 500; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); box-shadow: var(--shadow-2); padding: 1.2rem 1.6rem;
}
.savebar .grow { flex: 1 1 18rem; min-inline-size: 0; }
.savebar.is-dirty { border-color: var(--brand-400); }
.problems { margin: 0; padding-inline-start: 2rem; display: grid; gap: 0.4rem; font-size: var(--fs-2); }

/* ============================================================================
   N. FORMS
   .wd-field, not .field: HDS owns .field as the input itself.
============================================================================ */
.wd-form { display: grid; gap: 1.8rem; }
.wd-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.4rem; }
.wd-field { display: grid; gap: 0.6rem; min-inline-size: 0; }
.wd-label { font-size: var(--fs-2); font-weight: 700; color: var(--fg); }
.wd-help { font-size: var(--fs-1); color: var(--muted); }
.wd-input, .wd-select, .wd-textarea {
  font: 500 var(--fs-3)/1.4 var(--font-primary); color: var(--fg); background: var(--paper);
  border: 2px solid var(--edge-strong); border-radius: var(--rad-xs); padding: 1.1rem 1.3rem; inline-size: 100%; min-inline-size: 0;
}
.wd-input.sm, .wd-select.sm { padding: 0.8rem 1.1rem; font-size: var(--fs-2); }
.wd-textarea { resize: vertical; min-block-size: 8rem; }
.wd-input:focus, .wd-select:focus, .wd-textarea:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 4px var(--brand-100); }
.wd-input::placeholder, .wd-textarea::placeholder { color: var(--muted); }
.wd-field.is-error .wd-input { border-color: #e05c5c; }
.wd-check { display: flex; align-items: center; gap: 1rem; font-size: var(--fs-2); color: var(--fg-2); cursor: pointer; }
.wd-check input { inline-size: 1.8rem; block-size: 1.8rem; accent-color: var(--brand-500); margin: 0; }
.wd-inline { display: flex; gap: 0.8rem; align-items: center; }
.wd-inline > .wd-input { flex: 1; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--edge-strong); border-radius: var(--rad-pill); overflow: hidden; }
.stepper button { inline-size: 4.2rem; block-size: 4.2rem; border: 0; background: var(--paper); color: var(--fg); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--sunken); }
.stepper .ico { width: 1.8rem; height: 1.8rem; }
.stepper output { min-inline-size: 5rem; text-align: center; font: 800 var(--fs-4)/1 var(--font-mono); color: var(--fg); }
.pick-list { display: grid; gap: 0.4rem; max-block-size: 26rem; overflow-y: auto; border: 1px solid var(--edge); border-radius: var(--rad-sm); padding: 0.6rem; }
.pick-list label { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0.8rem; border-radius: var(--rad-xs); cursor: pointer; }
.pick-list label:hover { background: var(--sunken); }
.pick-list input { accent-color: var(--brand-500); inline-size: 1.8rem; block-size: 1.8rem; margin: 0; }
.pick-list .who { flex: 1; }

/* ============================================================================
   O. DRAWER, DIALOG, TOASTS
   Drawers for forms (HDS); a dialog only for a yes/no with consequences —
   delete, end a live session.
============================================================================ */
.panel-scrim, .wd-dialog-scrim { position: fixed; inset: 0; background: rgba(36, 27, 46, 0.4); z-index: 800; opacity: 0; transition: opacity var(--dur-2) ease; }
.panel-scrim.is-on, .wd-dialog-scrim.is-on { opacity: 1; }
.wd-dialog-scrim { z-index: 900; }
.side-panel {
  position: fixed; inset-block: 0; inset-inline-end: 0; inline-size: min(56rem, 100vw); background: var(--paper); z-index: 810;
  display: flex; flex-direction: column; box-shadow: -1.6rem 0 4.4rem rgba(36, 27, 46, 0.18);
  transform: translateX(102%); transition: transform var(--dur-3) var(--ease-out); visibility: hidden;
}
.side-panel.is-open { transform: translateX(0); visibility: visible; }
.side-panel.wide { inline-size: min(88rem, 100vw); }
.sp-head { display: flex; align-items: center; gap: 1.2rem; padding: 1.6rem 2rem; border-block-end: 1px solid var(--edge); }
.sp-head > div { flex: 1; min-inline-size: 0; display: grid; }
.sp-head h3 { margin: 0; font-size: var(--fs-5); overflow-wrap: anywhere; }
.sp-body { flex: 1; overflow-y: auto; padding: 2rem; display: grid; gap: 2rem; align-content: start; }
.sp-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.4rem 2rem; border-block-start: 1px solid var(--edge); background: var(--sunken); }
.sp-foot .grow { flex: 1; }

.wd-dialog {
  position: fixed; z-index: 910; inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -46%) scale(0.98);
  inline-size: min(52rem, calc(100vw - 3.2rem)); background: var(--paper); border-radius: var(--rad-md); box-shadow: var(--shadow-2);
  padding: 2.4rem; display: grid; gap: 1.4rem; opacity: 0; transition: opacity var(--dur-2) ease, transform var(--dur-2) var(--ease-out);
}
.wd-dialog.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.wd-dialog h3 { margin: 0; font-size: var(--fs-5); display: flex; align-items: center; gap: 1rem; }
.wd-dialog h3 .icon-box { inline-size: 4.4rem; block-size: 4.4rem; }
.wd-dialog .icon-box.danger { background: var(--danger-bg); color: var(--danger-ink); }
.wd-dialog-body { display: grid; gap: 1rem; font-size: var(--fs-3); }
.wd-dialog-body ul { margin: 0; padding-inline-start: 2rem; }
.wd-dialog-actions { display: flex; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; margin-block-start: 0.6rem; }

.wd-toasts { position: fixed; inset-block-end: 2rem; inset-inline-start: 50%; transform: translateX(-50%); z-index: 960; display: grid; gap: 0.8rem; justify-items: center; pointer-events: none; }
.wd-toast { display: flex; align-items: center; gap: 1rem; background: var(--ink); color: #fff; border-radius: var(--rad-sm); padding: 1.2rem 1.6rem; font-size: var(--fs-2); font-weight: 600; box-shadow: var(--shadow-2); max-inline-size: min(56rem, calc(100vw - 3.2rem)); animation: wd-toast-in var(--dur-2) var(--ease-out); }
:root[data-mode="dark"] .wd-toast { background: #f4f2fb; color: #241b2e; }
.wd-toast .ico { width: 1.8rem; height: 1.8rem; color: var(--band-green); flex-shrink: 0; }
.wd-toast.bad .ico { color: #ff9b9b; }
@keyframes wd-toast-in { from { opacity: 0; transform: translateY(1rem); } }

/* ============================================================================
   P. SIGN IN
============================================================================ */
.wd-bands { display: flex; block-size: 0.6rem; border-radius: var(--rad-pill); overflow: hidden; inline-size: 12rem; }
.wd-bands i { flex: 1; }
.wd-bands i:nth-child(1) { background: var(--band-green); } .wd-bands i:nth-child(2) { background: var(--band-yellow); }
.wd-bands i:nth-child(3) { background: var(--band-orange); } .wd-bands i:nth-child(4) { background: var(--band-blue); }
.wd-bands i:nth-child(5) { background: var(--band-purple); }
.wd-signin { min-block-size: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--desk); }
.wd-signin-brand { padding: 8rem clamp(2.4rem, 6vw, 8rem); display: grid; align-content: center; gap: 2rem; background: var(--sunken); }
.wd-signin-brand h1 { font-size: var(--fs-7); margin: 0; }
.wd-signin-brand p { font-size: var(--fs-4); max-inline-size: 48rem; margin: 0; }
.wd-signin-side { display: grid; place-items: center; padding: 4rem 2rem; }
.wd-signin-card { inline-size: min(44rem, 100%); display: grid; gap: 1.6rem; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); padding: 3.2rem; box-shadow: var(--shadow-1); }
.wd-signin-card h2 { font-size: var(--fs-6); margin: 0; }
.wd-signin-card .wd-bands { inline-size: 100%; }

/* ============================================================================
   R. INNER SCREENS
   Inside the suite bar, sub-bar and rail: a page head per screen, cards
   that lead with people, a ladder for opening tasks, a passcode for the
   projector, a delete card that says what goes with it.
============================================================================ */
.page-head { display: flex; align-items: flex-end; gap: 1.6rem 2rem; flex-wrap: wrap; }
.page-head .ph-txt { flex: 1 1 36rem; min-inline-size: 0; }
.page-head h2 { font-size: var(--fs-6); margin: 0; letter-spacing: -0.02em; }
.page-head p { margin: 0.4rem 0 0; color: var(--muted); font-size: var(--fs-3); max-inline-size: 72ch; }
.page-head .ph-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---- library filters: facets with counts ------------------------------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.filters .t-search { flex: 1 1 26rem; max-inline-size: 40rem; background: var(--paper); border: 1px solid var(--edge); }
.filters .t-search input { color: var(--fg); }
.facet { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.facet .label { margin-inline-end: 0.4rem; }
.fchip {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.3rem; border-radius: var(--rad-pill); border: 1px solid var(--edge-strong);
  background: var(--paper); font: 600 var(--fs-2)/1.1 var(--font-primary); color: var(--fg-2); cursor: pointer; white-space: nowrap;
}
.fchip:hover { border-color: var(--brand-400); color: var(--fg); }
.fchip[aria-pressed="true"] { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.fchip .n { font: 600 var(--fs-1)/1 var(--font-mono); opacity: 0.75; }
.fchip[disabled] { opacity: 0.45; cursor: default; }
.card-sum { margin: 0; color: var(--fg-2); font-size: var(--fs-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-block-size: 3.1em; }
.act-card h3 { font-size: var(--fs-5); }
.act-card .wd-chips .chip .ico { width: 1.3rem; height: 1.3rem; }
.act-card .wd-path { flex: 0 1 auto; min-inline-size: 0; }

/* ---- session cards ------------------------------------------------------ */
.card-top { display: flex; align-items: center; gap: 0.8rem; min-block-size: 3.4rem; }
.card-top .grow { flex: 1; }
.ws-card { gap: 1rem; }
.ws-card.is-live { border-color: var(--band-green); box-shadow: inset 0 4px 0 var(--band-green); }
.ws-card.is-live:hover { box-shadow: inset 0 4px 0 var(--band-green), var(--shadow-1); }
.ws-card.is-ended { background: color-mix(in srgb, var(--paper) 70%, var(--sunken)); }
.live-pill { display: inline-flex; align-items: center; gap: 0.6rem; font: 800 var(--fs-1)/1 var(--font-primary); background: var(--ok-bg); color: var(--ok-ink); padding: 0.6rem 1.1rem; border-radius: var(--rad-pill); }
.live-pill::before { content: ''; inline-size: 0.8rem; block-size: 0.8rem; border-radius: 50%; background: var(--band-green); animation: wd-ring 1.6s ease-in-out infinite; }
@keyframes wd-ring { 50% { box-shadow: 0 0 0 5px rgba(101, 189, 130, 0.25); } }
.passcode-chip { font: 700 var(--fs-2)/1 var(--font-mono); letter-spacing: 0.05em; background: var(--sunken); border: 1px dashed var(--edge-strong); border-radius: var(--rad-xs); padding: 0.6rem 1rem; color: var(--fg); position: relative; z-index: 2; }
.people-line { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.people-line b { font: 800 var(--fs-7, 3.6rem)/1 var(--font-display); color: var(--fg); letter-spacing: -0.02em; }
.people-line span { font-size: var(--fs-2); color: var(--muted); }
.mini-counts { display: flex; gap: 0.4rem 1.4rem; flex-wrap: wrap; min-block-size: 2rem; }
.mini-counts span { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--fs-2); color: var(--fg-2); }
.mini-counts .ico { width: 1.5rem; height: 1.5rem; color: var(--muted); }
.mini-counts .warn { color: var(--warn-ink); font-weight: 700; }
.mini-counts .warn .ico { color: var(--warn-ink); }
.wd-card-foot .clamp-1 { min-inline-size: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-new {
  display: grid; place-content: center; justify-items: center; gap: 0.8rem; text-align: center; padding: 2.4rem;
  border: 2px dashed var(--edge-strong); border-radius: var(--rad-md); background: transparent; font: inherit; color: var(--fg-2); cursor: pointer; min-block-size: 22rem;
}
.card-new b { font-size: var(--fs-4); color: var(--fg); }
.card-new .small { max-inline-size: 30ch; }
.card-new:hover { border-color: var(--brand-400); background: var(--brand-50); }
.card-new .icon-box { background: var(--brand-100); color: var(--brand-ink); }

/* ---- live --------------------------------------------------------------- */
.progress-rows { display: grid; gap: 1.8rem; margin-block-start: 1.4rem; }
.pr { display: grid; gap: 0.8rem; }
.pr-top { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.pr-top b { font-size: var(--fs-3); color: var(--fg); min-inline-size: 0; }
.pr-top .grow { flex: 1; }
.pr-num { inline-size: 2.8rem; block-size: 2.8rem; border-radius: 0.8rem; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-ink); font: 700 var(--fs-1)/1 var(--font-mono); flex-shrink: 0; }
.pr-num .ico { width: 1.4rem; height: 1.4rem; }
.pr.is-locked .pr-num { background: var(--sunken); color: var(--muted); }
.pr.is-locked b { color: var(--muted); font-weight: 600; }
.pr .split { block-size: 1.6rem; }
.pr-counts .legend i { display: none; }

.attention { display: grid; }
.att-row { display: flex; align-items: center; gap: 1.2rem; padding: 1.1rem 0; border-block-start: 1px solid var(--edge); }
.att-row:first-child { border-block-start: 0; padding-block-start: 0.2rem; }
.att-row .avatar, .att-row .icon-box { align-self: center; flex-shrink: 0; }
.att-row .txt { flex: 1; min-inline-size: 0; display: grid; gap: 0.4rem; }
.att-row b { font-size: var(--fs-3); color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-row .s { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: var(--fs-1); color: var(--muted); }

/* ---- controls ------------------------------------------------------------ */
.ladder { display: flex; overflow-x: auto; scrollbar-width: thin; padding-block-end: 0.2rem; }
.ladder-step {
  flex: 1 0 9.6rem; text-align: center; padding: 1.2rem 0.6rem; border: 2px solid var(--edge); background: var(--paper);
  font: 700 var(--fs-2)/1 var(--font-primary); color: var(--muted); cursor: pointer; white-space: nowrap;
}
.ladder-step:first-child { border-start-start-radius: var(--rad-pill); border-end-start-radius: var(--rad-pill); }
.ladder-step:last-child { border-start-end-radius: var(--rad-pill); border-end-end-radius: var(--rad-pill); }
.ladder-step + .ladder-step { border-inline-start: 0; }
.ladder-step:hover { color: var(--fg); background: var(--sunken); }
.ladder-step.done { background: var(--brand-100); color: var(--brand-ink); border-color: var(--brand-200); }
.ladder-step.current { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.ladder-step:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; position: relative; }
.ctl-list { display: grid; margin-block-start: 1.6rem; }
.ctl { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto auto; gap: 1.4rem; align-items: center; padding: 1.4rem 0; border-block-start: 1px solid var(--edge); }
.b-num { inline-size: 3.6rem; block-size: 3.6rem; border-radius: var(--rad-xs); background: var(--brand-100); color: var(--brand-ink); display: grid; place-items: center; font: 700 var(--fs-2)/1 var(--font-mono); flex-shrink: 0; }
.b-num.locked { background: var(--sunken); color: var(--muted); }
.b-num .ico { width: 1.6rem; height: 1.6rem; }
.ctl-txt { display: grid; gap: 0.2rem; min-inline-size: 0; }
.ctl-txt b { font-size: var(--fs-3); color: var(--fg); display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.ctl-txt .s { font-size: var(--fs-1); color: var(--muted); }
.ctl.is-locked .ctl-txt b { color: var(--fg-2); }
.quiz-sw { display: inline-flex; align-items: center; gap: 0.8rem; font-size: var(--fs-2); font-weight: 600; color: var(--fg-2); }
.passcode-card { display: grid; gap: 1rem; justify-items: start; }
.passcode-card .wd-inline { flex-wrap: wrap; }
.passcode-card .wd-inline > * { white-space: nowrap; }
.passcode-big { font: 700 clamp(3.2rem, 4vw, 4.8rem)/1 var(--font-mono); letter-spacing: 0.08em; color: var(--fg); overflow-wrap: anywhere; }
.bigscreen {
  position: fixed; inset: 0; z-index: 990; background: #1b1523; color: #fff; display: grid; place-content: center; justify-items: center;
  gap: 2.4rem; padding: 4rem; text-align: center; cursor: pointer;
}
.bs-eyebrow { font: 600 clamp(1.6rem, 2vw, 2.4rem)/1.2 var(--font-mono); color: var(--band-yellow); text-transform: uppercase; letter-spacing: 0.08em; }
.bs-code { font: 800 clamp(6rem, 16vw, 22rem)/1 var(--font-mono); letter-spacing: 0.06em; overflow-wrap: anywhere; }
.bigscreen p { margin: 0; font-size: clamp(1.8rem, 2.4vw, 3rem); color: rgba(255, 255, 255, 0.8); }
.bs-hash { display: inline-grid; place-items: center; inline-size: 1.6em; block-size: 1.6em; border-radius: 50%; background: var(--brand-500); font-weight: 800; }
.bigscreen .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }

/* ---- settings ------------------------------------------------------------ */
.danger-card { border-color: color-mix(in srgb, var(--danger) 35%, var(--edge)); }
.footprint { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.8rem; }
.footprint div { background: var(--sunken); border-radius: var(--rad-xs); padding: 1rem 1.2rem; display: grid; }
.footprint b { font: 800 var(--fs-5)/1.1 var(--font-display); color: var(--fg); }
.footprint span { font-size: var(--fs-1); color: var(--muted); }
.btn-danger.solid, .danger-card .btn-danger { background: #d64545; color: #fff; }
.danger-card .btn-danger:hover { background: #b83636; }

/* ---- the activity record -------------------------------------------------- */
.record-head { background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); padding: 2.2rem 2.4rem; display: grid; gap: 1.8rem; }
.rh-top { display: flex; gap: 1.6rem; align-items: flex-start; flex-wrap: wrap; }
.rh-id { flex: 1 1 36rem; min-inline-size: 0; display: grid; gap: 0.6rem; }
.rh-id h2 { margin: 0; font-size: var(--fs-6); letter-spacing: -0.02em; }
.rh-id p { margin: 0; color: var(--fg-2); max-inline-size: 72ch; }
.rh-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.record-head .figures { border-block-end: 0; padding-block-end: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; font: 500 var(--fs-1)/1.4 var(--font-mono); color: var(--muted); }
.crumbs a { color: var(--brand-ink); }
.crumbs .ico { width: 1.2rem; height: 1.2rem; }
.do-list { display: grid; }
.do-row { display: flex; align-items: flex-start; gap: 1.2rem; padding: 1.4rem 0; border-block-start: 1px solid var(--edge); }
.do-row:first-child { border-block-start: 0; padding-block-start: 0.2rem; }
.do-txt { flex: 1; min-inline-size: 0; display: grid; gap: 0.3rem; color: inherit; }
.do-txt:hover { text-decoration: none; }
.do-txt:hover b { color: var(--brand-ink); }
.do-txt b { font-size: var(--fs-3); color: var(--fg); }
.do-txt .s { font-size: var(--fs-1); color: var(--muted); }
.shot-line { display: inline-flex; align-items: center; gap: 0.8rem; justify-self: start; margin-block-start: 0.4rem; padding: 0.6rem 1rem; background: var(--sunken); border-radius: var(--rad-xs); font-size: var(--fs-1); color: var(--fg-2); }
.shot-line .ico { width: 1.5rem; height: 1.5rem; color: var(--brand-ink); flex-shrink: 0; }
.facts { display: grid; }
.facts > div { display: flex; gap: 1.6rem; justify-content: space-between; align-items: center; padding: 1.1rem 0; border-block-start: 1px solid var(--edge); font-size: var(--fs-2); }
.facts > div:first-child { border-block-start: 0; padding-block-start: 0.2rem; }
.facts .k { color: var(--muted); }
.facts .v { color: var(--fg); font-weight: 700; text-align: end; }
.links { display: grid; }
.link-row { display: flex; align-items: center; gap: 1.2rem; padding: 1.1rem 0; border-block-start: 1px solid var(--edge); color: inherit; }
.link-row:first-child { border-block-start: 0; padding-block-start: 0.2rem; }
.link-row:hover { text-decoration: none; }
.link-row:hover b { color: var(--brand-ink); }
.link-row .lr-txt { flex: 1; min-inline-size: 0; display: grid; }
.link-row b { font-size: var(--fs-2); color: var(--fg); }
.link-row .s { font-size: var(--fs-1); color: var(--muted); }

/* ---- builder: screenshots per task ---------------------------------------- */
.b-presets { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.b-presets .label { margin-inline-end: 0.2rem; }
.b-preset { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.4rem; border-radius: var(--rad-pill); border: 1px solid var(--edge-strong); background: var(--paper); color: var(--fg-2); font: 700 var(--fs-2)/1 var(--font-primary); cursor: pointer; }
.b-preset .ico { width: 1.6rem; height: 1.6rem; }
.b-preset:hover { border-color: var(--brand-400); color: var(--brand-ink); }
.b-preset[aria-pressed="true"] { background: var(--brand-100); border-color: var(--brand-300); color: var(--brand-ink); }
.b-shot-list { display: grid; gap: 0.8rem; }
.b-shot { display: grid; grid-template-columns: auto minmax(0, 14rem) minmax(0, 1fr) auto auto; gap: 1.2rem; align-items: end; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-sm); padding: 1.2rem 1.4rem; }
.b-shot > * { min-inline-size: 0; }
.b-shot .b-num { align-self: center; }
.b-shot .wd-label { font-size: var(--fs-1); }
.b-req { display: inline-flex; align-items: center; gap: 0.8rem; font-size: var(--fs-2); font-weight: 700; color: var(--fg-2); min-inline-size: 11rem; block-size: 4rem; cursor: pointer; }
.b-tools { display: inline-flex; align-self: center; }
.b-shot-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.b-shot-foot .grow { flex: 1; }
.b-shot-say { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.b-shot-say .label { margin-inline-end: 0.2rem; }
.b-empty { margin: 0; text-align: center; padding: 1.4rem; border: 2px dashed var(--edge-strong); border-radius: var(--rad-sm); color: var(--muted); font-size: var(--fs-2); }

/* ---- figures: numbers in a row, split by hairlines ---------------------- */
.figures { display: flex; flex-wrap: wrap; border-block: 1px solid var(--edge); padding-block: 1.4rem; }
.figures > div { flex: 1 1 10rem; padding-inline: 1.4rem; border-inline-start: 1px solid var(--edge); display: grid; gap: 0.2rem; min-inline-size: 0; }
.figures > div:first-child { padding-inline-start: 0; border-inline-start: 0; }
.figures b { font: 800 var(--fs-6)/1.1 var(--font-display); color: var(--fg); }
.figures span { font: 600 var(--fs-1)/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.data-table tr.is-off { opacity: 0.55; }

/* ============================================================================
   S. PUBLIC PAGES — the extension's home, help, privacy policy, terms
   Readable without signing in (page-public.php). One column of prose on paper,
   the same tokens as the console, so dark mode follows.
============================================================================ */
/* minmax(0, 1fr): a wide table scrolls inside its box instead of widening the page */
.pub { min-block-size: 100vh; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); }
.pub-main { min-inline-size: 0; }
.pub-bar { display: flex; align-items: center; gap: 1.2rem 2rem; flex-wrap: wrap; padding: 1.2rem 2rem; background: var(--paper); border-block-end: 1px solid var(--edge); }
.pub-brand { display: inline-flex; align-items: center; gap: 1rem; color: var(--fg); min-inline-size: 0; }
.pub-brand:hover { text-decoration: none; }
.pub-brand img { inline-size: 4.4rem; block-size: auto; }
.pub-brand span { display: grid; line-height: 1.2; }
.pub-brand b { font: 800 var(--fs-4)/1.15 var(--font-display); letter-spacing: -0.01em; }
.pub-brand small { font-size: var(--fs-1); color: var(--muted); }
.pub-nav { margin-inline-start: auto; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pub-nav a { padding: 0.8rem 1.4rem; border-radius: var(--rad-pill); font-weight: 700; font-size: var(--fs-2); color: var(--fg-2); }
.pub-nav a:hover { background: var(--sunken); color: var(--fg); text-decoration: none; }
.pub-nav a[aria-current="page"] { background: var(--brand-100); color: var(--brand-ink); }
.pub-main { padding: clamp(2rem, 4vw, 4.8rem) 1.6rem 6rem; }
.pub-article { max-inline-size: 84rem; margin-inline: auto; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--rad-md); padding: clamp(2.2rem, 4vw, 4.8rem); min-inline-size: 0; }
.pub-article > h1 { font-size: var(--fs-7); line-height: 1.1; margin: 0.4rem 0 1.6rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.pub-content { font-size: var(--fs-3); line-height: 1.7; color: var(--fg-2); overflow-wrap: anywhere; }
.pub-content > :first-child { margin-block-start: 0; }
.pub-content h2 { font-size: var(--fs-5); color: var(--fg); margin: 3.2rem 0 1rem; letter-spacing: -0.01em; }
.pub-content h3 { font-size: var(--fs-4); color: var(--fg); margin: 0 0 0.8rem; }
.pub-content p, .pub-content ul, .pub-content ol { margin: 0 0 1.4rem; }
.pub-content ul, .pub-content ol { padding-inline-start: 2.4rem; }
.pub-content li { margin-block-end: 0.6rem; }
.pub-content a { color: var(--brand-ink); font-weight: 600; }
.pub-content code { font: 500 0.9em/1 var(--font-mono); background: var(--raised); color: var(--fg); padding: 0.2rem 0.6rem; border-radius: 0.6rem; }
.pub-content .table-wrap { overflow-x: auto; margin: 0 0 2rem; border: 1px solid var(--edge); border-radius: var(--rad-sm); }
.pub-content table { inline-size: 100%; border-collapse: collapse; font-size: var(--fs-2); min-inline-size: 56rem; }
.pub-content th, .pub-content td { text-align: start; padding: 1.1rem 1.2rem; border-block-end: 1px solid var(--edge); vertical-align: top; }
.pub-content tr:last-child td { border-block-end: 0; }
.pub-content th { font: 600 var(--fs-1)/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--sunken); }
.pub-content .pub-lede { font-size: var(--fs-4); line-height: 1.55; color: var(--fg); }
.pub-content .pub-meta { color: var(--muted); font-size: var(--fs-2); }
.pub-content .pub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(28rem, 100%), 1fr)); gap: 1.6rem; margin: 2.4rem 0; }
.pub-content .pub-grid > div { background: var(--sunken); border-radius: var(--rad-sm); padding: 2rem 2.2rem; }
.pub-content .pub-grid ul { margin: 0; }
.pub-content .pub-cta { margin: 2.4rem 0; }
.pub-content .pub-cta .btn-primary { color: #fff; font-weight: 700; text-decoration: none; }
.pub-content .pub-note { background: var(--brand-50); color: var(--brand-ink); border-radius: var(--rad-sm); padding: 1.2rem 1.6rem; font-weight: 600; }
.pub-foot { display: flex; justify-content: center; align-items: center; gap: 0.8rem 1.8rem; flex-wrap: wrap; padding: 2.4rem 1.6rem 3.2rem; color: var(--muted); font-size: var(--fs-2); }
.pub-foot a { color: var(--fg-2); font-weight: 600; }
@media (max-width: 760px) {
  .pub-bar { padding: 1.2rem 1.6rem; }
  .pub-nav { margin-inline-start: 0; inline-size: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .pub-nav a { flex-shrink: 0; }
  .pub-article { border-radius: var(--rad-sm); }
}

/* ============================================================================
   Q. SMALL SCREENS
   1280: the side column of a record drops under the main one.
   1024: the rail becomes a scrolling strip of its links; filter trees move to
         the dropdowns in the filter bar, which exist on every width.
   760:  one column everywhere; the sub-bar stops sticking.
   390:  nothing scrolls sideways except a table inside its own box.
============================================================================ */
@media (max-width: 1280px) {
  .rf-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  :root { --gap: 1.2rem; }
  .wd-body { grid-template-columns: minmax(0, 1fr); padding: 1.2rem 1.2rem 4rem; }
  .wd-rail {
    position: static; max-block-size: none; display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.6rem;
    border-radius: var(--rad-pill); scrollbar-width: none;
  }
  .wd-rail::-webkit-scrollbar { display: none; }
  .wd-rail .rail-label, .wd-rail .rail-card, .wd-rail .rail-foot, .wd-rail .rail-item.child, .wd-rail .rail-tree, .wd-rail .rail-toggle, .wd-rail .rail-hide-strip { display: none; }
  .wd-rail .rail-item { inline-size: auto; flex-shrink: 0; border-radius: var(--rad-pill); padding: 0.8rem 1.2rem; }
  .wd-rail .rail-back { flex-shrink: 0; display: inline-flex; align-items: center; }
  .suite-nav .sn-item span:not(.sn-live) { display: none; }
  .wd-user-txt { display: none; }
  .tb-body, .tb-summary { padding-inline-start: 1.6rem; }
}
@media (max-width: 760px) {
  .suite-bar { padding: 0 1.2rem; gap: 0.8rem; }
  .wd-word { display: none; }
  .ws-sub { position: static; padding: 1.2rem; }
  .ws-actions { inline-size: 100%; }
  .ws-actions > * { flex: 1 1 auto; justify-content: center; }
  .rf-head { padding: 1.6rem 1.6rem 1.6rem 2.2rem; }
  .rf-actions { inline-size: 100%; }
  .tc-row { grid-template-columns: 3.6rem minmax(0, 1fr); }
  .tc-side { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .tc-num { inline-size: 3.6rem; block-size: 3.6rem; }
  .slide-row { grid-template-columns: minmax(0, 1fr) auto; }
  .slide-row .wd-input:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .opt-edit { grid-template-columns: auto 5.2rem minmax(0, 1fr) auto; }
  .pic-slot { inline-size: 5.2rem; block-size: 4rem; }
  .tb-head { grid-template-columns: 3.6rem minmax(0, 1fr); }
  .tb-tools { grid-column: 1 / -1; justify-content: flex-end; }
  .savebar { inset-block-end: 0.8rem; gap: 0.6rem 1rem; padding: 1rem 1.2rem; }
  .savebar .grow { order: 3; flex-basis: 100%; font-size: var(--fs-1); }
  .savebar .btn-primary { margin-inline-start: auto; }
  .room { block-size: calc(100vh - var(--suite-h) - 12rem); min-block-size: 40rem; }
  .wd-signin { grid-template-columns: minmax(0, 1fr); }
  .wd-signin-brand { padding: 4rem 2rem 2rem; }
  .opt-bar { grid-template-columns: 4rem minmax(0, 1fr) 4.8rem; }
  .opt-bar .pic { inline-size: 4rem; block-size: 3rem; }
  .wd-filters .wd-select-chip { flex: 1 1 14rem; max-inline-size: none; }
}
/* Inner screens on small windows. */
@media (max-width: 1280px) {
  .room.has-side { grid-template-columns: minmax(0, 1fr); }
  .room-side { display: none; }
}
@media (max-width: 900px) {
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox.has-detail .inbox-list { display: none; }
  .inbox:not(.has-detail) .inbox-detail { display: none; }
  [data-act="inbox-back"] { display: inline-flex; align-items: center; gap: 0.4rem; }
}
@media (max-width: 760px) {
  .page-head h2 { font-size: var(--fs-5); }
  .page-head .ph-actions { inline-size: 100%; }
  .tile-row > * { flex-basis: 14rem; }
  .ltile .v { font-size: 2.8rem; }
  .ctl { grid-template-columns: 3.6rem minmax(0, 1fr); }
  .ctl > :nth-child(3), .ctl > :nth-child(4) { grid-column: 2; justify-self: start; }
  .bl-row { grid-template-columns: 9rem minmax(0, 1fr) 3.4rem; }
  .sub-grid { grid-template-columns: minmax(0, 1fr); }
  .lightbox .slider-slide { padding: 0 1.2rem 5rem; }
  .lightbox .slider-nav { inset-block-start: auto; inset-block-end: 5.6rem; transform: none; }
  .figures { row-gap: 1.2rem; }
  .figures > div { flex-basis: 40%; border-inline-start: 0; padding-inline: 0; }
  .switch button { padding: 0.9rem 1.2rem; }
  .people-line b { font-size: 3rem; }
  .wd-card-foot .clamp-1 { display: none; }
  .b-shot { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .b-shot .wd-field { grid-column: 1 / -1; }
  .b-shot .b-num { grid-row: 1; }
  .b-shot .b-req { grid-row: 1; grid-column: 2; justify-self: start; }
  .b-shot .b-tools { grid-row: 1; grid-column: 3; }
  .b-shot-foot .grow { display: none; }
  .record-head { padding: 1.6rem; }
  .rh-actions { inline-size: 100%; }
  .filters .facet { inline-size: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
