/* Project-wide styles that Tailwind utilities don't cover.
   Found by AppDirectoriesFinder (core is an installed app), so it needs no
   STATICFILES_DIRS entry; config/settings/test_base.py asserts it is collected
   exactly once. */

/* Focus ring, copied verbatim from docs/design/prototype-v6.html (AA: focus
   always visible); core/test_tokens.py compares the two. */
:focus-visible{outline:none;box-shadow:var(--focus);border-radius:var(--radius-sm)}

/* Agent status dot (v6 .dot): the color comes from --st, set by .st-* in
   tokens.css. The pulse below is the avatar signal's (K49). */
.status-dot{width:8px;height:8px;border-radius:50%;background:var(--st);display:inline-block;flex:none}
@keyframes status-pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--ok) 45%,transparent)}70%{box-shadow:0 0 0 7px transparent}100%{box-shadow:0 0 0 0 transparent}}
/* Agent signal on its avatar (K49, tasks/_agent_signal.html): a dot for
   working, a "!" badge for error, a hollow ring for stalled (K70), in the
   avatar's bottom-right corner. The 2px
   surface border is required: --ok straight on an agent color is 1.00-1.58:1,
   against the border it is 5.02:1 (--err 6.47:1). The "!" is --err-text on
   --err (white in the light theme). */
.avatar-signal{position:absolute;right:-4px;bottom:-4px;z-index:1;box-sizing:content-box;display:grid;place-items:center;border:2px solid var(--surface);border-radius:50%}
.avatar-signal.st-working{width:8px;height:8px;background:var(--ok);animation:status-pulse 1.6s infinite}
.avatar-signal.st-error{width:11px;height:11px;background:var(--err);color:var(--err-text);font-size:9px;font-weight:800;line-height:1}
/* Stalled (K70): working, but the task has been quiet for over 30 min. A
   hollow --wait ring that does not pulse, so a dead agent stops looking busy.
   The surface ring moves to a shadow (same 12px footprint as working, hence
   -2px), keeping the ring readable on any agent color; --wait on --surface is
   5.0:1. */
.avatar-signal.st-stalled{right:-2px;bottom:-2px;width:4px;height:4px;background:var(--surface);border-color:var(--wait);box-shadow:0 0 0 2px var(--surface)}
@media (prefers-reduced-motion:reduce){.status-dot,.avatar-signal{animation:none!important}}

/* An avatar with an image (K219.4, tasks/_avatar.html): the photo fills the
   circle or the agent's rounded square (5A: no ring in the agent's color).
   A 1px --photo-ring inside keeps a light photo's edge on a light surface;
   the signal above (z-index 1) still reads on any photo thanks to its 2px
   surface border. */
.av-photo>img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.av-photo::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px var(--photo-ring);pointer-events:none}

/* Who is on a card (K219.4, tasks/who_tip.js): a balloon with the name and
   status where the card does not write them (its avatar stack and "+N").
   --surface on --text, the text pair inverted (AA in both themes). Fade and
   2px up in 120 ms; at once under reduced motion. With JS the stack sits
   above the card's link layer, so a tap on it lists everyone instead of
   opening the card; without JS a tap there opens the card, as before. */
.who-tip{position:fixed;z-index:60;left:0;top:0;max-width:min(260px,calc(100vw - 24px));padding:5px 8px;border-radius:var(--radius-sm);background:var(--text);color:var(--surface);font-size:12px;font-weight:500;line-height:1.35;box-shadow:var(--shadow-lg);pointer-events:none;opacity:0;transform:translateY(2px);transition:opacity .12s var(--ease-enter),transform .12s var(--ease-enter)}
.who-tip.on{opacity:1;transform:none}
.who-tip ul{list-style:none;margin:0;padding:0;display:grid;gap:5px}
.who-tip li{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
/* K240.2: whose connection runs the agent, a lighter second line (approval #221, 1B); the mix stays AA on --text in both themes. */
.who-tip .via{display:block;overflow:hidden;text-overflow:ellipsis;font-weight:400;color:color-mix(in srgb,var(--surface) 72%,var(--text))}
@media (prefers-reduced-motion:reduce){.who-tip{transition:none}}
[data-js] [data-card] [data-assignee-row]{position:relative;z-index:2;cursor:default;-webkit-tap-highlight-color:transparent}

/* Waiting on you (K180, Celso's comment 6099): nothing waiting on any board
   hides the whole counter. The <details> stays in the page, so the board's
   poll can swap its pill back in out of band. */
#waiting:has([data-waiting-none]){display:none}

/* The agents chip's dot (K180): gray like a stopped agent; hollow while no
   agent ever worked on the board ("Agents off"). */
.agents-dot{width:8px;height:8px;flex:none;border-radius:99px;background:var(--idle)}
.agents-dot-off{background:transparent;border:1.5px solid var(--idle)}

/* Task modal overlay (#15, v6 .modal): the dimmed board behind the dialog.
   --overlay: the issue's design spec in the light theme, darker in the dark. */
.task-modal::backdrop{background:var(--overlay)}
/* The dialog itself takes focus on open so screen readers announce its
   title; it is not a control, so it gets no ring. Its controls keep theirs. */
.task-modal:focus-visible{box-shadow:var(--shadow-lg)}
/* The modal's skeleton while its task loads (K89.1, tasks/_modal_skeleton.html):
   --surface-2 bars that fade in and out, still under reduced motion. */
@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:.45}}
.skeleton-bar{animation:skeleton-pulse 1.2s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){.skeleton-bar{animation:none}}

/* "New board" template cards (#12, v6 .tpl): the radio is visually hidden, so
   its card shows the focus ring. Tailwind's has-[:focus-visible] variant does
   not reach box-shadow here; this is the prototype's own rule. */
.template-card:has(input:focus-visible){box-shadow:var(--focus)}
/* Account "Upload photo" (K219.3): the same for its visually hidden file input. */
.photo-picker:has(input:focus-visible){box-shadow:var(--focus)}

/* Task card (K63, "stretched link"): the title link's ::after covers the
   card, so a click anywhere opens the modal while the card keeps one link
   (one tab stop, named by the title; cmd/ctrl+click opens a new tab). The
   focus ring moves from the title text to the whole card. Every real control
   inside the card is lifted above the layer by type, not per partial, so a
   new control is never left unclickable. The layer needs its own z-index:
   the avatar stack is an isolated stacking context and would otherwise paint
   (and take the click) above it; the card is `isolate`, so these z-indexes
   stay inside it. touch-callout: a long press starts the drag (Sortable's
   150 ms delay), not iOS's link menu. */
.card-link{-webkit-touch-callout:none}
.card-link::after{content:"";position:absolute;inset:0;z-index:1;border-radius:var(--radius)}
.card-link:focus-visible{box-shadow:none}
.card-link:focus-visible::after{box-shadow:var(--focus)}
[data-card] :is(a,button,input,select,textarea,summary,label):not(.card-link){position:relative;z-index:2}

/* A card others just created, moved or edited (K40, tasks/live.js, 15 s):
   2px of --accent (5.05:1 on --surface-2), the 1px border plus a 1px ring,
   so the card keeps its size and nothing jumps when it goes. It replaces
   the waiting card's amber border meanwhile; the element selector outranks
   the hover border. The focus ring (.card-link::after) paints above it.
   No transition: it appears and goes at once. */
article[data-card].card-updated{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}

/* Live board motion (K159). Easing lives here: tokens.css is pinned to the
   v6 prototype, so these curves are not tokens. tasks/motion.js reads the
   same numbers. The fly clone is fixed so it cannot widen the page. */
:root{
  --ease-enter:cubic-bezier(.2,.8,.2,1);
  --ease-exit:cubic-bezier(.4,0,1,1);
  --ease-move:cubic-bezier(.45,0,.2,1);
  --ease-pop:cubic-bezier(.34,1.56,.64,1);
}
.board-motion-fly{position:fixed;z-index:25;margin:0;pointer-events:none;box-sizing:border-box}
#board-columns [id^="count-"]{display:inline-block;transform-origin:center}
.board-motion-lap{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;z-index:3}
.board-motion-lap path{fill:none;stroke:var(--ok);stroke-width:2px;stroke-linecap:round;stroke-linejoin:round}
.avatar-signal.motion-hold{animation:none}
.card-title-rest{color:transparent}
.card-title-caret{display:inline-block;width:2px;height:.9em;margin-left:1px;background:var(--accent);vertical-align:text-bottom}

/* "New board" dialog overlay, as the task modal's (v6 .modal). */
.new-board-dialog::backdrop{background:var(--overlay)}
/* "Keep it running" (K196), the same overlay; full screen below 640px. */
.keep-running-dialog::backdrop{background:var(--overlay)}

/* Fixed colours, not theme tokens: the pill stays dark in both themes so
   the white text and the green mark keep their contrast. Above the
   task-timeline slice, because test_tokens.py reads from that comment to
   the end of the file and allows no hex. */
/* .modal-toasts: the same stack inside an open modal dialog, the only part
   of the page not inert (boards/htmx_errors.js). */
#toasts,.modal-toasts{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:30;display:flex;flex-direction:column;gap:8px;width:max-content;max-width:calc(100vw - 24px)}
.toast{display:flex;gap:10px;align-items:center;background:#18181b;color:#fff;border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:10px 14px;font-size:13.5px}
.toast-mark{color:#86efac;font-weight:700}
/* The htmx error toast (K214.2): stays until closed, so it has a Dismiss and,
   on a 404/403, Refresh board. Red-300 on the pill is 9.3:1. */
.toast-mark-error{color:#fca5a5;font-weight:700}
.toast-action,.toast-close{background:none;border:0;color:#fff;font:inherit;cursor:pointer;padding:2px 6px;border-radius:var(--radius-sm)}
.toast-action{white-space:nowrap;font-weight:600;text-decoration:underline;text-underline-offset:2px}
.toast-close{font-size:16px;line-height:1;color:#d4d4d8}
@media (prefers-reduced-motion:no-preference){.toast{animation:toast-in .18s ease-out}}
/* K157.5 (Design v1, item 6): the archive toast enters in 240ms and the
   archive confirmation in 200ms; instant with reduced motion. */
@media (prefers-reduced-motion:no-preference){.toast-board{animation-duration:.24s}.confirm-dialog[open]{animation:toast-in .2s ease-out}}
@keyframes toast-in{from{opacity:0;transform:translateY(6px)}}
/* K157.6 (Design v1, item 6): a restored board's name is highlighted for
   300ms as it comes back; nothing with reduced motion. */
@media (prefers-reduced-motion:no-preference){.board-restored{border-radius:6px;animation:board-restored .3s ease-out}}
@keyframes board-restored{from{background:var(--accent-soft);box-shadow:0 0 0 4px var(--accent-soft)}}

/* Label pills (K158.2). One recipe, so every palette key stays the measured
   pair: 14% tint on white, text 80% of the colour toward black, a 30% border
   and a 6px dot. Names carry the meaning; the dot is not the only signal. */
.label{display:inline-flex;align-items:center;gap:5px;max-width:100%;min-width:0;border-radius:99px;padding:0 8px 0 7px;font-size:11.5px;font-weight:600;line-height:20px;background:color-mix(in srgb,var(--c) 14%,#fff);color:color-mix(in srgb,var(--c) 80%,#000);border:1px solid color-mix(in srgb,var(--c) 30%,#fff);white-space:nowrap}
.label:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--c);flex:none}
.label>span{overflow:hidden;text-overflow:ellipsis}
.label-lg{font-size:12.5px;padding:2px 10px 2px 9px;line-height:20px}
.label-row{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 6px}
/* Card field chips (K257.4, tasks/_field_chips.html): wrap, and a long
   value ellipsizes inside its chip, so a 360px card never overflows. A date
   due within 2 days is amber, a past one red (the wait and err pairs). */
.field-chips{display:flex;flex-wrap:wrap;gap:4px;min-width:0;margin:6px 0 0}
.field-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;min-width:0;border-radius:99px;border:1px solid var(--border);background:var(--surface-2);color:var(--text-2);padding:0 8px 0 6px;font-size:11.5px;font-weight:600;line-height:20px;white-space:nowrap}
.field-chip>span{overflow:hidden;text-overflow:ellipsis}
.field-chip svg{flex:none}
.field-chip-soon{background:var(--wait-soft);border-color:var(--wait-border);color:var(--wait)}
.field-chip-overdue{background:var(--err-soft);border-color:color-mix(in srgb,var(--err) 35%,transparent);color:var(--err)}
.label-pop{display:flex;flex-direction:column;gap:0}
.label-pop-head{display:grid;grid-template-columns:34px 1fr 34px;align-items:center;margin:-4px -4px 8px}
.label-icon-btn{display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--text-2);font-size:16px;text-decoration:none}
.label-icon-btn:hover{background:var(--surface-2);color:var(--text)}
.label-delete{display:flex;flex:1;align-items:center;justify-content:center;min-height:36px;border:1px solid var(--err);border-radius:var(--radius-sm);background:var(--surface);color:var(--err);font-size:13px;font-weight:500;text-decoration:none}
.label-delete:hover{background:var(--err-soft)}
.label-list .label-icon-btn{width:30px;height:30px;flex:none}
#labels-popover{position:absolute;z-index:70;width:304px;max-width:calc(100% - 16px);background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-lg);padding:12px}
#labels-popover[hidden]{display:none}
#labels-popover.label-sheet{left:0;right:0;bottom:0;top:auto;width:100%;max-width:none;max-height:85%;overflow:auto;border-radius:16px 16px 0 0;padding:14px 16px 20px}
@media (max-width:640px){
  #labels-popover:not([hidden]){left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;max-width:none;max-height:85%;overflow:auto;border-radius:16px 16px 0 0;padding:14px 16px 20px}
  #task-modal:has(#labels-popover:not([hidden])) #labels-scrim{display:block!important}
  #labels-popover:not([hidden]) .label-list{max-height:none}
}
#labels-scrim{position:absolute;inset:0;z-index:65;border:0;padding:0;background:rgba(15,15,20,.35)}
#labels-scrim[hidden]{display:none}
.label-pop input[type="search"],.label-pop input[type="text"]{width:100%;font:inherit;font-size:13.5px;padding:7px 10px;border:1px solid var(--border-input);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);min-height:36px}
.label-pop input:focus-visible{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.label-pop input[aria-invalid="true"]{border-color:var(--err)}
.label-field{display:block;margin:12px 0 6px;font-size:12px;font-weight:600;color:var(--text-2)}
.label-caption{margin:12px 0 6px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-3)}
.label-list{list-style:none;margin:0;padding:2px 0;max-height:min(340px,50vh);overflow:auto}
#labels-popover.label-sheet .label-list{max-height:none}
.label-list li{display:flex;align-items:center;gap:4px;margin-bottom:2px}
.label-check{flex:1;min-width:0;display:flex;align-items:center;gap:10px;min-height:36px;padding:6px 8px;border-radius:8px;cursor:pointer}
.label-check:hover{background:var(--surface-2)}
.label-check input{width:16px;height:16px;margin:0;flex:none;accent-color:var(--accent)}
.label-check:has(input:focus-visible){box-shadow:var(--focus)}
.label-check input:focus-visible{box-shadow:none}
.label-pop-foot{margin-top:8px;padding-top:10px;border-top:1px solid var(--border)}
.label-empty{margin:0;padding:8px 4px;font-size:13px;color:var(--text-2)}
.label-preview{display:flex;align-items:center;justify-content:center;min-height:48px;margin-bottom:4px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg)}
.label-hint{margin:8px 0 0;font-size:12px;color:var(--text-3)}
.label-error{display:flex;gap:6px;margin:6px 0 0;font-size:12.5px;font-weight:500;color:var(--err)}
.label-swatches{display:grid;grid-template-columns:repeat(5,30px);gap:8px 10px}
.label-swatch{position:relative;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;cursor:pointer;background:color-mix(in srgb,var(--c) 14%,#fff);border:1px solid color-mix(in srgb,var(--c) 30%,#fff)}
.label-swatch:before{content:"";width:14px;height:14px;border-radius:50%;background:var(--c)}
.label-swatch input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.label-swatch:hover{border-color:var(--c)}
.label-swatch:has(input:checked){border:2px solid var(--c)}
.label-swatch:has(input:checked):before{width:16px;height:16px;box-shadow:0 0 0 3px #fff inset}
.label-swatch:has(input:focus-visible){box-shadow:var(--focus)}
.label-selected{margin:6px 0 0;font-size:12.5px;color:var(--text-2)}
#label-confirm:not([hidden]){position:absolute;inset:0;z-index:90;display:grid;place-items:center;padding:16px;background:var(--overlay)}
#label-confirm[hidden]{display:none}
.label-confirm{width:420px;max-width:100%;padding:22px;border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-lg)}

/* Filter by label (K158.3). The panel is the same surface as the other
   header menus; at 640px and below it is a bottom sheet, like the labels
   popover. The removable chip is the pill plus a ×. */
.filter-panel{position:absolute;z-index:40;left:0;top:100%;margin-top:4px;width:304px;max-width:calc(100vw - 16px);max-height:min(70vh,520px);overflow:auto;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:var(--shadow-lg);padding:12px}
.filter-scrim{display:none}
.label-chip{gap:2px;padding-right:2px;text-decoration:none;max-width:100%}
.label-chip>.label-x{display:grid;place-items:center;width:16px;height:16px;flex:none;overflow:visible;text-overflow:clip;border-radius:99px;font-size:13px;line-height:1}
.label-chip:hover>.label-x{background:color-mix(in srgb,var(--c) 18%,#fff)}
/* One Filter menu (K160): two labelled groups, and Clear filters pinned to
   the panel's foot so it stays in view while the list scrolls. The
   "Subtasks hidden" chip keeps the old view chip's accent tint (K82). */
.filter-group{border:0;margin:0;padding:0;min-width:0}
.filter-legend{padding:0 4px;margin-bottom:4px;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--text-3)}
.filter-panel>.label-pop-foot{position:sticky;bottom:-12px;margin-bottom:-12px;padding-bottom:12px;background:var(--surface)}
.subtasks-chip{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--accent);border-radius:99px;background:var(--accent-soft);padding:0 2px 0 8px;font-size:11.5px;font-weight:600;line-height:20px;color:var(--accent-hover);text-decoration:none;white-space:nowrap}
.subtasks-chip>.label-x{display:grid;place-items:center;width:16px;height:16px;flex:none;border-radius:99px;font-size:13px;line-height:1}
.subtasks-chip:hover>.label-x{background:var(--surface)}
@media (max-width:640px){
  #board-filter[open] .filter-scrim{display:block;position:fixed;inset:0;z-index:44;border:0;padding:0;background:rgba(15,15,20,.35)}
  #board-filter[open] .filter-panel{position:fixed;left:0;right:0;bottom:0;top:auto;width:100%;max-width:100vw;max-height:85vh;margin-top:0;border-radius:16px 16px 0 0;z-index:45}
}

/* Task timeline (#19, v6 .tl/.bubble, styleguide "Timeline item"). Tokens
   only: agent tints mix the agent color (--c) with --surface, and the
   "Agent" tag mixes it with --text, by --agent-tag-mix (core/test_tokens.py
   checks AA for every agent color in both themes). The rail joins avatars and pins; the last item has
   none below it. */
.tl-item{position:relative;display:flex;gap:10px;padding-bottom:12px}
.tl-item:before{content:"";position:absolute;left:13px;top:28px;bottom:0;border-left:2px solid var(--border)}
.tl-item:last-child:before{display:none}
.tl-event{align-items:center;padding-bottom:10px;font-size:12.5px;color:var(--text-3)}
.tl-event:before{top:20px}
.tl-pin{width:28px;display:grid;place-items:center;flex:none}
.tl-pin i{width:8px;height:8px;border-radius:50%;background:var(--border-strong)}
.tl-avatar{width:28px;height:28px;flex:none;display:grid;place-items:center;border-radius:50%;background:var(--border);color:var(--text-2);font-size:12px;font-weight:700}
.tl-avatar-agent{border-radius:7px;background:var(--c);color:var(--agent-text)}
.tl-avatar-integration{border-radius:7px;background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}
.tl-bubble{flex:1;min-width:0;border:1px solid var(--border);border-radius:var(--radius);padding:8px 10px;background:var(--surface)}
.tl-bubble-agent{border-color:color-mix(in srgb,var(--c) 35%,var(--surface));background:color-mix(in srgb,var(--c) 5%,var(--surface))}
.tl-bubble-superseded{background:var(--surface-2);border-style:dashed}
/* The entry a Mentions item links to (K115.5, #entry-N): an accent border,
   and the board's 1200ms wash (K159) when motion is welcome. */
.tl-item:target .tl-bubble{border-color:var(--accent)}
.tl-event:target>div{border-radius:var(--radius-sm);box-shadow:0 0 0 2px var(--accent);color:var(--text-2)}
@media (prefers-reduced-motion:no-preference){.tl-item:target .tl-bubble,.tl-event:target>div{animation:entry-wash 1200ms ease-out}}
@keyframes entry-wash{from{background:var(--accent-soft)}}
/* K257.3: the entry a field save in the open card just wrote; none with reduced motion. */
@media (prefers-reduced-motion:no-preference){.tl-new>div{border-radius:var(--radius-sm);animation:entry-wash 900ms ease-out}}
.tl-bubble-superseded .tl-text{color:var(--text-2);text-decoration:line-through;text-decoration-color:var(--text-3)}
.tl-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:0 0 3px;font-size:12px;color:var(--text-3)}
/* Bubble texts are .md blocks (K32.3): Markdown turns line breaks into <br>,
   so pre-wrap is only for text that is still plain (and the quote's plain
   "<agent> asked:" lead); .md resets it for the quoted question. */
.tl-text{margin:0;overflow-wrap:anywhere;font-size:13px;color:var(--text)}
.tl-text:not(.md){white-space:pre-wrap}
.tl-quote{margin:2px 0 4px;padding-left:8px;border-left:2px solid var(--border-strong);white-space:pre-wrap;overflow-wrap:anywhere;font-size:12.5px;color:var(--text-2)}
.tl-quote-lead{margin:0}
/* K269.2: an approval's chosen options, under the question it quotes. */
.tl-choices{margin:0 0 4px;padding:0;list-style:none;display:flex;flex-direction:column;gap:2px;font-size:12.5px;color:var(--text);overflow-wrap:anywhere}
/* An agent's own status message, under the event line: the line and pin
   stay at the top instead of centering on the taller item. */
.tl-event:has(.tl-message){align-items:flex-start}
.tl-event:has(.tl-message) .tl-pin{height:1lh}
.tl-message{margin-top:2px}
.tl-mentioned{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px;margin-top:4px;font-size:12px;color:var(--text-2)}
.tl-mentioned .md p{margin:0}
.tl-tag{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;border-radius:4px;padding:1px 5px}
.tl-tag-agent{background:color-mix(in srgb,var(--c) 14%,var(--surface));color:color-mix(in srgb,var(--c) var(--agent-tag-mix),var(--text))}
.tl-tag-wait{background:var(--wait-soft);color:var(--wait);border:1px solid var(--wait-border)}
.tl-tag-muted{background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}
.tl-item time{font-family:var(--mono);font-size:11px}

/* Rendered Markdown (K32, core/rich_text.py), shared by every surface that
   shows a `markdown`-filtered text in a .md block. Tailwind's preflight resets
   margins, list markers and heading sizes, so they come back here, small and
   tight to fit a bubble. Text wraps normally (no pre-wrap: line breaks are
   <br> now); only <pre> keeps its spacing, and scrolls sideways instead of
   widening the bubble. Links use the global :focus-visible ring (--focus). */
.md{white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.5;color:var(--text)}
.md>:first-child{margin-top:0}
.md>:last-child{margin-bottom:0}
.md p,.md ul,.md ol,.md blockquote,.md pre,.md h4,.md h5,.md h6{margin:0 0 6px}
.md h4{font-size:14.5px;font-weight:700}
.md h5{font-size:13.5px;font-weight:700}
.md h6{font-size:13px;font-weight:600;color:var(--text-2)}
.md ul,.md ol{padding-left:20px}
.md ul{list-style:disc}
.md ol{list-style:decimal}
.md li>ul,.md li>ol{margin:2px 0 0}
.md li:has(>input[type=checkbox]){list-style:none;margin-left:-18px}
.md input[type=checkbox]{margin:0 4px 0 0;vertical-align:-2px;accent-color:var(--accent)}
/* The description's clickable checklist (K34, tasks/checklist.js): a hanging
   indent, the box in a 24x24 hit area (WCAG 2.5.8) outside the text's flow,
   and a muted text while its click is saved (no spinner, no motion). */
.md li.check-item{list-style:none;margin-left:-22px;display:flex;align-items:flex-start;gap:2px}
.md .check-hit{flex:none;width:24px;height:24px;margin-top:-2px;display:grid;place-items:center;border-radius:var(--radius-sm);cursor:pointer}
.md .check-hit:hover{background:var(--border)}
.md .check-hit input{width:16px;height:16px;margin:0;vertical-align:baseline;cursor:pointer}
.md .check-text{min-width:0}
.md li.check-item[aria-busy=true] .check-text{color:var(--text-3)}
.md[aria-busy=true] .check-hit,.md[aria-busy=true] .check-hit input{cursor:progress}
.md code{font-family:var(--mono);font-size:12px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 4px}
.md pre{font-family:var(--mono);font-size:12px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;overflow-x:auto;white-space:pre;overflow-wrap:normal}
.md pre code{background:none;border:0;padding:0;font-size:inherit}
/* A mention (K115, core/rich_text.py): a chip with the current name and a
   mini avatar, round for a person and a square in the agent's color (the
   shape tells them apart, not only the color). No link: it opens nothing.
   The reader's own mention is accent on accent-soft (4.98:1 light, 5.49:1
   dark); an archived agent is a dashed chip that also says "(archived)". */
.md .mention{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:0 6px 0 3px;border:1px solid var(--border);border-radius:999px;background:var(--surface-2);color:var(--text);font-weight:600;line-height:1.45;vertical-align:baseline}
.md .mention-av{flex:none;width:12px;height:12px;border-radius:50%;background:var(--text-2)}
.md .mention-av{overflow:hidden}
.md .mention-av>img{display:block;width:100%;height:100%;max-height:none;object-fit:cover;border:0;border-radius:0;background:none}
.md .mention-agent .mention-av{border-radius:3px;background:var(--c,var(--agent-slate))}
.md .mention-me{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.md .mention-archived{border-style:dashed;color:var(--text-2)}
.md .mention-note{font-weight:400}
.mention-c-orange{--c:var(--agent-orange)}
.mention-c-blue{--c:var(--agent-blue)}
.mention-c-violet{--c:var(--agent-violet)}
.mention-c-green{--c:var(--agent-green)}
.mention-c-indigo{--c:var(--agent-indigo)}
.mention-c-olive{--c:var(--agent-olive)}
.mention-c-pink{--c:var(--agent-pink)}
.mention-c-slate{--c:var(--agent-slate)}
/* The @ autocomplete (K115.6, tasks/mentions.js): a listbox floating right
   below the @ (K231): fixed, so it never grows nor scrolls the modal, with
   top/left and --mention-room (the room on its side) set by the script.
   340px wide; on a phone the viewport's width less 16px, with 44px rows.
   The active option is a tint plus a 3px accent bar (not color
   alone); focus stays in the field (aria-activedescendant), whose own ring
   stays visible. The Person/Agent tags are the timeline's .tl-tag. */
.mention-list{position:fixed;z-index:20;width:340px;max-width:calc(100vw - 16px);max-height:min(300px,var(--mention-room,300px));overflow-y:auto;margin:0;padding:4px;list-style:none;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-lg)}
.mention-head{padding:6px 8px 2px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-2)}
.mention-opt{display:flex;align-items:center;gap:8px;min-height:36px;padding:4px 8px 4px 5px;border-left:3px solid transparent;border-radius:var(--radius-sm);font-size:13px;color:var(--text);cursor:pointer}
.mention-opt:hover{background:var(--surface-2)}
.mention-opt[aria-selected=true]{background:var(--accent-soft);border-left-color:var(--accent)}
.mention-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mention-hit{background:none;color:inherit;font-weight:700;text-decoration:underline;text-underline-offset:2px}
.mention-tag{flex:none}
@media (max-width:480px){
  .mention-list{width:calc(100vw - 16px)}
  .mention-opt{min-height:44px}
}
/* GFM tables (K199): the table scrolls sideways inside its own .md-table box
   (a tab stop, so the keyboard scrolls it too; the global :focus-visible ring
   marks it) and never widens the page at 360px. Cells keep words whole, unlike
   the rest of .md, so a wide table scrolls instead of breaking every word.
   Grid lines are --border-input, 3:1 on --surface and --surface-2 in both
   themes (core/test_tokens.py UI_PAIRS); alignment is a fixed class, never
   a style attribute (core/rich_text.py). */
.md .md-table{max-width:100%;overflow-x:auto;margin:0 0 6px;border-radius:var(--radius-sm)}
.md table{border-collapse:collapse;font-size:12.5px;line-height:1.45}
.md th,.md td{border:1px solid var(--border-input);padding:4px 8px;text-align:left;vertical-align:top;overflow-wrap:normal}
.md th{background:var(--surface-2);color:var(--text);font-weight:600}
.md .md-align-center{text-align:center}
.md .md-align-right{text-align:right}
.md blockquote{padding-left:8px;border-left:2px solid var(--border-strong);color:var(--text-2)}
.md hr{border:0;border-top:1px solid var(--border);margin:8px 0}
.md a{color:var(--accent);text-decoration:underline;text-underline-offset:2px}
/* An attachment image (K91): never wider than the text, never taller than a
   screenful; its link wraps it tightly so the focus ring outlines the image. */
.md a:has(>img){display:inline-block;max-width:100%;vertical-align:top;border-radius:var(--radius-sm)}
.md img{display:block;max-width:100%;height:auto;max-height:480px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2)}
/* The "(opens in new tab)" notice; defined here too, so it stays hidden even
   if the Tailwind CDN has not generated .sr-only for the page yet. */
.md .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}

/* Playbook and role diff (K44.2): every line wraps inside the page at 360px
   (no horizontal scroll) and an empty line keeps its height. */
.doc-line{white-space:pre-wrap;overflow-wrap:anywhere;min-height:1.55em}

/* '+ Add task' (K83): while its form is open the summary hides, so the button
   and the input never show together; it comes back in the same frame the
   <details> closes, so menu.js and add_task.js can focus it. Only with JS
   (add_task.js sets html[data-js]): without it Esc, click outside and Cancel
   do nothing, and the summary is the only way to close. */
[data-js] details[data-add-task][open]>summary{display:none}
[data-add-task-cancel]{display:none}
[data-js] [data-add-task-cancel]{display:inline-block}

/* K85.3: files dragged over the task modal (tasks/attachments.js): a dashed
   2px --accent outline inside its edge, where they will land. No motion. */
.task-modal.attachments-drop{outline:2px dashed var(--accent);outline-offset:-6px}
/* An image dragged over the description or comment box goes into its text (K91.3). */
textarea.image-drop{outline:2px solid var(--accent);outline-offset:2px}
/* The comment box's focus ring. Tailwind's CDN reads shadow-[var(--focus)]
   as a shadow colour, not a shadow, so it drew nothing. */
.comment-box:focus-within{box-shadow:var(--focus)}
/* "+ Attach file" is a label around a visually hidden file input: the ring
   goes on the label while the input has focus. */
[data-attach-form] label:has(input:focus-visible){box-shadow:var(--focus)}

/* Theme picker in the account menu (K50, avatar_menu.html). The radio is
   sr-only, so its label's span shows the state: checked lifts it onto
   --surface, keyboard focus draws the global ring on it. Plain CSS, not
   Tailwind: the CDN reads shadow-[var(...)] as a shadow colour, not a shadow. */
[data-theme-picker] input:checked+span{background:var(--surface);color:var(--text);box-shadow:var(--shadow),0 0 0 1px var(--border)}
[data-theme-picker] input:focus-visible+span{box-shadow:var(--focus)}

/* "AI & agents" shell (K121.1, agents/_ai_layout.html; K121 prototype B v3):
   the nav is a segmented control below 768px and a sidebar from 768px.
   aria-current marks the page, so the look follows the semantics. */
.ai-shell{display:grid;gap:20px;grid-template-columns:minmax(0,1fr)}
.ai-nav-caption{display:none}
/* Three entries (Integrations left in K140): below 768px they share the width
   by their own length and never wrap; the control scrolls rather than clip. */
.ai-nav{display:flex;gap:4px;background:var(--surface-2);border-radius:var(--radius);padding:4px;overflow-x:auto}
.ai-nav a{flex:1 1 auto;white-space:nowrap;display:flex;align-items:center;justify-content:center;min-height:40px;padding:6px 8px;border-radius:var(--radius-sm);color:var(--text-2);text-decoration:none;font-weight:500;font-size:13.5px}
.ai-nav a:hover{color:var(--text)}
.ai-nav a[aria-current="page"]{background:var(--surface);color:var(--text);font-weight:600;box-shadow:var(--shadow)}
@media (min-width:768px){
  .ai-shell{grid-template-columns:200px minmax(0,1fr);gap:32px}
  .ai-nav-caption{display:block;margin-bottom:8px}
  .ai-nav{flex-direction:column;background:none;padding:0}
  .ai-nav a{justify-content:flex-start;flex:none}
  .ai-nav a[aria-current="page"]{background:var(--accent-soft);box-shadow:none}
}
/* "Connect an AI app" assistant (K121.3, agents/_connect_wizard.html; K121
   prototype B v3). Without JS the dialog is a static guide: [data-js-only]
   parts wait for connect_wizard.js (data-ready), [data-static-only] parts go
   once it runs. Full screen below 640px, scrolling inside, never sideways. */
.connect-wizard{border:0;padding:0;background:var(--surface);color:var(--text);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow-x:hidden;overflow-y:auto;margin:auto}
.connect-wizard::backdrop{background:var(--overlay)}
.connect-wizard:focus-visible{box-shadow:var(--shadow-lg)}
.connect-wizard [hidden]{display:none!important}
.connect-wizard:not([data-ready]) [data-js-only],.connect-wizard[data-ready] [data-static-only]{display:none!important}
@media (max-width:639px){.connect-wizard{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}}
.cw-head{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--surface);z-index:1}
.cw-body{padding:20px;display:flex;flex-direction:column;gap:20px}
.cw-close{font-size:20px;line-height:1;width:36px;height:36px;border-radius:var(--radius-sm);color:var(--text-2);flex:none}
.cw-close:hover{background:var(--surface-2);color:var(--text)}
.cw-progress{display:flex;gap:6px}
.cw-progress span{height:4px;flex:1;border-radius:99px;background:var(--border-strong)}
.cw-progress span.on{background:var(--accent)}
.cw-choice{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:start;border:1px solid var(--border-input);border-radius:var(--radius);padding:12px 14px;cursor:pointer;font-size:13.5px}
.cw-choice input{margin-top:3px;accent-color:var(--accent);width:16px;height:16px}
.cw-choice:has(input:checked){border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 1px var(--accent)}
.cw-choice:has(input:focus-visible){box-shadow:var(--focus)}
.cw-choice:has(input:disabled){opacity:.6;cursor:not-allowed}
.cw-seg{display:flex;gap:4px;background:var(--surface-2);border-radius:var(--radius-sm);padding:4px}
.cw-seg label{flex:1 1 0;cursor:pointer;position:relative}
.cw-seg input{position:absolute;opacity:0;width:1px;height:1px}
.cw-seg span{display:flex;justify-content:center;align-items:center;min-height:36px;border-radius:5px;font-size:13px;font-weight:500;color:var(--text-2)}
.cw-seg input:checked+span{background:var(--surface);color:var(--text);font-weight:600;box-shadow:var(--shadow)}
.cw-seg input:focus-visible+span{box-shadow:var(--focus)}
.cw-copy-row{display:flex;gap:8px;align-items:stretch}
.cw-steps{font-size:13.5px;color:var(--text)}
.cw-steps ol{display:flex;flex-direction:column;gap:6px;margin:0}
.cw-note{background:var(--surface-2);border-radius:var(--radius-sm);padding:8px 12px;font-size:13px;color:var(--text-2)}
.cw-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.cw-btn{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 14px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);font-size:13px;font-weight:500;text-decoration:none}
.cw-btn:hover{border-color:var(--text-3)}
.cw-btn-primary{border-color:var(--accent);background:var(--accent);color:var(--accent-text);font-weight:600}
.cw-btn-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}

/* Agents page (K121.4, agents/agents.html; K121 prototype B v3): rows that
   open the agent's modal, and the modals themselves, centred from 640px and
   full screen below. Without JS a modal the server opened is a plain open
   <dialog> (not modal); agents.js reopens it with showModal(). The filter's
   "Show" button is only for pages without JS: agents.js filters in place. */
.agents-rows{list-style:none;margin:0}
.agents-rows>li+li{border-top:1px solid var(--border)}
.agent-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;min-height:56px;padding:10px 12px;border-radius:var(--radius-sm);color:inherit;text-decoration:none}
.agent-row:hover{background:var(--surface-2)}
.agent-row:focus-visible{outline:none;box-shadow:var(--focus)}
.agent-badge{display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:999px;background:var(--surface-2);padding:0 7px;font-size:11px;font-weight:600;line-height:18px;color:var(--text-2)}
.agents-dialog{width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;margin:auto;padding:0;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);color:var(--text);box-shadow:var(--shadow-lg)}
.agents-dialog::backdrop{background:var(--overlay)}
.agents-dialog-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid var(--border);background:var(--surface)}
.agents-dialog-body{display:flex;flex-direction:column;gap:20px;padding:20px}
.agents-dialog-x{display:grid;place-items:center;width:40px;height:40px;border-radius:var(--radius-sm);font-size:20px;line-height:1;color:var(--text-2)}
.agents-dialog-x:hover{background:var(--surface-2);color:var(--text)}
.agents-zone{display:flex;flex-direction:column;gap:8px;border-top:1px solid var(--border);padding-top:16px}
.agents-caption{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-2)}
@media (max-width:639px){
  .agents-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
}
[data-js] [data-filter-apply]{display:none}
/* The color swatches' focus ring (K105 for this picker): the radio is
   sr-only, so the ring goes on its swatch. An outline, outside the checked
   ring (a Tailwind box-shadow that would override a box-shadow here). */
.agent-swatch input:focus-visible+span{outline:2px solid var(--accent);outline-offset:4px}
/* K219.2: an agent's image fills its rounded square; the file input is
   sr-only inside "Upload image", so the ring goes on that label. */
.agent-avatar{overflow:hidden}
.agent-avatar>img{display:block;width:100%;height:100%;object-fit:cover}
.agent-upload:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}

/* Connect AI (K121.2, agents/connect.html; K121 prototype B v3): buttons,
   the closed "Advanced" disclosure and the "Technical details" toggle. Only
   tokens.css colors, so both themes keep the AA pairs of STYLEGUIDE.md. */
.ai-btn,.ai-btn-primary{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 12px;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--surface);color:var(--text);font-size:13px;font-weight:500;white-space:nowrap}
.ai-btn:hover{border-color:var(--border-input)}
.ai-btn-primary{border-color:var(--accent);background:var(--accent);color:var(--accent-text)}
.ai-btn-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.ai-btn-danger{color:var(--err)}
.ai-input{flex:1 1 auto;min-width:0;border:1px solid var(--border-input);border-radius:var(--radius-sm);background:var(--surface);padding:6px 8px;font-family:var(--mono);font-size:12px;color:var(--text)}
.ai-dot{width:8px;height:8px;border-radius:99px;background:var(--ok);flex:none}
.ai-dot-off{background:var(--idle)}
.ai-note{background:var(--surface-2);border-radius:var(--radius-sm);padding:8px 12px;font-size:13px;color:var(--text-2)}
.ai-count{font-size:11px;font-weight:600;background:var(--surface-2);color:var(--text-2);border-radius:99px;padding:0 6px}
.ai-disclosure{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}
.ai-disclosure>summary{list-style:none;cursor:pointer;min-height:48px;display:flex;align-items:center;gap:8px;padding:10px 16px;font-weight:600;font-size:14px;color:var(--text);border-radius:var(--radius)}
.ai-disclosure>summary::-webkit-details-marker{display:none}
.ai-disclosure>summary::before{content:"›";display:inline-block;font-size:18px;line-height:1;color:var(--text-2);transition:transform .15s}
.ai-disclosure[open]>summary::before{transform:rotate(90deg)}
.ai-disclosure-body{padding:16px;border-top:1px solid var(--border)}
.ai-tech{font-size:12.5px;color:var(--text-2)}
.ai-tech>summary{cursor:pointer;font-weight:500;min-height:28px;display:inline-flex;align-items:center}
.ai-tech>div{margin-top:6px;display:flex;flex-direction:column;gap:6px}
.ai-tech code{font-family:var(--mono);font-size:12px;color:var(--text)}
@media (prefers-reduced-motion:reduce){.ai-disclosure>summary::before{transition:none}}

/* Playbook and role pages in the "AI & agents" shell (K126, Design option A;
   apps/playbooks templates). Only tokens.css colours. The text is read at
   length, so it is 14px/1.6 instead of the comment bubble's 13px/1.5. The
   segmented control (editor tabs, version views) marks its choice with
   aria-current or aria-pressed, so the look follows the semantics. */
.md.doc-text{font-size:14px;line-height:1.6;max-width:72ch}
.md.doc-text p,.md.doc-text ul,.md.doc-text ol,.md.doc-text blockquote,.md.doc-text pre{margin-bottom:10px}
.md.doc-text h4{font-size:16px;margin:20px 0 6px}
.md.doc-text h5{font-size:14.5px;margin:16px 0 4px}
.md.doc-text h6{font-size:14px;margin:12px 0 4px}
.md.doc-text li{margin:2px 0}
.md.doc-text code,.md.doc-text pre{font-size:12.5px}
.doc-card{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow);padding:16px}
@media (min-width:640px){.doc-card{padding:20px 24px}}
.doc-seg{display:flex;gap:4px;width:fit-content;max-width:100%;background:var(--surface-2);border-radius:var(--radius);padding:4px}
.doc-seg a,.doc-seg button{display:flex;align-items:center;justify-content:center;min-height:36px;padding:4px 14px;border-radius:var(--radius-sm);color:var(--text-2);font-size:13.5px;font-weight:500;text-decoration:none}
.doc-seg a:hover,.doc-seg button:hover{color:var(--text)}
.doc-seg [aria-current="page"],.doc-seg [aria-pressed="true"]{background:var(--surface);color:var(--text);font-weight:600;box-shadow:var(--shadow)}
.doc-seg [aria-current="page"]:focus-visible,.doc-seg [aria-pressed="true"]:focus-visible{box-shadow:var(--focus)}
.agent-badge-current{border-color:transparent;background:var(--accent-soft);color:var(--accent)}

/* Integrations (K134.5, apps/integrations templates; K134 prototype). The
   list reuses the Agents rows and modals, the tabs reuse .doc-seg, choices
   reuse .cw-choice. Status and results are always a dot and a word. Only
   tokens.css colors. */
.integration-badge{display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:8px;border:1px solid var(--border);background:var(--surface-2);color:var(--text-2);font-size:12px;font-weight:700}
.integration-status,.integration-result{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:12.5px;font-weight:500;color:var(--text-2)}
.integration-status::before,.integration-result::before{content:"";width:8px;height:8px;border-radius:50%;flex:none;background:var(--idle)}
.integration-status-on::before,.integration-result-ok::before{background:var(--ok)}
.integration-status-needs_secret,.integration-status-needs_spam_check,.integration-status-needs_address{color:var(--wait)}
.integration-status-needs_secret::before,.integration-status-needs_spam_check::before,.integration-status-needs_address::before{background:var(--wait)}
.integration-result-err{color:var(--err)}
.integration-result-err::before{background:var(--err)}
@media (max-width:559px){.integration-when{display:none}}
.integration-tabs{overflow-x:auto;padding:2px}
@media (max-width:639px){.integration-tabs .doc-seg a{padding:4px 10px}}
.integration-panel{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.integration-section{display:flex;flex-direction:column;gap:12px;padding:16px}
.integration-section+.integration-section{border-top:1px solid var(--border)}
.integration-once{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--wait-border);border-radius:var(--radius);background:var(--wait-soft)}
.integration-presets{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.integration-split{display:grid;gap:16px}
@media (min-width:900px){.integration-split{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.integration-split textarea.ai-input{font-family:var(--mono);line-height:1.5;resize:vertical}
.integration-sample{min-height:220px;font-size:11.5px}
.integration-preview{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg)}
.integration-card{padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.integration-preview-title{margin:2px 0 6px;font-size:13.5px;font-weight:600;overflow-wrap:anywhere}
.integration-preview-description{font-size:12.5px;color:var(--text-2);white-space:pre-wrap;overflow-wrap:anywhere}
.integration-rules{display:grid;gap:8px 16px;grid-template-columns:minmax(0,1fr);align-items:center}
@media (min-width:640px){.integration-rules{grid-template-columns:minmax(120px,max-content) minmax(0,320px)}}
.integration-table{overflow-x:auto}
.integration-table table{width:100%;min-width:480px;border-collapse:collapse;font-size:12.5px}
.integration-table th{padding:8px 16px;border-bottom:1px solid var(--border);text-align:left;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-2)}
.integration-table td{padding:9px 16px;border-top:1px solid var(--border);vertical-align:top;color:var(--text)}
[data-js] [data-no-js-only]{display:none}
/* A public form in Integrations (K135.3, K140 prototype screen 2): "What
   sends the requests?" in the New integration modal (the tool list hides
   while another kind is picked, no JS), the Form tab's field rows (Edit
   opens a full-width panel under the row) and its sketch of the page. */
.integration-kinds{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
#new-integration-dialog form:has(input[name=kind][value=form]:checked) [data-tool-list],
#new-integration-dialog form:has(input[name=kind][value=email]:checked) [data-tool-list]{display:none}
.email-mapping{display:flex;flex-direction:column;gap:4px;padding-left:18px;list-style:disc}
.ai-btn-ghost{border-color:transparent;background:transparent;color:var(--text-2)}
.ai-btn-ghost:hover{border-color:var(--border-strong);color:var(--text)}
/* An integration's header (K153, K153 prototype option A): Rename swaps
   the title for a field (it wraps under 360px), and its board and kind
   show as fixed with a "Why fixed?". */
.integration-title-rename{gap:6px;min-height:32px;padding:4px 8px}
.integration-rename{display:flex;flex-direction:column;gap:6px;max-width:440px}
.integration-rename-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.integration-rename-input{flex:1 1 200px;min-width:0;font-family:inherit;font-size:15px;font-weight:600}
.integration-rename-input[aria-invalid="true"]{border-color:var(--err)}
.integration-fixed{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin-top:6px;font-size:12.5px;color:var(--text-2)}
.integration-fixed-item{display:inline-flex;align-items:center;gap:5px}
.integration-fixed-item strong{font-weight:600;color:var(--text)}
.integration-fixed-item svg{flex:none;color:var(--text-3)}
.integration-fixed-why summary{cursor:pointer;list-style:none;color:var(--accent);font-weight:500}
.integration-fixed-why summary::-webkit-details-marker{display:none}
.integration-fixed-why p{margin-top:6px;max-width:62ch;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text-2)}
.form-fields{display:flex;flex-direction:column;gap:6px}
.form-field{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface)}
.form-field-name{display:flex;flex:1 1 160px;flex-direction:column;min-width:0}
.form-field-name strong{font-size:13px;font-weight:600;color:var(--text);overflow-wrap:anywhere}
.form-field-name span{font-size:12px;color:var(--text-2)}
.form-field-check{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--text)}
.form-field-check input{width:16px;height:16px;accent-color:var(--accent)}
.form-field-edit summary{list-style:none;cursor:pointer}
.form-field-edit summary::-webkit-details-marker{display:none}
.form-field-edit[open]{flex-basis:100%;order:5}
.form-field-panel{margin-top:8px}
.form-sketch{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface)}
.form-sketch-title{font-size:14px;font-weight:700;color:var(--text);overflow-wrap:anywhere}
.form-sketch-field{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:var(--text);overflow-wrap:anywhere}
.form-sketch-input{display:block;min-height:28px;padding:5px 8px;border:1px solid var(--border-input);border-radius:var(--radius-sm);background:var(--bg);font-weight:400;color:var(--text-2)}
.form-sketch-tall{min-height:52px}
.form-sketch-button{align-self:flex-start;padding:6px 12px;border-radius:var(--radius-sm);background:var(--accent);color:var(--accent-text);font-size:12.5px;font-weight:600}
.form-embed-code{min-width:0;flex:1 1 auto;font-family:var(--mono);font-size:12px;line-height:1.5;resize:vertical}
.form-spam summary{cursor:pointer}
.form-config .ai-input,.form-config textarea.ai-input{font-family:inherit}

/* The compact open card (K163, tasks/compact.js). The quiet "more" control:
   a 12px --text-2 text button (7:1 light, 8:1 dark), no accent and no box,
   underlined on hover, a 28px hit area and the global --focus ring. */
.tl-more{display:inline-flex;align-items:center;gap:4px;min-height:28px;margin-left:-6px;padding:0 6px;border-radius:var(--radius-sm);font-size:12px;font-weight:500;color:var(--text-2);cursor:pointer}
.tl-more:hover{color:var(--text);text-decoration:underline;text-underline-offset:2px}
.tl-more-n{font-weight:400}
.tl-more-chev{display:inline-block;font-size:10px;transition:transform 150ms cubic-bezier(.2,.8,.2,1)}
.tl-more[aria-expanded="true"] .tl-more-chev{transform:rotate(180deg)}
/* The earlier-updates row sits on the rail, above the latest entries. */
.tl-item[hidden]{display:none}
.tl-earlier{align-items:center;padding-bottom:6px}
.tl-earlier:before{top:22px;border-left-style:dashed}
.tl-earlier .tl-pin i{width:14px;height:4px;border-radius:2px;background:none;border-top:2px dotted var(--border-strong)}
/* A description longer than 5 lines: clamped (max-height set by the script)
   with a fade into --surface-2, which dissolves once it is open. */
.desc-clamp{position:relative;overflow:hidden}
.desc-clamp::after{content:"";position:absolute;left:0;right:0;bottom:0;height:44px;pointer-events:none;background:linear-gradient(to bottom,transparent,var(--surface-2));transition:opacity 150ms cubic-bezier(.2,.8,.2,1)}
.desc-clamp.desc-open::after{opacity:0}
@media (prefers-reduced-motion:reduce){.tl-more-chev,.desc-clamp::after{transition:none}}

/* The sending state (K164, tasks/sending.js): a 12px spinner and the verb
   on the button after 150 ms, "Still sending…" after 4 s, an inline error
   with Retry. aria-disabled buttons keep focus and look idle-but-busy. */
.send-spinner{display:inline-block;vertical-align:-2px;margin-right:6px;width:12px;height:12px;flex:none;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:send-spin 700ms linear infinite}
@keyframes send-spin{to{transform:rotate(1turn)}}
form[aria-busy="true"] button[aria-disabled="true"]{cursor:progress}
.send-hint{margin:4px 0 0;font-size:12px;color:var(--text-2)}
.send-error{margin:6px 0 0;font-size:12px;font-weight:500;color:var(--err)}
.send-retry{margin-left:2px;font-weight:600;color:var(--err);text-decoration:underline;text-underline-offset:2px}
@media (prefers-reduced-motion:reduce){.send-spinner{animation:none;border-right-color:currentColor;opacity:.6}}
/* Sign-up panels (K166.2): each step's card enters in 200 ms, a fade and 6px up; nothing moves with reduced motion. */
@keyframes panel-in{from{opacity:0;transform:translateY(6px)}}
@media (prefers-reduced-motion:no-preference){.panel-enter{animation:panel-in .2s ease-out}}
/* Board settings (K157.1): the page fades in over 250 ms; nothing moves with reduced motion. */
@keyframes page-fade{from{opacity:0}}
@media (prefers-reduced-motion:no-preference){.page-fade{animation:page-fade .25s ease-out}}

/* Public home (K166.3; layout K253, Design's v1 "Product first" with the loop
   of v3). Buttons, chips and the tour video (K187), framed like a card: its
   width and height attributes plus aspect-ratio keep the layout from jumping
   while the poster loads. Under 640px the large buttons take the full width.
   The badge is accent on accent-soft (about 5:1 in light, 5.5:1 in dark). */
.home-wrap{margin:0 auto;max-width:1120px;padding-left:16px;padding-right:16px}
.home-btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border-input);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);padding:8px 14px;font-size:14px;font-weight:600;text-decoration:none;white-space:nowrap;cursor:pointer}
.home-btn:hover{border-color:var(--border-strong);background:var(--surface-2)}
.home-btn-primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}
.home-btn-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.home-btn-ghost{border-color:transparent;background:transparent;color:var(--text-2)}
.home-btn-lg{padding:12px 18px;font-size:15px}
.home-chip{border:1px solid var(--border);background:var(--surface);border-radius:99px;padding:3px 10px;font-size:12.5px;color:var(--text-2)}
.home-chips{margin-top:14px;display:flex;flex-wrap:wrap;gap:6px}
.home-badge{display:inline-flex;border-radius:99px;background:var(--accent-soft);color:var(--accent);padding:3px 10px;font-size:12.5px;font-weight:600}
.home-video{display:block;width:100%;height:auto;aspect-ratio:16/9;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow)}
.home-video:focus-visible{box-shadow:var(--focus);border-radius:var(--radius-lg)}
.home-btn:focus-visible,.home-links a:focus-visible,.home-tour-link:focus-visible,.home-qa summary:focus-visible,.hb-approve:focus-visible,.hb-board:focus-visible,.hb-card:focus-visible{outline:none;box-shadow:var(--focus)}
.home-links{display:flex;flex-wrap:wrap;gap:4px 16px}
.home-links a{border-radius:var(--radius-sm);color:var(--text-2);text-decoration:underline;text-underline-offset:2px}
.home-links a:hover{color:var(--text)}
.home-help{margin-top:10px;max-width:34em;font-size:13px;color:var(--text-2)}
.home-h2{font-size:24px;line-height:1.15;font-weight:700;letter-spacing:-.02em;color:var(--text);text-wrap:balance}
.home-h2-sm{font-size:22px;line-height:1.2;font-weight:700;letter-spacing:-.015em;color:var(--text)}
.home-h3{font-size:15px;font-weight:600;color:var(--text)}
/* Hero: the title and call on the left, the example board on the right. */
.home-hero{padding:40px 0 48px;background:linear-gradient(180deg,var(--surface) 0%,var(--bg) 100%);border-bottom:1px solid var(--border)}
.home-hero-grid{display:grid;gap:40px;align-items:center}
.home-eyebrow{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3)}
.home-h1{margin-top:12px;font-size:34px;line-height:1.08;font-weight:700;letter-spacing:-.03em;text-wrap:balance}
.home-sub{margin-top:16px;max-width:32em;font-size:17px;line-height:1.55;color:var(--text-2)}
.home-actions{margin-top:24px;display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.home-tour-link{margin-top:20px;display:inline-flex;align-items:center;gap:8px;border-radius:var(--radius-sm);font-size:14px;font-weight:600;color:var(--text);text-decoration:none}
.home-tour-link::before{content:"▶";display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:11px}
.home-tour-link:hover{text-decoration:underline;text-underline-offset:2px}
/* With JS the video waits behind the board until "Watch the tour"
   (landing.js); without JS both show and the link jumps to the video. */
.home-tour{margin-top:16px}
.home-back{display:none;margin-top:12px}
.js .home-tour{margin-top:0}
.js .home-back{display:inline-flex}
.js .home-stage:not([data-playing]) .home-tour,.js .home-stage[data-playing] .hb-board{display:none}
/* The example board: a local mock in the app's look. */
.hb-board{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);overflow:hidden}
.hb-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid var(--border);font-size:13px;font-weight:700}
.hb-who{display:flex;gap:4px}
.hb-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px;background:var(--bg)}
.hb-col{display:flex;flex-direction:column;gap:6px;min-height:150px;border-radius:var(--radius);background:var(--surface-2);padding:8px}
/* Under 520px the board keeps Doing and Done, where the card moves. */
.hb-col-todo{display:none}
.hb-col-title{display:flex;justify-content:space-between;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3)}
.hb-cards{display:flex;flex-direction:column;gap:6px}
.hb-card{display:flex;flex-direction:column;gap:6px;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:var(--shadow);padding:8px;font-size:12px;font-weight:600;line-height:1.3}
.hb-waiting{border-color:var(--wait-border)}
.hb-meta{display:flex;align-items:center;justify-content:space-between;gap:4px;font-weight:400}
.hb-person{display:inline-grid;place-items:center;width:20px;height:20px;flex:none;border-radius:50%;background:var(--agent-violet);color:var(--agent-text);font-size:10px;font-weight:700}
.hb-agent{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--text-2)}
.hb-face{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:5px;color:var(--agent-text);font-size:10px;font-weight:700;font-style:normal}
.hb-dot{width:7px;height:7px;flex:none;border-radius:50%;background:var(--st,var(--idle))}
.hb-ask{display:flex;flex-direction:column;gap:6px;border-radius:6px;background:var(--wait-soft);padding:6px;font-weight:500;color:var(--text)}
.hb-ask b{font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--wait)}
.hb-approve{align-self:flex-start;border:1px solid var(--wait);border-radius:var(--radius-sm);background:var(--wait);color:var(--wait-text);padding:4px 10px;font-size:12px;font-weight:600;cursor:pointer}
.hb-approve:hover{filter:brightness(1.08)}
.hb-done-note{font-size:11px;font-weight:600;color:var(--ok)}
.hb-slot{visibility:hidden}
/* Approve: the card leaves in 200ms, arrives in Done in 300ms and glows for
   450ms. Nothing moves on load; reduced motion turns it off (below). */
@keyframes hb-arrive{from{opacity:0;transform:translateY(-8px)}}
@keyframes hb-glow{from{box-shadow:0 0 0 3px var(--accent-soft),var(--shadow)}}
.hb-arrive{animation:hb-arrive .3s cubic-bezier(.2,.8,.2,1),hb-glow .45s ease-out .3s}
.hb-leave{opacity:0;transform:translateX(12px);transition:opacity .2s ease-in,transform .2s ease-in}
/* The MCP clients strip under the hero. */
.home-strip{border-bottom:1px solid var(--border);padding:28px 0}
.home-strip-title{font-size:13px;font-weight:600;color:var(--text-2)}
.home-strip-lead{margin-top:6px;max-width:44em;font-size:14px;color:var(--text-2)}
.home-strip-lead strong{font-weight:600;color:var(--text)}
.home-strip .home-chips{margin-top:12px}
.home-strip-more{margin-top:8px;font-size:14px;color:var(--text-2)}
/* Sections, alternating backgrounds. */
.home-sec{padding:56px 0}
.home-alt{background:var(--surface);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.home-grid4{display:grid;gap:12px}
.home-feat{border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow);padding:20px}
.home-feat p,.home-two p,.home-steps p,.home-qa p{color:var(--text-2);font-size:14.5px;line-height:1.55}
.home-feat p{margin-top:6px}
.home-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--accent-soft);color:var(--accent)}
.home-feat-title{margin-top:14px;font-size:16px;font-weight:700;letter-spacing:-.01em;color:var(--text)}
/* How it works: the three steps and the loop diagram. */
.home-how{display:grid;gap:32px;align-items:center}
.home-steps{margin-top:24px;display:grid;gap:12px;counter-reset:home-step}
.home-steps li{counter-increment:home-step;position:relative;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg);padding:16px 16px 16px 58px}
.home-steps li::before{content:counter(home-step);position:absolute;left:16px;top:16px;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--accent);color:var(--accent-text);font-size:13px;font-weight:700}
.home-steps p{margin-top:4px}
.home-loop{border:1px solid var(--border);border-radius:20px;background:var(--bg);box-shadow:var(--shadow);padding:20px}
.home-loop-nodes{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}
.home-node{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;font-size:13px;font-weight:600}
.home-node small{font-size:12px;font-weight:400;color:var(--text-3)}
.home-node-face{display:grid;place-items:center;width:56px;height:56px;color:var(--agent-text);font-weight:700}
.home-node-you{border-radius:50%;background:var(--agent-violet)}
.home-node-agent{border-radius:16px;background:var(--agent-orange)}
.home-node-board{width:72px;height:72px;border-radius:20px;background:var(--accent-soft)}
.home-flows{margin-top:20px;display:grid;gap:8px}
.home-flow{display:flex;align-items:center;gap:10px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);padding:8px 12px;font-size:13.5px;color:var(--text-2);transition:border-color .2s,background-color .2s,color .2s}
.home-flow-tag{flex:none;width:80px;font-size:11px;font-weight:600;color:var(--text-3)}
.home-flow.hb-on{border-color:var(--accent);background:var(--accent-soft);color:var(--text)}
.home-flow.hb-on .home-flow-tag{color:var(--accent)}
.home-flow-you.hb-on{border-color:var(--wait-border);background:var(--wait-soft)}
.home-flow-you.hb-on .home-flow-tag{color:var(--wait)}
.home-loop-ctrl{margin-top:14px;display:flex;justify-content:flex-end}
.home-loop-ctrl .home-btn{padding:5px 10px;font-size:12.5px}
.home-loop-ctrl .home-btn[hidden]{display:none}
/* Who it's for and the story, side by side from 800px. */
.home-two{display:grid;gap:40px}
.home-two p{margin-top:8px}
/* Questions: an accordion; each answer is in the page (and the JSON-LD). */
.home-faq{display:grid;gap:24px}
.home-qa{border-top:1px solid var(--border)}
.home-qa:last-child{border-bottom:1px solid var(--border)}
.home-qa summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;list-style:none;border-radius:var(--radius-sm);padding:14px 4px}
.home-qa summary::-webkit-details-marker{display:none}
.home-qa summary::after{content:"+";flex:none;font-size:20px;color:var(--text-3);transition:transform .2s}
.home-qa[open] summary::after{transform:rotate(45deg)}
.home-qa-q{font-size:15px;font-weight:600;color:var(--text)}
.home-qa p{max-width:42em;padding:0 4px 16px}
/* The final call, a highlighted band. */
.home-final{padding:56px 0}
.home-final-box{display:flex;flex-direction:column;align-items:center;gap:14px;border-radius:20px;background:var(--accent-soft);padding:40px 24px;text-align:center}
.home-final-box .home-help{margin-top:0}
.home-badge-on-soft{background:var(--surface)}
@media (max-width:639px){
  .home-btn-lg{width:100%}
  /* "Sign in" and "Create free account" beside the logo fit 360px. */
  .home-nav .home-btn{padding:8px 10px}
}
@media (min-width:520px){
  .hb-cols{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hb-col-todo{display:flex}
}
@media (min-width:640px){
  .home-wrap{padding-left:24px;padding-right:24px}
  .home-h1{font-size:48px}
  .home-grid4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .home-sec{padding:72px 0}
  .home-h2{font-size:28px}
}
@media (min-width:800px){
  .home-two{grid-template-columns:1fr 1fr;gap:64px}
}
@media (min-width:900px){
  .home-hero{padding:72px 0 80px}
  .home-hero-grid{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}
  .home-how{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:56px}
  .home-faq{grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);gap:64px}
}
@media (min-width:1000px){
  .home-grid4{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){
  .hb-arrive,.hb-leave,.home-flow,.home-qa summary::after{animation:none;transition:none}
}
/* The onboarding assistant (K189, boards/welcome/*.html; K189 prototype,
   proposal C): one question per screen in a single column, so it fits
   360px without scrolling sideways. Choices and buttons reuse the Connect
   AI assistant's (.cw-choice, .cw-btn: 36px targets). Motion as the
   Design: a screen slides in over 200ms (boards/welcome.js adds .wl-enter
   only when coming from another screen), the progress bar fills in 250ms;
   none of it with prefers-reduced-motion. */
.wl{display:flex;flex-direction:column;gap:20px}
.wl-h1{font-size:22px;font-weight:600;letter-spacing:-.02em;color:var(--text);line-height:1.25}
.wl-h1:focus-visible{box-shadow:none}
.wl-lead{font-size:14px;color:var(--text-2);max-width:60ch}
.wl-progress{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:var(--text-2)}
.wl-bar{display:flex;gap:6px}
.wl-bar i{height:4px;flex:1;border-radius:99px;background:var(--border-strong)}
.wl-bar i.on{background:var(--accent)}
.wl-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.wl-link{display:inline-flex;align-items:center;min-height:36px;font-size:13px;font-weight:500;color:var(--accent);text-decoration:underline;text-underline-offset:2px;border-radius:var(--radius-sm)}
.wl-note{font-size:13px;color:var(--text-2)}
.wl-note .wl-link{min-height:0}
.wl-status{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--text-2)}
.wl-dot{width:8px;height:8px;border-radius:99px;background:var(--accent);flex:none;animation:wl-pulse 1.6s ease-in-out infinite}
.wl-dot.on{background:var(--ok);animation:none}
@keyframes wl-pulse{50%{opacity:.3}}
.wl-copybox{display:block;width:100%;resize:none;border:1px solid var(--border-input);border-radius:var(--radius-sm);background:var(--surface-2);color:var(--text);padding:8px 10px;font-size:13.5px;line-height:1.45}
.wl-more summary{cursor:pointer;font-size:13px;font-weight:500;color:var(--accent);border-radius:var(--radius-sm)}
/* The live list while the AI builds the board and the "ready" screen
   (K189.2). A step done since the page last looked (.wl-step-fresh, set by
   the server) pops its check in 320ms, like the ready mark when that screen
   is reached from the list; nothing animates on a first load. */
.wl-build{display:flex;flex-direction:column;gap:16px}
.wl-steps{display:flex;flex-direction:column;gap:10px;list-style:none;margin:0;padding:0}
.wl-step{display:flex;align-items:flex-start;gap:10px;font-size:13.5px;color:var(--text-2)}
.wl-step[data-step="done"]{color:var(--text)}
.wl-check{display:grid;place-items:center;width:20px;height:20px;border:1.5px solid var(--border-strong);border-radius:99px;font-size:11px;flex:none}
.wl-step[data-step="done"] .wl-check{background:var(--ok);border-color:var(--ok);color:var(--ok-text)}
.wl-step-detail{display:block;font-size:12.5px;color:var(--text-2);overflow-wrap:anywhere}
.wl-summary{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 14px;margin:0;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);font-size:13.5px}
.wl-summary dt{font-weight:600;color:var(--text-2)}
.wl-summary dd{margin:0;color:var(--text);overflow-wrap:anywhere}
.wl-done-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:99px;background:var(--ok);color:var(--ok-text);font-size:20px;font-weight:700}
@keyframes wl-in{from{opacity:0;transform:translateY(12px)}}
@keyframes wl-pop{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}100%{transform:scale(1)}}
@media (prefers-reduced-motion:no-preference){
  .wl-enter{animation:wl-in 200ms cubic-bezier(.2,.8,.2,1)}
  .wl-bar i{transition:background-color 250ms cubic-bezier(.2,.8,.2,1)}
  .wl-step-fresh .wl-check,.wl-enter .wl-done-mark{animation:wl-pop 320ms cubic-bezier(.2,.8,.2,1)}
}
@media (prefers-reduced-motion:reduce){.wl-dot{animation:none}}

/* The legal pages (K245, core/legal.html): rendered Markdown in a readable
   column. Tailwind's preflight resets margins, list markers and heading
   sizes, so they come back here. Links use the global :focus-visible ring. */
.legal{max-width:70ch;margin:0 auto;font-size:15px;line-height:1.65;color:var(--text);overflow-wrap:anywhere}
.legal h1{font-size:28px;line-height:1.2;font-weight:700;margin:0 0 8px}
.legal h2{font-size:18px;line-height:1.3;font-weight:650;margin:32px 0 8px}
.legal p,.legal ul{margin:0 0 12px}
.legal ul{padding-left:22px;list-style:disc}
.legal li{margin:0 0 6px}
.legal code{font-family:var(--mono);font-size:13px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 4px}
/* K255: "beta" under the logo in every header (core/includes/brand.html; approval request 245 chose variation A).
   Out of the flow (absolute, 3px up into the name's line box), so no header grows: base.html without the
   avatar menu (sign-in, terms) is only as tall as the name. It starts where the name starts (the 24px mark
   + 8px gap; 0 in base.html, which has no mark). On the board below 640px only the square shows
   (max-sm:hidden in logo.html), so it centres under it, 2px below: the square is taller than the name. */
.brand{position:relative;display:flex;flex:none}
.brand-beta{position:absolute;top:100%;left:32px;margin-top:-3px;font-size:10.5px;font-weight:600;line-height:1;letter-spacing:.08em;color:var(--text-3);white-space:nowrap}
.brand-text .brand-beta{left:0}
@media (max-width:639px){.brand-square .brand-beta{left:50%;margin-top:2px;transform:translateX(-50%)}}

/* Approval options in the modal's wait box (K269.2, option A): one row per
   option, the checked one amber (human action). Only the row's 120 ms
   colour change moves, and not under reduced motion. */
.choices{margin:0 0 4px;padding:0;border:0;min-width:0;display:flex;flex-direction:column;gap:6px}
.choice{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);cursor:pointer;transition:border-color .12s,background-color .12s}
.choice:hover{border-color:var(--border-strong)}
.choice:has(input:checked){border-color:var(--wait);background:var(--wait-soft)}
.choice:has(input:focus-visible){box-shadow:var(--focus)}
.choice input{flex:none;width:16px;height:16px;margin:2px 0 0;accent-color:var(--wait)}
.choice input:focus-visible{box-shadow:none}
.choice-label{min-width:0;overflow-wrap:anywhere}
.choice-key{font-weight:700;color:var(--text);margin-right:2px}
.choice-rec{display:inline-block;margin-left:4px;padding:0 6px;border:1px solid var(--wait-border);border-radius:99px;font-size:11px;font-weight:600;color:var(--wait);vertical-align:1px}
@media (prefers-reduced-motion:reduce){.choice{transition:none}}
