/*
 * Design tokens: the Engine brand palette, theme surfaces, tones, and the type, spacing, radius, shadow and z-index
 * scales. The only stylesheet allowed raw hex colors (test/styles.test.ts); everything else reads these names.
 *
 * Cascade layers, lowest first. App stylesheets go in `app`, so an app rule beats a kit rule whatever its specificity.
 */
@layer reset, tokens, base, components, app;

@layer tokens {
  :root {
    /* Engine brand: primary (structure), secondary (accents and status), tertiary (charts and tags, one or two per view) */
    --engine-dark: #0d101a;
    --engine-light: #f8f6f2;
    --engine-blue: #2986e9;
    --engine-orange: #fd4b23;
    --engine-green: #1e9e6d;
    --engine-amber: #ffb300;
    --engine-cyan: #7dcbd8;
    --engine-purple: #8a2be2;
    --engine-lime: #32cd32;
    --engine-pink: #ff1493;
    --engine-text-dark: #858588;
    --engine-text-light: #e1dfdd;
    --white: #fff;
    --black: #000;

    /* Tones: one meaning each, everywhere (apps/workspace/src/ui/tones.ts) */
    --tone-good: var(--engine-green);
    --tone-warn: var(--engine-amber);
    --tone-bad: var(--engine-orange);
    --tone-info: var(--engine-blue);
    --tone-neutral: var(--engine-text-dark);

    /* Primary actions: a quiet, theme-aware fill (no bright blue buttons anywhere) */
    --btn-strong-bg: color-mix(in srgb, var(--fg) 10%, var(--card));
    --btn-strong-hover: color-mix(in srgb, var(--fg) 16%, var(--card));
    --btn-strong-line: color-mix(in srgb, var(--fg) 26%, var(--line));

    /* Type */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
    --font-mono: ui-monospace, Menlo, monospace;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;

    /* Radius */
    --radius-sm: 4px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 14px;
    --radius-pill: 999px;

    /* Shadows: menus and callouts, floating buttons, lifted cards, panels, and overlays (theme-aware, below) */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.12);
    --shadow-menu: 0 6px 24px rgba(0, 0, 0, 0.3);
    --shadow-float: 0 6px 20px rgba(0, 0, 0, 0.18);
    --shadow-lift: 0 8px 26px rgba(0, 0, 0, 0.16);
    --shadow-panel: 0 12px 40px rgba(0, 0, 0, 0.25);
    --shadow-overlay: 0 10px 40px rgba(0, 0, 0, 0.35);

    /*
     * Z-index scale, lowest first. Use these names only (test/styles.test.ts rejects bare numbers).
     * base/raised: inside a component (a stretched link, a lifted avatar, a sticky table header)
     * sticky: sticky headers inside content · float: the page actions over main
     * callout: hover callouts in content (alerts)
     * sidebar: the off-canvas sidebar · nav: the top bar · menu: menus that open from the top bar
     * popover: hover cards
     * drawer: side drawers · overlay: full-screen backdrops (command bar) and the team switcher
     * toast: toasts and the Assistant · top: panels (Panel) and body popovers (Popover), above everything
     */
    --z-base: 0;
    --z-raised: 1;
    --z-sticky: 3;
    --z-float: 5;
    --z-callout: 30;
    --z-sidebar: 31;
    --z-nav: 32;
    --z-menu: 40;
    --z-popover: 45;
    --z-drawer: 48;
    --z-overlay: 50;
    --z-toast: 60;
    --z-top: 70;

    /*
     * Breakpoints. Media queries cannot read custom properties, so these document the three widths every
     * stylesheet uses (and scripts can read them): phone below 600px, the sidebar becomes a drawer at 900px and
     * below, and it starts folded up to 1200px. Write `@media (max-width: 600px)`, `900px` or `1200px`.
     */
    --bp-sm: 600px;
    --bp-md: 900px;
    --bp-lg: 1200px;

    /* Disclosure chevron, drawn with currentColor (mask) or gray (select arrows) */
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --chev-gray: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23858588' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  /* Themes: <html data-theme="dark|light"> */
  html[data-theme='dark'] {
    --bg: var(--engine-dark);
    --fg: var(--engine-light);
    --muted: var(--engine-text-light);
    --card: #161a27;
    --line: #2a2f40;
    --pill: #22283a;
    --grid: #262b3b;
    --thumb: #3a4157;
    /* GitHub's PR state colors, readable on dark */
    --pr-open: #3fb950;
    --pr-merged: #a371f7;
    --pr-draft: #9198a1;
    --pr-closed: #f85149;
    color-scheme: dark;
  }
  html[data-theme='light'] {
    --bg: var(--engine-light);
    --fg: var(--engine-dark);
    --muted: var(--engine-text-dark);
    --card: #ffffff;
    --line: #e3dfd8;
    --pill: #efece6;
    --grid: #ebe7e0;
    --thumb: #cdc8bf;
    --pr-open: #1a7f37;
    --pr-merged: #8250df;
    --pr-draft: #59636e;
    --pr-closed: #cf222e;
    --shadow-overlay: 0 10px 34px rgba(13, 16, 26, 0.16);
    color-scheme: light;
  }
}

/* Reset and base typography: elements only, built on tokens.css. */
@layer reset {
  * {
    box-sizing: border-box;
  }
  [hidden] {
    display: none !important;
  }
}

@layer base {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h, 0px) + 16px);
  }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 15px/1.5 var(--font-sans);
  }
  a {
    color: var(--engine-blue);
    text-decoration: none;
  }
  a:hover {
    text-decoration: underline;
  }
  h1 {
    font-size: 22px;
    margin: 0 0 4px;
  }
  h2 {
    font-size: 18px;
    margin: 34px 0 12px;
    padding-top: 4px;
  }
  code {
    background: var(--pill);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
  }
  kbd {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: var(--radius-sm);
    background: var(--pill);
    color: var(--fg);
    font: 600 11px/16px var(--font-mono);
    text-align: center;
  }
  /* Code blocks never run past their box: long lines wrap, very long files scroll inside their own box */
  pre {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  abbr[title] {
    text-decoration: underline dotted var(--muted);
    cursor: help;
  }
  footer {
    color: var(--muted);
    font-size: 12px;
    padding: 20px 0 0;
  }

  /* Tables: full width, a rule under each row, small uppercase headers */
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin-top: 8px;
  }
  th,
  td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
  }
  th {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
  tfoot td {
    font-weight: 700;
  }

  /* Disclosures: one chevron for every <details>, pointing right when closed and down when open */
  details {
    margin-top: 8px;
    padding-top: 6px;
  }
  details > summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
    list-style: none;
  }
  details > summary::-webkit-details-marker {
    display: none;
  }
  details > summary::before {
    content: '';
    display: inline-block;
    flex: none;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    vertical-align: -1px;
    background: currentColor;
    -webkit-mask: var(--chev) center / 12px no-repeat;
    mask: var(--chev) center / 12px no-repeat;
    transform: rotate(-90deg);
    transition: transform 0.12s ease;
  }
  details[open] > summary::before {
    transform: none;
  }
  @media (prefers-reduced-motion: reduce) {
    details > summary::before {
      transition: none;
    }
  }

  /* Thin themed scrollbars instead of the white/grey default */
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--thumb) transparent;
  }
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--thumb);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
  }
  ::-webkit-scrollbar-thumb:hover {
    background-color: var(--engine-text-dark);
  }
  ::-webkit-scrollbar-corner {
    background: transparent;
  }
}

/*
 * Shared components, built only on tokens.css. Apps size or place them in their own `app` layer
 * (`.toolbar .btn { height: 32px }`); they do not restyle them.
 *
 * Buttons    .btn (default) · .btn.primary (the quiet strong fill; never bright blue) · .btn.danger
 *            · .btn.round (pill shape) · .btn.sm (26px) · disabled via :disabled or aria-disabled
 * Icon       .ib (round, ghost, 32px) · .ib.sq (square corners) · .ib.md (28px) · .ib.sm (24px, room for a count)
 *            · .ib.on (pressed)
 * Pills      .pill (small tag) · tones .good .warn .bad .info .tag · .pill.outline (bordered, no fill)
 *            · .pill.sm (11.5px) · button.pill[aria-pressed] (filter toggle)
 * Chips      .chips > .chip (metric with a tone edge: .m label, .v value, .n note) · tones .good .warn .bad .info
 * Surfaces   .panel (bordered box) · .card (box with a tone edge) · details.block (collapsible box)
 * Page head  .page-head (h1, then .page-head-acts on the right; no subtitle)
 * Sections   details.sec (collapsible ▸/▾ section, open by default) · .sec.empty (one line) · .sec.quiet (folded, faded)
 * Tables     .tbl (DataTable: bordered box, sticky header, stripes) · td.grow
 * Tabs       .tabs [role=tablist] / [role=tab]
 * Text       .note (muted small print) · .cnt (a count next to a heading)
 */
@layer components {
  /* ---------- Text ---------- */
  .note {
    color: var(--muted);
    font-size: 12.5px;
  }
  .cnt {
    color: var(--muted);
    font-weight: 400;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
  }

  /* ---------- Buttons ---------- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--fg);
    font: inherit;
    font-size: 12.5px;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
  }
  .btn:hover:not(:disabled, [aria-disabled='true']) {
    border-color: var(--engine-blue);
    text-decoration: none;
  }
  .btn.primary {
    background: var(--btn-strong-bg);
    border-color: var(--btn-strong-line);
    font-weight: 600;
  }
  .btn.primary:hover:not(:disabled, [aria-disabled='true']) {
    background: var(--btn-strong-hover);
  }
  .btn.danger {
    color: var(--tone-bad);
    border-color: color-mix(in srgb, var(--tone-bad) 60%, var(--line));
  }
  .btn.round {
    border-radius: var(--radius-pill);
  }
  .btn.sm {
    height: 26px;
  }
  .btn:disabled,
  .btn[aria-disabled='true'] {
    opacity: 0.55;
    cursor: default;
  }

  /* Icon buttons: a glyph or icon, optionally a count */
  .ib {
    --ib-size: 32px;
    position: relative;
    height: var(--ib-size);
    min-width: var(--ib-size);
    padding: 0 var(--space-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
  }
  .ib:hover {
    color: var(--fg);
    background: var(--pill);
    text-decoration: none;
  }
  .ib.on {
    color: var(--fg);
    border-color: var(--line);
    background: var(--pill);
  }
  .ib.sq {
    border-radius: var(--radius);
  }
  .ib.md {
    --ib-size: 28px;
    padding: 0 var(--space-1);
  }
  .ib.sm {
    --ib-size: 24px;
    padding: 0 5px;
    gap: 3px;
    font-size: 11.5px;
  }

  /* ---------- Pills ---------- */
  .pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
  }
  .pill {
    background: var(--pill);
    border-radius: var(--radius-pill);
    padding: 1px 9px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
  }
  .pill.good {
    color: var(--tone-good);
  }
  .pill.warn {
    color: var(--tone-warn);
  }
  .pill.bad {
    color: var(--tone-bad);
  }
  .pill.info {
    color: var(--tone-info);
  }
  .pill.tag {
    color: var(--engine-cyan);
  }
  .pill.sm {
    padding: 0 7px;
    font-size: 11.5px;
  }
  .pill.outline {
    background: none;
    border: 1px solid var(--line);
  }
  .pill.outline.good {
    border-color: color-mix(in srgb, var(--tone-good) 45%, var(--line));
  }
  .pill.outline.warn {
    border-color: color-mix(in srgb, var(--tone-warn) 45%, var(--line));
  }
  .pill.outline.bad {
    border-color: color-mix(in srgb, var(--tone-bad) 45%, var(--line));
  }
  .pill.outline.info {
    border-color: color-mix(in srgb, var(--tone-info) 45%, var(--line));
  }
  button.pill {
    font: inherit;
    font-size: 11.5px;
    cursor: pointer;
  }
  button.pill[aria-pressed='true'] {
    color: var(--fg);
    border-color: var(--engine-blue);
    background: color-mix(in srgb, var(--engine-blue) 12%, transparent);
  }

  /* ---------- Chips: a metric with a tone edge ---------- */
  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
  }
  .chip {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    max-width: 240px;
    padding: 6px 10px;
    border-left: 3px solid var(--tone-neutral);
    background: var(--pill);
    border-radius: var(--radius-md);
    font-size: 13px;
  }
  .chip .m,
  .chip .n {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.3;
  }
  .chip .v {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
  }
  .chip.good {
    border-left-color: var(--tone-good);
  }
  .chip.good .v {
    color: var(--tone-good);
  }
  .chip.bad {
    border-left-color: var(--tone-bad);
  }
  .chip.bad .v {
    color: var(--tone-bad);
  }
  .chip.warn {
    border-left-color: var(--tone-warn);
  }
  .chip.warn .v {
    color: var(--tone-warn);
  }
  .chip.info {
    border-left-color: var(--tone-info);
  }
  .chip.info .v {
    color: var(--tone-info);
  }

  /* ---------- Surfaces ---------- */
  .panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-bottom: 14px;
  }
  .panel h3 {
    margin: 0 0 6px;
    font-size: 16px;
  }
  .panel pre {
    margin: 6px 0 0;
    max-height: 60vh;
    overflow: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 12px;
  }
  .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 5px solid var(--tone-neutral);
    border-radius: var(--radius-lg);
    padding: 14px 18px 12px;
    margin-bottom: 16px;
  }
  .card.good {
    border-left-color: var(--tone-good);
  }
  .card.warn {
    border-left-color: var(--tone-warn);
  }
  .card.bad {
    border-left-color: var(--tone-bad);
  }
  .card.info {
    border-left-color: var(--tone-info);
  }
  .card h3 {
    margin: 0 0 6px;
    font-size: 16.5px;
  }
  details.block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    margin: 0 0 14px;
  }
  details.block > summary {
    font-size: 14px;
    color: var(--fg);
    font-weight: 600;
  }
  details.block > summary .note {
    font-weight: 400;
  }

  /* ---------- Page header: the h1 and the page's actions on the right, nothing under it ---------- */
  .page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: 14px;
  }
  .page-head h1 {
    margin: 0;
  }
  .page-head-acts {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
  }

  /* ---------- Sections: collapsible ▸/▾, open by default; empty ones are one line ---------- */
  details.sec {
    border-top: 1px solid var(--line);
    margin: 0;
    padding: 4px 0 18px;
  }
  details.sec:first-of-type {
    border-top: 0;
  }
  details.sec > summary {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--fg);
    font-size: inherit;
    padding: 12px 0 10px;
  }
  details.sec > summary::before {
    width: 16px;
    height: 16px;
    margin: 0;
    color: var(--muted);
    -webkit-mask-size: 13px;
    mask-size: 13px;
  }
  details.sec > summary h2 {
    margin: 0;
    padding: 0;
    font-size: 18px;
  }
  details.sec > summary .hint {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
  }
  details.sec.empty {
    padding-bottom: 4px;
  }
  details.sec.empty > summary {
    cursor: default;
  }
  details.sec.empty > summary::before {
    width: 5px;
    height: 5px;
    margin: 0 5px 0 6px;
    border-radius: 50%;
    -webkit-mask: none;
    mask: none;
    transform: none;
  }
  details.sec.empty > summary h2 {
    font-size: 15px;
    color: var(--muted);
    font-weight: 600;
  }
  details.sec.empty > summary .note {
    margin-left: 4px;
  }
  /* Quiet: an optional section with nothing today, folded at the bottom of the page; full strength on hover, focus or open */
  details.sec.quiet {
    opacity: 0.5;
    padding-bottom: 2px;
    transition: opacity 0.15s;
  }
  details.sec.quiet:hover,
  details.sec.quiet:focus-within,
  details.sec.quiet[open] {
    opacity: 1;
  }
  details.sec.quiet > summary {
    padding: 7px 0 6px;
  }
  details.sec.quiet > summary h2 {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
  }
  details.sec.quiet > summary .note {
    margin-left: 4px;
  }
  details.sec:not(.quiet) + details.sec.quiet {
    margin-top: 18px;
  }

  /* ---------- DataTable: bordered box, sticky header, stripes ---------- */
  .tbl {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: auto;
    max-height: 560px;
    background: var(--card);
    margin: 4px 0 10px;
  }
  .tbl table {
    margin: 0;
  }
  .tbl thead th {
    position: sticky;
    top: 0;
    z-index: var(--z-raised);
    background: var(--pill);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  .tbl th,
  .tbl td {
    padding: 8px 12px;
  }
  .tbl th + th,
  .tbl td + td {
    border-left: 1px solid var(--line);
  }
  .tbl tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--pill) 45%, transparent);
  }
  .tbl tbody tr:last-child td {
    border-bottom: 0;
  }
  .tbl tbody tr:focus-within,
  .tbl tbody tr.focus {
    outline: 2px solid color-mix(in srgb, var(--engine-blue) 60%, transparent);
    outline-offset: -2px;
  }
  .tbl td.grow {
    width: 100%;
    max-width: 0;
  }

  /* ---------- Tabs ---------- */
  .tabs [role='tablist'] {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin: 0 0 10px;
  }
  .tabs [role='tab'] {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    padding: 6px 12px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: -1px;
  }
  .tabs [role='tab'][aria-selected='true'] {
    color: var(--fg);
    border-bottom-color: var(--engine-blue);
    font-weight: 600;
  }
  .tabs .tabs [role='tablist'] {
    border-bottom-style: dashed;
  }
  .tabs .tabs [role='tab'] {
    font-size: 12px;
    padding: 4px 10px;
  }
}

@layer app {
/*
 * Workspace styles: the shell (nav bar, sidebar, page actions) and the app's own components. src/server/assets.ts puts
 * this after the kit stylesheets (packages/kit/styles: tokens, base, shared components) inside `@layer app`, in the one
 * cached app stylesheet.
 * Colors, z-index, radius and shadows come from kit/styles/tokens.css.
 */
:root {
  --nav-h: 52px;
  --side-w: clamp(232px, 20vw, 288px);
  --rail-w: 60px;
  --gap: 16px;
  --pad-x: clamp(20px, 2.4vw, 36px);
}
/* Dropdowns and date fields: one height, the chevron inside the right padding */
select,
input[type='date'] {
  height: 30px;
  background-color: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  max-width: 100%;
}
select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 10px;
  padding-right: 30px;
  line-height: normal;
  background-image: var(--chev-gray);
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 12px;
  text-overflow: ellipsis;
  cursor: pointer;
}
input[type='date'] {
  padding: 0 8px;
  color-scheme: inherit;
}
select:focus-visible,
input[type='date']:focus-visible {
  outline: none;
  border-color: var(--engine-blue);
}
.filtered {
  display: none !important;
}
/* ---------- Shell: nav bar ---------- */
#lw-top {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px 0 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
#lw-top .home {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--fg);
  margin-right: 16px;
  white-space: nowrap;
  flex: none;
}
#lw-top .side-menu {
  display: none;
  margin-right: 6px;
}
#lw-top .home:hover {
  text-decoration: none;
}
.logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
}
.logo.emoji {
  font-size: 20px;
}
.logo.svg svg {
  width: 100%;
  height: 100%;
}
.logo.sq {
  background: var(--engine-blue);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
}
.lw-pages {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
/* Pages menu: replaces the links when they don't fit (shell.js puts #lw-top.tight), or below 600px without scripts */
/* Initiative switcher next to the title (app/shell/nav-bar.tsx) */
.lw-team {
  position: relative;
  flex: none;
  margin: 0 4px 0 2px;
  padding: 0;
  border: 0;
}
.lw-team > summary.lw-team-cur {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.lw-team > summary.lw-team-cur::before {
  content: none;
}
.lw-team > summary.lw-team-cur::after {
  content: '';
  width: 10px;
  height: 10px;
  background: currentColor;
  -webkit-mask: var(--chev) center / 10px no-repeat;
  mask: var(--chev) center / 10px no-repeat;
  opacity: 0.6;
  transition: transform 0.12s;
}
.lw-team[open] > summary.lw-team-cur::after {
  transform: rotate(180deg);
}
.lw-team > summary.lw-team-cur:hover {
  border-color: var(--btn-strong-line);
}
.lw-team-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--z-overlay);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-overlay);
}
.lw-team-list a,
.lw-team-group {
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--fg);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
/* A parent without a standup of its own heads its children */
.lw-team-group {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}
.lw-team-list a:hover {
  background: var(--pill);
}
.lw-team-list a[aria-current] {
  font-weight: 600;
  background: var(--btn-strong-bg);
}
.lw-team-list [data-depth='1'] {
  padding-left: 24px;
}
.lw-team-list [data-depth='2'] {
  padding-left: 38px;
}
.lw-team-list [data-depth='3'] {
  padding-left: 52px;
}
.lw-team-list a.lw-team-manage {
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  color: var(--muted);
  font-size: 12.5px;
}
.lw-pmenu {
  display: none;
  position: relative;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
}
#lw-top.tight .lw-pages {
  display: none;
}
#lw-top.tight .lw-pmenu {
  display: block;
}
.lw-pmenu > summary.ib {
  color: var(--fg);
  font-weight: 600;
  font-size: 13.5px;
  padding: 0 12px;
  background: var(--pill);
  border-color: var(--line);
}
.lw-pmenu > summary::before {
  content: none;
}
.lw-pmenu > summary::after {
  content: '';
  width: 10px;
  height: 10px;
  background: currentColor;
  -webkit-mask: var(--chev) center / 10px no-repeat;
  mask: var(--chev) center / 10px no-repeat;
  opacity: 0.7;
}
.lw-pmenu[open] > summary::after {
  transform: rotate(180deg);
}
.lw-pmenu > nav {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--z-menu);
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-menu);
}
.lw-pmenu > nav a {
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.lw-pmenu > nav a:hover {
  color: var(--fg);
  background: var(--pill);
  text-decoration: none;
}
.lw-pmenu > nav a.on {
  color: var(--fg);
  font-weight: 600;
  background: var(--pill);
}
.lw-pages a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.lw-pages a:hover {
  color: var(--fg);
  background: var(--pill);
  text-decoration: none;
}
.lw-pages a.on {
  color: var(--fg);
  background: var(--pill);
  border-color: var(--line);
  font-weight: 600;
}
/* Pages that share a button (Standup, Ops Review, Retro; Workbenches, Whiteboards, Flags): the shown page and a chevron */
.lw-pgroup {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
}
.lw-pgroup:has(> a.on) {
  background: var(--pill);
  border-color: var(--line);
}
.lw-pgroup > a.on {
  background: none;
  border-color: transparent;
}
.lw-pgroup > a {
  padding-right: 4px;
}
.lw-pgroup-more {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
}
.lw-pgroup-more > summary {
  display: grid;
  place-items: center;
  width: 22px;
  height: 28px;
  margin-right: 4px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.lw-pgroup-more > summary::-webkit-details-marker {
  display: none;
}
.lw-pgroup-more > summary::before {
  content: none;
}
.lw-pgroup-more > summary::after {
  content: '';
  width: 10px;
  height: 10px;
  background: currentColor;
  -webkit-mask: var(--chev) center / 10px no-repeat;
  mask: var(--chev) center / 10px no-repeat;
  transition: transform 0.12s;
}
/* One control: hovering, pressing or focusing either half (or opening the menu) lights the whole button, link and chevron together */
.lw-pgroup:hover,
.lw-pgroup:active,
.lw-pgroup:has(:focus-visible),
.lw-pgroup:has(> .lw-pgroup-more[open]) {
  background: var(--pill);
}
.lw-pages .lw-pgroup > a:hover,
.lw-pgroup-more > summary:hover {
  background: none;
}
.lw-pgroup:hover > a,
.lw-pgroup:hover .lw-pgroup-more > summary,
.lw-pgroup:has(:focus-visible) .lw-pgroup-more > summary,
.lw-pgroup-more[open] > summary {
  color: var(--fg);
}
.lw-pgroup-more[open] > summary::after {
  transform: rotate(180deg);
}
.lw-pgroup-more > nav {
  position: absolute;
  top: calc(100% + 6px);
  left: -8px;
  z-index: var(--z-menu);
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-menu);
}
.lw-pgroup-more > nav a {
  padding: 6px 10px;
  border-radius: 6px;
}
#lw-top .sp {
  flex: 1;
}
#lw-bell b {
  font-size: 11.5px;
  font-weight: 700;
}
#lw-bell.warn b {
  color: var(--tone-warn);
}
#lw-bell.bad b {
  color: var(--tone-bad);
}
#lw-bell.info b {
  color: var(--tone-info);
}
#lw-bell.none {
  opacity: 0.7;
}
/* Account menu: the signed-in person's photo opens who they are, theme, time zone, shortcuts and (owners) the admin page */
.lw-acct {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  margin: 0 0 0 6px;
  padding: 0;
  border: 0;
}
.lw-acct > summary {
  position: relative;
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted);
}
.lw-acct > summary::-webkit-details-marker,
.lw-acct > summary::before {
  display: none;
  content: none;
}
/* A small chevron badge on the photo says it opens a menu */
.lw-acct > summary::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--card) var(--chev-gray) center / 8px no-repeat;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.15s;
}
.lw-acct[open] > summary::after {
  transform: rotate(180deg);
}
.lw-acct > summary:hover,
.lw-acct[open] > summary {
  background: var(--pill);
  color: var(--fg);
}
.lw-acct > summary .av {
  width: 26px;
  height: 26px;
}
.lw-acct > summary:focus-visible {
  outline: 2px solid var(--engine-blue);
  outline-offset: 2px;
}
.acct-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: var(--z-menu);
  width: 296px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-overlay);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.acct-who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.acct-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.acct-id b {
  font-size: 13.5px;
  color: var(--fg);
}
.acct-id .note {
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 6px;
}
.acct-l {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.acct-seg {
  display: flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.acct-seg button {
  flex: 1;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.acct-seg button:hover {
  color: var(--fg);
}
.acct-seg button[aria-pressed='true'] {
  background: var(--card);
  color: var(--fg);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--line);
}
.acct-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}
.acct-i {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.acct-i:hover,
.acct-i.on {
  background: var(--pill);
}
.acct-i .note {
  font-size: 11.5px;
}
.acct-i kbd {
  font-size: 11px;
}
/* Who else has the page open: overlapping photos, then +N (presence.js) */
.lw-presence {
  display: inline-flex;
  align-items: center;
  flex: none;
  margin-right: 8px;
  padding: 2px;
  border-radius: 999px;
  cursor: default;
}
.lw-presence[hidden] {
  display: none;
}
.lw-presence .pf {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--card);
  object-fit: cover;
  background: var(--pill);
  flex: none;
  transition: transform 0.12s;
}
.lw-presence .pf + .pf {
  margin-left: -7px;
}
.lw-presence .pf.initials,
.lw-presence .pf.more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--fg);
}
.lw-presence .pf.more {
  color: var(--muted);
  font-size: 10px;
}
.lw-presence:hover .pf {
  transform: translateY(-1px);
}
.lw-presence:focus-visible {
  outline: 2px solid var(--engine-blue);
  outline-offset: 2px;
}
#lw-top .ib {
  flex: none;
}
#lw-notices,
#lw-links {
  position: fixed;
  top: calc(var(--nav-h) + 6px);
  right: 14px;
  z-index: var(--z-menu);
  width: min(380px, calc(100vw - 28px));
  max-height: 70vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: var(--shadow-menu);
  font-size: 13px;
}
#lw-notices .hd,
#lw-links .hd {
  font-weight: 600;
  margin-bottom: 6px;
}
#lw-notices ul,
#lw-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#lw-notices li {
  border-left: 3px solid var(--tone-info);
  padding: 4px 0 6px 10px;
  margin: 6px 0;
}
#lw-notices li.warn {
  border-left-color: var(--tone-warn);
}
#lw-notices li.bad {
  border-left-color: var(--tone-bad);
}
#lw-notices .t {
  font-weight: 600;
}
#lw-notices .acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 3px;
  font-size: 12.5px;
}
/* A viewer notice (src/stores/notices.ts): its buttons and × show on hover or focus, always on touch screens */
#lw-notices li[data-notice-id] {
  position: relative;
  padding-right: 28px;
}
#lw-notices .nacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
#lw-notices .n-x {
  position: absolute;
  top: 2px;
  right: 0;
}
@media (hover: hover) {
  #lw-notices .nacts,
  #lw-notices .n-x {
    opacity: 0;
    transition: opacity 0.12s;
  }
  #lw-notices li:hover .nacts,
  #lw-notices li:focus-within .nacts,
  #lw-notices li:hover .n-x,
  #lw-notices li:focus-within .n-x {
    opacity: 1;
  }
}
#lw-links {
  width: min(380px, calc(100vw - 28px));
}
#lw-links li {
  padding: 3px 0;
}
#lw-links .grp {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 10px 0 2px;
}

/* ---------- Shell: page actions (top right of main) ---------- */
.page-actions {
  float: right;
  position: relative;
  z-index: var(--z-float);
  display: flex;
  align-items: center;
  gap: 2px;
  margin: -2px -8px 6px var(--gap);
}
.page-actions .ib[aria-expanded='true'] {
  color: var(--fg);
  background: var(--pill);
  border-color: var(--line);
}
.pa-past {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  margin-right: 6px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tone-warn) 55%, var(--line));
  background: color-mix(in srgb, var(--tone-warn) 10%, var(--card));
  color: var(--fg);
  font-size: 12.5px;
  white-space: nowrap;
}
.pa-past b {
  color: var(--engine-blue);
  font-weight: 600;
}
.pa-past:hover {
  text-decoration: none;
  border-color: var(--engine-blue);
}

/* ---------- Shell: layout and sidebar ---------- */
/* Full width: the sidebar is flush left, main takes the rest; only prose caps its line length (.doc). */
.layout {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--nav-h));
}
.layout.no-side {
  grid-template-columns: minmax(0, 1fr);
}
#lw-side {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 45%, var(--bg));
  font-size: 13.5px;
}
.side-hd {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 44px;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid var(--line);
}
.side-toggle {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.side-toggle:hover {
  color: var(--fg);
  background: var(--pill);
  border-color: var(--line);
}
.side-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px 24px;
}
#lw-side ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
#lw-side li {
  margin: 0;
}
#lw-side .toc a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 6px;
  line-height: 1.35;
}
#lw-side .toc a .lbl {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#lw-side .toc a:hover {
  text-decoration: none;
  color: var(--fg);
  background: var(--pill);
}
#lw-side .toc a.active {
  color: var(--fg);
  background: var(--pill);
  box-shadow: inset 2px 0 0 var(--engine-blue);
}
#lw-side .grp,
.sp-h {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
#lw-side .grp {
  margin: 16px 10px 4px;
}
#lw-side .toc > li:first-child.grp {
  margin-top: 2px;
}
#lw-side ol ol a {
  padding-left: 22px;
  font-size: 13px;
}
#lw-side .dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.side-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sp-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 10px 6px;
}
.sp-h .cnt {
  text-transform: none;
  letter-spacing: 0;
}
.side-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-panel li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
  border-radius: 8px;
}
.side-panel li::after {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--engine-cyan);
  visibility: hidden;
}
.side-panel li.has-notes::after,
.side-panel li:has(.has-notes)::after {
  visibility: visible;
}
.side-panel input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--engine-green);
  flex: none;
  cursor: pointer;
  margin: 0;
}
.side-panel [data-pick],
.side-panel li > a {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.side-panel .lbl {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Tickets moved since the last standup: a quiet counter after the name like the review load, transitions on hover */
.mini.sb-moved {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  cursor: default;
}
.mini.sb-moved + .mini.sb-rev {
  margin-left: 0;
}
.side-panel [data-pick]:hover,
.side-panel li > a:hover {
  background: var(--pill);
  text-decoration: none;
}
.side-panel [data-pick].on {
  border-color: color-mix(in srgb, var(--engine-blue) 70%, transparent);
  color: var(--fg);
  background: color-mix(in srgb, var(--engine-blue) 12%, var(--card));
  font-weight: 600;
}
.side-panel [data-pick].done:not(.on),
.side-panel li.muted [data-pick] {
  color: var(--muted);
}
.mini {
  font-size: 11px;
  color: var(--muted);
  background: var(--pill);
  border-radius: 999px;
  padding: 0 6px;
  font-weight: 400;
  white-space: nowrap;
  cursor: default;
}
.mini.warn {
  color: var(--tone-warn);
}
/* Folded sidebar (wide screens): a rail with the toggle, photos, attendance and the notes dot */
@media (min-width: 901px) {
  body.side-collapsed .layout:not(.no-side) {
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
  }
  body.side-collapsed .side-hd {
    justify-content: center;
    padding: 0;
  }
  body.side-collapsed .side-toggle svg {
    transform: scaleX(-1);
  }
  body.side-collapsed .side-body {
    padding: 8px 4px 20px;
  }
  body.side-collapsed #lw-side .toc,
  body.side-collapsed #lw-side .lbl,
  body.side-collapsed .side-panel .mini,
  body.side-collapsed .sp-h {
    display: none;
  }
  body.side-collapsed .side-panel {
    margin-top: 0;
    padding-top: 8px;
    border-top: 0;
  }
  body.side-collapsed .side-panel + .side-panel {
    margin-top: 8px;
    border-top: 1px solid var(--line);
  }
  body.side-collapsed .side-panel li {
    flex-direction: column;
    gap: 3px;
    padding: 4px 0;
  }
  body.side-collapsed .side-panel [data-pick],
  body.side-collapsed .side-panel li > a {
    flex: none;
    justify-content: center;
    padding: 3px;
  }
}

main {
  padding: 20px var(--pad-x) 64px;
  min-width: 0;
}
/* Room under the last section, so folding it never leaves its header stuck at the very bottom */
main:has(> details.sec) {
  padding-bottom: max(64px, 35vh);
}
main::after {
  content: '';
  display: table;
  clear: both;
}
.sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
/* Below 900px the sidebar is an off-canvas drawer (☰ in the nav, body.side-open) */
@media (max-width: 900px) {
  :root {
    --pad-x: 18px;
  }
  .layout,
  .layout.no-side {
    grid-template-columns: minmax(0, 1fr);
  }
  #lw-top .side-menu {
    display: inline-flex;
  }
  #lw-top .home .name {
    display: none;
  }
  #lw-side {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    bottom: 0;
    z-index: var(--z-sidebar);
    width: min(288px, 86vw);
    height: auto;
    background: var(--card);
    box-shadow: var(--shadow-overlay);
    transform: translateX(-102%);
    transition: transform 0.18s ease;
    visibility: hidden;
  }
  body.side-open #lw-side {
    transform: none;
    visibility: visible;
  }
  .side-toggle svg {
    transform: scaleX(1);
  }
}
@media (max-width: 600px) {
  .lw-pages {
    display: none;
  }
  .lw-pmenu {
    display: block;
  }
}
@media (prefers-reduced-motion: reduce) {
  #lw-side {
    transition: none;
  }
}
@media print {
  #lw-top,
  .page-actions,
  #lw-side,
  .lw-drawer,
  #lw-notices,
  #lw-links {
    display: none !important;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  details {
    display: block;
  }
  details > * {
    display: block !important;
  }
}

/* ---------- Components ---------- */
.tbl tr.ms td {
  font-size: 12.5px;
}
.tfilter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 6px;
}
.tfilter input {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 12.5px;
  min-width: 180px;
}
/* WorkItem: title, then PR lines (assets/work.css) */
.wi {
  min-width: 0;
  line-height: 1.35;
}
.wi-1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
}
.wi-due {
  color: var(--tone-warn);
  font-size: 11.5px;
  white-space: nowrap;
}
.prs {
  display: inline-flex;
  gap: 4px;
  flex: none;
}
/* Indicators */
.inds {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.ind {
  font-size: 12.5px;
  cursor: default;
  white-space: nowrap;
}
.ind.ci.good,
.ind.ready {
  color: var(--tone-good);
}
.ind.ci.bad {
  color: var(--tone-bad);
}
.ind.ci.warn,
.ind.blk {
  color: var(--tone-warn);
}
.ind.ready {
  font-weight: 600;
  font-size: 12px;
}
.ind.blk {
  font-size: 12px;
}
/* EditableText: a title that turns into a field when clicked */
.lw-edit {
  min-width: 0;
  max-width: 100%;
  margin: -2px -4px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button.lw-edit {
  cursor: text;
}
button.lw-edit:hover,
button.lw-edit:focus-visible {
  border-color: var(--line);
  background: var(--pill);
}
input.lw-edit {
  width: 100%;
  border-color: var(--tone-info);
  background: var(--card);
  outline: none;
}
/* Avatar / PersonRef */
.av {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pill);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  overflow: hidden;
  vertical-align: middle;
  box-shadow: 0 0 0 1.5px var(--card);
}
.av.md {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.av i {
  font-style: normal;
  letter-spacing: 0.02em;
}
.av img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.av.ring {
  box-shadow:
    0 0 0 2px var(--card),
    0 0 0 3.5px var(--tone-neutral);
}
.av.ring.approved,
.av.ring.good {
  box-shadow:
    0 0 0 2px var(--card),
    0 0 0 3.5px var(--tone-good);
}
.av.ring.waiting,
.av.ring.warn {
  box-shadow:
    0 0 0 2px var(--card),
    0 0 0 3.5px var(--tone-warn);
}
.av.ring.changes_requested,
.av.ring.bad {
  box-shadow:
    0 0 0 2px var(--card),
    0 0 0 3.5px var(--tone-bad);
}
.pref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
/* A teammate named inside a line of text: small photo, name, person card on hover */
.pref.inline {
  gap: 4px;
  vertical-align: -4px;
  font-weight: 500;
}
.pref.inline .av {
  width: 18px;
  height: 18px;
  font-size: 8px;
}
.pref-sub {
  color: var(--muted);
  font-size: 0.92em;
  font-weight: 400;
}
/* Name over a second line (a role): the standup's people */
.pref.stack {
  gap: 8px;
}
.pref-t {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}
.pref-t > :first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Ops Review: who handed Shield to whom */
.handoff {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.handoff .sn-arrow {
  width: 26px;
}
.rvl {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rv-sum {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.rv {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  white-space: nowrap;
}
.rv.changes_requested .rv-name {
  color: var(--tone-bad);
}
.rv.waiting .rv-name {
  color: var(--muted);
}
/* DateAge: date, age below */
.da {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.25;
  white-space: nowrap;
}
.da .d {
  font-size: 13px;
}
.age {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.age.warn {
  color: var(--engine-amber);
}
.age.bad {
  color: var(--engine-orange);
}
/* StatusChip */
.st {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--pill);
  border-left: 3px solid var(--tone-neutral);
  margin: 1px 4px 1px 0;
  white-space: nowrap;
}
.st.good {
  border-left-color: var(--tone-good);
}
.st.warn {
  border-left-color: var(--tone-warn);
}
.st.bad {
  border-left-color: var(--tone-bad);
}
.st.info {
  border-left-color: var(--tone-info);
}
/* Notes: collapsed, count and "+ Add" in the header */
details.notes-box {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 8px;
}
details.notes-box > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fg);
  font-size: 13.5px;
}
details.notes-box .nh {
  font-weight: 600;
}
details.notes-box .add {
  margin-left: auto;
  color: var(--engine-blue);
  font-size: 12.5px;
}
details.notes-box.compact {
  border-top: 0;
  margin: 0;
  padding: 0;
}
details.notes-box.compact > summary::before {
  content: none;
}
details.notes-box.compact > summary .add {
  margin-left: 0;
}
details.notes-box > .notes {
  margin-top: 8px;
}
.notes .nlist,
.topics {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.notes .nlist li,
.topics li {
  padding: 6px 10px;
  border-left: 3px solid var(--engine-cyan);
  background: color-mix(in srgb, var(--pill) 60%, transparent);
  border-radius: 0 6px 6px 0;
  margin: 6px 0;
  font-size: 13.5px;
}
.txt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.by {
  color: var(--muted);
  font-size: 11.5px;
}
button.x {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  margin-left: auto;
}
button.x:hover {
  color: var(--tone-bad);
}
.nform,
.pform {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.nform textarea,
.pform input {
  flex: 1;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13.5px;
  resize: vertical;
}
.nform textarea:focus,
.pform input:focus {
  outline: none;
  border-color: var(--engine-blue);
}
.nform :disabled,
.pform :disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
/* ParkingLot */
.topics li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.topics li .body {
  flex: 1;
  min-width: 0;
}
.topics li input {
  margin-top: 3px;
  accent-color: var(--engine-green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.topics li.done .txt {
  color: var(--muted);
  text-decoration: line-through;
}
.topics li.empty {
  border: 0;
  background: none;
  padding-left: 0;
}
.parking {
  padding: 2px 0;
}
/* RepoRef */
a.repo {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
/* Small round badge on a section with notices; hover explains */
.stale {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--tone-info);
  color: var(--tone-info);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  margin-left: 4px;
}
.stale.warn {
  border-color: var(--tone-warn);
  color: var(--tone-warn);
}
.stale.bad {
  border-color: var(--tone-bad);
  color: var(--tone-bad);
}
/* Shield bars (the compact Shield calendar) */
.bar {
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  background: var(--pill);
  border-left: 3px solid var(--tone-neutral);
}
.bar.shield {
  background: color-mix(in srgb, var(--tone-info) 16%, transparent);
  border-left-color: var(--tone-info);
  font-weight: 600;
}
.bar.ooo {
  border-left-color: var(--tone-warn);
}
.bar.override {
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--tone-info) 16%, transparent) 0 6px,
    color-mix(in srgb, var(--tone-warn) 18%, transparent) 6px 12px
  );
  border-left-color: var(--tone-warn);
}
/* ShieldNow: on call now → next, then the round pages button */
.shield-now {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13.5px;
  max-width: 100%;
}
.sn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sn-row:empty {
  display: none;
}
.sn-to {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.sn-to:empty {
  display: none;
}
.sn-arrow {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 2px;
  margin: 0 4px 0 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone-info) 20%, transparent), var(--tone-info));
}
.sn-arrow::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--tone-info);
  border-right: 2px solid var(--tone-info);
  border-radius: 1px;
  transform: translateY(-50%) rotate(45deg);
}
.sn-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-height: 32px;
  max-width: 100%;
  padding: 3px 14px 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  line-height: 1.3;
}
.sn-pill b,
.sn-pill .sn-t {
  white-space: nowrap;
}
/* Name, then when on a smaller line under it, so the pill stays one row on 13-14" screens */
.sn-who {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}
.sn-pill .sn-k {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.sn-pill .sn-t {
  color: var(--muted);
  font-size: 11px;
}
.sn-pill.sn-on {
  border-color: color-mix(in srgb, var(--tone-info) 55%, var(--line));
  background: color-mix(in srgb, var(--tone-info) 10%, var(--card));
}
/* One row: on call → next, then the compact calendar's date and Today (ShieldPanel), then alerts; one 32px height */
.shield-now:has(.sn-tools) {
  align-items: stretch;
}
.sn-row:has(> .sn-tools) {
  align-self: stretch;
}
.sn-tools {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.sn-row > .al-pop {
  order: 2;
}
.sn-row:has(> .sn-tools) > .al-pop {
  margin: 0 4px 0 0;
}
.sn-tools .btn {
  height: 32px;
  border-radius: 999px;
  padding: 0 14px;
}
.sn-tools .cal-day-btn {
  padding: 0 12px;
}
.sn-row:has(> .sn-tools) .al-btn {
  width: 32px;
  height: 32px;
}
/* ---------- Alerts (src/features/shield/alerts.ts): round warning button, its card, the tabbed list and its rows ---------- */
.sn-row:has(> .al-pop) {
  align-self: stretch;
}
.al-pop {
  position: relative;
  display: inline-flex;
  margin-left: auto;
  margin-right: 8px;
}
.al-pop::after {
  content: '';
  position: absolute;
  top: 100%;
  right: -8px;
  height: 10px;
  width: min(560px, calc(100vw - 16px));
  display: none;
}
.al-pop:hover::after,
.al-pop.open::after {
  display: block;
}
.al-pop.shut:not(.open)::after {
  display: none;
}
.al-btn {
  --al: var(--tone-warn);
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--al);
  border-color: color-mix(in srgb, var(--al) 55%, var(--line));
  background: color-mix(in srgb, var(--al) 10%, var(--card));
  transition:
    background-color 0.12s,
    box-shadow 0.12s;
}
.al-btn.paged {
  --al: var(--tone-bad);
}
.al-btn.quiet {
  --al: var(--muted);
}
.al-btn:hover {
  color: var(--al);
  background: color-mix(in srgb, var(--al) 20%, var(--card));
}
.al-pop.open .al-btn {
  color: var(--al);
  background: color-mix(in srgb, var(--al) 30%, var(--card));
  box-shadow:
    inset 0 0 0 2px var(--al),
    0 0 0 3px color-mix(in srgb, var(--al) 25%, transparent);
}
.al-btn:focus-visible {
  outline: 2px solid var(--engine-blue);
  outline-offset: 2px;
}
.al-btn b {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--al);
  color: var(--engine-dark);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
  pointer-events: none;
}
.al-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--z-callout);
  width: min(560px, calc(100vw - 24px));
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--tone-warn);
  border-radius: 10px;
  padding: 10px 14px 12px;
  box-shadow: var(--shadow-menu);
  font-size: 13px;
  line-height: 1.4;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.12s,
    visibility 0s linear 0.18s;
}
.al-card.paged {
  border-left-color: var(--tone-bad);
}
.al-pop:hover .al-card,
.al-pop:focus-within .al-card,
.al-pop.open .al-card {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}
.al-pop.shut:not(.open) .al-card {
  visibility: hidden;
  opacity: 0;
  transition: none;
}
.al-card .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 6px;
}
.al-all {
  border: 1px solid var(--line);
  border-radius: 99px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.al-all:hover {
  color: var(--fg);
  background: var(--pill);
}
.al-all .l,
.al-all[aria-expanded='true'] .m,
.al-more .l,
.al-more[aria-expanded='true'] .m {
  display: none;
}
.al-all[aria-expanded='true'] .l,
.al-more[aria-expanded='true'] .l {
  display: inline;
}
.al-tabs [role='tab'] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.al-n {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--pill);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
}
.al-tabs [aria-selected='true'] .al-n {
  color: var(--fg);
}
.al-tabs [role='tabpanel'] {
  max-height: min(62vh, 480px);
  overflow: auto;
}
.al-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.al-row {
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.al-row:first-child {
  border-top: 0;
  padding-top: 2px;
}
.al-h {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 8px;
  cursor: pointer;
}
.al-tg {
  grid-column: 1;
  align-self: center;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.al-tg:hover {
  color: var(--fg);
  background: var(--pill);
}
.al-tg:focus-visible {
  outline: 2px solid var(--engine-blue);
  outline-offset: 1px;
}
.al-tg svg {
  transition: transform 0.12s;
}
.al-tg[aria-expanded='true'] svg {
  transform: rotate(90deg);
}
.al-h .al-p {
  grid-column: 2;
  margin: 0;
}
.al-t {
  grid-column: 3;
  font-weight: 500;
  overflow-wrap: anywhere;
  cursor: auto;
}
.al-ln {
  grid-column: 4;
  display: inline-flex;
  gap: 2px;
  align-self: start;
}
.al-ln .ib {
  height: 26px;
  min-width: 26px;
  padding: 0;
}
.al-m {
  grid-column: 3 / 5;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  color: var(--muted);
  font-size: 12px;
}
.al-svc {
  padding: 0 6px;
  border-radius: 4px;
  background: var(--pill);
  color: var(--fg);
  font-size: 11px;
}
.al-paged {
  color: var(--tone-bad);
  font-size: 11px;
  font-weight: 600;
}
.al-row.done .al-t a,
.al-row.done .al-t {
  color: var(--muted);
}
.al-res {
  color: var(--muted);
  font-size: 11.5px;
}
.al-sev {
  font-size: 10.5px;
}
.al-s.firing,
.al-s.triggered {
  color: var(--tone-bad);
}
.al-s.acknowledged {
  color: var(--tone-warn);
}
.al-s.resolved {
  color: var(--tone-good);
}
.al-d {
  margin: 6px 0 4px 30px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--pill) 60%, transparent);
  font-size: 12.5px;
}
.al-d[hidden] {
  display: none;
}
.al-dw {
  margin-bottom: 8px;
}
.al-desc {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
pre.al-desc {
  white-space: pre-wrap;
  font:
    11.5px/1.45 ui-monospace,
    Menlo,
    monospace;
  max-height: 40em;
  overflow: auto;
}
.al-desc.long {
  max-height: 9.5em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(var(--black) 70%, transparent);
  mask-image: linear-gradient(var(--black) 70%, transparent);
}
.al-dw:has(> .al-more[aria-expanded='true']) .al-desc {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.al-more {
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--engine-blue);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.al-f {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 12px;
  margin: 0;
}
.al-f dt {
  color: var(--muted);
}
.al-f dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.al-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
}
.al-empty {
  margin: 8px 0 4px;
}
/* ---------- end Alerts ---------- */

/* ---------- Standup ---------- */
.person-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.pnav {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}
.prog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.prog i {
  width: 72px;
  height: 6px;
  border-radius: 99px;
  background: var(--pill);
  overflow: hidden;
  display: inline-block;
}
.prog b {
  display: block;
  height: 100%;
  background: var(--engine-blue);
  border-radius: 99px;
}
.tree {
  color: var(--muted);
  white-space: pre;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
}

/* ---------- Home ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 14px 0 6px;
}
.tile {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--fg);
}
.tile:hover,
.tile:focus-visible {
  text-decoration: none;
  border-color: var(--engine-blue);
}
.tile .k {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.tile .m {
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- Component catalog ---------- */
.cg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.cg-s {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 0;
}
.cg-s figcaption {
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.cg-s.wide {
  grid-column: 1 / -1;
}
.cg-r {
  overflow-x: auto;
}
.cg-r #lw-top {
  position: static;
}
.cg-r .page-actions {
  float: none;
  margin: 0;
  justify-content: flex-end;
}
.cg-r #lw-side {
  position: static;
  height: auto;
  max-width: var(--side-w);
  border: 1px dashed var(--line);
  transform: none;
  visibility: visible;
  box-shadow: none;
}
.cg-r .lw-drawer {
  position: static;
  width: auto;
  max-width: 360px;
  margin-top: 8px;
  box-shadow: none;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.cg-r #lw-notices {
  position: static;
  width: auto;
  box-shadow: none;
}

/* ---------- Reports ---------- */
.rp-slack {
  position: relative;
}
.rp-slack > .btn,
.rp-slack > .rp-slack-actions {
  position: absolute;
  top: 6px;
  right: 6px;
}
.rp-slack-actions {
  display: flex;
  gap: 6px;
}
.rp-gen-line {
  margin: 0 0 8px;
}
.rp-gen-steps {
  max-height: 260px;
  overflow: auto;
  margin: 0 0 10px;
  padding: 0 0 0 10px;
  list-style: none;
  border-left: 2px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.rp-gen-steps li:last-child {
  color: inherit;
}
.rp-gen[data-status='saved'] .rp-gen-line b {
  color: var(--engine-green);
}
.rp-gen[data-status='invalid'] .rp-gen-line b,
.rp-gen[data-status='failed'] .rp-gen-line b {
  color: var(--engine-orange);
}
main.bare {
  max-width: none;
  margin: 0;
  padding: 0;
}
.pn {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 14px 22px 18px;
  box-sizing: border-box;
}
.pn-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.pn-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pn-count {
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}
.pn-topic {
  flex: 1;
  padding: 18px 0 10px;
}
.pn-topic h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 18px;
}
.pn-topic ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: 26px;
  line-height: 1.35;
}
.pn-topic li + li {
  margin-top: 12px;
}
.pn-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 10px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.pn-list button {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
  padding: 3px 8px;
}
.pn-list button.on {
  border-color: var(--line);
  color: inherit;
  font-weight: 600;
}
.pn-empty {
  padding: 40px 22px;
  font-size: 20px;
  color: var(--muted);
}
.pn-edit-topic {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 10px;
  padding: 8px 12px 10px;
}
.pn-edit-acts {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.rp-slack pre {
  white-space: pre-wrap;
  font-size: 12.5px;
  max-height: 420px;
  overflow: auto;
}
.kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 120px;
  max-width: 200px;
  color: var(--fg);
}
.kpi:hover {
  text-decoration: none;
  border-color: var(--engine-blue);
}
.kpi b {
  display: block;
  font-size: 22px;
}
.kpi span {
  display: block;
  line-height: 1.3;
  color: var(--muted);
  font-size: 12px;
}
.card.sev-1 {
  border-left-color: var(--tone-bad);
}
.card.sev-2 {
  border-left-color: var(--tone-warn);
}
.card.sev-3 {
  border-left-color: var(--tone-info);
}
main span.pill {
  cursor: pointer;
}
.tbl span.pill {
  cursor: default;
}
.row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  margin: 5px 0;
  font-size: 14.5px;
}
.row > .lbl {
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 3px;
}
.tk {
  display: inline-block;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 5px;
  background: var(--pill);
  margin: 2px 6px 2px 0;
  color: var(--fg);
}
/* A follow-up that is a PR: GitHub's state icon */
.tk.pr {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.tk.pr .wi-prl {
  flex: none;
}
.tk .st-ic {
  margin-right: 6px;
  vertical-align: -2px;
}
details .ev {
  font-size: 13px;
  margin: 6px 0 2px;
}
details .ev ul {
  margin: 4px 0;
  padding-left: 18px;
}
details .ev li {
  margin: 2px 0;
}
details .ev p {
  margin: 6px 0;
  font-size: 13.5px;
  max-width: 90ch;
}
details.fu .ev {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 0;
}
th time.tz {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
td.n,
th.n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td.good {
  color: var(--tone-good);
  font-weight: 600;
}
td.bad {
  color: var(--tone-bad);
  font-weight: 600;
}
td.warn {
  color: var(--tone-warn);
  font-weight: 600;
}
td.info {
  color: var(--tone-info);
  font-weight: 600;
}
td.grp {
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--pill);
}
.chart {
  margin: 10px 0 4px;
  min-width: 0;
  max-width: 100%;
}
.chart .ts-chart-host {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.chart .ts-chart-host svg {
  display: block;
  max-width: 100%;
  height: auto;
}
.chart .ct {
  font-weight: 600;
  font-size: 13.5px;
}
.chart .cs {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 2px;
}
.chart .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.chart .legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: -1px;
}
.chart .lgi {
  cursor: pointer;
  user-select: none;
}
.chart .lgi.off {
  opacity: 0.35;
  text-decoration: line-through;
}
.chart .cfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  min-width: 0;
}
.chart .cfoot .legend {
  flex: 1 1 16rem;
  min-width: 0;
  margin-top: 0;
}
.chart .legend > span,
.chart .legend .lgi {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.chart .cfoot .src {
  flex: 0 1 auto;
  max-width: 100%;
  font-size: 11.5px;
  color: var(--muted);
  white-space: normal;
  overflow-wrap: anywhere;
}
.chart .cproblem {
  margin: 6px 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
}
.stat-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 4px;
}
.stat-tile {
  display: flex;
  flex-direction: column;
  min-width: 120px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stat-tile .v {
  font-size: 24px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.stat-tile .l {
  font-size: 12px;
  color: var(--muted);
}
.stat-tile .s {
  font-size: 11px;
  color: var(--muted);
}
.chart i.swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  vertical-align: 0;
}
.dd-state {
  font-size: 12px;
  font-weight: 600;
}
.dd-state.alert {
  color: var(--engine-orange);
}
.dd-state.warn {
  color: var(--engine-amber);
}
.dd-state.ok {
  color: var(--engine-green);
}
.dd-state.nodata {
  color: var(--muted);
}
abbr.gl {
  text-decoration: underline dotted var(--muted);
  cursor: help;
}

/* ---------- Documents (markdown pages) ---------- */
.doc p,
.doc li {
  max-width: 78ch;
}
.doc h2 {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.doc h3 {
  font-size: 16px;
  margin: 22px 0 8px;
}
.doc h4 {
  font-size: 14px;
  margin: 18px 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li {
  margin: 3px 0;
}
.doc pre {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  font-size: 12.5px;
}
.doc pre code {
  background: none;
  padding: 0;
}
.doc table {
  margin: 10px 0 16px;
}
.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--engine-blue);
  border-radius: 8px;
  padding: 8px 14px;
  margin: 12px 0;
}
.callout.warn {
  border-left-color: var(--engine-amber);
  font-size: 13px;
}
.flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 18px;
}
.flow .lane {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.flow .step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}
.flow .arr {
  color: var(--muted);
}

#lw-bell.seen b {
  opacity: 0.5;
}

/* ---------- Times and ticket links ---------- */
time.tz {
  border-bottom: 1px dotted var(--muted);
  cursor: help;
  white-space: nowrap;
}
a.lin {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
/* State icons (packages/ui StateMark): one look for ticket states everywhere */
.st-ic {
  display: inline-flex;
  flex: none;
  align-items: center;
  color: var(--muted);
}
.st-ic svg {
  display: block;
}
.st-ic.started {
  color: var(--tone-warn);
}
.st-ic.review {
  color: var(--tone-info);
}
.st-ic.completed {
  color: var(--tone-good);
}
.st-ic.blocked {
  color: var(--tone-bad);
}
.st-ic.canceled,
.st-ic.none {
  color: var(--muted);
  opacity: 0.8;
}
.st-lb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12.5px;
}

/* Features panel (app/shell/panels.tsx, in a Panel): owners set who gets each feature and preview the app as others */
.fx-view {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.fx-seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.fx-seg button {
  height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.fx-seg button[aria-pressed='true'] {
  background: var(--btn-strong-bg);
  color: var(--fg);
  font-weight: 600;
}
.fx-reset {
  margin-left: auto;
  font-size: 12px;
}
.fx-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.fx-row:last-child {
  border-bottom: 0;
}
.fx-t b {
  font-size: 13px;
  margin-right: 6px;
}
.fx-t .pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 0 6px;
}
.fx-c {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.fx-c select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
}
.fx-me {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
}

/* Connections panel (app/shared/connections, in a Panel): one line per service with a state dot */
.cx-row {
  display: grid;
  grid-template-columns: 10px 92px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.4;
}
.cx-row:last-child {
  border-bottom: 0;
}
.cx-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone-neutral);
  transform: translateY(-1px);
}
.cx-dot.good {
  background: var(--tone-good);
}
.cx-dot.warn {
  background: var(--tone-warn);
}
.cx-dot.bad {
  background: var(--tone-bad);
}
.cx-msg {
  overflow-wrap: anywhere;
  color: var(--muted);
}
/* Connections: "My accounts" rows (dot, account, actions) and the section headings */
.cx-sec + .cx-sec {
  border-top: 1px solid var(--line);
}
.cx-h {
  margin: 12px 0 2px;
  font-size: 12.5px;
  font-weight: 700;
}
.cx-note {
  margin: 0 0 4px;
  font-size: 11.5px;
  line-height: 1.4;
}
.cx-acct {
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: start;
}
.cx-acct .cx-dot {
  margin-top: 5px;
}
.cx-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.cx-scopes {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.cx-acts,
.cx-confirm {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.cx-confirm {
  margin-top: 8px;
}

/* Agent buttons (app/shared/agent/agent.tsx): the run half and the ▾ half that picks the agent for one run */
.agent-split {
  display: inline-flex;
}
.agent-split .as-run {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.agent-split .as-pick {
  margin-left: -1px;
  padding: 0 7px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.prfix-pop .pf-agent {
  display: flex;
  margin: 0 0 10px;
}
.prfix-pop .pf-agent .acct-seg {
  flex: 1;
}
.prfix-pop .pf-agent .acct-seg button {
  height: 24px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 400;
}
.prfix-pop .pf-agent .acct-seg button[aria-pressed='true'] {
  background: var(--card);
  color: var(--fg);
  font-weight: 600;
}

/* The Claude Code handoff: the command to paste, then copy buttons */
.agent-handoff .handoff-cmd {
  margin: 4px 0 10px;
  padding: 8px 10px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.agent-handoff .handoff-cmd code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}
.agent-handoff .acts {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

}

@layer app {
/* Standup work view: tickets with their PRs, indicators, reviewers, avatars (app/features/standup/work-item.tsx, app/shared/pr, packages/ui Avatar). After kit.css in the app stylesheet. *
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Avatar: one size scale everywhere */
.av.xs {
  width: 16px;
  height: 16px;
  font-size: 7.5px;
  box-shadow: none;
}
.av.sm {
  width: 22px;
  height: 22px;
}
.av.md {
  width: 32px;
  height: 32px;
}

/* Work tables: one row per ticket, narrow columns hug their content. The team view scrolls with the page; a person's
   list stops at --work-max-h and scrolls inside (fade and "Show all N") */
.tbl.work {
  max-height: none;
}
.people {
  --work-max-h: clamp(280px, 60vh, 640px);
}
.people > .person:not(.all) .tbl.work {
  max-height: var(--work-max-h);
  scroll-padding-block: 44px 36px;
}
.people > .person .tbl.work[data-full] {
  max-height: none;
}
.people > .person .tbl.work::after {
  content: '';
  position: sticky;
  bottom: 0;
  display: block;
  height: 36px;
  margin-top: -36px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--card));
  box-shadow: inset 0 -1px 0 var(--line);
  opacity: 0;
  transition: opacity 0.15s;
}
.people > .person .tbl.work[data-more]::after {
  opacity: 1;
}
.work-more {
  margin: -4px 0 10px;
}
.people > .person:focus {
  outline: none;
}
.people > .person:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--engine-blue) 60%, transparent);
  outline-offset: 2px;
}
.tbl.work td {
  padding: 10px 14px;
  vertical-align: top;
}
.tbl.work td[data-col='age'],
.tbl.work td[data-col='person'] {
  width: 1%;
  white-space: nowrap;
}
/* Status bar: left edge and a faint tint along the whole row, one tone per status group (src/features/standup/view.ts WORK_GROUPS) */
.sb {
  --sb: var(--tone-neutral);
}
.sb.warn {
  --sb: var(--tone-warn);
}
.sb.info {
  --sb: var(--tone-info);
}
.sb.good {
  --sb: var(--tone-good);
}
.sb.bad {
  --sb: var(--tone-bad);
}
.sb.action {
  --sb: var(--engine-cyan);
}
.sb.muted {
  --sb: var(--line);
}
.tbl tbody tr.sb:not(.tgroup) {
  background: color-mix(in srgb, var(--sb) 6%, var(--card));
}
.tbl tbody tr.sb:not(.tgroup) > td:first-child {
  position: relative;
  padding-left: 18px;
}
.tbl tbody tr.sb:not(.tgroup) > td:first-child::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 7px;
  bottom: 7px;
  width: 4px;
  border-radius: 4px;
  background: var(--sb);
}
.tbl tbody tr.sb.muted:not(.tgroup) {
  background: var(--card);
  color: var(--muted);
}
/* Tickets that moved since the last standup: a faint tint; the "before → now" chip in the title says what changed */
.tbl tbody tr[data-moved]:not(.tgroup) {
  background: color-mix(in srgb, var(--engine-blue) 4%, var(--card));
}
.tbl tbody tr.sb.muted .wi-t,
.tbl tbody tr[data-via-pr] .wi-t {
  color: var(--muted);
}
.tbl tbody tr[data-via-pr] .wi-t::after {
  content: ' · via PR';
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
/* Group headers: "In progress 3" with the group's color as a dot */
.tbl tbody tr.tgroup {
  background: var(--card);
}
.tbl tbody tr.tgroup th {
  padding: 14px 14px 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.tbl tbody tr.tgroup:first-child th {
  padding-top: 8px;
}
.tgroup .tg-l::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--sb);
  vertical-align: 0;
}
.tgroup .tg-l.has-ic::before {
  display: none;
}
.tgroup .tg-l .st-ic {
  display: inline-flex;
  margin-right: 7px;
  vertical-align: -2px;
}
.tgroup .cnt {
  margin-left: 8px;
  font-size: 11.5px;
  letter-spacing: 0;
}
.person-h {
  gap: 10px;
  margin-bottom: 12px;
}
.pnav {
  gap: 6px;
}
.pnav button {
  width: 30px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}
.pnav button:hover {
  color: var(--fg);
}
details.work-box {
  border-top: 0;
  margin: 0 0 4px;
  padding: 0;
}
details.work-box > summary {
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 600;
  padding: 4px 0;
}
details.work-box > summary .cnt {
  margin-left: 4px;
}
details.work-box[open] > summary {
  margin-bottom: 6px;
}

/* WorkItem: the title is the main text, then the PRs as compact sub-lines with their indicators */
.wi-1 {
  gap: 4px 10px;
  font-size: 13.5px;
}
.wi-t {
  color: var(--fg);
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.wi-t:hover {
  color: var(--engine-blue);
}
/* "→ Done": moved since the last standup */
.wi-chg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: default;
  flex: none;
}
.wi-chg:focus-visible {
  outline: 2px solid var(--engine-blue);
  outline-offset: 2px;
}
/* A team ticket without a Linear project: a warning icon; hovering it opens the project picker (app/shared/linear/project-picker.tsx) */
.wi-noproj {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--tone-warn);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
button.wi-noproj {
  cursor: pointer;
}
button.wi-noproj:hover,
button.wi-noproj[aria-expanded='true'] {
  background: color-mix(in srgb, var(--tone-warn) 16%, transparent);
  border-color: color-mix(in srgb, var(--tone-warn) 50%, transparent);
}
button.wi-noproj:focus-visible {
  outline: 2px solid var(--engine-blue);
  outline-offset: 1px;
}
button.wi-noproj.done {
  color: var(--tone-good);
  cursor: default;
  background: none;
  border-color: transparent;
}
/* Project picker (linear.js): the ticket's title above the search */
.pp-t {
  color: var(--muted);
  font-size: 12px;
  margin: 0 2px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wi-prs {
  list-style: none;
  margin: 7px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wi-pr {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-height: 22px;
  padding: 1px 0;
  font-size: 12px;
}
.wi-pr.merged,
.wi-pr.closed {
  color: var(--muted);
}
.wi-pr.merged a,
.wi-pr.closed a {
  color: var(--muted);
}
.wi-pr .repo {
  font-size: 12px;
}
.wi-prl {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}
.wi-prl .wi-pst {
  transform: translateY(2px);
}
.wi-prl:hover .wi-repo,
.wi-prl:hover .wi-num {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wi-repo {
  color: var(--engine-blue);
}
.wi-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}
/* The PR's state as its list icon, in GitHub's colors */
.wi-pst {
  display: inline-flex;
  flex: none;
  align-self: center;
}
.wi-pst.open {
  color: var(--pr-open);
}
.wi-pst.draft {
  color: var(--pr-draft);
}
.wi-pst.merged {
  color: var(--pr-merged);
}
.wi-pst.closed {
  color: var(--pr-closed);
}
.wi-pr.merged .wi-num,
.wi-pr.closed .wi-num {
  color: var(--muted);
}
.wi-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.wi-by .pref {
  gap: 5px;
  color: var(--fg);
}

/* Indicators: small chips, each a hover-card trigger; failures are filled so they stand out on the row */
.inds {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.ind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--pill);
  color: var(--fg);
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
  cursor: default;
  max-width: 100%;
  min-width: 0;
}
.ind-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.ind {
  cursor: pointer;
}
a.ind:hover,
.ind:focus-visible {
  text-decoration: none;
  border-color: var(--engine-blue);
  outline: none;
}
.ind.good {
  color: var(--tone-good);
}
.ind.warn {
  color: var(--tone-warn);
  border-color: color-mix(in srgb, var(--tone-warn) 45%, var(--line));
}
.ind.bad {
  color: var(--tone-bad);
  border-color: var(--tone-bad);
  background: color-mix(in srgb, var(--tone-bad) 14%, var(--card));
  font-weight: 700;
}
.ind.neutral {
  color: var(--muted);
}
.ind.apr.good {
  padding: 0 5px;
  gap: 4px;
}
.ind .av.xs {
  margin: 0;
}
.ind.margo {
  padding-left: 4px;
}
/* Everything that passes, folded into one chip; the hover card lists each check */
.ind.ok {
  gap: 3px;
  padding: 0 7px 0 6px;
  background: color-mix(in srgb, var(--tone-good) 8%, var(--card));
  border-color: color-mix(in srgb, var(--tone-good) 35%, var(--line));
}
.ind.ok b {
  font-weight: 700;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.ind.ok.ready {
  background: color-mix(in srgb, var(--tone-good) 16%, var(--card));
}
/* A fix the workspace can run (update the branch, or ask Cursor): its icon ends the problem chip; the chip's card has it at the top right */
html[data-fixes] .ind.fixable {
  padding-right: 6px;
}
/* Fixes and PR actions are for owners for now (src/server/roles.ts canFix): everyone else sees the chip alone */
html:not([data-fixes]) [data-pr-fix],
html:not([data-fixes]) [data-pr-act] {
  display: none !important;
}
.ind-ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin-left: 2px;
  padding: 0 1px 0 6px;
  border-left: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  color: inherit;
  background: none;
  cursor: pointer;
  opacity: 0.85;
}
.ind-ai:hover,
.ind-ai:focus-visible {
  opacity: 1;
  outline: none;
}
.ind-ai svg {
  width: 12px;
  height: 12px;
}
.lw-card .hc-act {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  margin: -2px -5px 6px 12px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--engine-blue) 45%, var(--line));
  background: color-mix(in srgb, var(--engine-blue) 10%, var(--card));
  color: var(--engine-blue);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.lw-card .hc-act:hover {
  background: color-mix(in srgb, var(--engine-blue) 18%, var(--card));
}
.lw-card .hc-act[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.lw-card .hc-act .ic svg {
  width: 13px;
  height: 13px;
}
/* A PR card's actions (app/shared/pr/actions.tsx): the main one for its state, the rest behind ⋯ */
.lw-card .hc-acts-pr {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -2px -5px 6px 12px;
}
.lw-card .hc-acts-pr .hc-act {
  float: none;
  margin: 0;
}
.lw-card .hc-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
}
.lw-card .hc-more:hover,
.lw-card .hc-more:focus-visible {
  color: var(--fg);
  background: var(--pill);
}
/* PRs inside cards: state icon, repo and number as one link, then the title */
.lw-card .prh {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lw-card .prb {
  font-size: 11.5px;
  overflow-wrap: anywhere;
}
.lw-card .wi-prs li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.lw-card .wi-prs .pr-t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ReviewerList: "N/M approved", then a grid of photo (ring = state) and name */
.rvl {
  gap: 8px;
}
.rv-grid {
  list-style: none;
  margin: 0;
  padding: 3px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 10px 12px;
  max-width: 560px;
}
.rv-grid .rv {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 12.5px;
}
.rv-grid .rv-name {
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tbl td[data-col='reviewers'] {
  min-width: 170px;
}
.tbl td[data-col='item']:not(.grow) {
  min-width: 280px;
  max-width: 460px;
}
.tbl td[data-col='item']:not(.grow) .wi-t {
  white-space: normal;
}

/* Hover card extras for data-card: linked lines with tones, people rows */
.lw-card .ln.tone-bad::before,
.lw-card .ln.tone-warn::before,
.lw-card .ln.tone-good::before {
  content: '●';
  margin-right: 7px;
  font-size: 9px;
  vertical-align: 1px;
}
.lw-card .ln.tone-bad::before {
  color: var(--tone-bad);
}
.lw-card .ln.tone-warn::before {
  color: var(--tone-warn);
}
.lw-card .ln.tone-good::before {
  color: var(--tone-good);
}
.lw-card .ln .av {
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: -3px;
}
.lw-card .faces {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 2px;
}
.lw-card .face {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--fg);
  font-size: 12.5px;
}
.lw-card a.face:hover {
  text-decoration: none;
  color: var(--engine-blue);
}
.lw-card .faces .av {
  width: 22px;
  height: 22px;
}

/* DataTable toolbar: aligned controls, the select arrow inset from the edge */
.tfilter {
  gap: 8px;
  margin: 2px 0 8px;
}
.tfilter input[type='search'],
.tfilter select.tview,
.tfilter .tname,
.tfilter .pill.tcols {
  height: 28px;
  box-sizing: border-box;
}
.tfilter select.tview {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 30px 0 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 26px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
}
.tfilter select.tview:hover,
.tfilter select.tview:focus {
  border-color: var(--engine-blue);
  outline: none;
}
.tfilter .pill.tcols {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
}

/* Tech designs: type and author live under the title, so the title and the reviewers get the width */
.tbl th.dsg-col,
.tbl td.dsg-col {
  width: 38%;
  min-width: min(34ch, 30vw);
}
[data-table='designs'] td[data-col='prs'] {
  white-space: nowrap;
}
@media (max-width: 1200px) {
  [data-table='designs'] td[data-col='prs'] {
    white-space: normal;
  }
}
.dsg-by {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.dsg-by .pill {
  font-size: 11px;
}

/* Project progress: a bar split by status, what is left in a floating panel (src/features/standup/project-progress.ts) */
.pj {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 190px;
}
.pj-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.pj-bar {
  display: inline-flex;
  width: 120px;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--pill);
}
.pj-bar i {
  display: block;
  height: 100%;
}
.pj-done {
  --pj: var(--tone-good);
}
.pj-review {
  --pj: var(--tone-info);
}
.pj-progress {
  --pj: var(--tone-warn);
}
.pj-blocked {
  --pj: var(--tone-bad);
}
.pj-todo {
  --pj: var(--engine-text-dark);
}
.pj-bar i,
.pj-bar i.pj-todo {
  opacity: 0.45;
}
.pj-bd {
  margin: 0;
  padding: 0;
}
.pj-bd > summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  font-size: 11.5px;
  line-height: 18px;
  color: var(--muted);
  cursor: pointer;
}
.pj-bd > summary::before {
  width: 10px;
  height: 10px;
  margin: 0;
  -webkit-mask-size: 10px;
  mask-size: 10px;
}
.pj-bd > summary .warn {
  color: var(--tone-warn);
  font-weight: 600;
}
/* Open, the breakdown floats over the table instead of growing the row; shell.js places it under its summary */
.pj-list {
  position: fixed;
  z-index: var(--z-callout);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
  min-width: 300px;
  max-width: min(520px, calc(100vw - 16px));
  max-height: min(420px, calc(100vh - 16px));
  overflow: auto;
  padding: 10px 12px;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--lw-radius);
  box-shadow: var(--shadow-overlay);
}
.pj-gh {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.pj-g ul {
  list-style: none;
  margin: 3px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pj-i {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 2px 0 2px 8px;
  border-left: 2px solid var(--pj);
}
.pj-id {
  font:
    600 11.5px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  white-space: nowrap;
}
.pj-t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pj-un {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--tone-warn);
  border: 1px solid color-mix(in srgb, var(--tone-warn) 55%, transparent);
  border-radius: 999px;
  padding: 0 6px;
}

/* Work table: ticket title | PRs with their indicators | age */
.tbl th.wk-title,
.tbl td.wk-title {
  width: 38%;
  min-width: 28ch;
}
.tbl td[data-col='prs'] .wi-prs {
  margin: 0;
}
.tbl td[data-col='prs'] .wi-pr {
  flex-wrap: nowrap;
}
.tbl td[data-col='prs'] .inds {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}
@media (max-width: 1200px) {
  .tbl td[data-col='prs'] .wi-pr {
    flex-wrap: wrap;
  }
}

/* Content of the PR fix and PR action popovers (app/shared/pr/fix.tsx, actions.tsx; the frame is the ui Popover) */
.prfix-pop p {
  margin: 4px 0 10px;
}
.prfix-pop .pf-acts {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.prfix-pop button {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.prfix-pop .pf-go {
  background: var(--btn-strong-bg);
  border-color: var(--btn-strong-line);
  color: var(--fg);
  font-weight: 600;
}
.prfix-pop .pf-go:hover:not([disabled]) {
  background: var(--btn-strong-hover);
}
.prfix-pop .pf-go[disabled] {
  opacity: 0.7;
  cursor: progress;
}
.prfix-pop .pf-t {
  margin-bottom: 6px;
}
.prfix-pop .pf-t.good {
  color: var(--tone-good);
}
.prfix-pop .pf-t.bad {
  color: var(--tone-bad);
}
.prfix-pop a {
  font-size: 12px;
}
.prfix-pop .prb {
  margin: 2px 0 8px;
  font-size: 11.5px;
  overflow-wrap: anywhere;
}
.prfix-pop .lbl {
  margin: 6px 0 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* PR actions (app/shared/pr/actions.tsx): merge method, blockers, reviewer picker */
.prfix-pop .pa-seg {
  display: inline-flex;
  margin: 2px 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.prfix-pop .pa-seg button {
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  font-size: 12px;
}
.prfix-pop .pa-seg button + button {
  border-left: 1px solid var(--line);
}
.prfix-pop .pa-seg button[aria-pressed='true'] {
  background: var(--pill);
  font-weight: 600;
}
.prfix-pop .pa-why {
  margin: 0 0 8px;
  padding-left: 16px;
  color: var(--fg);
}
.prfix-pop .pa-why li {
  margin: 2px 0;
}
.prfix-pop .pa-req {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.prfix-pop .pa-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 2px 0 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}
.prfix-pop .pa-chip.gone span {
  text-decoration: line-through;
  color: var(--muted);
}
.prfix-pop .pa-chip .pa-x {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  line-height: 1;
}
.prfix-pop .pa-chip .pa-x:hover {
  background: var(--pill);
  color: var(--fg);
}
.prfix-pop .pa-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--pill);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.prfix-pop .pa-av.team {
  border-radius: 5px;
}
.prfix-pop .pa-av .ic svg {
  width: 12px;
  height: 12px;
}
.prfix-pop .pa-q {
  box-sizing: border-box;
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.prfix-pop .pa-list {
  list-style: none;
  margin: 4px 0 6px;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}
.prfix-pop .pa-list li.note {
  padding: 4px 6px;
}
.prfix-pop .pa-list button {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 30px;
  padding: 0 6px;
  border: 0;
  background: none;
  text-align: left;
}
.prfix-pop .pa-list button:hover,
.prfix-pop .pa-list button:focus-visible {
  background: var(--pill);
  outline: none;
}
.prfix-pop .pa-list button.on {
  font-weight: 600;
}
.prfix-pop .pa-list .pa-n,
.prfix-pop .pa-list .note {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.prfix-pop .pa-list .pa-n {
  flex: 0 1 auto;
}
.prfix-pop .pa-list .note {
  flex: 0 3 auto;
}
.prfix-pop .pa-list .pa-on {
  margin-left: auto;
  color: var(--tone-good);
}
.prfix-pop .pa-sum {
  margin: 4px 0 10px;
}

/* Flagged notes (app/features/standup/notes.tsx): on your own card a note can be your update for today or a blocker; the Kickoff lists who is blocked, and My day shows your update (.an). */
.nform.own {
  flex-wrap: wrap;
}
.nform .nflags {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
}
.notes .nlist li.blocker {
  border-left-color: var(--tone-bad);
}
.an {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
}
.an.blocked {
  border-color: color-mix(in srgb, var(--tone-bad) 55%, var(--line));
}
.an-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.an-t {
  font-weight: 650;
}
.an-at {
  margin-left: auto;
}
.an-p {
  margin: 0;
  font-size: 13px;
  white-space: pre-wrap;
}
.an-blockers {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--tone-bad);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--tone-bad) 8%, var(--card));
}
.an-bh {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tone-bad);
}
.an-blockers ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.an-blockers li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 13px;
}
.an-why {
  color: var(--muted);
  white-space: pre-wrap;
}

/* Review load: review requests waiting on a person, after their name in the sidebar (packages/ui Sidebar). */
.mini.sb-rev {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

}

@layer app {
/* Retro boards and lists (app/features/retro). After kit.css in the app stylesheet; built on its variables and tones. */
.retro {
  --rt-col: 232px;
}
.rt-addbox > summary::before {
  content: none !important;
  display: none !important;
}
.rt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 14px;
}
.rt-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  min-width: 0;
}
.rt-title h1 {
  margin: 0;
}
.rt-facts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rt-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.rt-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline dotted;
}
.rt-link:hover {
  color: var(--tone-bad);
}

/* Timer */
.rt-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}
.rt-clock {
  font:
    700 16px/1 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  font-variant-numeric: tabular-nums;
  min-width: 46px;
}
.rt-timer.idle .rt-clock {
  font-size: 15px;
  min-width: 0;
  color: var(--muted);
}
.rt-timer.running {
  border-color: color-mix(in srgb, var(--engine-blue) 60%, var(--line));
}
.rt-timer.running .rt-clock {
  color: var(--engine-blue);
}
.rt-timer.low {
  border-color: var(--tone-warn);
}
.rt-timer.low .rt-clock {
  color: var(--tone-warn);
}
.rt-timer.paused .rt-clock {
  color: var(--muted);
}
.rt-timer.done {
  border-color: var(--tone-bad);
  background: color-mix(in srgb, var(--tone-bad) 10%, var(--card));
}
.rt-timer.done .rt-clock {
  color: var(--tone-bad);
}
@keyframes rt-pulse {
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--tone-bad) 25%, transparent);
  }
}
.rt-timer.done {
  animation: rt-pulse 1.2s ease-in-out 3;
}
@media (prefers-reduced-motion: reduce) {
  .rt-timer.done {
    animation: none;
  }
}
.rt-clock svg {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}
/* Duration: looks like a select (text + chevron), but takes any typed length; the chevron opens the presets */
.rt-tpick {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}
.rt-tpick:focus-within {
  border-color: var(--engine-blue);
}
.rt-tin {
  width: 64px;
  height: 24px;
  background: none;
  color: var(--fg);
  border: 0;
  padding: 0 0 0 9px;
  font: inherit;
  font-size: 12px;
  outline: none;
}
.rt-tchev {
  width: 22px;
  height: 24px;
  padding: 0;
  border: 0;
  background: var(--chev-gray) center / 11px no-repeat;
  cursor: pointer;
}
.lw-pop.rt-tmenu {
  min-width: 110px;
}
.rt-timer .btn {
  height: 26px;
  border-radius: 999px;
}
.rt-timer .rt-tpick {
  border-radius: 999px;
  padding-left: 2px;
}

/* Columns: one per template column, scrolling sideways on narrow screens */
.rt-cols {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(var(--rt-col), 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}
.rt-col {
  --tone: var(--tone-neutral);
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: color-mix(in srgb, var(--tone) 6%, var(--card));
  border: 1px solid var(--line);
  border-top: 4px solid var(--tone);
  border-radius: 10px;
  padding: 10px 10px 12px;
}
.rt-col.tone-good {
  --tone: var(--tone-good);
}
.rt-col.tone-warn {
  --tone: var(--tone-warn);
}
.rt-col.tone-bad {
  --tone: var(--tone-bad);
}
.rt-col.tone-info {
  --tone: var(--tone-info);
}
.rt-col.tone-action {
  --tone: var(--engine-cyan);
}
.rt-colh {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  padding: 0 2px 6px;
}
.rt-colh h2 {
  margin: 0;
  padding: 0;
  font-size: 15px;
}
.rt-colh .cnt {
  font-size: 12px;
  color: var(--muted);
}
.rt-addbox {
  margin: 2px 0 8px;
}
.rt-addbox > summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}
.rt-addbox > summary::-webkit-details-marker {
  display: none;
}
.rt-addbox > summary:hover {
  color: var(--fg);
  border-color: var(--tone);
}
.rt-addbox[open] > summary {
  display: none;
}
.rt-add textarea {
  width: 100%;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--tone);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13.5px;
  resize: vertical;
}
.rt-add textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 30%, transparent);
}
.rt-addbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.rt-empty {
  margin: 4px 2px;
}

/* Cards */
.rt-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 36px;
  border-radius: 8px;
}
.rt-cards.drop-on {
  outline: 2px dashed color-mix(in srgb, var(--engine-blue) 60%, transparent);
  outline-offset: 3px;
}
.rt-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px 7px;
  font-size: 13.5px;
  box-shadow: var(--shadow-xs);
}
.retro.writable .rt-cols .rt-card {
  cursor: grab;
}
.rt-card:focus-visible {
  outline: 2px solid var(--engine-blue);
  outline-offset: 2px;
}
.rt-card.dragging {
  opacity: 0.4;
}
.rt-card.merge-target {
  border-color: var(--engine-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--engine-blue) 35%, transparent);
}
.rt-card.merge-target::after {
  content: 'Drop to merge';
  position: absolute;
  right: 8px;
  top: -10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  background: var(--engine-blue);
  border-radius: 999px;
  padding: 1px 8px;
}
.rt-ph {
  height: 38px;
  border: 2px dashed var(--engine-blue);
  border-radius: 8px;
  background: color-mix(in srgb, var(--engine-blue) 8%, transparent);
}
.rt-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.rt-from {
  display: block;
  margin-bottom: 3px;
  font-size: 11.5px;
}
.rt-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.rt-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rt-merged {
  margin-top: 6px;
  font-size: 12.5px;
}
.rt-merged > summary {
  cursor: pointer;
  color: var(--muted);
}
.rt-merged ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0 0 0 10px;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rt-mtext {
  white-space: pre-wrap;
}
.rt-act {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
}
.rt-done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-weight: 600;
}
.rt-done input {
  width: 15px;
  height: 15px;
  accent-color: var(--engine-green);
  margin: 0;
}
.rt-card.is-action.done .rt-text {
  color: var(--muted);
  text-decoration: line-through;
}
.rt-card.is-action.dropped {
  opacity: 0.65;
}
.rt-ticket {
  font:
    600 12px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}
.rt-act .btn {
  height: 24px;
  padding: 0 9px;
  font-size: 12px;
}
.rt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  margin-top: 7px;
  font-size: 12px;
}
.rt-foot .sp {
  flex: 1;
}
.rt-people {
  display: inline-flex;
  align-items: center;
  margin-right: 3px;
}
.rt-people .av {
  width: 20px;
  height: 20px;
  font-size: 8.5px;
}
.rt-people .av + .av {
  margin-left: -5px;
}
.rt-people .av:hover {
  z-index: var(--z-raised);
  transform: translateY(-1px);
}
.av.ring.info {
  box-shadow:
    0 0 0 2px var(--card),
    0 0 0 3.5px var(--tone-info);
}
.rt-reacts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rt-r {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--pill);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: default;
}
button.rt-r {
  cursor: pointer;
}
button.rt-r:hover {
  border-color: var(--engine-blue);
}
.rt-r.on {
  border-color: var(--engine-blue);
  background: color-mix(in srgb, var(--engine-blue) 16%, var(--card));
}
.rt-r.zero {
  opacity: 0.7;
}
.rt-r.zero:hover {
  opacity: 1;
}
.rt-r b {
  font-weight: 700;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  padding-left: 5px;
  margin-left: 1px;
  border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}
.rt-r b:empty {
  display: none;
}
.rt-plus {
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: -0.02em;
}
.rt-r.vote.on {
  color: var(--engine-blue);
}
.rt-emo {
  font-size: 12.5px;
  line-height: 1;
}
.rt-r.add {
  color: var(--muted);
  padding: 0 6px;
}
.rt-r svg,
.rt-more svg,
.rt-cbtn svg {
  display: block;
}
/* The card's own icon buttons (comments, menu: .ib.sm.sq): bordered on hover and while the thread is open */
.rt-more:hover,
.rt-cbtn:hover,
.rt-cbtn[aria-expanded='true'] {
  color: var(--fg);
  background: var(--pill);
  border-color: var(--line);
}
.rt-cbtn b {
  font-weight: 600;
}
.rt-cbtn b:empty {
  display: none;
}
/* The thread opens under the footer, full width, and grows the card downwards. */
.rt-thread {
  margin: 7px -2px 0;
  padding: 8px 2px 0;
  border-top: 1px solid var(--line);
  cursor: auto;
}
.rt-thread[hidden] {
  display: none;
}
.rt-cms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rt-cm {
  display: flex;
  gap: 7px;
  align-items: flex-start;
}
.rt-cm > .av {
  flex: none;
  margin-top: 1px;
}
.rt-cbody {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rt-chead {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11.5px;
}
.rt-chead b {
  font-weight: 600;
  color: var(--fg);
}
.rt-chead .rt-link {
  margin-left: auto;
  font-size: 11px;
}
.rt-ctext {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  color: var(--fg);
}
.rt-cm .rt-reacts {
  gap: 3px;
}
.rt-cm .rt-r {
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
}
.rt-cm .rt-r b {
  font-size: 10.5px;
}
.rt-cform {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.rt-cform input {
  flex: 1;
  min-width: 0;
  height: 28px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
  font-size: 12.5px;
}
.rt-cform input:focus {
  outline: none;
  border-color: var(--engine-blue);
}
.rt-cform .btn {
  height: 28px;
}

/* Carried action items and follow-up lists (standup, overview) */
.rt-carry {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--engine-cyan);
  border-radius: 10px;
  background: color-mix(in srgb, var(--engine-cyan) 6%, var(--card));
}
.rt-carry-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.rt-carry-h h2 {
  margin: 0;
  padding: 0;
  font-size: 14.5px;
}
.rt-carry-h .cnt {
  color: var(--muted);
  font-size: 12px;
}
.rt-fu {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}
.rt-list {
  margin-top: 0;
}
.rt-start {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}
.rt-start label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.rt-start label.grow {
  flex: 1;
  min-width: 220px;
}
.rt-start input[type='text'] {
  height: 30px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  font: inherit;
  font-size: 13px;
}
.rt-start input:focus {
  outline: none;
  border-color: var(--engine-blue);
}
.rt-start .btn {
  height: 30px;
}
.rt-arch td.n,
.rt-arch th.n {
  text-align: right;
}

/* Emoji picker (a Popover) and dialogs */
.lw-pop.rt-emoji-pop {
  width: max-content;
  padding: 5px;
}
.rt-emoji {
  display: flex;
  gap: 2px;
}
.rt-emoji button {
  width: 34px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: 17px;
  text-align: center;
  cursor: pointer;
}
.rt-emoji button:hover,
.rt-emoji button:focus-visible {
  background: var(--pill);
  outline: none;
}
.rt-emoji button.on {
  background: color-mix(in srgb, var(--engine-blue) 18%, var(--card));
}
.rt-dlg-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.rt-dlg-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}
.rt-dlg-card {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 13px;
  white-space: pre-wrap;
}
.rt-dlg-arrow {
  color: var(--muted);
  font-size: 18px;
}
.rt-pick-h {
  margin: 8px 0 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.rt-picks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
}
.lw-dialog .rt-pick {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: var(--fg);
  font-size: 13.5px;
  padding: 3px 4px;
  border-radius: 6px;
  cursor: pointer;
}
.lw-dialog .rt-pick:hover {
  background: var(--pill);
}
.lw-dialog .rt-pick input {
  width: 15px;
  height: 15px;
  margin: 0;
}

@media (max-width: 600px) {
  .retro {
    --rt-col: 260px;
  }
  .rt-dlg-pair {
    grid-template-columns: 1fr;
  }
  .rt-dlg-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }
}
@media print {
  .rt-tools,
  .rt-addbox,
  .rt-more,
  .rt-r.add,
  .rt-cform {
    display: none !important;
  }
  .rt-cols {
    overflow: visible;
  }
}

/* The retro list's card preview: the board's columns in small */
.rt-pv {
  display: flex;
  align-self: stretch;
  gap: 6px;
  width: 100%;
  padding: 12px;
}
.rt-pv-col {
  --tone: var(--line);
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--tone);
  border-radius: 6px;
  background: var(--card);
}
.rt-pv-col.tone-good {
  --tone: var(--tone-good);
}
.rt-pv-col.tone-warn {
  --tone: var(--tone-warn);
}
.rt-pv-col.tone-bad {
  --tone: var(--tone-bad);
}
.rt-pv-col.tone-info {
  --tone: var(--tone-info);
}
.rt-pv-col.tone-action {
  --tone: var(--engine-cyan);
}
.rt-pv-t {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rt-pv-col b {
  color: var(--fg);
  font-size: 16px;
  line-height: 1;
}
.rt-pv-col i {
  height: 8px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--tone) 22%, var(--card));
}

}

@layer app {
/* Home: groups of cards on a 12-column grid (app/features/home). After kit.css in the app stylesheet; built on its variables and tones. */
.home-groups {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin: 4px 0 26px;
}
.hg-t {
  margin: 0 0 10px;
  padding: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.hg-cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.hg-cards > .hc {
  grid-column: span var(--span, 6);
}
@media (max-width: 1200px) {
  .hg-cards > .hc {
    grid-column: span 12;
  }
}

.hc {
  --accent: var(--tone-neutral);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 18px 20px 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--card)), var(--card) 160px);
  color: var(--fg);
  overflow: hidden;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
.hc::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}
.hc:hover,
.hc:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--shadow-lift);
}
.hc.accent-info {
  --accent: var(--tone-info);
}
.hc.accent-good {
  --accent: var(--tone-good);
}
.hc.accent-warn {
  --accent: var(--tone-warn);
}
.hc.accent-bad {
  --accent: var(--tone-bad);
}
.hc.accent-action {
  --accent: var(--engine-cyan);
}
/* The title link covers the card; buttons, links and the history icon sit above it */
.hc-t::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
}
.hc a:not(.hc-t),
.hc button,
.hc [data-hover] {
  position: relative;
  z-index: var(--z-raised);
}
.hc-h {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hc-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 16%, var(--card));
  font-size: 18px;
  flex: none;
}
.hc-tw {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.hc-t {
  color: var(--fg);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
}
.hc-t:hover {
  text-decoration: none;
  color: var(--fg);
}
.hc-t:focus-visible {
  outline: none;
}
.hc:has(.hc-t:focus-visible) {
  outline: 2px solid var(--engine-blue);
  outline-offset: 2px;
}
.hc-sub {
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hc-acts {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.hc-acts .btn {
  font-weight: 600;
}
.hc-acts .btn:not(.primary):hover {
  border-color: var(--accent);
}

.hc-ms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}
.hc-m {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--pill) 70%, transparent);
  color: var(--fg);
}
a.hc-m:hover {
  text-decoration: none;
  background: var(--pill);
}
.hc-m b {
  font-size: 24px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hc-m span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.3;
}
.hc-m.info b {
  color: var(--tone-info);
}
.hc-m.good b {
  color: var(--tone-good);
}
.hc-m.warn {
  background: color-mix(in srgb, var(--tone-warn) 12%, var(--card));
}
.hc-m.warn b {
  color: var(--tone-warn);
}
.hc-m.bad {
  background: color-mix(in srgb, var(--tone-bad) 12%, var(--card));
}
.hc-m.bad b {
  color: var(--tone-bad);
}

.hc-pp {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hc-p {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}
.hc-p:first-child {
  font-weight: 600;
}

/* Subcards: the few items worth seeing now */
.hc-secs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.hc-sec {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 35%, var(--card));
}
.hc-sh {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.hc-sec ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hc-sec .note {
  margin: 2px 0;
}
.hc-i {
  --t: var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 0 3px 9px;
  border-left: 3px solid var(--t);
  font-size: 12.5px;
}
.hc-i.t-good {
  --t: var(--tone-good);
}
.hc-i.t-info {
  --t: var(--tone-info);
}
.hc-i.t-warn {
  --t: var(--tone-warn);
}
.hc-i.t-bad {
  --t: var(--tone-bad);
}
.hc-i.t-neutral {
  --t: var(--engine-text-dark);
}
.hc-il {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hc-il a {
  color: var(--fg);
}
.hc-il a:hover {
  color: var(--engine-blue);
}
.hc-il .mono {
  font:
    600 11.5px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  color: var(--muted);
}
.hc-im {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 1 auto;
  max-width: 42%;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hc-il {
  flex: 1 1 55%;
}
.hc-faces {
  flex: none;
  display: inline-flex;
}
.hc-faces .av + .av {
  margin-left: -5px;
}
.hc-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
}

/* History: the icon at the bottom right picks an earlier entry (app/shared/history HistoryPicker) */
.hc-hist {
  position: absolute !important;
  right: 12px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.hc-hist:hover,
.hc-hist[aria-expanded='true'] {
  color: var(--fg);
  background: var(--pill);
  border-color: var(--line);
}
@media (max-width: 600px) {
  .hc-h {
    flex-wrap: wrap;
  }
  .hc-acts {
    width: 100%;
    justify-content: flex-start;
  }
}

/* My day (src/features/my-day/my-day.ts): the viewer's own cards; their update for each standup side by side under Today. */
.md-notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.md-notes .an {
  margin: 0;
}
.md-notes .an-edit {
  align-self: flex-start;
  font-size: 12.5px;
}

}

@layer app {
/* Feature flags page (app/features/flags/components.tsx): anyone signed in, read only */
.ff-top {
  margin: 4px 0 14px;
}
.ff-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
.ff-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 108px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.ff-kpi b {
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ff-kpi span {
  font-size: 12px;
  color: var(--muted);
}
.ff-kpi.good b {
  color: var(--tone-good);
}
.ff-kpi.info b {
  color: var(--tone-info);
}
.ff-kpi.warn b {
  color: var(--tone-warn);
}
.ff-err {
  color: var(--tone-bad);
}
.ff-recent {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}
.ff-recent li {
  display: grid;
  grid-template-columns: 72px auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}
.ff-rk {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ff-envtag {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
/* The table */
.ff-table td[data-col='flag'] {
  min-width: 300px;
}
.ff-k {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ff-key {
  font-size: 12px;
  overflow-wrap: anywhere;
  cursor: default;
}
.ff-d {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ff-table th.ff-env,
.ff-table td.ff-env {
  text-align: center;
  width: 82px;
  text-transform: none;
}
.ff-st {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 52px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--pill);
  color: var(--fg);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none !important;
  white-space: nowrap;
}
.ff-st.sm {
  min-width: 0;
  height: 18px;
  font-size: 10.5px;
}
.ff-st.on {
  color: var(--tone-good);
  border-color: color-mix(in srgb, var(--tone-good) 40%, var(--line));
  background: color-mix(in srgb, var(--tone-good) 10%, var(--card));
}
.ff-st.part {
  color: var(--tone-info);
  border-color: color-mix(in srgb, var(--tone-info) 40%, var(--line));
  background: color-mix(in srgb, var(--tone-info) 9%, var(--card));
}
.ff-st.off {
  color: var(--muted);
}
.ff-st.inactive {
  color: var(--muted);
  font-weight: 500;
  border-style: dashed;
}
.ff-st.missing {
  border-color: transparent;
  background: none;
  color: var(--muted);
  font-weight: 400;
}
.ff-seg {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
.ff-mode {
  font-size: 12px;
  color: var(--muted);
}
.ff-who {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  white-space: nowrap;
}
.ff-inds {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ff-ind {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  white-space: nowrap;
  cursor: default;
}
.ff-ind.bad {
  color: var(--tone-bad);
  border-color: color-mix(in srgb, var(--tone-bad) 50%, var(--line));
}
.ff-ind.warn {
  color: var(--tone-warn);
  border-color: color-mix(in srgb, var(--tone-warn) 45%, var(--line));
}
.ff-ind.info {
  color: var(--muted);
}
.ff-table tr.ff-bad td:first-child {
  box-shadow: inset 3px 0 0 var(--tone-bad);
}
.ff-ed {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ff-hist {
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  flex: none;
}
.ff-table tr:target td {
  background: color-mix(in srgb, var(--tone-info) 8%, transparent);
}
/* History popover */
.lw-pop.ff-pop {
  width: min(420px, calc(100vw - 16px));
  max-height: 60vh;
}
.ff-pop-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ff-pop-h b {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.ff-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ff-tabs button {
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.ff-tabs button.on {
  background: var(--btn-strong-bg);
  color: var(--fg);
  font-weight: 600;
}
.ff-hl {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ff-hl li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
}
.ff-hl .v {
  grid-row: span 2;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ff-hl .meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
/* Scope: SAPI Lodging (default) · OBT · search every flag */
.ff-scope {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.ff-tabs-main {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}
.ff-tab {
  padding: 4px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
}
.ff-tab.on {
  background: var(--btn-strong-bg);
  color: var(--fg);
}
.ff-search {
  flex: 1;
  max-width: 420px;
}
.ff-search input {
  width: 100%;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
}
.ff-search input:focus {
  outline: none;
  border-color: var(--btn-strong-line);
}

}

@layer app {
/* Initiatives page (app/features/initiatives) and the standup's schedule chips. */
.in-head .sp {
  flex: 1;
}
.in-title {
  font-weight: 600;
}
.in-people {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.in-when {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}
.in-open {
  display: inline-flex;
  gap: var(--space-3);
  white-space: nowrap;
}
.in-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.in-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.in-head h2 {
  margin: 0;
  font-size: 18px;
}
.in-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px 14px;
}
.in-f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.in-f.wide {
  grid-column: span 2;
}
.in-form input[type='text'],
.in-form input[type='email'],
.in-form input[type='url'],
.in-form input[type='time'],
.in-form input[type='date'] {
  height: 30px;
  min-width: 0;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
}
.in-form input:focus {
  outline: none;
  border-color: var(--engine-blue);
}
.in-form input[readonly] {
  color: var(--muted);
}
.in-form fieldset {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.in-form legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
}
.in-form fieldset > .note {
  margin: 0 0 var(--space-2);
}
.in-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
}
.in-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.in-sched,
.in-flags {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.in-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.in-rows > .btn {
  align-self: flex-start;
}
.in-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
}
.in-row > .ib,
.in-row-h > span:last-child {
  width: 26px;
}
[data-rows='members'] .in-row {
  grid-template-columns: 3fr 1fr 1.2fr 26px;
}
.in-lead .cbx-in,
.in-channel .cbx-in {
  min-width: 6ch;
}
.in-who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.in-who > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.in-who .note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-rows='links'] .in-row {
  grid-template-columns: 1fr 2.5fr 26px;
}
[data-rows='linearProjects'] .in-row {
  grid-template-columns: 1.5fr 2.5fr 1fr 26px;
}
.in-row-h {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.in-exc-list {
  margin: 0 0 var(--space-2);
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.in-exc-add {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.in-acts {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.in-msg {
  font-size: 13px;
  color: var(--muted);
}
.in-msg.bad {
  color: var(--tone-bad);
}
.in-hist ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
}
.sr-rhythm {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
@media (max-width: 900px) {
  .in-f.wide {
    grid-column: auto;
  }
  [data-rows] .in-row,
  [data-rows='members'] .in-row,
  [data-rows='links'] .in-row,
  [data-rows='linearProjects'] .in-row {
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row;
  }
  .in-row-h {
    display: none;
  }
}

}

@layer app {
/* The shell's overlays and widgets (app/shell, packages/ui): command bar, shortcuts overlay, hover card, drawer, panel,
   popover, calendar, dialog, focus ring. Loaded after kit.css and built only on the kit tokens, so light and dark both work. */
:root {
  --lw-radius: 10px;
  --lw-ring: var(--engine-blue);
}

/* Keyboard focus */
[data-nav]:focus-visible,
.cal-bar-item:focus-visible {
  outline: 2px solid var(--lw-ring);
  outline-offset: 2px;
  border-radius: 6px;
}
tr[data-nav]:focus-visible {
  outline-offset: -2px;
  border-radius: 0;
}
[data-nav]:focus:not(:focus-visible) {
  outline: none;
}
@keyframes lw-flash {
  0% {
    background: color-mix(in srgb, var(--engine-amber) 35%, transparent);
  }
  100% {
    background: transparent;
  }
}
.lw-flash {
  animation: lw-flash 1.6s ease-out 1;
}
@media (prefers-reduced-motion: reduce) {
  .lw-flash {
    animation: none;
    outline: 2px solid var(--engine-amber);
  }
}
.folded > :not(:first-child) {
  display: none !important;
}

/* Toast: outcome of something the viewer just did */
#lw-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  max-width: min(560px, calc(100vw - 32px));
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--tone-info);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  box-shadow: var(--shadow-overlay);
}
#lw-toast.good {
  border-left-color: var(--tone-good);
}
#lw-toast.bad {
  border-left-color: var(--tone-bad);
}
#lw-toast.warn {
  border-left-color: var(--tone-warn);
}

/* Translucent layers */
.lw-backdrop,
.lw-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: color-mix(in srgb, var(--engine-dark) 45%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
html[data-theme='light'] .lw-backdrop,
html[data-theme='light'] .lw-overlay {
  background: color-mix(in srgb, var(--engine-light) 55%, transparent);
}

/* Command bar */
.lw-backdrop {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
}
.lw-cmd {
  width: min(680px, calc(100vw - 24px));
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-overlay);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}
.lw-cmd-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.lw-cmd-icon {
  color: var(--muted);
  font-size: 18px;
}
.lw-cmd-mode {
  font-size: 11.5px;
  color: var(--engine-blue);
  border: 1px solid var(--engine-blue);
  border-radius: 999px;
  padding: 0 8px;
  white-space: nowrap;
}
.lw-cmd-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  padding: 4px 0;
  outline: none;
}
.lw-cmd-input::-webkit-search-cancel-button {
  display: none;
}
.lw-cmd-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  flex: 1;
}
.lw-cmd-grp {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 10px 4px;
}
.lw-cmd-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.lw-cmd-item[aria-selected='true'] {
  background: color-mix(in srgb, var(--engine-blue) 16%, var(--card));
}
.lw-cmd-item .ic {
  flex: none;
  width: 18px;
  height: 18px;
  text-align: center;
  color: var(--muted);
  border-radius: 50%;
  line-height: 18px;
  margin-top: 1px;
}
.lw-cmd-item .tx {
  flex: 1;
  min-width: 0;
}
.lw-cmd-item .ti {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}
.lw-cmd-item .ti mark {
  background: none;
  color: var(--engine-blue);
  font-weight: 700;
}
.lw-cmd-item .dt {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lw-cmd-item .dt.def {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lw-cmd-item .keys {
  flex: none;
  display: flex;
  gap: 3px;
  margin-top: 1px;
}
.lw-cmd-empty {
  color: var(--muted);
  padding: 16px 12px;
  font-size: 13px;
}
.lw-cmd-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 7px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}
.lw-cmd-foot kbd {
  margin-right: 2px;
}
.lw-cmd-mode.scope {
  cursor: pointer;
}
.lw-cmd-mode.scope::after {
  content: ' ×';
  opacity: 0.7;
}
.lw-cmd-status {
  color: var(--muted);
  font-size: 12.5px;
  padding: 7px 10px 7px 38px;
}
.lw-cmd-item.more .ti {
  color: var(--muted);
  font-size: 12.5px;
}
.lw-cmd-hint {
  color: var(--muted);
  font-size: 12px;
  padding: 10px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
  line-height: 2;
}
.lw-cmd-scope {
  font:
    600 11.5px/18px ui-monospace,
    Menlo,
    monospace;
  color: var(--engine-blue);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  margin: 0 3px;
  cursor: pointer;
}
.lw-cmd-scope:hover {
  border-color: var(--engine-blue);
}

/* Shortcuts overlay (?) */
.lw-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  outline: none;
}
.lw-keys-box {
  width: min(980px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px 22px;
  box-shadow: var(--shadow-overlay);
}
.lw-keys-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.lw-keys-hd h2 {
  margin: 0;
  font-size: 18px;
}
.lw-keys-cols {
  columns: 3 260px;
  column-gap: 28px;
}
.lw-keys-cols section {
  break-inside: avoid;
  margin: 10px 0 12px;
}
.lw-keys-cols h3 {
  margin: 0 0 6px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.lw-keys-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 13px;
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 70%, transparent);
}
.lw-keys-k {
  flex: none;
  white-space: nowrap;
}
.lw-keys-k .or {
  color: var(--muted);
  font-size: 11px;
}

/* Hover card */
.lw-card {
  position: absolute;
  z-index: var(--z-popover);
  width: 360px;
  max-width: calc(100vw - 16px);
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--lw-radius);
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: var(--shadow-overlay);
}
.lw-card .hd {
  font-weight: 700;
  font-size: 12.5px;
}
.lw-card .cat {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lw-card .ti {
  margin: 3px 0;
  font-weight: 600;
}
.lw-card .ln {
  margin: 3px 0;
}
.lw-card .note {
  color: var(--muted);
  font-size: 12px;
}
.lw-card ul {
  list-style: none;
  margin: 6px 0 4px;
  padding: 0;
  font-size: 12.5px;
}
.lw-card li {
  margin: 2px 0;
}
.lw-card > a,
.lw-card .acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
}
.lw-card .who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.lw-card .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
}
.lw-card .av.initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pill);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}
.lw-card .mono {
  font-size: 11.5px;
}
.lw-card .sub {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.lw-card .rel {
  margin-top: 6px;
}
/* Cards are read and copied from: selectable, normal cursor; only the trigger shows the hint cursor. */
.lw-card {
  cursor: auto;
  -webkit-user-select: text;
  user-select: text;
}
.lw-card a {
  cursor: pointer;
}
.lw-card .counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 7px 0 2px;
}
.lw-card .counts .cnt {
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--pill);
}
.lw-card .counts .cnt.zero {
  color: var(--muted);
}
.lw-card .counts .cnt.tone-warn {
  color: var(--tone-warn);
}
.lw-card .ln.tone-good {
  color: var(--tone-good);
}
abbr.gl,
[data-hover^='term:'] {
  text-decoration: underline dotted var(--muted);
  text-underline-offset: 2px;
  cursor: help;
}
[data-hover^='repo:']:not(a) {
  text-decoration: underline dotted var(--muted);
  text-underline-offset: 2px;
}

/* History drawer */
.lw-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  width: min(360px, 100vw);
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-overlay);
  display: flex;
  flex-direction: column;
}
.lw-drawer-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.lw-drawer-hd h2 {
  margin: 0;
  font-size: 16px;
}
.lw-drawer-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
}
.lw-drawer-list a {
  display: flex;
  flex-direction: column;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--fg);
}
.lw-drawer-list a:hover {
  background: var(--pill);
  text-decoration: none;
}
.lw-drawer-list a.on {
  background: color-mix(in srgb, var(--engine-blue) 14%, var(--card));
}
.lw-drawer-list li.note {
  padding: 8px 10px;
}

/* The close button of every panel, drawer and dialog: .ib.md.sq plus this */
.lw-x {
  font-size: 18px;
  line-height: 1;
}

/* Panel (packages/ui Panel): a dialog at the top right under the nav */
.lw-panel {
  position: fixed;
  top: calc(var(--nav-h) + 8px);
  right: 12px;
  z-index: var(--z-top);
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - var(--nav-h) - 24px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.lw-panel:focus {
  outline: none;
}
.lw-panel-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.lw-panel-hd .sp {
  flex: 1;
}
.lw-panel-t {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.lw-panel-bd {
  flex: 1;
  min-height: 0;
  padding: 0 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.lw-panel-ft {
  padding: 8px 14px 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}
.lw-panel-ft p {
  margin: 0;
}
.lw-panel-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

/* Popover (packages/ui Popover): menus and confirmations on the body, placed next to their anchor */
.lw-pop {
  position: fixed;
  z-index: var(--z-top);
  box-sizing: border-box;
  width: 290px;
  max-width: calc(100vw - 16px);
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-overlay);
  font-size: 12.5px;
  overflow-y: auto;
}
.lw-pop.menu {
  width: max-content;
  min-width: 170px;
  max-width: min(280px, calc(100vw - 16px));
  padding: 4px;
  box-shadow: var(--shadow-menu);
}
.lw-pop.wide {
  width: min(320px, calc(100vw - 16px));
  max-width: none;
}
.lw-pop-h {
  margin-bottom: 4px;
  font-weight: 600;
}
.lw-pop.menu .lw-pop-h {
  padding: 4px 8px 2px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lw-pop-bd {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.lw-pop-q {
  margin: 2px 2px 4px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.lw-pop-q:focus {
  outline: none;
  border-color: var(--btn-strong-line);
}
.lw-pop-l {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.lw-pop-l:focus {
  outline: none;
}
.lw-pop-l:focus-visible {
  outline: 2px solid var(--btn-strong-line);
  outline-offset: 1px;
}
.lw-pop-i {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 8px;
  border-radius: var(--radius);
  cursor: pointer;
}
.lw-pop-i.on {
  background: var(--pill);
}
.lw-pop-i.off {
  opacity: 0.5;
  cursor: default;
}
.lw-pop-ck {
  flex: none;
  width: 12px;
}
.lw-pop-ic svg {
  display: block;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}
.lw-pop-t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lw-pop-d {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}
.lw-pop-none {
  padding: 8px;
  color: var(--muted);
}
.lw-pop-i.danger {
  color: var(--tone-bad);
}
.lw-pop-st {
  margin: 0 4px 4px;
  color: var(--muted);
  font-size: 11.5px;
}
.lw-pop-st.good {
  color: var(--tone-good);
  font-weight: 600;
}
.lw-pop-st.bad {
  color: var(--tone-bad);
}
.hd-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px 4px;
}
.hd-day {
  font-weight: 600;
  font-size: 14px;
}
.hd-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 18px;
  line-height: 1;
}
a.hd-step:hover {
  text-decoration: none;
  border-color: var(--engine-blue);
}
.hd-step.off {
  opacity: 0.35;
}
.hd-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.hd-pick {
  flex: 1;
  min-width: 0;
}
.hd-today {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--engine-blue);
  border-radius: 999px;
  font-size: 12.5px;
}
.hd-today:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--engine-blue) 12%, transparent);
}
button.hd-today {
  background: none;
  color: var(--engine-blue);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}

/* Notes and topics while they save */
.nlist li.pending,
.topics li.pending {
  opacity: 0.6;
}

/* DataTable toolbar */
.tfilter .sp {
  flex: 1;
}
.tchips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tview,
.tname {
  background-color: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  height: 30px;
  font: inherit;
  font-size: 12.5px;
}

/* Shield calendar */
.cal-ui {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cal-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  min-height: 30px;
}
.cal-bar .sp {
  flex: 1;
}
.cal-date {
  font-size: 12.5px;
  color-scheme: dark;
}
.cal-day-input {
  color-scheme: dark;
}
html[data-theme='light'] .cal-date,
html[data-theme='light'] .cal-day-input,
html[data-theme='light'] .cal-dlg input {
  color-scheme: light;
}
.cal-scroll {
  position: relative;
  max-height: max(360px, calc(100vh - var(--nav-h) - 270px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
/* Compact (standup): ShieldCalendar sizes the box to the current week plus about 1.5 more; this is the fallback */
.cal-ui.compact .cal-scroll {
  max-height: 210px;
}
.cal-ui.compact .cal-head,
.cal-ui.compact .cal-week {
  grid-template-columns: 76px minmax(0, 1fr);
}
.cal-ui.compact .cal-head {
  grid-template-columns: 76px repeat(7, minmax(0, 1fr));
}
.cal-ui.compact .cal-head > div {
  padding: 5px 8px;
}
.cal-ui.compact .cal-week .wk {
  padding: 7px 8px;
  font-size: 12.5px;
}
.cal-head,
.cal-week {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}
.cal-head {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  grid-template-columns: 96px repeat(7, minmax(0, 1fr));
  background: var(--pill);
  border-bottom: 1px solid var(--line);
}
.cal-head > div {
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.cal-head > div + div {
  border-left: 1px solid var(--line);
}
.cal-head > .we,
.cal-dn.we {
  opacity: 0.75;
}
.cal-week + .cal-week {
  border-top: 1px solid var(--line);
}
.cal-week:nth-child(even) {
  background: color-mix(in srgb, var(--pill) 40%, transparent);
}
.cal-week.current {
  background: color-mix(in srgb, var(--engine-blue) 6%, transparent);
}
.cal-week .wk {
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.cal-body {
  position: relative;
  padding: 6px 0 8px;
  min-width: 0;
}
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 4px;
}
.cal-dn {
  font-size: 11.5px;
  color: var(--muted);
  padding: 0 8px;
  border-radius: 4px;
}
.cal-dn.today {
  color: var(--engine-blue);
  font-weight: 700;
}
.cal-dn.first {
  color: var(--fg);
  font-weight: 600;
}
.cal-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(100% / 7);
  background: color-mix(in srgb, var(--engine-blue) 9%, transparent);
  pointer-events: none;
}
.cal-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--engine-orange);
  opacity: 0.8;
  pointer-events: none;
}
.cal-lanes {
  position: relative;
  margin: 0 2px;
}
.cal-bar-item {
  position: absolute;
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-align: left;
  font: inherit;
  font-size: 12.5px;
  color: var(--fg);
  cursor: default;
}
button.cal-bar-item {
  cursor: pointer;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}
button.cal-bar-item:hover {
  filter: brightness(1.15);
}
.cal-bar-item img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: none;
}
.cal-bar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-bar-item.cut-s {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.cal-bar-item.cut-e {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.cal-empty {
  position: absolute;
  left: 10px;
  top: 26px;
}
.cal-err {
  color: var(--tone-bad);
  font-size: 13px;
  border-left: 3px solid var(--tone-bad);
  padding: 4px 10px;
  background: color-mix(in srgb, var(--tone-bad) 8%, transparent);
  border-radius: 0 6px 6px 0;
}

/* Calendar layers: a color per layer (--lc), toggles above the weeks, bars of other calendars */
.cal-ui,
.cal-subs {
  --lc: var(--tone-neutral);
}
.cal-ui .c-blue,
.cal-subs .c-blue {
  --lc: var(--engine-blue);
}
.cal-ui .c-cyan,
.cal-subs .c-cyan {
  --lc: var(--engine-cyan);
}
.cal-ui .c-purple,
.cal-subs .c-purple {
  --lc: var(--engine-purple);
}
.cal-ui .c-green,
.cal-subs .c-green {
  --lc: var(--engine-green);
}
.cal-ui .c-amber,
.cal-subs .c-amber {
  --lc: var(--engine-amber);
}
.cal-ui .c-pink,
.cal-subs .c-pink {
  --lc: var(--engine-pink);
}
.cal-ui .c-lime,
.cal-subs .c-lime {
  --lc: var(--engine-lime);
}
.cal-ui .c-orange,
.cal-subs .c-orange {
  --lc: var(--engine-orange);
}
.cal-ui .k-shield {
  --lc: var(--tone-info);
}
.cal-ui .k-ooo {
  --lc: var(--tone-warn);
}
.cal-layers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.cal-layers[hidden] {
  display: none;
}
button.pill.cal-layer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid var(--line);
}
button.pill.cal-layer[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--lc) 60%, var(--line));
  background: color-mix(in srgb, var(--lc) 12%, transparent);
}
button.pill.cal-layer[aria-pressed='false'] {
  color: var(--muted);
  background: none;
}
.cal-layer .dot,
.cal-sub-list .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: var(--lc);
  border: 2px solid var(--lc);
}
.cal-layer[aria-pressed='false'] .dot {
  background: none;
}
.cal-layer .warn {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: var(--engine-dark);
  background: var(--tone-warn);
}
.cal-layers .cal-add {
  margin-left: auto;
}
.bar.cal {
  background: color-mix(in srgb, var(--lc) 18%, transparent);
  border-left-color: var(--lc);
}
.cal-subs {
  width: min(600px, calc(100vw - 24px));
}
.cal-subs .note {
  margin: -6px 0 2px;
}
.cal-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cal-sub-list[hidden] {
  display: none;
}
.cal-sub-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 13px;
}
.cal-sub-list li + li {
  border-top: 1px solid var(--line);
}
.cal-sub-list .nm {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.cal-sub-list .addr {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-help {
  font-size: 12.5px;
  color: var(--muted);
}
.cal-help summary {
  cursor: pointer;
  color: var(--fg);
  font-weight: 600;
}
.cal-help ol {
  margin: 6px 0 0;
  padding-left: 20px;
  line-height: 1.5;
}

/* Dialog (overrides) */
.lw-dialog {
  width: min(520px, calc(100vw - 24px));
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-overlay);
}
.lw-dialog::backdrop {
  background: color-mix(in srgb, var(--engine-dark) 50%, transparent);
  backdrop-filter: blur(4px);
}
.lw-dialog h3 {
  margin: 0 0 12px;
  font-size: 17px;
}
.lw-dialog form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lw-dialog label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.lw-dialog input,
.lw-dialog select,
.lw-dialog textarea {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 400;
}
.lw-dialog input:focus,
.lw-dialog select:focus,
.lw-dialog textarea:focus {
  outline: none;
  border-color: var(--engine-blue);
}
.lw-dialog .row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lw-dialog .acts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.lw-dialog .acts .sp {
  flex: 1;
}
.lw-dialog .acts {
  justify-content: flex-end;
}
.lw-dialog .acts .btn {
  padding: 0 14px;
  font-size: 13px;
}

/* Calendar panels (override and Add calendar) and their confirmations */
.cal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 14px;
}
.cal-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.cal-form input,
.cal-form select,
.cal-form textarea {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 400;
}
.cal-form input:focus,
.cal-form select:focus,
.cal-form textarea:focus {
  outline: none;
  border-color: var(--engine-blue);
}
.cal-form .row2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.cal-form .row2 input,
.cal-form .row2 select {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.cal-form .acts,
.cal-confirm .acts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.cal-form .acts .sp {
  flex: 1;
}
.cal-form .note {
  margin: 0;
}
.cal-confirm .note {
  margin: 0 0 10px;
  max-width: 300px;
}
html[data-theme='light'] .cal-form input {
  color-scheme: light;
}

.cal-warn {
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px;
  border-left: 4px solid var(--tone-warn);
  background: color-mix(in srgb, var(--tone-warn) 12%, transparent);
  border-radius: 0 8px 8px 0;
}

/* Thin themed scrollbars on panels and overlays */
.lw-cmd-list,
.lw-keys-box,
.lw-drawer-list,
.lw-card {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.lw-cmd-list::-webkit-scrollbar,
.lw-keys-box::-webkit-scrollbar,
.lw-drawer-list::-webkit-scrollbar,
.cal-scroll::-webkit-scrollbar {
  width: 8px;
}
.lw-cmd-list::-webkit-scrollbar-thumb,
.lw-keys-box::-webkit-scrollbar-thumb,
.lw-drawer-list::-webkit-scrollbar-thumb,
.cal-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
}

@media (max-width: 600px) {
  .cal-head,
  .cal-week {
    grid-template-columns: 60px minmax(0, 1fr);
  }
  .cal-head {
    grid-template-columns: 60px repeat(7, minmax(0, 1fr));
  }
  .lw-keys-cols {
    columns: 1;
  }
}
@media print {
  .lw-backdrop,
  .lw-overlay,
  .lw-card,
  .lw-drawer,
  .lw-panel,
  .lw-pop,
  #lw-toast,
  .tfilter {
    display: none !important;
  }
}
/* A section at the bottom of a card (the repository under a PR) */
.lw-card .sec {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.lw-card .lbl {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
/* The environment chip's link to the same page in the staging workspace (shared/environment/environment-chip.tsx) */
.env-elsewhere {
  margin-left: 8px;
  font-size: 12px;
  white-space: nowrap;
}

}
