@import './tokens.css';
@import './boxes.css';

/* Base and components, from 05-notes/archive/04-design/screens/dfuse-prototype.html (class names kept). */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--surface-page); color: var(--text); font-family: var(--sans); font-size: var(--fs); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-control); }
html { scroll-padding-top: calc(var(--top-h) + var(--demo-bar-h, 0px) + 16px); scroll-padding-bottom: calc(var(--tabbar-h) + 16px); }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--surface); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--r-chip); box-shadow: var(--shadow-pop); font-weight: 600; }
.skip:focus { top: 10px; }

/* app chrome (agent 49): a top bar, the navigation rail on the left (a tab bar on a phone), the page */
.nav { background: var(--surface-header); border-bottom: 1px solid var(--divider); display: flex; align-items: center; gap: 22px; padding: 0 28px; height: var(--top-h); position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--demo-bar-h, 0px)); z-index: 7; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--r-control); }
.mark { width: 38px; height: 38px; border-radius: var(--r-control); background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; overflow: hidden; }
.mark img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
/* A client's logo (agent 56): its own shape, never squeezed into the square; on a white chip, which
   is the logo's own ground and keeps a dark logo readable in dark mode. */
.mark:has(> img) { width: auto; max-width: 132px; padding: 4px 8px; background: var(--fixed-white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent); }
.mark > img { width: auto; height: 30px; max-width: 116px; object-fit: contain; background: transparent; }
.logo-row .mark:has(> img) { width: auto; max-width: 220px; padding: 8px 12px; }
.logo-row .mark > img { height: 48px; max-width: 196px; }
.pv .pn .mark:has(> img) { width: auto; padding: 2px 4px; }
.pv .pn .mark > img { height: 18px; max-width: 60px; }
.brand .t1 { font-weight: 600; font-size: 15px; line-height: 1.15; }
.brand .t2 { font-size: 13px; color: var(--text-muted); }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-muted); }
.shell { --rail-now: var(--rail-w); display: grid; grid-template-columns: var(--rail-now) minmax(0, 1fr); align-items: start; min-height: calc(100vh - var(--top-h) - var(--demo-bar-h, 0px)); transition: grid-template-columns 220ms var(--ease); }
.shell-bare { grid-template-columns: minmax(0, 1fr); background: none; }
.shell > main { min-width: 0; }
.shell > main:focus { outline: none; }
/* The rail's column runs the page's full height (its edge line); what's in it stays in view. */
.mainnav { align-self: stretch; min-width: 0; border-right: 1px solid var(--divider); display: flex; flex-direction: column; }
/* Item 53: the rail's column runs the page's full height and the version sits at its foot, open or folded, in every layout. */
.mainnav-in { flex: 1; padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 16px; }
.mainnav-top { display: flex; flex-direction: column; gap: 16px; }
/* L6: the rail never scrolls inside itself. Its items stay in view only where the window is tall enough to show all of them; on a short window they sit at the top of the page. */
@media (min-height: 760px) { .mainnav-top { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--demo-bar-h, 0px) + var(--top-h) + 22px); } }
@media (min-height: 760px) and (max-height: 959px) { .mainnav-top:has(.railadmin > *) { position: static; } }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
/* Item 53: admin's lines folded into this strip, under a divider; nothing there when it isn't folded. */
.railadmin:empty { display: none; }
.railadmin { border-top: 1px solid var(--divider); padding-top: 14px; }
.railadmin .admmenu { position: static; }
.railadmin .admmenu-list { gap: 2px; }
.railadmin ul { margin: 0; }
.mainnav li.navgroup-start { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--divider); }
.mainnav li.navgroup-start:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.navgroup { display: block; padding: 0 12px 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.navlink { position: relative; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-control); color: var(--text-2); text-decoration: none; font-size: 15px; transition: background-color var(--t-button) var(--ease), color var(--t-button) var(--ease); }
.navlink svg { color: var(--text-muted); transition: color var(--t-button) var(--ease); }
.navlink:hover { color: var(--text); }
.navlink[aria-current="page"] { background: var(--surface); color: var(--accent-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand), var(--shadow-raised); }
.navlink[aria-current="page"] svg { color: var(--accent-ink); }
.nl-short { display: none; }
.nbadge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-chip); background: var(--st-needs-bg); color: var(--st-needs); box-shadow: inset 0 0 0 1px var(--st-needs-mark); font-size: 13px; font-weight: 600; display: inline-grid; place-items: center; line-height: 1; }
/* The rail folds to its icons and back (agent 53). The icons stay where they are; the words fade
   and the column narrows, so nothing jumps. Each item keeps its full name, read out and as a tooltip. */
.navlink .nl, .navgroup, .railtoggle .nl { transition: opacity 160ms var(--ease); }
.navlink, .railtoggle { white-space: nowrap; }
.railtop { display: flex; justify-content: flex-end; margin: -8px 0 -4px; }
.mainnav[data-collapsed] .railtop { justify-content: center; }
.railtoggle { position: relative; margin: 0; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--r-control); background: transparent; color: var(--text-muted); font-size: 14px; text-align: left; cursor: pointer; transition: background-color var(--t-button) var(--ease), color var(--t-button) var(--ease); }
.railtoggle:hover { color: var(--text); }
/* The tooltip sits to the right of the icon, over the page, never outside the screen: it is a label, not the hover. */
.railtoggle .tip { position: absolute; right: 0; top: 40px; white-space: nowrap; background: var(--text); color: var(--surface-page); font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: var(--r-control); opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; }
.railtoggle:hover .tip, .railtoggle:focus-visible .tip { opacity: 1; }
.mainnav[data-collapsed] .railtoggle .tip { left: 40px; right: auto; top: 50%; transform: translateY(-50%); }
.mainnav[data-collapsed] .railtoggle:hover .tip, .mainnav[data-collapsed] .railtoggle:focus-visible .tip { opacity: 1; }
.railtoggle:active { transform: scale(.97); }
@media (min-width: 761px) {
  .shell:has(> .mainnav[data-collapsed]) { --rail-now: 72px; }
  .mainnav[data-collapsed] .nl, .mainnav[data-collapsed] .navgroup { opacity: 0; pointer-events: none; }
  .mainnav[data-collapsed] .navgroup { height: 0; padding: 0; overflow: hidden; }
  .mainnav[data-collapsed] .nbadge { position: absolute; top: 2px; left: 25px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 12px; margin: 0; }
  /* Item 53: a folded line is as wide as the strip and no wider (its words are faded, not gone), so the hover and the "you are here" box stay inside it. */
  .mainnav[data-collapsed] .nl { max-width: 0; overflow: hidden; }
}
@media (max-width: 760px) { .railadmin { display: none; } }
/* Item 27 (agent 82): one fold control (top of the rail, or Ctrl+\) folds the main menu and admin's
   menu into one icon strip. The admin menu follows the rail: it is told by the same event. */
@media (min-width: 761px) {
  /* Item 53: folded, admin's lines live in the main strip (components/AdminMenu); the column they had is gone and the page gets the width. */
  .shell:has(> .mainnav[data-collapsed]) .admshell { grid-template-columns: minmax(0, 1fr); }
  .admshell > .admmenu[data-collapsed] { display: none; }
}
/* Focus mode (item 27): while a document is open to edit, the menus and the list column are out of
   the way; the document takes the width (capped at a reading width). :has() means no flash. */
.shell:has(.focusdoc) { grid-template-columns: minmax(0, 1fr); }
.shell:has(.focusdoc) > .mainnav { display: none; }
.shell:has(.focusdoc) > main { padding-bottom: 0; }
.admshell:has(.focusdoc), .shell:has(> .mainnav[data-collapsed]) .admshell:has(.focusdoc) { grid-template-columns: minmax(0, 1fr); max-width: none; padding-top: 16px; }
.admshell:has(.focusdoc) :is(.admmenu, .admmenu-phone) { display: none; }
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-sunk); border: 1px solid var(--divider); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--text-2); flex: none; }
.av.sm { width: 30px; height: 30px; font-size: 13px; }
.av.xs { width: 24px; height: 24px; font-size: 13px; letter-spacing: -.02em; }
.acct { position: relative; }
.acct summary { list-style: none; cursor: pointer; border-radius: 50%; }
.acct summary::-webkit-details-marker { display: none; }
.acct .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 14px 16px; display: grid; gap: 10px; z-index: 10; color: var(--text); }
.acct .menu .who-name { font-weight: 600; }
.acct .menu form { margin: 0; }
.page > * { min-width: 0; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px 30px 64px; display: flex; flex-direction: column; gap: 26px; }
/* A page arrives with a short settle (VISUAL_DIRECTION.md: about 180ms, 4px); nothing waits on it. */
.shell > main > .page { animation: enter var(--t-enter) var(--ease) both; }
@keyframes enter { from { opacity: .01; transform: translateY(4px); } }
/* The version's one home (Chris, 19 Oct): small and muted at the foot of the main menu, under
   "Collapse menu"; "v1.6" when the rail is folded; on a phone, at the foot of the account menu. */
.navversion { margin-top: auto; display: block; padding: 2px 12px 0; font-size: 12px; color: var(--text-muted); text-decoration: none; white-space: nowrap; border-radius: var(--r-control); }
.navversion:hover { color: var(--text); text-decoration: underline; }
.navversion .nv-short { display: none; }
.mainnav[data-collapsed] .navversion .nv-long { display: none; }
.mainnav[data-collapsed] .navversion .nv-short { display: inline; }
.acct-version { color: var(--text-muted); text-decoration: none; }
.acct-version:hover { color: var(--text); text-decoration: underline; }
@media (min-width: 761px) { .acct-version { display: none; } }
@media (max-width: 760px) { .navversion { display: none; } }

/* type + elements (the box roles are in boxes.css) */
.h1 { font-family: var(--sans); font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
.h2s { font-family: var(--sans); font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.lead { color: var(--text-muted); margin-top: 6px; }
.eyebrow { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.meta { font-size: 14.5px; color: var(--text-muted); }
.small { font-size: 13.5px; color: var(--text-muted); }
/* Buttons (VISUAL_DIRECTION.md): 140ms colour, border and shadow; a 1px lift on a primary under a
   fine pointer, a 1px press; disabled ones stay still. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-control); padding: 10px 20px; font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid transparent; text-decoration: none; white-space: nowrap; line-height: 1.3; transition: background-color var(--t-button) var(--ease), border-color var(--t-button) var(--ease), box-shadow var(--t-button) var(--ease), color var(--t-button) var(--ease), transform var(--t-button) var(--ease), filter var(--t-button) var(--ease); }
.btn-p { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-raised); }
.btn-p:hover { filter: brightness(1.08); }
/* The highlight (agent 56): the client's highlight colour, for at most one main action on a screen
   (the thinking space's "Ask", the start box's "Get started", Help's "Get an answer"). */
.btn-h { background: var(--hl); color: var(--on-hl); border-color: var(--hl-border); box-shadow: var(--shadow-raised); }
.btn-h:hover { filter: brightness(1.04) saturate(1.05); }
@media (hover: hover) and (pointer: fine) { :is(.btn-p, .btn-h):not(:disabled):not([aria-disabled="true"]):hover { transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in oklab, var(--brand) 22%, transparent); } }
.btn:not(:disabled):not([aria-disabled="true"]):active { transform: translateY(1px); box-shadow: none; }
.btn-o { background: var(--surface); border-color: var(--well-border); color: var(--accent-ink); }
.btn-o:hover { background: var(--hover-bg); border-color: var(--accent); }
.btn-l { background: none; border: 0; color: var(--accent-ink); padding: 8px 4px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; filter: none; opacity: .6; }
.badge, .st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: var(--chip-py) 10px; border-radius: var(--r-chip); white-space: nowrap; line-height: 1.35; }
/* A status is always a mark and words (components/StatusChip.tsx): a dot, a tick, a lock or a warning triangle, then the words. */
.st-mark { display: inline-grid; place-items: center; flex: none; color: var(--mark); }
.st-mark.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mark); }
.st-mark svg.i { width: 13px; height: 13px; stroke-width: 2; }
.st-needs { background: var(--st-needs-bg); color: var(--st-needs); --mark: var(--st-needs-mark); }
.st-hand { background: var(--st-hand-bg); color: var(--st-hand); --mark: var(--st-hand-mark); }
.st-done { background: var(--st-done-bg); color: var(--st-done); --mark: var(--st-done-mark); }
.st-restricted { background: var(--st-restricted-bg); color: var(--st-restricted); --mark: var(--st-restricted-mark); }
.st-urgent { background: var(--st-urgent-bg); color: var(--st-urgent); --mark: var(--st-urgent-solid); }
.st-info { background: var(--st-info-bg); color: var(--st-info); --mark: var(--st-info-mark); }
.st-neutral { background: var(--surface-sunk); color: var(--text-2); }
.st-wrap { white-space: normal; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: var(--r-chip); background: var(--surface-sunk); color: var(--text-2); font-size: 13px; font-weight: 600; padding: 0 7px; }
.ic { width: 38px; height: 38px; border-radius: var(--r-control); background: var(--surface-sunk); display: grid; place-items: center; color: var(--text-2); flex: none; }
.secthead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 18px; font-weight: 600; }
.fld { display: grid; gap: 6px; font-size: 14.5px; }
.fld > span { font-weight: 600; color: var(--text-2); }
.picker-list { position: absolute; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; z-index: 10; }
.picker-list li { padding: 8px 10px; border-radius: var(--r-control); cursor: pointer; }
.picker-list li.active, .picker-list li:hover { background: var(--hover-bg); }
.picker-list li[aria-selected="true"] { font-weight: 600; }
.fld input, .fld select, .fld textarea { border: 1px solid var(--divider); border-radius: var(--r-control); padding: 10px 12px; background: var(--surface); width: 100%; font-size: 15.5px; }

/* 01 home */
.start { display: grid; gap: 16px; }
/* "Raise a concern" brought the leader here: a brief ring round the box (agent 38). */
.start { transition: box-shadow .3s ease; }
.start.flash { box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 45%, transparent); }
@media (prefers-reduced-motion: reduce) { .start { transition: none; } }
/* The leader's words, quoted once while the processes are offered (agent 38). */
.said { margin: 0; display: grid; gap: 4px; }
.said figcaption { font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.said blockquote { margin: 0; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.micbtn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--divider); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--accent-ink); }
.micbtn:disabled { cursor: not-allowed; opacity: .6; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.colstack { display: grid; gap: 28px; align-content: start; min-width: 0; }
.team { list-style: none; margin: 0; padding: 0; }
.tm { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: var(--row-py) var(--row-px); border-top: 1px solid var(--divider); }
.tm:first-child { border-top: 0; }
.tm-txt { display: grid; gap: 2px; min-width: 0; }
.tm-txt b { font-weight: 600; }
.list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
/* A whole card (or a "Coming up" line) that opens a matter: one link, the card is the target. */
.cardlink { color: inherit; text-decoration: none; cursor: pointer; transition: box-shadow .12s, background-color .12s; }
.cardlink:hover { background: var(--hover-bg); box-shadow: inset 3px 0 0 var(--hover-accent), var(--shadow-sticky); }
.cardlink:focus-visible { border-radius: var(--r-box); }
.cardlink .go { margin-left: auto; color: var(--accent-ink); display: inline-flex; }
.whenitems { list-style: none; margin: 0; padding: 6px 0 0; display: grid; gap: 6px; min-width: 0; }
.whenlink { display: block; color: inherit; text-decoration: none; border-radius: var(--r-control); padding: 2px 8px; margin-inline: -8px; }
.cal small.mon { margin-top: 2px; }
.mlinks { display: grid; gap: 4px; font-size: 14.5px; }
.mlinks a { color: var(--accent-ink); text-underline-offset: 3px; }
.whens { margin: 0; padding: 0; list-style: none; }
.when { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 10px 0; border-top: 1px solid var(--divider); }
.when:first-child { border-top: 0; }
.cal { width: 46px; text-align: center; line-height: 1.1; }
.cal small { display: block; font-size: 13px; letter-spacing: .07em; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.cal b { font-size: 20px; font-weight: 600; }

/* 05 inbox */
.ihead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-chip); padding: 4px; margin: 0; list-style: none; max-width: 100%; }
.seg a { display: inline-block; border-radius: var(--r-chip); padding: 6px 14px; font-size: 14.5px; color: var(--text-2); text-decoration: none; transition: background-color var(--t-button) var(--ease), color var(--t-button) var(--ease); }
.seg a:hover { background: var(--hover-bg); color: var(--text); }
.seg a b { font-weight: 700; margin-left: 4px; }
.seg a.late b { color: var(--st-needs); }
.seg a[aria-current="true"] { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.seg a[aria-current="true"] b { color: inherit; }
.tbl { position: relative; }
table { width: 100%; border-collapse: collapse; }
/* Design standard L6: the lists of matters and questions fit the width and wrap; on a phone they stack into rows. */
.cardrows td, .cardrows tbody th { overflow-wrap: break-word; }
th { text-align: left; font-size: 13px; font-weight: 500; color: var(--text-muted); padding: 14px 18px; border-bottom: 1px solid var(--divider); }
th:last-child, td:last-child { text-align: right; }
td { padding: calc(var(--row-py) + 2px) var(--row-px); border-bottom: 1px solid var(--divider); font-size: 15px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.p, tbody th { font-weight: 600; }
td.num { white-space: nowrap; }
tbody th { text-align: left; padding: calc(var(--row-py) + 2px) var(--row-px); border-bottom: 1px solid var(--divider); font-size: 15px; vertical-align: middle; }
tr:last-child th { border-bottom: 0; }
.rest { display: inline-flex; gap: 6px; align-items: center; }
.whoav { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.whoav .av { flex: none; }
/* Open matters at desktop width (agent 46): one line a cell, only the process wraps. */
.om th, .om td, .om tbody th { padding-inline: 10px; white-space: nowrap; }
.om th:first-child, .om tbody th { padding-left: 16px; }
.om th:last-child, .om td:last-child { padding-right: 16px; }
.om tbody td:nth-child(3), .om tbody td:nth-child(5), .om tbody th { white-space: normal; }
.om tbody td:nth-child(5) { min-width: 120px; }
.load { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: var(--pad-m); }
.load .p { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 260px; }
.load .bar { flex: 1; height: 8px; border-radius: var(--r-chip); background: var(--surface-sunk); display: flex; overflow: hidden; gap: 2px; }
.load .bar i { display: block; background: var(--brand); }
.load .bar i.o { background: var(--st-needs); }
.load .late { color: var(--st-needs); }

/* 06 admin */
/* Item 7: admin's own menu beside every admin page (app/(app)/organisation/layout.tsx); the page
   inside keeps its own spacing but not its own outer padding. On a narrow screen the menu is a
   button that opens the shared drawer. */
.admshell { max-width: 1360px; margin: 0 auto; padding: 28px 30px 64px; display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
.admshell-main { min-width: 0; }
.admshell-main > .page { padding: 0; max-width: none; margin: 0; }
.admmenu { position: sticky; top: calc(var(--top-h, 64px) + var(--demo-bar-h, 0px) + 20px); }
.admmenu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
/* The lines are `.navlink` (components/MenuLink), the main menu's own style: hover, "you are here" and counts are one. */
.admmenu-list .navlink .i { flex: none; }
/* The counts sit at the end of their line (never the phone tab bar's corner badge). */
:is(.admmenu-list, .admmenu-phone) .nbadge { position: static; margin: 0 0 0 auto; min-width: 22px; height: 22px; padding: 0 7px; }
.admmenu-phone { display: none; }
.admmenu-drawer { padding: 8px 14px 16px; }
.admmenu-phone .btn { gap: 8px; }
.admgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; align-items: start; }
.nrow.nrow-3 { grid-template-columns: auto minmax(0, 1fr) auto; }
.note-quiet { border-left: 3px solid var(--brand-2); padding: 6px 0 6px 12px; color: var(--text-2); }
.chips-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip.chip-static, .chip.chip-static:hover { cursor: default; display: inline-flex; align-items: baseline; gap: 8px; border-color: var(--divider); background: var(--surface); color: var(--text-2); }
.people-roles { text-align: right; color: var(--text-2); }
.auditrow { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 12px 8px; align-items: start; }
.auditwhen { color: var(--text-muted); padding-top: 2px; }
@media (max-width: 680px) {
  .nrow.nrow-3 .people-roles { grid-column: 2; text-align: left; }
  .auditrow { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 4px; }
}
.crumbs { list-style: none; margin: 0; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.crumbs [aria-current="page"] { color: var(--text-2); }
/* "On this page": a quiet row that stays in view on a wide screen; one select on a phone. */
.onpage { position: sticky; z-index: 2; top: calc(var(--top-h, 64px) + var(--demo-bar-h, 0px)); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 10px 0; background: var(--surface-page); font-size: 14px; border-bottom: 1px solid var(--divider); }
.card .onpage { background: var(--surface); }
.onpage-title { font-weight: 600; color: var(--text-muted); }
.onpage-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.onpage-pick { display: none; }
.onpage-pick select { width: 100%; }
[id^="settings-"], .sec, [id^="process-"] { scroll-margin-top: calc(var(--top-h, 64px) + var(--demo-bar-h, 0px) + 64px); }
/* L6: the timeline is a list wherever it would not fit across (it never scrolls sideways). */
@media (max-width: 1100px) {
  .gwrap { display: none; }
  .glist { display: block; }
}
@media (max-width: 1000px) {
  .admshell { grid-template-columns: minmax(0, 1fr); padding: 26px 24px 48px; gap: 18px; }
  .admmenu { display: none; }
  .admmenu-phone { display: flex; }
}
@media (max-width: 680px) {
  .admshell { padding: 20px 16px 40px; }
  .onpage { position: static; display: grid; gap: 6px; padding: 0; border: 0; background: none; }
  .onpage-links { display: none; }
  .onpage-pick { display: block; }
}
.adm { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.adm .side { position: sticky; top: calc(90px + var(--demo-bar-h, 0px)); }
.adminnote { display: grid; gap: 22px; }
.signins { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); overflow: hidden; }
.signins .tm { border-top: 0; border-bottom: 1px solid var(--divider); }
.side { display: grid; gap: 2px; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--r-control); color: var(--text-2); text-decoration: none; font-size: 15px; }
.side a:has(.side-note) { align-items: flex-start; }
.side-txt { display: grid; gap: 2px; }
.side-note { font-size: 13px; color: var(--text-muted); }
.side-note.late { color: var(--st-hand); font-weight: 600; }
.sec { padding: var(--pad-l); display: grid; gap: 18px; scroll-margin-top: calc(90px + var(--demo-bar-h, 0px)); }
.sec h2 { font-size: 19px; font-weight: 600; }
.sec h3 { font-size: 15.5px; font-weight: 600; margin-top: 8px; }
.lf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; }
.lbl { font-size: 14.5px; font-weight: 600; margin-bottom: 8px; display: block; }
.logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-row .mark { width: 64px; height: 64px; border-radius: var(--r-box); font-size: 18px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 2.5px var(--text); flex: none; }
.hexrow { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 14.5px; color: var(--text-muted); flex-wrap: wrap; }
.hexrow input { width: 110px; border: 1px solid var(--divider); border-radius: var(--r-control); padding: 7px 10px; background: var(--surface); font-variant-numeric: tabular-nums; }
.contrast { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--st-done); margin-top: 8px; }
.pv { border: 1px solid var(--divider); border-radius: var(--r-box); overflow: hidden; background: var(--surface-page); }
.pv .pn { display: flex; align-items: center; gap: 8px; background: var(--surface); border-bottom: 1px solid var(--divider); padding: 8px 12px; font-size: 13px; flex-wrap: wrap; }
.pv .pn .mark { width: 22px; height: 22px; border-radius: var(--r-control); font-size: 8px; }
.pv .pn .hr { margin-left: auto; border: 1px solid var(--divider); border-radius: var(--r-chip); padding: 2px 8px; }
.pv .pb { padding: 14px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.pv-shell { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
.pv-rail { display: grid; gap: 2px; align-content: start; padding: 10px 6px; border-right: 1px solid var(--divider); font-size: 12px; color: var(--text-2); }
.pv-rail span { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: var(--r-control); white-space: nowrap; overflow: hidden; }
.pv-rail .tab { background: var(--surface); color: var(--accent-ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
.pv-think { display: grid; gap: 6px; background: var(--surface-speaks); box-shadow: inset 3px 0 0 var(--speaks-rule); border-radius: var(--r-control); padding: 10px; }
.pv-think b { font-family: var(--serif); font-weight: 500; font-size: 16px; }
.pv-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
.pv-next { display: grid; gap: 6px; background: var(--surface); box-shadow: inset 4px 0 0 var(--hl), var(--shadow-raised); border-radius: var(--r-control); padding: 10px; }
.pv-well { display: grid; gap: 6px; background: var(--surface-well); border-radius: var(--r-control); padding: 10px; }
.pv-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pv-row .pv-line { flex: 1; }
.pv-good { display: flex; align-items: center; gap: 8px; background: var(--good-bg); color: var(--good); border-radius: var(--r-chip); padding: 6px 10px; font-size: 12.5px; font-weight: 500; }
.pv-good .toast-tick { width: 18px; height: 18px; }
.pv-good .toast-tick svg.i { width: 12px; height: 12px; }
/* Look and feel: the theme and density rows (components/LookTheme.tsx). */
.look-row { display: grid; gap: 12px; }
.look-opts { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.look-opts legend { padding: 0; }
.look-opts:disabled { opacity: .7; }
.look-lead { max-width: 60ch; }
.themes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.dens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.themes .theme-card { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); align-items: center; gap: 12px; }
.th-txt { display: grid; gap: 4px; min-width: 0; }
.theme-card { grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; padding: 10px; }
.theme-card input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.th-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.th-rec { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: var(--r-chip); background: var(--st-done-bg); color: var(--st-done); }
.th-d { font-size: 13.5px; color: var(--text-muted); }
.th-sw { display: grid; gap: 6px; padding: 8px; border-radius: var(--r-control); background: var(--surface-page); color: var(--text); overflow: hidden; }
.th-well { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-radius: var(--r-control); background: var(--surface-well); }
.th-well .st { font-size: 11px; padding: 1px 7px; gap: 4px; }
.th-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: var(--r-control); background: var(--surface); box-shadow: var(--shadow-raised); }
.th-line { height: 6px; width: 55%; border-radius: var(--r-chip); background: var(--surface-sunk); }
.th-btn { height: 14px; width: 34px; border-radius: var(--r-control); background: var(--brand); }
.look-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 480px) { .themes .theme-card { grid-template-columns: minmax(0, 1fr); } }
.pv-line { height: 8px; width: 80%; border-radius: var(--r-chip); background: var(--surface-sunk); }
.pv-line.short { width: 50%; }
.pv .tb { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-control); padding: 5px 5px 5px 10px; font-size: 12.5px; color: var(--text-muted); }
.rules { margin: 0; padding: 0; list-style: none; }
.rule { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--divider); font-size: 15.5px; }
.rule:first-child { border-top: 0; padding-top: 0; }
.rule .k { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-sunk); border: 1px solid var(--divider); display: grid; place-items: center; font-size: 13px; color: var(--text-muted); flex: none; }
.rule .txt { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.rule .gap { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.rule input[type=number], .rule input[type=time] { width: 76px; text-align: center; border: 1px solid var(--divider); border-radius: var(--r-control); padding: 7px; background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums; }
.rule .pickanchor, .rule .pickbox { width: 170px; }
.rule select { border: 1px solid var(--divider); border-radius: var(--r-control); padding: 7px 10px; background: var(--surface); }
.rule input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); }
.rule ul { margin: 0; padding-left: 18px; font-size: 14.5px; }
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); background: var(--surface-sunk); border: 1px solid var(--divider); padding: 3px 10px; border-radius: var(--r-chip); font-weight: 600; white-space: nowrap; }
.savebar { display: flex; justify-content: flex-end; gap: 12px; align-items: center; flex-wrap: wrap; }

/* 07 states */
.sk { background: linear-gradient(90deg, var(--surface-sunk) 0%, var(--divider) 50%, var(--surface-sunk) 100%); background-size: 200% 100%; animation: sh 1.4s infinite linear; border-radius: var(--r-control); height: 14px; }
@keyframes sh { to { background-position: -200% 0; } }
.empty { text-align: center; display: grid; gap: 10px; justify-items: center; }
.ring { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in oklab, var(--brand-2) 14%, var(--surface)); display: grid; place-items: center; color: var(--icon-2); }

/* shared bits used by the write screens */
.crumb { font-size: 14.5px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumb a { color: var(--text-muted); }
.crumb-back { display: inline-flex; align-items: center; gap: 6px; }
.crumb-sep { color: var(--divider); padding-inline: 2px; }
.chip { border: 1px solid var(--divider); background: var(--surface); border-radius: var(--r-chip); padding: 6px 14px; font-size: 14px; cursor: pointer; color: var(--text-2); }
.chip { transition: border-color var(--t-button) var(--ease), background-color var(--t-button) var(--ease), color var(--t-button) var(--ease); }
.chip:hover { border-color: var(--brand); background: var(--hover-bg); color: var(--accent-ink); }
.chip:disabled { cursor: not-allowed; opacity: .5; }
.chip:disabled:hover { border-color: var(--divider); background: var(--surface); color: var(--text-2); }
.chip.person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; }
.av.sm { width: 28px; height: 28px; font-size: 13px; }
.chip.person[aria-pressed="true"] .av { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.who { display: grid; gap: 8px; }
.steplabel { font-size: 13px; color: var(--accent-ink); font-weight: 600; }
.chip[aria-pressed="true"], .chip.sug { border-color: var(--brand); background: var(--surface-selected); color: var(--accent-ink); font-weight: 600; }
.orrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.trust { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-muted); }
.trust svg { margin-top: 2px; }
.trust form { display: inline; }
.inline-btn { background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }

/* 02 conversation */
.conv { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.thread { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.me { align-self: flex-end; max-width: 78%; white-space: pre-wrap; }
.df { align-self: flex-start; max-width: 78%; white-space: pre-wrap; }
.got { max-width: 620px; padding: var(--pad-l); display: grid; gap: 14px; }
.got dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 9px 16px; margin: 0; font-size: 15.5px; }
.got dt { color: var(--text-muted); }
.got dd { margin: 0; }
.got .src { display: block; font-size: 13.5px; color: var(--text-muted); }
.got .low { display: block; font-size: 13.5px; color: var(--st-hand); font-weight: 600; }
.got .sep { grid-column: 1 / -1; border-top: 1px solid var(--divider); margin: 4px 0; }
.got input, .got select { border: 1px solid var(--divider); border-radius: var(--r-control); padding: 8px 10px; background: var(--surface); width: 100%; font-size: 15px; }
.acts { display: flex; gap: 10px; flex-wrap: wrap; }
.composer { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 20px; }
.composer textarea { flex: 1; border: 0; background: transparent; font-size: 16px; min-width: 0; padding: 8px 0; resize: none; min-height: 44px; field-sizing: content; overflow-y: hidden; }
.composer textarea:focus { outline: none; }
/* Item 28: answers as chips under the question, one tap each (44px targets) */
.dateanswer { display: grid; gap: 10px; max-width: 420px; }
.answerchips { display: grid; gap: 8px; }
.answerchips .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.answerchips .chip { min-height: 44px; padding: 9px 16px; font-size: 15px; font-weight: 600; color: var(--accent-ink); border-color: var(--brand); }
.answerchips .chip.chip-quiet { font-weight: 400; color: var(--text-2); border-color: var(--divider); }
.answerchips .offered { display: grid; gap: 6px; margin-top: 4px; }
.answerchips .offered p { margin: 0; color: var(--text-2); }
.answerchips .offered .chip[aria-pressed="true"] { background: var(--surface-selected); border-color: var(--brand); color: var(--accent-ink); font-weight: 600; }
.answerchips .offered-date { max-width: 360px; }
.answerchips-known { align-self: flex-start; max-width: 78%; margin: 0; }
/* Item 28: one-tap answers in a form (radio chips with a default) */
.tapchips { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; align-content: start; }
.tapchips legend { font-size: 14.5px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.tapchips .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tapchips label { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border: 1px solid var(--divider); border-radius: var(--r-chip); background: var(--surface); font-size: 14.5px; cursor: pointer; }
.tapchips label:has(input:checked) { border-color: var(--brand); background: var(--surface-selected); color: var(--accent-ink); font-weight: 600; }
.tapchips label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.tapchips input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tapgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 20px; align-items: start; }
.gotsplit { display: grid; gap: 10px; }
.gotsplit[hidden] { display: none; }
.gotsplit h3 { font-size: 15.5px; font-weight: 600; margin: 0; }
.optional-words > summary { cursor: pointer; color: var(--accent-ink); font-size: 14.5px; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.optional-words[open] > summary { margin-bottom: 10px; }
.optional-words > div { display: grid; gap: 12px; }
.onetap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.onetap button { min-height: 64px; display: grid; gap: 2px; align-content: center; text-align: left; padding: 10px 14px; }
.onetap button .hint { font-size: 13px; font-weight: 400; opacity: .85; }
@media (max-width: 640px) { .onetap { grid-template-columns: minmax(0, 1fr); } }
.formacts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.threethings ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.threethings h2 { font-size: 18px; font-weight: 600; }
.send { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--on-brand); border: 0; display: grid; place-items: center; cursor: pointer; flex: none; }
.send:disabled { opacity: .6; cursor: not-allowed; }
.rail { padding: var(--pad-l); display: grid; gap: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 5px 0; }
.steps .o { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--divider); margin-top: 2px; background: var(--surface); }
.steps li.on .o { border: 6px solid var(--brand); }
.steps li.d .o { background: var(--brand); border-color: var(--brand); }
.steps li.on b { color: var(--accent-ink); font-weight: 600; }
.steps b { font-weight: 500; display: block; }
.steps small { font-size: 13.5px; color: var(--text-muted); }

/* 03 guide */
.stepbar { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.stepbar li { border-top: 3px solid var(--divider); padding-top: 8px; font-size: 13px; color: var(--text-muted); }
.stepbar li.d { border-color: var(--brand); }
.stepbar li.on { border-color: var(--brand); color: var(--accent-ink); font-weight: 600; }
.g3 { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
.have { display: grid; gap: 16px; }
.have ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.have .r { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; }
.tick { width: 22px; height: 22px; border-radius: 50%; background: var(--st-done-bg); color: var(--st-done); display: grid; place-items: center; margin-top: 1px; }
.tick svg { width: 13px; height: 13px; }
.tick.h { background: var(--surface-selected); color: var(--accent-ink); }
.tick.no { background: var(--surface-sunk); color: var(--text-muted); }
.have b { font-weight: 600; display: block; }
.have .oneline { display: block; min-width: 0; overflow-wrap: anywhere; }
.have .oneline b { display: inline; }
.have .r > div { min-width: 0; }
.have p { font-size: 14.5px; color: var(--text-muted); }
.howhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.quote { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.55; white-space: pre-wrap; }
.happened { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; color: var(--text-muted); }
.healthline { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 15px; }
.bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: var(--pad-m); }
.bottom .r { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* drawers */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; }
/* Item 74: the drawer is one column: the button follows the last field, and a calendar or a long form scrolls the drawer, never a box inside it. */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100%); background: var(--surface); z-index: 21; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; padding-top: env(safe-area-inset-top, 0px); color: var(--text); }
.drawer > header { padding: 22px 26px 16px; border-bottom: 1px solid var(--divider); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drawer .body { padding: 4px 26px 20px; overflow: visible; flex: none; }
.drawer > footer { padding: 14px 26px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--divider); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--surface-sunk); }
.drawer form.wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
/* Design standard L6: a drawer in the page grows with its content; only the page scrolls (item 47's "Start a matter"). */
.drawer.drawer-page { position: absolute; bottom: auto; min-height: 100vh; }
.drawer.drawer-page .body { overflow: visible; flex: none; }
.x { background: none; border: 0; cursor: pointer; color: var(--text-muted); padding: 6px; border-radius: var(--r-control); }
.x:hover { background: var(--surface-sunk); }
.hs { padding: 18px 0; border-top: 1px solid var(--divider); white-space: pre-wrap; font-size: 15px; }
.hs:first-child { border-top: 0; }
.form { display: grid; gap: 16px; padding: 18px 0; }
.fld textarea { min-height: 120px; resize: vertical; }
.types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border: 0; margin: 0; padding: 0; }
.types legend { font-weight: 600; color: var(--text-2); font-size: 14.5px; margin-bottom: 6px; padding: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--good-bg); color: var(--good); padding: 10px 18px; border-radius: var(--r-chip); font-size: 15px; font-weight: 500; z-index: 30; box-shadow: var(--shadow-pop); display: inline-flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px); animation: rise .18s ease-out; }
/* A good moment (tokens.md): a warm tick and one plain sentence on the sun well. Undo goes in the slot after the words (item 29). */
.toast-tick { width: 22px; height: 22px; border-radius: 50%; background: var(--good-tick); color: var(--on-good-tick); display: grid; place-items: center; flex: none; }
.toast-tick svg.i { width: 14px; height: 14px; stroke-width: 2.2; }
.toast.calm { background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
.toast-slot { flex: none; background: none; border: 0; padding: 4px 2px; color: inherit; font: inherit; cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.toasts .toast { padding: 8px 8px 8px 18px; width: max-content; }
@media (max-width: 600px) { .toasts .toast { border-radius: var(--r-box); } }
.toast-x { background: none; border: 0; color: inherit; opacity: .8; cursor: pointer; padding: 6px; border-radius: var(--r-chip); display: grid; place-items: center; }
.toast-x:hover { opacity: 1; }
/* Item 78: the confirmation after a one-tap Done ("Marked done. Not today, or add a note?"); opened, it is a card in the middle of the screen. */
.donenote { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--good-bg); color: var(--good); padding: 8px 8px 8px 18px; border-radius: var(--r-chip); font-size: 15px; font-weight: 500; z-index: 30; box-shadow: var(--shadow-pop); display: inline-flex; gap: 10px; align-items: center; width: max-content; max-width: calc(100vw - 32px); animation: rise .18s ease-out; }
@media (max-width: 600px) { .donenote { border-radius: var(--r-box); flex-wrap: wrap; } }
.donecard { gap: 14px; }
.doneset { display: grid; gap: 8px; }
.quietlink { background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quietlink:hover { color: var(--text); }
.whendone .lbl { font-weight: 600; color: var(--text-2); }
/* Item 29: "Leave without saving?", asked only when something was typed. */
.leave-ask { position: fixed; z-index: 31; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); display: grid; gap: 12px; }
.leave-ask-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } }

/* settings pages: sections with their heading on the left, controls on the right */
.settingsform { display: grid; }
.setsec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; padding: var(--pad-l); border-top: 1px solid var(--divider); }
.setsec:first-child { border-top: 0; }
.setsec-h { display: grid; gap: 6px; align-content: start; }
.setsec-h h2 { font-size: 18px; font-weight: 600; }
.setsec-b { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; max-width: 640px; }
/* One column: the choice cards, the time and the time zone share the same left and right edges. */
.setsec-b .pickanchor, .setsec-b .pickbox, .setsec-b .zoneanchor, .setsec-b .zoneanchor .pickbox { max-width: none; width: 100%; }
.choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.setbar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; padding: 16px 30px; border-top: 1px solid var(--divider); background: var(--surface-sunk); border-radius: 0 0 var(--r-box) var(--r-box); }
.setbar-msg { margin-right: auto; min-width: 0; }
.choices { display: grid; gap: 12px; border: 0; margin: 0; padding: 0; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-ic { width: 34px; height: 34px; border-radius: var(--r-control); background: var(--surface-sunk); display: grid; place-items: center; color: var(--text-2); }
.choice:has(input:checked) .choice-ic { background: var(--surface); color: var(--accent-ink); }
.choice-txt { display: grid; gap: 3px; }
.choice-t { font-weight: 600; }
.choice:has(input:checked) .choice-t { color: var(--accent-ink); }
.choice-d { font-size: 14px; color: var(--text-muted); }
.choice-dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--divider); background: var(--surface); margin-top: 2px; }
.choice:has(input:checked) .choice-dot { border: 6px solid var(--brand); }
.reveal { animation: fadein .16s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } }
.zoneanchor, .zoneanchor .pickbox { max-width: 480px; }
.pickicon { color: var(--text-muted); display: grid; place-items: center; padding-left: 12px; }
.fld .pickbox .pickicon + input { padding-left: 8px; }
.zonenow { font-size: 13.5px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.timelist.zonelist { width: 100%; display: block; }
.zonelist li { display: flex; justify-content: space-between; gap: 12px; }
.zonelist li.none { color: var(--text-muted); cursor: default; }
.zonelist li.none:hover { background: none; color: var(--text-muted); }

/* a matter private to HR: who has it, and what's next, side by side */
.statuspair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.statusbox { display: grid; gap: 10px; align-content: start; }
.statusbox h2 { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.statusline { display: flex; gap: 10px; align-items: center; font-size: 18px; font-weight: 600; }
.statusline svg { color: var(--accent-ink); }

/* "What happened?": a compact summary */
.happenedcard { display: grid; gap: 8px; padding: var(--pad-m); }
.happenedcard h2 { font-size: 17px; font-weight: 600; }
.summarytext { max-width: 75ch; }
.happenedline { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; color: var(--text-2); }
.happenedline b { font-weight: 600; color: var(--text); }

/* coming back to a conversation: what's settled so far */
.sofar { display: grid; gap: 14px; }
.sofar h2 { font-size: 17px; font-weight: 600; }
.sofar-part { display: grid; gap: 8px; }
.sofar-part h3 { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.sofar-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px 20px; margin: 0; }
.sofar-facts dt { font-size: 13.5px; color: var(--text-muted); }
.sofar-facts dd { margin: 0; font-weight: 500; }
.sofar-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14.5px; color: var(--text-2); }
.sofar-steps li { display: inline-flex; gap: 6px; align-items: center; }
.sofar-steps svg { color: var(--st-done); }
.gthen { min-width: 0; padding-top: 4px; }

/* feedback: working buttons, saved lines, field errors */
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: turn .7s linear infinite; flex: none; }
@keyframes turn { to { transform: rotate(360deg); } }
.btn[aria-busy="true"] { cursor: progress; opacity: .85; }
.okline { display: flex; gap: 8px; align-items: center; color: var(--st-done); font-size: 14.5px; font-weight: 500; }
.field-err { font-size: 13.5px; color: var(--st-needs); font-weight: 500; }

/* the shared date and time pickers */
.picker > label { font-weight: 600; color: var(--text-2); }
.pickbox { display: flex; align-items: center; border: 1px solid var(--divider); border-radius: var(--r-control); background: var(--surface); max-width: 320px; }
.pickbox:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.pickbox[data-invalid] { border-color: var(--st-needs); }
.fld .pickbox input { border: 0; background: transparent; padding: 10px 12px; min-width: 0; flex: 1; outline: none; }
.fld .pickbox input:disabled { color: var(--text-muted); }
.pickfield { justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.picker { position: relative; }
.pickrequired { position: absolute; left: 0; bottom: 0; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pickbtn { background: none; border: 0; color: var(--accent-ink); padding: 8px 10px; cursor: pointer; display: grid; place-items: center; border-radius: var(--r-control); }
.pickbtn:hover { background: var(--hover-bg); }
.pickbtn:disabled { color: var(--text-muted); cursor: not-allowed; background: none; }
.choicelist { position: relative; width: 100%; min-width: 0; max-width: 100%; }
.choicebtn { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; border: 1px solid var(--divider); border-radius: var(--r-control); padding: 10px 12px; background: var(--surface); font-size: 15.5px; text-align: left; cursor: pointer; }
.choicebtn:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.choicebtn:disabled { color: var(--text-muted); cursor: not-allowed; }
.choicebtn[data-empty] .choicetext { color: var(--text-muted); }
.choicetext { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choicelist .choiceval { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.choicepop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; padding: 6px; display: grid; gap: 6px; }
.choicepop ul { list-style: none; margin: 0; padding: 0; }
.choicepop li { padding: 9px 10px; border-radius: var(--r-control); cursor: pointer; font-size: 15px; }
.choicepop li.active, .choicepop li:hover { background: var(--hover-bg); color: var(--accent-ink); }
.choicepop li[aria-selected="true"] { font-weight: 600; }
.choicepop li[aria-disabled="true"] { color: var(--text-muted); cursor: not-allowed; }
.choicepop .choicegroup { padding: 8px 10px 2px; font-size: 12.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); cursor: default; }
.choicepop .choiceempty { color: var(--text-muted); cursor: default; }
.fld .choicesearch { border: 1px solid var(--divider); border-radius: var(--r-control); padding: 8px 10px; width: 100%; font-size: 15px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-sm { padding: 4px 11px; font-size: 13.5px; }
.chip:disabled { opacity: .55; cursor: not-allowed; }
.pickanchor { position: relative; max-width: 320px; }
.calpop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 15; padding: 12px; width: 300px; max-width: calc(100vw - 32px); display: grid; gap: 8px; }
.calhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calhead b { font-weight: 600; font-size: 15px; }
.calgrid { min-width: 0; width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.calgrid th { padding: 4px 0; font-size: 13px; text-align: center; border: 0; font-weight: 600; letter-spacing: .03em; }
.calgrid td, .calgrid th:last-child, .calgrid td:last-child { padding: 0; border: 0; text-align: center; }
.calgrid button { width: 100%; aspect-ratio: 1; border: 0; border-radius: var(--r-chip); background: none; cursor: pointer; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.calgrid button:hover:not(:disabled) { background: var(--hover-bg); }
.calgrid button[aria-current="date"] { box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--brand) 55%, var(--divider)); font-weight: 600; }
.calgrid button.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.calgrid button:disabled { color: var(--text-muted); opacity: .45; cursor: not-allowed; text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--text-muted) 50%, transparent); }
.calfoot { display: flex; justify-content: flex-end; gap: 4px; }
.calnote { margin: 0 0 6px; color: var(--text-muted); }
.timelist { position: absolute; top: calc(100% + 6px); left: 0; z-index: 15; margin: 0; padding: 6px; list-style: none; width: min(400px, calc(100vw - 48px)); display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 2px; }
.timelist[hidden] { display: none; }
.timelist li { padding: 7px 12px; border-radius: var(--r-control); cursor: pointer; font-variant-numeric: tabular-nums; font-size: 15px; }
.timelist li.active, .timelist li:hover { background: var(--hover-bg); color: var(--accent-ink); }
.timelist li[aria-selected="true"] { font-weight: 600; color: var(--accent-ink); }

/* 04 case */
.chead { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.chead .r { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.next { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.next .ic { color: var(--accent-ink); }
.next b { font-size: 18px; font-weight: 600; }
.next .btn { margin-left: auto; }
.ctabs { display: flex; gap: 4px; border-bottom: 1px solid var(--divider); }
.ctabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 12px; font-size: 15.5px; color: var(--text-muted); cursor: pointer; border-radius: var(--r-control) var(--r-control) 0 0; transition: background-color var(--t-button) var(--ease), color var(--t-button) var(--ease), border-color var(--t-button) var(--ease); }
.ctabs button:hover { background: var(--hover-bg); color: var(--text); border-bottom-color: var(--hover-accent); }
.ctabs button[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--brand); font-weight: 600; }
.gwrap { position: relative; padding: 16px 22px 18px; }
.gantt { min-width: 820px; position: relative; }
.grow { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: center; min-height: 52px; border-top: 1px solid var(--divider); }
.grow.axis { min-height: 34px; border-top: 0; }
.grow .lb small { display: block; font-size: 13px; color: var(--text-muted); }
.grow .lb b { font-weight: 600; font-size: 15px; }
.grow.fut .lb b { font-weight: 500; color: var(--text-2); }
.trk { position: relative; height: 30px; }
.tick-l { position: absolute; top: 6px; font-size: 13px; color: var(--text-muted); white-space: nowrap; transform: translateX(-50%); }
.tick-l:first-child { transform: none; }
.tick-l:last-child { transform: translateX(-100%); }
.gbar { position: absolute; top: 9px; height: 12px; border-radius: var(--r-chip); background: var(--brand); min-width: 6px; }
.gbar.now { background: linear-gradient(90deg, var(--brand), color-mix(in oklab, var(--brand) 55%, var(--surface))); }
.gbar.nx { background: transparent; border: 1.5px dashed color-mix(in oklab, var(--brand) 55%, var(--divider)); height: 14px; top: 8px; }
.gdot { position: absolute; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface-selected); transform: translateX(-50%); }
.gcap { position: absolute; top: 5px; font-size: 13px; color: var(--text-muted); white-space: nowrap; background: var(--surface); padding: 0 6px; z-index: 2; border-radius: var(--r-control); }
.gsec { padding: 12px 0 6px; font-size: 13px; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; border-top: 1px solid var(--divider); text-transform: uppercase; }
.gtoday-wrap { position: absolute; top: 0; bottom: 0; left: 210px; right: 0; pointer-events: none; }
.gtoday { position: absolute; top: 30px; bottom: 0; width: 2px; background: var(--brand); z-index: 1; pointer-events: none; }
.gtoday b { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); background: var(--brand); color: var(--on-brand); font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-chip); white-space: nowrap; }
.then { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.then i { font-family: var(--serif); font-size: 16px; }
.rec { list-style: none; margin: 0; padding: 0; }
.rec li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--divider); }
.rec li:first-child { border-top: 0; }
.rec li.new { background: var(--surface-selected); }
.rec .txt { white-space: pre-wrap; }
.rty { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rty .lock { text-transform: none; letter-spacing: 0; }
.rby { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rdt { font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.file { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; border: 1px solid var(--divider); border-radius: var(--r-control); padding: 4px 10px; margin-top: 6px; background: var(--surface); color: var(--text); }
.corr { border-left: 3px solid var(--st-hand); padding-left: 12px; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--divider); }
.person:first-child { border-top: 0; }
/* Item 22A: at phone width a person's action goes under their name, never squeezing it. */
@media (max-width: 640px) {
  .person { grid-template-columns: auto minmax(0, 1fr); padding: 14px 6px; }
  .person > :nth-child(3) { grid-column: 2; justify-self: start; }
}
.drafts { padding: 16px 22px; border-top: 1px solid var(--divider); display: grid; gap: 10px; }
.drafts .txt { white-space: pre-wrap; }
/* The timeline as a list on a phone (agent 46): every stage readable, today in its place. */
.glist { display: none; padding: 16px 18px 18px; }
.glist ol { list-style: none; margin: 0; padding: 0; }
.gl { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.gl::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--divider); }
.gl:first-child::before { top: 16px; }
.gl:last-child::before { bottom: calc(100% - 16px); }
.gl-dot { position: relative; z-index: 1; width: 12px; height: 12px; margin: 5px 0 0 3px; border-radius: 50%; background: var(--brand); }
.gl > div { display: grid; gap: 1px; min-width: 0; }
.gl b { font-weight: 600; }
.gl.now .gl-dot { box-shadow: 0 0 0 4px var(--surface-selected); }
.gl.fut .gl-dot { background: var(--surface); border: 2px dashed color-mix(in oklab, var(--brand) 55%, var(--divider)); }
.gl.fut b { font-weight: 500; color: var(--text-2); }
.gl.today b { display: inline-block; justify-self: start; background: var(--brand); color: var(--on-brand); font-size: 13px; padding: 2px 10px; border-radius: var(--r-chip); }
.gl.today .gl-dot { background: var(--on-brand); border: 3px solid var(--brand); }
.glist .gsec { margin-top: 8px; }
/* HR's reading of the leader's answers: a plan's areas as a list, the leader's own words marked. */
.factlist { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.saidwords { font-style: italic; }
.wordsnote { border-left: 3px solid var(--divider); padding-left: 10px; }
/* Agent 60: the language check at "Looks right", in place on the card. */
.langcheck { display: grid; gap: 8px; }
.langcheck textarea { border: 1px solid var(--divider); border-radius: var(--r-control); padding: 8px 10px; background: var(--surface); width: 100%; font-size: 15px; resize: vertical; }
.langcheck .acts { display: flex; gap: 8px; flex-wrap: wrap; }
/* Agent 60: "Your words are kept", under the composer. */
.wordskept { color: var(--text-muted); padding-left: 20px; margin-top: -10px; }
/* Agent 60: "Something changed?" on a leader's matter: one line until it's opened. */
.changes > summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.changes > summary::-webkit-details-marker { display: none; }
.changes > summary .ic, .changes > summary svg { color: var(--icon-2); flex: none; }
.changesbody { display: grid; gap: 18px; margin-top: 14px; }
.changesbody form + form { border-top: 1px solid var(--divider); padding-top: 16px; }
.types.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
/* Agent 60: "Name a new owner" when a leader asked for one: marked, the form a sensible width. */
#new-owner form, .changesbody form { max-width: 560px; }
/* Agent 60: accepted absences already in dfuse, beside the count question. */
.earlierabs { display: grid; gap: 6px; }
.rec .standing { color: var(--st-hand); font-weight: 600; margin-top: 4px; }
.earlierabs h2 { font-size: 15px; font-weight: 600; }
.earlierabs ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }

/* sign-in */
.signin { max-width: 460px; margin: 0 auto; padding: 72px 20px 48px; display: grid; gap: 22px; }
.signin .brand { margin-bottom: 8px; }
.signin form { display: grid; gap: 16px; }
.signin .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.testusers { display: grid; gap: 6px; }
.testusers h2, .testusers p { margin: 0; }
.testusers ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.testusers li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }

/* The demo person switcher (components/DemoBar.tsx): Custard Square's sign-in in a demo organisation
   only. A slim bar of its own colour above the header, which it never covers: the header sits below
   it while it is there. */
/* L6: the bar wraps to as many lines as it needs and scrolls away with the page (never sideways, never inside itself), so nothing below is offset by it. */
:root:has(.demobar) { --demo-bar-h: 0px; }
.demobar { --demo: var(--demo-yellow); --demo-ink: var(--demo-ink-fixed); --demo-chip: var(--demo-yellow-soft); position: relative; z-index: 6; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 40px; background: repeating-linear-gradient(135deg, var(--demo) 0 18px, var(--demo-yellow-deep) 18px 36px); color: var(--demo-ink); font-size: 13.5px; }
.demobar-tag { flex: none; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; background: var(--demo-ink); color: var(--demo); border-radius: var(--r-control); padding: 3px 8px; }
.demobar-form { display: contents; }
/* The chips wrap within the space left of "Back to …" (agent 53; wrapping, not scrolling: L6). */
.demobar-scroll { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.demobar-who { flex: none; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.demobar-chips { flex: 1 1 0; min-width: min(100%, 320px); display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.demochip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 3px; border-radius: var(--r-chip); border: 1px solid color-mix(in srgb, var(--demo-ink) 25%, transparent); background: var(--demo-chip); color: var(--demo-ink); font-size: 13px; cursor: pointer; }
.demochip:hover { background: var(--demo-yellow-pale); }
.demochip[aria-current="true"] { background: var(--demo-ink); color: var(--fixed-white); border-color: var(--demo-ink); cursor: default; }
.demochip[aria-disabled="true"]:not([aria-current="true"]) { opacity: .6; cursor: progress; }
.demochip-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--fixed-white); color: var(--demo-ink); font-weight: 700; font-size: 13px; }
.demochip[aria-current="true"] .demochip-av { background: var(--demo); }
.demochip-role { font-weight: 600; }
.demobar-back { flex: none; margin-left: auto; height: 32px; padding: 0 14px; border-radius: var(--r-chip); border: 0; background: var(--demo-ink); color: var(--fixed-white); font-weight: 600; font-size: 13px; cursor: pointer; }
.demobar-back[aria-disabled="true"] { opacity: .6; cursor: progress; }
.demochip[data-pressed] .demochip-av { outline: 2px solid var(--demo-ink); }
.demobar-problem { flex: none; font-weight: 600; color: var(--demo-problem); background: var(--demo-yellow-pale); border-radius: var(--r-control); padding: 3px 8px; }
.demobar :focus-visible { outline: 2px solid var(--demo-ink); outline-offset: 2px; }

@media (max-width: 1000px) {
  .cols, .adm, .lf, .conv, .g3, .setsec { grid-template-columns: minmax(0, 1fr); }
  .setsec { gap: 16px; }
  .adm .side { position: static; }
  .statuspair { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 26px 24px 48px; }
  .nav { padding: 10px 24px; }
  .demobar { padding: 0 24px; }
}
@media (max-width: 680px) {
  .nav { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  /* On a phone each chip is a first name: every role stays in its label and in "Viewing as" (v1.20.4). */
  .demobar { padding: 6px 12px 6px 16px; }
  .demochip-roles { display: none; }
  .nav nav { order: 3; width: 100%; }
  .nav .right .btn .lbl-long { display: none; }
  .page { padding: 20px 16px 40px; }
  .setsec { padding: 22px 18px; }
  .setbar { padding: 14px 18px; }
  .setbar .btn { width: 100%; }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .tm { grid-template-columns: auto minmax(0, 1fr); }
  .tm > .btn { grid-column: 2; justify-self: start; }
  .signin { padding-top: 40px; }
  .got dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .got dt { margin-top: 8px; }
  .me, .df { max-width: 92%; }
  .stepbar { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); position: relative; }
  .types { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .next .btn { margin-left: 0; }
  .rec li { grid-template-columns: 32px minmax(0, 1fr); }
  .rec li .rdt { grid-column: 2; }
  /* The filters as an even two-by-two, never a ragged wrap (agent 46). */
  .ihead nav { width: 100%; }
  .seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; border-radius: var(--r-box); gap: 2px; }
  .seg a { display: block; text-align: center; padding: 8px 10px; }
  /* Inbox and open matters on a phone: each row is a card of label and value (agent 46). */
  .cardrows { overflow: visible; background: transparent; box-shadow: none; }
  .cardrows table { min-width: 0; display: block; }
  .cardrows thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cardrows tbody { display: grid; gap: 12px; }
  .cardrows tr { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface); box-shadow: var(--shadow-raised); border-radius: var(--r-box); padding: 6px 16px 10px; }
  .cardrows tbody th { display: block; border: 0; padding: 10px 0 6px; font-size: 17px; white-space: normal; }
  .cardrows td, .cardrows tbody td:last-child { display: block; position: relative; min-height: 38px; text-align: left; padding: 8px 0 8px 120px; border: 0; border-top: 1px solid var(--divider); white-space: normal; font-size: 15px; }
  .cardrows td::before { content: attr(data-label); position: absolute; left: 0; top: 9px; width: 108px; font-size: 13px; color: var(--text-muted); }
  .cardrows td.whocell .btn { width: 100%; justify-content: center; }
  .om th, .om td, .om tbody th { padding-inline: 0; }
  .cardrows.om td { padding-left: 120px; }
}
/* coaching (agent 41): the coaching guide, tips at each stage, and ask for advice */
.coach-lead { display: grid; gap: 16px; }
.coach-lead h2, .coach-sec h2, .advice-box h2 { font-size: 18px; font-weight: 600; }
.coach-note { font-size: 14.5px; color: var(--text-2); }
.coach-aim { display: grid; gap: 4px; border-left: 3px solid var(--speaks-rule); padding: 2px 0 2px 14px; }
.coach-aim p { font-size: 18px; line-height: 1.45; color: var(--text); }
.coach-open { display: grid; gap: 10px; }
.coach-open-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.coach-open h3, .coach-sub { font-size: 15px; font-weight: 600; color: var(--text-2); }
.coach-open ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.coach-open .quote { font-size: 18px; }
.coach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.coach-sec { display: grid; gap: 14px; align-content: start; }
.coach-email { grid-column: 1 / -1; }
.coach-list, .coach-steps, .coach-bullets, .coach-pairs { margin: 0; padding: 0; display: grid; gap: 12px; }
.coach-list { list-style: none; counter-reset: q; }
.coach-list > li { display: grid; gap: 2px; }
ol.coach-list > li { counter-increment: q; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; }
ol.coach-list > li::before { content: counter(q); grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-selected); color: var(--accent-ink); font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.coach-list b, .coach-pairs b { font-weight: 600; }
.coach-avoid .coach-list > li { grid-template-columns: 24px minmax(0, 1fr); column-gap: 10px; }
.coach-avoid .coach-list > li > div { display: grid; gap: 2px; }
.coach-x { width: 22px; height: 22px; border-radius: 50%; background: var(--st-needs-bg); color: var(--st-needs); display: grid; place-items: center; margin-top: 1px; }
.coach-pairs { list-style: none; }
.coach-pairs li { display: grid; gap: 2px; }
.coach-pairs li .eyebrow { font-size: 13px; }
.coach-pairs li .eyebrow + b + .eyebrow { margin-top: 6px; }
.coach-bullets { padding-left: 20px; }
.coach-steps { padding-left: 22px; }
.coach-mail { padding: var(--pad-m); display: grid; gap: 10px; }
.coach-mail-body { white-space: pre-wrap; font-size: 15.5px; line-height: 1.6; }
.coach-pending { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.coach-pending > div:not(.skel-lines) { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.skel-lines { display: grid; gap: 8px; width: 120px; }
.skel-lines span { display: block; height: 10px; border-radius: var(--r-control); background: var(--surface-sunk); animation: skel 1.4s ease-in-out infinite; }
.skel-lines span:nth-child(2) { width: 80%; }
.skel-lines span:nth-child(3) { width: 60%; }
@keyframes skel { 50% { opacity: .5; } }
.coach-tips { display: grid; gap: 10px; }
.coach-tips h2 { font-size: 16px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; color: var(--accent-ink); }
.coach-tips ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
/* Item 79: a tip's one action sits beside it; on a phone it wraps under the words. */
.coach-tips li.coach-tip-with > span { margin-right: 10px; }
.coach-tips .coach-tip-act { margin-top: 4px; vertical-align: middle; white-space: normal; text-align: left; }
.advice-box { display: grid; gap: 16px; align-content: start; }
.advice-box.compact { padding: 20px 22px; gap: 12px; }
.advice-box.compact h2 { font-size: 16px; }
.advice-form { display: grid; gap: 12px; }
.advice-form .fld textarea { min-height: 72px; }
.advice-examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.advice-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.advice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.advice { display: grid; gap: 8px; border-top: 1px solid var(--divider); padding-top: 14px; }
.advice-q { display: grid; gap: 2px; }
.advice-a { display: grid; gap: 8px; font-size: 15.5px; }
.advice-flag { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--accent-ink); }
.advice-li { position: relative; padding-left: 16px; }
.advice-li::before { content: ''; position: absolute; left: 2px; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); }
.advice-say { font-size: 17px; border-left: 3px solid var(--speaks-rule); padding-left: 12px; }
.advice-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.case-coach { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1000px) {
  .coach-grid, .case-coach { grid-template-columns: minmax(0, 1fr); }
}
/* ---------------------------------------------------------------------------------------------
   Today (agent 49, the continuity design): the thinking space, the one next step, quiet rows, and a
   quieter column of what is with HR, what is paused and the week ahead.
   --------------------------------------------------------------------------------------------- */
.phead { display: grid; gap: 4px; }
.phead .lead { margin-top: 2px; }
.today { gap: 24px; }
.think { display: grid; gap: 16px; }
.think-head { display: grid; gap: 4px; }
.think-title { font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.2; letter-spacing: -.005em; }
.think-lead { color: var(--text-2); }
.askrow { display: flex; gap: 12px; align-items: flex-end; }
.askrow textarea { flex: 1; }
.think-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.think-links a { display: inline-flex; gap: 8px; align-items: center; color: var(--accent-ink); font-weight: 600; font-size: 15px; text-decoration: none; padding: 6px 0; border-radius: var(--r-control); }
/* The second colour on the thinking space's icons (agent 56); its words stay in the main colour's text. */
.think-links a svg { color: var(--icon-2); }
.think .eyebrow, .pv-think .pv-eyebrow { color: var(--accent-2); }
.think-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.think-privacy { color: var(--text-2); margin-top: -6px; }

.today-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sechead .secthead { margin-bottom: 0; }
.seclink { display: inline-flex; gap: 6px; align-items: center; font-size: 14.5px; font-weight: 600; color: var(--accent-ink); text-decoration: none; border-radius: var(--r-control); }
.seclink:hover { text-decoration: underline; text-underline-offset: 3px; }
.needs { display: grid; }
.np { position: relative; display: grid; gap: 12px; overflow: hidden; }
.np-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.np-who { display: flex; gap: 12px; align-items: center; }
.np-who > div { display: grid; gap: 0; min-width: 0; }
.np-who b { font-weight: 600; }
.np-title { font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.np-explain { color: var(--text-2); max-width: 64ch; }
.np-acts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.np-foot { border-top: 1px solid var(--divider); padding-top: 12px; margin-top: 4px; }
/* Item 105: Today's cards (components/TodayCards.tsx). The box is .card (folded) or .nextline (open: the edge is an inner shadow, so nothing moves sideways). */
.tcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tcard.card, .tcard.nextline { padding: 0; overflow: hidden; }
.tcard[data-group='needs']:not([data-open]):hover, .tcard[data-group='next']:not([data-open]):hover { background: var(--hover-bg); }
.tc-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 16px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: none; }
/* v1.19.2: the cards follow the density setting too (Comfortable unchanged at 12px; Compact 6px), as table rows do. */
.tc-row { padding-block: calc(var(--row-py) - 2px); }
a.tc-row { cursor: pointer; }
.tc-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tc-what { min-width: 0; display: grid; }
.tc-what b { font-weight: 600; overflow-wrap: anywhere; }
.tc-chev { color: var(--text-muted); display: inline-flex; transition: transform var(--t-fold) var(--ease); }
.tcard[data-open] .tc-chev { transform: rotate(90deg); }
.tcard[data-open] .tc-row { padding-bottom: 4px; }
/* The blue box folded and the body open share the same insets, so the blue box never moves. */
.tc-peek { padding: 4px 20px 16px; cursor: pointer; }
.tc-body { padding: 4px 20px 20px; display: grid; gap: 14px; min-width: 0; }
.tc-body .np-title { margin: 4px 0 0; }
/* v1.19.2: the leader's words on an HR card. */
.tc-body .q-quote { border-left: 3px solid var(--divider); padding-left: 12px; margin: 0; }
.tc-next { margin-top: 22px; display: grid; }
.tc-none { margin: 0; color: var(--text-2); }
@media (max-width: 760px) { .tc-row { gap: 10px; padding: 12px; } .tc-peek { padding: 4px 14px 14px; } .tc-body { padding: 4px 14px 16px; } }

.restlist { margin-top: 22px; display: grid; gap: 8px; }
.subhead { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.nrows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--divider); }
.nrows > li { border-bottom: 1px solid var(--divider); }
.nrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 8px; color: inherit; text-decoration: none; border-radius: var(--r-control); transition: background-color var(--t-button) var(--ease); }
.nrow-txt { display: grid; min-width: 0; }
.nrow-txt b { font-weight: 600; }
.nrow-go { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.sidecol { gap: 26px; }
.sidesec { display: grid; gap: 10px; align-content: start; }
.sidehead { font-size: 15px; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--divider); }
.receipts { list-style: none; margin: 0; padding: 0; display: grid; }
.receipts > li + li { border-top: 1px solid var(--divider); }
.receipt { display: grid; gap: 4px; padding: 10px 8px; color: inherit; text-decoration: none; border-radius: var(--r-control); transition: background-color var(--t-button) var(--ease); }
.rc-title { font-weight: 600; display: flex; gap: 6px; align-items: center; }
.rc-who { display: flex; gap: 8px; align-items: center; font-size: 14.5px; color: var(--text-2); }
.rc-ok { display: flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--st-done); font-weight: 500; }
.sidecol .when { padding: 10px 0; }
.sidecol .whenitems { font-size: 14.5px; padding-top: 2px; }
.matters { display: grid; gap: 12px; }
.matters .you { font-weight: 600; color: var(--accent-ink); }

@media (max-width: 1100px) {
  .today-cols { grid-template-columns: minmax(0, 1fr); }
  .sidecol { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); display: grid; }
}

/* A narrower rail on a tablet. */
@media (max-width: 1000px) {
  :root { --rail-w: 188px; }
  .nav { padding: 0 20px; }
}

/* A phone (agent 49): the navigation is a tab bar along the bottom, never a wrapping row of pills,
   so the next step is on the first screen. */
@media (max-width: 760px) {
  :root { --top-h: 56px; }
  .nav { padding: 0 16px; flex-wrap: nowrap; }
  .shell { display: block; min-height: 0; background: none; }
  .shell > main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  .mainnav { position: fixed; z-index: 8; left: 0; right: 0; bottom: 0; top: auto; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding: 0 4px env(safe-area-inset-bottom, 0px); border-right: 0; border-top: 1px solid var(--divider); background: var(--surface-header); overflow: visible; display: block; box-shadow: var(--shadow-sticky); }
  .mainnav-in { display: contents; }
  .mainnav ul { display: flex; height: 100%; gap: 0; }
  .mainnav li { flex: 1; min-width: 0; }
  /* Item 46 polish: six tabs don't fit a phone ("Organisation", then "Handbooks", was cut short), so Questions,
     which sits under Today (v1.19.2), leaves a full tab bar. One home either way: Today → Questions. */
  .mainnav ul:has(> li:nth-child(6)) > li[data-under] { display: none; }
  .mainnav li.navgroup-start { margin: 0; padding: 0; border: 0; }
  .navgroup, .railtoggle { display: none; }
  .mainnav-top { display: contents; }
  .mainnav .navlink { flex-direction: column; justify-content: center; gap: 3px; height: 100%; padding: 6px 0; font-size: 13px; line-height: 1.15; text-align: center; }
  .mainnav .navlink:hover { background: transparent; }
  .mainnav .navlink[aria-current="page"] { background: transparent; box-shadow: inset 0 3px 0 var(--brand); }
  .nl-long { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .nl-short { display: block; }
  .nl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nbadge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 20px; height: 20px; padding: 0 5px; }
  .page { padding: 20px 16px 32px; gap: 20px; }
  .h1 { font-size: 26px; }
  /* The first screen holds the greeting, the thinking space and the top of the next step. */
  .today .phead .lead, .think .eyebrow, .think-lead { display: none; }
  .think { gap: 12px; }
  .think-title { font-size: 22px; }
  .askbox label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .askrow { align-items: center; gap: 8px; }
  .askrow textarea { min-height: 48px; }
  .askrow .btn { padding: 10px 14px; }
  .think-links { gap: 0 16px; }
  .think-links a { font-size: 14.5px; padding: 4px 0; }
  .think-privacy { margin-top: -4px; }
  /* The first screen at 390px, above the tab bar: the greeting, the composer and the whole next
     step, its primary action included (lead review of #73). */
  .today { gap: 16px; }
  .today .phead .eyebrow { display: none; }
  /* Design standard L6 (Chris, 22 Oct): the links wrap; nothing scrolls sideways. */
  .think-links a { white-space: nowrap; }
  .np { gap: 10px; }
  .sechead { margin-bottom: 8px; }
  .np-title { font-size: 20px; }
  .np-acts .btn-p { width: 100%; }
  .nrow { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px 4px; }
  .nrow .badge { grid-column: 2; grid-row: 2; justify-self: start; }
  .nrow-go { grid-column: 3; grid-row: 1 / span 2; }
  .nrow-act { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .toast { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); }
  /* One item (an admin's organisation page) is no tab bar: the page is all there is. */
  .mainnav[data-items="1"] { display: none; }
  .shell:has(.mainnav[data-items="1"]) > main { padding-bottom: 0; }
}

/* ---------------------------------------------------------------------------------------------
   One hover and focus treatment (agent 56, Chris 12 Oct): whatever opens something shows a soft
   fill and a small accent on its left, the "indent", so you always know which row you're on; the
   keyboard's focus looks the same (with the focus ring as well). Pointer only where it opens something.
   --------------------------------------------------------------------------------------------- */
:is(a.nrow, a.receipt, .navlink, .railtoggle, .side a, .whenlink, .rowlink, .rowlink > td, .rowlink > th) { transition: background-color var(--t-button) var(--ease), box-shadow var(--t-button) var(--ease), color var(--t-button) var(--ease); }
:is(a.nrow, a.receipt, .navlink:not([aria-current="page"]), .railtoggle, .side a, .whenlink):is(:hover, :focus-visible),
.rowlink:not(tr):is(:hover, :has(.rowlink-a:focus-visible)) { background: var(--hover-bg); box-shadow: inset 3px 0 0 var(--hover-accent); }
/* A whole row opens: one link on its main cell, its hit area stretched over the row; anything else
   you can press in the row keeps its own action, above it. */
.rowlink { position: relative; }
.rowlink-a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.rowlink :is(a, button, summary, input, select, textarea, label, form):not(.rowlink-a) { position: relative; z-index: 1; }
/* A table row: the fill on its cells, the indent on its first (on a phone each row is a card). */
@media (min-width: 681px) {
  tr.rowlink:is(:hover, :has(.rowlink-a:focus-visible)) > * { background: var(--hover-bg); }
  tr.rowlink:is(:hover, :has(.rowlink-a:focus-visible)) > :first-child { box-shadow: inset 3px 0 0 var(--hover-accent); }
}
@media (max-width: 680px) {
  tr.rowlink:is(:hover, :has(.rowlink-a:focus-visible)) { background: var(--hover-bg); box-shadow: inset 3px 0 0 var(--hover-accent); }
}
/* Rows in a well keep a little room for the indent. */
/* (Rows in a well: 10px either side, room for the indent; see .well .tm.) */
.when.rowlink { border-radius: var(--r-control); padding-inline: 8px; margin-inline: -8px; }
.when.rowlink .whenlink { margin: 0; padding: 0; }
.when.rowlink:is(:hover, :has(.rowlink-a:focus-visible)) .whenlink { background: none; box-shadow: none; }

/* ---------------------------------------------------------------------------------------------
   Loading (agent 56): a thin line under the top bar the moment a page is asked for, and, when it
   takes longer than half a second, the dfuse wordmark fading gently in and out in the content area
   until the page arrives. Still (no movement) with reduced motion. No calls of its own.
   --------------------------------------------------------------------------------------------- */
.navprogress { position: fixed; z-index: 9; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + var(--demo-bar-h, 0px) + var(--top-h)); height: 2px; pointer-events: none; overflow: hidden; }
.navprogress::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--brand); transform-origin: left; transform: scaleX(.12); animation: navgrow 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes navgrow { to { transform: scaleX(.9); } }
.loadmark { position: fixed; z-index: 6; top: calc(env(safe-area-inset-top, 0px) + var(--demo-bar-h, 0px) + var(--top-h)); bottom: 0; left: var(--rail-now, 0px); right: 0; display: grid; place-items: center; pointer-events: none; background: color-mix(in oklab, var(--surface-page) 72%, transparent); opacity: 0; animation: loadin 240ms var(--ease) 500ms forwards; }
/* dfuse's own logo (components/DfuseLogo, files from lib/dfuse-brand). */
.dfuse-logo { display: inline-block; line-height: 0; vertical-align: middle; }
.dfuse-logo img { display: block; max-width: 100%; }
.brand .t2 .dfuse-logo { vertical-align: -2px; }
.loadmark .dfuse-logo { animation: breathe 1.8s ease-in-out 500ms infinite; }
/* Already half a second in (components/NavProgress waited): fade in at once. */
.loadmark.now, .loadmark.now .dfuse-logo { animation-delay: 0s; }
@keyframes loadin { to { opacity: 1; } }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (max-width: 760px) {
  .loadmark { left: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  /* The phone's tab bar has no left indent: the current tab is marked along its top. */
  .mainnav .navlink:not([aria-current="page"]):is(:hover, :focus-visible) { background: transparent; box-shadow: none; color: var(--text); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .navprogress::before { transform: scaleX(.6); }
  .loadmark, .loadmark .dfuse-logo { opacity: 1; }
  .btn:hover, .btn:active { transform: none !important; }
}

/* Item 36: the one useful line under a name in Week ahead. */
.whenitems .whenline { display: block; color: var(--text-2); font-size: 13.5px; line-height: 1.35; }

/* Item 45 (LI4): the lead line. The substance leads, in ink, two lines at most, then "…more" in place;
   the kind of item is a small label after it. */
.leadline { display: grid; gap: 2px; min-width: 0; }
.leadline-row { display: block; min-width: 0; }
.leadline-text { color: var(--text); font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.leadline-text.is-strong { font-weight: 600; }
.leadline-text.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.leadline-more { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-size: 13.5px; color: var(--accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.leadline-more:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-control); }
.leadline-label { display: block; font-size: 13px; color: var(--text-muted); line-height: 1.35; }
.leadline-text:not(.is-strong) { font-weight: 400; }
.rowabout { margin-top: 2px; }
.rowabout .leadline-text { font-size: 14px; color: var(--text-2); }
.np-about { margin: 2px 0 4px; }

/* Item 69 (agent 136): the admin tab bar (accepted mock-up, 04-design/mockups/admin-screens). */
.admtabs ul { display: flex; gap: 4px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--divider); }
.admtabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 44px; font-weight: 600; color: var(--text-muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.admtabs a:hover { color: var(--text); }
.admtabs a[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--brand); }
.admtabs a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-control); }
.admtabs .count.zero { background: var(--st-done-bg); }
@media (max-width: 640px) { .admtabs a { padding: 8px 10px; } }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--st-hand); border: 1px solid var(--st-hand-bg); border-radius: var(--r-control); padding: 0 6px; margin-left: 8px; white-space: nowrap; vertical-align: 1px; }
.look-savebar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--divider); padding-top: 12px; margin-top: 8px; }

/* Item 71 (agent 136): the audit log, from -> to, set-up loads folded to a line a day, filter chips that apply when picked. */
.auditchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.auditchips .chip[aria-current="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.auditfrom { text-decoration: line-through; color: var(--text-muted); }
.auditto { font-weight: 700; }
.auditload > summary { padding: 12px 14px; cursor: pointer; }
.auditloadrows { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 6px; }
/* Item 68: while reviewing, the strip is pinned under the top bar, so a jump to an item stops below it. */
[data-reviewing] [id], [data-settings-review] [id], [data-casebook-review] [id] { scroll-margin-top: calc(var(--top-h, 64px) + var(--demo-bar-h, 0px) + 84px); }

/* Item 85: dfuse's offer, one line with its action beside it; on a phone the buttons wrap under the words. Layout only (item 82's .speaks owns the look). */
.offer { display: grid; gap: 6px; }
.offer-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.offer-text { margin: 0; flex: 1 1 320px; min-width: 0; }
.offer-from { font-weight: 600; color: var(--accent-ink); }
.offer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.offer-decide { display: flex; gap: 8px; align-items: center; }
.offer-kept { color: var(--text-muted); }
