/* ============ B2B czy UoP — styles ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #e3e9f2;
  --ink: #17233b;
  --dim: #5d6b84;
  --navy: #1d3557;
  --blue: #3563e9;
  --green: #16a34a;
  --green-bg: #ecfdf3;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 20px;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --shadow: 0 10px 34px rgba(23, 35, 59, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(800px 380px at 90% -5%, #3563e912, transparent 60%),
    radial-gradient(700px 350px at 0% 10%, #16a34a0e, transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: clamp(18px, 4vw, 48px); }

/* ---------- hero ---------- */
.hero { text-align: center; max-width: 780px; margin: 0 auto; padding-top: clamp(6px, 2.5vh, 26px); }
.kicker {
  display: inline-block;
  background: #3563e912;
  border: 1px solid #3563e930;
  color: var(--blue);
  padding: 6px 16px; border-radius: 999px;
  font-weight: 500; font-size: 0.82rem;
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(1.9rem, 5.4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--navy);
}
.hero h1 em { font-style: normal; color: var(--blue); }
.subtitle { margin-top: 14px; color: var(--dim); font-size: clamp(0.98rem, 2.3vw, 1.1rem); line-height: 1.6; }

/* ---------- panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 30px);
}

/* ---------- controls ---------- */
.controls { margin-top: clamp(26px, 4vh, 42px); }
.control-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .control-grid { grid-template-columns: 1fr; } }
.field { min-width: 0; }
.label { display: block; font-size: 0.86rem; font-weight: 500; color: var(--dim); margin-bottom: 7px; }
.unit { color: #5d6b84; font-size: 0.8em; }
input[type="number"] {
  width: 100%;
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="number"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px #3563e922; }

.control-row {
  display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-end;
  margin-top: 20px;
}
.opt-group { flex: 1 1 240px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn {
  font-family: inherit; font-size: 0.86rem; font-weight: 500;
  background: #f8fafd;
  border: 1px solid var(--line);
  color: var(--dim);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 700;
}
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 0.92rem; color: var(--dim); cursor: pointer; padding-bottom: 10px; }
.check input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; }
.check.check-disabled { opacity: 0.45; cursor: default; }
.check.check-disabled input { cursor: default; }

/* ---------- results ---------- */
.results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 22px;
}
@media (max-width: 1020px) { .results { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .results { grid-template-columns: 1fr; } }

.result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.result-card.best {
  border-color: var(--green);
  background: linear-gradient(180deg, var(--green-bg), var(--panel) 55%);
}
.result-card.best::before {
  content: 'najlepiej';
  position: absolute; top: -11px; right: 14px;
  background: #15803d; color: #fff;
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.rc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.rc-emoji { font-size: 1.25rem; }
.rc-head h2 { font-size: 0.98rem; font-weight: 700; color: var(--navy); }
.rc-net span {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 3.4vw, 2rem);
  font-weight: 700;
  color: var(--ink);
}
.result-card.best .rc-net span { color: var(--green); }
.rc-net small { display: block; color: var(--dim); font-size: 0.78rem; margin-top: 2px; }
.rc-details { list-style: none; margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.rc-details li {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 0.8rem; color: var(--dim);
  padding: 3px 0;
}
.rc-details b { font-family: var(--mono); font-weight: 500; color: var(--ink); white-space: nowrap; }

/* ---------- verdict ---------- */
.verdict { margin-top: 22px; text-align: center; }
.verdict h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); color: var(--navy); }
.verdict p { color: var(--dim); margin-top: 8px; font-size: 0.98rem; }
.verdict-bars { margin: 20px auto 0; max-width: 640px; display: flex; flex-direction: column; gap: 10px; }
.vbar { display: grid; grid-template-columns: 130px 1fr 90px; align-items: center; gap: 10px; font-size: 0.85rem; }
.vbar .vname { text-align: right; color: var(--dim); font-weight: 500; }
.vbar .vtrack { display: block; background: #eef2f8; border-radius: 999px; height: 22px; overflow: hidden; }
.vbar .vfill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), #6d8dff); transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.vbar.best .vfill { background: linear-gradient(90deg, var(--green), #4ade80); }
.vbar .vval { font-family: var(--mono); font-weight: 700; text-align: left; white-space: nowrap; }
@media (max-width: 560px) { .vbar { grid-template-columns: 90px 1fr 80px; font-size: 0.78rem; } }

.btn {
  font-family: inherit; font-weight: 700; font-size: 1rem;
  border: none; border-radius: 12px; cursor: pointer;
  padding: 13px 26px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn.share {
  background: var(--blue); color: #fff;
  margin-top: 22px;
  box-shadow: 0 8px 24px #3563e945;
}
.btn.share:hover { opacity: 0.93; transform: translateY(-1px); }

/* ---------- employer ---------- */
.employer { margin-top: 22px; }
.employer h2 { font-size: 1.15rem; color: var(--navy); margin-bottom: 10px; }
.employer p { color: var(--dim); line-height: 1.65; font-size: 0.98rem; }
.employer strong { color: var(--ink); font-family: var(--mono); font-size: 0.95em; }

/* ---------- notes ---------- */
.notes { margin-top: clamp(44px, 7vh, 70px); }
.notes h2, .faq h2 { text-align: center; font-size: clamp(1.35rem, 3.4vw, 1.9rem); font-weight: 800; color: var(--navy); margin-bottom: 24px; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.note-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex; gap: 12px; align-items: flex-start;
}
.note-card span { font-size: 1.5rem; }
.note-card p { font-size: 0.9rem; color: var(--dim); line-height: 1.55; }
.note-card strong { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { margin-top: clamp(44px, 7vh, 70px); }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 16px 20px;
  font-weight: 700; font-size: 0.98rem; color: var(--navy);
  list-style: none; position: relative; padding-right: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--blue); font-size: 1.3rem; font-weight: 400;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--dim); line-height: 1.65; font-size: 0.93rem; }

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(44px, 7vh, 70px);
  text-align: center;
  color: var(--dim);
  font-size: 0.88rem;
  line-height: 1.8;
  padding-bottom: 30px;
}
.footer .muted { color: #7a889f; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--navy); color: #fff;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 12px 32px rgba(23, 35, 59, 0.35);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 50;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ==== dodatki SEO/a11y ==== */
.noscript-note { background: #fff3cd; color: #5a4500; padding: 12px 16px; border-radius: 10px; margin: 16px auto; max-width: 720px; font-size: 0.95rem; }
.more-tools { margin-top: 14px; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.more-tools a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.more-tools a:hover { opacity: 0.75; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto !important; }
}
