:root {
  --navy: #1e3a5f;
  --navy-2: #2b4f7c;
  --navy-3: #16304f;
  --gold: #c9a24a;
  --gold-soft: #f4ead2;
  --bg: #f3f5f8;
  --card: #ffffff;
  --line: #e1e6ee;
  --soft: #eef2f7;
  --ok: #1f8a5b;
  --warn: #b7791f;
  --err: #c0392b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg); --muted: #475467; --ink: #101828;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- nagłówek ---------- */
.top {
  display: flex; align-items: center; gap: 18px; padding: 0 22px;
  background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand b { display: block; font-weight: 650; }
.brand small { display: block; color: #a9bbd2; }
.tabs { display: flex; gap: 4px; margin-left: 18px; height: 100%; }
.tab {
  display: flex; align-items: center; color: #c8d4e4; text-decoration: none;
  border: 0; background: none; border-bottom: 3px solid transparent; height: 100%;
}
.tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.tab.active { color: #fff; border-bottom-color: var(--gold); font-weight: 600; }
.badges { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { border-radius: 999px; background: rgba(255,255,255,.1); color: #dbe3ee; white-space: nowrap; }
.badge::before { content: "●"; margin-right: 5px; }
.badge.ok::before { color: #5fd39a; }
.badge.off::before { color: #f0b35a; }
.logout { background: transparent; border: 1px solid rgba(255,255,255,.25); color: #dbe3ee; border-radius: 7px; }
.logout:hover { background: rgba(255,255,255,.1); }

/* ---------- układ ---------- */
.layout { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 20px; padding: 20px 22px; max-width: 1680px; margin: 0 auto; }
.panel { align-self: start; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 12px; }
.panel::-webkit-scrollbar { width: 6px; } .panel::-webkit-scrollbar-thumb { background: #cfd6e0; border-radius: 3px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.step-h { display: flex; align-items: center; }
.step-h h2 { margin: 0; color: var(--navy); text-transform: none; letter-spacing: 0; }
.num { display: inline-grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; flex: none; }
.opt { margin-left: auto; color: #98a2b3; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.link { border: 0; background: none; color: var(--navy-2); padding: 0; text-decoration: none; }
.link:hover { text-decoration: underline; }

textarea, select, input[type=text], input[type=search], input:not([type]), .title {
  width: 100%; border: 1px solid var(--line); background: #fff;
}
textarea { resize: vertical; }
textarea:focus, select:focus, input:focus { outline: 2px solid rgba(43,79,124,.2); border-color: var(--navy-2); }

.btn-gold { border: 0; background: var(--gold); color: #1b2430; white-space: nowrap; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-line { border: 1px solid var(--navy-2); background: #fff; color: var(--navy); font-weight: 600; white-space: nowrap; }
.btn-line:hover:not(:disabled) { background: var(--soft); }
.btn-line:disabled { opacity: .5; cursor: wait; }
.btn-dark { background: var(--navy) !important; color: #fff; border-color: var(--navy) !important; }

/* ---------- 1. sprawa ---------- */
.caserow { display: flex; gap: 6px; }
.caserow select { flex: 1; min-width: 0; }
.casecard { margin-top: 10px; background: #f7f9fc; border-radius: 9px; }
.cc-meta { color: #3b4656; line-height: 1.5; }
.cc-meta b { color: var(--navy); }
.cc-meta .due { color: var(--err); font-weight: 600; }
.cc-meta .tag { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 5px; margin: 2px 4px 0 0; }
.cc-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.osint { margin-top: 10px; font-size: 12.5px; }
.osint summary { cursor: pointer; color: var(--navy-2); font-weight: 600; list-style: none; }
.osint summary::before { content: "▸ "; } .osint[open] summary::before { content: "▾ "; }
.osintrow { display: flex; gap: 6px; margin-top: 8px; }
.osintrow select { flex: 1; min-width: 0; font-size: 12.5px; padding: 6px 8px; }

/* ---------- 2. dokumenty ---------- */
.drop {
  display: flex; align-items: center; gap: 12px; border: 1.5px dashed #b7c1cf;
  cursor: pointer; background: #f7f9fc; transition: .12s;
}
.drop:hover, .drop.over { border-color: var(--navy-2); background: #e9eff7; }
.drop input { display: none; }
.drop-ico { color: var(--navy-2); }
.drop small { display: block; }
.files { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.files li { display: flex; align-items: center; gap: 8px; background: #eef6f1; }
.files li::before { content: "＋"; color: var(--ok); font-weight: 700; }
.files li .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li .s { color: var(--muted); }
.files li button { border: 0; background: none; color: var(--muted); font-size: 15px; padding: 0 2px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.check small { color: var(--muted); font-size: 11px; }
.check.small { font-size: 12px; margin-top: 8px; color: #3b4656; }
.check.disabled { opacity: .5; cursor: not-allowed; }
.cc-docs { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.cc-docs-h { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
#caseDocs { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow: auto; }
#caseDocs li { display: flex; gap: 6px; align-items: center; border-radius: 5px; }
#caseDocs li:hover { background: #f6f8fb; }
#caseDocs li label { flex: 1; display: flex; gap: 6px; align-items: center; cursor: pointer; overflow: hidden; }
#caseDocs li label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#caseDocs li a { color: var(--muted); text-decoration: none; font-size: 13px; }
#caseDocs li .del { border: 0; background: none; color: #b0b8c4; padding: 0 2px; }
#caseDocs li .del:hover { color: var(--err); }
#caseDocs .none { color: var(--muted); }

/* ---------- 3. tryby ---------- */
.mode-full {
  display: flex; align-items: center; width: 100%; text-align: left; margin-bottom: 8px;
  border: 2px solid var(--line); background: linear-gradient(135deg, #fffaf0, #fff); transition: .12s;
}
.mode-full b { display: block; color: var(--navy); }
.mode-full .rec { margin-left: auto; font-weight: 700; color: #8a6414; background: var(--gold-soft); border-radius: 999px; text-transform: uppercase; letter-spacing: .4px; }
.mode-full:hover { border-color: var(--gold); }
.mode-full.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,74,.18); }
.modes-grid { display: grid; grid-template-columns: 1fr 1fr; }
.mode {
  display: flex; text-align: left; border: 1px solid var(--line); background: #fff; line-height: 1.25; transition: .12s;
}
.mode .ico { line-height: 1.1; place-items: center; }
.mode:hover { border-color: var(--navy-2); background: #f8fafd; }
.mode.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.parts { background: #fffaf0; border: 1px solid #efe2c2; }
.parts .ph { display: flex; justify-content: space-between; color: #6b4a10; }
.parts label { display: flex; align-items: center; cursor: pointer; }
.parts .fixed { color: var(--muted); padding: 2px 0 0 22px; }

/* ---------- 4. pytanie ---------- */
.adv { margin-top: 8px; font-size: 12.5px; }
.adv summary { cursor: pointer; color: var(--muted); list-style: none; }
.adv summary::before { content: "⚙ "; }
.adv[open] summary { margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; color: var(--muted); flex: 1; margin-bottom: 8px; }
.row { display: flex; gap: 12px; align-items: end; }

/* ---------- przycisk ---------- */
.runbar { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(243,245,248,0), var(--bg) 30%); padding: 10px 0 4px; z-index: 2; }
.primary {
  width: 100%; border: 0; background: var(--navy); color: #fff;
  font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 2px 6px rgba(30,58,95,.25);
}
.primary:hover { background: var(--navy-2); }
.primary:disabled { background: #8a9bb3; cursor: wait; box-shadow: none; }
.primary kbd { font-size: 10.5px; opacity: .6; font-family: inherit; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 1px 5px; }
.runsum { text-align: center; min-height: 15px; }

/* ---------- historia ---------- */
.history summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; }
.history summary h2 { margin: 0; color: var(--navy); font-weight: 650; }
.history summary h2 .opt { font-weight: 400; margin-left: 6px; }
#historyList { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 2px; }
#historyList li { border-radius: 6px; cursor: pointer; display: flex; gap: 8px; }
#historyList li:hover { background: var(--soft); }
#historyList li .d { color: var(--muted); white-space: nowrap; }
#historyList li .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
#historyList .none { color: var(--muted); cursor: default; }

/* ---------- wynik ---------- */
.result { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: calc(100vh - 100px); min-width: 0; }
.toolbar { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; position: sticky; background: #fff; z-index: 5; border-radius: var(--radius) var(--radius) 0 0; }
.toolbar .title { flex: 1; min-width: 200px; font-weight: 650; border-color: transparent; }
.toolbar .title:hover { border-color: var(--line); }
.casebadge { background: var(--soft); color: var(--navy); border-radius: 6px; font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions button { border: 1px solid var(--line); background: #fff; }
.actions button:hover:not(:disabled) { border-color: var(--navy-2); }
.actions button:disabled { opacity: .4; cursor: default; }

.progress { padding: 12px 16px 6px; border-bottom: 1px solid var(--line); background: #fcfdfe; }
.pbar { background: var(--soft); border-radius: 3px; overflow: hidden; }
.pfill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #e3c27a); transition: width .4s; }
.psteps { list-style: none; display: flex; flex-wrap: wrap; margin: 8px 0 0; padding: 0; color: var(--muted); }
.psteps li::before { content: "○ "; }
.psteps li.run { color: var(--navy); font-weight: 600; } .psteps li.run::before { content: "◔ "; color: var(--gold); }
.psteps li.done { color: var(--ok); } .psteps li.done::before { content: "✓ "; }

.activity { margin: 12px 16px 0; border: 1px solid var(--line); border-radius: 8px; background: #fafbfd; }
.activity summary { padding: 8px 12px; cursor: pointer; color: var(--navy-2); font-weight: 600; }
.activity ol { margin: 0; padding: 0 14px 10px 34px; }
.activity li { margin: 4px 0; }
.activity li code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
.activity li .st { margin-left: 6px; font-size: 11px; }
.activity li .st.ok { color: var(--ok); } .activity li .st.err { color: var(--err); } .activity li .st.run { color: var(--warn); }

.resbody { display: flex; gap: 0; flex: 1; min-width: 0; }
.toc { flex: 0 0 220px; border-right: 1px solid var(--line); padding: 16px 10px 16px 16px; position: sticky; top: 122px; align-self: flex-start; max-height: calc(100vh - 140px); overflow: auto; }
.toc b { display: block; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 6px; }
.toc a { display: block; color: #3b4656; text-decoration: none; border-radius: 6px; line-height: 1.3; }
.toc a.l1 { font-weight: 600; color: var(--navy); margin-top: 4px; }
.toc a.l2 { padding-left: 18px; }
.toc a:hover { background: var(--soft); }
.output { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.empty { max-width: 720px; margin: 40px auto; color: #3b4656; }
.empty h3 { margin: 0 0 16px; color: var(--navy); }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.how > div { background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.how b { display: block; margin: 8px 0 4px; color: var(--navy); }
.how p { margin: 0; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }

.turn + .turn { border-top: 2px solid var(--soft); margin-top: 18px; padding-top: 6px; }
.ask { background: var(--soft); border-left: 3px solid var(--gold); border-radius: 6px; margin: 14px 0 6px; white-space: pre-wrap; }
.ask .meta { color: var(--muted); display: block; margin-bottom: 2px; }
.md h1 { color: #fff; background: var(--navy); margin: 26px -8px 12px; border-radius: 8px; scroll-margin-top: 130px; }
.md h2 { color: var(--navy); margin: 22px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; font-weight: 650; scroll-margin-top: 130px; }
.md h3 { margin: 18px 0 6px; color: var(--navy-2); }
.md h4 { font-size: 14.5px; margin: 14px 0 4px; }
.md table { border-collapse: collapse; width: 100%; margin: 10px 0 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); text-align: left; vertical-align: top; }
.md th { background: #e8ecf2; font-weight: 600; }
.md tr:nth-child(even) td { background: #fafbfd; }
.md code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.md pre { background: #f6f8fb; border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; }
.md blockquote { border-left: 3px solid var(--gold); margin: 10px 0; padding: 4px 14px; color: #3b4656; background: #fcfaf4; }
.md a { color: var(--navy-2); }
.cursor::after { content: "▍"; color: var(--gold); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.notice { background: #fff7e6; border: 1px solid #f3d39b; color: #7a4f0c; padding: 8px 12px; border-radius: 8px; font-size: 13px; margin: 10px 0; }
.errorbox { background: #fdecea; border: 1px solid #f5b7b1; color: #8e2b20; padding: 10px 12px; border-radius: 8px; margin: 12px 0; font-size: 13.5px; }

.followup { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; background: #fbfcfe; position: sticky; bottom: 0; }
.followup textarea { flex: 1; }
.followup .primary { width: auto; padding: 10px 18px; }
.attach { cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: flex; gap: 4px; align-items: center; }
.attach input { display: none; }
.attach span { font-size: 12px; color: var(--navy-2); }
.statusbar { color: var(--muted); padding: 6px 16px 10px; min-height: 26px; }
.spinner { display: inline-block; width: 11px; height: 11px; border: 2px solid #c3cddb; border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- dialogi ---------- */
.dlg { border: 0; border-radius: 14px; padding: 0; width: min(680px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dlg.wide { width: min(1150px, 96vw); }
.dlg::backdrop { background: rgba(20, 30, 45, .45); }
.dlg form { padding: 20px 22px; }
.dlg h3 { margin: 0 0 14px; color: var(--navy); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.grid2 label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.grid2 .full { grid-column: 1 / -1; }
.grid2 input, .grid2 select, .grid2 textarea { border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; width: 100%; }
.dlg-foot { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.dlg-foot .spacer { flex: 1; }
.dlg-foot button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 14px; }
.dlg-foot .primary.small { width: auto; padding: 9px 18px; border: 0; background: var(--navy); color: #fff; }
.dlg .danger { color: var(--err); border-color: #f0c4bd; }
.dlg .danger.armed { background: var(--err); color: #fff; }
.dlg .err { color: var(--err); font-size: 13px; margin-top: 8px; min-height: 16px; }
.dlg-headrow { display: flex; gap: 10px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.dlg-headrow h3 { margin: 0; white-space: nowrap; }
.dlg-headrow input { flex: 1; }
.dlg .x { border: 0; background: none; font-size: 22px; color: var(--muted); padding: 0 6px; }
.tablewrap { max-height: 70vh; overflow: auto; }
table.cases { width: 100%; border-collapse: collapse; }
table.cases th { position: sticky; top: 0; background: #eef2f7; text-align: left; padding: 8px 10px; font-weight: 600; color: #3b4656; }
table.cases td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
table.cases tbody tr { cursor: pointer; }
table.cases tbody tr:hover td { background: #f6f9fd; }
table.cases tr.done td { color: var(--muted); }
table.cases .st { font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: #e6f4ec; color: var(--ok); }
table.cases .st.wstrzymana { background: #fff3dc; color: var(--warn); }
table.cases .st.zakończona { background: #eceff3; color: var(--muted); }
table.cases .due { color: var(--err); font-weight: 600; }
table.cases .empty-row td { text-align: center; color: var(--muted); padding: 30px; cursor: default; }

/* ---------- dwa widoki: przygotowanie (wyśrodkowane) / wynik (pełna szerokość) ---------- */
.setup-head { display: none; }
.layout.setup { grid-template-columns: 1fr; max-width: none; }
.layout.setup .result { display: none; }
.layout.setup .panel {
  position: static; max-height: none; overflow: visible; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; align-items: start;
}
.layout.setup .setup-head { display: flex; grid-column: 1 / -1; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 6px 2px 2px; }
.layout.setup .setup-head h1 { margin: 0 0 4px; color: var(--navy); }
.layout.setup .setup-head p { margin: 0; }
.layout.setup .step:nth-of-type(3), .layout.setup .step:nth-of-type(4) { grid-column: 1 / -1; }
.layout.setup #modes { display: grid; grid-template-columns: 1fr; gap: 0; }
.layout.setup .mode-full { padding: 16px 18px; }
.layout.setup .parts { display: grid; gap: 2px 16px; }
.layout.setup .parts .ph, .layout.setup .parts .fixed { grid-column: 1 / -1; }
.layout.setup .parts .fixed { padding-left: 0; }
.layout.setup .runbar { grid-column: 1 / -1; position: static; background: none; padding: 6px 0 4px; display: flex; flex-direction: column; align-items: center; }
.layout.setup .history { grid-column: 1 / -1; }
.layout.setup #historyList { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2px 12px; }
.layout.setup .drop { padding: 22px 16px; justify-content: center; }
.layout.setup #caseDocs { max-height: 260px; }

.layout.result-view { grid-template-columns: 1fr; max-width: none; }
.layout.result-view .panel { display: none; }

@media (max-width: 900px) {
  .layout.setup .panel { grid-template-columns: 1fr; }
  .layout.setup .modes-grid { grid-template-columns: 1fr 1fr; }
  .layout.setup .parts { grid-template-columns: 1fr; }
}
/* ---------- responsywność ---------- */
@media (max-width: 1250px) { .toc { display: none; } }
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .panel { position: static; max-height: none; }
  .tabs { display: none; }
  .how { grid-template-columns: 1fr; }
}
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } .badges { display: none; } }

/* ---------- czytelność: większe elementy i czcionki ---------- */
.step-sub { margin: -4px 0 14px 42px; line-height: 1.5; }
.step-h { gap: 12px; margin-bottom: 10px; }
textarea, select, input[type=text], input[type=search], input:not([type]), .title { border-radius: 10px; }
.btn-gold { border-radius: 10px; }
.btn-line { border-radius: 10px; }
.casecard { padding: 14px 16px; }
.cc-meta .tag { padding: 2px 8px; }
.drop { border-width: 2px; border-radius: 14px; }
.drop small { margin-top: 4px; }
.files li { border-radius: 8px; }
.check input, .parts input, #caseDocs input { accent-color: var(--navy); }
#caseDocs li { padding: 6px 4px; }
.mode-full { border-radius: 14px; }
.mode-full .ico { color: var(--gold); place-items: center; }
.modes-grid { gap: 10px; margin-top: 4px; }
.mode { border-radius: 12px; font-size: 15px; }
.mode b { display: block; }
.mode small { display: block; line-height: 1.4; }
.parts { margin-top: 14px; border-radius: 12px; }
.parts .ph { margin-bottom: 6px; }
.primary { padding: 15px; border-radius: 12px; }
.runsum { margin-top: 8px; }
.tab { padding: 0 16px; }

.layout.setup { padding-top: 28px; }
.layout.setup .panel { gap: 20px; }
.layout.setup .step { padding: 22px 26px; border-radius: 16px; }
.layout.setup .runbar .primary { border-radius: 14px; max-width: 720px; }
.layout.setup .runbar .primary kbd { font-size: 12px; }

/* wynik */
.actions button { border-radius: 9px; }
.psteps { gap: 6px 18px; }
.pbar { height: 8px; }
.toc a { padding: 6px 10px; }
.output { padding: 12px 36px 36px; }
.ask { padding: 11px 15px; }
.activity { font-size: 14px; }

@media (max-width: 1100px) { .layout.setup .modes-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .layout.setup .modes-grid { grid-template-columns: 1fr; } .step-sub { margin-left: 0; } }

@media print {
  .top, .panel, .toolbar .actions, .followup, .statusbar, .activity, .ask .meta, .toc, .progress, .casebadge { display: none !important; }
  .layout { display: block; padding: 0; }
  .result { border: 0; min-height: 0; box-shadow: none; }
  .toolbar { border: 0; padding: 0 0 8px; position: static; }
  .toolbar .title { border: 0; font-size: 20px; padding: 0; }
  .output { padding: 0; font-size: 11pt; }
  .md h1 { color: var(--navy); background: none; border-bottom: 2px solid var(--navy); margin: 18px 0 8px; padding: 0 0 4px; page-break-after: avoid; }
  .md table { display: table; }
  body { background: #fff; }
}

/* ---------- większe ikony ---------- */
.mode { align-items: center; }
.mode .ico { flex: none; display: grid; background: #f1f4f9; }
.mode.active .ico { background: rgba(255,255,255,.14); }
.mode-full { gap: 18px; }
.mode-full .ico { flex: none; display: grid; background: var(--gold-soft); }
.drop-ico { display: grid; place-items: center; border-radius: 14px; background: #e3eaf4; flex: none; }
.how .num { width: 40px; height: 40px; font-size: 18px; }
.layout.setup .step:nth-of-type(1), .layout.setup .step:nth-of-type(2) { align-self: stretch; }

/* ---------- pełna szerokość ekranu ---------- */
.layout.setup { padding: 28px 36px 40px; }
.layout.result-view { padding: 20px 36px; }
.layout.setup .modes-grid { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.layout.setup .parts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 700px) { .layout.setup, .layout.result-view { padding: 14px; } }

/* ---------- jeszcze większe czcionki i ikony ---------- */
.top { height: 68px; } .brand small { font-size: 13px; }
.brand svg { width: 36px; height: 36px; }
.badge { font-size: 13.5px; padding: 5px 12px; }
.logout { font-size: 15px; padding: 8px 15px; }
.toolbar { top: 68px; }

textarea, select, input[type=text], input[type=search], input:not([type]), .title { padding: 13px 15px; }
.btn-gold { padding: 13px 20px; }
.btn-line { padding: 11px 16px; }
.cc-meta .tag { font-size: 14.5px; }
.osint, .osint summary { font-size: 16px; }

.drop { padding: 26px 22px; }
.drop-ico { width: 68px; height: 68px; font-size: 42px; }
.files li { padding: 11px 14px; }
.check input, .parts input, #caseDocs input { width: 22px; height: 22px; }

.mode-full { padding: 22px 24px; }
.mode-full .ico { width: 80px; height: 80px; font-size: 50px; border-radius: 20px; }
.mode-full .rec { font-size: 13.5px; padding: 6px 12px; }
.mode { padding: 18px 20px; gap: 18px; }
.mode .ico { width: 68px; height: 68px; font-size: 40px; border-radius: 16px; }
.mode b { margin-bottom: 5px; }
.parts { padding: 18px 20px; }
.parts label { padding: 6px 0; gap: 10px; }
.field { font-size: 15.5px; }
.primary { font-size: 19px; }
.layout.setup .runbar .primary { padding: 22px; }
#historyList li { padding: 11px 12px; }

/* wynik */
.actions button { padding: 10px 16px; }
.casebadge { font-size: 15px; padding: 8px 13px; }
#editInputBtn { font-size: 16px; }
.toc { flex-basis: 280px; }
.toc b { font-size: 13px; }
.md h1 { padding: 14px 20px; }
.md th, .md td { padding: 10px 13px; }
.activity, .activity summary { font-size: 15.5px; }
.followup .primary { font-size: 17px; }
.attach { font-size: 24px; padding: 10px 12px; }
.empty h3 { font-size: 26px; } .how b { font-size: 19px; } .how p { font-size: 16.5px; }
table.cases { font-size: 15.5px; }
.grid2 label { font-size: 14.5px; } .grid2 input, .grid2 select, .grid2 textarea { font-size: 16.5px; padding: 11px 13px; }
.dlg h3 { font-size: 22px; }

/* ---------- wyraźniejsze i większe litery ---------- */
body { font-size: 18.5px; }
body, button, input, select, textarea { font-weight: 500; }
.layout.setup .setup-head h1 { font-size: 40px; font-weight: 750; }
.layout.setup .setup-head p { font-size: 20px; color: #344054; }
.step-h h2 { font-size: 26px; font-weight: 750; }
.num { width: 44px; height: 44px; font-size: 21px; }
.step-sub { font-size: 17.5px; margin-left: 56px; color: #344054; }
.opt { font-size: 15.5px; font-weight: 600; }
textarea, select, input[type=text], input[type=search], input:not([type]), .title { font-size: 18.5px; color: var(--ink); border-color: #c9d2df; }
::placeholder { color: #667085; opacity: 1; }
.btn-gold { font-size: 18.5px; font-weight: 750; }
.btn-line { font-size: 17.5px; }
.link { font-size: 17px; font-weight: 600; }
.casecard { font-size: 17.5px; }
.cc-meta b { font-size: 20px; }
.drop { font-size: 20px; }
.drop small { font-size: 16.5px; color: #475467; }
.files li { font-size: 18px; }
.check, .check.small { font-size: 18px; }
#caseDocs { font-size: 18px; }
.cc-docs-h { font-size: 15px; font-weight: 700; }
.mode-full b { font-size: 27px; font-weight: 750; }
.mode-full small { font-size: 18px; color: #344054; }
.mode b { font-size: 20px; font-weight: 700; }
.mode small { font-size: 16.5px; color: #475467; }
.mode.active small { color: #dbe4f0; }
.parts { font-size: 18px; }
.parts .ph { font-size: 18.5px; font-weight: 700; }
.adv, .adv summary { font-size: 17.5px; }
.layout.setup .runbar .primary { font-size: 24px; font-weight: 750; }
.runsum { font-size: 17px; color: #344054; }
.history summary h2 { font-size: 21px; }
#historyList li { font-size: 18px; }
.tab { font-size: 18px; font-weight: 600; }
.brand b { font-size: 19px; }
/* wynik */
.output { font-size: 19px; line-height: 1.72; color: var(--ink); }
.md h1 { font-size: 28px; }
.md h2 { font-size: 23px; }
.md h3 { font-size: 20px; }
.md table { font-size: 17.5px; }
.toc { font-size: 17px; } .toc a.l2 { font-size: 15.5px; }
.toolbar .title { font-size: 21px; }
.actions button { font-size: 17px; font-weight: 600; }
.ask { font-size: 18.5px; } .ask .meta { font-size: 15.5px; }
.psteps { font-size: 16.5px; font-weight: 600; }
.followup textarea { font-size: 18.5px; }
.statusbar { font-size: 16px; }

/* przerwanie analizy */
.btn-stop { background: #fff !important; color: var(--err) !important; border: 1.5px solid var(--err) !important; font-weight: 700; }
.btn-stop:hover { background: #fdecea !important; }

/* koszt w tabeli spraw */
table.cases td.cost { white-space: nowrap; text-align: right; }
