/* GOD MODE CONTROL — dyspozytornia: papier, tusz, sygnały. */
:root {
  --paper: #f3eee4; --sheet: #fbf8f1; --ink: #14110f; --muted: #6a6257; --rule: #d9d0bf;
  --signal: #c2410c; --ok: #1f6f4a; --warn: #a15c00; --stop: #a3201d; --demo: #5b3a9b;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
  --fast: 150ms;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #14110f; --sheet: #1d1916; --ink: #f1e9da; --muted: #a59a88; --rule: #3a322a; --signal: #ff8a4c; --ok: #5fd39a; --warn: #f0b354; --stop: #ff7a70; --demo: #b79cf5; }
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
body { margin: 0; min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--sheet); padding: 0.5rem; z-index: 9; }

.mast { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem 16px; border-bottom: 2px solid var(--ink); position: sticky; top: 0; background: var(--paper); z-index: 5; }
.brand { font: 600 0.8rem/1 var(--mono); letter-spacing: 0.22em; text-decoration: none; display: flex; align-items: center; gap: 0.6rem; }
.brand b { color: var(--signal); }
.brand-mark { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--ink); }
nav { display: flex; align-items: center; gap: 0.25rem; }
nav a, .quiet { font: 500 0.85rem var(--sans); padding: 0.55rem 0.7rem; text-decoration: none; border: 0; background: none; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; min-height: 44px; display: inline-flex; align-items: center; gap: 0.35rem; }
nav a[aria-current="page"] { color: var(--ink); border-color: var(--signal); }
nav a:hover, .quiet:hover { color: var(--ink); }
.badge { background: var(--signal); color: var(--paper); font: 700 0.7rem var(--mono); padding: 0.05rem 0.4rem; border-radius: 1rem; }

.mode { font: 600 0.75rem var(--mono); letter-spacing: 0.08em; padding: 0.45rem 16px; text-align: center; }
.mode.demo { background: var(--demo); color: #fff; }
.mode.live { background: var(--ink); color: var(--paper); }

main { max-width: 72rem; margin: 0 auto; padding: var(--gap) 16px 4rem; outline: none; }
h1 { font: 400 clamp(1.9rem, 1.2rem + 3vw, 3.4rem)/1.05 var(--serif); margin: 1rem 0 0.25rem; letter-spacing: -0.02em; }
h2 { font: 600 0.72rem var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 2rem 0 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
.lede { color: var(--muted); margin: 0 0 1rem; max-width: 46rem; }
.meta { font: 0.78rem var(--mono); color: var(--muted); overflow-wrap: anywhere; }

.board { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 60rem) { .board { grid-template-columns: 1.7fr 1fr; align-items: start; } .board > aside { position: sticky; top: 5rem; } }

.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); border: 1px solid var(--ink); background: var(--sheet); }
.gauge { padding: 0.9rem 1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.gauge dt { font: 600 0.66rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.gauge dd { margin: 0.2rem 0 0; font: 400 1.7rem/1.1 var(--serif); }
.gauge small { display: block; font: 0.75rem var(--sans); color: var(--muted); }
.bar { height: 6px; background: var(--rule); margin-top: 0.5rem; }
.bar i { display: block; height: 100%; background: var(--ok); transform-origin: left; }
.bar.hot i { background: var(--stop); }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.row { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; padding: 0.9rem 0.25rem; border-bottom: 1px solid var(--rule); text-decoration: none; transition: background var(--fast), padding var(--fast); }
a.row:hover, a.row:focus-visible { background: var(--sheet); padding-inline: 0.75rem; }
.row strong { font: 500 1.08rem/1.3 var(--serif); }
.row .meta { grid-column: 1 / -1; }
.state { font: 700 0.68rem var(--mono); letter-spacing: 0.1em; padding: 0.2rem 0.5rem; border: 1px solid currentColor; align-self: start; white-space: nowrap; }
.s-ok { color: var(--ok); } .s-warn { color: var(--warn); } .s-stop { color: var(--stop); } .s-muted { color: var(--muted); } .s-demo { color: var(--demo); }

.sheet { background: var(--sheet); border: 1px solid var(--rule); padding: 1rem; box-shadow: 6px 6px 0 var(--rule); }
.facts { display: grid; grid-template-columns: minmax(6rem, auto) 1fr; gap: 0.45rem 1rem; margin: 0; }
.facts dt { font: 600 0.68rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.unknown { color: var(--muted); font-style: italic; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--ink); }
.timeline li { position: relative; padding: 0 0 1rem 0.75rem; }
.timeline li::before { content: ""; position: absolute; left: -1.42rem; top: 0.45rem; width: 0.6rem; height: 0.6rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
pre.report { white-space: pre-wrap; font: 0.8rem/1.5 var(--mono); max-height: 24rem; overflow: auto; background: var(--paper); padding: 0.75rem; border: 1px solid var(--rule); }

.chat { display: flex; flex-direction: column; gap: 0.6rem; }
.chat-log { display: flex; flex-direction: column; gap: 0.5rem; max-height: 20rem; overflow-y: auto; }
.msg { padding: 0.55rem 0.7rem; max-width: 92%; border: 1px solid var(--rule); font-size: 0.92rem; overflow-wrap: anywhere; }
.msg { white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.msg.sys { align-self: flex-start; background: var(--paper); }
.msg.sys.gap { border-style: dashed; color: var(--muted); }
.msg .copy { display: block; margin: 0.5rem 0 0 auto; font: 600 0.62rem var(--mono); letter-spacing: 0.12em; padding: 0.3rem 0.6rem; min-height: 32px; border: 1px solid var(--rule); background: none; color: var(--muted); cursor: pointer; }
.msg .copy:hover, .msg .copy:focus-visible { border-color: var(--ink); color: var(--ink); }
.msg.sys.waiting { border-style: dotted; color: var(--muted); animation: waiting 1.2s ease-in-out infinite alternate; }
@keyframes waiting { from { opacity: 0.45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .msg.sys.waiting { animation: none; } }
.chat form { display: flex; gap: 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip { font: 0.75rem var(--sans); padding: 0.3rem 0.6rem; border: 1px solid var(--rule); background: none; color: var(--ink); cursor: pointer; border-radius: 1rem; min-height: 32px; }
.chip:hover { border-color: var(--ink); }
.fine { font-size: 0.74rem; color: var(--muted); margin: 0; }

input, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); padding: 0.65rem 0.75rem; width: 100%; min-height: 44px; border-radius: 0; }
button.act { font: 700 0.78rem var(--mono); letter-spacing: 0.1em; padding: 0.75rem 1rem; min-height: 44px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; transition: transform var(--fast), box-shadow var(--fast); }
button.act:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--signal); }
button.act:active { transform: none; box-shadow: none; }
button.act.approve { background: var(--ok); border-color: var(--ok); color: #fff; }
button.act.reject { background: var(--stop); border-color: var(--stop); color: #fff; }
button.act.ghost { background: none; color: var(--ink); }
button[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.error { color: var(--stop); font-weight: 600; min-height: 1.4rem; margin: 0.4rem 0 0; }
.pending-box { border: 2px dashed var(--muted); padding: 1rem; color: var(--muted); }
.ambition-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.78rem/1.5 var(--mono); max-height: 30rem; overflow: auto; }
.memory form { display: grid; gap: 0.6rem; margin: 1rem 0 0.4rem; }
.memory form textarea { min-height: 7rem; resize: vertical; line-height: 1.45; }
.memory form button.act { justify-self: start; }
.memory-list { list-style: none; counter-reset: rule; margin: 0.6rem 0 0; padding: 0; border-top: 1px solid var(--ink); }
.memory-list li { counter-increment: rule; display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.2rem 0.6rem; align-items: start; padding: 0.8rem 0; border-bottom: 1px solid var(--ink); }
.memory-list li::before { content: counter(rule); font: 700 0.78rem var(--mono); color: var(--muted); padding-top: 0.2rem; }
.memory-list .rule-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.memory-list li.empty { counter-increment: none; grid-template-columns: 1fr; }
.memory-list li.empty::before { content: none; }
.memory-list li.empty .rule-text { color: var(--muted); }
.chat-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chat-tools button.act { flex: 1 1 auto; }
.memory-list .fine { grid-column: 2; }
.memory-list button.quiet { grid-column: 3; grid-row: 1 / span 2; color: var(--stop); }
.memory-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 0.2rem 0 0.4rem; }
.memory-attach .fine { flex: 1 1 14rem; }
.memory-files-head { margin-top: 1.6rem; }
.memory-files .file-entry { min-width: 0; }
.memory-files .file-name { font-weight: 700; }
.memory-files summary { cursor: pointer; font: 600 0.66rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.memory-files summary:hover, .memory-files summary:focus-visible { color: var(--ink); }
.memory-files pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.78rem/1.5 var(--mono); max-height: 22rem; overflow: auto; background: var(--paper); padding: 0.75rem; border: 1px solid var(--rule); margin: 0.2rem 0 0.4rem; }

.login { max-width: 24rem; margin: 12vh auto 0; }
.login form { display: grid; gap: 0.75rem; margin-top: 1.25rem; }

dialog { border: 2px solid var(--ink); background: var(--sheet); color: var(--ink); padding: 1.25rem; width: min(26rem, calc(100vw - 32px)); box-shadow: 10px 10px 0 var(--signal); }
dialog::backdrop { background: rgb(20 17 15 / 0.6); }
dialog h3 { font: 400 1.5rem var(--serif); margin: 0 0 0.5rem; }
dialog form { display: grid; gap: 0.7rem; }

.toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 0.5rem; z-index: 8; max-width: min(22rem, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--paper); padding: 0.7rem 0.9rem; border-left: 5px solid var(--signal); text-decoration: none; font-size: 0.88rem; animation: rise 300ms cubic-bezier(0.16, 1, 0.3, 1); }
.toast b { display: block; font: 700 0.66rem var(--mono); letter-spacing: 0.14em; }
.toast-go { display: block; width: fit-content; margin-top: 0.45rem; padding: 0.25rem 0.55rem; border: 1px solid var(--paper); font: 700 0.7rem var(--mono); letter-spacing: 0.08em; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.field { display: grid; gap: 0.2rem; }
.field span { font: 600 0.66rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); padding: 0.6rem; min-height: 44px; width: 100%; }
[readonly], select[disabled] { opacity: 0.7; border-style: dashed; }
dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
div.row .actions { grid-column: 1 / -1; margin-top: 0.4rem; }
.row > * { min-width: 0; overflow-wrap: anywhere; }
.row .state { white-space: normal; text-align: center; }
nav { flex-wrap: wrap; max-width: 100%; }
nav a, .quiet { padding-inline: 0.5rem; }

.chat form { flex-wrap: wrap; }
.chat form input { flex: 1 1 12rem; width: auto; }
.chat form textarea { flex: 1 1 100%; width: auto; min-height: 3.2rem; max-height: 20rem; resize: vertical; font: inherit; line-height: 1.4; }
.chat form { align-items: flex-end; }
.attached:empty { display: none; }
.attached .chip { border-style: dashed; }
button.mic[aria-pressed="true"] { background: var(--stop); border-color: var(--stop); color: #fff; }

.msg-time { display: block; font: 0.66rem var(--mono); opacity: 0.65; margin-top: 0.25rem; }
.msg.event { border-style: dotted; font-size: 0.82rem; color: var(--muted); }
.msg-divider { align-self: center; font: 600 0.62rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.chat-log { max-height: 32rem; }
.msg.proposal { max-width: 100%; border: 2px solid var(--ink); white-space: normal; display: grid; gap: 0.4rem; }
.msg.proposal .actions { margin-top: 0.2rem; }

.totp-secret { font: 600 1.1rem var(--mono); letter-spacing: 0.08em; background: var(--paper); border: 1px dashed var(--ink); padding: 0.6rem; overflow-wrap: anywhere; user-select: all; }

/* Szeroki ekran: rozmowa zawsze w całości w oknie (lista wiadomości + pole wpisywania), strona przewija się osobno.
   Kółko nad listą wiadomości przewija tylko ją i nie przechodzi na stronę. */
/* Monitor aktywności */
h2.first { margin-top: 0; border-top: 0; padding-top: 0; }
h3 { font: 600 0.68rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 1.4rem 0 0.2rem; }
.jobs { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.job { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--muted); padding: 0.9rem 1rem; }
.job-running, .job-succeeded { border-left-color: var(--ok); }
.job-review, .job-pending { border-left-color: var(--warn); }
.job-waiting_approval, .job-blocked, .job-failed { border-left-color: var(--stop); }
.job p { margin: 0.35rem 0 0; }
.job-head { display: flex; gap: 0.75rem; justify-content: space-between; align-items: start; }
.job-head a { text-decoration: none; }
.job-head strong { font: 500 1.12rem/1.3 var(--serif); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.job-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.9rem; margin: 0.6rem 0 0; font-size: 0.88rem; }
.job-facts dt { font: 600 0.66rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.job-facts dd { margin: 0; overflow-wrap: anywhere; }
.stages { list-style: none; counter-reset: stage; margin: 0.8rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.stage { counter-increment: stage; display: grid; grid-template-columns: 1.6rem 1fr; column-gap: 0.5rem; color: var(--muted); }
.stage::before { content: counter(stage); grid-row: span 2; font: 700 0.8rem var(--mono); width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; }
.stage small { font: 0.72rem var(--mono); }
.stage-done { color: var(--ok); } .stage-done span { color: var(--ink); }
.stage-current { color: var(--ink); } .stage-current::before { background: var(--ink); color: var(--sheet); } .stage-current span { font-weight: 600; }
.stage-blocked, .stage-failed, .stage-waiting { color: var(--stop); } .stage-blocked span, .stage-failed span, .stage-waiting span { font-weight: 600; }
.stage-planned::before, .stage-unknown::before, .stage-unconfirmed::before { border-style: dashed; }
.explain { margin-top: 0.7rem; font-size: 0.86rem; }
.explain summary { cursor: pointer; font: 600 0.66rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.explain summary:hover, .explain summary:focus-visible { color: var(--ink); }
.explain dl { margin: 0.3rem 0 0; } .explain dt { font-weight: 600; margin-top: 0.45rem; } .explain dd { margin: 0; color: var(--muted); }
@media (min-width: 60rem) {
  .board > aside { display: flex; flex-direction: column; gap: 0.5rem; height: calc(100vh - 6rem); height: calc(100dvh - 6rem); overflow-y: auto; }
  .board > aside > .chat { flex: 1 1 auto; min-height: 0; }
  .board > aside .chat-log { flex: 1 1 8rem; min-height: 8rem; max-height: none; overscroll-behavior: contain; }
  /* Stała notka pod rozmową zajmuje dwie linie; całość po najechaniu — miejsce dostaje lista wiadomości. */
  .board > aside .chat > p.fine:last-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .board > aside .chat > p.fine:last-child:hover { -webkit-line-clamp: unset; line-clamp: unset; }
}

/* Opisy zwykłym językiem: opis jest największy, tytuł i znaczniki małe, a zapisy techniczne zwinięte pod spodem. */
:root { --on-signal: #fff; }
@media (prefers-color-scheme: dark) { :root { --on-signal: #14110f; } }
h1 { overflow-wrap: anywhere; }
h1 + .board { margin-top: 1rem; }
.now-card { background: var(--sheet); border: 1px solid var(--ink); border-left: 6px solid var(--signal); box-shadow: 6px 6px 0 var(--rule); padding: 1rem 1.1rem 1.1rem; margin: 0; display: grid; gap: 0.6rem; }
.now-card > * { min-width: 0; }
.now-card h2 { margin: 0; padding: 0; border: 0; color: var(--signal); }
.now-card .fine { margin: 0; }
.plain-now p { font: 400 clamp(0.95rem, 0.9rem + 0.25vw, 1.08rem)/1.5 var(--sans); margin: 0 0 0.5em; overflow-wrap: anywhere; }
.plain-text p { font: 400 0.92rem/1.55 var(--sans); margin: 0 0 0.45em; overflow-wrap: anywhere; }
.plain-now p:last-child, .plain-text p:last-child { margin-bottom: 0; }
/* Przejście do nowego wiersza w opisie (np. wyliczenie myślnikami) zostaje wierszem, jak w odpowiedziach rozmowy. */
.plain-now p, .plain-text p { white-space: pre-line; }
.task-lead .tags { justify-self: start; }

.tasks-plain { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.task-plain { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--muted); padding: 0.9rem 1rem 0.3rem; display: grid; gap: 0.55rem; }
.task-plain > * { min-width: 0; }
.task-plain.job-running, .task-plain.job-succeeded { border-left-color: var(--ok); }
.task-plain.job-review, .task-plain.job-pending { border-left-color: var(--warn); }
.task-plain.job-waiting_approval, .task-plain.job-blocked, .task-plain.job-failed { border-left-color: var(--stop); }
.task-head { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; justify-content: space-between; align-items: center; }
.kicker { font: 600 0.82rem/1.35 var(--sans); color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 0.22em; overflow-wrap: anywhere; min-width: 0; transition: color var(--fast), text-decoration-color var(--fast); }
.kicker:hover, .kicker:focus-visible { color: var(--ink); text-decoration-color: var(--signal); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.importance, .needs-founder { font: 700 0.68rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 0.22rem 0.5rem; border: 1px solid currentColor; }
.imp-high { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.imp-mid { color: var(--ink); }
.imp-low { color: var(--muted); border-style: dashed; }
.needs-founder { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.order-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 1rem 0 0.4rem; }
.order-bar .fine { margin-right: 0.2rem; }
button.order-toggle { font: 700 0.68rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 0.5rem 0.75rem; min-height: 40px; border: 1px solid var(--ink); background: none; color: var(--ink); cursor: pointer; }
button.order-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
button.order-toggle[aria-pressed="true"]::before { content: "✓ "; }
.decisions { border: 2px solid var(--signal); padding: 0 0.9rem 0.9rem; margin: 0.8rem 0 1.4rem; }
.decisions > h2 { margin-top: 0.9rem; }
.decisions .requests-line { margin: 0.6rem 0 0; }
/* Odmowa niesie dokładny zapis God Mode, czasem z długim ciągiem bez spacji — nie może wyjść poza ekran telefonu. */
.toast, .error { overflow-wrap: anywhere; }
.task-plain .fine { margin: 0; }
.decide { font-weight: 700; color: var(--signal); }
.decide-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.6rem 0 0.2rem; }
.decide-bar .decide { margin-left: 0.4rem; }
.decide-box { margin: 0.6rem 0 0.2rem; }
.decide-next { margin: 0 0 0.3rem; padding: 0.4rem 0.6rem; border-left: 3px solid var(--signal); background: color-mix(in srgb, var(--signal) 8%, transparent); font-size: 0.9rem; }
a.act.decide-act { text-decoration: none; }
.decide:hover, .decide:focus-visible { color: var(--ink); }

.tech { border-top: 1px dashed var(--rule); min-width: 0; font-size: 0.88rem; }
.tech > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.6rem; min-height: 44px; font: 600 0.66rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); transition: color var(--fast); }
.tech > summary::-webkit-details-marker { display: none; }
.tech > summary::before { content: ""; flex: none; width: 0.42rem; height: 0.42rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.05rem) rotate(-45deg); transition: transform var(--fast); }
.tech[open] > summary::before { transform: translateY(-0.12rem) rotate(45deg); }
.tech > summary:hover, .tech > summary:focus-visible { color: var(--ink); }
.tech[open] { padding-bottom: 0.7rem; }
.tech > p { margin: 0.35rem 0 0; }
.tech-page { margin-top: 1.8rem; border-top: 1px solid var(--ink); font-size: 1rem; }
.tech-page > summary { min-height: 48px; font-size: 0.72rem; letter-spacing: 0.18em; }
.tech-page > h2:first-of-type { margin-top: 1rem; }
.foot-note { margin-top: 1.2rem; }

/* Rozmowa: akapity odpowiedzi, drobny druk pod odpowiedzią (rodzaj wiadomości, źródła), licznik oczekiwania. */
.chat-log { position: relative; }
/* Komunikaty pod polem (stan wysyłki, dyktowanie, koszt) zajmują miejsce dopiero wtedy, gdy coś mówią. */
.chat-notes { display: flex; flex-direction: column; margin-top: -0.6rem; }
.chat-notes > p:not(:empty) { margin-top: 0.6rem; }
.chat-slot { display: none; }
.answer p { margin: 0 0 0.65em; }
.answer p:last-child { margin-bottom: 0; }
.msg-foot { margin: 0.55rem 0 0; padding-top: 0.4rem; border-top: 1px solid var(--rule); font-size: 0.72rem; line-height: 1.45; color: var(--muted); white-space: normal; }
.msg-kind { font: 700 0.62rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.msg.gap .msg-kind { color: inherit; }
.wait-clock { font: 600 0.8rem var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.msg-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; margin-top: 0.5rem; }
.msg-tools .copy { margin: 0; }
/* Duże okno do czytania długiej odpowiedzi. */
dialog.reader { width: min(46rem, calc(100vw - 32px)); padding: 1.5rem; }
dialog.reader .plain-text p { font-size: 0.98rem; line-height: 1.55; margin-bottom: 0.8em; white-space: pre-wrap; }
dialog.reader .msg-foot { font-size: 0.78rem; }
button.act[disabled]:hover { transform: none; box-shadow: none; }
.chip[disabled]:hover { border-color: var(--rule); }
/* Szczegóły techniczne przy wiadomości i karcie w rozmowie: małe, zwinięte, bez łamania układu dymku. */
.msg .tech { margin-top: 0.5rem; white-space: normal; font-size: 0.8rem; }
.msg .tech > summary { min-height: 36px; }
.msg .tech .facts { margin: 0.35rem 0 0; }
/* Kafel budżetu ze zdaniem zwykłym językiem zamiast kwoty i kodów źródeł. */
.gauge-plain dd { font: 400 1rem/1.4 var(--sans); }
/* Indeks zadań z opisami: wiersz bez opisu zachowuje dotychczasowy wygląd między kartami. */
.tasks-plain > li:not(.task-plain) { border-top: 1px solid var(--rule); }

/* Tytuł zadania lub wniosku bywa całym poleceniem: mniejszy krój, a bardzo długi przewija się w ramce zamiast zajmować stronę. */
p.meta + h1 { font: 400 clamp(0.95rem, 0.9rem + 0.25vw, 1.08rem)/1.5 var(--sans); letter-spacing: 0; max-height: 7.8em; overflow-y: auto; }
