/* VibeCorral components — CSS only. Values come from tokens.css (var(--…)). */
.vc { font-family: var(--font-sans); color: var(--text); -webkit-font-smoothing: antialiased; }
.vc *, .vc *::before, .vc *::after { box-sizing: border-box; }
.vc :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Button — always a pill */
.vc-btn { display: inline-flex; align-items: center; gap: var(--space-2); height: 36px; padding: 0 var(--space-4);
  border-radius: var(--radius-pill); border: 1px solid transparent; font: 500 13px/20px var(--font-sans);
  cursor: pointer; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.vc-btn svg { width: 16px; height: 16px; flex: none; }
.vc-btn--primary { background: var(--brand-fill); color: var(--on-brand); }
.vc-btn--primary:hover { background: var(--brand-fill-hover); }
.vc-btn--glow { box-shadow: var(--shadow-glow); }
.vc-btn--secondary { background: transparent; color: var(--text); border-color: var(--border-control); }
.vc-btn--secondary:hover { background: var(--surface-raised); }
.vc-btn--ghost { background: transparent; color: var(--text-muted); }
.vc-btn--ghost:hover { background: var(--surface-raised); color: var(--text); }
.vc-btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.vc-btn--lg { height: 44px; padding: 0 var(--space-5); font-size: 15px; }
.vc-btn--sm { height: 28px; padding: 0 var(--space-3); }
.vc-btn[disabled], .vc-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
/* aria-disabled keeps hover and focus (so a tooltip can say why); the hover look stays that of the resting button. */
.vc-btn--primary[aria-disabled="true"]:hover { background: var(--brand-fill); }
.vc-btn--secondary[aria-disabled="true"]:hover, .vc-btn--ghost[aria-disabled="true"]:hover { background: transparent; }
.vc-btn--ghost[aria-disabled="true"]:hover { color: var(--text-muted); }

/* Status badge — dot/shape + word, never color alone. The ✕ / ✓ glyphs carry an empty alt text
   (content: "…" / "") so screen readers read only the word; the plain declaration is the fallback. */
.vc-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--space-2) 0 7px;
  border-radius: var(--radius-pill); background: var(--surface-raised); font: var(--type-label);
  color: var(--text-muted); white-space: nowrap; }
.vc-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
/* Running: the word stays text-muted, only the dot is live (Pravidla klidu 8). */
.vc-badge--running::before { background: var(--live); }
.vc-badge--waiting { color: var(--warn); }
.vc-badge--waiting::before { background: transparent; border: 2px solid currentColor; width: 9px; height: 9px; }
.vc-badge--error { color: var(--danger); }
.vc-badge--error::before { content: "✕"; content: "✕" / ""; width: auto; height: auto; background: none; border-radius: 0; font-size: 10px; line-height: 1; }
.vc-badge--done { color: var(--brand); }
.vc-badge--done::before { content: "✓"; content: "✓" / ""; width: auto; height: auto; background: none; border-radius: 0; font-size: 11px; line-height: 1; }
.vc-badge--idle { color: var(--text-muted); }
.vc-badge--idle::before { background: transparent; border: 1.5px dashed currentColor; width: 9px; height: 9px; }
@keyframes vc-pulse { 50% { opacity: .45; } }

/* Chip — model / runtime label */
.vc-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-raised); color: var(--text-muted);
  font: var(--type-meta); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Limited status — the agent cannot report every state (external agy / Cursor). Dashed outline + the word. */
.vc-chip--mono { font: var(--type-mono-sm); }
.vc-chip--limited { background: transparent; border-style: dashed; border-color: var(--border-control); }

/* Permission mode — Claude Code's Plan / Accept edits / Auto / Bypass in the colour its terminal gives them. Always an icon
   (12 px, Lucide) + the word, as an outline chip: never a dot or a shape (shapes belong to the status). Manual (default)
   has no colour and no badge. The colour sits on the word, the icon and (at 45 %) the outline; no fill.
     <span class="vc-mode vc-mode--plan" role="img" aria-label="Mode: Plan"><svg …/><span class="vc-mode__text">Plan</span></span>
   vc-mode--icon drops the word for narrow places (sidebar row); the accessible name (aria-label, Tip) still says it. */
.vc-mode { display: inline-flex; align-items: center; gap: var(--space-1); height: 18px; padding: 0 var(--space-1); flex: none;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent); border-radius: var(--radius-sm); background: transparent;
  color: var(--text-muted); font: var(--type-meta); white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; }
.vc-mode > svg { width: 12px; height: 12px; flex: none; }
.vc-mode--plan { color: var(--mode-plan); }
.vc-mode--edits { color: var(--mode-edits); }
.vc-mode--auto { color: var(--mode-auto); }
.vc-mode--bypass { color: var(--mode-bypass); }
.vc-mode--icon { width: 16px; height: 16px; padding: 0; justify-content: center; }
.vc-mode--icon .vc-mode__text { display: none; }

/* Agent card */
.vc-agent { display: grid; gap: var(--space-3); padding: var(--space-4); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); min-width: 0; }
.vc-agent__head { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.vc-agent__name { font: 600 17px/24px var(--font-sans); letter-spacing: -.01em; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.vc-agent__task { font: 400 13px/20px var(--font-sans); color: var(--text-muted); margin: 0; }
.vc-agent__log { margin: 0; padding: var(--space-2) var(--space-3); background: var(--surface-sunken); border-radius: var(--radius-md);
  font: 400 12px/18px var(--font-mono); color: var(--text-muted); white-space: pre-wrap; overflow: hidden; }
.vc-agent__log b { color: var(--live); font-weight: 400; }
.vc-agent__meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; font: var(--type-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vc-agent__meta .sp { flex: 1; }
.vc-agent--selected { border-color: var(--brand); }
/* Compact card for the desktop workspace overview: the name at ui-strong size, tighter padding and gaps. */
.vc-agent--compact { gap: var(--space-2); padding: var(--space-3); }
.vc-agent--compact .vc-agent__name { font: var(--type-ui-strong); letter-spacing: 0; }
/* Mini card for the overview bar above open windows (owner 2026-10-15): at most 64 px tall, two rows — the status shape,
   the name and a menu; then the status word and the newest action (`vc-agent__line`, one mono line, cut). */
.vc-agent--mini { gap: 2px; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); border-radius: var(--radius-md); box-shadow: none; }
.vc-agent--mini .vc-agent__head { gap: var(--space-1); min-height: 24px; }
.vc-agent--mini .vc-agent__name { font: var(--type-ui-strong); letter-spacing: 0; }
.vc-agent__line { display: flex; align-items: baseline; gap: 1ch; min-width: 0; margin: 0; font: 400 12px/18px var(--font-mono); color: var(--text-muted);
  white-space: nowrap; overflow: hidden; }
.vc-agent__line > * { flex: none; }
.vc-agent__line > :last-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vc-agent__line b { color: var(--live); font-weight: 400; }

/* Corral — a group of agents */
.vc-corral { border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--bg); padding: var(--space-2); }
.vc-corral--active { background: var(--surface-raised); border-color: var(--border-control); }
.vc-corral__head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3) var(--space-3); }
.vc-corral__mark { width: 28px; height: 28px; border-radius: var(--radius-md); background: var(--brand-tint); color: var(--brand);
  display: grid; place-items: center; flex: none; }
.vc-corral__mark svg { width: 18px; height: 18px; }
/* Corral colour — set two custom properties on the corral (or any ancestor):
   style="--corral: var(--group-3); --corral-on: var(--on-group-3)". Without them the corral is `neutral`.
   Only for marks and swatches — never an edge, strip or glow, and never a text colour on a surface. */
.vc-corral__mark--color { background: var(--corral, var(--neutral)); color: var(--corral-on, var(--on-neutral)); }
.vc-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--corral, var(--neutral)); flex: none; }
.vc-corral__title { font: 600 15px/22px var(--font-sans); margin: 0; }
.vc-corral__sub { font: var(--type-meta); color: var(--text-muted); margin: 0; font-variant-numeric: tabular-nums; }
.vc-corral__count { margin-left: auto; display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-2);
  border-radius: var(--radius-pill); background: var(--live); color: var(--on-live); font: 500 11px/16px var(--font-sans); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.vc-corral__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.vc-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  font: 400 13px/20px var(--font-sans); color: var(--text); cursor: default; }
.vc-row:hover { background: var(--surface-raised); }
.vc-row--selected { background: var(--brand-tint); }
.vc-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Switch: an on/off setting that applies at once. A real <input type="checkbox" role="switch">, so label click, Space,
   focus and disabled work as usual. Off: a raised track with a muted knob; on: brand-fill with the knob right. Only the
   knob moves. Checkbox (vc-check): picking items from a list, a choice in a question; radio-type is round. */
.vc-switch, .vc-check { appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0; border: 1px solid var(--border-control);
  background: var(--surface-raised); cursor: pointer; vertical-align: middle; }
.vc-switch { width: 28px; height: 16px; border-radius: var(--radius-pill); }
.vc-switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-muted); transition: transform .15s ease; }
.vc-switch:checked, .vc-check:checked { background: var(--brand-fill); border-color: var(--brand-fill); }
.vc-switch:checked::before { transform: translateX(12px); background: var(--on-brand); }
.vc-check { display: inline-grid; place-content: center; width: 16px; height: 16px; border-radius: var(--radius-sm); }
.vc-check::before { content: ""; width: 8px; height: 4px; margin-top: -2px; border: solid var(--on-brand); border-width: 0 0 2px 2px;
  transform: rotate(-45deg); visibility: hidden; }
.vc-check[type="radio"] { border-radius: 50%; }
.vc-check[type="radio"]::before { width: 6px; height: 6px; margin: 0; border: 0; border-radius: 50%; background: var(--on-brand); }
.vc-check:checked::before { visibility: visible; }
.vc-switch:focus-visible, .vc-check:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vc-switch:disabled, .vc-check:disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .vc-switch::before { transition: none; } }

/* Prompt input */
.vc-prompt { display: grid; gap: var(--space-2); padding: var(--space-3); background: var(--surface-sunken);
  border: 1px solid var(--border-control); border-radius: var(--radius-lg); }
/* Focus: one frame, the box's own — its border turns brand with a soft brand-tint halo, the same radius as the box. The
   textarea inside draws no ring of its own (owner 2026-10-15: no inner square ring, no white outline around the box). */
.vc-prompt { transition: border-color .15s ease, box-shadow .15s ease; }
.vc-prompt:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.vc-prompt textarea:focus-visible, .vc-prompt textarea:focus { outline: none; }
.vc-prompt textarea { all: unset; display: block; min-height: 44px; font: 400 15px/24px var(--font-sans); color: var(--text); white-space: pre-wrap; }
.vc-prompt textarea::placeholder { color: var(--text-muted); }
.vc-prompt__bar { display: flex; align-items: center; gap: var(--space-2); }
.vc-prompt__bar .sp { flex: 1; }
/* Compact prompt input — the bottom of a desktop session window: the text on a row of its own, the full width of the
   box (owner 2026-10-20: beside the buttons the placeholder wrapped into a column of three or four lines), body-sm on
   input-bg, growing up to eight lines (the app sizes the textarea); the bar under it, one line at its right end — a
   hint shrinks or goes, the buttons never wrap. The placeholder stays one line, cut with an ellipsis when the box is
   narrow. Disabled: the textarea is disabled, a dashed frame, and the reason is said in the bar, not by looks alone. */
.vc-prompt--compact { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3); background: var(--input-bg); border-radius: var(--radius-md); }
.vc-prompt--compact textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 20px; padding: var(--space-1) var(--space-2) 0 0;
  font: var(--type-body-sm); overflow-wrap: anywhere; text-overflow: ellipsis; overflow-x: hidden; }
/* The placeholder on one line with an ellipsis: WebKit reads text-overflow from ::placeholder, Chromium only inherits
   it from the textarea (always set: a draft wraps, so it never cuts typed text; set while the placeholder shows, Chromium
   lost it after a draft was cleared). */
.vc-prompt--compact textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A disabled box says why in place of the placeholder: a reason is read whole, so it wraps. */
.vc-prompt--compact textarea:disabled::placeholder { white-space: pre-wrap; }
.vc-prompt--compact .vc-prompt__bar { justify-content: flex-end; flex-wrap: nowrap; min-width: 0; }
.vc-prompt--compact .vc-prompt__bar > .vc-btn { flex: none; }
.vc-prompt textarea:disabled { cursor: not-allowed; color: var(--text-muted); }
.vc-prompt--disabled { background: transparent; border-style: dashed; }
.vc-kbd { font: var(--type-meta); color: var(--text-muted); padding: 0 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }

/* Thinking — the agent works on its answer and no tool runs (SessionView.phase "thinking"). "✻ Thinking…" in the
   colour of the action in progress: the mark pulses like the Running dot and the three dots light up in turn —
   the second loop the design allows (owner's request), never a gradient or a shimmer. Static with
   prefers-reduced-motion. Markup: <span class="vc-thinking"><span class="vc-thinking__mark" aria-hidden="true">✻</span>
   <span>Thinking<span class="vc-thinking__dots"><span>.</span><span>.</span><span>.</span></span></span></span> */
.vc-thinking { display: inline-flex; align-items: baseline; gap: 1ch; color: var(--ansi-cyan); white-space: nowrap; }
.vc-thinking__mark { display: inline-block; animation: vc-pulse 1.6s ease-in-out infinite; }
.vc-thinking__dots span { animation: vc-dots 1.2s steps(1, end) infinite; }
.vc-thinking__dots span:nth-child(2) { animation-delay: .2s; }
.vc-thinking__dots span:nth-child(3) { animation-delay: .4s; }
@keyframes vc-dots { 0% { opacity: .25; } 30% { opacity: 1; } 80% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .vc-thinking__mark, .vc-thinking__dots span { animation: none; opacity: 1; }
}

/* Loading — anything read asynchronously (owner 2026-10-21: "a nice preloader, not just text"). Three dots for a line or a
   small section; skeleton rows (`vc-loading--rows`) in place of a list. The words are for screen readers only
   (role="status"), it fades in after 150 ms so a quick read never flashes, and it moves only while the read lasts (Pravidla
   klidu 8): the dots light up in turn, the rows breathe — never a gradient sweep. Static with prefers-reduced-motion.
   Markup: <div class="vc-loading" role="status" aria-live="polite"><span class="vc-loading__dots" aria-hidden="true">
   <span></span><span></span><span></span></span><span class="vc-loading__label">Loading the tasks…</span></div> */
.vc-loading { display: flex; align-items: center; min-height: 24px; padding-block: var(--space-1); animation: vc-loading-in .2s ease-out .15s both; }
.vc-loading__dots { display: inline-flex; gap: var(--space-1); }
.vc-loading__dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: vc-loading-dot 1.2s ease-in-out infinite; }
.vc-loading__dots span:nth-child(2) { animation-delay: .15s; }
.vc-loading__dots span:nth-child(3) { animation-delay: .3s; }
.vc-loading--rows { display: grid; align-items: stretch; gap: var(--space-3); padding-block: var(--space-2); }
.vc-loading__row { height: 10px; border-radius: var(--radius-sm); background: var(--surface-raised); animation: vc-loading-breathe 1.6s ease-in-out infinite; }
.vc-loading__row:nth-child(4n+2) { width: 84%; }
.vc-loading__row:nth-child(4n+3) { width: 68%; }
.vc-loading__row:nth-child(4n) { width: 92%; }
.vc-loading__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes vc-loading-in { from { opacity: 0; } }
@keyframes vc-loading-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes vc-loading-breathe { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) {
  .vc-loading, .vc-loading__row { animation: none; }
  .vc-loading__dots span { animation: none; opacity: .6; }
}

/* =====================================================================================================================
   Desktop app shell — v2 (2026-10-15), drawn from the running app. Reference classes for the main window: top bar,
   sidebar rows, dockable windows, activity, diff and the detail panel. The app's feature CSS (ws-*, sx-*, dp-*, diff-*)
   may keep its own class names; it should match these looks. Example: design/examples/AppShell.html.
   ===================================================================================================================== */

/* Shell grid: top bar over sidebar · workspace · detail panel. */
.vc-app { display: grid; grid-template: "top top top" 48px "side main detail" minmax(0, 1fr) / var(--app-side, 280px) minmax(0, 1fr) var(--app-detail, 380px);
  height: 100vh; min-height: 0; background: var(--bg); font: var(--type-body-sm); }

/* Status shape without a word — only where the word stands right next to it (session row 2nd line, window header).
   running ● live (pulses) · waiting ○ warn · error ✕ danger · done ✓ brand · idle dashed ring text-muted. */
.vc-shape { display: inline-grid; place-items: center; width: 12px; height: 12px; flex: none; color: var(--text-muted); }
.vc-shape::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.vc-shape--running { color: var(--live); }
.vc-shape--running::before { animation: vc-pulse 1.6s ease-in-out infinite; }
.vc-shape--waiting { color: var(--warn); }
.vc-shape--waiting::before { background: transparent; border: 2px solid currentColor; box-sizing: border-box; width: 9px; height: 9px; }
.vc-shape--error { color: var(--danger); }
.vc-shape--error::before { content: "✕"; content: "✕" / ""; width: auto; height: auto; background: none; border-radius: 0; font: 600 10px/1 var(--font-sans); }
.vc-shape--done { color: var(--brand); }
.vc-shape--done::before { content: "✓"; content: "✓" / ""; width: auto; height: auto; background: none; border-radius: 0; font: 600 11px/1 var(--font-sans); }
.vc-shape--idle::before { background: transparent; border: 1.5px dashed currentColor; box-sizing: border-box; width: 9px; height: 9px; }
@media (prefers-reduced-motion: reduce) { .vc-shape--running::before { animation: none; } }

/* Corral marker: the ONLY place a window or row shows its corral colour — an 8 px rounded square. Never a border or strip
   on a window (a violet corral would read as focus/brand). Set --corral on the element or an ancestor. */
.vc-marker { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--corral, var(--neutral)); }
/* Light theme: the light corral colours (Yellow 2.98:1, Mint 3.08:1 on surface-raised) get a 1 px edge in a darker shade of
   themselves (75 % corral, 25 % text: ≥ 4.5:1 on surface and surface-raised), so the mark holds on a selected row. */
[data-theme="light"] .vc-marker { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--corral, var(--neutral)) 75%, var(--text)); }

/* Top bar — one primary action, the rest quiet. Brand area as wide as the sidebar so the titlebar merges with it. */
.vc-topbar { grid-area: top; display: flex; align-items: center; min-width: 0; background: var(--surface); border-bottom: 1px solid var(--border); }
.vc-topbar__brand { width: var(--app-side, 280px); flex: none; height: 100%; display: flex; align-items: center; gap: var(--space-2);
  padding: 0 var(--space-3); border-right: 1px solid var(--border); }
.vc-topbar__brand img { height: 28px; width: auto; display: block; }
.vc-topbar__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-3); }
.vc-search { flex: 1 1 auto; max-width: 560px; min-width: 200px; display: inline-flex; align-items: center; gap: var(--space-2); height: 32px;
  padding: 0 var(--space-2) 0 var(--space-3); border: 1px solid var(--border-control); border-radius: var(--radius-md); background: var(--input-bg);
  color: var(--text-muted); font: var(--type-body-sm); }
.vc-search > span:first-of-type { flex: 1; }
.vc-topbar__sp { flex: 1; }
.vc-iconbtn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius-md); background: none;
  color: var(--text-muted); cursor: pointer; flex: none; }
.vc-iconbtn:hover { background: var(--surface-raised); color: var(--text); }
.vc-iconbtn svg, .vc-search svg { width: 16px; height: 16px; }

/* Usage meter: a word, a figure and a 32×6 bar; warn above 80 %. */
.vc-meter { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text-muted); font: var(--type-meta); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vc-meter__bar { width: 32px; height: 6px; border-radius: var(--radius-pill); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--border-control); overflow: hidden; }
.vc-meter__bar > span { display: block; height: 100%; background: var(--text-muted); }
.vc-meter--high .vc-meter__bar > span { background: var(--warn); }

/* Sidebar — rows, not cards. */
.vc-side { grid-area: side; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--border); }
.vc-side__head { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 var(--space-2) 0 var(--space-3);
  font: var(--type-label); color: var(--text-muted); }
.vc-side__list { flex: 1; min-height: 0; overflow: auto; padding: 0 var(--space-2); display: grid; align-content: start; gap: 2px; }
.vc-side__foot { padding: var(--space-2); border-top: 1px solid var(--border); display: grid; gap: 2px; }
/* Corral row 32 px: chevron, marker, name, counts (only non-zero waiting/error), + on hover/selection. */
.vc-crow { position: relative; display: flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-2); border-radius: var(--radius-md);
  color: var(--text); font: var(--type-ui-strong); cursor: pointer; }
.vc-crow:hover { background: var(--surface-raised); }
.vc-crow__chev { width: 12px; color: var(--text-muted); transition: transform .15s ease; }
.vc-crow[aria-expanded="true"] .vc-crow__chev { transform: rotate(90deg); }
.vc-crow__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-crow__count { font: var(--type-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vc-crow__count--warn { color: var(--warn); }
.vc-crow__count--danger { color: var(--danger); }
.vc-crow--selected { background: var(--surface-raised); }
/* Session row 46 px, two lines: shape + name / "Running · claude · project" + time. Selected (owner 2026-10-15): no
   background — the name turns the corral's text-safe colour (--corral-text, group-n-text); hover alone is surface-raised. */
.vc-srow { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; column-gap: var(--space-2); align-items: center; min-height: 46px;
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-5); border-radius: var(--radius-md); cursor: pointer; }
.vc-srow:hover { background: var(--surface-raised); }
.vc-srow__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.vc-srow--selected .vc-srow__name { color: var(--corral-text, var(--text)); }
.vc-srow__meta { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--type-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vc-srow__time { grid-column: 3; grid-row: 2; font: var(--type-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vc-srow__meta b { font-weight: 400; color: var(--live); }
.vc-srow__meta b.w { color: var(--warn); }
.vc-srow__meta b.e { color: var(--danger); }
.vc-navrow { display: flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-2); border-radius: var(--radius-md); color: var(--text-muted); }
.vc-navrow:hover { background: var(--surface-raised); color: var(--text); }
.vc-navrow svg { width: 16px; height: 16px; }
.vc-navrow .vc-kbd { margin-left: auto; }

/* Workspace: corral title row, then windows on bg with a space-2 gutter. */
.vc-ws { grid-area: main; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0 var(--space-2) var(--space-2); gap: var(--space-2); }
.vc-ws__head { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-2); }
.vc-ws__title { margin: 0; font: var(--type-h3); }
.vc-ws__sum { display: flex; align-items: center; gap: var(--space-3); font: var(--type-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Window — a tool pane: hairline border everywhere (no corral strip), radius-md, header 36 px on surface, body on
   surface-sunken. Focused window: the border turns brand (1 px) — the only brand frame on screen. */
.vc-window { display: flex; flex-direction: column; min-height: 0; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-sunken); overflow: hidden; }
.vc-window--focused { border-color: var(--brand); }
.vc-window__head { flex: none; display: flex; align-items: center; gap: var(--space-2); height: 36px; padding: 0 var(--space-1) 0 var(--space-3);
  background: var(--surface); border-bottom: 1px solid var(--border); }
.vc-window__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--type-ui-strong); color: var(--text); }
.vc-window__state { font: var(--type-meta); color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vc-window__sp { flex: 1; }
.vc-window__ctl { display: flex; gap: 2px; }
.vc-window__ctl .vc-iconbtn { width: 28px; height: 28px; }
.vc-window__body { flex: 1; min-height: 0; overflow: auto; }
.vc-window__meta { padding: var(--space-2) var(--space-3) 0; font: var(--type-meta); line-height: 16px; color: var(--text-muted); display: flex; gap: var(--space-2); font-variant-numeric: tabular-nums; }

/* Activity — tool rows are machine output: Geist Mono 12/16 in text-muted; only the tool word and the first token of the
   target are emphasised. Long commands are one line, cut with an ellipsis; repeated tools collapse to "Bash ×6". */
.vc-act { list-style: none; margin: 0; padding: var(--space-3); display: grid; gap: 0; font: var(--type-mono-sm); line-height: 16px; color: var(--text-muted); }
.vc-act__row { display: grid; grid-template-columns: 2ch minmax(0, 1fr); min-width: 0; }
.vc-act__mark { color: var(--ansi-magenta); }
.vc-act__line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-act__tool { color: var(--text); }
.vc-act__target { color: var(--text); font-weight: 500; }
.vc-act__extra { color: var(--text-muted); }
.vc-act__row--running, .vc-act__row--running .vc-act__mark, .vc-act__row--running .vc-act__tool { color: var(--ansi-cyan); }
.vc-act__row--error .vc-act__mark { color: var(--danger); }
.vc-act__row--error .vc-act__extra { color: var(--danger); }
.vc-act__gap { height: 16px; }
/* Messages in the activity: the agent's in sans body-sm text, the user's as a compact block. */
.vc-msg { margin: var(--space-2) 0; font: var(--type-body-sm); color: var(--text); }
.vc-msg--user { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--surface-raised); }
.vc-msg__who { display: block; font: var(--type-label); color: var(--text-muted); }
.vc-msg code { font: var(--type-mono-sm); padding: 0 4px; border-radius: var(--radius-sm); background: var(--surface-raised); }

/* Diff — unified by default. Changed lines: tinted row + mark in the gutter. Whole-file add/delete (.vc-diff--whole):
   no row tint at all (a 1 000-line green slab says nothing), just the 2 px edge and + / − — the code keeps its syntax colours. */
.vc-diff { margin: 0; font: var(--type-mono-sm); line-height: 18px; color: var(--syntax-variable); }
.vc-diff__line { display: grid; grid-template-columns: 5ch 2ch minmax(0, 1fr); }
.vc-diff__no { padding-right: var(--space-2); text-align: right; color: var(--text-muted); background: var(--diff-gutter); user-select: none; }
.vc-diff__sign { text-align: center; user-select: none; }
.vc-diff__text { white-space: pre; overflow: hidden; text-overflow: ellipsis; padding-right: var(--space-2); }
.vc-diff__line--add .vc-diff__no { box-shadow: inset -2px 0 0 var(--diff-add-mark); }
.vc-diff__line--del .vc-diff__no { box-shadow: inset -2px 0 0 var(--diff-del-mark); }
.vc-diff__line--add .vc-diff__sign { color: var(--diff-add-mark); }
.vc-diff__line--del .vc-diff__sign { color: var(--diff-del-mark); }
.vc-diff:not(.vc-diff--whole) .vc-diff__line--add > :not(.vc-diff__no) { background: var(--diff-add-bg); }
.vc-diff:not(.vc-diff--whole) .vc-diff__line--del > :not(.vc-diff__no) { background: var(--diff-del-bg); }
.vc-diff__hunk { padding: var(--space-1) var(--space-3); background: var(--surface-raised); color: var(--text-muted); }
.vc-diff .k { color: var(--syntax-keyword); } .vc-diff .f { color: var(--syntax-function); } .vc-diff .s { color: var(--syntax-string); }
.vc-diff .t { color: var(--syntax-type); } .vc-diff .c { color: var(--syntax-comment); font-style: italic; } .vc-diff .p { color: var(--syntax-punctuation); }
.vc-filebar { display: flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-3); background: var(--surface);
  border-bottom: 1px solid var(--border); font: var(--type-mono-sm); color: var(--text-muted); white-space: nowrap; }
.vc-filebar__path { color: var(--text); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vc-status-word { padding: 0 6px; border: 1px solid var(--border-control); border-radius: var(--radius-sm); font: var(--type-label); color: var(--text-muted); }
.vc-add { color: var(--diff-add-mark); } .vc-del { color: var(--diff-del-mark); }

/* Detail panel. */
.vc-detail { grid-area: detail; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--border); }
.vc-detail__head { padding: var(--space-3) var(--space-4) var(--space-2); display: grid; gap: var(--space-1); }
.vc-detail__title { margin: 0; font: var(--type-h3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-detail__meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; font: var(--type-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vc-detail__body { flex: 1; min-height: 0; overflow: auto; padding: var(--space-3) var(--space-4); display: grid; align-content: start; gap: var(--space-4); }
/* Tabs: underline, count in mono muted. */
.vc-tabs { display: flex; gap: var(--space-4); padding: 0 var(--space-4); border-bottom: 1px solid var(--border); }
.vc-tab { position: relative; height: 38px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0;
  font: var(--type-ui-strong); color: var(--text-muted); cursor: pointer; }
.vc-tab:hover { color: var(--text); }
.vc-tab[aria-selected="true"] { color: var(--text); }
.vc-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.vc-tab__n { font: var(--type-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* Count badge: one look for every count on a tab or an icon button. A 16 px pill in Geist Mono (mono-sm), neutral
   (surface-raised, text-muted); --danger only for a count that needs attention (high-risk operations). 1–99, then
   "99+"; at 0 nothing renders. --dot says "there is something here" without a number. Inline after a label, or
   --corner: at the icon button's top-right inside its bounds (never over a neighbour), cut out of the icon by a ring in
   --vc-count-ring (the button's background).
   <span class="vc-count" aria-hidden="true">2</span>  <span class="vc-count vc-count--danger vc-count--corner">4</span> */
.vc-count { display: inline-grid; place-items: center; box-sizing: border-box; flex: none; min-width: 16px; height: 16px; padding: 0 var(--space-1);
  border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--text-muted); font: var(--type-meta); line-height: 16px;
  font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 0 0 2px var(--vc-count-ring, transparent); pointer-events: none; }
.vc-count--danger { color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger), 0 0 0 2px var(--vc-count-ring, transparent); }
.vc-count--dot { min-width: 0; width: 8px; height: 8px; padding: 0; background: var(--text-muted); }
.vc-count--corner { position: absolute; top: 2px; right: 2px; }
.vc-count--dot.vc-count--corner { top: 5px; right: 5px; }
/* Segmented control. */
.vc-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px; border: 1px solid var(--border-control); border-radius: var(--radius-pill); }
.vc-seg button { height: 26px; border: 0; border-radius: var(--radius-pill); background: none; color: var(--text-muted); font: var(--type-body-sm); cursor: pointer; white-space: nowrap; }
.vc-seg button[aria-pressed="true"] { background: var(--surface-raised); color: var(--text); font: var(--type-ui-strong); }
/* Section heading inside a panel: label style + count + optional action. */
.vc-section { display: grid; gap: var(--space-2); }
.vc-section__head { display: flex; align-items: center; gap: var(--space-2); font: var(--type-label); color: var(--text-muted); }
.vc-section__head .sp { flex: 1; }
.vc-link { border: 0; background: none; padding: 0; font: var(--type-body-sm); color: var(--brand); cursor: pointer; text-transform: none; letter-spacing: 0; }
.vc-link:hover { text-decoration: underline; text-underline-offset: 2px; }
/* Commit row 28 px: short id · subject · +/− · time. */
.vc-commit { display: grid; grid-template-columns: 7ch minmax(0, 1fr) auto 5ch; align-items: center; gap: var(--space-2); min-height: 28px;
  padding: 0 var(--space-2); border-radius: var(--radius-md); font: var(--type-body-sm); color: var(--text); }
.vc-commit:hover { background: var(--surface-raised); }
.vc-commit--selected { background: var(--brand-tint); }
.vc-commit__id { font: var(--type-mono-sm); color: var(--text-muted); }
.vc-commit__time, .vc-commit__n { font: var(--type-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vc-commit__subj { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pager — under a list that shows a page of rows (as many as fit): "‹  1–18 of 279  ›". Two ghost icon buttons and the
   range in tabular figures; the ends are aria-disabled, so the focus stays on the button. Never "Show all", never a
   scroller inside the list. Markup: <div class="vc-pager" role="group" aria-label="Pages of …"><button class="vc-btn
   vc-btn--ghost vc-btn--sm vc-pager__btn" aria-label="Previous page">‹</button><span class="vc-pager__range">1–18 of
   279</span><button … aria-label="Next page">›</button></div> */
.vc-pager { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.vc-pager .vc-pager__btn { width: 28px; padding: 0; justify-content: center; }
.vc-pager__range { font: var(--type-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* =====================================================================================================================
   Web surfaces — app.vibecorral.com, admin.vibecorral.com and the account pages of auth. (ADR-0054 §6, plan 2026-11-02)
   One product, one look: the client and admin pages are built like Settings in the desktop app — a page list on the left
   in groups, one page on the right, rows divided by hairlines, the control right at a fixed width. The auth pages look
   like the website: a header with the lockup, a card on `surface` with `radius-xl`, a footer. Content takes the whole
   width of its container (owner's rule: no reading measure, no half-empty pages); the container is 1200 px like the web.
   No glow here (`shadow-glow` is the website's); a card has a border, not a shadow. Reference: examples/WebShell.html.
   ===================================================================================================================== */

/* Logo lockup — the files are used as they are (design/logo/README.md): the dark one on dark themes, the light one on
   the light theme. Markup: <span class="vc-logo"><img class="vc-logo__dark" src="…/vibecorral-logo-dark.svg" alt="VibeCorral">
   <img class="vc-logo__light" src="…/vibecorral-logo-light.svg" alt="" aria-hidden="true"></span> */
.vc-logo { display: inline-flex; align-items: center; }
.vc-logo img { display: block; height: 28px; width: auto; }
.vc-logo .vc-logo__light { display: none; }
[data-theme="light"] .vc-logo .vc-logo__dark { display: none; }
[data-theme="light"] .vc-logo .vc-logo__light { display: block; }

/* Text input and select — the desktop's app-input look: input-bg, control border, md radius, focus ring.
   Markup: <input class="vc-input" type="text"> · <select class="vc-input">. Invalid: aria-invalid="true" (border danger;
   the message under it says it in words, see vc-field). */
.vc-input { box-sizing: border-box; width: 100%; min-width: 0; height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-md);
  border: 1px solid var(--border-control); background: var(--input-bg); color: var(--text); font: var(--type-body-sm); }
.vc-input::placeholder { color: var(--text-muted); }
select.vc-input { padding-right: var(--space-2); }
.vc-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.vc-input[aria-invalid="true"] { border-color: var(--danger); }
.vc-input:disabled { opacity: .45; cursor: not-allowed; }

/* Field — label above, control, hint under it, and an error that is a shape plus words (never red alone).
   Markup: <div class="vc-field"><label class="vc-field__label" for="e">E-mail</label><input id="e" class="vc-input">
   <p class="vc-field__hint" id="e-hint">We never share it.</p><p class="vc-field__error" id="e-err" role="alert">Enter a valid address.</p></div> */
.vc-field { display: grid; gap: var(--space-1); min-width: 0; }
.vc-field__label { font: var(--type-ui-strong); color: var(--text); }
.vc-field__hint { margin: 0; font: var(--type-meta); color: var(--text-muted); }
.vc-field__error { margin: 0; display: flex; gap: var(--space-1); font: var(--type-meta); color: var(--danger); }
.vc-field__error::before { content: "✕"; content: "✕" / ""; flex: none; font-size: 10px; line-height: 16px; }

/* Card — a framed group on `surface`. Border, no shadow (a shadow is the website's). `--xl` is the auth form's card. */
.vc-card { display: grid; gap: var(--space-4); padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.vc-card--xl { padding: var(--space-6); border-radius: var(--radius-xl); }

/* Plan cards — the plans side by side on the account's Plan page, the same order and words as the website's pricing
   page. The chosen card gets the brand edge, never a glow or a tint. Markup: <section class="vc-plans-sec"> with a head
   (title + period switch), <ul class="vc-plans"> of <li class="vc-plan">, then the order card (.vc-card.vc-order). */
.vc-plans-sec { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.vc-plans-sec__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.vc-plans-sec__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.vc-plans-sec__controls .vc-seg { min-width: 200px; }
.vc-plans-sec__controls select { width: auto; }
.vc-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: var(--space-3); row-gap: 0; margin: 0; padding: 0; list-style: none; }
/* Five rows shared by the cards (subgrid), so prices, notes and the lists start at the same height in every card. */
.vc-plan { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: var(--space-3); margin-bottom: var(--space-3); padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.vc-plan--choosable { cursor: pointer; }
.vc-plan--choosable:hover { border-color: var(--border-control); }
.vc-plan--chosen, .vc-plan--chosen:hover { border-color: var(--brand); }
.vc-plan:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.vc-plan__pick { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.vc-plan__pick input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.vc-plan__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 22px; }
.vc-plan__name { margin: 0; font: var(--type-ui-strong); font-size: 15px; }
.vc-plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin: 0; }
.vc-plan__amount { font: var(--type-h1); font-variant-numeric: tabular-nums; color: var(--text); }
/* The regular price, struck, before the price a coupon lowers it to. Markup: <p class="vc-plan__price"><s class="vc-plan__was"
   aria-hidden="true">$12</s><span class="vc-plan__amount">$6</span><span class="vc-plan__per">per month</span></p>; the
   card's billing note says the regular price in words. */
.vc-plan__was { font: var(--type-h3); font-variant-numeric: tabular-nums; color: var(--text-muted); }
.vc-plan__per { font: var(--type-body-sm); color: var(--text-muted); }
.vc-plan__note, .vc-plan__billing { margin: 0; font: var(--type-body-sm); color: var(--text-muted); }
.vc-plan__includes { display: grid; align-content: start; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.vc-plan__lead { margin: 0; font: var(--type-label); color: var(--text-muted); }
.vc-plan__features { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; font: var(--type-body-sm); color: var(--text); }
.vc-plan__features li { position: relative; padding-left: 18px; text-wrap: pretty; }
.vc-plan__features li::before { content: "✓"; content: "✓" / ""; position: absolute; left: 0; color: var(--brand); }
.vc-order { gap: var(--space-3); }
.vc-order__line { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: var(--space-3); }
.vc-order__what { margin: 0 0 2px; font: var(--type-ui-strong); }
.vc-order__price { margin: 0; font: var(--type-h3); font-variant-numeric: tabular-nums; }
.vc-order__price s { margin-right: var(--space-2); font: var(--type-body-sm); color: var(--text-muted); }
.vc-order__coupon { display: flex; gap: var(--space-2); }
.vc-order__coupon .vc-input { flex: 1 1 auto; max-width: 320px; }
.vc-order__pay { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.vc-order__details { display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.vc-order__details .vc-set__help { margin: 0; }
/* What the click on the button confirms (who takes the payment, the renewal, the age and the terms): a paragraph of its own right above the button, as wide as the card. */
.vc-order__legal { margin: 0; }
@media (max-width: 560px) { .vc-order__pay .vc-btn { width: 100%; } .vc-order__coupon .vc-input { max-width: none; } }

/* Notice — a short message in a frame. The state is a shape and a word first, colour second (Pravidla klidu): the title
   starts with the shape (✓ ok · ○ warn · ✕ danger · ● info). Markup: <div class="vc-notice vc-notice--danger" role="alert">
   <p class="vc-notice__title">Not allowed</p><p class="vc-notice__text">…</p></div>
   An action (Retry) goes in <div class="vc-notice__actions"> after the text. */
.vc-notice { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-4); border: 1px solid var(--border-control); border-radius: var(--radius-md); }
.vc-notice__title { margin: 0; display: flex; align-items: center; gap: var(--space-2); font: var(--type-ui-strong); color: var(--text); }
.vc-notice__title::before { content: "●"; content: "●" / ""; font-size: 8px; line-height: 1; color: var(--text-muted); }
.vc-notice__text { margin: 0; font: var(--type-body-sm); color: var(--text-muted); }
.vc-notice__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
.vc-notice--warn { border-color: var(--warn); }
.vc-notice--warn .vc-notice__title::before { content: "○"; content: "○" / ""; font-size: 10px; color: var(--warn); }
.vc-notice--danger { border-color: var(--danger); }
.vc-notice--danger .vc-notice__title::before { content: "✕"; content: "✕" / ""; font-size: 10px; color: var(--danger); }
.vc-notice--ok .vc-notice__title::before { content: "✓"; content: "✓" / ""; font-size: 11px; color: var(--brand); }

/* Page frame of a web surface: header, body, footer; the inner box is 1200 px and centred. */
.vc-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; background: var(--bg); color: var(--text); font: var(--type-body-sm); }
.vc-shell__inner { box-sizing: border-box; width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--space-5); }
.vc-shell__bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.vc-shell__bar .vc-shell__inner { display: flex; align-items: center; gap: var(--space-3); min-height: var(--space-7); }
.vc-shell__sp { flex: 1; }
.vc-shell__user { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--type-body-sm); color: var(--text-muted); }
.vc-shell__body { min-height: 0; }
.vc-shell__body > .vc-shell__inner, .vc-shell__body .vc-set { height: 100%; }
.vc-shell__foot { border-top: 1px solid var(--border); }
/* The footer wraps on a narrow page: the padding keeps its rows off the hairline and the page's edge, and under 560 px,
   where they no longer fit one row, the spacer breaks it, so the links stay together on a row of their own. A link is
   24 px high for a finger. */
.vc-shell__foot .vc-shell__inner { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); min-height: var(--space-7); padding-block: var(--space-2);
  font: var(--type-meta); color: var(--text-muted); }
.vc-shell__foot a { display: inline-flex; align-items: center; min-height: var(--space-5); color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 560px) { .vc-shell__foot .vc-shell__sp { flex-basis: 100%; height: 0; } }
.vc-shell__foot label { display: inline-flex; align-items: center; gap: var(--space-2); }
/* Who runs the service (web/shared operator.tsx): the last row of the footer, in the footer's own type and colour. */
.vc-shell__foot .vc-shell__operator { flex-basis: 100%; margin: 0; text-wrap: pretty; overflow-wrap: anywhere; }
.vc-shell__foot .vc-input { width: auto; height: 28px; font: var(--type-meta); }
/* The support view (ADR-0054 §8): a bar above the header while an administrator views one customer's account
   read-only. The word says it ("Viewing as"), the warn ring only helps; Exit is the way out. */
.vc-shell__view { border-bottom: 1px solid var(--warn); background: var(--surface-raised); }
.vc-shell__view .vc-shell__inner { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); min-height: var(--space-7); font: var(--type-body-sm); color: var(--text); }
.vc-shell__view .vc-shell__inner::before { content: "○"; content: "○" / ""; font-size: 10px; line-height: 1; color: var(--warn); }
.vc-shell__view-email { min-width: 0; overflow-wrap: anywhere; font: var(--type-ui-strong); }
.vc-shell__view-sep { color: var(--text-muted); }

/* Sign-in gate — one centred card with a button (a CTA may stand narrow; text and tables never do). */
.vc-gate { box-sizing: border-box; width: 100%; max-width: 440px; margin: var(--space-8) auto; padding: var(--space-6); display: grid; gap: var(--space-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.vc-gate__title { margin: 0; font: var(--type-h2); }
.vc-gate__text { margin: 0; font: var(--type-body); color: var(--text-muted); text-wrap: pretty; overflow-wrap: anywhere; }
.vc-gate .vc-btn { justify-self: start; text-decoration: none; }
/* Stacked choices ("Continue with GitHub" / "Continue with Google") take the width of the card, so they line up. */
.vc-gate .vc-btn--block { justify-self: stretch; justify-content: center; }
/* A card that stands straight in the page's body (outside vc-shell__inner) keeps the gutter of the header and the footer. */
.vc-shell__body > .vc-gate { width: calc(100% - 2 * var(--space-5)); }

/* Settings-like pages: a page list (216 px, groups with a label) and one page. Rows are label + help left, the control
   right at 240 px, divided by hairlines — no tiles, no boxes (Pravidla klidu 5). The page is as wide as its container.
   Markup: <div class="vc-set"><nav class="vc-set__nav" aria-label="Pages"><div class="vc-set__group"><p class="vc-set__label">Account</p>
   <a class="vc-set__link" href="/" aria-current="page">Overview</a></div></nav><main class="vc-set__content"><div class="vc-set__page">
   <h1 class="vc-set__title">Overview</h1><p class="vc-set__intro">…</p><div class="vc-set__rows"><div class="vc-set__row">
   <div class="vc-set__lbl"><span class="vc-set__name">E-mail</span><span class="vc-set__help">…</span></div>
   <div class="vc-set__ctl">…</div></div></div></div></main></div> */
.vc-set { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 0; }
.vc-set__nav { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5) var(--space-3) var(--space-6) 0; border-right: 1px solid var(--border); }
@media (max-width: 720px) { .vc-set { grid-template-columns: minmax(0, 1fr); } .vc-set__nav { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--border); } }
.vc-set__group { display: grid; gap: var(--space-1); }
.vc-set__label { margin: 0; padding: 0 var(--space-2); font: var(--type-label); color: var(--text-muted); }
.vc-set__link { display: flex; align-items: center; min-height: 32px; padding: 0 var(--space-2); border-radius: var(--radius-md); color: var(--text-muted);
  font: var(--type-body-sm); text-decoration: none; }
.vc-set__link:hover { background: var(--surface-raised); color: var(--text); }
.vc-set__link[aria-current="page"] { background: var(--surface-raised); color: var(--text); font: var(--type-ui-strong); }
.vc-set__link:focus-visible { outline-offset: -2px; }
.vc-set__content { min-width: 0; padding: var(--space-5) 0 var(--space-8) var(--space-6); }
@media (max-width: 720px) { .vc-set__content { padding-left: 0; } }
.vc-set__page { display: grid; gap: var(--space-2); min-width: 0; }
.vc-set__title { margin: 0; font: var(--type-h3); }
/* Page header with actions — the title left, the page's actions right: the link that opens a form screen ("New coupon") is
   a vc-btn, at most one of them primary (Pravidla klidu 3). A page without actions has no header box, only the title.
   Markup: <div class="vc-set__head"><h1 class="vc-set__title">Coupons</h1><div class="vc-set__actions">
   <a class="vc-btn vc-btn--primary" href="/coupons/new">New coupon</a></div></div> */
.vc-set__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); min-width: 0; }
.vc-set__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.vc-set__intro { margin: 0; font: var(--type-body-sm); color: var(--text-muted); }
.vc-set__rows { display: grid; }
.vc-set__row { display: grid; grid-template-columns: minmax(0, 1fr) var(--set-ctl-w, 240px); align-items: start; column-gap: var(--space-5); min-width: 0;
  padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.vc-set__rows > .vc-set__row:last-child { border-bottom: 0; }
@media (max-width: 720px) { .vc-set__row { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-2); } }
.vc-set__lbl { display: grid; gap: 2px; min-width: 0; align-content: start; }
.vc-set__name { font: var(--type-body-sm); color: var(--text); padding-top: 6px; }
.vc-set__help { font: var(--type-body-sm); color: var(--text-muted); }
.vc-set__ctl { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-2); min-height: 32px; min-width: 0; }
.vc-set__ctl .vc-input { height: 32px; }
.vc-set__value { font: var(--type-body-sm); color: var(--text); text-align: right; overflow-wrap: anywhere; }
.vc-set__value--mono { font: var(--type-mono-sm); }
/* An ID is quoted and copied whole: its row gives the control the width of the ID, so it stays on one line while there is room. */
.vc-set__row:has(> .vc-set__ctl > [data-mono="id"]) { --set-ctl-w: auto; }
/* A row of the web shell that asks a second time (a button that does it and one that takes it back, such as
   "Confirm and pay $130.68" and "Stay monthly"): two buttons do not fit the fixed column and would lie over the text, so
   the control takes the width they need and the text wraps beside it. The desktop Settings keep their column. */
.vc-shell .vc-set__row:has(> .vc-set__ctl > .vc-btn + .vc-btn) { --set-ctl-w: auto; }
/* A narrow web page (the desktop app's Settings keeps its column): the page list is a few wrapped rows of links, not a
   column that fills the first screen, and a row's value or button starts at the left, under the text it belongs to.
   The list keeps its own height; the page under it takes what a short page leaves. */
@media (max-width: 720px) {
  .vc-shell .vc-set { grid-template-rows: auto 1fr; }
  .vc-shell .vc-set__nav { flex-direction: row; flex-wrap: wrap; gap: var(--space-2) var(--space-5); padding: var(--space-3) 0; }
  .vc-shell .vc-set__group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
  .vc-shell .vc-set__label { flex-basis: 100%; }
  .vc-shell .vc-set__ctl { justify-content: flex-start; }
  .vc-shell .vc-set__value { text-align: left; }
}
/* A card of the web shell that holds one row (the client zone's "Get the app"): the card's own padding is the space
   around it, so the row adds none and the space above and below it is equal. On a narrow page the row's button is the
   card's one action and takes the width. The desktop Settings keep their look (no .vc-shell there). */
.vc-shell .vc-card > .vc-set__rows > .vc-set__row:only-child { padding-block: 0; }
/* A notice right above such a card (the welcome of a website purchase above "Get the app"): two frames do not touch. */
.vc-shell .vc-set__rows > .vc-notice + .vc-card { margin-top: var(--space-3); }
@media (max-width: 720px) { .vc-shell .vc-card .vc-set__ctl .vc-btn { width: 100%; justify-content: center; } }

/* Table — a list of records (admin users, licences, devices). Hairlines between rows, a `label` header in text-muted, numbers
   in tabular figures, a hover row on `surface-raised`. Wrap it in vc-table-wrap so a narrow window scrolls the table, not the page.
   Markup: <div class="vc-table-wrap"><table class="vc-table"><caption class="vc-table__cap">Users</caption><thead><tr><th scope="col">E-mail</th>
   <th scope="col" class="vc-table__num">Devices</th></tr></thead><tbody><tr><td>ada@example.com</td><td class="vc-table__num">2</td></tr></tbody></table></div> */
.vc-table-wrap { overflow-x: auto; }
.vc-table { width: 100%; border-collapse: collapse; font: var(--type-body-sm); }
.vc-table__cap { padding: 0 0 var(--space-2); text-align: left; font: var(--type-label); color: var(--text-muted); }
.vc-table th { padding: var(--space-2) var(--space-3); text-align: left; font: var(--type-label); color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.vc-table td { padding: var(--space-3); border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.vc-table tbody tr:last-child td { border-bottom: 0; }
.vc-table tbody tr:hover td { background: var(--surface-raised); }
.vc-table th.vc-table__num, .vc-table td.vc-table__num { text-align: right; font-variant-numeric: tabular-nums; }
.vc-table td.vc-table__empty { padding: var(--space-5) var(--space-3); color: var(--text-muted); }
/* A cell that holds more than its value: the value, the one action that belongs to that row and a line about it, one under
   the other and left-aligned (a payment's "Withdraw from contract"). It sits in an early column, so a narrow window shows
   the action without scrolling the table.
   Markup: <td><div class="vc-table__stack"><span>Pro, monthly</span><button class="vc-btn vc-btn--secondary vc-btn--sm">Withdraw from contract</button>
   <span class="vc-set__help">Opens Paddle's customer portal…</span></div></td> */
.vc-table__stack { display: grid; justify-items: start; gap: var(--space-1); }

/* Severity of a risky operation (the team audit) — a chip with three bars and the word, coloured as the app's Risky
   operations tab: the edge and the bars in danger for high, in warn for medium; the word stays (shape + word, never colour alone).
   Markup: <span class="vc-chip vc-sev vc-sev--high"><svg aria-hidden="true">…bars in currentColor…</svg> High</span> */
.vc-sev--high { border-color: var(--danger); }
.vc-sev--high svg { color: var(--danger); }
.vc-sev--medium { border-color: var(--warn); }
.vc-sev--medium svg { color: var(--warn); }

/* Link in running text — brand colour, underlined (the colour alone is not enough). Navigation links are not this: they are rows (vc-set__link, vc-navrow). */
.vc-link { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.vc-link:hover { color: var(--text); }

/* Section of a Settings page — a group of rows or a table under its own heading, set apart by space (Pravidla klidu 5), not by a line.
   Markup: <section class="vc-set__section" aria-labelledby="h"><h2 class="vc-set__section-title" id="h">Grant a licence</h2><div class="vc-set__rows">…rows…</div></section>
   A table brings its own heading (vc-table__cap), so a section that holds only a table has no vc-set__section-title. */
.vc-set__section { display: grid; gap: var(--space-2); margin-top: var(--space-5); min-width: 0; }
.vc-set__section-title { margin: 0; font: var(--type-label); color: var(--text-muted); }
/* Tabs of a page — a long detail page split into tabs (vc-tabs, owner 2026-11-11: "nikdo nema rad tyhle dlouhy srajdy").
   The tab list runs flush with the rows below it and is set apart from the header by space; the panel holds rows and
   sections like vc-set__rows, and its first section needs no extra space, the tab list already separates it.
   Markup: <div class="vc-tabs vc-tabs--page" role="tablist">…vc-tab…</div><div class="vc-tabpanel" role="tabpanel">…rows…</div> */
.vc-tabs--page { padding: 0; margin-top: var(--space-4); }
.vc-tabpanel { display: grid; min-width: 0; }
.vc-tabpanel > .vc-set__row:last-child { border-bottom: 0; }
.vc-tabpanel > .vc-set__section:first-child { margin-top: var(--space-3); }
