/*
 * OH Machine — style.
 * Motyw: terminal sceny warez — grafit i bursztyn, okna z tytułem w ramce, znak zachęty.
 * Jedyny „głośny” element: znak marki z migającym kursorem. Tekst neutralny, akcent bursztynowy tylko na liczbach, przyciskach i aktywnych elementach.
 * Jeden, świadomie ciemny motyw (bez wersji jasnej).
 */

/* Układ: boczny pasek „mostek” + kolumna roboczna; kafelki w siatce, lejek na dwie kolumny. */
:root {
  color-scheme: dark;

  --velvet: #14161a;        /* tło: grafit */
  --hold: #1b1e23;          /* okna terminala */
  --hold-2: #22262c;        /* drugi plan, najechanie */
  --bridge: #101215;        /* pasek boczny, pola wprowadzania */
  --bone: #d6d3cb;          /* tekst: ciepły jasnoszary */
  --ash: #a19d95;           /* tekst drugi */
  --ash-3: #77746e;         /* tekst trzeci */
  --rule: #2a2e35;
  --rule-strong: #3b4048;
  --gilt: #e0a54a;          /* bursztyn: zatwierdź / wyślij / marka / liczby */
  --gilt-soft: #352a19;
  --gilt-ink: #1a1206;
  --wine: #e06c75;          /* odrzuć / usuń */
  --wine-soft: #3a2226;
  --verdigris: #7fb8a4;     /* przyjęte */
  --verdigris-soft: #1d2f2a;
  --rum: #d9874a;           /* zaległe (cieplejszy od akcentu) */
  --rum-soft: #36261b;
  --lavender: #9aa5ce;      /* informacja / do zaproszenia */
  --lavender-soft: #23283a;
  --focus: #f0c27a;
  --stamp-empty: #262a31;
  --glow: 0 0 8px rgba(224, 165, 74, 0.22);

  /* zgodność z nazwami używanymi wcześniej w kodzie */
  --paper: var(--velvet); --surface: var(--hold); --surface-2: var(--hold-2);
  --ink: var(--bone); --ink-2: var(--ash); --ink-3: var(--ash-3);
  --post: var(--gilt); --post-soft: var(--gilt-soft); --post-ink: var(--gilt-ink);
  --claret: var(--wine); --claret-soft: var(--wine-soft);
  --ochre: var(--rum); --ochre-soft: var(--rum-soft);
  --slate: var(--lavender); --slate-soft: var(--lavender-soft);

  --font-display: var(--font-body);
  --font-body: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, "DejaVu Sans Mono", monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.875rem;
  --fs-lg: 1.2rem;
  --fs-xl: 1.9rem;
  --fs-2xl: 2.75rem;

  --r-sm: 2px;
  --r-md: 3px;
  --gap: 16px;
  --sidebar: 232px;
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--velvet); }
body {
  margin: 0;
  color: var(--bone);
  font: var(--fs-md)/1.55 var(--font-body);
  font-variant-numeric: tabular-nums;
  /* Linie skanowania CRT i winieta świecy — statyczne, bez animacji. */
  background:
    radial-gradient(ellipse at 70% -10%, rgba(224, 165, 74, 0.05), transparent 55%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px),
    var(--velvet);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0; }
h1 { font-size: var(--fs-xl); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--gilt); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--bone); }
code, pre { font-family: var(--font-body); font-size: 0.92em; }
pre.code { background: var(--bridge); border: 1px solid var(--rule); padding: 8px 10px; border-radius: var(--r-sm); margin: 8px 0; white-space: pre-wrap; color: var(--gilt); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--gilt); color: var(--gilt-ink); }
.muted { color: var(--ash-3); }
.small { font-size: var(--fs-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--gilt); color: var(--gilt-ink); padding: 8px 12px; z-index: 100; }
.skip-link:focus { top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Szkielet ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--bridge); color: var(--ash);
  border-right: 1px solid var(--rule);
  box-shadow: inset -1px 0 0 rgba(224, 165, 74, 0.08);
  padding: 20px 12px; display: flex; flex-direction: column; gap: 22px;
}
.brand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; color: var(--bone); text-decoration: none; padding: 4px 8px; }
.brand:hover { color: var(--bone); }
.brand-mark { width: 34px; height: 36px; color: var(--gilt); flex: none; grid-row: span 2; }
.brand-mark .skull { fill: var(--bridge); }
.login-brand .brand-mark .skull { fill: var(--hold); }
.brand-word { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.brand-oh { font: 700 1.9rem/0.9 var(--font-display); color: var(--gilt); letter-spacing: -0.02em; }
.brand-machine { font: 400 0.95rem/1 var(--font-body); color: var(--bone); letter-spacing: 0.02em; }
.brand-cursor { display: inline-block; width: 0.55em; height: 1em; background: var(--gilt); vertical-align: -0.12em; margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
.brand-tag { grid-column: 2; font-size: var(--fs-xs); color: var(--ash-3); }
@keyframes blink { 50% { opacity: 0; } }

.nav { display: flex; flex-direction: column; gap: 16px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group-label { font: 700 0.95rem/1.2 var(--font-display); color: var(--ash-3); padding: 0 10px 6px; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--ash); text-decoration: none; padding: 6px 10px 6px 18px; border-radius: var(--r-sm);
  font: inherit; font-size: var(--fs-sm); background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
  position: relative;
}
.nav-link:hover { background: var(--hold); color: var(--bone); }
.nav-link[aria-current="page"] { color: var(--gilt); background: var(--hold); }
.nav-link[aria-current="page"]::before { content: "›"; position: absolute; left: 6px; color: var(--gilt); }
.nav-count { min-width: 1.7em; padding: 0 6px; border-radius: var(--r-sm); background: var(--gilt); color: var(--gilt-ink); font-size: var(--fs-xs); font-weight: 700; text-align: center; line-height: 1.6; }
.nav-count.is-warn { background: var(--rum); color: var(--gilt-ink); }
.nav-logout { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--rule); }

.main { padding: 32px clamp(16px, 3vw, 44px) 72px; max-width: 1280px; width: 100%; }
.main:focus { outline: none; }

@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; z-index: 20; height: auto; padding: 10px 8px 0; gap: 6px; flex-direction: column; border-right: 0; border-bottom: 1px solid var(--rule); box-shadow: none; }
  .brand { padding: 2px 8px; }
  .brand-mark { width: 26px; height: 28px; }
  .brand-oh { font-size: 1.5rem; }
  .brand-tag { display: none; }
  .nav { flex-direction: row; overflow-x: auto; gap: 2px; padding-bottom: 8px; scrollbar-width: thin; }
  .nav-group { flex-direction: row; gap: 2px; }
  .nav-group-label { display: none; }
  .nav-link { white-space: nowrap; width: auto; padding-left: 10px; }
  .nav-link[aria-current="page"]::before { content: none; }
  .nav-link[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gilt); }
  .nav-logout { margin: 0; padding: 0; border: 0; }
  .main { padding: 22px 16px 64px; }
}

/* ---------- Nagłówki stron ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.page-head > div { min-width: 0; }
.page-head h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.lede { color: var(--ash); max-width: 68ch; margin-top: 4px; }
.row-title { font: 700 1.15rem/1.2 var(--font-display); color: var(--ash); margin-bottom: 12px; }
.section { margin-top: 30px; }
.section > h2 { margin-bottom: 12px; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 1.2;
  padding: 7px 12px; border-radius: var(--r-sm); cursor: pointer; text-decoration: none;
  border: 1px solid var(--rule-strong); background: var(--hold-2); color: var(--bone);
  min-height: 34px;
}
.btn:hover { border-color: var(--gilt); color: var(--bone); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--gilt); border-color: var(--gilt); color: var(--gilt-ink); }
.btn-primary:hover { background: #ecb865; border-color: #ecb865; color: var(--gilt-ink); }
.btn-danger { color: var(--wine); border-color: color-mix(in srgb, var(--wine) 45%, var(--rule)); background: transparent; }
.btn-danger:hover { background: var(--wine-soft); color: #ec8a92; border-color: var(--wine); }
.btn-danger-solid { background: var(--wine); border-color: var(--wine); color: #1a0e10; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ash); }
.btn-ghost:hover { background: var(--hold-2); border-color: transparent; color: var(--bone); }
.btn-wide { width: 100%; }
.btn-sm { min-height: 28px; padding: 4px 9px; font-size: var(--fs-xs); }
.btn kbd { font-weight: 500; }
.btn.is-armed { background: var(--wine); border-color: var(--wine); color: #1a0e10; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--ash); border-top-color: transparent; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

kbd {
  display: inline-block; min-width: 1.6em; padding: 0 5px; border: 1px solid var(--rule-strong);
  border-bottom-width: 2px; border-radius: var(--r-sm); background: var(--bridge); color: var(--gilt);
  font: 600 0.72rem/1.55 var(--font-body); text-align: center;
}
.btn-primary kbd { background: rgba(27, 17, 6, 0.18); border-color: rgba(27, 17, 6, 0.35); color: inherit; }

/* ---------- Formularze ---------- */
.form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label, .field .label { font-size: var(--fs-sm); color: var(--ash); }
.field .hint { font-size: var(--fs-xs); color: var(--ash-3); }
.req { color: var(--wine); }
input[type="text"], input[type="search"], input[type="url"], input[type="number"], input[type="password"], select, textarea {
  font: inherit; color: var(--bone); background: var(--bridge); width: 100%;
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm); padding: 7px 9px; min-height: 36px;
  caret-color: var(--gilt);
}
input::placeholder, textarea::placeholder { color: var(--ash-3); }
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid var(--gilt); outline-offset: 0; border-color: var(--gilt); }
input[readonly], textarea[readonly] { background: var(--hold-2); color: var(--ash); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--gilt); margin: 0; }
.counter { font-size: var(--fs-xs); color: var(--ash-3); font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--rum); }
.counter.is-over { color: var(--wine); font-weight: 700; }
.field-error { color: var(--wine); font-size: var(--fs-sm); }

/* ---------- Komunikaty ---------- */
.notice { border: 1px solid var(--rule); border-left-width: 3px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--hold); }
.notice p + p { margin-top: 6px; }
.notice-error { border-left-color: var(--wine); background: var(--wine-soft); }
.notice-warn { border-left-color: var(--rum); background: var(--rum-soft); }
.notice-info { border-left-color: var(--lavender); background: var(--lavender-soft); }
.notice-ok { border-left-color: var(--verdigris); background: var(--verdigris-soft); }
.empty { padding: 30px 20px; text-align: center; color: var(--ash); border: 1px dashed var(--rule-strong); border-radius: var(--r-md); background: var(--hold); }
.empty strong { display: block; color: var(--bone); font: 700 1.35rem/1.3 var(--font-display); margin-bottom: 6px; }
.empty .btn-row { justify-content: center; margin-top: 12px; }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--bridge); color: var(--bone); border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--gilt); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: toast-in 0.18s ease-out;
}
.toast-error { border-left-color: var(--wine); }
.toast-warn { border-left-color: var(--rum); }
.toast-msg { flex: 1; font-size: var(--fs-sm); }
.toast button { font: inherit; font-size: var(--fs-sm); font-weight: 700; background: none; border: 0; color: var(--gilt); cursor: pointer; padding: 0 2px; }
.toast .toast-close { color: var(--ash-3); font-weight: 400; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Oceny i statusy ---------- */
.score {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
  font: 700 1.2rem/1 var(--font-display); border-radius: var(--r-sm);
  border: 1px solid var(--ash-3); color: var(--ash-3);
}
.score-A { background: var(--gilt); border-color: var(--gilt); color: var(--gilt-ink); }
.score-B { border-color: var(--gilt); color: var(--gilt); }
.score-C { border-style: dashed; }
.score-none { border-style: dotted; font-size: 0.85rem; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--r-sm);
  font-size: var(--fs-xs); background: var(--hold-2); color: var(--ash); border: 1px solid var(--rule);
  white-space: nowrap;
}
.chip-to_invite { background: var(--lavender-soft); color: var(--lavender); border-color: transparent; }
.chip-approved { background: var(--gilt-soft); color: var(--gilt); border-color: transparent; }
.chip-sent { background: transparent; color: var(--bone); border-color: var(--rule-strong); }
.chip-accepted, .chip-in_conversation { background: var(--verdigris-soft); color: var(--verdigris); border-color: color-mix(in srgb, var(--verdigris) 40%, transparent); }
.chip-rejected, .chip-declined_expired, .chip-withdrawn { color: var(--ash-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--wine) 60%, transparent); }
.chip-warn { background: var(--rum-soft); color: var(--rum); border-color: transparent; }
.chip-lead { background: var(--gilt); color: var(--gilt-ink); border-color: var(--gilt); }
/* Termin wysyłki („Wyślij: dziś / od czwartku 26.11 / zaległe od 2 dni”) - SendTiming */
.chip-when { color: var(--gilt); border-color: color-mix(in srgb, var(--gilt) 45%, transparent); background: transparent; }
.chip-when.is-overdue { background: var(--rum-soft); color: var(--rum); border-color: var(--rum); font-weight: 700; }
.chip-when.is-window { color: var(--lavender); border-color: color-mix(in srgb, var(--lavender) 45%, transparent); }
.chip-when.is-future { color: var(--ash-3); border-style: dashed; }

/* ---------- Pulpit ---------- */
.tile-row { margin-bottom: 30px; }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
/* Rząd monitoringu: lejek zajmuje dwie kolumny, żeby etapy miały oddech. */
.tile-grid-monitor { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tile-grid-monitor .tile-funnel { grid-column: span 2; }
@media (max-width: 1180px) {
  .tile-grid, .tile-grid-monitor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-grid-monitor .tile-funnel { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 520px) {
  .tile-grid, .tile-grid-monitor { grid-template-columns: minmax(0, 1fr); }
  .tile-grid-monitor .tile-funnel { grid-column: auto; grid-row: auto; }
}
.tile {
  position: relative;
  display: flex; flex-direction: column; gap: 2px; min-height: 156px; padding: 16px 18px;
  background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md);
  color: var(--bone); text-decoration: none;
}
.tile:hover { border-color: var(--rule-strong); background: var(--hold-2); color: var(--bone); }
.tile:hover .tile-name { color: var(--gilt); }
.tile-name { font-size: var(--fs-sm); color: var(--ash); }
.tile-num { font: 700 var(--fs-2xl)/1 var(--font-display); margin-top: 8px; color: var(--bone); font-variant-numeric: lining-nums tabular-nums; }
.tile-sub { font-size: var(--fs-sm); color: var(--ash); margin-top: 2px; }
.tile-body { margin-top: auto; padding-top: 12px; font-size: var(--fs-sm); }
.tile-body:empty { display: none; }
.tile.is-empty .tile-num, .tile.is-empty .tile-sub { color: var(--ash-3); }
/* Rząd „Do zrobienia”: kafelek z pracą do wykonania dostaje złoty brzeg i złotą liczbę. */
.tile-row-action .tile.has-work { border-color: color-mix(in srgb, var(--gilt) 55%, var(--rule)); box-shadow: inset 3px 0 0 var(--gilt); }
.tile-row-action .tile.has-work .tile-num { color: var(--gilt); }
.tile.is-warn { border-color: color-mix(in srgb, var(--rum) 50%, var(--rule)); box-shadow: inset 3px 0 0 var(--rum); }
.tile.is-warn .tile-sub { color: var(--rum); }

/* Lejek: etykieta | pasek | liczba — po jednym wierszu na etap, z oddechem. */
.funnel-list { list-style: none; margin: 0; padding: 10px 0 0; display: grid; gap: 7px; border-top: 1px solid var(--rule); }
.funnel-list li { display: grid; grid-template-columns: minmax(8.5em, 11.5em) minmax(0, 1fr) 2.6em; gap: 12px; align-items: center; font-size: var(--fs-sm); color: var(--ash); }
.funnel-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel-bar { position: relative; height: 10px; background: var(--bridge); border-radius: 1px; overflow: hidden; }
.funnel-bar span { position: absolute; inset: 0 auto 0 0; min-width: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--gilt) 35%, transparent), var(--gilt)); }
.funnel-list li.is-zero { color: var(--ash-3); }
.funnel-list li.is-zero .funnel-bar span { background: var(--rule-strong); }
.funnel-list li.is-good .funnel-bar span { background: linear-gradient(90deg, color-mix(in srgb, var(--verdigris) 35%, transparent), var(--verdigris)); }
.funnel-list li.is-lost .funnel-bar span { background: color-mix(in srgb, var(--wine) 70%, transparent); }
.funnel-list b { text-align: right; color: var(--bone); font-weight: 400; }
@media (max-width: 520px) { .funnel-list li { grid-template-columns: minmax(0, 1fr) 2.6em; } .funnel-bar { grid-column: 1 / -1; grid-row: 2; } }

.kw-top { list-style: none; margin: 0; padding: 10px 0 0; display: grid; gap: 6px; border-top: 1px solid var(--rule); }
.kw-top li { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); }
.kw-top li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bone); }
.kw-top li span:last-child { color: var(--ash-3); white-space: nowrap; }

/* ---------- Pasek budżetu: arkusz znaczków ---------- */
.budget-panel { margin-top: 8px; }
.budget { background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 14px; }
.budget-figures { display: flex; flex-wrap: wrap; gap: 8px 36px; align-items: baseline; }
.budget-fig { display: flex; align-items: baseline; gap: 8px; }
.budget-fig b { font: 700 var(--fs-xl)/1 var(--font-display); color: var(--gilt); font-variant-numeric: lining-nums; }
.budget-fig span { color: var(--ash); font-size: var(--fs-sm); }
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(11px, 1fr)); gap: 3px; }
.stamps.is-dense { grid-template-columns: repeat(auto-fill, minmax(6px, 1fr)); gap: 2px; }
.stamp { aspect-ratio: 3 / 4; background: var(--stamp-empty); border-radius: 1px; }
.stamp.is-week { background: var(--ash-3); }
.stamp.is-today { background: var(--gilt); box-shadow: 0 0 6px rgba(224, 165, 74, 0.35); }
.stamp.is-available { background: transparent; outline: 1px dashed var(--gilt); outline-offset: -1px; }
.stamp.is-over { background: var(--wine); }
.budget-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--fs-xs); color: var(--ash); list-style: none; margin: 0; padding: 0; }
.budget-legend li { display: inline-flex; align-items: center; gap: 6px; }
.budget-legend .stamp { width: 9px; box-shadow: none; }
.budget-compact { padding: 10px 14px; gap: 8px; }

/* ---------- Kolejki ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md);
  padding: 8px 12px; margin-bottom: 12px;
}
.toolbar.is-sticky { position: sticky; top: 0; z-index: 10; box-shadow: 0 6px 0 var(--velvet); }
@media (max-width: 899px) { .toolbar.is-sticky { position: static; } }
.toolbar .spacer { flex: 1; }
.toolbar-count { font-size: var(--fs-sm); color: var(--ash); }
.toolbar-count b { color: var(--gilt); font-weight: 400; }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); overflow: hidden; }
.seg button { font: inherit; font-size: var(--fs-sm); padding: 5px 11px; border: 0; background: var(--bridge); color: var(--ash); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule-strong); }
.seg button[aria-pressed="true"] { background: var(--gilt); color: var(--gilt-ink); }

.queue-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .queue-layout { grid-template-columns: minmax(0, 1fr); } }
.cheats { position: sticky; top: 64px; background: var(--bridge); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 12px 14px; font-size: var(--fs-sm); }
.cheats h2 { font-size: 1rem; margin-bottom: 10px; color: var(--ash); }
.cheats dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; align-items: center; }
.cheats dt { white-space: nowrap; }
.cheats dd { margin: 0; color: var(--ash); }
@media (max-width: 1100px) { .cheats { position: static; order: -1; } .cheats.is-collapsed dl { display: none; } }
@media (hover: none) { .cheats { display: none; } }

.qlist { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.qrow {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: start;
  background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 14px 16px;
  transition: opacity 0.2s, transform 0.2s;
}
.qrow:focus { outline: none; }
.qrow.is-current { border-color: var(--gilt); box-shadow: inset 3px 0 0 var(--gilt); }
.qrow.is-selected { background: color-mix(in srgb, var(--gilt-soft) 70%, var(--hold)); }
.qrow.is-leaving { opacity: 0; transform: translateX(16px); }
.qrow.has-error { border-color: var(--wine); }
.qrow-check { padding-top: 7px; display: flex; }
.qrow-main { min-width: 0; display: grid; gap: 6px; }
.qrow-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.qrow-name { font: 700 1.35rem/1.2 var(--font-display); color: var(--bone); text-decoration: none; }
.qrow-name:hover { color: var(--gilt); }
.qrow-meta { color: var(--ash); font-size: var(--fs-sm); }
.qrow-reason { color: var(--ash); font-size: var(--fs-sm); max-width: 75ch; }
.qrow-reason b { color: var(--bone); font-weight: 600; }
.qrow-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.qrow-error { color: var(--wine); font-size: var(--fs-sm); font-weight: 600; }
@media (max-width: 700px) {
  .qrow { grid-template-columns: auto auto minmax(0, 1fr); }
  .qrow-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}

/* Notatka = list: krój szeryfowy, złota linia jak margines w księdze. */
.note-box { border-left: 1px solid var(--gilt); padding: 4px 0 4px 12px; max-width: 75ch; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 1.02rem/1.55 var(--font-display); color: var(--bone); }
.note-empty { color: var(--ash-3); font-style: italic; }
.note-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; margin-top: 4px; }
.note-box.is-editing { border-left-color: var(--focus); }
.note-box textarea { min-height: 96px; font: 400 1rem/1.5 var(--font-display); }

/* Do wysłania dziś */
.send-list { counter-reset: send; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.send-card { background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 12px; }
.send-card.is-current { border-color: var(--gilt); box-shadow: inset 3px 0 0 var(--gilt); }
.send-card.is-copied { border-color: var(--verdigris); box-shadow: inset 3px 0 0 var(--verdigris); }
.send-card.is-leaving { opacity: 0; transition: opacity 0.2s; }
.send-head { display: flex; gap: 12px; align-items: center; }
.send-head > div { min-width: 0; }
.send-steps { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.step-btn .step-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; font-size: 0.72rem; }
.next-hint { font-size: var(--fs-sm); color: var(--verdigris); }

/* Oczekujące */
.age { font: 700 var(--fs-xl)/1 var(--font-display); text-align: right; min-width: 3.2em; font-variant-numeric: lining-nums; }
.age small { display: block; font: 400 var(--fs-xs)/1.3 var(--font-body); color: var(--ash-3); font-style: normal; }
.qrow.is-overdue { border-color: color-mix(in srgb, var(--rum) 55%, var(--rule)); background: color-mix(in srgb, var(--rum-soft) 55%, var(--hold)); }
.qrow.is-overdue .age { color: var(--rum); }
.pending-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
@media (max-width: 700px) { .pending-row { grid-template-columns: auto minmax(0, 1fr) auto; } }

/* ---------- Tabele ---------- */
.table-wrap { overflow-x: auto; background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th { font: 700 0.95rem/1.3 var(--font-display); color: var(--ash); background: var(--bridge); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hold-2); }
.table td.num, .table th.num { text-align: right; }
.table a.row-link { color: var(--bone); text-decoration: none; }
.table a.row-link:hover { color: var(--gilt); text-decoration: underline; }
.table tr.is-inactive td { color: var(--ash-3); }
@media (max-width: 700px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .table-cards td { border: 0; padding: 2px 12px; }
  .table-cards td[data-label]::before { content: attr(data-label) ": "; color: var(--ash-3); }
}

/* ---------- Osoby ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filter-chip {
  font: inherit; font-size: var(--fs-sm); padding: 4px 10px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--rule-strong); background: var(--hold); color: var(--ash);
}
.filter-chip:hover { border-color: var(--gilt); color: var(--bone); }
.filter-chip b { color: var(--bone); margin-left: 4px; font-weight: 400; }
.filter-chip[aria-pressed="true"] { background: var(--gilt); color: var(--gilt-ink); border-color: var(--gilt); }
.filter-chip[aria-pressed="true"] b { color: var(--gilt-ink); }
.search-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.search-row input { flex: 1 1 240px; width: auto; }
.search-row select { width: auto; }
details.panel { background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); margin-bottom: 16px; }
details.panel > summary { cursor: pointer; padding: 11px 14px; font: 700 1.05rem/1.3 var(--font-display); color: var(--gilt); list-style-position: inside; }
details.panel > .panel-body { padding: 4px 14px 16px; }

/* ---------- Karta osoby ---------- */
.person-head { display: flex; gap: 16px; align-items: flex-start; }
.person-head .score { width: 46px; height: 46px; font-size: 1.6rem; }
.person-sub { color: var(--ash); margin-top: 6px; }
.person-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .person-grid { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 18px; }
.card + .card { margin-top: 16px; }
.card > h2 { margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.transitions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1px solid var(--rule-strong); display: grid; gap: 14px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 9px; height: 9px; transform: rotate(45deg); background: var(--velvet); border: 1px solid var(--ash-3); }
.timeline li.ev-acceptance::before { background: var(--verdigris); border-color: var(--verdigris); }
.timeline li.ev-status::before { border-color: var(--gilt); }
.timeline li.ev-note::before { border-color: var(--rum); }
.timeline time { display: block; font-size: var(--fs-xs); color: var(--ash-3); }
.timeline .ev-type { color: var(--gilt); margin-right: 6px; }
.danger-zone { border-color: color-mix(in srgb, var(--wine) 45%, var(--rule)); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: var(--fs-sm); margin: 0; }
.kv dt { color: var(--ash-3); }
.kv dd { margin: 0; }

/* ---------- Ustawienia ---------- */
.mode-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.mode-option { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-md); background: var(--hold); cursor: pointer; }
.mode-option:has(input:checked) { border-color: var(--gilt); box-shadow: inset 0 0 0 1px var(--gilt); }
.mode-option input { margin-top: 3px; }
.mode-option strong { display: block; font: 700 1.05rem/1.3 var(--font-display); color: var(--bone); }
.mode-option span { font-size: var(--fs-sm); color: var(--ash); }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Komentarze i powiadomienia ---------- */
.post-card { background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 10px; }
.post-card.is-lead-a { box-shadow: inset 3px 0 0 var(--gilt); }
.post-card.is-current { border-color: var(--gilt); }
.post-excerpt { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--bone); max-width: 75ch; font: 400 1rem/1.55 var(--font-display); }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-sm); color: var(--ash); align-items: center; }
.notif { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 11px 14px; }
.notif.is-read { opacity: 0.55; }
.notif-type { color: var(--gilt); }

/* ---------- Logowanie ---------- */
.bare-main { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 400px; }
.login-card { background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 28px; display: grid; gap: 18px; box-shadow: inset 0 1px 0 rgba(224, 165, 74, 0.15), 0 30px 60px rgba(0, 0, 0, 0.45); }
.login-brand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; color: var(--bone); }
.login-brand .brand-mark { width: 44px; height: 46px; grid-row: span 2; }
.login-brand .brand-oh { font-size: 2.6rem; }
.login-title { font-size: 1.5rem; color: var(--ash); }

.loading { color: var(--ash-3); padding: 16px 0; }
.loading::after { content: "▌"; color: var(--gilt); animation: blink 1.1s steps(1) infinite; margin-left: 4px; }
.send-head-box { margin-bottom: 14px; }
fieldset.mode-options { border: 0; padding: 0; margin: 0; min-width: 0; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--wine); }
.is-leaving { opacity: 0; transition: opacity 0.2s; }
.post-card.is-current { box-shadow: inset 3px 0 0 var(--bone); }
.post-card.is-lead-a.is-current { box-shadow: inset 3px 0 0 var(--gilt); }

/* =====================================================================
 * Warstwa terminalowa: okna z tytułem w ramce, znak zachęty, poświata fosforu.
 * ===================================================================== */

/* Znak marki: pikselowa czaszka, ostre krawędzie. */
.brand-mark { width: 30px; height: auto; aspect-ratio: 11 / 9; image-rendering: pixelated; filter: drop-shadow(0 0 6px rgba(224, 165, 74, 0.25)); }
.login-brand .brand-mark { width: 44px; height: auto; }
.brand-oh { font: 700 1.55rem/1 var(--font-body); letter-spacing: -0.04em; text-shadow: var(--glow); }
.brand-machine { color: var(--ash); }
.brand-machine::before { content: "_"; color: var(--ash-3); }
.brand-cursor { box-shadow: var(--glow); }
.login-brand .brand-oh { font-size: 2.2rem; }

/* Nagłówki jak polecenia w powłoce. */
.page-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em; }
.page-head h1::before { content: "> "; color: var(--gilt); text-shadow: var(--glow); }
.row-title { font: 400 var(--fs-sm)/1.4 var(--font-body); color: var(--ash-3); }
.row-title::before { content: "// "; }
.nav-group-label { font: 400 var(--fs-xs)/1.4 var(--font-body); }
.nav-group-label::before { content: "# "; }
.lede { color: var(--ash); }

/* Kafelek = okno terminala: tytuł wpisany w górną ramkę. */
.tile { padding-top: 20px; margin-top: 8px; }
.tile .tile-name {
  position: absolute; top: -0.75em; left: 12px; padding: 0 6px;
  background: var(--velvet); color: var(--ash); font-size: var(--fs-xs); line-height: 1.5;
  max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tile .tile-name::before { content: "[ "; color: var(--ash-3); }
.tile .tile-name::after { content: " ]"; color: var(--ash-3); }
.tile:hover .tile-name { color: var(--gilt); }
.tile-num { font: 700 2.6rem/1 var(--font-body); letter-spacing: -0.04em; }
.tile-row-action .tile.has-work .tile-num { text-shadow: var(--glow); }
.tile-row-action .tile.has-work .tile-name { color: var(--gilt); }
.tile.is-warn .tile-name { color: var(--rum); }

/* Pozostałe okna z tą samą ramką. */
.card > h2, .cheats h2 { font: 700 var(--fs-md)/1.4 var(--font-body); color: var(--gilt); }
.card > h2::before, .cheats h2::before { content: "## "; color: var(--ash-3); }
.empty strong { font: 700 1.05rem/1.4 var(--font-body); color: var(--gilt); }
.empty strong::before { content: "$ "; color: var(--ash-3); }
.budget-fig b { font: 700 1.6rem/1 var(--font-body); text-shadow: var(--glow); }
.age { font: 700 1.6rem/1 var(--font-body); }
.qrow-name { font: 700 1.05rem/1.3 var(--font-body); }
.score { font: 700 1rem/1 var(--font-body); }
.table th { font: 700 var(--fs-xs)/1.4 var(--font-body); color: var(--ash-3); }
details.panel > summary { font: 700 var(--fs-md)/1.4 var(--font-body); }
.mode-option strong { font: 700 var(--fs-md)/1.4 var(--font-body); }
.login-title { font: 400 var(--fs-md)/1.4 var(--font-body); color: var(--ash); }
.login-title::before { content: "login: "; color: var(--ash-3); }

/* Treść listów (notatki, posty) w tym samym kroju, ale jaśniej i z marginesem jak w edytorze. */
.note-text, .post-excerpt, .note-box textarea { font: 400 var(--fs-md)/1.6 var(--font-body); }
.note-box { border-left: 1px dashed var(--rule-strong); }
.note-empty { font-style: normal; }
.note-empty::before { content: "<pusto> "; }

/* Przycisk główny świeci jak zaznaczony wiersz w terminalu. */
.btn-primary { box-shadow: 0 0 12px rgba(224, 165, 74, 0.15); }
.btn-danger-solid, .btn.is-armed { box-shadow: 0 0 12px rgba(224, 108, 117, 0.2); }

/* ---------- Wklej z LinkedIna ---------- */
.paste-steps { margin: 0 0 14px; padding-left: 1.4em; color: var(--ash); font-size: var(--fs-sm); display: grid; gap: 3px; }
.paste-zone {
  display: grid; gap: 6px; padding: 22px 18px; min-height: 120px; align-content: center; text-align: center; cursor: text;
  border: 1px dashed var(--rule-strong); border-radius: var(--r-md); background: var(--bridge); color: var(--ash);
}
.paste-zone strong { color: var(--bone); font-size: var(--fs-md); }
.paste-zone strong::before { content: "> "; color: var(--gilt); }
.paste-zone:hover { border-color: var(--ash-3); }
.paste-zone:focus, .paste-zone:focus-visible { outline: none; border-style: solid; border-color: var(--gilt); box-shadow: var(--glow); }
.paste-zone:focus strong::after { content: "_"; color: var(--gilt); animation: paste-blink 1s steps(1) infinite; }
.paste-zone.is-filled { border-style: solid; border-color: color-mix(in srgb, var(--verdigris) 55%, var(--rule)); }
.paste-status { font-size: var(--fs-xs); color: var(--verdigris); min-height: 1em; }
@keyframes paste-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .paste-zone:focus strong::after { animation: none; } }

.paste-table .td-check { width: 34px; }
.paste-table .slug { word-break: break-all; }
.paste-table tr.is-excluded td { color: var(--ash-3); }
.paste-table tr.is-excluded td strong { color: var(--ash); }
.paste-table tr.is-saved td:last-child span { color: var(--verdigris); }
.paste-table tr.is-dup td:last-child span { color: var(--ash); }
.paste-table tr.is-error td:last-child span { color: var(--wine); }
.paste-table .post-excerpt { margin-top: 6px; color: var(--ash); border-left: 1px dashed var(--rule-strong); padding-left: 8px; }
.paste-errors { margin: 6px 0; padding-left: 1.2em; font-size: var(--fs-sm); }

.paste-match { margin-top: 12px; display: grid; gap: 12px; }
.paste-match .card-head { margin-bottom: 0; }
.paste-existing summary { cursor: pointer; color: var(--ash); font-size: var(--fs-sm); }
.paste-existing pre { white-space: pre-wrap; margin: 8px 0 0; padding: 10px; max-height: 240px; overflow: auto; background: var(--bridge); border: 1px solid var(--rule); border-radius: var(--r-sm); color: var(--ash); }

.paste-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 14px 0; }
.paste-pair > div { display: grid; gap: 8px; align-content: start; }
.paste-urls details summary { cursor: pointer; font-size: var(--fs-sm); color: var(--verdigris); }
.paste-url-list { margin: 6px 0 0; padding-left: 1.2em; max-height: 200px; overflow: auto; font-size: var(--fs-xs); color: var(--ash); word-break: break-all; }
.paste-recon { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.paste-recon-col { border-left: 3px solid var(--rule-strong); padding-left: 12px; }
.paste-recon-col h3 { font-size: var(--fs-md); margin-bottom: 6px; }
.paste-recon-col.is-good { border-left-color: var(--verdigris); }
.paste-recon-col.is-good h3 { color: var(--verdigris); }
.paste-recon-col.is-lost { border-left-color: var(--wine); }
.paste-recon-col.is-lost h3 { color: var(--wine); }
.paste-recon-col ul { margin: 0; padding-left: 1.2em; font-size: var(--fs-sm); display: grid; gap: 3px; }
.paste-recon-meta { margin: 14px 0 0; padding-left: 1.2em; color: var(--ash); }
.paste-recon + .paste-recon-meta, .paste-recon-meta + .notice, .card .notice + .notice { margin-top: 10px; }

/* ---------- Czytanie LinkedIna: status ---------- */
#read-status { display: grid; gap: 8px; margin-bottom: 14px; }
#read-status:empty { display: none; }
.read-line { font-size: var(--fs-sm); color: var(--ash); }
.read-line::before { content: "$ "; color: var(--ash-3); }
.read-line.is-ok { color: var(--verdigris); }
.read-status-line { margin-top: 10px; font-size: var(--fs-sm); color: var(--ash); }
.read-status-line::before { content: "› "; color: var(--ash-3); }
.read-paused-flag { color: var(--wine); font-weight: 700; text-decoration: none; }
.read-paused-flag:hover { text-decoration: underline; }

/* ---------- „Co działa”, szablony treści, moje posty ---------- */
.chip-variant { background: var(--lavender-soft); color: var(--lavender); border-color: transparent; }
.chip-test { background: transparent; color: var(--rum); border-color: var(--rum); font-weight: 700; letter-spacing: 0.06em; }
.variant-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card > .variant-chips { margin-bottom: 10px; }

.insights-by { width: auto; }
.insights-explain { color: var(--ash); font-size: var(--fs-sm); max-width: 90ch; margin-bottom: 12px; }
.insights-explain b { color: var(--bone); font-weight: 400; border-bottom: 1px dashed var(--bone); }
.insights-table th[scope="row"] { font: 400 var(--fs-sm)/1.4 var(--font-body); color: var(--bone); background: transparent; white-space: normal; }
.insights-label small { display: block; font-size: var(--fs-xs); }
.insights-rate { color: var(--gilt); font-weight: 700; font-variant-numeric: tabular-nums; }
.insights-table tr.is-inactive th[scope="row"], .insights-table tr.is-inactive .insights-rate { color: var(--ash-3); font-weight: 400; }
.insights-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.insights-table .ci-col { min-width: 180px; width: 32%; }
.insights-table td { vertical-align: middle; }

/* Pasek przedziału: skala jak .funnel-bar; jaśniejszy pas = przedział 90%, romb = wynik, pionowa kreska = linia bazowa. */
.ci-bar { position: relative; height: 12px; background: var(--bridge); border-radius: 1px; }
.ci-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--gilt) 10%, transparent), color-mix(in srgb, var(--gilt) 30%, transparent)); }
.ci-band { position: absolute; top: 2px; bottom: 2px; min-width: 2px; background: color-mix(in srgb, var(--gilt) 55%, transparent); border-left: 1px solid var(--gilt); border-right: 1px solid var(--gilt); }
.ci-dot { position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--gilt); transform: rotate(45deg); box-shadow: var(--glow); }
.ci-base { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px solid var(--bone); margin-left: -1px; }
.ci-bar.is-faint .ci-fill { background: color-mix(in srgb, var(--ash-3) 18%, transparent); }
.ci-bar.is-faint .ci-band { background: color-mix(in srgb, var(--ash-3) 35%, transparent); border-color: var(--ash-3); }
.ci-bar.is-faint .ci-dot { background: var(--ash-3); box-shadow: none; }

.verdict { white-space: nowrap; }
.verdict.is-none { color: var(--ash-3); border-style: dashed; background: transparent; }
.verdict.is-up2 { background: var(--verdigris); color: #0f1c18; border-color: var(--verdigris); font-weight: 700; }
.verdict.is-up1 { background: var(--verdigris-soft); color: var(--verdigris); border-color: color-mix(in srgb, var(--verdigris) 40%, transparent); }
.verdict.is-flat { color: var(--ash); }
.verdict.is-down1 { background: var(--rum-soft); color: var(--rum); border-color: transparent; }
.verdict.is-down2 { background: var(--wine); color: #1a0e10; border-color: var(--wine); font-weight: 700; }

.edit-list { display: grid; gap: 10px; }
.edit-item { background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 8px; }
.diff del, .diff-legend del { color: var(--wine); background: var(--wine-soft); text-decoration: line-through; text-decoration-color: var(--wine); }
.diff ins, .diff-legend ins { color: var(--verdigris); background: var(--verdigris-soft); text-decoration: underline; text-underline-offset: 3px; }
.diff-legend { margin-bottom: 8px; }

.tpl-intro { margin-bottom: 14px; max-width: 90ch; }
.tpl-list { display: grid; gap: 12px; }
.tpl-card { display: grid; gap: 10px; }
.tpl-card + .tpl-card { margin-top: 0; }
.tpl-card.is-off { opacity: 0.6; }
.tpl-head { flex-wrap: wrap; margin-bottom: 0; }
.tpl-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.tpl-title h2 { font: 700 var(--fs-md)/1.4 var(--font-body); color: var(--gilt); }
.tpl-code { color: var(--ash-3); font-size: var(--fs-xs); }
.tpl-stat { font-size: var(--fs-sm); color: var(--ash); font-variant-numeric: tabular-nums; margin-right: 6px; }
.tpl-guidance { display: grid; gap: 2px; }
.tpl-guidance p { white-space: pre-wrap; color: var(--ash); font-size: var(--fs-sm); max-width: 90ch; }

.reply-to { border-left: 1px dashed var(--lavender); padding-left: 10px; display: grid; gap: 2px; }
.metrics-form { display: grid; gap: 8px; border-top: 1px solid var(--rule); padding-top: 10px; }
.metrics-title { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.metrics-title b { color: var(--gilt); font-weight: 700; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 160px)); gap: 8px 12px; }
.own-eng { font-size: var(--fs-sm); color: var(--gilt); font-variant-numeric: tabular-nums; }
.own-section { margin-top: 22px; }
.own-publish { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.own-publish .field { flex: 1 1 320px; }
.own-text summary { cursor: pointer; color: var(--ash); font-size: var(--fs-sm); }
.own-text .note-text { margin-top: 6px; }
.post-card.is-off { opacity: 0.6; }
.best-variant-line a { color: var(--gilt); }

/* ---------- Blok „zalogowany” na dole bocznego menu (zastępuje .nav-logout) ---------- */
.nav-user { margin-top: auto; padding: 10px 10px 0; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-user-who { display: flex; flex-direction: column; min-width: 0; }
.nav-user-name { color: var(--bone); font-size: var(--fs-sm); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-name::before { content: "@ "; color: var(--ash-3); font-weight: 400; }
.nav-user-state { color: var(--ash-3); font-size: var(--fs-xs); }
.nav-user-logout { margin: 0; flex: none; }
@media (max-width: 899px) {
  .nav-user { margin: 0 0 0 auto; padding: 0 0 0 10px; border-top: 0; border-left: 1px solid var(--rule); flex: none; gap: 6px; }
  .nav-user-state { display: none; }
  .nav-user-name { max-width: 9em; }
}

/* ---------- Zaangażowanie (migracja 006): tryby wklejania, rozgrzewka, rytm i bank tematów postów ---------- */
.paste-modes-engagement { margin-top: -6px; }
.paste-modes-engagement .toolbar-count { color: var(--ash-3); }
.nav-count.nav-count-soft { background: transparent; color: var(--ash); border: 1px solid var(--rule-strong); font-weight: 400; margin-left: 4px; }
.chip-warmup.is-wait { background: var(--rum-soft); color: var(--rum); border-color: transparent; }
.chip-warmup.is-done { background: var(--verdigris-soft); color: var(--verdigris); border-color: transparent; }
.warmup-line { margin-top: 4px; }
.warmup-blocked { border-top: 1px dashed var(--rule-strong); padding-top: 12px; }
.warmup-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.warmup-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-sm); }
.warmup-list .qrow-meta { color: var(--ash); font-size: var(--fs-sm); }
.chip-due { background: var(--rum-soft); color: var(--rum); border-color: transparent; }
.tile-extra { display: block; margin-top: 6px; font-size: var(--fs-xs); color: var(--ash); }
.tile-lead-a { color: var(--gilt); }
.own-posts-line a { color: var(--gilt); }
.own-cal-box { display: grid; gap: 10px; }
.own-cal-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.own-cal-head .row-title { margin: 0; }
.own-cal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.own-cal-week { display: grid; gap: 4px; padding: 8px; background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-sm); font-size: var(--fs-xs); color: var(--ash); }
.own-cal-week.is-current { border-color: var(--gilt); }
.own-cal-week.is-done .own-cal-num { color: var(--verdigris); }
.own-cal-week.is-missed .own-cal-num { color: var(--rum); }
.own-cal-label { color: var(--ash-3); }
.own-cal-dots { display: flex; flex-wrap: wrap; gap: 3px; min-height: 9px; }
.own-cal-dot { width: 9px; height: 9px; border-radius: 2px; border: 1px dashed var(--rule-strong); }
.own-cal-dot.is-on { background: var(--verdigris); border: 1px solid var(--verdigris); }
.own-cal-num { color: var(--bone); font-weight: 700; }
.own-panels { display: grid; gap: 10px; margin: 12px 0; }
.ideas-form { display: grid; gap: 8px; margin-bottom: 12px; }
.ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.idea { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong); border-radius: var(--r-sm); background: var(--hold); }
.idea.is-to_draft { border-left-color: var(--gilt); }
.idea.is-drafted { border-left-color: var(--verdigris); opacity: 0.8; }
.idea.is-dropped { opacity: 0.55; }
.idea-main { min-width: 0; flex: 1 1 260px; }
.idea-text { margin: 0 0 2px; color: var(--bone); overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .own-cal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .idea .btn-row { width: 100%; }
}

/* ---------- Bezpieczeństwo (migracja 007): kontrola szkiców, RODO, zdrowie konta, dziennik ---------- */
.chip-check { background: var(--rum-soft); color: var(--rum); border-color: var(--rum); font-weight: 700; cursor: help; }
.draft-checks { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; margin: 8px 0; padding: 8px 10px; border: 1px dashed var(--rum); border-radius: var(--r-sm); background: var(--rum-soft); font-size: var(--fs-sm); }
.draft-checks ul { margin: 0; padding-left: 18px; color: var(--bone); flex: 1 1 240px; }
.draft-checks li + li { margin-top: 2px; }
.info-clause { border-top: 1px solid var(--rule); padding-top: 10px; }
.info-clause.is-given p { color: var(--verdigris); }
.info-clause-missing ul { margin: 6px 0 0; padding-left: 18px; }
.privacy-card .btn-row input[type="text"] { flex: 1 1 160px; min-width: 0; }
.privacy-card select { flex: 0 0 auto; }
.safety-health p { margin: 0; }
.safety-health p + p { margin-top: 4px; }
.send-guard { margin-top: 8px; }
.audit-filters { margin: 0; }
.audit-details { overflow-wrap: anywhere; max-width: 42ch; }
.audit-actor-claude { color: var(--lavender); border-color: var(--lavender); }
.audit-actor-system { color: var(--ash); }
@media (max-width: 599px) {
  .audit-details { max-width: none; }
  .privacy-card .btn-row > * { width: 100%; }
}

/* =====================================================================
 * Operacje (migracja 008): sesja dnia, „Moja sieć”, import z LinkedIna, lejek, SSI, segmenty.
 * ===================================================================== */
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.ops-grid > .card + .card { margin-top: 0; }
.ops-grid-tables { grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); }
.section-tight { margin-top: 10px; }
.ops-figures { display: flex; flex-wrap: wrap; gap: 10px 32px; align-items: baseline; }
.ops-figures .budget-fig { flex-direction: column; gap: 4px; align-items: flex-start; }
.ops-notes { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 3px; }

/* Sesja dnia */
.day-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px 28px; align-items: center; }
@media (max-width: 760px) { .day-head { grid-template-columns: minmax(0, 1fr); } }
.day-clock { display: grid; gap: 4px; min-width: 180px; }
.day-time { font: 700 2.6rem/1 var(--font-body); color: var(--gilt); text-shadow: var(--glow); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.day-time.is-over { color: var(--rum); }
.day-goal { height: 6px; background: var(--bridge); border-radius: 1px; overflow: hidden; }
.day-goal span { display: block; height: 100%; width: 0; background: var(--gilt); }
.day-goal span.is-over { background: var(--rum); }
.day-progress { display: grid; gap: 2px; }
.day-progress b { font: 700 1.4rem/1 var(--font-body); color: var(--bone); }
.day-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.day-step { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) minmax(7em, 13em) auto; gap: 6px 14px; align-items: center;
  background: var(--hold); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 12px 14px; }
.day-step-no { font: 700 1.2rem/1 var(--font-body); color: var(--ash-3); text-align: center; }
.day-step-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.day-step-title { font-weight: 700; color: var(--bone); text-decoration: none; }
.day-step-title:hover { color: var(--gilt); text-decoration: underline; }
.day-step-count { display: grid; gap: 1px; text-align: right; }
.day-step-count b { font: 700 1.5rem/1 var(--font-body); color: var(--bone); }
.day-step-count span { color: var(--ash-3); }
.day-step.is-todo { box-shadow: inset 3px 0 0 var(--gilt); }
.day-step.is-todo .day-step-no, .day-step.is-todo .day-step-count b { color: var(--gilt); }
.day-step.is-todo .day-state { background: var(--gilt-soft); color: var(--gilt); border-color: transparent; }
.day-step.is-done .day-state { background: var(--verdigris-soft); color: var(--verdigris); border-color: transparent; }
.day-step.is-done .day-step-title, .day-step.is-clear .day-step-title { color: var(--ash); }
.day-step.is-done .day-step-no::before { content: "✓"; color: var(--verdigris); }
.day-step.is-done .day-step-no { font-size: 0; }
.day-step.is-done .day-step-no::before { font-size: 1.2rem; }
.day-step.is-clear .day-state { color: var(--ash-3); border-style: dashed; background: transparent; }
@media (max-width: 700px) {
  .day-step { grid-template-columns: 2em minmax(0, 1fr); }
  .day-step-count { grid-column: 2; text-align: left; }
  .day-step-check { grid-column: 2; }
}

/* Moja sieć */
.net-list { display: grid; gap: 12px; }
.net-card { display: grid; gap: 10px; }
.net-card + .net-card { margin-top: 0; }
.net-card.is-off { opacity: 0.6; }
.net-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.net-who a { color: var(--bone); text-decoration: none; }
.net-who a:hover { color: var(--gilt); text-decoration: underline; }
.net-reason { color: var(--ash); max-width: 90ch; }
.net-card textarea { font: 400 var(--fs-md)/1.6 var(--font-body); }
.chip-net-to_message { background: var(--gilt-soft); color: var(--gilt); border-color: transparent; }
.chip-net-messaged { background: var(--verdigris-soft); color: var(--verdigris); border-color: transparent; }
.chip-net-skip { color: var(--ash-3); text-decoration: line-through; }
.filters-sep { width: 1px; align-self: stretch; background: var(--rule-strong); margin: 0 4px; }
.chip-segment { background: var(--lavender-soft); color: var(--lavender); border-color: transparent; margin-top: 4px; }
.requalify-btn { margin-top: 6px; }

/* Import z LinkedIna */
.import-people { margin: 6px 0 0; padding-left: 1.2em; font-size: var(--fs-sm); display: grid; gap: 2px; max-height: 240px; overflow: auto; }
#import-form input[type="file"] { color: var(--ash); font: inherit; font-size: var(--fs-sm); }

/* Wykresy SVG (lejek, SSI): elementy rysowane w JS, kolory z motywu. */
.chart-wrap { width: 100%; overflow-x: auto; }
.chart { display: block; width: 100%; height: auto; min-width: 420px; font-family: var(--font-body); }
.chart-grid { stroke: var(--rule); stroke-width: 1; }
.chart-axis { stroke: var(--rule-strong); stroke-width: 1; }
.chart-tick { fill: var(--ash-3); font-size: 11px; }
.chart-val { fill: var(--bone); font-size: 11px; }
.chart-bar-sent { fill: var(--hold-2); stroke: var(--rule-strong); stroke-width: 1; }
.chart-bar-acc { fill: var(--gilt); }
.chart-line { fill: none; stroke: var(--gilt); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--gilt); stroke: var(--hold); stroke-width: 2; }
.chart-hitbox { fill: transparent; }
.chart-hit { outline: none; cursor: default; }
.chart-hit:hover .chart-hitbox, .chart-hit:focus .chart-hitbox { fill: rgba(224, 165, 74, 0.06); }
.chart-hit:hover .chart-dot, .chart-hit:focus .chart-dot { stroke: var(--gilt); }
.chart-legend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--fs-xs); color: var(--ash); }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.chart-key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.chart-key-sent { background: var(--hold-2); border: 1px solid var(--rule-strong); }
.chart-key-acc { background: var(--gilt); }
.ssi-fields { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
#ssi-reminder:not(:empty) { margin-bottom: 12px; }
#ssi > h2 { margin-bottom: 12px; }

/* Baza wiedzy (migracja 010): tezy i artykuły private-debt.pl */
.kn-toolbar select, .kn-toolbar input[type="search"] { width: auto; min-width: 200px; flex: 0 1 320px; }
.kn-list { display: grid; gap: 10px; }
.kn-list .card + .card { margin-top: 0; }
.kn-fact { display: grid; gap: 8px; padding: 14px 16px; }
.kn-fact.is-draft { border-left: 3px solid var(--gilt); }
.kn-fact.is-archived { opacity: 0.65; }
.kn-thesis { color: var(--bone); font-weight: 700; max-width: 90ch; }
.kn-thesis::before { content: "> "; color: var(--gilt); }
.kn-detail, .kn-summary { color: var(--ash); font-size: var(--fs-sm); max-width: 90ch; }
.kn-tags { color: var(--ash-3); font-size: var(--fs-xs); }
.kn-source { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.kn-fact .btn-row .spacer, .kn-article .btn-row .spacer { flex: 1; }
.kn-article { display: grid; gap: 8px; padding: 14px 16px; }
.kn-article.is-off { opacity: 0.65; }
.kn-title { font: 700 var(--fs-md)/1.4 var(--font-body); }
.kn-title a { color: var(--gilt); text-decoration: none; }
.kn-title a:hover, .kn-title a:focus-visible { text-decoration: underline; }
.kn-article-facts, .kn-article-form { border-top: 1px dashed var(--rule-strong); padding-top: 10px; display: grid; gap: 8px; }
.kn-article-facts .kn-fact { background: var(--hold-2); }
.kn-short { font-size: var(--fs-sm); color: var(--ash); max-width: 90ch; }
.kn-short b { color: var(--bone); font-weight: 400; }
.kn-import { margin-bottom: 8px; }
.kn-more { margin-top: 12px; }
@media (max-width: 599px) { .kn-toolbar select, .kn-toolbar input[type="search"] { flex: 1 1 100%; min-width: 0; } }

/* Alerty i BSS (migracja 011): historia alertów w Ustawieniach, karta BSS na karcie osoby */
.alerts-body { white-space: pre-wrap; color: var(--ash); margin: 4px 0 0; }
.alerts-card tr.is-unread td:first-child { border-left: 2px solid var(--gilt); }
.bss-json { max-height: 320px; overflow: auto; }
.bss-card .btn-row input[type="number"] { max-width: 16em; }

/* Rozmowy (migracja 009): skrzynka rozmów, widok rozmowy, sekwencja, panele w „Mojej sieci” i Sesji dnia */
.conv-new { margin-bottom: 16px; }
.conv-new > summary { cursor: pointer; color: var(--gilt); }
.conv-new[open] > summary { margin-bottom: 12px; }
.conv-paste { width: 100%; min-height: 9em; font: inherit; }
.conv-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.conv-list { display: grid; gap: 6px; max-height: calc(100vh - 220px); overflow: auto; padding-right: 2px; }
.conv-item {
  display: grid; gap: 3px; text-align: left; font: inherit; color: var(--bone); cursor: pointer; width: 100%;
  padding: 9px 11px; background: var(--hold); border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong); border-radius: var(--r-sm);
}
.conv-item:hover, .conv-item:focus-visible { border-color: var(--gilt); }
.conv-item.is-current { background: var(--hold-2); border-color: var(--gilt); }
.conv-item-u1 { border-left-color: var(--gilt); }
.conv-item-u2 { border-left-color: var(--rum); }
.conv-item-u4, .conv-item-u5 { opacity: 0.75; }
.conv-item-head { display: flex; align-items: center; gap: 8px; }
.conv-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item-last { color: var(--ash); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.conv-item-next .chip { margin-left: 6px; }
.conv-u1 { background: var(--gilt); color: var(--gilt-ink); border-color: var(--gilt); }
.conv-u2 { background: var(--rum-soft); color: var(--rum); border-color: transparent; }
.conv-u4 { background: var(--lavender-soft); color: var(--lavender); border-color: transparent; }
.conv-u5 { color: var(--ash-3); }
.conv-intent-interested { background: var(--verdigris-soft); color: var(--verdigris); border-color: transparent; }
.conv-intent-no { color: var(--wine); border-color: color-mix(in srgb, var(--wine) 40%, transparent); }
.conv-intent-not_now { background: var(--lavender-soft); color: var(--lavender); border-color: transparent; }
.conv-due { color: var(--rum); font-weight: 700; }
.filter-chip.is-hot b { color: var(--gilt); font-weight: 700; }
.filter-chip.is-hot[aria-pressed="true"] b { color: var(--gilt-ink); }
.conv-detail { display: grid; gap: 14px; min-width: 0; }
.conv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-start; }
.conv-name { font: 700 1.1rem/1.3 var(--font-body); color: var(--gilt); text-decoration: none; }
.conv-name:hover, .conv-name:focus-visible { text-decoration: underline; }
.conv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.conv-next { margin: 0; padding: 8px 10px; border-left: 2px solid var(--gilt); background: var(--hold-2); }
.conv-meta { display: grid; gap: 10px; }
.conv-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.conv-row input[type="text"], .conv-row input[type="url"] { flex: 1 1 240px; width: auto; }
.conv-row select, .conv-row input[type="date"], .conv-row input[type="datetime-local"] { width: auto; }
.conv-months { width: 5.5em; }
.conv-seq-box h3, .conv-thread-box h3, .conv-draft h3 { font: 700 var(--fs-md)/1.4 var(--font-body); color: var(--gilt); margin: 0 0 8px; }
.conv-seq { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: seq; }
.conv-seq li { counter-increment: seq; padding: 2px 10px; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--ash); }
.conv-seq li::before { content: counter(seq) ". "; color: var(--ash-3); }
.conv-seq li.is-done { color: var(--verdigris); border-color: color-mix(in srgb, var(--verdigris) 40%, transparent); }
.conv-seq li.is-current { color: var(--gilt-ink); background: var(--gilt); border-color: var(--gilt); }
.conv-seq li.is-current::before { color: var(--gilt-ink); }
.conv-draft { display: grid; gap: 8px; background: var(--bridge); }
.conv-draft textarea { width: 100%; }
.conv-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.conv-msg { padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--r-sm); max-width: 92%; }
.conv-msg.conv-in { background: var(--hold-2); justify-self: start; }
.conv-msg.conv-out { background: var(--bridge); border-color: color-mix(in srgb, var(--gilt) 30%, var(--rule)); justify-self: end; }
.conv-msg.conv-unknown { border-style: dashed; }
.conv-msg.is-dup { opacity: 0.55; }
.conv-msg-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: var(--fs-xs); color: var(--ash-3); }
.conv-msg-meta b { color: var(--bone); font-weight: 700; }
.conv-msg.conv-out .conv-msg-meta b { color: var(--gilt); }
.conv-msg-del { margin-left: auto; padding: 0 6px; }
.conv-msg-body { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.conv-more > summary { cursor: pointer; color: var(--ash); font-size: var(--fs-sm); }
.conv-more[open] > summary { margin-bottom: 8px; }
.conv-more textarea { width: 100%; }
.conv-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.conv-preview { margin-top: 10px; display: grid; gap: 8px; }
.conv-who { margin-top: 6px; }
.net-quota { margin-bottom: 8px; }
.net-quota b { font: 700 1.4rem/1 var(--font-body); color: var(--gilt); display: block; }
.net-renew-list { margin: 6px 0; padding-left: 1.2em; display: grid; gap: 4px; }
#net-renewals { margin-bottom: 16px; }
.today-conv-figs { margin-bottom: 10px; }
.today-conv-fig { display: grid; gap: 2px; text-decoration: none; color: var(--ash); }
.today-conv-fig b { font: 700 1.4rem/1 var(--font-body); color: var(--bone); }
.today-conv-fig.is-hot b { color: var(--gilt); text-shadow: var(--glow); }
.today-conv-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
#today-conversations, #person-conversation { margin-top: 16px; }
@media (max-width: 1100px) {
  .conv-layout { grid-template-columns: minmax(0, 1fr); }
  .conv-list { max-height: none; }
  .conv-msg { max-width: 100%; }
}

/* Sesja dnia: skróty kroków (LinkedIn / komenda Claude / strona aplikacji) */
.day-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.day-link { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid var(--ash-3, #444); border-radius: 3px;
  background: transparent; color: var(--bone); font: inherit; font-size: .8rem; line-height: 1.6; text-decoration: none; cursor: pointer; }
.day-link:hover, .day-link:focus-visible { border-color: var(--gilt); color: var(--gilt); }
.day-link-ico { font-family: var(--font-mono, monospace); font-weight: 700; font-size: .72rem; color: var(--gilt); }
.day-link-li .day-link-ico { color: #6aa8e0; }

/* Ustawienia → Twój głos → „Twoje poprawki” (migracja 012) */
.inline-stats { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.voice-edit-list { list-style: none; padding: 0; margin: 0; }
.voice-edit-list li { border-top: 1px solid var(--rule); padding: 6px 0; }
.voice-edit-list blockquote { margin: 4px 0 8px; padding: 6px 10px; border-left: 2px solid var(--rule-strong); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }

/* Zadania Claude (migracja 014): przycisk „Uruchom” w Sesji dnia i strona „Zadania” */
.day-link-group { display: inline-flex; gap: 0; }
.day-link-group > .day-link-cmd { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.day-link-run { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.day-link-run.is-offline { opacity: .7; }
.day-link-note { color: var(--ash); font-size: .72rem; }
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.jobs-fig b { font: 700 1.4rem/1.1 var(--font-body); color: var(--bone); display: block; }
.jobs-fig.is-warn b { color: var(--gilt); }
.jobs-meter { height: 4px; background: var(--rule); margin-top: 6px; }
.jobs-meter span { display: block; height: 100%; background: var(--gilt); }
.jobs-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.jobs-kind { display: grid; gap: 6px; align-content: start; }
.jobs-summary { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }
.jobs-status-running { color: var(--gilt); }
.jobs-status-failed { color: #e07a6a; }
.jobs-settings { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.jobs-settings .field input { width: 6em; }

/* Decyzja Maćka (2026-11-19/20): teksty na całą dostępną szerokość - bez łamania na ~70-90 znakach. */
.lede, .qrow-reason, .note-box, .post-excerpt, .insights-explain, .tpl-intro, .tpl-guidance p,
.net-reason, .kn-thesis, .kn-detail, .kn-summary, .kn-short { max-width: none; }

/* Filtry w pasku narzędzi w jednym wierszu (Źródła sygnałów i inne listy) */
.toolbar > select, .toolbar > input { width: auto; flex: 0 1 auto; min-width: 0; }
.toolbar > input[type="search"] { flex: 1 1 16rem; }
.toolbar > .input-narrow { width: 7rem; }

/* Zadania Claude: ikona (?) z opisem zadania */
.jobs-kind-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.jobs-help-btn { flex: none; width: 1.6em; height: 1.6em; border: 1px solid var(--gilt); border-radius: 50%; background: transparent;
  color: var(--gilt); font: 700 .8rem/1 var(--font-mono, monospace); cursor: pointer; }
.jobs-help-btn:hover, .jobs-help-btn[aria-expanded="true"] { background: var(--gilt); color: var(--gilt-ink); }
.jobs-help { display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--bone); border-left: 1px solid var(--gilt); padding-left: 10px; }
.jobs-help ul { margin: 2px 0 0; padding-left: 1.2em; }
.jobs-help[hidden] { display: none; }

/* Kalendarz (C25): termin rozmowy w widoku rozmowy, kalendarz w ustawieniach */
.conv-cal { display: grid; gap: 8px; }
.conv-cal h3 { font: 700 var(--fs-md)/1.4 var(--font-body); color: var(--gilt); margin: 0; }
.conv-cal-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.conv-cal-slots li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.conv-cal-meeting { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.cal-weekdays { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cal-preview { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.cal-preview li { font-family: var(--font-mono, monospace); font-size: var(--fs-sm); }

/* Mapa konta (M10) i „Masz kogoś w środku?” (C20) - company.php, account-ui.js */
.account-insiders { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.account-insider { margin: 0; }
.account-insider textarea { width: 100%; min-height: 8rem; }

/* Długie nazwy firm (np. „… SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ”) nie mogą wychodzić poza ekran na wąskich oknach */
.page-head h1 { overflow-wrap: anywhere; hyphens: auto; }

/* Szybkie odpowiedzi (C26) - conversation-ui.js, settings-quick-replies.js; wklejki jako testy (C27) - paste-fixture.js */
.conv-quick { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--hold-2); }
.conv-quick p { margin: 0; }
.conv-quick-body { white-space: pre-wrap; }
.qr-list { display: grid; gap: 8px; }
.qr-item { border: 1px solid var(--rule); border-radius: 6px; padding: 8px 12px; }
.qr-item.is-draft { border-color: var(--gilt-soft); }
.qr-item > summary { cursor: pointer; line-height: 1.8; }
.qr-editor { display: grid; gap: 8px; margin-top: 8px; }
.qr-editor textarea { width: 100%; }
.paste-fixture { display: grid; gap: 6px; margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--rule-strong); border-radius: 6px; }
.paste-fixture p { margin: 0; }
.paste-fixture pre { margin: 0; max-height: 16rem; overflow: auto; white-space: pre-wrap; font-size: var(--fs-sm); }
