/* PEŁNA SALA – wspólne style strony i narzędzia. Bez zależności zewnętrznych. */

:root {
  color-scheme: light;
  --teal: #0f766e;
  --teal-dark: #0b5a54;
  --teal-ink: #0a3f3b;
  --teal-light: #e3f2f0;
  --teal-mid: #2a9d93;
  --amber: #f0b43c;
  --amber-light: #fff3d6;
  --red: #c62828;
  --red-bg: #fdecec;
  --green: #1b7f3b;
  --green-bg: #e6f6ea;
  --ink: #10233a;
  --muted: #5b6b7b;
  --bg: #f4f7f8;
  --card: #ffffff;
  --line: #dde4e9;
  --empty: #e6eaee;
  --closed: #f7f8fa;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 35, 58, 0.06), 0 8px 24px rgba(16, 35, 58, 0.06);
  --gutter: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { font-family: var(--font); font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: 0.875rem; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 56px 0; }
.section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head .kicker { color: var(--teal); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: 8px; }
.lead { font-size: 1.125rem; color: var(--muted); }

/* Przyciski i pola */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-secondary { background: var(--card); color: var(--teal-dark); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--teal); }
.btn-ghost { background: transparent; color: var(--teal-dark); }
.btn-lg { padding: 16px 26px; font-size: 1.05rem; }
.btn-sm { padding: 8px 12px; font-size: 0.9rem; font-weight: 600; }

label { font-weight: 600; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, .cell:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.35); outline-offset: 1px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field .hint { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 44px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }

/* Etykiety / plakietki */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  background: var(--teal-light); color: var(--teal-ink); vertical-align: middle; white-space: nowrap;
}
.badge.amber { background: var(--amber-light); color: #7a4f00; }
.badge.grey { background: var(--empty); color: var(--muted); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.note-example { color: var(--muted); font-size: 0.85rem; font-style: italic; }

/* Nagłówek strony */
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; color: var(--teal-ink); letter-spacing: 0.02em; }
.brand .logo { width: 30px; height: 30px; flex: none; }
.brand .sub { font-weight: 500; color: var(--muted); font-size: 0.85rem; letter-spacing: 0; }
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { background: var(--teal-light); color: var(--teal-ink); }
.nav a.cta { background: var(--teal); color: #fff; }
.nav a.cta:hover { background: var(--teal-dark); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: #fff; border-bottom: 1px solid var(--line); padding: 10px var(--gutter) 16px; flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; }
}

/* Hero */
.hero { padding: 56px 0 48px; background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 14px; }
.hero h1 .accent { color: var(--teal); }
.hero .lead { font-size: 1.2rem; margin-bottom: 24px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .facts { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 28px; }
.hero .fact strong { display: block; font-size: 1.5rem; color: var(--teal-ink); line-height: 1.1; }
.hero .fact span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Mini-siatka tygodnia w hero (ilustracja CSS) */
.mini-week { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.mini-week .title { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 10px; font-size: 0.95rem; }
.mini-week .grid { display: grid; grid-template-columns: 44px repeat(7, 1fr); gap: 4px; }
.mini-week .grid .h { font-size: 0.72rem; color: var(--muted); text-align: right; padding-right: 4px; align-self: center; }
.mini-week .grid .d { font-size: 0.72rem; color: var(--muted); text-align: center; font-weight: 700; }
.mini-week .grid .c { height: 16px; border-radius: 4px; background: var(--empty); }
.mini-week .grid .c.z { background: var(--teal); }
.mini-week .grid .c.w { background: var(--amber); }
.mini-week .legend { display: flex; gap: 14px; margin-top: 12px; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.mini-week .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.mini-week .kpi { background: var(--teal-light); border-radius: 10px; padding: 10px 12px; }
.mini-week .kpi strong { display: block; font-size: 1.4rem; color: var(--teal-ink); line-height: 1.1; }
.mini-week .kpi span { font-size: 0.78rem; color: var(--muted); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--empty); vertical-align: -1px; margin-right: 4px; }
.swatch.z { background: var(--teal); }
.swatch.w { background: var(--amber); }
.swatch.x { background: var(--closed); border: 1px dashed #c3ccd4; }

/* Problem – oś dnia */
.dayline { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.dayline .row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; margin-bottom: 12px; }
.dayline .row .lbl { font-weight: 700; font-size: 0.95rem; }
.dayline .row .lbl small { display: block; font-weight: 500; color: var(--muted); }
.dayline .bar { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; }
.dayline .bar i { display: block; height: 28px; border-radius: 5px; background: var(--teal-light); border: 1px solid #cfe5e2; }
.dayline .bar i.paid { background: var(--teal-mid); border-color: var(--teal-mid); }
.dayline .bar i.empty { background: repeating-linear-gradient(135deg, #f1f3f5 0 6px, #e1e6ea 6px 12px); border-color: #d7dde3; }
.dayline .bar i.cls { background: var(--teal); border-color: var(--teal); }
.dayline .ticks { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; font-size: 0.72rem; color: var(--muted); }
.dayline .ticks span { text-align: left; }
.dayline .sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.dayline .sum div { background: var(--bg); border-radius: 10px; padding: 12px; }
.dayline .sum strong { display: block; font-size: 1.5rem; line-height: 1.1; color: var(--teal-ink); }
.dayline .sum span { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 640px) {
  .dayline .row { grid-template-columns: 1fr; gap: 6px; }
  .dayline .sum { grid-template-columns: 1fr; }
  .dayline .ticks span:nth-child(even) { visibility: hidden; }
}
.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.proof .card { padding: 18px; }
.proof .card strong { display: block; font-size: 1.6rem; color: var(--teal-ink); line-height: 1.1; margin-bottom: 4px; }

/* Karty */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } }

/* Metoda – 5 kroków */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; }
.step .num { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.step h3 { font-size: 1.05rem; }
.step p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.step .formula { display: block; margin-top: 8px; font-size: 0.85rem; color: var(--teal-ink); background: var(--teal-light); border-radius: 8px; padding: 6px 8px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Oferta */
.offer { display: flex; flex-direction: column; gap: 10px; }
.offer .price { font-size: 1.75rem; font-weight: 800; color: var(--teal-ink); line-height: 1.1; }
.offer .price small { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.offer ul { margin: 0; padding-left: 18px; font-size: 0.93rem; color: var(--muted); }
.offer ul li { margin-bottom: 4px; }
.offer .tag { align-self: flex-start; }
.offer.highlight { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-light), var(--shadow); }
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.paths .card { border-left: 5px solid var(--teal); }
@media (max-width: 640px) { .paths { grid-template-columns: 1fr; } }

/* Tabele */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 0.95rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.wide { min-width: 200px; }
td strong.pos { color: var(--green); }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.before-after .card { text-align: center; }
.before-after .big { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--teal-ink); }
.before-after .card.after .big { color: var(--teal); }
@media (max-width: 560px) { .before-after { grid-template-columns: 1fr; } }

/* O mnie */
.about { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.about .portrait { background: var(--teal-light); border-radius: var(--radius); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.about .portrait svg { width: 70%; height: 70%; }
.about .nums { display: flex; gap: 24px; flex-wrap: wrap; margin: 12px 0 16px; }
.about .nums strong { display: block; font-size: 1.8rem; color: var(--teal-ink); line-height: 1.1; }
.about .nums span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 640px) { .about { grid-template-columns: 1fr; } .about .portrait { max-width: 180px; } }

/* Formularz mini-mapy */
.form-card { max-width: 640px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.thanks { display: none; }
.thanks.show { display: block; }
.thanks .check { width: 56px; height: 56px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }

/* Stopka */
.footer { padding: 32px 0; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

/* ===================== NARZĘDZIE ===================== */
.tool-body { background: var(--bg); }
.tool-top { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.tool-top .inner { display: flex; align-items: center; gap: 14px; padding: 10px var(--gutter); min-height: 60px; flex-wrap: wrap; }
.tool-top .brand { margin-right: auto; }
.tool-top .back { font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; font-size: 0.95rem; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 46px; height: 26px; border-radius: 999px; background: #c9d2da; position: relative; transition: background 0.15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.switch input:checked + .track { background: var(--teal); }
.switch input:checked + .track::after { left: 23px; }
.switch input:focus-visible + .track { outline: 3px solid rgba(15,118,110,0.35); }

.tool-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; max-width: 1360px; margin: 0 auto; padding: 20px var(--gutter) 60px; }
.tool-side { position: sticky; top: 76px; align-self: start; min-width: 0; }
.tool-side nav { display: flex; flex-direction: column; gap: 4px; }
.tool-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.tool-side a svg { width: 20px; height: 20px; flex: none; }
.tool-side a:hover, .tool-side a.active { background: var(--teal-light); color: var(--teal-ink); }
.tool-side a.soon { color: var(--muted); font-weight: 500; }
.tool-side a.soon .badge { margin-left: auto; }
.tool-side .side-note { margin-top: 18px; padding: 12px; background: var(--amber-light); border-radius: 10px; font-size: 0.82rem; color: #6a4500; }
.tool-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (max-width: 900px) {
  .tool-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-side { position: static; }
  .tool-side nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .tool-side a { white-space: nowrap; }
  .tool-side .side-note { display: none; }
}

.module { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; scroll-margin-top: 80px; }
.module-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.module-head h2 { margin: 0; font-size: 1.5rem; }
.module-head .step-tag { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.module .intro { color: var(--muted); margin-bottom: 18px; }

/* Mapa godzin */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
.map-layout > div { min-width: 0; }
@media (max-width: 1100px) { .map-layout { grid-template-columns: 1fr; } }
.map-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); align-items: center; }
.grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hour-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(58px, 1fr)); gap: 4px; min-width: 520px; }
.hour-grid .dh { text-align: center; font-weight: 700; font-size: 0.85rem; padding-bottom: 2px; }
.hour-grid .dh .hours { display: flex; gap: 2px; justify-content: center; align-items: center; margin-top: 4px; }
.hour-grid .dh select { padding: 3px 2px; font-size: 0.75rem; border-radius: 6px; width: auto; min-width: 0; border: 1px solid var(--line); background: #fff; }
.hour-grid .dh .dash { color: var(--muted); font-size: 0.75rem; }
.hour-grid .hl { font-size: 0.8rem; color: var(--muted); text-align: right; padding-right: 6px; align-self: center; font-variant-numeric: tabular-nums; }
.cell {
  height: 30px; border-radius: 6px; border: 1px solid transparent; background: var(--empty); cursor: pointer; padding: 0; font: inherit;
  display: flex; align-items: center; justify-content: center; font-size: 0.72rem; color: transparent; transition: background 0.1s;
}
.cell:hover { filter: brightness(0.95); }
.cell.zajecia { background: var(--teal); color: #fff; }
.cell.wynajem { background: var(--amber); color: #5a3a00; }
.cell.zamkniete { background: var(--closed); border: 1px dashed #d4dbe2; cursor: not-allowed; color: #b7c0c8; }
.cell.zamkniete::after { content: "–"; }
.kpis { display: flex; flex-direction: column; gap: 12px; }
.kpi-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi-card .lbl { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.kpi-card .val { font-size: 2.1rem; font-weight: 800; color: var(--teal-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-card .val small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.kpi-card .formula { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.kpi-card .formula b { color: var(--teal-ink); font-weight: 600; }
.kpi-card.warn { border-color: var(--amber); background: var(--amber-light); }
.kpi-card .sub { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

/* Kalkulator */
.calc-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
@media (max-width: 720px) { .calc-inputs { grid-template-columns: 1fr; } }
.calc-inputs .box { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.calc-inputs .box label { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.calc-inputs .box input { font-size: 1.6rem; font-weight: 800; padding: 8px 44px 8px 12px; color: var(--ink); }
.stepper { display: flex; align-items: stretch; gap: 6px; }
.stepper input { text-align: center; padding: 8px 6px; }
.stepper button {
  width: 52px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 1.5rem; font-weight: 700;
  cursor: pointer; color: var(--teal-ink); flex: none;
}
.stepper button:hover { background: var(--teal-light); }
.result {
  border-radius: 14px; padding: 22px; text-align: center; margin-bottom: 14px; border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.result .big { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.result .txt { font-size: 1.15rem; font-weight: 700; margin-top: 4px; }
.result .math { font-size: 0.95rem; margin-top: 8px; opacity: 0.85; font-variant-numeric: tabular-nums; }
.result.ok { background: var(--green-bg); border-color: #b8e0c2; color: var(--green); }
.result.bad { background: var(--red-bg); border-color: #f1bcbc; color: var(--red); }
.mini-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 560px) { .mini-results { grid-template-columns: 1fr; } }
.mini-results .mr { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; }
.mini-results .mr:hover { border-color: var(--teal); }
.mini-results .mr .lbl { font-size: 0.85rem; color: var(--muted); }
.mini-results .mr .val { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini-results .mr .val.ok { color: var(--green); }
.mini-results .mr .val.bad { color: var(--red); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; color: var(--ink); display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--teal); }
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip .p { color: var(--teal-ink); }
.chip.active .p { color: #fff; }
.calc-foot { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .calc-foot { grid-template-columns: 1fr; } }
.calc-foot .info { background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: 0.9rem; color: var(--muted); }
.calc-foot .info b { color: var(--ink); }

/* Biblioteka */
.lib-context { background: var(--teal-light); border-radius: 10px; padding: 10px 14px; font-size: 0.92rem; color: var(--teal-ink); margin-bottom: 14px; }
.ideas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
@media (max-width: 1100px) { .ideas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ideas { grid-template-columns: 1fr; } }
.idea { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.idea.hidden { display: none; }
.idea .head { display: flex; gap: 12px; align-items: center; }
.idea .icon { width: 44px; height: 44px; border-radius: 50%; background: var(--teal-light); color: var(--teal); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.idea .icon svg { width: 24px; height: 24px; }
.idea h3 { font-size: 1.05rem; margin: 0; }
.idea .meta { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; color: var(--muted); display: grid; gap: 4px; }
.idea .meta li { display: flex; gap: 8px; }
.idea .meta li b { color: var(--ink); font-weight: 600; min-width: 92px; }
.idea .thr { background: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; }
.idea .thr strong { color: var(--teal-ink); }
.idea .why { font-size: 0.85rem; color: var(--muted); margin: 0; }
.idea .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.empty-state { display: none; padding: 20px; text-align: center; color: var(--muted); }
.empty-state.show { display: block; }

/* Tryb prezentacji */
body.prezentacja { font-size: 1.25rem; }
body.prezentacja .tool-layout { max-width: 1600px; }
body.prezentacja .module-head h2 { font-size: 2.2rem; }
body.prezentacja .calc-inputs .box input { font-size: 2.6rem; }
body.prezentacja .calc-inputs .box label { font-size: 1.1rem; }
body.prezentacja .stepper button { width: 72px; font-size: 2rem; }
body.prezentacja .result .big { font-size: clamp(3rem, 9vw, 6rem); }
body.prezentacja .result .txt { font-size: 1.8rem; }
body.prezentacja .result .math { font-size: 1.3rem; }
body.prezentacja .mini-results .mr .val { font-size: 2.4rem; }
body.prezentacja .chip { font-size: 1.15rem; padding: 12px 20px; }
body.prezentacja .kpi-card .val { font-size: 3rem; }
body.prezentacja .cell { height: 40px; }
body.prezentacja .hour-grid .hl, body.prezentacja .hour-grid .dh { font-size: 1rem; }
body.prezentacja .btn { font-size: 1.1rem; padding: 14px 22px; }
body.prezentacja .idea h3 { font-size: 1.3rem; }
body.prezentacja .idea .meta, body.prezentacja .idea .thr { font-size: 1.05rem; }
body.prezentacja .demo-banner { display: block; }
.demo-banner { display: none; background: var(--teal-ink); color: #fff; text-align: center; padding: 8px var(--gutter); font-weight: 600; font-size: 0.95rem; }

@media print {
  .topbar, .tool-top, .tool-side, .btn, .nav { display: none !important; }
  body { background: #fff; }
}
