/* Vendored from BSLv1 by scripts/sync_bsl_os.sh. Do not edit here; edit BSLv1 and re-run.
   Source: ~/Developer/BSLv1/static/css/os.css
   Commit: 666c5e3c80d93e2256d744dd5f4568e3fcd17dc8 */
/* ==========================================================================
   Company OS design system
   --------------------------------------------------------------------------
   One stylesheet for every internal BSL tool. No framework, no CDN, no build
   step: plain CSS custom properties plus a small component layer.

   Layers:
     1. Fonts
     2. Tokens (dark is the base, light is an opt-in override)
     3. Reset + base
     4. Shell (rail, topbar, main)
     5. Components (page head, cards, tables, forms, buttons, badges,
        modals, toasts, palette, states)
     6. Utilities
     ...then one numbered section per tool, and brand components last.

   Editing rule: add a token before adding a hard-coded value. Every colour a
   component uses must resolve to a var() so both themes stay in step.
   ========================================================================== */

/* ---------- 1. Fonts ---------------------------------------------------- */

@font-face {
  font-family: 'HelveticaCustom';
  src: url('../fonts/Helvetica.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HelveticaCustom';
  src: url('../fonts/Helvetica-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- 2. Tokens --------------------------------------------------- */

/* Dark is the product. The internal OS now shares the public site's ground
   (frontend/src/index.css): #111 bg, a strictly monochrome ramp, and colour
   reserved for meaning. Light is an opt-in override, never a media query, so
   a seat that has chosen nothing gets dark and never flashes white. */

:root {
  color-scheme: dark;

  /* Surfaces and ink (dark, the default) */
  --os-bg: #111111;
  --os-surface: #151515;
  --os-surface-2: #1b1b1b;
  --os-rail: #0d0d0d;
  --os-fill: rgba(255, 255, 255, 0.04);
  --os-fill-strong: rgba(255, 255, 255, 0.09);
  --os-line: rgba(255, 255, 255, 0.10);
  --os-line-strong: rgba(255, 255, 255, 0.24);
  --os-ink: #ffffff;
  --os-ink-muted: #8f8f8f;
  --os-ink-dim: #7a7a7a;      /* one step up from the site's dim, for AA on #111 */
  --os-backdrop: rgba(0, 0, 0, 0.66);

  /* Inverted pair, used by primary buttons and the count chip */
  --os-inverse-bg: #ffffff;
  --os-inverse-ink: #111111;

  /* Status: muted, and only ever used for meaning (overdue, stuck, high
     priority). Nothing decorative may reach for these. */
  --os-success: #74bd97;
  --os-success-wash: rgba(116, 189, 151, 0.12);
  --os-warn: #d3a458;
  --os-warn-wash: rgba(211, 164, 88, 0.12);
  --os-danger: #de7b78;
  --os-danger-wash: rgba(222, 123, 120, 0.12);
  --os-info: #a7b3c4;
  --os-info-wash: rgba(167, 179, 196, 0.12);
  --os-focus: var(--os-ink);  /* the ring is ink, not a blue accent */

  /* Taskforce label palette. Eight colours, one pair of tokens
     each, so a board label is a token rather than a stored hex value and it
     stays readable in both themes. Tuned the same way --os-success is: muted
     enough to sit on #111 without glowing, distinct enough to tell apart at
     chip size. */
  --os-label-green: #74bd97;
  --os-label-green-wash: rgba(116, 189, 151, 0.14);
  --os-label-teal: #6fbdb4;
  --os-label-teal-wash: rgba(111, 189, 180, 0.14);
  --os-label-blue: #7fa9d6;
  --os-label-blue-wash: rgba(127, 169, 214, 0.14);
  --os-label-purple: #a893d4;
  --os-label-purple-wash: rgba(168, 147, 212, 0.14);
  --os-label-pink: #d68fb4;
  --os-label-pink-wash: rgba(214, 143, 180, 0.14);
  --os-label-red: #de7b78;
  --os-label-red-wash: rgba(222, 123, 120, 0.14);
  --os-label-orange: #d3a458;
  --os-label-orange-wash: rgba(211, 164, 88, 0.14);
  --os-label-grey: #9aa0a8;
  --os-label-grey-wash: rgba(154, 160, 168, 0.14);

  /* Type */
  --os-font: 'HelveticaCustom', Helvetica, 'Helvetica Neue', Arial, sans-serif;
  --os-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --os-text-2xs: 0.6875rem;  /* 11px  overline */
  --os-text-xs: 0.75rem;     /* 12px  meta */
  --os-text-sm: 0.8125rem;   /* 13px  dense UI */
  --os-text-base: 0.875rem;  /* 14px  body */
  --os-text-md: 0.9375rem;   /* 15px  emphasis */
  --os-text-lg: 1.125rem;    /* 18px  section title */
  --os-text-xl: 1.625rem;    /* 26px  page title */
  --os-text-2xl: 2rem;       /* 32px  stat */
  --os-text-display: 2.5rem; /* 40px  hero number */
  --os-weight-regular: 400;
  --os-weight-medium: 500;
  --os-weight-bold: 700;
  --os-tracking-tight: -0.03em;
  --os-tracking-wide: 0.06em;
  --os-leading: 1.5;

  /* Space, 4px scale */
  --os-space-1: 0.25rem;
  --os-space-2: 0.5rem;
  --os-space-3: 0.75rem;
  --os-space-4: 1rem;
  --os-space-5: 1.25rem;
  --os-space-6: 1.5rem;
  --os-space-8: 2rem;
  --os-space-10: 2.5rem;
  --os-space-12: 3rem;

  /* Radius */
  --os-radius-sm: 6px;
  --os-radius-md: 8px;
  --os-radius-lg: 12px;
  --os-radius-xl: 16px;
  --os-radius-full: 999px;

  /* Elevation */
  --os-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --os-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.55);
  --os-shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.65);

  /* Motion */
  --os-motion-fast: 120ms;
  --os-motion-base: 180ms;
  --os-motion-slow: 260ms;
  --os-ease: cubic-bezier(0.2, 0, 0.2, 1);

  /* Thumbnail wash: a monogram tile when a demo has no screenshot yet. The
     hue comes from the item, the lightness from the theme, so contrast holds
     whichever hue lands. */
  --os-thumb-sat: 30%;
  --os-thumb-l1: 24%;
  --os-thumb-l2: 16%;
  --os-thumb-ink: #eceef2;

  /* Layout */
  --os-rail-width: 256px;
  --os-topbar-height: 52px;
  --os-content-max: 1440px;
}

/* Light: only when the seat asks for it. */
:root[data-theme='light'] {
  color-scheme: light;

  --os-bg: #f7f7f8;
  --os-surface: #ffffff;
  --os-surface-2: #f1f2f4;
  --os-rail: #ffffff;
  --os-fill: rgba(16, 18, 22, 0.04);
  --os-fill-strong: rgba(16, 18, 22, 0.08);
  --os-line: rgba(16, 18, 22, 0.10);
  --os-line-strong: rgba(16, 18, 22, 0.22);
  --os-ink: #111111;
  --os-ink-muted: #545b66;
  --os-ink-dim: #6e7581;
  --os-backdrop: rgba(16, 18, 22, 0.42);

  --os-inverse-bg: #111111;
  --os-inverse-ink: #ffffff;

  --os-success: #0f6b40;
  --os-success-wash: rgba(15, 107, 64, 0.10);
  --os-warn: #7a4c05;
  --os-warn-wash: rgba(122, 76, 5, 0.10);
  --os-danger: #9f1d1d;
  --os-danger-wash: rgba(159, 29, 29, 0.10);
  --os-info: #4b5563;
  --os-info-wash: rgba(75, 85, 99, 0.10);

  /* The label palette again, darkened for white. Same eight ids, so nothing
     stored on a board changes when a seat switches theme. */
  --os-label-green: #0f6b40;
  --os-label-green-wash: rgba(15, 107, 64, 0.10);
  --os-label-teal: #0c635c;
  --os-label-teal-wash: rgba(12, 99, 92, 0.10);
  --os-label-blue: #1f4e87;
  --os-label-blue-wash: rgba(31, 78, 135, 0.10);
  --os-label-purple: #5a3d96;
  --os-label-purple-wash: rgba(90, 61, 150, 0.10);
  --os-label-pink: #8e2c60;
  --os-label-pink-wash: rgba(142, 44, 96, 0.10);
  --os-label-red: #9f1d1d;
  --os-label-red-wash: rgba(159, 29, 29, 0.10);
  --os-label-orange: #7a4c05;
  --os-label-orange-wash: rgba(122, 76, 5, 0.10);
  --os-label-grey: #4b5563;
  --os-label-grey-wash: rgba(75, 85, 99, 0.10);

  --os-shadow-sm: 0 1px 2px rgba(16, 18, 22, 0.06);
  --os-shadow-md: 0 4px 14px rgba(16, 18, 22, 0.10);
  --os-shadow-lg: 0 18px 48px rgba(16, 18, 22, 0.18);

  --os-thumb-sat: 42%;
  --os-thumb-l1: 91%;
  --os-thumb-l2: 82%;
  --os-thumb-ink: #23272f;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --os-motion-fast: 1ms;
    --os-motion-base: 1ms;
    --os-motion-slow: 1ms;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 3. Reset + base --------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--os-bg);
  color: var(--os-ink);
  font-family: var(--os-font);
  font-size: var(--os-text-base);
  line-height: var(--os-leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--os-focus);
  outline-offset: 2px;
  border-radius: var(--os-radius-sm);
}
/* Never remove focus outright: only swap it for the ring above. */
:focus:not(:focus-visible) { outline: none; }

.os-skip-link {
  position: absolute;
  left: var(--os-space-3);
  top: var(--os-space-3);
  z-index: 100;
  padding: var(--os-space-2) var(--os-space-3);
  background: var(--os-surface);
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-md);
  font-size: var(--os-text-sm);
  text-decoration: none;
  transform: translateY(-200%);
}
.os-skip-link:focus { transform: translateY(0); }

/* Anchored to its containing block's corner, not left where it happened to
   sit. An absolutely positioned box with no offsets keeps its static position,
   so a hidden label inside a sideways scrolling table sat hundreds of pixels
   to the right of the viewport and stretched the document with it. */
.os-visually-hidden {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Shell ---------------------------------------------------- */

.os-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.os-rail {
  width: var(--os-rail-width);
  flex-shrink: 0;
  background: var(--os-rail);
  border-right: 1px solid var(--os-line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.os-rail-brand {
  padding: var(--os-space-5) var(--os-space-4) var(--os-space-4);
  border-bottom: 1px solid var(--os-line);
}
/* The wordmark is inlined SVG drawn in currentColor, so it takes the theme
   with it and needs no second asset for light mode. Width is set and height
   left to the aspect ratio. */
.os-rail-logo-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
.os-rail-logo {
  display: block;
  width: 104px;
  height: auto;
  color: var(--os-ink);
}
.os-topbar-logo {
  display: block;
  width: 22px;
  height: 22px;
  color: var(--os-ink);
}
.os-rail-brand .os-rail-role {
  margin-top: var(--os-space-1);
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
}

.os-rail-search {
  padding: var(--os-space-3) var(--os-space-3) 0;
}
.os-rail-search button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-2);
  padding: var(--os-space-2) var(--os-space-3);
  background: var(--os-fill);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  color: var(--os-ink-muted);
  font-size: var(--os-text-sm);
  cursor: pointer;
  transition: border-color var(--os-motion-fast) var(--os-ease),
              color var(--os-motion-fast) var(--os-ease);
}
.os-rail-search button:hover {
  border-color: var(--os-line-strong);
  color: var(--os-ink);
}

.os-kbd {
  font-family: var(--os-font-mono);
  font-size: var(--os-text-2xs);
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-sm);
  color: var(--os-ink-dim);
  white-space: nowrap;
}

.os-rail-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--os-space-3) var(--os-space-3) var(--os-space-6);
}
.os-rail-group { margin-bottom: var(--os-space-5); }
.os-rail-group-label {
  padding: var(--os-space-1) var(--os-space-2);
  font-size: var(--os-text-2xs);
  font-weight: var(--os-weight-medium);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.os-rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-2);
  padding: var(--os-space-2);
  border-radius: var(--os-radius-md);
  color: var(--os-ink-muted);
  text-decoration: none;
  font-size: var(--os-text-base);
  transition: background var(--os-motion-fast) var(--os-ease),
              color var(--os-motion-fast) var(--os-ease);
}
.os-rail-link:hover { background: var(--os-fill); color: var(--os-ink); }
.os-rail-link.is-active {
  background: var(--os-fill-strong);
  color: var(--os-ink);
  font-weight: var(--os-weight-medium);
}
.os-rail-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 var(--os-space-1);
  border-radius: var(--os-radius-full);
  background: var(--os-fill-strong);
  border: 1px solid var(--os-line-strong);
  font-size: var(--os-text-xs);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--os-ink);
}

.os-rail-foot {
  border-top: 1px solid var(--os-line);
  padding: var(--os-space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-2);
}

.os-main {
  flex: 1;
  min-width: 0;
}
.os-main-inner {
  max-width: var(--os-content-max);
  margin: 0 auto;
  padding-inline: var(--os-space-4);
  padding-block: var(--os-space-10) var(--os-space-12);
}
@media (min-width: 768px) {
  .os-main-inner { padding-inline: var(--os-space-12); }
}

.os-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-2);
  height: var(--os-topbar-height);
  padding-inline: var(--os-space-4);
  border-bottom: 1px solid var(--os-line);
  background: var(--os-rail);
  position: sticky;
  top: 0;
  z-index: 35;
}
.os-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--os-space-2);
  min-width: 0;
}
.os-topbar-name { font-size: var(--os-text-base); font-weight: var(--os-weight-bold); }

.os-rail-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--os-backdrop);
  z-index: 38;
}

@media (max-width: 899px) {
  .os-shell { flex-direction: column; }
  .os-topbar { display: flex; }
  .os-rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    transform: translateX(-105%);
    transition: transform var(--os-motion-base) var(--os-ease);
    box-shadow: var(--os-shadow-lg);
  }
  body.os-rail-open { overflow: hidden; }
  body.os-rail-open .os-rail { transform: translateX(0); }
  body.os-rail-open .os-rail-backdrop { display: block; }
}

/* ---------- 5. Components ------------------------------------------------ */

/* Page header */
.os-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--os-space-4);
  padding-bottom: var(--os-space-5);
  border-bottom: 1px solid var(--os-line);
}
.os-page-head h1 {
  font-size: var(--os-text-xl);
  font-weight: var(--os-weight-medium);
  letter-spacing: var(--os-tracking-tight);
}
.os-page-head .os-page-sub {
  margin-top: var(--os-space-1);
  font-size: var(--os-text-base);
  color: var(--os-ink-muted);
  max-width: 62ch;
}
.os-page-actions { display: flex; flex-wrap: wrap; gap: var(--os-space-2); }
.os-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
  margin-bottom: var(--os-space-3);
  font-size: var(--os-text-base);
  color: var(--os-ink-muted);
}
.os-breadcrumb a { text-decoration: none; }
.os-breadcrumb a:hover { color: var(--os-ink); }
.os-breadcrumb .os-crumb-sep { color: var(--os-ink-dim); }

/* Section: label column + content, collapses on small screens */
.os-section {
  display: grid;
  gap: var(--os-space-5);
  padding-block: var(--os-space-8);
  border-top: 1px solid var(--os-line);
}
.os-section:first-of-type { border-top: 0; }
/* Grid children default to min-width: auto, so a wide table would stretch the
   section past the viewport instead of scrolling inside os-table-scroll. */
.os-section > * { min-width: 0; }
@media (min-width: 1024px) {
  .os-section {
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: var(--os-space-8);
    align-items: start;
  }
}
.os-section-label {
  font-size: var(--os-text-base);
  font-weight: var(--os-weight-medium);
  color: var(--os-ink-muted);
  letter-spacing: -0.01em;
  padding-top: 0.2rem;
}
.os-section-hint {
  margin-top: var(--os-space-1);
  font-size: var(--os-text-sm);
  color: var(--os-ink-dim);
}

/* Cards */
.os-card {
  background: var(--os-surface);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  padding: var(--os-space-5) var(--os-space-6);
}
.os-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--os-space-3);
  margin-bottom: var(--os-space-3);
}
.os-card-title {
  font-size: var(--os-text-md);
  font-weight: var(--os-weight-bold);
  letter-spacing: -0.02em;
}
.os-card-meta { margin-top: var(--os-space-1); font-size: var(--os-text-sm); color: var(--os-ink-dim); }
.os-card-foot {
  margin-top: var(--os-space-4);
  padding-top: var(--os-space-3);
  border-top: 1px solid var(--os-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--os-space-2);
}
a.os-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--os-motion-fast) var(--os-ease),
              background var(--os-motion-fast) var(--os-ease);
}
a.os-card:hover { border-color: var(--os-line-strong); background: var(--os-fill); }

.os-card-grid {
  display: grid;
  gap: var(--os-space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .os-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .os-card-grid.os-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Stat grid */
.os-stat-grid {
  display: grid;
  gap: 1px;
  background: var(--os-line);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  overflow: hidden;
}
@media (min-width: 640px) { .os-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .os-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.os-stat {
  background: var(--os-surface);
  padding: var(--os-space-4) var(--os-space-5);
  min-height: 5.5rem;
}
.os-stat-value {
  font-size: var(--os-text-2xl);
  font-weight: var(--os-weight-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--os-tracking-tight);
}
.os-stat-label {
  margin-top: var(--os-space-1);
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
}
.os-stat-hint { margin-top: var(--os-space-1); font-size: var(--os-text-sm); color: var(--os-ink-muted); }

/* Feed rows (attention list) */
.os-feed {
  border: 1px solid var(--os-line);
  background: var(--os-surface);
  border-radius: var(--os-radius-lg);
  overflow: hidden;
}
.os-feed-row {
  display: flex;
  align-items: center;
  gap: var(--os-space-4);
  padding: var(--os-space-3) var(--os-space-4);
  border-bottom: 1px solid var(--os-line);
  text-decoration: none;
  color: inherit;
  transition: background var(--os-motion-fast) var(--os-ease);
}
.os-feed-row:last-child { border-bottom: 0; }
.os-feed-row:hover { background: var(--os-fill); }
.os-feed-count {
  width: 2.5rem;
  flex-shrink: 0;
  text-align: right;
  font-size: var(--os-text-lg);
  font-weight: var(--os-weight-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--os-tracking-tight);
}
.os-feed-count.is-urgent {
  background: var(--os-fill-strong);
  border-radius: var(--os-radius-sm);
  padding-inline: var(--os-space-1);
}
.os-feed-body { min-width: 0; flex: 1; }
.os-feed-title { display: block; font-size: var(--os-text-md); font-weight: var(--os-weight-medium); }
.os-feed-hint { display: block; font-size: var(--os-text-base); color: var(--os-ink-muted); margin-top: 0.1rem; }
.os-feed-chevron { color: var(--os-ink-dim); flex-shrink: 0; }

/* Buttons */
.os-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--os-space-2);
  padding: var(--os-space-2) var(--os-space-3);
  min-height: 2.25rem;
  background: transparent;
  color: var(--os-ink);
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-md);
  font-size: var(--os-text-sm);
  font-weight: var(--os-weight-medium);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--os-motion-fast) var(--os-ease),
              border-color var(--os-motion-fast) var(--os-ease),
              opacity var(--os-motion-fast) var(--os-ease);
}
.os-btn:hover { background: var(--os-fill); }
.os-btn[disabled], .os-btn.is-busy { opacity: 0.5; cursor: not-allowed; }
.os-btn-primary {
  background: var(--os-inverse-bg);
  color: var(--os-inverse-ink);
  border-color: var(--os-inverse-bg);
}
.os-btn-primary:hover { background: var(--os-inverse-bg); opacity: 0.88; }
.os-btn-quiet { border-color: transparent; color: var(--os-ink-muted); }
.os-btn-quiet:hover { color: var(--os-ink); background: var(--os-fill); }
.os-btn-danger { color: var(--os-danger); border-color: var(--os-danger); }
.os-btn-danger:hover { background: var(--os-danger-wash); }
.os-btn-sm { min-height: 1.85rem; padding: var(--os-space-1) var(--os-space-2); font-size: var(--os-text-xs); }
.os-btn-icon { min-height: 2.25rem; width: 2.25rem; padding: 0; }

/* Badges */
.os-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--os-space-1);
  font-size: var(--os-text-xs);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-full);
  color: var(--os-ink-muted);
  white-space: nowrap;
}
.os-badge-success { color: var(--os-success); border-color: var(--os-success); background: var(--os-success-wash); }
.os-badge-warn { color: var(--os-warn); border-color: var(--os-warn); background: var(--os-warn-wash); }
.os-badge-danger { color: var(--os-danger); border-color: var(--os-danger); background: var(--os-danger-wash); }
.os-badge-info { color: var(--os-info); border-color: var(--os-info); background: var(--os-info-wash); }
.os-badge-neutral { background: var(--os-fill); }
.os-badge-upper { text-transform: uppercase; letter-spacing: 0.04em; font-size: var(--os-text-2xs); }

/* Forms */
.os-field { display: block; margin-bottom: var(--os-space-4); }
.os-label {
  display: block;
  margin-bottom: var(--os-space-1);
  font-size: var(--os-text-sm);
  font-weight: var(--os-weight-medium);
  color: var(--os-ink-muted);
}
.os-input,
.os-select,
.os-textarea {
  width: 100%;
  background: var(--os-surface);
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-md);
  color: var(--os-ink);
  font-size: var(--os-text-base);
  padding: var(--os-space-2) var(--os-space-3);
  min-height: 2.25rem;
  transition: border-color var(--os-motion-fast) var(--os-ease);
}
.os-input::placeholder, .os-textarea::placeholder { color: var(--os-ink-dim); }
.os-input:hover, .os-select:hover, .os-textarea:hover { border-color: var(--os-ink-dim); }
.os-textarea { min-height: 6rem; resize: vertical; }
.os-select {
  appearance: none;
  padding-right: var(--os-space-8);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.os-field-hint { margin-top: var(--os-space-1); font-size: var(--os-text-sm); color: var(--os-ink-dim); }
.os-field-error { margin-top: var(--os-space-1); font-size: var(--os-text-sm); color: var(--os-danger); }
.os-input[aria-invalid='true'] { border-color: var(--os-danger); }

/* Checkbox rendered as a selectable chip */
.os-chip { position: relative; display: block; cursor: pointer; }
.os-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.os-chip-face {
  display: block;
  padding: var(--os-space-2) var(--os-space-3);
  border: 1px solid var(--os-line);
  background: var(--os-surface-2);
  border-radius: var(--os-radius-md);
  color: var(--os-ink-muted);
  font-size: var(--os-text-sm);
  text-align: center;
  user-select: none;
  transition: background var(--os-motion-fast) var(--os-ease),
              border-color var(--os-motion-fast) var(--os-ease),
              color var(--os-motion-fast) var(--os-ease);
}
.os-chip:hover .os-chip-face { border-color: var(--os-line-strong); color: var(--os-ink); }
.os-chip input:checked + .os-chip-face {
  background: var(--os-fill-strong);
  border-color: var(--os-ink);
  box-shadow: inset 0 0 0 1px var(--os-ink);
  color: var(--os-ink);
  font-weight: var(--os-weight-medium);
}
.os-chip input:focus-visible + .os-chip-face { outline: 2px solid var(--os-focus); outline-offset: 2px; }
.os-chip-tier {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--os-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
}

/* Switch */
.os-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.os-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.os-switch-track {
  width: 2.5rem;
  height: 1.5rem;
  border-radius: var(--os-radius-full);
  background: var(--os-fill-strong);
  border: 1px solid var(--os-line-strong);
  position: relative;
  transition: background var(--os-motion-fast) var(--os-ease);
}
.os-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--os-radius-full);
  background: var(--os-ink-muted);
  transition: transform var(--os-motion-fast) var(--os-ease),
              background var(--os-motion-fast) var(--os-ease);
}
.os-switch input:checked + .os-switch-track { background: var(--os-success-wash); border-color: var(--os-success); }
.os-switch input:checked + .os-switch-track::after { transform: translateX(1rem); background: var(--os-success); }
.os-switch input:focus-visible + .os-switch-track { outline: 2px solid var(--os-focus); outline-offset: 2px; }

/* Tables */
.os-table-wrap {
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  background: var(--os-surface);
  overflow: hidden;
}
.os-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
  padding: var(--os-space-3);
  border-bottom: 1px solid var(--os-line);
}
.os-table-toolbar .os-input { min-height: 2rem; max-width: 18rem; }
.os-table-count { margin-left: auto; font-size: var(--os-text-sm); color: var(--os-ink-dim); font-variant-numeric: tabular-nums; }
/* position: relative so the scroller is the containing block for anything
   absolutely positioned in a cell. Without it such a box escapes the
   scroller, is measured against the page, and gives the document a
   sideways scrollbar on a phone. */
.os-table-scroll { overflow-x: auto; max-width: 100%; position: relative; }
/* Dense pages (Hunter, CRM, Ledger) opt out of the 14px body: a table sets
   its own step, and a page can raise it by overriding --os-table-text. */
.os-table {
  width: 100%;
  border-collapse: collapse;
  --os-table-text: var(--os-text-sm);
  font-size: var(--os-table-text);
}
.os-table th {
  text-align: left;
  font-weight: var(--os-weight-medium);
  color: var(--os-ink-dim);
  font-size: var(--os-text-xs);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
  padding: var(--os-space-3);
  border-bottom: 1px solid var(--os-line);
  white-space: nowrap;
  background: var(--os-surface);
}
.os-table td {
  padding: var(--os-space-3);
  border-bottom: 1px solid var(--os-line);
  vertical-align: top;
}
.os-table tbody tr:last-child td { border-bottom: 0; }
.os-table tbody tr:hover td { background: var(--os-fill); }
.os-table th.os-sortable { padding: 0; }
.os-table th.os-sortable button {
  display: flex;
  align-items: center;
  gap: var(--os-space-1);
  width: 100%;
  padding: var(--os-space-3);
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-align: left;
}
.os-table th.os-sortable button:hover { color: var(--os-ink); }
.os-sort-marker { font-size: var(--os-text-2xs); opacity: 0; }
.os-table th[aria-sort] .os-sort-marker { opacity: 1; color: var(--os-ink); }
.os-table-empty { padding: var(--os-space-6); text-align: center; color: var(--os-ink-muted); font-size: var(--os-text-base); }
.os-mono { font-family: var(--os-font-mono); font-size: var(--os-text-sm); color: var(--os-ink-muted); overflow-wrap: anywhere; }
.os-num { font-variant-numeric: tabular-nums; }

/* States: empty, loading, error */
.os-empty {
  border: 1px dashed var(--os-line-strong);
  border-radius: var(--os-radius-lg);
  padding: var(--os-space-5);
  font-size: var(--os-text-base);
  color: var(--os-ink-muted);
}
.os-empty-title { font-weight: var(--os-weight-medium); color: var(--os-ink); margin-bottom: var(--os-space-1); }
.os-empty-actions { margin-top: var(--os-space-3); display: flex; flex-wrap: wrap; gap: var(--os-space-2); }

.os-error {
  border: 1px solid var(--os-danger);
  background: var(--os-danger-wash);
  border-radius: var(--os-radius-lg);
  padding: var(--os-space-4) var(--os-space-5);
  font-size: var(--os-text-base);
}
.os-error-title { font-weight: var(--os-weight-medium); color: var(--os-danger); margin-bottom: var(--os-space-1); }

.os-notice {
  border: 1px solid var(--os-line-strong);
  background: var(--os-surface);
  border-radius: var(--os-radius-lg);
  padding: var(--os-space-3) var(--os-space-4);
  font-size: var(--os-text-base);
  margin-bottom: var(--os-space-5);
}

.os-loading { display: flex; flex-direction: column; gap: var(--os-space-2); }
.os-skeleton {
  height: 1rem;
  border-radius: var(--os-radius-sm);
  background: linear-gradient(90deg, var(--os-fill) 25%, var(--os-fill-strong) 37%, var(--os-fill) 63%);
  background-size: 400% 100%;
  animation: os-shimmer 1.4s ease infinite;
}
@keyframes os-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.os-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--os-line-strong);
  border-top-color: var(--os-ink);
  border-radius: var(--os-radius-full);
  animation: os-spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes os-spin { to { transform: rotate(360deg); } }

/* Modal */
.os-modal[hidden] { display: none; }
.os-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--os-space-4);
}
@media (min-width: 640px) { .os-modal { align-items: center; } }
.os-modal-backdrop { position: absolute; inset: 0; background: var(--os-backdrop); }
.os-modal-panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--os-surface);
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-xl);
  box-shadow: var(--os-shadow-lg);
  padding: var(--os-space-5);
  animation: os-rise var(--os-motion-base) var(--os-ease);
}
@keyframes os-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.os-modal-title { font-size: var(--os-text-lg); font-weight: var(--os-weight-medium); letter-spacing: -0.02em; }
.os-modal-body { margin-top: var(--os-space-2); font-size: var(--os-text-base); color: var(--os-ink-muted); }
.os-modal-foot { margin-top: var(--os-space-5); display: flex; justify-content: flex-end; gap: var(--os-space-2); }

/* Command palette */
.os-palette[hidden] { display: none; }
.os-palette {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--os-space-4);
  padding-top: 10vh;
}
.os-palette-panel {
  position: relative;
  width: 100%;
  max-width: 34rem;
  background: var(--os-surface);
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-xl);
  box-shadow: var(--os-shadow-lg);
  overflow: hidden;
  animation: os-rise var(--os-motion-base) var(--os-ease);
}
.os-palette-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--os-line);
  background: transparent;
  padding: var(--os-space-4);
  font-size: var(--os-text-md);
  outline: none;
}
.os-palette-list { max-height: 22rem; overflow-y: auto; padding: var(--os-space-2); }
.os-palette-group {
  padding: var(--os-space-2) var(--os-space-3) var(--os-space-1);
  font-size: var(--os-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--os-ink-dim);
}
.os-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-3);
  width: 100%;
  padding: var(--os-space-2) var(--os-space-3);
  border: 0;
  border-radius: var(--os-radius-md);
  background: transparent;
  text-align: left;
  font-size: var(--os-text-base);
  color: var(--os-ink);
  text-decoration: none;
  cursor: pointer;
}
.os-palette-item.is-active { background: var(--os-fill-strong); }
.os-palette-item .os-palette-meta { font-size: var(--os-text-xs); color: var(--os-ink-dim); }
.os-palette-empty { padding: var(--os-space-5); text-align: center; color: var(--os-ink-muted); font-size: var(--os-text-base); }
.os-palette-foot {
  display: flex;
  gap: var(--os-space-3);
  padding: var(--os-space-2) var(--os-space-4);
  border-top: 1px solid var(--os-line);
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
}

/* Toasts */
.os-toasts {
  position: fixed;
  right: var(--os-space-4);
  bottom: var(--os-space-4);
  left: var(--os-space-4);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--os-space-2);
  pointer-events: none;
}
.os-toast {
  pointer-events: auto;
  width: 100%;
  max-width: 24rem;
  display: flex;
  align-items: flex-start;
  gap: var(--os-space-3);
  background: var(--os-surface);
  border: 1px solid var(--os-line-strong);
  border-left-width: 3px;
  border-radius: var(--os-radius-lg);
  box-shadow: var(--os-shadow-md);
  padding: var(--os-space-3) var(--os-space-4);
  font-size: var(--os-text-base);
  animation: os-rise var(--os-motion-base) var(--os-ease);
}
.os-toast.is-leaving { opacity: 0; transition: opacity var(--os-motion-base) var(--os-ease); }
.os-toast-success { border-left-color: var(--os-success); }
.os-toast-error { border-left-color: var(--os-danger); }
.os-toast-warn { border-left-color: var(--os-warn); }
.os-toast-info { border-left-color: var(--os-info); }
.os-toast-body { flex: 1; min-width: 0; }
.os-toast-close {
  background: none;
  border: 0;
  color: var(--os-ink-dim);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: var(--os-text-md);
}
.os-toast-close:hover { color: var(--os-ink); }
/* Hook (session D): the one action a toast may carry, which is what Undo is.
   Styled as a quiet button rather than a link so it reads as the thing to
   press, and given its own hit area so a thumb on a phone can reach it
   without landing on the dismiss cross beside it. */
.os-toast-action {
  flex: none;
  align-self: center;
  background: none;
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-sm);
  color: var(--os-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  min-height: 1.9rem;
}
.os-toast-action:hover { background: var(--os-surface-2); border-color: var(--os-ink-dim); }

/* Lists */
.os-list li {
  font-size: var(--os-text-md);
  color: var(--os-ink-muted);
  padding: var(--os-space-2) 0;
  border-bottom: 1px solid var(--os-line);
}
.os-list li:last-child { border-bottom: 0; }

.os-prose {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: var(--os-text-base);
  color: var(--os-ink-muted);
  max-height: 18rem;
  overflow-y: auto;
}

/* ---------- Gallery: picture-led tiles ------------------------------------
   A card grid where the image does the identifying. Used by Client Demos and
   available to any tool that lists things a person recognises by sight before
   they read the name.
   ------------------------------------------------------------------------- */

.os-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--os-space-4);
}

.os-tile {
  display: flex;
  flex-direction: column;
  background: var(--os-surface);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--os-motion-base) var(--os-ease),
              box-shadow var(--os-motion-base) var(--os-ease),
              transform var(--os-motion-base) var(--os-ease);
}
a.os-tile:hover {
  border-color: var(--os-line-strong);
  box-shadow: var(--os-shadow-md);
  transform: translateY(-2px);
}
a.os-tile:focus-visible { outline: 2px solid var(--os-focus); outline-offset: 2px; }

.os-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  max-width: 100%;
  background: var(--os-surface-2);
  border-bottom: 1px solid var(--os-line);
  overflow: hidden;
}
.os-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* No screenshot yet: a monogram on a colour derived from the slug, so a tile
   without a picture still looks deliberate and stays recognisable. */
.os-thumb-mono {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 1.5rem;
  font-weight: var(--os-weight-bold);
  letter-spacing: var(--os-tracking-tight);
  color: var(--os-thumb-ink);
  background:
    linear-gradient(135deg,
      hsl(var(--os-thumb-hue, 220) var(--os-thumb-sat) var(--os-thumb-l1)),
      hsl(calc(var(--os-thumb-hue, 220) + 35) var(--os-thumb-sat) var(--os-thumb-l2)));
}

.os-tile-body {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
  padding: var(--os-space-4);
  flex: 1;
}
.os-tile-title {
  font-size: var(--os-text-md);
  font-weight: var(--os-weight-bold);
  letter-spacing: var(--os-tracking-tight);
}
.os-tile-sub {
  font-size: var(--os-text-base);
  color: var(--os-ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.os-tile-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
}

/* ---------- Card toolbar: search and filter over a grid -------------------
   The same shape as .os-table-toolbar, wired by data-os-cards in os.js so a
   grid filters like a table does.
   ------------------------------------------------------------------------- */

.os-cards-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
  margin-bottom: var(--os-space-4);
}
.os-cards-toolbar .os-input { min-height: 2.25rem; max-width: 18rem; }
.os-cards-toolbar .os-select { min-height: 2.25rem; }
.os-cards-sort { max-width: 14rem; }
.os-cards-count {
  margin-left: auto;
  font-size: var(--os-text-sm);
  color: var(--os-ink-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- Document reader ----------------------------------------------
   Rendered Markdown (a client brief or proposal). Measure is capped because
   these are read end to end, not scanned.
   ------------------------------------------------------------------------- */

.os-doc {
  max-width: 72ch;
  font-size: var(--os-text-md);
  line-height: 1.65;
  color: var(--os-ink-muted);
}
.os-doc h2, .os-doc h3, .os-doc h4, .os-doc h5, .os-doc h6 {
  color: var(--os-ink);
  letter-spacing: var(--os-tracking-tight);
  margin: var(--os-space-6) 0 var(--os-space-2);
  line-height: 1.3;
}
.os-doc h2 { font-size: var(--os-text-xl); }
.os-doc h3 { font-size: var(--os-text-lg); }
.os-doc h4, .os-doc h5, .os-doc h6 { font-size: var(--os-text-md); }
.os-doc > *:first-child { margin-top: 0; }
.os-doc p { margin: 0 0 var(--os-space-4); }
.os-doc ul, .os-doc ol { margin: 0 0 var(--os-space-4); padding-left: var(--os-space-6); }
.os-doc li { margin-bottom: var(--os-space-1); }
.os-doc strong { color: var(--os-ink); font-weight: var(--os-weight-bold); }
.os-doc a { color: var(--os-ink); text-underline-offset: 2px; }
.os-doc code {
  font-family: var(--os-font-mono);
  font-size: 0.9em;
  background: var(--os-fill);
  border-radius: var(--os-radius-sm);
  padding: 0.1em 0.35em;
}
.os-doc pre {
  background: var(--os-surface-2);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  padding: var(--os-space-4);
  overflow-x: auto;
  margin: 0 0 var(--os-space-4);
}
.os-doc pre code { background: none; padding: 0; font-size: var(--os-text-sm); }
.os-doc blockquote {
  margin: 0 0 var(--os-space-4);
  padding-left: var(--os-space-4);
  border-left: 2px solid var(--os-line-strong);
  color: var(--os-ink-dim);
}
.os-doc hr { border: 0; border-top: 1px solid var(--os-line); margin: var(--os-space-8) 0; }
.os-doc table { margin-bottom: var(--os-space-4); }

/* ---------- 6. Utilities -------------------------------------------------- */

.os-stack { display: grid; gap: var(--os-space-3); }
.os-stack-sm { display: grid; gap: var(--os-space-2); }
.os-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--os-space-2); }
.os-row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--os-space-3); }
.os-grid-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--os-space-2); }
@media (min-width: 640px) { .os-grid-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.os-muted { color: var(--os-ink-muted); }
.os-dim { color: var(--os-ink-dim); }
.os-text-sm { font-size: var(--os-text-sm); }
.os-text-base { font-size: var(--os-text-base); }
.os-overline {
  font-size: var(--os-text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
  color: var(--os-ink-dim);
}
.os-mt-2 { margin-top: var(--os-space-2); }
.os-mt-3 { margin-top: var(--os-space-3); }
.os-mt-4 { margin-top: var(--os-space-4); }
.os-mb-3 { margin-bottom: var(--os-space-3); }
.os-mb-4 { margin-bottom: var(--os-space-4); }
.os-mb-6 { margin-bottom: var(--os-space-6); }
.os-break { overflow-wrap: anywhere; }
.os-nowrap { white-space: nowrap; }

/* ---------- 7. The Ledger ------------------------------------------------ */
/* Editor layout: form on the left, a sticky total and live document preview
   on the right. Collapses to one column below 1100px, where the preview sits
   under the form and the action bar sticks to the bottom of the viewport. */

.os-ledger-layout {
  display: grid;
  gap: var(--os-space-5);
  align-items: start;
}
@media (min-width: 1100px) {
  .os-ledger-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
    gap: var(--os-space-6);
  }
}
.os-ledger-form { display: grid; gap: var(--os-space-4); min-width: 0; }
.os-ledger-side { display: grid; gap: var(--os-space-4); min-width: 0; }
@media (min-width: 1100px) {
  .os-ledger-side {
    position: sticky;
    top: var(--os-space-5);
    max-height: calc(100vh - var(--os-space-10));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Field rows */
.os-field-row { display: grid; gap: var(--os-space-3); }
@media (min-width: 640px) {
  .os-field-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-field-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Segmented control */
.os-segment {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--os-fill);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-full);
}
.os-segment-option { position: relative; display: inline-flex; }
.os-segment-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.os-segment-option span {
  padding: 0.3rem var(--os-space-4);
  border-radius: var(--os-radius-full);
  font-size: var(--os-text-base);
  color: var(--os-ink-muted);
  min-height: 1.85rem;
  display: inline-flex;
  align-items: center;
  transition: background var(--os-motion-fast) var(--os-ease),
              color var(--os-motion-fast) var(--os-ease);
}
.os-segment-option input:hover + span { color: var(--os-ink); }
.os-segment-option input:checked + span {
  background: var(--os-surface);
  color: var(--os-ink);
  font-weight: var(--os-weight-bold);
  box-shadow: var(--os-shadow-sm);
}
.os-segment-option input:focus-visible + span {
  outline: 2px solid var(--os-focus);
  outline-offset: 2px;
}

/* Line items */
.os-items { display: grid; gap: var(--os-space-3); }
.os-item {
  display: grid;
  gap: var(--os-space-2);
  padding: var(--os-space-3);
  background: var(--os-surface-2);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
}
.os-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
}
.os-item-head .os-item-title { flex: 1 1 11rem; min-width: 0; font-weight: var(--os-weight-bold); }
.os-item-amount { flex: 0 0 7.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.os-item-qty { flex: 0 0 4.5rem; text-align: right; font-variant-numeric: tabular-nums; }

/* Template and offering cards, and the admin rows under them. */
.os-ledger-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: var(--os-space-3);
}
.os-ledger-cards > * { min-width: 0; }
.os-ledger-card-actions { display: flex; flex-wrap: wrap; gap: var(--os-space-2); margin-top: var(--os-space-3); }
.os-ledger-card.is-archived { opacity: 0.6; }
.os-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--os-space-2);
  padding: var(--os-space-3);
  background: var(--os-surface-2);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
}
@media (min-width: 720px) {
  .os-ledger-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; align-items: start; }
}
.os-preview-wrap .lg-sheet { box-shadow: 0 0 0 1px var(--os-line); }
.os-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-2);
  font-size: var(--os-text-sm);
  color: var(--os-ink-muted);
}
.os-item-toggle { display: inline-flex; align-items: center; gap: var(--os-space-2); cursor: pointer; }

/* Total panel */
.os-total-value {
  font-size: var(--os-text-2xl);
  font-weight: var(--os-weight-bold);
  letter-spacing: var(--os-tracking-tight);
  font-variant-numeric: tabular-nums;
}
.os-schedule { display: grid; gap: 0; margin-top: var(--os-space-3); }
.os-schedule-row {
  display: flex;
  justify-content: space-between;
  gap: var(--os-space-3);
  padding: var(--os-space-2) 0;
  border-bottom: 1px solid var(--os-line);
  font-size: var(--os-text-base);
}
.os-schedule-row:last-child { border-bottom: 0; }
.os-schedule-row span:last-child { font-variant-numeric: tabular-nums; font-weight: var(--os-weight-bold); }

/* Sticky action bar, small screens only */
.os-actionbar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: var(--os-space-2);
  padding: var(--os-space-3) 0;
  background: var(--os-bg);
  border-top: 1px solid var(--os-line);
}
.os-actionbar .os-btn { flex: 1 1 8rem; justify-content: center; }
@media (min-width: 1100px) { .os-actionbar { display: none; } }

/* Live preview: the document as it will print */
.os-preview-wrap { transition: opacity var(--os-motion-base) var(--os-ease); }
.os-preview-wrap[aria-busy='true'] { opacity: 0.45; }

/* The sheet itself is paper, styled in static/css/ledger-sheet.css and shared
   with the print page, so the preview is exactly what the PDF prints. */
/* ---------- 8. Workbench components --------------------------------------
   Added for the gm0d Suite, but deliberately generic: a tool sub nav, a media
   review grid, a key/value list and a determinate progress bar are things any
   internal tool with queues and uploads needs. Nothing here is gm0d specific.
   ------------------------------------------------------------------------ */

/* Sub navigation inside one tool. Sits under the page header. */
.os-subnav {
  display: flex;
  gap: var(--os-space-1);
  overflow-x: auto;
  border-bottom: 1px solid var(--os-line);
  margin-bottom: var(--os-space-6);
  scrollbar-width: none;
}
.os-subnav::-webkit-scrollbar { display: none; }
.os-subnav a {
  flex-shrink: 0;
  padding: var(--os-space-2) var(--os-space-3);
  font-size: var(--os-text-base);
  color: var(--os-ink-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  transition: color var(--os-motion-fast) var(--os-ease);
}
.os-subnav a:hover { color: var(--os-ink); }
.os-subnav a.is-active {
  color: var(--os-ink);
  border-bottom-color: var(--os-ink);
  font-weight: var(--os-weight-medium);
}

/* In-page tabs, switched by JavaScript. Use real buttons with aria-selected. */
.os-tabs {
  display: inline-flex;
  gap: var(--os-space-1);
  padding: var(--os-space-1);
  background: var(--os-fill);
  border-radius: var(--os-radius-md);
}
.os-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--os-ink-muted);
  font: inherit;
  font-size: var(--os-text-sm);
  padding: var(--os-space-1) var(--os-space-3);
  min-height: 1.85rem;
  border-radius: var(--os-radius-sm);
  cursor: pointer;
  transition: background var(--os-motion-fast) var(--os-ease);
}
.os-tab:hover { color: var(--os-ink); }
.os-tab[aria-selected='true'] {
  background: var(--os-surface);
  color: var(--os-ink);
  font-weight: var(--os-weight-medium);
  box-shadow: var(--os-shadow-sm);
}
.os-tab-count { font-variant-numeric: tabular-nums; opacity: 0.7; margin-left: 0.3rem; }

/* Media review grid: a thumbnail, a caption and a row of decisions. */
.os-media-grid {
  display: grid;
  gap: var(--os-space-3);
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.os-media-card {
  display: flex;
  flex-direction: column;
  background: var(--os-surface);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  overflow: hidden;
}
.os-media-card.is-busy { opacity: 0.5; }
.os-media-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  max-width: 100%;
  background: var(--os-surface-2);
  overflow: hidden;
}
.os-media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.os-media-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--os-ink-dim);
  font-size: var(--os-text-xs);
  text-align: center;
  padding: var(--os-space-3);
}
.os-media-body {
  padding: var(--os-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
  flex: 1;
}
.os-media-caption {
  font-size: var(--os-text-base);
  line-height: var(--os-leading);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.os-media-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--os-space-2); }

/* Key/value detail list. */
.os-kv { display: grid; gap: var(--os-space-2); margin: 0; }
.os-kv > div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: var(--os-space-3);
  font-size: var(--os-text-base);
}
@media (max-width: 599px) { .os-kv > div { grid-template-columns: 1fr; gap: 0; } }
.os-kv dt { color: var(--os-ink-dim); }
.os-kv dd { margin: 0; overflow-wrap: anywhere; }

/* Determinate progress. Always paired with visible text, never on its own. */
.os-progress {
  height: 4px;
  border-radius: var(--os-radius-full);
  background: var(--os-fill-strong);
  overflow: hidden;
}
.os-progress-bar {
  height: 100%;
  width: 0;
  background: var(--os-ink);
  transition: width var(--os-motion-base) var(--os-ease);
}
.os-progress-bar.is-error { background: var(--os-danger); }
.os-progress-bar.is-done { background: var(--os-success); }

/* Two column workbench: a picker beside a detail pane. */
.os-split { display: grid; gap: var(--os-space-5); align-items: start; }
@media (min-width: 900px) { .os-split { grid-template-columns: 18rem minmax(0, 1fr); } }
.os-picker {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-1);
  max-height: 26rem;
  overflow-y: auto;
}
.os-picker button {
  appearance: none;
  text-align: left;
  font: inherit;
  font-size: var(--os-text-base);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--os-radius-md);
  padding: var(--os-space-2) var(--os-space-3);
  color: var(--os-ink-muted);
  cursor: pointer;
  min-height: 2.25rem;
}
.os-picker button:hover { background: var(--os-fill); color: var(--os-ink); }
.os-picker button[aria-current='true'] {
  background: var(--os-fill-strong);
  color: var(--os-ink);
  font-weight: var(--os-weight-medium);
}
.os-picker-meta { display: block; font-size: var(--os-text-xs); color: var(--os-ink-dim); }

/* The avatar now lives with the brand components, section 12. */

/* Two column form row, collapsing to one on a phone. */
.os-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--os-space-4); }
@media (min-width: 640px) { .os-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* A grid item defaults to min-width: auto, so a wide table inside a section
   stretches the column to the table's intrinsic width and the whole page scrolls
   sideways, rather than the table scrolling inside .os-table-scroll. Above
   1024px the explicit minmax(0, 1fr) below already prevents this; below it,
   there is no template, so the column needs clamping here. */
.os-section > * { min-width: 0; }

/* A chip on its own rather than in a grid of them. Sizes to its label and sits
   left, instead of stretching full width and centring like a disabled button. */
.os-chip-inline { display: inline-block; }
.os-chip-inline .os-chip-face { text-align: left; }


/* The `hidden` attribute only sets `display: none` at user agent priority, so
   any class that sets display (.os-stack is `display: grid`) silently beats it
   and the element stays on screen. This is why .os-modal and .os-palette each
   carry their own `[hidden]` rule above. One rule for everything instead, so a
   tool toggling `el.hidden` gets what it asked for. */
[hidden] { display: none !important; }



/* Same min-width: auto trap as .os-section. A table or a long unbroken string
   inside a stack must not widen the page. */
.os-stack > *, .os-stack-sm > * { min-width: 0; }


/* ---------- 9. Score, detail list and split layout ------------------------
   Added for The Hunter, but deliberately generic: any tool that ranks rows or
   shows a record's facts needs these. Tokens only, no literals.
   ------------------------------------------------------------------------- */

/* A 0..100 bar. Used for need, value and priority, and for scan progress. */
.os-meter {
  display: block;
  width: 100%;
  height: 0.375rem;
  border-radius: var(--os-radius-full);
  background: var(--os-fill-strong);
  overflow: hidden;
}
.os-meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--os-ink-muted);
  transition: width var(--os-motion-slow) var(--os-ease);
}
.os-meter-success .os-meter-fill { background: var(--os-success); }
.os-meter-info    .os-meter-fill { background: var(--os-info); }
.os-meter-warn    .os-meter-fill { background: var(--os-warn); }
.os-meter-danger  .os-meter-fill { background: var(--os-danger); }

/* Number over a bar over a caption. The unit the ranked table is built from. */
.os-score { display: grid; gap: var(--os-space-1); min-width: 4.5rem; }
.os-score-value {
  font-size: var(--os-text-lg);
  font-weight: var(--os-weight-bold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.os-score-label {
  font-size: var(--os-text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
  color: var(--os-ink-dim);
}

/* Label and value pairs: the facts half of a record page. */
.os-dl { display: grid; gap: 0; margin: 0; }
.os-dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--os-space-1);
  padding: var(--os-space-2) 0;
  border-bottom: 1px solid var(--os-line);
}
.os-dl > div:last-child { border-bottom: 0; }
.os-dl dt {
  font-size: var(--os-text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
  color: var(--os-ink-dim);
}
.os-dl dd {
  margin: 0;
  font-size: var(--os-text-base);
  color: var(--os-ink);
  overflow-wrap: anywhere;
}
@media (min-width: 560px) {
  .os-dl > div {
    grid-template-columns: 11rem minmax(0, 1fr);
    align-items: baseline;
    gap: var(--os-space-3);
  }
}

/* A record page: the main column, and a narrower column of actions and facts.
   One column until there is genuinely room for two. */
.os-split { display: grid; gap: var(--os-space-5); align-items: start; }
.os-split > * { min-width: 0; }
@media (min-width: 1100px) {
  .os-split { grid-template-columns: minmax(0, 1fr) 20rem; }
}

/* Numbered evidence list. Each item is something you can say on the call. */
.os-reasons { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--os-space-2); }
.os-reasons li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: var(--os-space-2);
  font-size: var(--os-text-base);
  color: var(--os-ink-muted);
}
.os-reasons li::before {
  content: counter(os-reason);
  counter-increment: os-reason;
  font-size: var(--os-text-2xs);
  font-variant-numeric: tabular-nums;
  color: var(--os-ink-dim);
  text-align: right;
  line-height: 1.6;
}
.os-reasons { counter-reset: os-reason; }

/* A row of score blocks. Wraps rather than squashing the bars. */
.os-score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--os-space-6);
}


/* ---------- 10. Taskforce -------------------------------------------------- */
/* Boards, columns, cards and the list view. Every value is a token: the only
   literals below are the layout numbers that have no token (column widths and
   the drag elevation), which is the same licence .os-table takes. */

/* ---- Dashboard: board cards ---- */
.os-tf-boards {
  display: grid;
  gap: var(--os-space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.os-tf-board {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--os-space-3);
  background: var(--os-surface);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  padding: var(--os-space-4) var(--os-space-5);
  transition: border-color var(--os-motion-fast) var(--os-ease),
              box-shadow var(--os-motion-fast) var(--os-ease);
}
.os-tf-board:hover { border-color: var(--os-line-strong); box-shadow: var(--os-shadow-sm); }
/* The card keeps focus visible even though the link is what receives it. */
.os-tf-board:focus-within { border-color: var(--os-focus); box-shadow: 0 0 0 2px var(--os-focus); }

.os-tf-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--os-space-3);
}
.os-tf-board-name {
  margin: 0;
  font-size: var(--os-text-md);
  font-weight: var(--os-weight-medium);
  letter-spacing: var(--os-tracking-tight);
  overflow-wrap: anywhere;
}
/* Stretched link: the whole card is clickable, the delete button is not part
   of it. Needs the button to sit above in the stacking order, below. */
.os-tf-board-link { color: inherit; text-decoration: none; }
.os-tf-board-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.os-tf-board-link:focus-visible { outline: none; }
.os-tf-board-delete { position: relative; z-index: 1; flex: none; }
/* Reveal on hover or focus so the card stays calm, but never hide it from a
   keyboard or a touch screen, where there is no hover to discover it with. */
@media (hover: hover) and (pointer: fine) {
  .os-tf-board-delete { opacity: 0; transition: opacity var(--os-motion-fast) var(--os-ease); }
  .os-tf-board:hover .os-tf-board-delete,
  .os-tf-board-delete:focus-visible { opacity: 1; }
}

.os-tf-board-desc {
  margin: 0;
  flex: 1;
  color: var(--os-ink-muted);
  font-size: var(--os-text-sm);
}
/* The bar and its percent sit on one line: the number is what people read,
   the bar is what they glance at. */
.os-tf-progress-row {
  display: flex;
  align-items: center;
  gap: var(--os-space-3);
}
.os-tf-progress {
  flex: 1;
  height: 4px;
  border-radius: var(--os-radius-full);
  background: var(--os-fill-strong);
  overflow: hidden;
}
.os-tf-progress-label {
  flex: none;
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
  font-variant-numeric: tabular-nums;
}
.os-tf-progress-fill {
  display: block;
  height: 100%;
  background: var(--os-success);
  border-radius: inherit;
  transition: width var(--os-motion-base) var(--os-ease);
}
.os-tf-board-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
}
.os-tf-stat strong { color: var(--os-ink); font-weight: var(--os-weight-medium); }
/* Faces go to the far end of the stats row, away from the counts. They sit
   above the stretched link so the tooltip on each one is reachable. */
.os-tf-board-members { position: relative; z-index: 1; margin-left: auto; }

/* ---- Board page: header stats ---- */
/* Four numbers under the board name, rendered by Jinja and then kept in step
   by renderSummary(). Big and quiet: the only colour is an overdue count that
   is not zero, which is the one number worth interrupting for. */
.os-tf-statstrip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--os-space-6);
  /* The page header's own rule is directly above, so the strip needs no
     border of its own, only room on both sides of it. */
  margin-top: var(--os-space-5);
  padding-bottom: var(--os-space-6);
}
.os-tf-statcell { display: grid; gap: 2px; }
.os-tf-statvalue {
  font-size: var(--os-text-xl);
  font-weight: var(--os-weight-bold);
  line-height: 1.1;
  letter-spacing: var(--os-tracking-tight);
  font-variant-numeric: tabular-nums;
}
.os-tf-statvalue.is-alert { color: var(--os-danger); }
.os-tf-statvalue.is-warn { color: var(--os-warn); }
/* Percent on top, bar underneath, the bar as wide as the widest number cell
   so it reads as a gauge rather than a rule. */
.os-tf-statcell--progress { align-content: start; min-width: 7rem; }
.os-tf-statcell--progress .os-tf-progress { flex: none; margin-top: var(--os-space-1); }
.os-tf-statlabel {
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
}

/* The avatars sit inside the button, so the gap is the button's own, not the
   stack's: the label has to clear the last face. */
.os-tf-members-btn { gap: var(--os-space-2); }

/* ---- Board page: toolbar ---- */
.os-tf { display: flex; flex-direction: column; gap: var(--os-space-4); }

.os-tf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-3);
}
.os-tf-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
  flex: 1;
}
.os-tf-search { max-width: 18rem; flex: 1 1 10rem; }
.os-tf-toolbar .os-select { max-width: 11rem; }

.os-tf-viewswitch { display: flex; gap: var(--os-space-1); flex: none; }
.os-tf-viewswitch .os-btn.is-active {
  background: var(--os-inverse-bg);
  color: var(--os-inverse-ink);
  border-color: var(--os-inverse-bg);
}

.os-tf-summary {
  margin: 0;
  color: var(--os-ink-dim);
  font-size: var(--os-text-xs);
}

/* ---- Columns ---- */
/* .os-tf-columns sets display, so it needs an explicit hidden rule or the
   view switch cannot put it away. Same reason as .os-modal[hidden] above. */
.os-tf-columns[hidden],
.os-tf-listwrap[hidden] { display: none; }

/* One track per list. The runtime sets --tf-cols, and the fallback of 4 is
   what the board looked like when four columns were all there could be. */
.os-tf-columns {
  display: grid;
  grid-template-columns: repeat(var(--tf-cols, 4), minmax(0, 1fr));
  gap: var(--os-space-4);
  align-items: start;
}
/* Past five lists a track is narrower than a card, so the board scrolls
   sideways instead, exactly as it does on a narrow screen. */
.os-tf-columns--many {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: var(--os-space-2);
  margin-inline: calc(var(--os-space-1) * -1);
  padding-inline: var(--os-space-1);
}
.os-tf-columns--many .os-tf-column {
  flex: 0 0 min(19rem, 82vw);
  scroll-snap-align: start;
}
.os-tf-column {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-3);
  background: var(--os-surface-2);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  padding: var(--os-space-4) var(--os-space-3);
  min-width: 0;
  /* The fallback matters: a status the model gains before this file does
     still gets a marker, just a neutral one. */
  --tf-accent: var(--os-line-strong);
}
/* Each column's accent, and the one place a status turns into a colour. To do
   is dim because it is the resting state and should not shout. Working is ink.
   Stuck is the only column worth a warning. Done is green, with its cards
   dimmed so finished work recedes without disappearing. */
.os-tf-column--todo { --tf-accent: var(--os-ink-dim); }
.os-tf-column--working { --tf-accent: var(--os-ink); }
.os-tf-column--stuck { --tf-accent: var(--os-warn); }
.os-tf-column--done { --tf-accent: var(--os-success); }
/* Green and the dimming follow the board's *done list*, not the id "done": a
   board whose finished column is called Shipped reads the same way. The four
   ids above keep their colours so a board that has never had its lists changed
   looks exactly as it did, and a list an owner added takes the neutral accent
   .os-tf-column sets. */
.os-tf-column.is-done { --tf-accent: var(--os-success); }
.os-tf-column.is-done .os-tf-card { opacity: 0.72; }
/* Reading or reaching for a finished card brings it back to full strength. */
.os-tf-column.is-done .os-tf-card:hover,
.os-tf-column.is-done .os-tf-card:focus-visible { opacity: 1; }

.os-tf-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-2);
  padding-inline: var(--os-space-1);
  padding-bottom: var(--os-space-2);
  border-bottom: 1px solid var(--os-line);
}
.os-tf-column-heading {
  display: flex;
  align-items: center;
  gap: var(--os-space-2);
  min-width: 0;
}
.os-tf-column-marker {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: var(--os-radius-full);
  background: var(--tf-accent);
}
.os-tf-column-name {
  margin: 0;
  font-size: var(--os-text-2xs);
  font-weight: var(--os-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
  color: var(--os-ink-muted);
}
.os-tf-count {
  flex: none;
  padding: 1px var(--os-space-2);
  border-radius: var(--os-radius-full);
  background: var(--os-fill);
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.os-tf-cards {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
  min-height: 3rem;
}
.os-tf-column-empty {
  margin: 0;
  padding: var(--os-space-4) var(--os-space-3);
  text-align: center;
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
  border: 1px dashed var(--os-line);
  border-radius: var(--os-radius-md);
}

/* ---- Cards ---- */
.os-tf-card {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
  background: var(--os-surface);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  padding: var(--os-space-3);
  cursor: grab;
  /* Vertical panning stays with the page so a phone can scroll the column.
     The grip opts out of that and takes the gesture instead. */
  touch-action: pan-y;
  transition: border-color var(--os-motion-fast) var(--os-ease),
              box-shadow var(--os-motion-fast) var(--os-ease),
              opacity var(--os-motion-fast) var(--os-ease);
}
.os-tf-card:hover { border-color: var(--os-line-strong); }
.os-tf-card:focus-visible {
  outline: 2px solid var(--os-focus);
  outline-offset: 2px;
  border-color: var(--os-focus);
}
.os-tf-card.is-done .os-tf-card-title { color: var(--os-ink-muted); text-decoration: line-through; }
.os-tf-card.is-overdue { border-left: 2px solid var(--os-danger); }
/* A card the server has not confirmed yet. It is already usable, just not
   yet certain, so it dims rather than blocking. */
.os-tf-card.is-pending { opacity: 0.55; cursor: progress; }
.os-tf-card.is-dragging {
  cursor: grabbing;
  box-shadow: var(--os-shadow-lg);
  border-color: var(--os-line-strong);
  transform: rotate(1.5deg);
  opacity: 0.95;
}
body.os-tf-dragging { cursor: grabbing; user-select: none; }

.os-tf-card-top { display: flex; align-items: flex-start; gap: var(--os-space-2); }

/* The drag handle. On a pointer device the whole card drags and this is just
   an affordance; on touch it is the only thing that starts a drag. */
.os-tf-grip {
  flex: none;
  align-self: stretch;
  width: 12px;
  min-height: 1rem;
  margin-inline-start: calc(var(--os-space-1) * -1);
  border-radius: var(--os-radius-sm);
  touch-action: none;
  cursor: grab;
  background-image: radial-gradient(var(--os-line-strong) 1px, transparent 1px);
  background-size: 4px 4px;
  background-position: center;
  background-repeat: repeat;
  opacity: 0.5;
  transition: opacity var(--os-motion-fast) var(--os-ease);
}
.os-tf-card:hover .os-tf-grip,
.os-tf-card:focus-visible .os-tf-grip { opacity: 1; }
/* The title is the card. It goes first, at the one step above body size, and
   everything else on the card is smaller than it. The priority used to be a
   coloured bar to the left of this line; it is a pill in the meta row now, so
   the title starts at the card's edge like a heading should. */
.os-tf-card-title {
  margin: 0;
  font-size: var(--os-text-md);
  font-weight: var(--os-weight-bold);
  line-height: 1.35;
  letter-spacing: var(--os-tracking-tight);
  overflow-wrap: anywhere;
}

.os-tf-card-notes {
  margin: 0;
  font-size: var(--os-text-xs);
  color: var(--os-ink-muted);
  /* Two lines of context, then the detail dialog has the rest. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.os-tf-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
}
.os-tf-due {
  font-size: var(--os-text-2xs);
  padding: 2px var(--os-space-2);
  border-radius: var(--os-radius-full);
  background: var(--os-fill);
  color: var(--os-ink-muted);
  white-space: nowrap;
}
.os-tf-due.is-overdue { background: var(--os-danger-wash); color: var(--os-danger); }
.os-tf-due.is-today { background: var(--os-warn-wash); color: var(--os-warn); }
.os-tf-due.is-soon { background: var(--os-info-wash); color: var(--os-info); }
/* The face goes to the far end of the meta row, so a column of cards reads as
   one column of faces rather than a ragged edge of email addresses. The email
   is the avatar's tooltip, which is where OS.avatar() puts it. */
.os-tf-card-avatar { margin-left: auto; }

/* The list view has room for both, so it shows the face and the address. */
.os-tf-assignee {
  display: inline-flex;
  align-items: center;
  gap: var(--os-space-2);
  min-width: 0;
}
.os-tf-assignee-email {
  font-size: var(--os-text-xs);
  color: var(--os-ink-muted);
  overflow-wrap: anywhere;
}

/* Where the card will land. */
.os-tf-placeholder {
  border: 1px dashed var(--os-line-strong);
  border-radius: var(--os-radius-md);
  background: var(--os-fill);
}

/* ---- Quick add ---- */
.os-tf-quickadd { display: flex; }
.os-tf-quickadd-input {
  background: transparent;
  border-style: dashed;
  font-size: var(--os-text-sm);
}
.os-tf-quickadd-input:focus {
  background: var(--os-surface);
  border-style: solid;
}

/* ---- List view ---- */
.os-tf-table { font-size: var(--os-text-sm); }
.os-tf-row { cursor: pointer; }
.os-tf-row.is-done .os-tf-row-title { color: var(--os-ink-muted); text-decoration: line-through; }
.os-tf-row:focus-visible { outline: 2px solid var(--os-focus); outline-offset: -2px; }
.os-tf-row-title { display: block; overflow-wrap: anywhere; }
.os-tf-row-notes {
  display: block;
  margin-top: 2px;
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 28rem;
}
.os-tf-inline-status { min-width: 7rem; }

/* ---- Detail dialog ---- */
.os-tf-detail-grid {
  display: grid;
  gap: var(--os-space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.os-tf-detail-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-3);
  padding-top: var(--os-space-3);
  border-top: 1px solid var(--os-line);
}
.os-tf-detail-meta { font-size: var(--os-text-xs); color: var(--os-ink-dim); }

.os-tf-keys {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--os-space-2) var(--os-space-4);
  margin: 0;
  align-items: baseline;
}
.os-tf-keys dt { margin: 0; white-space: nowrap; }
.os-tf-keys dd { margin: 0; font-size: var(--os-text-sm); color: var(--os-ink-muted); }

/* ---- Members ---- */
.os-tf-members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
}
.os-tf-member {
  display: flex;
  align-items: center;
  gap: var(--os-space-3);
  padding: var(--os-space-2) var(--os-space-3);
  border-bottom: 1px solid var(--os-line);
}
.os-tf-member:last-child { border-bottom: none; }
.os-tf-member-who {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: var(--os-space-2);
}
.os-tf-member-email {
  font-size: var(--os-text-sm);
  overflow-wrap: anywhere;
}
.os-tf-member-you {
  flex: none;
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
}
/* The role select and the remove button keep their own width so the emails
   in the column above them line up. */
.os-tf-member > .os-select,
.os-tf-member > .os-badge,
.os-tf-member > .os-btn { flex: none; }
.os-tf-member > .os-select { width: auto; min-width: 7rem; }

/* ---- The owner's lists editor ---- */
/* One row per list: its name in a text box, then the controls that move it,
   make it the done list, or remove it. The name is the widest thing in the row
   because renaming is what an owner comes here to do. */
.os-tf-lists {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
}
.os-tf-list-row {
  display: flex;
  align-items: center;
  gap: var(--os-space-2);
  padding: var(--os-space-2);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  background: var(--os-surface-2);
}
.os-tf-list-row.is-done { border-color: var(--os-success); }
.os-tf-list-name { flex: 1 1 auto; min-width: 0; }
.os-tf-list-tools {
  display: flex;
  align-items: center;
  gap: var(--os-space-1);
  flex: none;
}
@media (max-width: 640px) {
  /* The row runs out of width long before the controls do, so it stacks. */
  .os-tf-list-row { flex-wrap: wrap; }
  .os-tf-list-name { flex: 1 1 100%; }
  .os-tf-list-tools { flex-wrap: wrap; }
}

.os-tf-member-add {
  display: flex;
  align-items: flex-end;
  gap: var(--os-space-3);
}
.os-tf-member-add .os-field { flex: 1 1 auto; min-width: 0; margin: 0; }
.os-tf-member-add .os-field:nth-child(2) { flex: 0 0 8rem; }
.os-tf-member-add .os-btn { flex: none; }

/* ---- Attachments ----
   The cover sits above the card's title, which is where the eye lands, and it
   is the only thing on a card allowed to bleed to its edges: the card's own
   padding is cancelled so the image reads as the card's face rather than as a
   picture pasted onto it. A fixed aspect ratio keeps a column of cards from
   jumping about as covers of different shapes load. */
.os-tf-cover {
  margin: calc(var(--os-space-3) * -1) calc(var(--os-space-3) * -1) 0;
  border-radius: calc(var(--os-radius-md) - 1px) calc(var(--os-radius-md) - 1px) 0 0;
  overflow: hidden;
  background: var(--os-fill);
  aspect-ratio: 16 / 9;
  max-width: 100%;
}
.os-tf-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* The paperclip count, alongside the priority pill and the due chip. */
.os-tf-clip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--os-text-2xs);
  color: var(--os-ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- The card dialog ---- */
/* Wider than the other dialogs on purpose: this one holds seven sections, and
   at 32rem the checklists and the timeline both wrap into columns of two or
   three words. Still one column, because a card is read top to bottom. */
#tfTaskDetail .os-modal-panel { max-width: 44rem; }

/* The cover, at the top of the dialog as it is at the top of the card face.
   Bled to the panel's edges sideways but not upwards, so it sits under the
   dialog's own title rather than over it. Capped by height rather than aspect
   ratio, so a tall image cannot push the title off the first screen. */
.os-tf-detail-cover {
  margin: 0 calc(var(--os-space-5) * -1);
  overflow: hidden;
  background: var(--os-surface-2);
}
.os-tf-detail-cover[hidden] { display: none; }
.os-tf-detail-cover img {
  display: block;
  width: 100%;
  max-height: 14rem;
  object-fit: cover;
}

/* The two sections above the title are the card's header rather than sections
   of its body, so they carry no rule. The body's sections all do. */
.os-tf-detail > .os-tf-section:first-of-type,
.os-tf-detail > .os-tf-detail-cover + .os-tf-section {
  padding-top: 0;
  border-top: 0;
}

/* ---- The card dialog's sections ---- */
/* Labels, checklists, attachments and activity arrived from four different
   branches, each with its own idea of what a section looks like. They are one
   thing now: a rule above, the same gap inside, and one heading style, so the
   dialog reads as a list of sections rather than a pile of them. */
.os-tf-section {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-3);
  padding-top: var(--os-space-4);
  border-top: 1px solid var(--os-line);
}
/* The first section sits under the card's own fields, which already end in a
   gap, so it does not need a second rule to separate it. */
.os-tf-section + .os-tf-section { margin-top: 0; }
.os-tf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-3);
  min-height: 1.75rem;
}
.os-tf-section-title {
  margin: 0;
  font-size: var(--os-text-sm);
  font-weight: var(--os-weight-bold);
  letter-spacing: var(--os-tracking-tight);
  color: var(--os-ink);
}
/* A count beside a heading is meta, not part of the name of the section. */
.os-tf-section-title > span {
  font-weight: var(--os-weight-regular);
  color: var(--os-ink-dim);
}
.os-tf-attach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
}
.os-tf-attach {
  display: flex;
  align-items: center;
  gap: var(--os-space-3);
  padding: var(--os-space-2);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  background: var(--os-surface);
  min-width: 0;
}
/* The row that is the card's cover, marked by its border rather than by a
   badge: the "Cover" word is already in the row's meta line. */
.os-tf-attach.is-cover { border-color: var(--os-line-strong); box-shadow: inset 0 0 0 1px var(--os-line-strong); }
.os-tf-attach-thumb {
  flex: none;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-sm);
  overflow: hidden;
  background: var(--os-fill);
  cursor: zoom-in;
}
.os-tf-attach-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.os-tf-attach-thumb:focus-visible { outline: 2px solid var(--os-focus); outline-offset: 2px; }
/* A file that is not an image shows its extension. Three letters say more
   about a spreadsheet than a generic document icon does, and it needs no
   image to load. */
.os-tf-attach-glyph {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-sm);
  background: var(--os-fill);
  font-size: var(--os-text-2xs);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.04em;
  color: var(--os-ink-muted);
}
.os-tf-attach-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.os-tf-attach-name {
  font-size: var(--os-text-sm);
  font-weight: var(--os-weight-medium);
  color: var(--os-ink);
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.os-tf-attach-name:hover { text-decoration: underline; }
.os-tf-attach-meta { font-size: var(--os-text-2xs); color: var(--os-ink-dim); }
.os-tf-attach-tools { flex: none; display: flex; gap: var(--os-space-1); }

/* The drop zone is a button as well as a target, so the keyboard and the
   mouse reach the same thing and there are not two affordances to choose
   between. */
.os-tf-drop {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: var(--os-space-4) var(--os-space-3);
  text-align: center;
  border: 1px dashed var(--os-line-strong);
  border-radius: var(--os-radius-md);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--os-motion-fast) var(--os-ease),
              background var(--os-motion-fast) var(--os-ease);
}
.os-tf-drop:hover { border-color: var(--os-ink-dim); }
.os-tf-drop:focus-visible { outline: 2px solid var(--os-focus); outline-offset: 2px; }
.os-tf-drop.is-over { border-color: var(--os-focus); background: var(--os-fill); }
.os-tf-drop.is-busy { cursor: progress; opacity: 0.6; }
.os-tf-drop-main { font-size: var(--os-text-sm); color: var(--os-ink); }
.os-tf-drop-hint { font-size: var(--os-text-2xs); color: var(--os-ink-dim); }

.os-tf-attach-tools-block { display: flex; flex-direction: column; gap: var(--os-space-3); }
.os-tf-attach-link { display: flex; align-items: flex-end; gap: var(--os-space-3); }
.os-tf-attach-link .os-field { flex: 1 1 auto; min-width: 0; margin: 0; }
.os-tf-attach-link .os-field:nth-child(2) { flex: 0 0 10rem; }
.os-tf-attach-link .os-btn { flex: none; }

/* ---- The lightbox ---- */
.os-tf-lightbox { margin: 0; display: flex; flex-direction: column; gap: var(--os-space-2); }
.os-tf-lightbox img {
  display: block;
  max-width: 100%;
  /* Tall enough to be worth opening, short enough that the caption and the
     dialog's own buttons stay on screen without scrolling. */
  max-height: 70vh;
  margin-inline: auto;
  object-fit: contain;
  border-radius: var(--os-radius-sm);
  background: var(--os-fill);
}
.os-tf-lightbox figcaption { display: flex; flex-wrap: wrap; gap: var(--os-space-3); justify-content: space-between; }
.os-tf-lightbox-open { color: var(--os-ink-muted); }

/* ---- Responsive ---- */
/* Four columns need roughly 900px to stay readable. Below that the board
   scrolls sideways with columns wide enough to hold a card, which beats
   squeezing four columns into a phone. */
@media (max-width: 1100px) {
  .os-tf-columns {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: var(--os-space-2);
    /* Room for the focus ring on the first and last column. */
    margin-inline: calc(var(--os-space-1) * -1);
    padding-inline: var(--os-space-1);
  }
  .os-tf-column {
    flex: 0 0 min(19rem, 82vw);
    scroll-snap-align: start;
  }
}
@media (max-width: 640px) {
  /* Stack the toolbar. The children have to drop their flex-grow with it:
     once the container is a column, `flex: 1` grows along the vertical axis
     and the search box and buttons inflate to fill the row. */
  .os-tf-toolbar { flex-direction: column; align-items: stretch; }
  .os-tf-toolbar-main { flex-direction: column; align-items: stretch; flex: none; }
  .os-tf-toolbar-main > * { flex: none; }
  .os-tf-search,
  .os-tf-toolbar .os-select { max-width: none; }
  /* os-btn-sm drops below the 36px tap target the design system asks for.
     That is fine in a dense table row, but every control in this toolbar is
     something you tap on a phone. */
  .os-tf-toolbar .os-btn { min-height: 2.25rem; }
  .os-tf-viewswitch .os-btn { flex: 1; }
  .os-tf-statstrip { gap: var(--os-space-5); }
  .os-tf-statvalue { font-size: var(--os-text-lg); }
  .os-tf-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .os-tf-member-add { flex-direction: column; align-items: stretch; }
  .os-tf-member-add .os-field:nth-child(2) { flex: none; }
  .os-tf-member { flex-wrap: wrap; }
  .os-tf-detail-foot { flex-direction: column; align-items: stretch; }
  .os-tf-attach-link { flex-direction: column; align-items: stretch; }
  .os-tf-attach-link .os-field:nth-child(2) { flex: none; }
  .os-tf-attach { flex-wrap: wrap; }
  .os-tf-attach-tools { width: 100%; }
  .os-tf-row-notes { max-width: 14rem; }
}

@media (prefers-reduced-motion: reduce) {
  .os-tf-card.is-dragging { transform: none; }
}

/* ---- Checklists and labels ---- */
/* Two things share this block because they share a home: both show as a small
   badge on the card face and as a section in the card dialog, so they use the
   same chip metrics and the same restraint. Nothing here is a literal colour;
   the eight label colours come from the --os-label-* tokens at the top of the
   file, which is what keeps a stored label readable in both themes. */

/* The chips on a card face. A row that wraps rather than scrolls: a card is
   allowed to get taller, but never wider than its column. */
.os-tf-labels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--os-space-1);
}
.os-tf-label {
  display: inline-flex;
  align-items: center;
  gap: var(--os-space-1);
  max-width: 100%;
  padding: 1px var(--os-space-2);
  border: 1px solid var(--tf-label, var(--os-line-strong));
  border-radius: var(--os-radius-full);
  background: var(--tf-label-wash, var(--os-fill));
  color: var(--tf-label, var(--os-ink-muted));
  font-size: var(--os-text-2xs);
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.os-tf-label--green { --tf-label: var(--os-label-green); --tf-label-wash: var(--os-label-green-wash); }
.os-tf-label--teal { --tf-label: var(--os-label-teal); --tf-label-wash: var(--os-label-teal-wash); }
.os-tf-label--blue { --tf-label: var(--os-label-blue); --tf-label-wash: var(--os-label-blue-wash); }
.os-tf-label--purple { --tf-label: var(--os-label-purple); --tf-label-wash: var(--os-label-purple-wash); }
.os-tf-label--pink { --tf-label: var(--os-label-pink); --tf-label-wash: var(--os-label-pink-wash); }
.os-tf-label--red { --tf-label: var(--os-label-red); --tf-label-wash: var(--os-label-red-wash); }
.os-tf-label--orange { --tf-label: var(--os-label-orange); --tf-label-wash: var(--os-label-orange-wash); }
.os-tf-label--grey { --tf-label: var(--os-label-grey); --tf-label-wash: var(--os-label-grey-wash); }

/* A label with no name is still a colour somebody chose, so the chip keeps a
   minimum width rather than collapsing to its border. */
.os-tf-label:empty { min-width: 1.75rem; min-height: 0.9rem; }

/* The picker in the card dialog: the same chips, as buttons that toggle. An
   unapplied label is drawn quietly so the ones that are on the card read first. */
.os-tf-label-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--os-space-1);
}
.os-tf-label-toggle {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--os-motion-fast) var(--os-ease);
}
.os-tf-label-toggle:hover { opacity: 0.8; }
.os-tf-label-toggle.is-on { opacity: 1; font-weight: var(--os-weight-medium); }
.os-tf-label-toggle:focus-visible {
  outline: 2px solid var(--os-focus);
  outline-offset: 2px;
  opacity: 1;
}
.os-tf-label-toggle[disabled] { cursor: default; }

/* The count on the card face. Not a pill: it sits next to the due chip and the
   priority pill, and a third pill in that row would be a row of pills. */
.os-tf-checkcount {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  font-variant-numeric: tabular-nums;
}
.os-tf-checkcount.is-complete { color: var(--os-success); }
.os-tf-checkcount-tick { font-size: 0.8em; line-height: 1; }

/* ---- The checklists section in the card dialog ---- */
.os-tf-checklists {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--os-space-4);
}
.os-tf-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
}
.os-tf-checklist-head {
  display: flex;
  align-items: center;
  gap: var(--os-space-2);
}
.os-tf-checklist-title { flex: 1 1 auto; min-width: 0; }
/* The read only version of the same slot, for a viewer, who gets a heading
   where an editor gets a text box. */
h4.os-tf-checklist-title {
  margin: 0;
  font-size: var(--os-text-sm);
  font-weight: var(--os-weight-medium);
}
.os-tf-checklist-progress {
  flex: none;
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  font-variant-numeric: tabular-nums;
}
/* A thin bar under the title. The number above already says 3/5, so this only
   has to give the shape of it at a glance. */
.os-tf-checklist-bar {
  height: 3px;
  border-radius: var(--os-radius-full);
  background: var(--os-fill-strong);
  overflow: hidden;
}
.os-tf-checklist-bar-fill {
  display: block;
  height: 100%;
  background: var(--os-success);
  transition: width var(--os-motion-base) var(--os-ease);
}
.os-tf-check-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.os-tf-check-item {
  display: flex;
  align-items: flex-start;
  gap: var(--os-space-2);
  padding: var(--os-space-1) 0;
  border-bottom: 1px solid var(--os-line);
}
.os-tf-check-item:last-child { border-bottom: none; }
.os-tf-check-item > input[type='checkbox'] {
  flex: none;
  /* Lines up with the first line of the text rather than the middle of a
     wrapped item. */
  margin-top: 0.2rem;
}
.os-tf-check-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--os-text-sm);
  overflow-wrap: anywhere;
  cursor: text;
}
.os-tf-check-item.is-done .os-tf-check-text {
  color: var(--os-ink-muted);
  text-decoration: line-through;
}
.os-tf-check-who {
  flex: none;
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
}
.os-tf-check-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
@media (hover: hover) {
  /* The move and delete controls are noise until you are on the row. */
  .os-tf-check-tools { opacity: 0; transition: opacity var(--os-motion-fast) var(--os-ease); }
  .os-tf-check-item:hover .os-tf-check-tools,
  .os-tf-check-tools:focus-within { opacity: 1; }
}
.os-tf-check-add { display: flex; gap: var(--os-space-2); }
.os-tf-check-add .os-input { flex: 1 1 auto; min-width: 0; }
.os-tf-check-add .os-btn { flex: none; }

/* ---- The owner's labels editor ---- */
.os-tf-label-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
}
.os-tf-label-row {
  display: flex;
  align-items: center;
  gap: var(--os-space-2);
  padding: var(--os-space-2);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  background: var(--os-surface-2);
}
.os-tf-label-row .os-input { flex: 1 1 auto; min-width: 0; }
.os-tf-label-row .os-select { flex: 0 0 8rem; }
.os-tf-label-swatch {
  flex: none;
  width: 1rem;
  height: 1rem;
  border-radius: var(--os-radius-sm);
  border: 1px solid var(--tf-label, var(--os-line-strong));
  background: var(--tf-label, var(--os-fill));
}
@media (max-width: 640px) {
  .os-tf-label-row { flex-wrap: wrap; }
  .os-tf-label-row .os-input { flex: 1 1 100%; }
  .os-tf-label-row .os-select { flex: 1 1 auto; }
  .os-tf-check-add { flex-direction: column; align-items: stretch; }
  /* No hover on a phone, so the row tools have to stay visible. */
  .os-tf-check-tools { opacity: 1; }
}

/* ---------- 11. CRM ------------------------------------------------------- */
/* The pipeline board, the record page's history and its note, task and file
   lists. Every value is a token: nothing here is a literal colour or size.
   The board deliberately looks like the Taskforce board without sharing its
   classes, because the two move different things and drift apart. */

.os-crm-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--os-space-3);
  align-items: start;
}
.os-crm-column {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
  background: var(--os-surface-2);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  padding: var(--os-space-3);
  min-width: 0;
  transition: border-color var(--os-motion-fast) var(--os-ease);
}
.os-crm-column.is-over { border-color: var(--os-focus); }
.os-crm-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--os-space-2);
  padding-inline: var(--os-space-1);
}
.os-crm-column-name {
  margin: 0;
  font-size: var(--os-text-2xs);
  font-weight: var(--os-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
  color: var(--os-ink-muted);
}
.os-crm-count {
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.os-crm-column-hint {
  margin: 0;
  padding-inline: var(--os-space-1);
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
}
.os-crm-cards {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
  min-height: 3rem;
}
.os-crm-column-empty {
  margin: 0;
  padding: var(--os-space-4) var(--os-space-3);
  text-align: center;
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
  border: 1px dashed var(--os-line);
  border-radius: var(--os-radius-md);
}

.os-crm-card {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-1);
  background: var(--os-surface);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  padding: var(--os-space-3);
  cursor: grab;
}
.os-crm-card:hover { border-color: var(--os-line-strong); }
.os-crm-card:focus-visible {
  outline: none;
  border-color: var(--os-focus);
  box-shadow: 0 0 0 2px var(--os-focus);
}
.os-crm-card.is-archived { opacity: 0.7; }
.os-crm-card.is-pending { opacity: 0.55; cursor: progress; }
.os-crm-card.is-dragging { opacity: 0.4; }
body.os-crm-dragging { cursor: grabbing; user-select: none; }

.os-crm-card-title {
  color: var(--os-ink);
  font-weight: var(--os-weight-medium);
  text-decoration: none;
}
.os-crm-card-title:hover { text-decoration: underline; }
.os-crm-card-meta {
  margin: 0;
  font-size: var(--os-text-xs);
  color: var(--os-ink-muted);
  overflow-wrap: anywhere;
}
.os-crm-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-1);
  margin-top: var(--os-space-1);
}
.os-crm-card-value {
  margin-left: auto;
  font-family: var(--os-font-mono);
  font-size: var(--os-text-2xs);
  color: var(--os-ink-muted);
}

/* ---- Record page lists ---- */

.os-crm-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
}
.os-crm-history li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
  padding-bottom: var(--os-space-2);
  border-bottom: 1px solid var(--os-line);
}
.os-crm-history li:last-child { border-bottom: 0; padding-bottom: 0; }
.os-crm-history-meta {
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
}

.os-crm-compose {
  display: flex;
  align-items: flex-start;
  gap: var(--os-space-2);
}
.os-crm-compose > .os-input,
.os-crm-compose > .os-textarea { flex: 1 1 auto; min-width: 0; }

.os-crm-notes,
.os-crm-tasks,
.os-crm-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
}
.os-crm-note {
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  padding: var(--os-space-3);
  background: var(--os-surface);
}
.os-crm-note.is-system { background: var(--os-fill); }
.os-crm-note.is-pending { opacity: 0.55; }
.os-crm-note-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.os-crm-note-meta {
  margin: var(--os-space-1) 0 0;
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
}

.os-crm-task {
  display: flex;
  align-items: center;
  gap: var(--os-space-2);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  padding: var(--os-space-2) var(--os-space-3);
  background: var(--os-surface);
}
.os-crm-task.is-pending { opacity: 0.55; }
.os-crm-task.is-done .os-crm-task-label span {
  color: var(--os-ink-muted);
  text-decoration: line-through;
}
.os-crm-task-label {
  display: flex;
  align-items: center;
  gap: var(--os-space-2);
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
}
.os-crm-task-label span { overflow-wrap: anywhere; }

.os-crm-files li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--os-space-2);
}

.os-crm-empty {
  margin: 0;
  font-size: var(--os-text-sm);
  color: var(--os-ink-dim);
}

.os-crm-sort {
  display: flex;
  align-items: flex-end;
  gap: var(--os-space-2);
  margin-bottom: var(--os-space-3);
}
.os-crm-sort .os-select { max-width: 12rem; }
.os-crm-sort .os-label { margin-bottom: 0; align-self: center; }

.os-input.is-saving { border-color: var(--os-focus); }

/* ---- Responsive ---- */
/* Four columns stop being readable at about 1100px. Below that the board
   scrolls sideways with columns wide enough to hold a card, which beats
   crushing four of them onto a phone. */
@media (max-width: 1100px) {
  .os-crm-columns {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: var(--os-space-2);
    margin-inline: calc(var(--os-space-1) * -1);
    padding-inline: var(--os-space-1);
  }
  .os-crm-column {
    flex: 0 0 min(19rem, 82vw);
    scroll-snap-align: start;
  }
}
@media (max-width: 640px) {
  .os-crm-compose { flex-direction: column; align-items: stretch; }
  .os-crm-sort { flex-direction: column; align-items: stretch; }
  .os-crm-sort .os-select { max-width: none; }
}

/* ---------- 12. Brand components -----------------------------------------
   Shared pieces the rebrand introduced: seat avatars, meaning pills, the tool
   card, the dashboard hero and its two column grid, and prose blocks for the
   overnight brief. Everything here is monochrome; the only colour comes from
   the status tokens, and only through a pill variant.
   ------------------------------------------------------------------------ */

/* Avatar: usually initials on a fill; god mode also hands it an <img> of a
   social profile photo, which is why object-fit and overflow are here. The
   email goes in the title so two letters stay identifiable on hover. */
.os-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--os-radius-full);
  background: var(--os-fill-strong);
  border: 1px solid var(--os-line);
  color: var(--os-ink);
  font-size: var(--os-text-2xs);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  user-select: none;
  overflow: hidden;
  object-fit: cover;
}
.os-avatar-sm { width: 1.5rem; height: 1.5rem; font-size: 0.625rem; }
.os-avatar-md { width: 2.25rem; height: 2.25rem; font-size: var(--os-text-xs); }

/* A stack overlaps just enough to read as a group rather than a row. Any more
   and two letter initials start hiding behind the next circle. The ring is the
   card behind it, which is what separates one chip from the next. */
.os-avatar-stack {
  display: inline-flex;
  align-items: center;
  padding-left: 2px;
}
.os-avatar-stack > * + * { margin-left: -0.25rem; }
.os-avatar-stack .os-avatar { box-shadow: 0 0 0 2px var(--os-surface); }
.os-avatar-stack-more {
  margin-left: var(--os-space-2);
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
  font-variant-numeric: tabular-nums;
}

/* Pill: smaller and quieter than .os-badge, for one word of meaning next to a
   title. Neutral is an outline; warn and danger are the only colours. */
.os-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--os-space-1);
  padding: 0.05rem var(--os-space-2);
  border-radius: var(--os-radius-full);
  border: 1px solid var(--os-line);
  background: transparent;
  color: var(--os-ink-muted);
  font-size: var(--os-text-2xs);
  font-weight: var(--os-weight-medium);
  line-height: 1.6;
  white-space: nowrap;
}
.os-pill-neutral { border-color: var(--os-line-strong); color: var(--os-ink-muted); }
.os-pill-warn { border-color: transparent; background: var(--os-warn-wash); color: var(--os-warn); }
.os-pill-danger { border-color: transparent; background: var(--os-danger-wash); color: var(--os-danger); }
.os-pill-success { border-color: transparent; background: var(--os-success-wash); color: var(--os-success); }

/* Tool card: the dashboard's grid of tools. An icon, a label and one line of
   plain language, on a surface that lifts on hover. */
.os-tool-grid {
  display: grid;
  gap: var(--os-space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}
.os-tool-card {
  display: flex;
  align-items: flex-start;
  gap: var(--os-space-3);
  padding: var(--os-space-5);
  background: var(--os-surface);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--os-motion-fast) var(--os-ease),
              background var(--os-motion-fast) var(--os-ease),
              transform var(--os-motion-fast) var(--os-ease);
}
.os-tool-card:hover {
  border-color: var(--os-line-strong);
  background: var(--os-surface-2);
  transform: translateY(-1px);
}
.os-tool-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: var(--os-radius-md);
  background: var(--os-fill);
  border: 1px solid var(--os-line);
  color: var(--os-ink-muted);
}
.os-tool-card:hover .os-tool-card-icon { color: var(--os-ink); }
.os-tool-card-body { min-width: 0; }
.os-tool-card-label {
  display: block;
  font-size: var(--os-text-md);
  font-weight: var(--os-weight-bold);
  letter-spacing: -0.01em;
}
.os-tool-card-desc {
  display: block;
  margin-top: var(--os-space-1);
  font-size: var(--os-text-sm);
  color: var(--os-ink-muted);
}

/* Icon: a 16px inline SVG set, stroked in currentColor. No icon font, no CDN. */
.os-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
}

/* Hero: the greeting plus a row of big numbers at the top of a landing page. */
.os-hero {
  display: grid;
  gap: var(--os-space-6);
  padding-bottom: var(--os-space-8);
  border-bottom: 1px solid var(--os-line);
}
.os-hero-greeting {
  font-size: var(--os-text-xl);
  font-weight: var(--os-weight-bold);
  letter-spacing: var(--os-tracking-tight);
}
.os-hero-date {
  margin-top: var(--os-space-1);
  font-size: var(--os-text-sm);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
}
.os-hero-stats {
  display: grid;
  gap: var(--os-space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
}
.os-hero-stat { min-width: 0; }
.os-hero-value {
  font-size: var(--os-text-display);
  font-weight: var(--os-weight-bold);
  line-height: 1.05;
  letter-spacing: var(--os-tracking-tight);
  font-variant-numeric: tabular-nums;
}
.os-hero-label {
  margin-top: var(--os-space-2);
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
}
@media (min-width: 768px) {
  .os-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: end; }
}

/* Two column main area. One column under 960px, where a 1fr sidebar would be
   too narrow to read. */
.os-grid-main {
  display: grid;
  gap: var(--os-space-6);
  grid-template-columns: minmax(0, 1fr);
}
.os-grid-main > * { min-width: 0; }
@media (min-width: 960px) {
  .os-grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}

/* Prose blocks: the overnight brief, parsed server side into typed blocks so
   it renders as structure rather than as one wall of preformatted text. */
.os-prose-blocks { display: grid; gap: var(--os-space-4); }
.os-prose-blocks > * { min-width: 0; }
.os-prose-heading {
  font-size: var(--os-text-2xs);
  font-weight: var(--os-weight-bold);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
}
.os-prose-item {
  display: grid;
  gap: var(--os-space-1);
  padding-bottom: var(--os-space-4);
  border-bottom: 1px solid var(--os-line);
}
.os-prose-item:last-child { padding-bottom: 0; border-bottom: 0; }
.os-prose-item-title {
  font-size: var(--os-text-base);
  font-weight: var(--os-weight-medium);
}
.os-prose-item-meta {
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
}
.os-prose-text { font-size: var(--os-text-sm); color: var(--os-ink-muted); }
.os-prose-bullets { display: grid; gap: var(--os-space-1); }
.os-prose-bullets li {
  position: relative;
  padding-left: var(--os-space-4);
  font-size: var(--os-text-sm);
  color: var(--os-ink-muted);
}
.os-prose-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: var(--os-radius-full);
  background: var(--os-line-strong);
}

/* ---------- 13. Dashboard -------------------------------------------------
   Ops Home only: the panel heading used inside the two column main grid, and
   the My tasks list that static/js/dashboard.js fills from
   /taskforce/api/my_tasks.

   A panel is not a .os-section. A section splits into a label column and a
   content column at 1024px, which is right for a full width page and wrong
   inside the 1fr sidebar of .os-grid-main, where the label column would eat
   most of the width. The panel keeps its heading above its body at every
   size.
   ------------------------------------------------------------------------ */
/* The hero owns its own bottom padding and rule; this is the air under it. */
.os-hero + .os-grid-main { margin-top: var(--os-space-8); }

.os-panel { display: grid; gap: var(--os-space-4); align-content: start; }
.os-panel + .os-panel { margin-top: var(--os-space-8); }
.os-panel > * { min-width: 0; }
.os-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--os-space-2) var(--os-space-3);
}
.os-panel-title {
  font-size: var(--os-text-lg);
  font-weight: var(--os-weight-bold);
  letter-spacing: var(--os-tracking-tight);
}
.os-panel-hint {
  font-size: var(--os-text-sm);
  color: var(--os-ink-dim);
}

/* Pulse, compact. stat_grid() decides its column count from the viewport,
   not from the box it is in, so inside the 1fr sidebar of .os-grid-main it
   forces four 40px numbers into about 360px and every label wraps. The
   sidebar gets rows instead: label and hint on the left, the number on the
   right, which reads down the column the way a pulse should.
   ------------------------------------------------------------------------ */
.os-pulse {
  display: grid;
  background: var(--os-surface);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  overflow: hidden;
}
.os-pulse-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--os-space-4);
  padding: var(--os-space-3) var(--os-space-5);
  border-top: 1px solid var(--os-line);
}
.os-pulse-row:first-child { border-top: 0; }
.os-pulse-body { min-width: 0; }
.os-pulse-label {
  display: block;
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
}
.os-pulse-hint {
  display: block;
  margin-top: 1px;
  font-size: var(--os-text-xs);
  color: var(--os-ink-muted);
}
.os-pulse-value {
  flex: none;
  font-size: var(--os-text-lg);
  font-weight: var(--os-weight-bold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* My tasks: three short lists, each a date bucket. The rows are links into
   the board, so the whole row is the target rather than the title alone. */
.os-mytasks { display: grid; gap: var(--os-space-5); }
/* minmax(0, 1fr), not the default auto: a grid column sized by content takes
   its width from the widest row, and a row's title is nowrap. At 390px that
   pushed the whole document 60px sideways. Same trap as .os-section. */
.os-mytasks-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--os-space-1);
}
.os-mytasks-group > * { min-width: 0; }
.os-mytasks-label {
  font-size: var(--os-text-2xs);
  font-weight: var(--os-weight-bold);
  color: var(--os-ink-dim);
  text-transform: uppercase;
  letter-spacing: var(--os-tracking-wide);
}
.os-mytasks-label.is-overdue { color: var(--os-danger); }
.os-task-row {
  display: flex;
  align-items: center;
  gap: var(--os-space-3);
  padding: var(--os-space-3) 0;
  border-radius: var(--os-radius-md);
  border-bottom: 1px solid var(--os-line);
  color: inherit;
  text-decoration: none;
  transition: background var(--os-motion-fast) var(--os-ease);
}
.os-task-row:last-child { border-bottom: 0; }
.os-task-row:hover { background: var(--os-surface-2); }
.os-task-body { min-width: 0; flex: 1 1 auto; }
.os-task-title {
  display: block;
  font-size: var(--os-text-base);
  font-weight: var(--os-weight-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* hook (session A): the card's key on a My work row. Ahead of the title and
   dimmer than it, as on the card face, so a row can be read out loud. */
.os-task-key {
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin-right: var(--os-space-2);
}
.os-task-board {
  display: block;
  margin-top: 1px;
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-task-meta {
  display: flex;
  align-items: center;
  gap: var(--os-space-2);
  flex: none;
}
.os-task-due {
  font-size: var(--os-text-2xs);
  color: var(--os-ink-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.os-task-due.is-overdue { color: var(--os-danger); }
.os-mytasks-more {
  font-size: var(--os-text-xs);
  color: var(--os-ink-dim);
}

/* The hero count the panel fills in. It holds a dim placeholder until the
   fetch lands, so the hero does not jump when the number arrives. */
.os-hero-value.is-pending { color: var(--os-ink-dim); }

/* Disclosure: the tail of the overnight brief, and anything else long enough
   that showing all of it would push the rest of a column off the screen. */
.os-details > summary {
  cursor: pointer;
  font-size: var(--os-text-sm);
  color: var(--os-ink-muted);
  padding: var(--os-space-2) 0;
}
.os-details > summary:hover { color: var(--os-ink); }
.os-details[open] > summary { margin-bottom: var(--os-space-3); }
