/*
 * TAG Legal Desk v2: the glass desk (DESK_V2_BIBLE sections 2, 5 and 6).
 * Light is the default. Dark, Eucalypt, Harbour and High contrast redefine the tokens. Glass is for layers:
 * frosted (backdrop blur) only on floating chrome, still glass on cards, solid paper for every email body, solid red
 * for welfare. Only transform and opacity animate. No inline styles anywhere (the page CSP forbids them).
 */

/* ---------- fonts ---------- */
@font-face { font-family: "Desk Fallback"; src: local("Segoe UI"), local("Arial"); size-adjust: 104%; ascent-override: 92%; descent-override: 24%; }
/* Digits only, from a plain system face: the display face draws a slashed zero ("ZZT00031", "10:30"), which reads
   as technical. unicode-range limits this face to 0 to 9, so every letter stays in the brand face. */
@font-face { font-family: "Desk Digits"; src: local("Segoe UI Variable Text"), local("Segoe UI"), local("SegoeUI"), local("Helvetica Neue"), local("Roboto"), local("Arial"); unicode-range: U+0030-0039; }

/* ---------- tokens: Light (default) ---------- */
:root {
  color-scheme: light;
  --bg: #EEF1EC; --mesh-1: #D6E4D6; --mesh-2: #E6E0D2; --mesh-3: #D8E3EC;
  --glass-1: rgba(255,255,255,.66); --glass-2: rgba(255,255,255,.74); --glass-edge: rgba(255,255,255,.72); --glass-rim: rgba(27,27,27,.07); --glass-hi: rgba(255,255,255,.65); --glass-hover: rgba(255,255,255,.35);
  --solid: #FFFFFF; --solid-2: #F4F6F2;
  --ink: #1B1B1B; --ink-2: #474C46; --ink-3: #5E635C; --edge-strong: #7E847C;
  --brand: #233D26; --brand-hi: #2C4A30; --brand-ink: #FFFFFF; --brand-text: #233D26; --brand-soft: rgba(35,61,38,.10); --accent: #36703F;
  --focus: #1F5FD1; --ok: #2E6B3A; --warn: #8A5200; --danger: #B3261E; --info: #1D4F91; --tint-alpha: 12%;
  --practice: #1D4F91; --welfare-bg: #9B1C14; --welfare-ink: #FFFFFF; --welfare-rule: 0 0 0 0 transparent;
  --paper: #FFFFFF; --paper-ink: #000000;
  --p-gary: #0F766E; --p-gill: #6D28D9; --p-kana: #B42A6A; --p-jonty: #B45309; --p-steve: #1D4ED8; --p-ink: #FFFFFF;
  --ember: #B86A12;
  --shadow-1: 0 1px 2px rgba(16,24,16,.06), 0 8px 24px rgba(16,24,16,.06);
  --shadow-2: 0 12px 40px rgba(16,24,16,.14);
  --btn-shadow: 0 6px 16px rgba(35,61,38,.28);
  --scrim: rgba(12,16,13,.32);
  --logo-light: block; --logo-dark: none;
  --t-micro: 120ms; --t-small: 180ms; --t-card: 280ms; --t-move: 420ms;
  --ease-out: cubic-bezier(.2,.8,.2,1); --ease-pop: cubic-bezier(.34,1.4,.64,1); --ease-glide: cubic-bezier(.22,1,.36,1);
  --hdr-h: 60px; --band-h: 0px; --top: calc(var(--hdr-h) + var(--band-h));
  --r-chip: 10px; --r-btn: 14px; --r-card: 20px; --r-sheet: 28px;
  --font: "Desk Digits", "Atkinson Hyperlegible Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Desk Fallback", Arial, sans-serif;
}

/* ---------- Dark ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D110E; --mesh-1: #16291A; --mesh-2: #241F17; --mesh-3: #18202B;
  --glass-1: rgba(28,34,30,.70); --glass-2: rgba(23,28,25,.78); --glass-edge: rgba(255,255,255,.08); --glass-rim: rgba(0,0,0,.40); --glass-hi: rgba(255,255,255,.06); --glass-hover: rgba(255,255,255,.04);
  --solid: #1A1F1B; --solid-2: #222823;
  --ink: #EEF1EC; --ink-2: #B9C1B6; --ink-3: #9CA599; --edge-strong: #6F786D;
  --brand: #2F5A34; --brand-hi: #38683E; --brand-text: #9BD3A6; --brand-soft: rgba(155,211,166,.12); --accent: #9CCBA5;
  --focus: #8AB4F8; --ok: #7FD39A; --warn: #F0C36B; --danger: #FF8A80; --info: #9CC2F5; --tint-alpha: 14%;
  --practice: #9CC2F5; --welfare-rule: 0 0 0 2px #FF8A80;
  --p-gary: #2DD4BF; --p-gill: #B39DFA; --p-kana: #F472B6; --p-jonty: #FCD34D; --p-steve: #93C5FD; --p-ink: #111311;
  --ember: #F0A24B;
  --shadow-1: 0 1px 2px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.35);
  --shadow-2: 0 12px 40px rgba(0,0,0,.55);
  --btn-shadow: 0 6px 16px rgba(0,0,0,.45);
  --scrim: rgba(0,0,0,.55);
  --logo-light: none; --logo-dark: block;
}

/* ---------- Eucalypt (reward at Sapling) ---------- */
:root[data-theme="eucalypt"] {
  --bg: #E6EEE4; --mesh-1: #C9DCC8; --mesh-2: #DDE5D0; --mesh-3: #D3E2DA;
  --glass-1: rgba(255,255,255,.64); --glass-rim: rgba(28,35,30,.08); --glass-edge: rgba(255,255,255,.70);
  --solid: #FBFCF9; --solid-2: #EEF3EC;
  --ink: #1C231E; --ink-2: #44504A; --ink-3: #56625B; --edge-strong: #77867A;
  --brand-text: #2B4A33; --accent: #4E705C;
}

/* ---------- Harbour (reward at Tall Timber) ---------- */
:root[data-theme="harbour"] {
  --bg: #E8EEF4; --mesh-1: #CCDCEB; --mesh-2: #D2E6E2; --mesh-3: #DDE3EE;
  --glass-1: rgba(255,255,255,.64); --glass-rim: rgba(19,32,42,.08); --glass-edge: rgba(255,255,255,.70);
  --solid: #FFFFFF; --solid-2: #EFF3F7;
  --ink: #13202A; --ink-2: #40525F; --ink-3: #52636F; --edge-strong: #768896;
  --brand-text: #1D4E63; --brand-soft: rgba(29,78,99,.10); --accent: #1D4E63; --focus: #B4480F;
  --shadow-1: 0 1px 2px rgba(10,24,36,.06), 0 8px 24px rgba(10,24,36,.06);
  --shadow-2: 0 12px 40px rgba(10,24,36,.14);
  --scrim: rgba(10,20,30,.32);
}

/* ---------- High contrast ---------- */
:root[data-theme="high_contrast"] {
  --bg: #FFFFFF; --mesh-1: #FFFFFF; --mesh-2: #FFFFFF; --mesh-3: #FFFFFF;
  --glass-1: #FFFFFF; --glass-2: #FFFFFF; --glass-edge: #000000; --glass-rim: #000000; --glass-hi: transparent; --glass-hover: #F2F2F2;
  --solid: #FFFFFF; --solid-2: #F2F2F2;
  --ink: #000000; --ink-2: #1B1B1B; --ink-3: #1B1B1B; --edge-strong: #000000;
  --brand: #0B2A10; --brand-hi: #0B2A10; --brand-text: #0B2A10; --brand-soft: #E6E6E6; --accent: #0B2A10;
  --focus: #1A1AFF; --ok: #005A12; --warn: #6A4000; --danger: #9A0000; --info: #00367A; --tint-alpha: 0%;
  --practice: #00367A; --welfare-rule: 0 0 0 2px #000000;
  --p-gary: #005F58; --p-gill: #4B1CA8; --p-kana: #8E1450; --p-jonty: #7C2D12; --p-steve: #1E3A8A;
  --ember: #6A4000;
  --shadow-1: none; --shadow-2: none; --btn-shadow: none;
  --scrim: rgba(0,0,0,.6);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html[data-text="112"] { font-size: 112%; }
html[data-text="125"] { font-size: 125%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); font-family: var(--font); font-size: .9375rem; line-height: 1.53;
  background-color: var(--bg);
  background:
    radial-gradient(60vmax 60vmax at 8% 0%, var(--mesh-1) 0%, transparent 60%),
    radial-gradient(50vmax 50vmax at 100% 12%, var(--mesh-3) 0%, transparent 60%),
    radial-gradient(70vmax 70vmax at 85% 100%, var(--mesh-2) 0%, transparent 65%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
:root[data-theme="high_contrast"] body, :root[data-glass="reduced"] body { background: var(--bg); }
:root[data-theme="high_contrast"] body::before, :root[data-glass="reduced"] body::before { display: none; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-text); }
img { max-width: 100%; }
.ico { flex: none; display: block; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:root[data-theme="high_contrast"] :focus-visible { outline-width: 4px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
.sr-only { position: absolute !important; 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: 12px; top: -60px; z-index: 200; background: var(--solid); color: var(--ink); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-2); }
.skip:focus { top: 12px; }
.app { position: relative; z-index: 1; min-height: 100vh; }
.micro { font-size: .75rem; line-height: 1rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.meta { font-size: .8125rem; line-height: 1.1875rem; color: var(--ink-2); }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- glass layers ---------- */
.g1 { background: var(--glass-1); border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--glass-rim), var(--shadow-1); }
.g2 { background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--glass-rim), var(--shadow-2);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .g2 { background: var(--solid); } }
:root[data-glass="reduced"] .g1, :root[data-glass="reduced"] .g2 { background: var(--solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (prefers-reduced-transparency: reduce) { .g1, .g2 { background: var(--solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }
:root[data-theme="high_contrast"] .g1, :root[data-theme="high_contrast"] .g2 { border-width: 2px; border-color: #000; box-shadow: none; background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-btn); border: 1px solid transparent; font-weight: 600; font-size: .9375rem; line-height: 1; background: transparent; color: var(--ink); text-decoration: none; white-space: nowrap; transition: background-color var(--t-small) var(--ease-out), opacity var(--t-small); }
.btn-primary { background: linear-gradient(180deg, var(--brand-hi), var(--brand)); color: var(--brand-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), var(--btn-shadow); }
.btn-primary:hover { background: linear-gradient(180deg, var(--brand-hi), var(--brand-hi)); }
.btn-primary[disabled], .btn-primary[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-glass { background: var(--glass-1); border-color: var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--glass-rim); }
.btn-glass:hover { background: var(--glass-2); }
.btn-text { padding: 0 10px; color: var(--brand-text); }
.btn-text:hover { background: var(--brand-soft); }
.btn-lg { min-height: 56px; font-size: 1.0625rem; padding: 0 28px; border-radius: 16px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .8125rem; border-radius: 10px; }
.btn-icon { width: 44px; padding: 0; }
.btn-white { background: #fff; color: #7A1510; }
:root[data-theme="high_contrast"] .btn-primary { background: #0B2A10; border: 2px solid #000; }
:root[data-theme="high_contrast"] .btn-glass { border: 2px solid #000; }
.link { background: none; border: 0; padding: 0; color: var(--brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- switch ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; background: none; border: 0; padding: 0; font-weight: 600; font-size: .875rem; color: var(--ink-2); }
.switch .track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--edge-strong); flex: none; transition: background-color var(--t-small); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform var(--t-small) var(--ease-out); }
.switch[aria-checked="true"] .track { background: var(--brand); }
.switch[aria-checked="true"] .knob { transform: translateX(18px); }
:root[data-theme="dark"] .switch[aria-checked="true"] .track { background: #3F7A47; }
:root[data-theme="high_contrast"] .switch .track { border: 2px solid #000; }

/* ---------- avatars ---------- */
.av { --pc: var(--brand); position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pc); color: var(--p-ink); font-weight: 700; font-size: .75rem; flex: none; box-shadow: 0 0 0 2px var(--solid); }
.av-lg { width: 56px; height: 56px; font-size: 1.25rem; }
.av-sm { width: 24px; height: 24px; font-size: .625rem; }
.av .dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--solid); background: transparent; box-shadow: inset 0 0 0 2px var(--ok); }
.av .dot.in_job { background: var(--ok); box-shadow: none; }
.av .dot.home { background: var(--solid); box-shadow: inset 0 0 0 2px var(--ok); }
.av .dot.hidden { background: var(--info); box-shadow: none; }
.av .dot.away, .av .dot.offline { background: var(--edge-strong); box-shadow: none; opacity: .7; }
.av .leafb { position: absolute; left: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--solid); display: grid; place-items: center; color: var(--brand-text); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; height: var(--hdr-h); display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 12px; padding: 0 20px; border-radius: 0; border-width: 0 0 1px 0; }
.hdr-l, .hdr-r { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hdr-r { justify-content: flex-end; }
.logo { height: 26px; width: auto; display: var(--logo-light); }
.logo-d { height: 26px; width: auto; display: var(--logo-dark); }
.crew-dots { display: none; }
/* J140 (28 Sep 2026): the crew strip spread out, 40 px avatars with a 12 px gap (never overlapping), each a button that
   opens the person's trophy room. Away and offline people are blurred and see through, and clear on hover or focus so
   the name can be read. The "+N" button lists the people who do not fit beside the logo. */
.crew { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; min-width: 0; padding-left: 4px; }
.crew .av, .crew .av:first-child { margin-left: 0; }
/* The strip no longer overlaps, so the older gaps for framed avatars and effects (v21_artlib.css, v21_colours_fx.css)
   would only make the spacing uneven: the 12 px gap is the only space. */
#crew-slot .crew .av { margin-left: 0; }
.av-40 { width: 40px; height: 40px; font-size: .875rem; }
.av-40 .dot { width: 12px; height: 12px; }
.crew-i { display: inline-flex; flex: none; }
.crew-b { display: inline-grid; place-items: center; padding: 0; margin: 0; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: inherit; font: inherit; }
.crew-b:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.crew .av.crew-offline, .menu .av.crew-offline { filter: blur(1.5px) grayscale(.4); opacity: .45; }
.crew .av.crew-away, .menu .av.crew-away { filter: blur(.8px) grayscale(.2); opacity: .65; }
.crew .av.crew-offline, .crew .av.crew-away { transition: filter var(--t-small, 160ms) ease, opacity var(--t-small, 160ms) ease; }
.crew .av.crew-offline:hover, .crew .av.crew-away:hover, .crew-b:hover > .av, .crew-b:focus-visible > .av { filter: none; opacity: 1; }
.menu button:hover > .av, .menu button:focus-visible > .av { filter: none; opacity: 1; }
.crew-more { flex: none; min-width: 44px; height: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--glass-edge); background: var(--glass-1); color: var(--ink); font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer; }
.crew-more:hover { background: var(--glass-hover); }
.crew-more:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:root[data-theme="high_contrast"] .crew-more { border: 2px solid #000; background: #fff; color: #000; }
:root[data-theme="high_contrast"] .crew .av.crew-offline, :root[data-theme="high_contrast"] .crew .av.crew-away { filter: grayscale(1); opacity: .6; }
@media (forced-colors: active) { .crew .av.crew-offline, .crew .av.crew-away { filter: none; opacity: .6; } }
.count { display: flex; align-items: baseline; gap: 8px; font-size: 1.75rem; line-height: 2rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.count .lbl { font-size: 1rem; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.count.zero { color: var(--brand-text); }
.count .num { display: inline-block; min-width: 1ch; text-align: right; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: var(--ink-2); background: var(--glass-1); border: 1px solid var(--glass-edge); box-shadow: 0 0 0 1px var(--glass-rim); white-space: nowrap; }
.pill b { color: var(--ink); font-weight: 700; }
.pill .plus { color: var(--ink-3); }
.ember { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px; border-radius: 999px; background: transparent; border: 1px solid transparent; font-weight: 700; color: var(--ink); }
.ember:hover, .pill:hover { background: var(--glass-2); }
.ember .ico { color: var(--ember); }
.you { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--glass-1); border: 1px solid var(--glass-edge); box-shadow: 0 0 0 1px var(--glass-rim); font-weight: 700; }
.you:hover { background: var(--glass-2); }
.you .pts { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; }
.you .pts .ico { color: var(--ember); }
.you .pts .pts-coin { flex: none; display: block; width: 14px; height: 14px; }
.you .pts .pts-today { margin-left: 2px; font-size: .75rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ringwrap { position: relative; width: 38px; height: 38px; display: grid; place-items: center; flex: none; }
.ringwrap svg.rk { position: absolute; inset: 0; transform: rotate(-90deg); }
.ringwrap .rk-track { stroke: var(--brand-soft); }
.ringwrap .rk-fill { stroke: var(--brand-text); }
.hchip { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--warn); padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--warn) var(--tint-alpha), transparent); }

/* ---------- practice band ---------- */
.pband { position: sticky; top: var(--hdr-h); z-index: 49; height: 28px; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--practice);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--practice) 14%, var(--bg)) 0 8px, color-mix(in srgb, var(--practice) 6%, var(--bg)) 8px 16px); border-bottom: 1px solid color-mix(in srgb, var(--practice) 30%, transparent); }
.pband .btn { min-height: 24px; height: 24px; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--practice); padding: 0 10px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--practice) 40%, transparent); background: var(--solid); }
.pband .btn:hover { background: var(--solid-2); }

/* ---------- bands (offline, while nobody was here) ---------- */
.bands { position: relative; z-index: 20; display: grid; gap: 10px; width: min(820px, calc(100% - 32px)); margin: 12px auto 0; }
.band { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; font-weight: 600; }
.band .grow { flex: 1; min-width: 0; }
.band-info { background: var(--solid); border: 1px solid var(--glass-rim); box-shadow: var(--shadow-1); }
.band-warn { background: var(--solid); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); color: var(--ink); box-shadow: inset 4px 0 0 var(--warn), var(--shadow-1); }
.band-welfare, .wf-band { background: var(--welfare-bg); color: var(--welfare-ink); box-shadow: var(--welfare-rule); border-radius: 16px; }

/* ---------- board ---------- */
.board-wrap { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; gap: 32px; padding: 20px 16px 120px; transition: opacity var(--t-card) var(--ease-out), transform var(--t-card) var(--ease-out); transform-origin: 50% 0; }
body.job-open .board-wrap { opacity: .4; transform: scale(.985); }
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 4px 16px; }
.board-head h1 { margin: 0; font-size: 1.375rem; line-height: 1.75rem; font-weight: 700; letter-spacing: -.01em; }
.board-head .sub { margin: 2px 0 0; color: var(--ink-2); font-size: .875rem; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cards > li { display: block; min-width: 0; }
.newpill { position: sticky; top: calc(var(--top) + 10px); z-index: 5; display: flex; justify-content: center; margin-bottom: 8px; }
.newpill .btn { box-shadow: var(--shadow-2); }

.card { position: relative; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 14px; min-height: 92px; padding: 16px 20px; border-radius: var(--r-card); cursor: pointer; contain: layout paint; text-align: left; width: 100%; color: inherit; font: inherit; transition: transform var(--t-small) var(--ease-out); }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--glass-hover); opacity: 0; transition: opacity var(--t-small) var(--ease-out); pointer-events: none; }
.card:hover::before { opacity: 1; }
.card:hover { transform: translateY(-2px); }
.card-hit { position: absolute; inset: 0; z-index: 1; border: 0; margin: 0; padding: 0; background: transparent; border-radius: inherit; cursor: pointer; }
.card-hit[aria-disabled="true"] { cursor: default; }
.card-hit:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.card > .glyph, .card > .body, .card > .side { position: relative; z-index: 0; pointer-events: none; }
.card > .body { min-width: 0; }
.card .glyph { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.card .l1 { font-size: 1.0625rem; line-height: 1.5rem; font-weight: 600; }
.card .l2 { font-size: .8125rem; line-height: 1.1875rem; color: var(--ink-2); margin-top: 2px; }
.card .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.card .prep { font-size: .75rem; font-weight: 600; color: var(--ink-2); padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); white-space: nowrap; }
.card .time { font-size: .8125rem; color: var(--ink-3); }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: var(--info); background: color-mix(in srgb, var(--info) var(--tint-alpha), transparent); }
.tag.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) var(--tint-alpha), transparent); }
.tag.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) var(--tint-alpha), transparent); }
.tag.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) var(--tint-alpha), transparent); }
:root[data-theme="high_contrast"] .tag { border: 2px solid currentColor; }
.card.closer { box-shadow: inset 3px 0 0 var(--warn), inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--glass-rim), var(--shadow-1); }
.card.is-held, .card.is-sending, .card.is-away { cursor: default; }
.card.is-held:hover, .card.is-sending:hover, .card.is-away:hover { transform: none; }
.card .frost { position: absolute; inset: 0; border-radius: inherit; background: var(--glass-2); opacity: 0; pointer-events: none; transition: opacity var(--t-small); }
.card.is-held .frost, .card.is-sending .frost, .card.is-away .frost { opacity: .55; }
.card .holder { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 2; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--solid); box-shadow: var(--shadow-1); font-size: .8125rem; font-weight: 700; }
.card .holder .amb { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.card .holder .btn { min-height: 32px; }
.card.is-held .side, .card.is-sending .side, .card.is-away .side { visibility: hidden; }
/* J283: a job still being worked on by the brain (shown only with its Show switch on): greyed, locked, nothing to press */
.card.is-still { cursor: default; filter: grayscale(1); opacity: .6; }
.card.is-still:hover { transform: none; }
.card.is-still:hover::before { opacity: 0; }
.card.is-still .frost { opacity: .55; }
.card.is-still .glyph { background: var(--glass-2); color: var(--ink-3); }
.card .still-line { margin-top: 6px; font-size: .8125rem; line-height: 1.1875rem; font-weight: 600; color: var(--ink-2); }
:root[data-theme="high_contrast"] .card.is-still { opacity: 1; }
/* J288 with J285: the Director or the GM can open a card that is not good to go yet on purpose */
.card.is-still.is-still-lead { cursor: pointer; }
/* J288 with J285: the waitLine as a heads up at the top of a job the Director or the GM has open */
.job-scroll .still-head { display: flex; gap: 6px; align-items: center; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-card); background: var(--glass-2); color: var(--warn); font-weight: 700; font-size: .875rem; }

#coach { margin-bottom: 12px; }
#incoming { margin: 0 4px 10px; display: flex; align-items: center; gap: 6px; }
/* the welfare band on the board (solid, never animated) */
.wf-band { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 12px; font-weight: 700; }
.wf-band .grow { flex: 1; min-width: 0; font-size: 1rem; }
.wf-band .grow small { display: block; font-weight: 600; opacity: .92; font-size: .8125rem; }
.wf-band .btn { flex: none; }
.wf-band.taken { background: var(--solid); color: var(--ink); box-shadow: inset 4px 0 0 var(--welfare-bg), var(--shadow-1); min-height: 48px; padding: 10px 16px; }
.wf-drill { font-size: .6875rem; letter-spacing: .08em; background: #fff; color: #7A1510; padding: 2px 8px; border-radius: 6px; margin-right: 8px; }

/* the Clear state */
.clear { position: relative; overflow: hidden; display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 24px 48px; border-radius: var(--r-sheet); }
.clear .mark { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); margin-bottom: 6px; }
.clear h2 { margin: 0; font-size: 2.5rem; line-height: 2.75rem; font-weight: 700; letter-spacing: -.02em; }
.clear p { margin: 0; max-width: 460px; color: var(--ink-2); }
.clear .sweep { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-110%); opacity: 0; }
:root[data-theme="dark"] .clear .sweep { background: linear-gradient(100deg, transparent 30%, rgba(155,211,166,.18) 50%, transparent 70%); }

/* skeleton */
.skel { height: 92px; border-radius: var(--r-card); }
.skel i { display: block; height: 12px; border-radius: 6px; background: var(--brand-soft); margin: 28px 20px 0 74px; width: 50%; }
.skel i + i { margin-top: 10px; width: 30%; }
/* J288 (faster opening): the frame's one line, "Opening", then "Still opening" after about 3 seconds */
.job-top .skel-note { margin: 2px 0 0; font-size: .8125rem; font-weight: 600; color: var(--ink-3); }

/* the Today rail (L only) */
.rail { display: none; }
.rail-card { padding: 20px; border-radius: var(--r-card); display: grid; gap: 14px; position: sticky; top: calc(var(--top) + 20px); }
.rail-card h2 { margin: 0; font-size: 1rem; }
.rail-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rail-row .n { font-size: 1.5rem; font-weight: 700; }
.rail-sep { height: 1px; background: var(--glass-rim); }
.bar { height: 8px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--brand-text); border-radius: inherit; transform-origin: 0 50%; }

/* ---------- the job ---------- */
.job-layer { position: fixed; left: 0; right: 0; bottom: 0; top: var(--top); z-index: 30; padding: 12px; display: flex; justify-content: center; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); }
.job-panel { position: relative; width: 100%; max-width: 1280px; height: 100%; display: flex; flex-direction: column; border-radius: var(--r-sheet); overflow: hidden; }
.job-bg { position: absolute; inset: 0; border-radius: inherit; background-color: var(--bg);
  background: radial-gradient(60vmax 60vmax at 8% 0%, var(--mesh-1) 0%, transparent 60%), radial-gradient(70vmax 70vmax at 85% 100%, var(--mesh-2) 0%, transparent 65%), var(--bg);
  border: 1px solid var(--glass-edge); box-shadow: 0 0 0 1px var(--glass-rim), var(--shadow-2); transform-origin: 0 0; }
:root[data-theme="high_contrast"] .job-bg { background: #fff; border: 2px solid #000; }
.job-top { position: relative; z-index: 3; flex: none; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-width: 0 0 1px 0; border-radius: 0; }
.job-top .who { min-width: 0; flex: 1; }
.job-top h1 { margin: 0; font-size: 1.25rem; line-height: 1.625rem; font-weight: 600; letter-spacing: -.01em; }
.job-top .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.job-top .also { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ink-2); }
.job-scroll { position: relative; z-index: 2; flex: 1; overflow: auto; overscroll-behavior: contain; padding: 16px; scroll-padding-top: 12px; }
.job-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; max-width: 1160px; margin: 0 auto; }
.job-grid > * { min-width: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; transition: opacity var(--t-small) var(--ease-out); position: relative; }
.stack.working { opacity: .45; }
.job-bar { position: relative; z-index: 3; flex: none; min-height: 76px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-width: 1px 0 0 0; border-radius: 0; }
.job-bar .sum { flex: 1; min-width: 0; }
.job-bar .sum .why-blocked { color: var(--warn); font-weight: 700; font-size: .875rem; display: flex; gap: 6px; align-items: center; }
.job-bar .sum .counts { color: var(--ink-2); font-size: .875rem; }
.job-bar .btn-lg { min-width: 280px; }
.job-bar .btn-lg .ringspin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sec { padding: 20px; border-radius: var(--r-card); }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 4px 0; }
.sec-h h2 { margin: 0; font-size: .75rem; line-height: 1rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.happened { font-size: 1.0625rem; line-height: 1.5rem; font-weight: 600; margin: 0; }
.closer-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: .875rem; color: var(--ink); background: color-mix(in srgb, var(--warn) var(--tint-alpha), transparent); box-shadow: inset 3px 0 0 var(--warn); }
.closer-line .ico { color: var(--warn); margin-top: 2px; }
/* J227: Take a closer look as a short list (closerLookPoints): each thing to check, and why it matters under it. */
.closer-look { margin-top: 12px; padding: 12px 14px 14px; border-radius: 12px; color: var(--ink); background: color-mix(in srgb, var(--warn) var(--tint-alpha), transparent); box-shadow: inset 3px 0 0 var(--warn); min-width: 0; }
.closer-look .clk-h { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; font-size: .875rem; line-height: 1.25rem; color: var(--ink); }
.closer-look .clk-h .ico { color: var(--warn); flex: none; }
.closer-look .clk-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.closer-look .clk-list > li { position: relative; display: grid; gap: 3px; padding-left: 24px; min-width: 0; }
.closer-look .clk-list > li::before { content: ""; position: absolute; left: 6px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.closer-look .clk-what { margin: 0; font-weight: 600; font-size: .9375rem; line-height: 1.375rem; color: var(--ink); overflow-wrap: anywhere; }
.closer-look .clk-why { margin: 0; font-size: .875rem; line-height: 1.3125rem; color: var(--ink-2); overflow-wrap: anywhere; }
.closer-look .clk-k { font-weight: 700; color: var(--ink); }
/* J256 (30 Sep 2026): Take a closer look is a native details, folded every time the job opens: its one line
   "Take a closer look (3)" is the summary, the whole row presses, and the chevron turns when it opens. */
details.closer-look { padding: 0; }
details.closer-look > summary.clk-h { list-style: none; cursor: pointer; min-height: 40px; padding: 8px 12px 8px 14px; border-radius: 12px; }
details.closer-look > summary::-webkit-details-marker { display: none; }
details.closer-look > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
details.closer-look > summary .clk-t { flex: 1 1 auto; min-width: 0; }
details.closer-look > summary > .ico:last-child { margin-left: auto; color: var(--ink-2); transition: transform var(--t-small) var(--ease-out); }
details.closer-look[open] > summary > .ico:last-child { transform: rotate(180deg); }
details.closer-look .clk-list { margin: 2px 0 0; padding: 0 14px 14px; }
@media (prefers-reduced-motion: reduce) { details.closer-look > summary > .ico:last-child { transition: none; } }
:root[data-calm="on"] details.closer-look > summary > .ico:last-child { transition: none; }
@media print { details.closer-look > summary > .ico:last-child { display: none; } }
:root[data-theme="high_contrast"] .closer-look { border: 2px solid #000; background: #fff; box-shadow: inset 4px 0 0 #000; }
:root[data-theme="high_contrast"] .closer-look .clk-list > li::before { background: #000; }
@media (forced-colors: active) {
  .closer-look { border: 1px solid CanvasText; }
  .closer-look .clk-list > li::before { forced-color-adjust: none; background: CanvasText; }
}

/* Why (native details) */
details.why { margin-top: 12px; }
details.why > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 10px; border-radius: 10px; font-weight: 700; font-size: .875rem; color: var(--brand-text); cursor: pointer; background: var(--brand-soft); }
details.why > summary::-webkit-details-marker { display: none; }
details.why > summary .ico { transition: transform var(--t-small) var(--ease-out); }
details.why[open] > summary .ico { transform: rotate(180deg); }
details.why .why-body { padding: 14px 4px 2px; display: grid; gap: 12px; font-size: .9375rem; line-height: 1.45rem; }
details.why .why-body h3 { margin: 0 0 2px; font-size: .8125rem; font-weight: 700; color: var(--ink); }
details.why .why-body p { margin: 0; color: var(--ink-2); }
details.why .srcs { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8125rem; color: var(--ink-3); }
details.why .review { padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); font-size: .875rem; }
details.why .review b { color: var(--ink); }
details.why.small > summary { background: transparent; padding-left: 4px; min-height: 32px; font-size: .8125rem; }

/* pick, failed, join */
.pick-q { font-weight: 700; font-size: 1rem; margin: 0 0 12px; }
.pick-opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pick-opt { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; min-height: 64px; }
.pick-opt b { font-size: 1rem; }
.pick-opt:hover { background: var(--glass-2); }
.failed-list { display: grid; gap: 4px; margin: 10px 0 0; font-size: .875rem; }
.failed-list .row { display: flex; gap: 8px; align-items: center; }
.failed-list .ok { color: var(--ok); }
.failed-list .no { color: var(--danger); }
.join { max-width: 1160px; margin: 0 auto 16px; position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--solid); box-shadow: inset 4px 0 0 var(--warn), var(--shadow-2); font-weight: 600; }
.join .grow { flex: 1; min-width: 0; }
.join .ico { color: var(--warn); }
.dimmed { opacity: .5; pointer-events: none; }

/* What came in */
.came { padding: 16px; border-radius: var(--r-card); display: grid; gap: 10px; align-content: start; }
.came-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.came-tab { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: .8125rem; font-weight: 700; background: var(--glass-1); border: 1px solid var(--glass-edge); color: var(--ink-2); }
.came-tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.came-from { display: grid; gap: 2px; }
.came-from b { font-size: .9375rem; }
.came-subj { font-weight: 700; }
.came-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: .9375rem; line-height: 1.45rem; }
.came-text.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.came-extra { display: grid; gap: 12px; align-content: start; }
.came-extra details.why { margin-top: 0; }
.quoted { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .875rem; line-height: 1.4rem; color: var(--ink-2); border-left: 3px solid var(--glass-rim); padding: 2px 0 2px 12px; margin: 10px 0 4px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.file { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; max-width: 100%; padding: 0 10px; border-radius: var(--r-chip); font-size: .8125rem; font-weight: 600; }
.file .x { display: grid; place-items: center; width: 28px; height: 28px; margin-right: -6px; border-radius: 8px; border: 0; background: none; color: var(--ink-3); }
.file .x:hover { background: var(--brand-soft); color: var(--ink); }
/* DESK_FILES_CONTRACT: Download on each pill and in each preview, container part lines, media */
.file .dl { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; color: var(--ink-3); }
.file .dl:hover { background: var(--brand-soft); color: var(--ink); }
.dl-row { margin: 0 0 10px; }
.dl-btn { display: inline-flex; align-items: center; gap: 6px; }
.preview-text .part-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.preview-img { max-width: 100%; height: auto; }
.preview-media { display: block; width: 100%; max-width: 100%; }
/* The preview's own size (it had none), and Expand: the panel widens to the whole desk */
.preview-frame { display: block; width: 100%; height: 70vh; min-height: 360px; border: 0; border-radius: 12px; background: var(--paper); }
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet.sheet-expanded { width: 100%; border-radius: 0; }
.sheet.sheet-expanded .preview-frame { height: calc(100vh - 150px); }
.sheet.sheet-expanded .preview-img { width: 100%; }
/* Email text as paragraphs, the footer folded, Read in full (the Director, 28 Sep 2026) */
.mail-body { white-space: normal; }
.mail-body .mail-p { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-body .mail-p:last-child { margin-bottom: 0; }
.mail-footer { margin-top: 8px; font-size: .8125rem; color: var(--ink-3); }
.mail-footer summary { cursor: pointer; font-weight: 600; }
.mail-footer .mail-p { margin-top: 6px; }
.read-full { display: grid; gap: 12px; }
.read-full .preview-text { max-width: 820px; }

/* email cards */
.email { padding: 16px; border-radius: var(--r-card); display: grid; gap: 12px; position: relative; }
.email-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.email-h .t { flex: 1; min-width: 0; }
.email-h .role { font-size: 1rem; font-weight: 700; }
.email-h .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.email.off .email-body-wrap { opacity: .5; }
.email .offnote { font-weight: 700; color: var(--ink-3); font-size: .8125rem; }
.rcpts { display: grid; gap: 6px; font-size: .875rem; }
.rcpt { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rcpt .k { width: 56px; color: var(--ink-3); font-weight: 700; font-size: .75rem; flex: none; }
.rcpt .ico { color: var(--ink-3); }
.rcpt .nm { font-weight: 700; flex: none; max-width: 45%; }
.rcpt .ad { color: var(--ink-2); }
/* t22-fromline: the note under the From row (J308's, or why the email goes from admin@), lined up with the name */
.rcpt-note { color: var(--ink-3); font-size: .75rem; line-height: 1.35; padding-left: 64px; overflow-wrap: anywhere; }
.subj { display: flex; align-items: center; gap: 8px; }
.subj .k { width: 56px; color: var(--ink-3); font-weight: 700; font-size: .75rem; flex: none; }
.subj input { flex: 1; min-width: 0; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; font-weight: 700; font-size: .9375rem; }
.subj input:hover { border-color: var(--glass-rim); background: var(--glass-1); }
.subj input:focus-visible { background: var(--solid); border-color: var(--edge-strong); outline-offset: 0; }
.email-body-wrap { display: grid; gap: 12px; transition: opacity var(--t-small); }
.carry { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 700; color: var(--info); padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--info) var(--tint-alpha), transparent); justify-self: start; }

/* paper: exactly what the recipient gets, Arial 10pt, black on white, every theme */
.paper { background: var(--paper); color: var(--paper-ink); font: 10pt/1.45 Arial, Helvetica, sans-serif; border-radius: 12px; padding: 20px 24px; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06); overflow-wrap: anywhere; }
:root[data-theme="dark"] .paper { box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.4); }
.paper .blk { position: relative; margin: 0 0 10pt; min-height: 1.45em; border-radius: 4px; outline-offset: 3px; white-space: pre-wrap; }
.paper div.blk:last-of-type { margin-bottom: 0; }
.paper [contenteditable] { cursor: text; }
.paper [contenteditable]:hover { background: #F4F7F2; box-shadow: 0 0 0 3px #F4F7F2; }
.paper [contenteditable]:focus-visible { outline: 2px solid #1F5FD1; background: #fff; box-shadow: none; }
.paper .blk-h { font-weight: bold; }
.paper ul, .paper ol { margin: 0 0 10pt; padding-left: 22px; }
.paper li { margin: 0 0 3pt; white-space: pre-wrap; }
.paper .facts { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 3pt 12px; margin: 0 0 10pt; }
.paper .facts dt { font-weight: bold; }
.paper .facts dt::after { content: ":"; }
.paper .facts dd { margin: 0; }
.paper .blk-quote { border-left: 3px solid #C8CFC6; padding-left: 10px; color: #333; }
.paper .blk-fixed { background: #EFF1EE; box-shadow: 0 0 0 4px #EFF1EE; cursor: not-allowed; }
.paper .blk-fixed::after { content: "Fixed wording"; display: block; font: 600 8pt/1.2 Arial, sans-serif; color: #555; margin-top: 3px; }
.paper .sig { margin-top: 14pt; display: block; width: 100%; max-width: 440px; height: auto; }
.paper .glow::before { content: ""; position: absolute; inset: -3px -6px; border-radius: 6px; background: rgba(240,195,107,.45); opacity: 0; pointer-events: none; }
.paper .glow.go::before { animation: glow 2s linear forwards; }
@keyframes glow { 0% { opacity: 1; } 100% { opacity: 0; } }

.feedback { display: flex; align-items: flex-start; gap: 8px; font-size: .875rem; font-weight: 600; min-height: 24px; }
.feedback.ok { color: var(--ok); }
.feedback.heads { color: var(--warn); }
.feedback.stop { color: var(--danger); }
.feedback .items { display: grid; gap: 6px; flex: 1; }
.feedback .item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--ink); }
.feedback .item .lbl { font-weight: 700; }
.feedback.heads .item .lbl { color: var(--warn); }
.feedback.stop .item .lbl { color: var(--danger); }
.feedback .ico { margin-top: 2px; }
.etag { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: var(--info); background: color-mix(in srgb, var(--info) var(--tint-alpha), transparent); }

/* Also done: chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; max-width: 100%; padding: 0 12px; border-radius: var(--r-chip); font-size: .8125rem; font-weight: 600; color: var(--ink); text-align: left; }
.chip .ico { color: var(--brand-text); }
.chip.skipped { opacity: .55; }
.chip.skipped .lbl { text-decoration: line-through; }
.chip .sk { font-weight: 700; color: var(--ink-3); }
.chip.is-off { color: var(--ink-2); border-style: dashed; }
.chip.is-off .ico { color: var(--ink-3); }
.chip:hover { background: var(--glass-2); }

/* Tell Fred */
.ask { padding: 16px; border-radius: var(--r-card); display: grid; gap: 10px; position: relative; overflow: hidden; }
.ask label { font-weight: 700; font-size: .9375rem; display: flex; align-items: center; gap: 8px; }
.ask label .ico { color: var(--brand-text); }
.ask textarea { width: 100%; min-height: 48px; max-height: 136px; resize: none; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--glass-rim); background: var(--solid); color: var(--ink); line-height: 1.4; overflow-y: auto; }
.ask textarea:focus-visible { outline-offset: 0; border-color: var(--edge-strong); }
.ask .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stages { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8125rem; color: var(--ink-3); font-weight: 600; }
.stages span { display: inline-flex; align-items: center; gap: 6px; }
.stages span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--glass-rim); }
.stages span.now { color: var(--ink); }
.stages span.now::before { background: var(--brand-text); }
.stages span.done { color: var(--ok); }
.stages span.done::before { background: var(--ok); }
.workband { position: absolute; left: 0; right: 0; top: 0; height: 3px; overflow: hidden; border-radius: 3px; z-index: 4; pointer-events: none; }
.workband i { position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--brand-text), transparent); transform: translateX(-100%); }
.changed { padding: 14px 16px; border-radius: 16px; background: var(--solid); box-shadow: inset 4px 0 0 var(--info), var(--shadow-1); display: grid; gap: 6px; }
.changed h3 { margin: 0; font-size: .875rem; }
.changed ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .875rem; }
.changed .why2 { color: var(--ink-3); }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.signin-panel { width: min(520px, 100%); padding: 32px 28px; border-radius: var(--r-sheet); display: grid; gap: 18px; justify-items: center; text-align: center; }
.signin-panel .biglogo { width: 220px; max-width: 70%; }
.signin-panel h1 { margin: 6px 0 0; font-size: 1.75rem; line-height: 2.125rem; letter-spacing: -.01em; }
.signin-panel .line { margin: 0; color: var(--ink-2); max-width: 380px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 144px)); gap: 12px; justify-content: center; width: 100%; }
.tile { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 128px; padding: 12px 8px; border-radius: var(--r-card); font-weight: 700; font-size: 1rem; }
.tile:hover { background: var(--glass-2); }
.tile .here { font-size: .75rem; font-weight: 600; color: var(--ok); display: inline-flex; align-items: center; gap: 4px; }
.tile .here::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
/* J85: the Unavailable sticker on a sign in tile (config.js unavailable) */
.tile.away { position: relative; }
.tile.away > :not(.away-sticker) { opacity: .75; }
.tile .away-sticker { position: absolute; top: 10px; right: -4px; transform: rotate(8deg); padding: 3px 10px; border-radius: 6px; background: var(--warn); color: var(--solid); font-size: .75rem; font-weight: 700; letter-spacing: .02em; box-shadow: var(--shadow-1); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .tile .away-sticker { transform: none; } }
.pad-wrap { display: grid; gap: 16px; justify-items: center; width: 100%; }
.pad-wrap .prompt { font-size: 1.0625rem; font-weight: 700; margin: 0; }
.dots { display: flex; gap: 14px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--edge-strong); }
.dots i.on { background: var(--brand-text); border-color: var(--brand-text); }
.pad { display: grid; grid-template-columns: repeat(3, 64px); gap: 12px; }
.key { width: 64px; height: 64px; border-radius: 50%; font-size: 1.375rem; font-weight: 700; display: grid; place-items: center; }
.key:hover { background: var(--glass-2); }
.pad-msg { min-height: 1.5em; margin: 0; font-weight: 600; color: var(--ink-2); }
.pad-msg.bad { color: var(--danger); }
.pad:focus { outline: none; }
.pad:focus-visible { outline: 2px solid var(--focus, var(--brand-text)); outline-offset: 6px; border-radius: 14px; }
.pad-help { margin: 0; text-align: center; max-width: 30ch; }
.cl-item .cl-later { justify-self: start; margin-top: 6px; }
.first { display: grid; gap: 12px; text-align: left; width: 100%; }
.first h2 { margin: 0; font-size: 1.5rem; }
.first ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.first .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- sheets, popovers, toasts ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 80; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 81; display: flex; flex-direction: column; border-radius: var(--r-sheet) 0 0 var(--r-sheet); }
.sheet-h { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 24px; }
.sheet-h h2 { margin: 0; flex: 1; font-size: 1.25rem; }
.sheet-b { flex: 1; overflow: auto; padding: 4px 24px 32px; display: grid; gap: 18px; align-content: start; }
.pop { position: fixed; z-index: 90; width: min(360px, calc(100vw - 24px)); padding: 16px; border-radius: 16px; display: grid; gap: 10px; }
.pop h3 { margin: 0; font-size: 1rem; }
.pop p { margin: 0; color: var(--ink-2); font-size: .9375rem; }
.pop .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.pop input[type="text"] { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--edge-strong); background: var(--solid); }
.pop form.reason { display: grid; gap: 0; }
.pop .reason-h { display: block; font-size: 1rem; font-weight: 700; margin: 0 0 12px; }
.pop .reason-err { margin: 6px 0 0; min-height: 0; font-size: .8125rem; font-weight: 700; color: var(--danger); }
.pop .reason-err:empty { display: none; }
.pop form.reason .row { margin-top: 12px; }
.pop input[aria-invalid="true"] { border-color: var(--danger); }
/* J285: Why did you change it? (js/job.js whyAsk), wider than a one line reason, with a roomy box. */
.pop.why-pop { width: min(520px, calc(100vw - 24px)); }
.pop .why-reason .why-what { margin: 0 0 12px; }
.pop .why-reason .why-l { display: block; font-size: .875rem; font-weight: 600; margin: 0 0 6px; }
.pop .why-reason textarea { width: 100%; min-height: 140px; resize: vertical; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--edge-strong); background: var(--solid); font: inherit; color: var(--ink); }
.pop .why-reason textarea[aria-invalid="true"] { border-color: var(--danger); }
.menu { display: grid; gap: 2px; padding: 8px; width: 260px; }
.menu button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 10px; font-weight: 600; text-align: left; color: var(--ink); }
.menu button:hover, .menu button:focus-visible { background: var(--brand-soft); }
.menu .ico { color: var(--ink-3); }
.menu hr { border: 0; height: 1px; background: var(--glass-rim); margin: 4px 6px; }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 95; display: grid; gap: 10px; width: min(560px, calc(100% - 32px)); pointer-events: none; }
body.job-open .toasts { bottom: 96px; }
.toast { pointer-events: auto; display: grid; gap: 10px; padding: 14px 16px; border-radius: 18px; }
.toast .row { display: flex; align-items: center; gap: 12px; }
.toast .msg { flex: 1; min-width: 0; font-weight: 600; }
.toast .steps { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.toast .step { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; color: var(--ink-3); padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); }
.toast .step .ico { opacity: 0; transition: opacity var(--t-small); }
.toast .step.done { color: var(--ok); }
.toast .step.done .ico { opacity: 1; }
.toast .step.carry { color: var(--info); }
/* While a job is open, the last job's progress shrinks to a small pill in the corner, above the Send bar. */
body.job-open .toasts { left: auto; right: 16px; transform: none; justify-items: end; }
body.job-open .toast.progress { padding: 8px 10px 8px 14px; border-radius: 999px; gap: 0; max-width: 360px; }
body.job-open .toast.progress .steps { display: none; }
body.job-open .toast.progress .msg { font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.job-open .toast.progress .row > .ico { width: 16px; height: 16px; }
@media (max-width: 599px) { body.job-open .toasts { right: 12px; left: 12px; justify-items: stretch; } body.job-open .toast.progress { max-width: none; } }

/* the undo ring: two clipped halves rotating (transform only) */
.ring { position: relative; width: 22px; height: 22px; flex: none; color: var(--brand-text); }
.ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid var(--brand-soft); }
.ring .rh { position: absolute; top: 0; width: 50%; height: 100%; overflow: hidden; }
.ring .rr { left: 50%; } .ring .rl { left: 0; }
.ring .rh i { position: absolute; top: 0; width: 200%; height: 100%; border-radius: 50%; border: 2.5px solid transparent; transform: rotate(45deg); }
.ring .rr i { left: -100%; border-top-color: currentColor; border-right-color: currentColor; }
.ring .rl i { left: 0; border-bottom-color: currentColor; border-left-color: currentColor; }

/* ---------- settings, profile, keys, cleared ---------- */
.set-group { display: grid; gap: 10px; }
.set-group h3 { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.set-row .set-hint { display: block; font-size: 12px; margin-top: 2px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.swatch { display: grid; gap: 6px; justify-items: center; padding: 10px 6px; border-radius: 14px; font-size: .8125rem; font-weight: 700; }
.swatch .sw { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(0,0,0,.12); display: grid; place-items: center; }
.swatch[aria-checked="true"] { outline: 3px solid var(--brand-text); outline-offset: 0; }
.swatch[aria-disabled="true"] { opacity: .6; }
.swatch small { font-weight: 600; color: var(--ink-3); font-size: .6875rem; text-align: center; line-height: 1.2; }
/* Each swatch is a tiny preview of its theme: the page colour, a card, and the accent strip, so no two look alike. */
.swatch .sw { position: relative; overflow: hidden; }
.swatch .sw::before { content: ""; position: absolute; left: 7px; right: 7px; top: 9px; height: 13px; border-radius: 4px; background: var(--sw-card); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.swatch .sw::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 13px; background: var(--sw-accent); }
.swatch .sw > * { position: relative; z-index: 1; }
.sw-light { background: #EEF1EC; --sw-card: #FFFFFF; --sw-accent: #233D26; }
.sw-dark { background: #0D110E; --sw-card: #1C2A1F; --sw-accent: #9BD3A6; }
.sw-eucalypt { background: linear-gradient(160deg, #DCE9DA, #B9D2BE); --sw-card: #FBFCF9; --sw-accent: #4E705C; }
.sw-harbour { background: linear-gradient(160deg, #DDE8F3, #BFD3E6); --sw-card: #FFFFFF; --sw-accent: #1D4E63; }
.sw-high_contrast { background: #FFFFFF; --sw-card: #000000; --sw-accent: #000000; border: 2px solid #000 !important; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--brand-soft); gap: 2px; flex-wrap: wrap; }
.seg button { min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; font-size: .8125rem; color: var(--ink-2); }
.seg button[aria-checked="true"] { background: var(--solid); color: var(--ink); box-shadow: var(--shadow-1); }
input[type="range"] { accent-color: var(--brand); width: 160px; }
.profile-top { display: flex; align-items: center; gap: 16px; }
.profile-top .bigleaf { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); flex: none; }
.profile-top h3 { margin: 0; font-size: 1.375rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { padding: 14px; border-radius: 16px; display: grid; gap: 2px; }
.stat .n { font-size: 1.5rem; font-weight: 700; }
.ranks { display: grid; gap: 6px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: var(--ink-2); font-weight: 600; }
.rank-row.me { background: var(--brand-soft); color: var(--ink); }
.rank-row .leafi { color: var(--brand-text); }
.rank-row .pts { margin-left: auto; font-size: .8125rem; color: var(--ink-3); }
.keys-t { width: 100%; border-collapse: collapse; }
.keys-t td { padding: 8px 4px; border-bottom: 1px solid var(--glass-rim); vertical-align: top; }
kbd { display: inline-block; min-width: 28px; text-align: center; padding: 3px 8px; border-radius: 8px; background: var(--solid); border: 1px solid var(--edge-strong); font: 600 .8125rem/1.3 var(--font); }
.cl-day { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cl-group { display: grid; gap: 8px; }
.cl-group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 40px; font-weight: 700; cursor: pointer; }
.cl-group > summary::-webkit-details-marker { display: none; }
.cl-group > summary .n { color: var(--ink-3); font-weight: 600; }
.cl-item { padding: 12px 14px; border-radius: 14px; display: grid; gap: 4px; justify-items: start; }
.cl-item .top { width: 100%; }
.cl-item .top { display: flex; gap: 10px; align-items: baseline; }
.cl-item .time { color: var(--ink-3); font-size: .8125rem; flex: none; }
.cl-item .ln { font-weight: 600; flex: 1; min-width: 0; }
.cl-item .id { color: var(--ink-3); font-size: .75rem; }
.cl-item ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .875rem; }
.preview-text { white-space: pre-wrap; background: var(--paper); color: var(--paper-ink); font: 10pt/1.45 Arial, sans-serif; padding: 18px 20px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); overflow-wrap: anywhere; }

/* ---------- welfare view (solid, never glass, never moving) ---------- */
.wf-layer { position: fixed; left: 0; right: 0; bottom: 0; top: var(--top); z-index: 60; overflow: auto; background: var(--bg); padding: 16px; }
.wf-view { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.wf-top { background: var(--welfare-bg); color: var(--welfare-ink); box-shadow: var(--welfare-rule); border-radius: 16px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; min-height: 56px; font-weight: 700; }
.wf-top .grow { flex: 1; }
.wf-top h1 { margin: 0; font-size: 1.125rem; line-height: 1.5rem; }
.wf-card { background: var(--solid); border: 1px solid var(--glass-rim); border-radius: 20px; padding: 20px; display: grid; gap: 14px; }
.wf-words { font-size: 1.125rem; line-height: 1.6; margin: 0; white-space: pre-wrap; }
.wf-told { color: var(--ink-2); margin: 0; font-weight: 600; }
.wf-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.wf-done { font-size: 1.125rem; font-weight: 700; margin: 0; }

/* ---------- cover, pointers, effects ---------- */
.cover { position: fixed; inset: 0; z-index: 150; background: var(--bg); display: grid; place-items: center; cursor: pointer; }
.cover img { width: 220px; }
.ptr-layer { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.ptr { --pc: var(--brand); position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; gap: 2px; will-change: transform; transition: opacity 400ms; }
.ptr svg { width: 18px; height: 18px; fill: var(--pc); stroke: #fff; stroke-width: 1.2; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.ptr .nm { margin-top: 14px; padding: 2px 8px; border-radius: 999px; background: var(--pc); color: var(--p-ink); font-size: .6875rem; font-weight: 700; white-space: nowrap; }
.ptr.still { opacity: 0; }
.ptr.gone { display: none; }
.click-ring { position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--pc, var(--brand)); pointer-events: none; }
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 96; overflow: hidden; }
.float { position: absolute; left: 0; top: 0; padding: 6px 12px; border-radius: 999px; font-weight: 700; color: var(--brand-text); }
.leafp { position: absolute; left: 0; top: 0; color: var(--accent); }

/* ---------- responsive ---------- */
@media (min-width: 600px) {
  .board-wrap { padding: 24px 24px 120px; }
  .job-scroll { padding: 20px 24px; }
}
@media (min-width: 1024px) {
  .job-layer { padding: 16px 24px; }
  .job-grid { grid-template-columns: 340px minmax(0,1fr); gap: 24px; align-items: start; }
  .came-col { position: static; border-radius: var(--r-card); }
  .came-text.clamp { display: none; }
  .job-top { padding: 8px 24px; }
  .job-bar { padding: 10px 24px; }
}
/* Narrow: two lines of an email here, the whole of it in the thread dropdown below (J46). A timer, a call record or a
   log item has no thread, so its full text shows at every width. */
@media (max-width: 1023px) {
  .came-col:not(.nomail) .came-text.full { display: none; }
  .came-col.nomail .came-text.clamp { display: none; }
}
@media (min-width: 1440px) {
  .board-wrap { grid-template-columns: minmax(0, 820px) 300px; }
  .rail { display: block; }
  .board-head .clr-link { display: none; }
}
@media (max-width: 599px) {
  :root { --hdr-h: 56px; }
  .hdr { grid-template-columns: auto minmax(0,1fr) auto; padding: 0 12px; gap: 8px; }
  .hdr-l .crew, .hdr-r .pill .long, .hdr-r .you .nm { display: none; }
  .hdr-r .you .pts .pts-today { display: none; }
  .crew-dots { display: flex; position: absolute; left: 12px; bottom: -8px; gap: 4px; }
  .crew-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--edge-strong); }
  .crew-dots i.on { background: var(--ok); }
  .count { justify-content: center; }
  .count .lbl { font-size: .8125rem; }
  .logo, .logo-d { height: 16px; }
  .count { font-size: 1.25rem; gap: 5px; }
  .job-top .bt { display: none; }
  .job-top .btn { width: 44px; padding: 0; }
  .job-top h1 { font-size: 1.0625rem; }
  .pband { letter-spacing: .02em; gap: 8px; font-size: .6875rem; }
  .crew-dots { bottom: 3px; }
  .board-head .clr-link { padding: 0 6px; font-size: .8125rem; }
  .hdr-r { gap: 6px; }
  .pill { display: none; }
  .ember { padding: 0 6px; }
  .card { grid-template-columns: 40px minmax(0,1fr); padding: 14px 16px; }
  .card .side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
  /* Narrow: "has this" gets its own row under the title (where the counts were), never over the title. */
  .card .holder { position: relative; right: auto; top: auto; transform: none; grid-column: 2; justify-self: start; max-width: 100%; }
  .card .holder > span:not(.av):not(.amb) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card.is-held .side, .card.is-sending .side, .card.is-away .side { display: none; }
  .job-layer { padding: 0; }
  .job-panel { border-radius: 0; }
  .job-bg { border-radius: 0; }
  .job-bar { flex-wrap: wrap; }
  .job-bar .sum { flex-basis: 100%; }
  .job-bar .btn-lg { min-width: 0; flex: 1; }
  .sheet { border-radius: 0; }
  .signin-panel { padding: 24px 16px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .paper { padding: 16px; }
  .rcpt .nm { max-width: 40%; }
}
@media (max-width: 380px) {
  .pad { grid-template-columns: repeat(3, 60px); }
  .key { width: 60px; height: 60px; }
  .hdr-r .you { padding-right: 4px; }
  .hdr-r .you .pts { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) * { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  :root:not([data-motion="full"]) .card:hover { transform: none; }
}
:root[data-motion="reduced"] * { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
:root[data-motion="reduced"] .card:hover { transform: none; }
:root[data-motion="reduced"] body.job-open .board-wrap { transform: none; }

/* ---------- forced colours ---------- */
@media (forced-colors: active) {
  .g1, .g2, .card, .email, .sec { border: 1px solid CanvasText; }
  .btn-primary { border: 2px solid ButtonText; }
  .wf-band, .wf-top { border: 2px solid CanvasText; }
}

/* =====================================================================================================
   Fix round 1 (24 Sep): welfare can never be covered, one hero number, calm notices, the check sits
   under the words that caused it, no page scroll under a job, phone widths, and a human face for numbers.
   ===================================================================================================== */

/* numbers: the "Desk Digits" face at the top of the file draws every digit without a slashed zero */
:root { --font-num: var(--font); }
.wf-details dd { font-variant-numeric: tabular-nums; }

/* a live welfare alert: above an open job (fixed, never inside the panel) and above the cover */
.wf-over { display: grid; gap: 8px; }
.wf-over .wf-band { margin: 0; }
.wf-over-job { position: fixed; left: 0; right: 0; top: var(--top); z-index: 46; padding: 10px 12px 0; }
body.wf-in-job .job-layer { top: calc(var(--top) + var(--wf-h, 74px)); }
.wf-over-cover { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); width: min(760px, calc(100% - 24px)); z-index: 160; }
@media (min-width: 1024px) { .wf-over-job { padding: 12px 24px 0; } }

/* the finished "while nobody was here" notice: calm, outlined, never the live red */
.band-wf-note { background: var(--solid); color: var(--ink); border: 1.5px solid color-mix(in srgb, var(--welfare-bg) 55%, transparent); box-shadow: var(--shadow-1); font-weight: 600; }
.band-wf-note > .ico { color: var(--welfare-bg); }
:root[data-theme="dark"] .band-wf-note > .ico { color: #FF8A80; }
.wf-drill.note { background: color-mix(in srgb, var(--welfare-bg) 12%, transparent); color: var(--ink); }

/* the welfare card's fixed WELFARE line and the details under it */
.wf-now { border-radius: 16px; padding: 16px 18px; background: color-mix(in srgb, var(--welfare-bg) 8%, var(--solid)); box-shadow: inset 4px 0 0 var(--welfare-bg); display: grid; gap: 12px; }
.wf-now-line { margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.55; }
.wf-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: .9375rem; }
.wf-details dt { font-weight: 700; color: var(--ink-2); }
.wf-details dd { margin: 0; font-family: var(--font-num); }

/* no page scroll under an open job; only the job scrolls */
/* on body only, so it moves to the viewport: the page stops scrolling and keeps its place, and the sticky header stays */
body.job-open, body.wf-open, body.covered { overflow: hidden; }
.skip:not(:focus) { box-shadow: none; }

/* header: one hero number, the person's stars, and a labelled streak */
.hdr-r { overflow: hidden; }
.ember { white-space: nowrap; }
.ember .w { font-weight: 600; color: var(--ink-2); }

/* a card while its claim is being settled */
.card.is-checking { cursor: progress; }
.card.show-checking .frost { opacity: .5; }
.card.show-checking::after { content: "Opening"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: 2; padding: 6px 12px; border-radius: 999px; background: var(--solid); box-shadow: var(--shadow-1); font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.card.show-checking.show-slow::after { content: "Still opening"; }

/* the hand-over that always goes, and the carry row */
.lockd { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 700; color: var(--ink-2); padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); }
.carry-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.carry-row .link { font-size: .8125rem; }
.carry.urgent { color: var(--warn); background: color-mix(in srgb, var(--warn) var(--tint-alpha), transparent); }

/* the check, right under the words that caused it (not part of the email) */
.paper .blk-flag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4pt 0 10pt; padding: 8px 10px; border-radius: 10px; font: 600 .8125rem/1.35 var(--font); cursor: default; user-select: none; }
.paper .blk-flag.stop { background: color-mix(in srgb, var(--danger) 9%, #fff); color: #6B0F0A; box-shadow: inset 3px 0 0 var(--danger); }
.paper .blk-flag.heads { background: color-mix(in srgb, var(--warn) 10%, #fff); color: #4A2C00; box-shadow: inset 3px 0 0 var(--warn); }
.paper .blk-flag .lbl { font-weight: 800; }
.paper .blk-flag .txt { flex: 1 1 220px; min-width: 0; }
.paper .blk-flag .btn { color: #1B1B1B; background: #fff; border-color: rgba(0,0,0,.14); }
.job-bar .why-blocked.as-btn { border: 0; background: color-mix(in srgb, var(--warn) var(--tint-alpha), transparent); padding: 8px 12px; border-radius: 12px; cursor: pointer; text-align: left; font: inherit; font-weight: 700; font-size: .875rem; color: var(--warn); }
.job-bar .why-blocked.as-btn .show { text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
.fx-pop { display: grid; gap: 8px; }
.fx-pop p { margin: 0; }
.fx-pop .fx-out { padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--danger) 8%, transparent); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 60%, transparent); color: var(--ink); }
.fx-pop .fx-in { padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ink); }

/* What changed, with Undo */
.changed-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.changed .meta { margin: 2px 0 0; }

/* the main button label: long on wide screens, "Send" on a phone */
.go-short { display: none; }

/* cover: one quiet line so nobody thinks the desk has stopped */
.cover-in { display: grid; justify-items: center; gap: 18px; }
.cover-hint { margin: 0; color: var(--ink-2); font-weight: 600; }

/* the welfare first state on an empty board */
.clear.clear-wf h2 { font-size: 1.75rem; line-height: 2.125rem; }

/* sign in tiles are a real list now */
.tiles { list-style: none; margin: 0; padding: 0; }
.tiles > li { display: grid; }
.cl-spacer { width: 72px; }
.cl-item .why-body .row { margin-top: 4px; }

@media (max-width: 1099px) { .ember .w { display: none; } }
@media (max-width: 599px) {
  .bands { width: calc(100% - 24px); }
  .band { flex-wrap: wrap; align-items: flex-start; padding: 12px 14px; }
  .band .grow { flex-basis: calc(100% - 40px); }
  .band > .btn { margin-left: auto; }
  .wf-band { flex-wrap: wrap; padding: 14px 16px; }
  .wf-band .grow { flex-basis: calc(100% - 40px); }
  .wf-band > .btn { margin-left: auto; }
  .board-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .board-head h1 { font-size: 1.25rem; }
  .job-bar .btn-lg { min-width: 0; flex: 1 1 auto; padding: 0 18px; }
  .go-long { display: none; }
  .go-short { display: inline; }
  .job-scroll { padding: 12px; }
  .email { padding: 12px; }
  .paper { padding: 14px; }
  .rcpt { flex-wrap: wrap; row-gap: 0; }
  .rcpt .nm { max-width: none; }
  .rcpt .ad { flex-basis: 100%; padding-left: 64px; }
  .subj { flex-wrap: wrap; }
  .subj .k { width: auto; }
  .subj input { flex-basis: 100%; }
  .wf-details { grid-template-columns: minmax(0, 1fr); }
  .wf-details dd { margin-bottom: 6px; }
}


/* ================= fix round 2 (24 Sep 2026) ================= */

/* One editable region per email: the whole email is one text box; fixed wording and labels stay locked. */
.paper .ed-region { position: relative; border-radius: 6px; outline-offset: 6px; }
.paper .ed-region[contenteditable]:hover { background: transparent; box-shadow: none; }
.paper .ed-region[contenteditable]:focus-visible { outline: 2px solid #1F5FD1; outline-offset: 6px; background: transparent; }
.paper .ed-region [contenteditable="false"] { cursor: default; }
.paper .ed-region [contenteditable="false"]:hover { background: inherit; box-shadow: none; }
.paper .ed-region .blk-fixed[contenteditable="false"]:hover { background: #EFF1EE; box-shadow: 0 0 0 4px #EFF1EE; }
.paper .ed-region .blk[hidden] { display: none; }
.email:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* An email Fred already sent by himself (the hand-over that had to go first): shown, locked, never sent again. */
.email.sent .email-body-wrap { opacity: .72; }
.lockd.sentd { color: var(--ok, #2E7D32); }

/* Which client: the likely one is marked, one tap confirms, Change after. */
/* "Most likely" is a suggestion, not a choice: a soft dashed outline. Only the one picked gets the solid ring. */
.pick-opt.likely { box-shadow: var(--shadow-1); outline: 1.5px dashed color-mix(in srgb, var(--brand-text) 55%, transparent); outline-offset: -1.5px; }
.pick-opt.now { box-shadow: inset 0 0 0 2px var(--brand-text), var(--shadow-1); background: var(--brand-soft); }
.pick-tag { display: inline-flex; align-items: center; gap: 4px; justify-self: start; font-size: .75rem; font-weight: 700; color: var(--brand-text); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; margin-bottom: 4px; }
.pick-opt .why2 { font-size: .8125rem; color: var(--ink-2); margin-top: 4px; }
.picked-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.changed:focus-visible, .happened:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
.chips-note { margin: -6px 4px 0; font-size: .8125rem; }

/* What came in stays in view beside the reply while you read the emails. */
@media (min-width: 1024px) {
  .came-col { position: sticky; top: 0; align-self: start; max-height: calc(100dvh - var(--top) - 190px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}

/* A colleague on a card: a ring and their initial, nothing floating. */
.card.peer { outline: 2px solid var(--peer, var(--brand)); outline-offset: -2px; }
.peer-b { --pc: var(--brand); position: absolute; top: 8px; left: 10px; z-index: 2; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pc); color: var(--p-ink, #fff); font-size: .625rem; font-weight: 800; box-shadow: 0 0 0 2px var(--solid); pointer-events: none; transition: opacity 600ms var(--ease-out, ease); }
.peer-b + .peer-b { left: 34px; }
.peer-b.idle { opacity: 0; }
.ptr-layer .ptr { display: none; }

/* Welfare: the clock to 10 minutes and who has it. The send button grows once one of them has it. */
.wf-has { display: grid; gap: 8px; }
.wf-clock { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.wf-clock.up { color: var(--welfare-bg); }
:root[data-theme="dark"] .wf-clock.up { color: #FF8A80; }
.wf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-chip { min-height: 44px; font-size: .875rem; }
.wf-chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.wf-chip[aria-pressed="true"] .ico { color: var(--brand-ink); }
.wf-go { margin: 0; font-weight: 700; color: var(--brand-text); }
/* Until one of the three has it (or 10 minutes pass), tapping who has it is the main action; sending is a small link. */
.wf-chips.main .wf-chip { min-height: 52px; padding: 0 18px; font-size: .9375rem; font-weight: 700; background: var(--brand-soft); border: 1.5px solid var(--brand-text); }
.wf-chips.main .wf-chip:hover { background: var(--glass-2); }
.wf-actions-wait { align-items: center; }
.wf-anyway { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.wf-prev { margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--warn) var(--tint-alpha, 12%), transparent); font-weight: 700; }

/* The header chip's focus ring sits inside it, so nothing clips it. */
.hdr .you:focus-visible, .hdr .btn:focus-visible, .hdr .ember:focus-visible { outline-offset: -3px; }

/* Banners fold to one line on a narrow screen, with a chevron for the rest. */
.band-more { display: none; }
@media (max-width: 599px) {
  .band.clamp1 { flex-wrap: nowrap; align-items: center; padding: 8px 10px; gap: 8px; }
  .band.clamp1 .bt { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .band.clamp1.open { flex-wrap: wrap; }
  .band.clamp1.open .bt { -webkit-line-clamp: unset; display: block; flex-basis: calc(100% - 90px); }
  .band.clamp1 .band-more { display: inline-flex; flex: none; width: 36px; }
  .band.clamp1 .band-more .ico { transition: transform var(--t-small); }
  .band.clamp1.open .band-more .ico { transform: rotate(180deg); }
  .band.clamp1 > .ico { flex: none; }
  .band.clamp1 > .btn:not(.band-more) { margin-left: 0; flex: none; }
  .board-head .sub { font-size: .875rem; }
}
/* Narrow screens: the board's jobs come first (at least three on the first screen). */
@media (max-width: 599px) {
  .band.clamp1:not(.open) .wf-drill { display: none; }
  .bands { margin-top: 8px; gap: 8px; }
  .board-wrap { padding-top: 12px; }
  .board-head { flex-wrap: wrap; align-items: center; margin: 0 2px 10px; gap: 2px 10px; }
  .board-head h1 { font-size: 1.1875rem; line-height: 1.5rem; }
  .board-head .sub { font-size: .8125rem; }
  .board-head .clr-link { min-height: 36px; }
  #coach { margin-bottom: 8px; }
  .cards { gap: 8px; }
  .card { min-height: 0; padding: 12px 14px; gap: 10px; }
  .card .l1 { font-size: 1rem; line-height: 1.375rem; }
  .card .glyph { width: 36px; height: 36px; }
}

/* ---------- fix round 4 ---------- */
/* The page background reaches the scrollbar gutter too (no light strip down the right edge), and the sign in and
   welcome screens reserve no gutter at all. */
html { background-color: var(--bg); }
html:has(#signin:not([hidden])) { scrollbar-gutter: auto; }
/* "Welfare first" in the header while a welfare message is open and nothing else is on the board. */
.count.wf-first { color: var(--danger); }
/* Chips wrap to a second line at narrow widths instead of cutting the date or the folder. */
.chip { padding-top: 6px; padding-bottom: 6px; }
.chip .lbl { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
/* Completion toasts over an open job sit bottom left, clear of the email column (the Send bar stays free). */
body.job-open .toasts { left: max(16px, calc((100vw - 1280px) / 2 + 16px)); right: auto; transform: none; justify-items: start; }
@media (max-width: 599px) { body.job-open .toasts { right: 12px; left: 12px; justify-items: stretch; } }
/* The rail bar towards the next leaf, with a small tick every step on the way (passed ticks are filled). */
.bar.bar-ticks { position: relative; }
.bar.bar-ticks .tick { position: absolute; top: 1px; bottom: 1px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--solid, #fff); opacity: .7; }
.bar.bar-ticks .tick.passed { opacity: .35; }
/* The welfare reply is shown above the send button, with a one line summary beside it. */
.wf-reply-sum { margin: 0; font-size: .875rem; color: var(--ink-2); }
/* Role neutral colour tokens for the desk people (the server's staff table may send --p-1, --p-2 or --p-3; the
   named tokens stay for practice). They follow the theme because they alias the themed values. */
:root { --p-1: var(--p-gary); --p-2: var(--p-gill); --p-3: var(--p-kana); }

/* ---------- fix round 5 ---------- */
/* The live welfare band is the first thing under the header on the board, and stays in view while the board scrolls. */
#wf-slot { position: sticky; top: calc(var(--top) + 8px); z-index: 48; display: grid; gap: 8px; width: min(820px, calc(100% - 32px)); margin: 12px auto 0; }
#wf-slot:empty { display: none; }
#wf-slot .wf-band { margin: 0; box-shadow: var(--welfare-rule), 0 8px 24px rgba(0,0,0,.18); }
body.job-open #wf-slot, body.wf-open #wf-slot, body.covered #wf-slot { display: none; }
@media (max-width: 599px) { #wf-slot { width: calc(100% - 24px); margin-top: 8px; } }
/* The pick cards keep their lines together (no stretched gaps when the other card is taller). */
.pick-opt { align-content: start; }
/* What the desk does not do yet, set apart under its own heading in the playbook source sheet. */
.na-list { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--glass-rim); }
.na-list h3 { margin: 0 0 8px; font-size: .9375rem; }
.na-list p { margin: 0 0 10px; line-height: 1.5; color: var(--ink-2); }
/* The practice band grows to fit bigger text, and says only "Practice" on a narrow screen. */
.pband { height: auto; min-height: 28px; padding: 2px 12px; flex-wrap: wrap; row-gap: 2px; }
.pband .pb-short { display: none; }
@media (max-width: 399px) { .pband .pb-long { display: none; } .pband .pb-short { display: inline; } }
/* Toasts fit their words; in a job they sit to the right, clear of "What came in". */
.toast { width: fit-content; max-width: 100%; justify-self: center; }
.toast .msg { overflow-wrap: anywhere; }
body.job-open .toasts { left: auto; right: max(16px, calc((100vw - 1280px) / 2 + 16px)); transform: none; justify-items: end; width: min(420px, calc(100% - 32px)); }
body.job-open .toast { justify-self: end; }
@media (max-width: 599px) { body.job-open .toasts { right: 12px; left: 12px; width: auto; justify-items: stretch; } body.job-open .toast { justify-self: stretch; width: auto; } }
/* The sign in logo sits in the middle of its card. */
.signin-panel .biglogo { height: auto; margin-inline: auto; }
/* A colleague's initials never sit on the card's icon. */
.peer-b { top: auto; bottom: 2px; left: 20px; right: auto; }
.peer-b + .peer-b { left: 44px; right: auto; }

/* ---------- Pull back: "Leaving in 10 min" (register H17, js/leaving.js) ----------
   One card per completion in a dock at the bottom left, never inside the toast live region. Each held email is a row
   with its own countdown and a thin bar that shrinks by transform (no transition). With a job open the dock sits just
   above the Send bar (js/leaving.js measures it into --leave-bottom) and its rows keep to one line. Where the dock and
   the toasts could meet, the toasts stand on top of the dock (--leave-h is the dock's height). */
.leaving { position: fixed; left: 16px; bottom: 20px; z-index: 55; width: min(340px, calc(100% - 32px)); display: grid; gap: 8px; pointer-events: none; }
.leaving:empty { display: none; }
.leaving [hidden] { display: none !important; }
.leave-card { pointer-events: auto; display: grid; gap: 8px; padding: 12px 14px; border-radius: 18px; }
.leave-card .lc-head { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.leave-card .lc-head > .ico { flex: none; color: var(--ink-2); }
.leave-card .lc-title { flex: 1; min-width: 0; margin: 0; font-size: .875rem; line-height: 1.25rem; font-weight: 700; overflow-wrap: anywhere; }
.leave-card .lc-act { display: inline-flex; flex: none; }
.leave-card .lc-act:empty { display: none; }
/* Gary: a card folds to its head line (the time left and Pull back stay) */
.leave-card .lc-fold { flex: none; width: 32px; height: 32px; }
.leave-card .lc-fold svg { transition: transform var(--t-small) var(--ease-out); }
.leave-card.lc-folded .lc-fold svg { transform: rotate(180deg); }
.leave-card.lc-folded { padding: 6px 10px; }
.leave-card.lc-folded .lc-rows, .leave-card.lc-folded .lc-msg { display: none; }
@media (prefers-reduced-motion: reduce) { .leave-card .lc-fold svg { transition: none; } }
.leave-card .lc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.leave-card .lc-row { display: grid; gap: 4px; }
.leave-card .lc-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: .8125rem; line-height: 1.25rem; }
.leave-card .lc-label { min-width: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.leave-card .lc-timer { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.leave-card .lc-ico { display: inline-flex; }
.leave-card .lc-ico:empty { display: none; }
.leave-card .lc-row[data-state="left"] .lc-label { display: none; }
.leave-card .lc-row[data-state="left"] .lc-timer { margin-left: 0; color: var(--ok); }
.leave-card .lc-row[data-state="pulled"] .lc-timer { color: var(--info); }
.leave-card .lc-bar { display: block; height: 3px; border-radius: 3px; overflow: hidden; background: var(--brand-soft); }
.leave-card .lc-bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transition: none; }
.leave-card .lc-note { margin: 0; font-size: .75rem; line-height: 1.125rem; color: var(--ink-2); }
.leave-card .lc-msg { margin: 0; font-size: .8125rem; line-height: 1.25rem; font-weight: 600; color: var(--ink); }
.leave-card .lc-pull .ringspin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; opacity: .75; animation: spin .8s linear infinite; }
.leave-card .lc-pull[aria-disabled="true"] { cursor: progress; opacity: .85; }
.leave-card.is-ended .lc-bar { display: none; }
:root[data-theme="high_contrast"] .leave-card .lc-bar { background: #FFFFFF; border: 1px solid #000; }
:root[data-theme="high_contrast"] .leave-card .lc-bar i { background: #000; }
@media (forced-colors: active) { .leave-card { border: 1px solid CanvasText; } .leave-card .lc-bar i { background: CanvasText; } }
/* With a job open: just above the Send bar, one line a row. */
body.job-open .leaving { bottom: var(--leave-bottom, 96px); }
body.job-open .leave-card { padding: 8px 12px; gap: 6px; }
body.job-open .leave-card .lc-head { min-height: 32px; }
body.job-open .leave-card .lc-line { flex-wrap: nowrap; }
body.job-open .leave-card .lc-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.job-open .leave-card .lc-timer { white-space: nowrap; }
/* The toasts stand on top of the dock wherever the two could meet. */
@media (max-width: 1271px) { body.has-leaving:not(.job-open) .toasts { bottom: calc(30px + var(--leave-h, 0px)); } }
@media (max-width: 819px) { body.has-leaving.job-open .toasts { bottom: calc(var(--leave-bottom, 96px) + var(--leave-h, 0px) + 10px); } }
body.has-leaving .board-wrap { padding-bottom: calc(120px + var(--leave-h, 0px)); }
@media (max-width: 599px) {
  .leaving { left: 12px; right: 12px; width: auto; bottom: 12px; }
  body.has-leaving:not(.job-open) .toasts { bottom: calc(22px + var(--leave-h, 0px)); }
}
@media (prefers-reduced-motion: reduce) { :root:not([data-motion="full"]) .leave-card, :root:not([data-motion="full"]) .leave-card .lc-bar i { transition: none; } }
:root[data-motion="reduced"] .leave-card, :root[data-motion="reduced"] .leave-card .lc-bar i { transition: none; }

/* =====================================================================================================
   The original email thread (26 Sep 2026, register J46): one clearly labelled dropdown in "What came in",
   closed until someone opens it. Tokens only, both themes, high contrast and forced colours.
   ===================================================================================================== */
details.thread { margin-top: 2px; }
details.thread > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); font-weight: 700; font-size: .875rem; line-height: 1.25rem; cursor: pointer; }
details.thread > summary::-webkit-details-marker { display: none; }
details.thread > summary .ico { flex: none; }
details.thread > summary .ico:last-child { margin-left: auto; transition: transform var(--t-small) var(--ease-out); }
details.thread[open] > summary .ico:last-child { transform: rotate(180deg); }
details.thread > summary .lbl { min-width: 0; }
details.thread > summary .n { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.thread-body { display: grid; gap: 10px; padding-top: 10px; }
.thread-body > .meta { margin: 0; }
.thread-note { margin: 0; font-size: .8125rem; line-height: 1.25rem; color: var(--ink-2); }
.thread-group { display: grid; gap: 8px; }
.thread-group h3 { margin: 4px 0 0; font-size: .8125rem; line-height: 1.25rem; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.thread-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
details.msg { border: 1px solid var(--glass-rim); border-radius: 12px; background: var(--solid-2); min-width: 0; }
details.msg.out { border-left: 3px solid var(--accent); }
details.msg > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 2px 8px; min-height: 44px; padding: 8px 10px; border-radius: 11px; cursor: pointer; font-size: .8125rem; line-height: 1.25rem; }
details.msg > summary::-webkit-details-marker { display: none; }
details.msg > summary .ico { color: var(--ink-2); transition: transform var(--t-small) var(--ease-out); }
details.msg[open] > summary .ico { transform: rotate(180deg); }
.msg-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.msg-who { min-width: 0; font-weight: 700; color: var(--ink); }
.msg-at { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.msg-first { grid-column: 1 / -1; color: var(--ink-2); }
details.msg[open] .msg-first { display: none; }
.msg-dir { flex: none; display: inline-flex; align-items: center; font-size: .75rem; font-weight: 700; color: var(--brand-text); background: var(--brand-soft); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.msg-body { display: grid; gap: 10px; padding: 2px 10px 12px; min-width: 0; }
.msg-head { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: .8125rem; line-height: 1.25rem; }
.msg-head dt { font-weight: 700; color: var(--ink-2); }
.msg-head dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.msg-head dd .meta { font-size: inherit; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9375rem; line-height: 1.45rem; color: var(--ink); }
.msg-sub { margin: 0; font-size: .8125rem; font-weight: 700; color: var(--ink); }
.msg-body .quoted { margin: 0; }
.msg-open { display: inline-flex; align-items: center; justify-self: start; min-height: 32px; font-size: .875rem; }
:root[data-theme="high_contrast"] details.thread > summary { border: 2px solid #000; background: #fff; color: #000; }
:root[data-theme="high_contrast"] details.thread > summary .n { color: #000; }
:root[data-theme="high_contrast"] details.msg { border: 2px solid #000; background: #fff; }
:root[data-theme="high_contrast"] details.msg.out { border-left-width: 5px; }
:root[data-theme="high_contrast"] .msg-dir { border: 2px solid #000; background: #fff; color: #000; }
@media (forced-colors: active) {
  details.thread > summary, details.msg, .msg-dir { border: 1px solid CanvasText; }
  details.msg.out { border-left: 3px solid CanvasText; }
}
@media (max-width: 599px) {
  .msg-head { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .msg-head dd { margin-bottom: 4px; }
}
/* What came in, set out like a letter (the Director, 28 Sep 2026) */
.came-from { padding-bottom: 8px; border-bottom: 1px solid var(--glass-rim, rgba(0,0,0,.08)); }
.came-subj { font-size: 1rem; line-height: 1.35; margin-top: 2px; }
.came .mail-body { background: var(--paper); color: var(--paper-ink); padding: 14px 16px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); font-size: .9375rem; line-height: 1.6; }
.came .mail-body .mail-p { margin: 0 0 12px; }
.came .mail-body .mail-p:last-child { margin-bottom: 0; }
.came .mail-body .link, .msg-body .mail-body .link { color: #1155cc; text-decoration: underline; }
.came .mail-footer { color: #555; }
.msg-body .mail-body { line-height: 1.55; }
.msg-body .mail-body .mail-p { margin: 0 0 10px; }

/* Jonty, 6 Oct 2026: at 100% zoom inside the CRM's Admin Desk tab the window is under 1440 px wide, so the Today rail
   (Today, together; Countdowns) was hidden and the chip menu ran off the bottom. The rail now shows from 1180 px with
   narrower columns, and the menu scrolls inside the window. */
@media (min-width: 1180px) and (max-width: 1439px) {
  .board-wrap { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; max-width: 1180px; margin-left: auto; margin-right: auto; }
  .rail { display: block; }
  .board-head .clr-link { display: none; }
}
.menu { max-height: calc(100vh - var(--hdr-h, 64px) - 24px); overflow-y: auto; overscroll-behavior: contain; }

/* t22-uidates (13 Oct 2026, Kana via the Director): who an incoming email was addressed to (To, Cc, and the firm's
   boxes it reached), compact and wrapping on a phone; and the line that says what a follow-up is about. */
.came-to { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 2px 0 0; font-size: .8125rem; line-height: 1.35; overflow-wrap: anywhere; min-width: 0; }
.came-to-part { min-width: 0; }
.came-to .k { font-weight: 600; }
.came-follow { margin: 6px 0 4px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
