/* AI-Control Plástev — the HUD in live mode (hud-live.js). aic-server loads it after hud.css, on its own pages only.
   Every rule hangs on .aic-hud.is-live, which hud-live.js sets once AIC.data.capabilities.live is true, so a ?mock=1
   page served by aic-server still looks like the prototype. Tokens: index.html :root and the .aic-hud inks (hud.css). */

/* ── What live data can't do (hud-live.js also sets [hidden] on the controls hud.js never re-renders) ── */
.aic-hud.is-live .hud-badge,
.aic-hud.is-live .hud-pop-restore,
.aic-hud.is-live .chat-stop,
.aic-hud.is-live.hl-no-sim #hud-sim,
.aic-hud.is-live.hl-no-send .chat-composer,
.aic-hud.is-live.hl-no-send .chat-hint,
.aic-hud.is-live.hl-no-send .attn-hint,
.aic-hud.is-live.hl-no-answer .attn-actions { display: none; }
/* Zastavit moved down to .hl-chat: without agents or typing the chat bar would be an empty strip */
.aic-hud.is-live .chat-bar:not(:has(.chat-status > *)) { display: none; }

/* ── State pill: background work (decision A, 2026-09-14) ── background_tasks / an agent still running once the
   main turn ended: the pill keeps its own state (working while the cell stays busy on it, needs_input when a
   question or an away-mode hold takes priority) with the count set off by a divider, so it never reads as the pill's
   own state. */
.aic-hud.is-live .hud-pill__bg { padding-left: 6px; border-left: 1px solid color-mix(in srgb, var(--st) 45%, var(--paper)); color: var(--ink-soft); font-weight: 600; }

/* ── CHAT footer: where to answer, Zastavit, Otevřít v claude.ai ── */
.hl-chat { flex: none; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.chat-attn:not([hidden]) ~ .hl-chat { border-top: 0; padding-top: 0; }
.hl-chat-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: var(--step--1); line-height: 1.4; color: var(--ink-soft); text-wrap: pretty; }
.hl-chat-note-ic { flex: none; padding-top: 1px; }
.hl-chat-note-ic .ic { width: 16px; height: 16px; }
.hl-chat-note.is-attn { color: var(--ink); font-weight: 500; }
.hl-chat-note.is-attn .ic { color: var(--attn-ink); }
.hl-chat-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hl-chat-actions .hud-btn { text-decoration: none; }
.hl-chat-note[hidden] + .hl-chat-actions { margin-top: 0; }
.hl-stop-ic { display: contents; }
.hl-stop[aria-disabled="true"] { opacity: 0.6; cursor: default; }
.hl-stop[aria-disabled="true"]:hover { background: var(--paper); border-color: var(--line); }
.hl-stop[aria-disabled="true"]:active { transform: none; }
.hl-stop[aria-busy="true"] .ic { animation: hud-spin 0.9s linear infinite; }
.hl-chat-status { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: var(--step--2); font-weight: 600; line-height: 1.4; color: var(--ink-soft); }
.hl-chat-status:not(:empty) { margin-top: 8px; }
.hl-chat-status .ic { flex: none; width: 14px; height: 14px; margin-top: 1px; }
.hl-chat-status.is-ok { color: var(--work-ink); }
.hl-chat-status.is-err { color: var(--warn-ink); }

/* ── §5.2 „ovládat konverzaci z claude.ai“: Anthropic's own Remote Control, per cell. „Ovládat v Claude“ (.is-own:
   the link really is this cell's conversation) sits in .hl-chat-actions with the rest; when there is no such link, one
   sentence says why, and for a machine whose Claude setting is off the one line that turns it on follows it. The
   instruction is only ever SHOWN — the portal never writes the owner's ~/.claude/settings.json. ── */
.hl-rc.is-own { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.hl-rc-why { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 8px 0 0; font-size: var(--step--2); line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.hl-rc-why[hidden] { display: none; }
.hl-rc-why-ic { flex: none; align-self: flex-start; padding-top: 2px; }
.hl-rc-why-ic .ic { width: 14px; height: 14px; }
.hl-rc-why-text { flex: 1 1 220px; min-width: 0; }
/* The one line to copy: monospace, selectable, and it may wrap on a phone rather than push the panel wide. */
.hl-rc-why-how { flex: 1 1 100%; min-width: 0; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-2); color: var(--ink); font: 500 0.95em/1.5 var(--font-mono); overflow-wrap: anywhere; user-select: all; }
.hl-rc-why-how[hidden] { display: none; }

/* ── §13 „Napsat robotem“: the one CHAT control that reaches out and takes the user's keyboard ───────────────

   Everything in here is styled to be read BEFORE it is clicked, which is the opposite of the rest of the footer:
   - the promise is a full paragraph inside the panel, warn-tinted, not a hint under a button;
   - „Pozastavit robota na tomto PC“ is warn-coloured and sits at the end of the row, because it is the brake, not an
     option — and on a phone it keeps a full-width line of its own, so the stop is never a mis-tap away from the start;
   - the state line is a status region: it changes under the user while the robot works, and stops at „nepotvrzeno“
     unless the transcript confirmed delivery.
   ── */
.hl-robot { display: grid; gap: 8px; }
.hl-robot[hidden] { display: none; }
/* No button at all: the one sentence that says why, where the button would have been. */
.hl-robot-why { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; font-size: var(--step--2); line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.hl-robot-why[hidden] { display: none; }
.hl-robot-why-ic { flex: none; align-self: flex-start; padding-top: 2px; }
.hl-robot-why-ic .ic { width: 14px; height: 14px; }
/* Paused, no fuse, a failed self-test: not an „it is simply off“, but something the owner has to look at. */
.hl-robot-why.is-paused { color: var(--warn-ink); font-weight: 600; }
.hl-robot-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
/* The face is only the conversation, the composer and this row; "více" unfolds the rest (every .hl-more-item). A .hl-more-pin
   item (the robot is paused: the reason and the resume button) is never folded away. */
.hl-chat:not(.is-more) .hl-more-item:not(.hl-more-pin) { display: none; }
.hl-more-btn { margin-left: auto; color: var(--ink-soft); }
.hl-more-btn[hidden] { display: none; }
.hl-keys-help { margin: 8px 0 0; font-size: var(--step--2); line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.hl-keys-help[hidden] { display: none; }
.hl-robot-brake { display: flex; flex-wrap: wrap; gap: 8px; }
.hl-robot-brake[hidden] { display: none; }
.hl-robot-bar[hidden] { display: none; }
.hl-robot-open .ic, .hl-robot-resume .ic { color: var(--accent-strong); }
.hl-robot-open[aria-disabled="true"], .hl-robot-esc[aria-disabled="true"], .hl-robot-mode[aria-disabled="true"] { opacity: 0.65; cursor: progress; }
.hl-robot-esc, .hl-robot-mode { font-variant-numeric: tabular-nums; }
/* The kill switch. Pushed to the end of the row and warn-coloured; full width once the row wraps on a phone. */
.hl-robot-off { margin-left: auto; border-color: color-mix(in srgb, var(--warn) 55%, var(--paper)); color: var(--warn-ink); }
.hl-robot-off .ic { color: var(--warn-ink); }
.hl-robot-off:hover { background: color-mix(in srgb, var(--warn) 12%, var(--paper)); }
.hl-robot-panel {
  display: grid; gap: 6px; padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--paper)); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--warn) 7%, var(--paper));
}
.hl-robot-panel[hidden] { display: none; }
/* The title only names the group for screen readers (aria-labelledby): the promise below says it all, and the row of
   buttons above already says who is writing. */
.hl-robot-title { display: none; align-items: center; align-items: center; gap: 8px; margin: 0; font-size: var(--step--1); }
.hl-robot-title .ic { width: 16px; height: 16px; color: var(--warn-ink); }
/* The promise, in full. It is the reason this panel exists, so it gets a paragraph and not a tooltip. */
.hl-robot-promise { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: var(--step--2); line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.hl-robot-promise-ic { flex: none; padding-top: 2px; }
.hl-robot-promise-ic .ic { width: 14px; height: 14px; color: var(--warn-ink); }
.hl-robot-input {
  width: 100%; min-height: 60px; max-height: 40vh; padding: 8px 10px; resize: vertical;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
  color: var(--ink); font: inherit; font-size: var(--step--1); line-height: 1.5;
}
.hl-robot-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hl-robot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hl-robot-count { margin-left: auto; font-size: var(--step--2); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.hl-robot-count.is-over { color: var(--warn-ink); font-weight: 600; }
.hl-robot-send[disabled] { opacity: 0.55; cursor: not-allowed; }
/* The attempt's state. `wait` while the keys are being pressed, `done` only once the transcript confirmed it. */
.hl-robot-state { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: var(--step--2); line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.hl-robot-state[hidden] { display: none; }
.hl-robot-state .ic { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.hl-robot-state.is-wait { color: var(--ink); }
.hl-robot-state.is-wait .ic { color: var(--accent-strong); animation: hud-spin 1.1s linear infinite; }
.hl-robot-state.is-done, .hl-robot-state.is-ok { color: var(--ink); }
.hl-robot-state.is-err { color: var(--warn-ink); font-weight: 600; }
@media (max-width: 560px) {
  /* On a phone the brake gets its own line: the whole point of the kill switch is that it cannot be mis-tapped. */
  .hl-robot-off, .hl-robot-resume { flex: 1 1 100%; margin-left: 0; justify-content: center; }
  .hl-robot-promise { font-size: 11px; line-height: 1.4; }
  .hl-robot-input { min-height: 52px; }
}

/* ── A tombstoned thread cell (§3): read-only history, one honest note instead of the composer ── */
.hl-tomb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-size: var(--step--1); line-height: 1.4; color: var(--ink-soft); text-wrap: pretty; }
.hl-tomb-ic { flex: none; }
.hl-tomb-ic .ic { width: 16px; height: 16px; }
.hl-tomb-text { flex: 1 1 200px; min-width: 0; }
.hl-tomb-resume { flex: none; }

/* ── „Vytáhnout do vlastní plástve“: a quiet action under the target switcher, not a primary CHAT control ── */
.hl-promote { margin: -2px 12px 8px; }

/* ── INFO: where to answer a waiting prompt; how a removed project comes back ── */
.aic-hud.is-live .info-attn-text .hl-attn-where { display: block; margin-top: 3px; color: var(--ink); font-weight: 500; }

/* ── "Přidat projekt": register a folder on the server PC ── */
.hl-add .modal-foot { flex-wrap: wrap; align-items: center; }
.hl-form-err { flex: 1 1 100%; display: flex; align-items: flex-start; gap: 6px; margin: 0 0 2px; font-size: var(--step--2); font-weight: 600; line-height: 1.4; color: var(--warn-ink); }
.hl-form-err .ic { flex: none; width: 14px; height: 14px; margin-top: 1px; }
.hl-add .field-hint.is-known { color: var(--ink); font-weight: 600; }
.hl-add #add-submit[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
/* Registered: what happens next */
.hl-done-head {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--done) 55%, var(--paper)); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--done) 11%, var(--paper));
}
.hl-done-head > .ic { width: 22px; height: 22px; color: var(--done-ink); }
.hl-done-head p { margin: 0; font-size: var(--step--1); line-height: 1.45; text-wrap: pretty; }
.hl-done-head strong { display: block; margin-bottom: 2px; font-size: var(--step-0); overflow-wrap: anywhere; }
.hl-steps { display: grid; gap: 14px; margin: 0; padding: 0 0 0 1.4em; font-size: var(--step--1); line-height: 1.45; }
/* Grid tracks may shrink below the one-line command, so it scrolls in its box instead of widening the dialog. The form's
   body and the hooks box need it too: an auto track grows to the command's width and pushes the dialog past a phone screen. */
.hl-done .modal-body, .hl-add .modal-body, .hl-steps, .hl-hooks { grid-template-columns: minmax(0, 1fr); }
.aic-hud.is-live .hud-modal.hl-add, .hl-hooks, .hl-hooks > *, .hl-cmd, .hl-recent { min-width: 0; }
/* A folder the server PC doesn't have: calm, next to the done head */
.hl-done-warn { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; margin: 0; font-size: var(--step--1); line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.hl-done-warn .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--warn-ink); }
.hl-steps li::marker { font-weight: 700; color: var(--ink-soft); }
.hl-steps p { margin: 0; text-wrap: pretty; }
.hl-cmd { display: flex; align-items: stretch; gap: 6px; margin-top: 8px; }
/* The command is one line; it scrolls inside its own box, never the dialog */
.hl-cmd-code {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 9px 10px;
  overflow-x: auto; border-radius: var(--r-sm);
  background: var(--graphite); color: var(--paper);
  font: 400 var(--step--2)/1.5 var(--font-mono); white-space: pre;
}
.hl-cmd .hud-btn { height: auto; min-height: 36px; }
.hl-copy-note { display: block; min-height: 1.4em; margin-top: 4px; font-size: var(--step--2); color: var(--ink-soft); }

/* "Naposledy použité složky": folders where Claude Code ran lately, one click fills the form */
.hl-recent { display: grid; gap: 6px; min-width: 0; }
.hl-recent-note { margin: 0; font-size: var(--step--2); line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.hl-recent-list {
  display: grid; gap: 4px; margin: 0; padding: 0; list-style: none;
  max-height: 212px; overflow-y: auto; overscroll-behavior: contain;
}
.hl-recent-item {
  display: flex; align-items: center; gap: 2px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
}
.hl-recent-item:hover { border-color: var(--hover-line); background: var(--paper-2); }
.hl-recent-item:has(.hl-recent-pick[aria-pressed="true"]) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: color-mix(in srgb, var(--pick, var(--accent)) 10%, var(--paper)); }
.hl-recent-pick {
  flex: 1 1 auto; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; align-items: baseline;
  padding: 7px 4px 7px 10px; border: 0; border-radius: var(--r-sm);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.hl-recent-pick:focus-visible, .hl-recent-x:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.hl-recent-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--step--1); font-weight: 600; }
.hl-recent-when { font: 400 var(--step--2)/1.4 var(--font-mono); color: var(--ink-soft); white-space: nowrap; }
.hl-recent-path { grid-column: 1 / -1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 var(--step--2)/1.4 var(--font-mono); color: var(--ink-soft); }
.hl-recent-x { flex: none; margin-right: 4px; }
.hl-recent-x .ic { width: 14px; height: 14px; }

/* The one hint when the hooks are missing for every session: calm, no alarm colours */
.hl-hooks {
  display: grid; gap: 8px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper-2);
  font-size: var(--step--1); line-height: 1.45;
}
.hl-hooks p { margin: 0; text-wrap: pretty; }
.hl-hooks .hl-cmd { margin-top: 0; }
.hl-hooks .hl-copy-note { margin-top: -4px; }
.hl-hooks .hl-copy-note:empty { display: none; }
.hl-hooks-why { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; color: var(--ink); font-weight: 500; }
.hl-hooks-why .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--ink-soft); }
.hl-hooks-foot { font-size: var(--step--2); color: var(--ink-soft); }
.hl-done .hl-hooks { margin-top: 2px; }

/* ── „Připojit telefon“ (a viewer on this PC only): the office VPN, the portal's certificate, the login link ── */
/* Wide enough that the Settings paths beside a QR code take one or two lines, so all three steps fit 900 px */
.aic-hud.is-live .hud-modal.hl-pair { width: min(800px, 100%); }
.hl-pair:focus { outline: none; }   /* the dialog itself takes focus on open; its controls keep their rings */
.hl-pair .modal-body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.hl-pair code { padding: 1px 4px; border-radius: 4px; background: var(--paper-2); font: 400 0.8em/1.4 var(--font-mono); overflow-wrap: anywhere; }
.hl-pair-lead { margin: 0; font-size: var(--step--1); line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.hl-pair-status { margin: 0; padding: 32px 0; font-size: var(--step--1); color: var(--ink-soft); text-align: center; }
/* One calm box: HTTPS off, no address in the certificate, or why the server said no */
.hl-pair-msg {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper-2);
  font-size: var(--step--1); line-height: 1.5;
}
.hl-pair-msg > .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--ink-soft); }
.hl-pair-msg.is-err > .ic { color: var(--warn-ink); }
.hl-pair-msg p { margin: 0; text-wrap: pretty; }
.hl-pair-msg code { background: var(--paper); }
.hl-pair-msg .hud-btn { grid-column: 2; justify-self: start; }
.hl-pair-note { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; margin: 0; font-size: var(--step--1); line-height: 1.45; color: var(--ink-soft); }
.hl-pair-note .ic { width: 16px; height: 16px; margin-top: 2px; }

/* Three numbered steps; a step's QR code stands to the right of its text */
.hl-pair-steps { margin: 0; padding: 0; list-style: none; counter-reset: hl-step; }
.hl-pair-step { counter-increment: hl-step; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.hl-pair-step:first-child { padding-top: 4px; border-top: 0; }
.hl-pair-step:last-child { padding-bottom: 2px; }
.hl-pair-step::before {
  content: counter(hl-step); grid-row: 1 / span 2; align-self: start;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font: 700 var(--step--1)/1 var(--font-display);
}
.hl-pair-step-title { grid-column: 2; margin: 3px 0 8px; font: 600 var(--step-0)/1.3 var(--font-body); text-wrap: balance; }
.hl-pair-step-body { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; min-width: 0; }
.hl-pair-step-body.is-text { grid-template-columns: minmax(0, 1fr); }
.hl-pair-text { display: grid; gap: 10px; min-width: 0; font-size: var(--step--1); line-height: 1.5; }
.hl-pair-text p { margin: 0; text-wrap: pretty; }
.hl-pair-muted { color: var(--ink-soft); }
.hl-pair-link code { padding: 0; background: none; }
/* iPhone / Android: short numbered paths through Settings */
.hl-pair-os { display: grid; gap: 3px; padding: 9px 12px 10px; border-radius: var(--r-md); background: var(--paper-2); }
.hl-pair-os h4 { margin: 0; font: 600 var(--step--1)/1.35 var(--font-body); }
.hl-pair-os ol { display: grid; gap: 2px; margin: 0; padding-left: 1.3em; }
.hl-pair-os li { padding-left: 2px; text-wrap: pretty; }
.hl-pair-os li::marker { font-weight: 600; color: var(--ink-soft); }

/* Several addresses of this PC in the certificate: which one the phone reaches (the first by default) */
.hl-pair-ips { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.hl-pair-ips > legend { margin-bottom: 6px; }
.hl-pair-ip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.hl-pair-ip {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
  font: 500 0.78rem/1 var(--font-mono); cursor: pointer;
}
.hl-pair-ip::before { content: ''; box-sizing: border-box; width: 12px; height: 12px; border: 1.5px solid var(--hover-line); border-radius: 50%; background: var(--paper); }
.hl-pair-ip:hover { border-color: var(--hover-line); background: var(--paper-2); }
.hl-pair-ip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hl-pair-ip:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); font-weight: 600; }
.hl-pair-ip:has(input:checked)::before { border: 3.5px solid var(--accent); }
.hl-pair-ip:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

/* QR codes: always black modules on white with the quiet zone, whatever the surface around. Phones scan
   contrast, not the palette, so this white is deliberately not a theme token. */
.hl-qr { display: grid; justify-items: center; gap: 8px; width: 196px; margin: 0; }
.hl-qr-box {
  box-sizing: border-box; display: grid; place-items: center; width: 196px; height: 196px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: #fff;
}
.hl-qr-svg { display: block; }
.hl-qr-box.is-covered, .hl-qr-box.is-wait { border: 1px dashed var(--hover-line); background: var(--paper-2); color: var(--ink-soft); }
.hl-qr-ph { display: grid; justify-items: center; gap: 8px; padding: 0 18px; font-size: var(--step--2); font-weight: 600; line-height: 1.4; text-align: center; }
.hl-qr-ph .ic { width: 26px; height: 26px; }
.hl-qr figcaption { font-size: var(--step--2); font-weight: 600; color: var(--ink-soft); text-align: center; }

/* ── "Počítače" (multi-machine hive): the pairing code box and the machine list rows. ── */
.aic-hud.is-live .hud-modal.hl-mach { width: min(640px, 100%); }
.hl-mach:focus { outline: none; }
.hl-mach .modal-body { grid-template-columns: minmax(0, 1fr); gap: 22px; }
.hl-mach-add-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hl-mach-pairbox, .hl-mach-linkbox { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper-2); }
.hl-mach-code {
  justify-self: start; padding: 6px 14px; border-radius: var(--r-sm); background: var(--paper);
  font: 700 var(--step-2)/1.2 var(--font-mono); letter-spacing: 0.08em;
}
.hl-mach-left { margin: 0; font-size: var(--step--2); color: var(--ink-soft); }
.hl-mach-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hl-mach-name { flex: 1 1 160px; min-width: 0; }
.hl-mach-status {
  flex: none; padding: 2px 8px; border-radius: 999px; font-size: var(--step--2); font-weight: 600;
  background: var(--paper); color: var(--ink-soft);
}
.hl-mach-status.is-online { color: var(--work-ink); background: color-mix(in srgb, var(--work) 16%, var(--paper)); }
.hl-mach-status.is-offline { color: var(--off-ink); }
.hl-mach-status.is-unpaired { color: var(--ink-soft); font-style: italic; }
.hl-mach-status.is-revoked { color: var(--attn-ink); background: color-mix(in srgb, var(--attn) 16%, var(--paper)); }
.hl-mach-actions { display: flex; align-items: center; gap: 2px; }
.hl-mach-row .field-err { margin-top: 2px; }
/* A row whose agent channel is open right now: a quiet accent, not a loud one — the wording (in the row and
   in the confirm dialogs) already carries the actual warning. */
.hl-mach-row.is-online-row { box-shadow: inset 3px 0 0 var(--work); }
.hl-mach-self-note { margin: 2px 0 0; font-size: var(--step--2); color: var(--ink-soft); text-wrap: pretty; }
/* „Smazat natrvalo“: the one icon button in this panel that actually destroys something, so it borrows the
   existing „needs you“ attention colour instead of the neutral icon-button ink every other action here uses. */
.hl-mach-actions .hud-icon-btn.is-attn { color: var(--warn-ink); }
.hl-mach-actions .hud-icon-btn.is-attn:hover { background: color-mix(in srgb, var(--attn) 18%, var(--paper)); border-color: color-mix(in srgb, var(--attn) 55%, var(--paper)); color: var(--warn-ink); }
/* The delete type-to-confirm panel: spans the row's full width below the name/status/actions grid. */
.hl-mach-confirm {
  grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 8px; padding: 12px;
  border: 1px solid color-mix(in srgb, var(--attn) 55%, var(--paper)); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--attn) 10%, var(--paper));
}
.hl-mach-confirm p { margin: 0; font-size: var(--step--1); line-height: 1.4; text-wrap: pretty; }
.hl-mach-confirm-label { font-size: var(--step--2); font-weight: 600; }
.hl-mach-confirm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hl-mach-confirm-row .input { flex: 1 1 160px; min-width: 0; }
/* A finished delete whose data folder wouldn't go: shown once at the top of "Počítače", since the row it was
   about is already gone by the time this can be seen. */
.hl-mach-note {
  display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2);
  font-size: var(--step--1); line-height: 1.4;
}
.hl-mach-note > .ic { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--warn-ink); }
.hl-mach-note > span { flex: 1 1 auto; text-wrap: pretty; }
.hl-mach-note > .hud-icon-btn { flex: none; }
@media (max-width: 640px) {
  .hl-mach-confirm-row { flex-direction: column; align-items: stretch; }
}
/* The login code carries the token: said plainly, next to it */
.hl-pair-warn {
  display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start;
  padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--attn) 55%, var(--paper)); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--attn) 12%, var(--paper));
}
.hl-pair-warn .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--warn-ink); }
.hl-pair-warn strong { font-weight: 600; }
.hl-pair-reveal { justify-self: start; }
.hl-qr .hl-pair-reveal { justify-self: center; }
/* The login link wraps inside its box (it is long), one click selects all of it */
.hl-pair-url { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.hl-pair .hl-pair-url-text, .hl-mach .hl-pair-url-text {
  flex: 1 1 auto; min-width: 0; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2);
  font: 400 0.75rem/1.45 var(--font-mono); overflow-wrap: anywhere; user-select: all;
}
.hl-pair-url .hud-btn { flex: none; }
.hl-pair .hl-copy-note, .hl-mach .hl-copy-note { margin-top: -6px; }
.hl-pair .hl-copy-note:empty, .hl-mach .hl-copy-note:empty { display: none; }
.hl-pair-exp { font-size: var(--step--2); color: var(--ink-soft); }
.hl-pair-exp.is-soon, .hl-pair-exp.is-bad { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 6px; align-items: start; color: var(--ink); font-weight: 500; }
.hl-pair-exp .ic { width: 14px; height: 14px; margin-top: 2px; color: var(--warn-ink); }
@media (max-width: 640px) {
  .hl-pair-step-body { grid-template-columns: minmax(0, 1fr); }
  .hl-qr { justify-self: center; }
  .hl-pair-url { flex-direction: column; }
}

/* ── Drawer header: the pencil (Upravit) left of Zavřít; the away badge next to the state ── */
.aic-hud.is-live .dr-head { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.aic-hud.is-live .dr-edit { margin: -4px -10px 0 0; }
.aic-hud.is-live .dr-state { flex-wrap: wrap; row-gap: 6px; }
.aic-hud.is-live .dr-away {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 7px 0 5px; box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--paper)); border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--accent) 12%, var(--paper)); color: var(--accent-strong);
  font: 600 var(--step--2)/1 var(--font-body); white-space: nowrap;
}
.aic-hud.is-live .dr-away .ic { width: 14px; height: 14px; }
.dr-away-note { margin-left: 2px; font-weight: 500; opacity: 0.85; }

/* ── One Claude Code thread = one plástev (§9/§10): the breadcrumb back to the project, the seat/sid line, the
   sibling-count odznak on the home cell, and the „ended“ tag a tombstoned thread wears next to its state pill. ── */
.dr-parent-link {
  display: block; margin: 0 0 2px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 var(--step--2)/1.3 var(--font-body); color: var(--ink-soft); text-align: left;
}
.dr-parent-link:hover, .dr-parent-link:focus-visible { color: var(--accent-strong); }
.dr-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dr-threads-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 7px; box-sizing: border-box; border-radius: var(--r-sm);
  background: var(--paper-2); color: var(--ink-soft); font: 600 var(--step--2)/1 var(--font-body); white-space: nowrap;
}
.dr-threads-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--attn-ink); }
.dr-seat { font-family: var(--font-mono); }
.dr-tombstone-tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 7px 0 5px; box-sizing: border-box; border-radius: var(--r-sm);
  background: var(--paper-2); color: var(--ink-soft); font: 600 var(--step--2)/1 var(--font-body); white-space: nowrap;
}
.dr-tombstone-tag .ic { width: 14px; height: 14px; }

/* ── INFO overview (live data only): agents with their current step, recent steps, touched files ── */
.aic-hud.is-live .task-since { margin-top: 6px; font-family: var(--font-mono); }
.aic-hud.is-live .task-since + .task-note { margin-top: 2px; }
.aic-hud.is-live .agent-live { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
.aic-hud.is-live .agent-live .agent-type { margin-top: 1px; }
.aic-hud.is-live .agent-main { display: grid; gap: 3px; min-width: 0; }
.aic-hud.is-live .agent-main .agent-task { overflow-wrap: anywhere; }
.aic-hud.is-live .agent-task code, .aic-hud.is-live .step-text code {
  padding: 1px 4px; border-radius: 4px; background: var(--paper-2); font: 500 0.88em/1.3 var(--font-mono); overflow-wrap: anywhere;
}
.aic-hud.is-live .agent-meta { font: 400 var(--step--2)/1.3 var(--font-mono); color: var(--ink-soft); }
.aic-hud.is-live .agent-live .agent-time { margin-top: 3px; }
.aic-hud.is-live .agent-live.is-ended { border-style: dashed; background: none; }
.aic-hud.is-live .agent-live.is-ended .agent-type { background: color-mix(in srgb, var(--ink-soft) 70%, var(--paper)); }
.aic-hud.is-live .agent-live.is-ended .agent-task { color: var(--ink-soft); }
.aic-hud.is-live .agents-ended { margin-top: 6px; }
.aic-hud.is-live .info-more { display: inline-block; margin-top: 8px; font-size: var(--step--2); }
.aic-hud.is-live .agents-live + .info-more, .aic-hud.is-live .info-empty + .info-more { margin-top: 10px; }
.aic-hud.is-live .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.aic-hud.is-live .step { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: var(--step--1); line-height: 1.4; }
.aic-hud.is-live .step-time { font: 400 var(--step--2)/1.4 var(--font-mono); color: var(--ink-soft); white-space: nowrap; }
.aic-hud.is-live .step-text { min-width: 0; overflow-wrap: anywhere; }
.aic-hud.is-live .step:first-child .step-text { font-weight: 600; }
.aic-hud.is-live .files { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.aic-hud.is-live .file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.aic-hud.is-live .file:last-child { border-bottom: 0; }
.aic-hud.is-live .file-path { display: flex; align-items: baseline; gap: 8px; min-width: 0; font: 400 var(--step--2)/1.4 var(--font-mono); }
.aic-hud.is-live .file-name { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
.aic-hud.is-live .file-dir { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.aic-hud.is-live .file-ops { font: 400 var(--step--2)/1.4 var(--font-body); color: var(--ink-soft); white-space: nowrap; }
.aic-hud.is-live .info-foot { display: flex; flex-wrap: wrap; gap: 4px; }
.aic-hud.is-live .info-foot > .hud-btn + .hud-btn { margin-left: 0; }
.aic-hud.is-live .info-foot.is-confirm { display: block; }

/* ── CHAT in away mode: the bar above the composer, the explanation before switching it on, delivery ── */
.hl-away-bar { flex: none; display: grid; gap: 4px; margin: 0 12px 8px; padding: 8px 10px; border-radius: var(--r-md); background: var(--paper-2); font-size: var(--step--1); line-height: 1.4; }
.chat-attn:not([hidden]) ~ .hl-away-bar { margin-top: -2px; }
.hl-away-bar-line { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-weight: 600; text-wrap: pretty; }
.hl-away-bar-ic { flex: none; padding-top: 1px; color: var(--ink-soft); }
.hl-away-bar-ic .ic { width: 16px; height: 16px; }
.hl-away-bar.is-attn { background: color-mix(in srgb, var(--accent) 12%, var(--paper)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, var(--paper)); }
.hl-away-bar.is-attn .hl-away-bar-ic { color: var(--accent-strong); }
.hl-away-bar.is-work .hl-away-bar-ic { color: var(--work-ink); }
.hl-away-bar.is-work .hl-away-bar-ic .ic { animation: hud-spin 1.2s linear infinite; }
.hl-away-bar.is-idle { font-weight: 500; }
.hl-away-caveat { margin: 0 0 0 24px; font-size: var(--step--2); line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.hl-away-bar + .chat-composer { border-top: 0; padding-top: 0; }
.hl-away-btn.is-on { color: var(--ink-soft); }
.hl-away-btn-ic { display: contents; }
.hl-away-btn[aria-busy="true"] .ic { animation: hud-spin 0.9s linear infinite; }
.hl-away-btn[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.hl-away-btn[aria-expanded="true"] { background: var(--paper-2); border-color: var(--hover-line); }
.hl-away-ask {
  display: grid; gap: 8px; margin-top: 10px; padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--paper)); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
}
.hl-chat-note[hidden] + .hl-away-ask { margin-top: 0; }
.hl-away-ask-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--step--1); }
.hl-away-ask-title .ic { width: 16px; height: 16px; color: var(--accent-strong); }
.hl-away-ask-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hl-away-text, .hl-host-text { margin: 0; font-size: var(--step--1); line-height: 1.45; text-wrap: pretty; }
.hl-away-text.is-caveat, .hl-host-text.is-caveat { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--ink-soft); font-size: var(--step--2); }
.hl-away-text.is-caveat .ic, .hl-host-text.is-caveat .ic { width: 16px; height: 16px; margin-top: 1px; }
.hl-chat-status.is-done { color: var(--done-ink); }
.aic-hud.is-live .msg-user.is-portal .msg-bubble { border-style: dashed; }
.aic-hud.is-live .msg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 10px; max-width: 100%; }
.aic-hud.is-live .msg-delivery { display: inline-flex; align-items: flex-start; gap: 4px; font: 500 var(--step--2)/1.35 var(--font-body); color: var(--ink-soft); text-align: right; text-wrap: pretty; }
.aic-hud.is-live .msg-delivery .ic { flex: none; width: 13px; height: 13px; margin-top: 1px; }
.aic-hud.is-live .msg-user[data-delivery="sending"] .msg-delivery .ic { animation: hud-spin 0.9s linear infinite; }
.aic-hud.is-live .msg-user[data-delivery="queued"] .msg-delivery { color: var(--ink); }
.aic-hud.is-live .msg-user[data-delivery="queued"] .msg-delivery .ic { color: var(--work-ink); }
.aic-hud.is-live .msg-user[data-delivery="delivered"] .msg-delivery { color: var(--done-ink); font-weight: 600; }
.aic-hud.is-live .msg-user[data-delivery="failed"] .msg-delivery { color: var(--warn-ink); font-weight: 600; }
.aic-hud.is-live .msg-user[data-delivery="failed"] .msg-bubble { border-color: var(--warn-ink); }
/* Steering (§3): a queued message a „Zastavit“ is racing (data-steer="off") reads like a caveat, not a plain wait;
   one already carried into the running work (data-via="steer") keeps the same „delivered“ green as a Stop-delivered
   one — it is just as done — with the „work“ glyph instead of the checkmark to say how it got there. */
.aic-hud.is-live .msg-user[data-delivery="queued"][data-steer="off"] .msg-delivery { color: var(--warn-ink); }
.aic-hud.is-live .msg-user[data-delivery="queued"][data-steer="off"] .msg-delivery .ic { color: var(--warn-ink); }
.aic-hud.is-live .msg-user[data-delivery="delivered"][data-via="steer"] .msg-delivery .ic { color: var(--work-ink); }

/* ── „Upravit“ dialog ── */
.aic-hud.is-live .hud-modal.hl-edit { width: min(640px, 100%); min-width: 0; }
.hl-edit .modal-body { grid-template-columns: minmax(0, 1fr); }
.hl-edit .modal-foot { flex-wrap: wrap; align-items: center; }
.hl-edit #hl-edit-save[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.hl-edit .modal-title { display: grid; gap: 2px; min-width: 0; }
.hl-edit-of { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 var(--step--1)/1.3 var(--font-body); color: var(--ink-soft); }
.hl-edit .field-hint { line-height: 1.45; text-wrap: pretty; }
.hl-folder { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.hl-folder-path {
  flex: 1 1 auto; min-width: 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2);
  font: 400 0.78rem/1.45 var(--font-mono); overflow-wrap: anywhere; user-select: all;
}
.hl-folder .hud-btn { flex: none; height: auto; min-height: 36px; }
.hl-edit .hl-copy-note:empty { display: none; }
.hl-building-name { margin: 0 0 6px; font-size: var(--step--1); font-weight: 600; }
.hl-building-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hl-chip-radio { position: relative; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: var(--step--1); cursor: pointer; }
.hl-chip-radio input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hl-chip-radio:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
.hl-chip-radio:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.hl-variant { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hl-variant-num { min-width: 7.5em; font: 600 var(--step--1)/1.3 var(--font-mono); }
.hl-edit-away, .hl-edit-host, .hl-edit-rm, .hl-edit-mute { padding-top: 14px; border-top: 1px solid var(--line); }
.hl-edit-away > .field-label, .hl-edit-host > .field-label, .hl-edit-rm > .field-label { margin: 0; }
.aic-hud.is-live .hl-away-switch, .aic-hud.is-live .hl-host-switch { justify-self: start; margin-left: -8px; }
.hl-away-switch:disabled, .hl-host-switch:disabled { opacity: 0.5; cursor: not-allowed; }
.hl-switch-label { font-weight: 600; }
.hl-away-desc, .hl-host-desc { display: grid; gap: 6px; }
.hl-away-na, .hl-host-na { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; margin: 0; font-size: var(--step--1); line-height: 1.45; }
.hl-away-na .ic, .hl-host-na .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--warn-ink); }
.hl-edit .hl-hooks { margin-top: 2px; }
.hl-rm { display: grid; gap: 8px; justify-items: start; }
.hl-rm .field-hint { margin: 0; }
.hl-rm-ask { margin: 0; font-size: var(--step--1); font-weight: 600; }
.hl-rm-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── CHAT in away mode: „Pustit Clauda“ beside the bar's line, the session the composer writes to („Píšeš do“) ── */
.hl-away-bar { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; }
.hl-away-bar-msg { display: grid; gap: 4px; min-width: 0; }
.hl-away-bar[hidden], .hl-target[hidden], .hl-target-full[hidden], .hl-rc-found[hidden] { display: none; }
.hl-release { white-space: nowrap; }
.hl-release-ic { display: contents; }
.hl-release[aria-busy="true"] .ic { animation: hud-spin 0.9s linear infinite; }
.hl-release[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.hl-target { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; margin: 0 12px 8px; font-size: var(--step--1); line-height: 1.35; color: var(--ink-soft); }
.hl-target-full { flex: none; margin: -4px 12px 8px; font-size: var(--step--2); line-height: 1.35; color: var(--ink-soft); }
.hl-target-label { flex: none; font-weight: 600; }
.hl-target-where { flex: 1 0 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-target-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; }
.hl-target-sel, .hl-host-resume {
  flex: 1 1 14em; min-width: 0; max-width: 100%; height: 32px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink);
  font: 500 var(--step--1)/1.2 var(--font-body);
}
.hl-target-sel:hover, .hl-host-resume:hover { border-color: var(--hover-line); }
.hl-target-sel:focus-visible, .hl-host-resume:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
/* Claude z portálu (decision B, §8): „Spustit Clauda z portálu“ (+ resume), „Ukončit“, in .hl-chat-actions. */
.hl-host-start-ic, .hl-host-end-ic { display: contents; }
.hl-host-start[aria-busy="true"] .ic { animation: hud-spin 0.9s linear infinite; }
.hl-host-start[aria-disabled="true"], .hl-host-end[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.aic-hud.is-live .hl-away-bar:not([hidden]) ~ .chat-composer,
.aic-hud.is-live .hl-target:not([hidden]) ~ .chat-composer { border-top: 0; padding-top: 0; }

/* ── „Upravit“: how long Claude waits for the portal; the detected Remote Control link next to the fallback field ── */
.hl-hold { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.hl-hold[hidden] { display: none; }
.hl-hold > legend { margin-bottom: 6px; padding: 0; }
.hl-hold-list { display: flex; flex-wrap: wrap; gap: 6px; }
.hl-hold .field-hint { margin: 0; }
.hl-rc-found { margin: 6px 0 0; font-size: var(--step--1); line-height: 1.45; overflow-wrap: anywhere; }
.hl-rc-found-label { font-weight: 600; }
.hl-rc-found-link { font: 500 0.92em/1.45 var(--font-mono); }
.hl-rc-none { color: var(--ink-soft); }

/* ── CHAT on short screens. A prompt held in away mode stacks the card, the bar, „Píšeš do“, the composer and the footer
   under the history, and hud.css's drawer clips while only the history shrinks. So the history keeps a floor and the
   panel itself scrolls (nothing is ever out of reach); below 820 px of height, and on phones, the parts get tighter,
   the card's command scrolls inside the card and the keyboard hint goes. ── */
.aic-hud.is-live .dr-chat { overflow-y: auto; overscroll-behavior: contain; }
/* The history hands a swipe or a wheel on to the panel once it can't scroll further that way (hud.css contains it): a
   finger that starts on the history reaches the composer and the footer as well. */
.aic-hud.is-live .dr-chat > .chat-log { min-height: 112px; overscroll-behavior-y: auto; }
/* A Stop held for the portal: its card's title („Claude čeká na tvou odpověď v portálu (poslední zpráva výše)“) stays next to
   its icon and wraps its own text, instead of dropping below the icon as a whole. */
.aic-hud.is-live .chat-attn.is-portal .attn-title { flex: 1 1 0; min-width: 0; }
/* The footer (Zastavit, Otevřít v Claude, Vypnout režim pryč) stays at the panel's bottom while the rest scrolls under it:
   a longer permission card at 720 px, or the phone's sheet, never pushes its buttons out of sight. */
.aic-hud.is-live .dr-chat > .hl-chat {
  position: sticky; bottom: 0; z-index: 1; padding-top: 8px;
  background: var(--paper); box-shadow: 0 -1px 0 var(--line);
}
@media (max-height: 820px), (max-width: 640px) {
  .aic-hud.is-live .dr-chat > .chat-hint { display: none; }
  .aic-hud.is-live .chat-attn { margin-bottom: 8px; padding: 10px 12px; }
  .aic-hud.is-live .chat-attn .attn-desc { margin: 4px 0 6px; }
  .aic-hud.is-live .chat-attn .attn-code { max-height: 4.4em; margin-bottom: 8px; padding: 6px 10px; }
  .aic-hud.is-live .hl-away-bar { margin-bottom: 6px; padding: 6px 10px; }
  /* A held prompt: its card says it all; the note that VS Code shows the same prompt goes (a held Stop keeps its note) */
  .aic-hud.is-live .chat-attn:not([hidden]) ~ .hl-away-bar.is-perm .hl-away-caveat { display: none; }
  .aic-hud.is-live .hl-target { margin-bottom: 6px; }
  .aic-hud.is-live .chat-composer { padding-top: 8px; }
  .aic-hud.is-live .hl-chat { padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .aic-hud.is-live .hl-chat-note:not([hidden]) + .hl-chat-actions { margin-top: 6px; }
}
/* A short desktop window (1280 × 720, 2560 × 720): a lower floor (~110 px of history) lets every part fit without scrolling.
   A phone keeps the higher one: its sheet can't fit them all anyway, and one swipe brings the rest. */
@media (max-height: 820px) and (min-width: 641px) {
  .aic-hud.is-live .dr-chat > .chat-log { min-height: 84px; }
}

/* ── Phones: full-width actions, the sheet's footer clear of the home indicator ── */
@media (max-width: 640px) {
  .hl-chat { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
  .hl-chat-actions .hud-btn { flex: 1 1 auto; }
  .hl-away-bar { margin: 0 10px 6px; grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .hl-away-bar .hl-release { justify-self: start; }
  .hl-target { margin: 0 10px 6px; }
  .hl-target-full { margin: -2px 10px 6px; }
  .hl-away-caveat { margin-left: 0; }
  .aic-hud.is-live .dr-edit { margin-right: -6px; }
  .hl-folder { flex-direction: column; }
  .hl-folder .hud-btn { align-self: flex-start; }
  .aic-hud.is-live .file { grid-template-columns: minmax(0, 1fr); }
  .aic-hud.is-live .file-ops { white-space: normal; }
  .hl-cmd { flex-direction: column; }
  .hl-cmd .hud-btn { align-self: flex-start; }
  /* On a phone the command wraps instead of scrolling sideways */
  .hl-cmd-code { white-space: pre-wrap; overflow-wrap: anywhere; }
}
@media (pointer: coarse) {
  .hl-chat-actions .hud-btn { height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hl-stop[aria-busy="true"] .ic, .hl-away-btn[aria-busy="true"] .ic, .hl-away-bar.is-work .hl-away-bar-ic .ic, .hl-release[aria-busy="true"] .ic,
  .aic-hud.is-live .msg-user[data-delivery="sending"] .msg-delivery .ic { animation: none; }
}

/* ── Login (§1 Hardening): the Czech login page, and the "Zabezpečení" panel behind the shield icon. Built on
   hud.css's own .hud-modal-backdrop / .hud-modal / .modal-* / .field* / .input, so both look native to the rest
   of the HUD; only what's specific to them lives here. ── */
.hl-login-backdrop { z-index: 60; }   /* above every other dialog: nothing behind it is usable without logging in */
/* A denied visitor's boot() leaves the bundled demo hive on screen (live.js's own fallback) — blur it and hide
   the command bar / empty-hive controls behind the login dialog, so nothing looks like real, reachable data. */
.hl-auth-locked #stage, .hl-auth-locked #world { filter: blur(16px) saturate(0.5); pointer-events: none; }
.hl-auth-locked .hud-bar, .hl-auth-locked .hud-empty { visibility: hidden; }
.hl-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hl-login-wait { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
.hl-login-hint { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; margin: 0; font-size: var(--step--1); line-height: 1.45; color: var(--ink-soft); }
.hl-login-hint .ic { width: 16px; height: 16px; margin-top: 2px; }
.hl-login-actions { display: flex; justify-content: flex-end; }
.hl-login-actions .hud-btn { width: 100%; justify-content: center; }
.hl-login-or { display: flex; align-items: center; gap: 10px; margin: 2px 0; font-size: var(--step--2); color: var(--ink-soft); }
.hl-login-or::before, .hl-login-or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
.hl-login .hud-btn { width: 100%; justify-content: center; }
.hl-sec .modal-body { gap: 22px; }
.hl-sec-block { display: grid; gap: 10px; min-width: 0; }
.hl-sec-title { margin: 0; font: 700 var(--step--1)/1.3 var(--font-display); }
.hl-sec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hl-sec-row {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2);
}
.hl-sec-row > .ic { width: 16px; height: 16px; color: var(--ink-soft); }
.hl-sec-row-main { display: grid; gap: 1px; min-width: 0; }
.hl-sec-row-main strong { font-size: var(--step--1); font-weight: 600; overflow-wrap: anywhere; }
.hl-sec-row-sub { font-size: var(--step--2); color: var(--ink-soft); }
.hl-sec-empty { margin: 0; padding: 8px 10px; font-size: var(--step--1); color: var(--ink-soft); }
.hl-sec-ok { margin: 0; display: flex; align-items: flex-start; gap: 6px; font-size: var(--step--2); font-weight: 600; line-height: 1.4; color: var(--work-ink); }
.hl-sec-ok .ic { flex: none; width: 14px; height: 14px; margin-top: 1px; }
.hl-sec-add { display: flex; gap: 8px; }
.hl-sec-add .input { flex: 1 1 auto; min-width: 0; }
.hl-audit-list { max-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.hl-audit-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 8px; padding: 5px 8px; font-size: var(--step--2); border-radius: var(--r-sm); }
.hl-audit-row:nth-child(odd) { background: var(--paper-2); }
.hl-audit-when { color: var(--ink-soft); white-space: nowrap; }
.hl-audit-ip { color: var(--ink-soft); font-family: var(--font-mono); white-space: nowrap; }
@media (max-width: 640px) {
  .hl-audit-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hl-audit-ip { display: none; }
  .hl-sec-add { flex-direction: column; }
}

/* ── "Notifikace" (§11): built on the same .hl-sec-* vocabulary as "Zabezpečení" and "Počítače" above — a
   switch (hud.css's own track/thumb) sits in a row's trailing column exactly where those panels put a button. */
.aic-hud.is-live .hud-modal.hl-notify { width: min(640px, 100%); }
.hl-notify .modal-body { gap: 22px; }
.hl-notify-sub { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--step--2); color: var(--ink-soft); }
.hl-quiet-times { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: -2px 0 0; }
.hl-quiet-field { display: flex; align-items: center; gap: 6px; font-size: var(--step--1); color: var(--ink-soft); }
.hl-quiet-field .input { width: auto; }
/* Notifikace pro tuhle plástev ("Upravit"): same stacked .field grid as away/host, just one line instead of a
   whole card — the border/padding above already came from joining .hl-edit-away's own selector. */
.aic-hud.is-live .hl-edit-mute > .field-label { margin: 0; }
.aic-hud.is-live #hl-edit-mute { justify-self: start; margin-left: -8px; }
@media (max-width: 640px) {
  .hl-quiet-times { flex-direction: column; gap: 8px; }
}

.info-foot.is-folder { flex-direction: column; align-items: flex-start; gap: 4px; }
.info-foot-note { margin: 0; font-size: var(--step--1); color: var(--ink-soft); text-wrap: pretty; }

/* ── „Přidat počítač“: the station name and THE ONE CONSENT CHECKBOX (§13). ──
   The checkbox is the only place in this portal where the robot can ever be granted, so it is given the room of a
   decision rather than the look of a preference: a real label, a bold claim, and the sentence that says it cannot
   be changed afterwards without a new link. */
.hl-mach-linkform { display: grid; gap: 12px; }
.hl-mach-consent {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper-2); cursor: pointer;
}
.hl-mach-consent:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.hl-mach-consent input { margin: 2px 0 0; width: 18px; height: 18px; accent-color: var(--accent-strong); }
.hl-mach-consent-text { display: grid; gap: 4px; min-width: 0; }
.hl-pair-what .is-yes { color: var(--work-ink); }
.hl-pair-what .is-no { color: var(--ink-soft); }

/* The robot as a FACT on a machine row (there is no switch for it any more), and the brake next to it. */
.hl-mach-robot { margin: 2px 0 0; font-size: var(--step--2); color: var(--ink-soft); }
.hl-mach-robot.is-on strong { color: var(--work-ink); }

/* „Načíst všechny VS Code aplikace otevřené“ — the per-machine window list. The honeycomb is where a conversation
   is picked; this list exists for the windows whose conversations have no cell yet, so it stays quiet and small. */
.hl-mach-wins { margin-top: 8px; display: grid; gap: 6px; }
.hl-mach-wins-head { margin: 0; font-size: var(--step--2); font-weight: 600; color: var(--ink-soft); }
.hl-mach-winlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hl-mach-win {
  display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--paper-2);
}
/* A window that stopped being reported keeps its conversations on screen — greyed out, never disappearing. */
.hl-mach-win.is-gone { opacity: 0.62; border-style: dashed; }
.hl-mach-win-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hl-mach-win-label { font-weight: 600; }
.hl-mach-win-state { font-size: var(--step--2); color: var(--ink-soft); }
.hl-mach-win-path { font-size: var(--step--2); color: var(--ink-soft); word-break: break-all; }
.hl-mach-convs { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 2px; }
.hl-mach-convs-empty { margin: 0; font-size: var(--step--2); color: var(--ink-soft); font-style: italic; }
.hl-mach-conv.is-ended { opacity: 0.7; }
.hl-mach-conv-btn {
  display: block; width: 100%; text-align: left; padding: 4px 8px; border: 1px solid transparent;
  border-radius: var(--r-sm); background: none; color: inherit; font: inherit; font-size: var(--step--1); cursor: pointer;
}
.hl-mach-conv-btn:hover { border-color: var(--line); background: var(--paper); }
.hl-mach-conv-nocell { display: block; padding: 4px 8px; font-size: var(--step--1); color: var(--ink-soft); font-style: italic; }

/* ── Čekající zprávy (§3): what a portal message is DOING right now, and the way to take it back. ──
   Quiet by construction: it sits between the away bar and the composer, it carries no message text (the chat rows
   above have it) and it disappears the moment nothing waits. The only loud thing it can show is „právě se odesílá“,
   which is also the one row with no „Zrušit“ — that race is already lost. */
.hl-queue {
  display: grid; gap: 6px; margin: 0 0 8px; padding: 10px 12px;
  border: 1px solid var(--line); border-left: 3px solid color-mix(in srgb, var(--work) 55%, var(--line));
  border-radius: var(--r-sm); background: var(--paper-2);
}
.hl-queue-head { margin: 0; font-size: var(--step--2); line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.hl-queue-head.is-done { color: var(--work-ink); }
.hl-queue-head.is-err { color: var(--warn-ink); }
.hl-queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hl-queue-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hl-queue-what { flex: 1 1 auto; min-width: 0; font-size: var(--step--2); color: var(--ink-soft); }
.hl-queue-item.is-sending .hl-queue-what { color: var(--work-ink); }
.hl-queue-cancel { flex: none; }
.hl-queue-note { font-size: var(--step--2); }
.hl-queue-note.is-done { color: var(--work-ink); }
.hl-queue-note.is-err, .hl-queue-note.is-wait { color: var(--warn-ink); }
@media (max-width: 640px) {
  .hl-queue-cancel { flex: 1 1 100%; justify-content: center; }
}
