/* ============================================================
   Kwestionariusz gotowości na AI — ChangeUp
   Paleta i krój przeniesione z changeup.pl (site/assets/style.css).
   Mobile-first, 375 px bez poziomego przewijania, WCAG AA.
   ============================================================ */

:root {
  --c-primary: #086972;      /* ChangeUp Teal */
  --c-primary-deep: #007F8A;
  --c-primary-d: #054E55;    /* Deep Teal */
  --c-teal-light: #C8E4E6;
  --c-teal-soft: #E7F3F4;
  --c-charcoal: #0F1720;
  --c-amber: #F2A64A;
  --c-coral: #FF7A59;
  --c-bg: #ffffff;
  --c-bg-soft: #F9FAFB;
  --c-text: #0F1720;
  --c-text-soft: #4b5563;
  --c-muted: #6b7280;        /* ~5.0:1 na białym — WCAG AA */
  --c-border: #e5e7eb;
  --c-danger: #c84a31;

  --f-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px -5px rgba(8, 105, 114, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

body {
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg-soft);
  overflow-wrap: anywhere;
}

h1, h2, h3 { font-weight: 800; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: 30px; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
p { color: var(--c-text-soft); text-wrap: pretty; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ===== Pasek marki ===== */
.brandbar {
  background: var(--c-primary-d);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brandbar .mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--c-amber);
  flex: none;
}
.brandbar .word { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.brandbar .word b { color: var(--c-teal-light); font-weight: 800; }
.brandbar .sub { margin-left: auto; font-size: 12px; color: var(--c-teal-light); text-align: right; }

/* ===== Ekrany ===== */
.screen { display: none; padding-top: 28px; }
.screen.active { display: block; }

.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}

.kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary-deep);
  margin-bottom: 10px;
}

.lead { margin: 12px 0 20px; font-size: 16px; }

.points { list-style: none; margin: 0 0 24px; }
.points li {
  position: relative;
  padding: 8px 0 8px 30px;
  color: var(--c-text-soft);
  font-size: 15px;
}
/* Wypełniona kropka teal — nie przypomina pola wyboru formularza. */
.points li::before {
  content: '';
  position: absolute;
  left: 5px; top: 16px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--c-primary);
}

/* ===== Przyciski ===== */
.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  transition: background .15s ease, color .15s ease;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover, .btn-primary:active { background: var(--c-primary-d); }
.btn-primary:disabled { background: var(--c-border); color: var(--c-muted); cursor: not-allowed; }
.btn-secondary {
  background: var(--c-bg);
  color: var(--c-primary-d);
  border: 2px solid var(--c-primary);
}
.btn-secondary:hover { background: var(--c-teal-soft); }
.btn-ghost { color: var(--c-primary-d); min-height: 44px; font-weight: 700; }
.btn-ghost:hover { text-decoration: underline; }

.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-row .btn { width: auto; min-width: 0; flex: 1; }

/* ===== Metryczka ===== */
.field { margin-bottom: 22px; }
.field legend, .field .label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--c-text);
}
.choice-list { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-list-stacked { flex-flow: column nowrap; }
.choice-list-stacked .chip { border-radius: var(--radius); text-align: left; }
.chip {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid var(--c-border);
  background: var(--c-bg);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text-soft);
}
.chip[aria-pressed="true"] {
  border-color: var(--c-primary);
  background: var(--c-teal-soft);
  color: var(--c-primary-d);
}

/* ===== Pasek postępu ===== */
.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--c-teal-soft);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--c-primary);
  border-radius: 999px;
  transition: width .2s ease;
}
.progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-primary-d);
  white-space: nowrap;
}

/* ===== Pytanie ===== */
.q-filar {
  font-size: 13px;
  font-weight: 800;
  color: var(--c-primary-deep);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.q-text { font-size: 20px; font-weight: 800; line-height: 1.35; margin-bottom: 18px; }
.q-intro { margin: 0 0 14px; font-size: 15px; }
/* Podpowiedź pod treścią pytania (pole „podpowiedz" w pytania.json). */
.q-hint { font-size: 14px; color: var(--c-muted); margin: -12px 0 16px; }

.answers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.answer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--c-border);
  background: var(--c-bg);
  text-align: left;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--c-text);
  transition: border-color .12s ease, background .12s ease;
}
.answer:hover { border-color: var(--c-primary-l, #86d5db); background: var(--c-bg-soft); }
.answer[aria-pressed="true"] {
  border-color: var(--c-primary);
  background: var(--c-teal-soft);
  color: var(--c-primary-d);
}
.answer .dot {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--c-muted);
}
.answer[aria-pressed="true"] .dot {
  border-color: var(--c-primary);
  background: var(--c-primary);
  color: #fff;
}

/* ===== Szanse ===== */
.limit-note { font-size: 14px; color: var(--c-muted); margin: 6px 0 16px; }

/* ===== Raport ===== */
.report { padding-top: 24px; }
.report .card { margin-bottom: 16px; }
.report-note {
  margin: 14px 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 14px;
}
.reco-card {
  border-top: 4px solid var(--c-primary);
  background: var(--c-teal-soft);
  box-shadow: var(--shadow-lg);
}
.reco-title {
  font-size: clamp(22px, 5vw, 28px);
  line-height: 1.2;
  color: var(--c-primary-d);
}
.reco-details {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  font-size: 15px;
}
.reco-details dt { font-weight: 800; }
.reco-details dd { color: var(--c-text-soft); }

.score-axes { display: grid; gap: 18px; }
.score-axis {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--c-bg-soft);
}
.score-number {
  margin-top: 8px;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  color: var(--c-primary-d);
  letter-spacing: -0.03em;
}
.score-number small { font-size: 22px; color: var(--c-muted); font-weight: 700; }
.score-level {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--c-amber);
  color: var(--c-charcoal);
  font-weight: 800;
  font-size: 15px;
}
.score-desc { margin-top: 12px; font-size: 15px; }
.experience { margin-top: 16px; font-size: 15px; }

@media (min-width: 600px), print {
  .score-axes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.bars { display: grid; gap: 12px; margin-top: 14px; }
.bar-row { display: grid; gap: 4px; }
.bar-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.bar-head .name { font-weight: 700; color: var(--c-text); }
.bar-head .val { font-weight: 800; color: var(--c-primary-d); }
.bar-track {
  height: 12px;
  border-radius: 999px;
  background: var(--c-teal-soft);
  overflow: hidden;
}
.bar-fill { height: 100%; background: var(--c-primary); border-radius: 999px; }
.bar-fill.low { background: var(--c-danger); }
.bar-fill.mid { background: var(--c-amber); }

.list-tight { list-style: none; display: grid; gap: 12px; margin-top: 12px; }
.list-tight li {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  font-size: 15px;
}
.list-tight .t { font-weight: 800; color: var(--c-text); display: block; margin-bottom: 2px; }
.list-tight .why { color: var(--c-text-soft); }
.badge-dane {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fdeee8;
  color: var(--c-danger);
  font-size: 12.5px;
  font-weight: 700;
}
/* Uwaga „najpierw porządek w danych” — raz, nad listą szans. */
.uwaga-dane {
  display: block;
  margin: 12px 0 0;
  padding: 8px 14px;
  border-radius: var(--radius);
}

.plan-item { display: flex; gap: 12px; }
.plan-days {
  flex: none;
  width: 64px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--c-primary-d);
  background: var(--c-teal-soft);
  border-radius: 8px;
  padding: 6px 4px;
  height: fit-content;
}

.next-steps { list-style: decimal; padding-left: 22px; margin-top: 10px; display: grid; gap: 8px; font-size: 15px; color: var(--c-text-soft); }

.cta-box {
  text-align: center;
  background: var(--c-primary-d);
  color: #fff;
  border: none;
}
.cta-box p { color: var(--c-teal-light); }
.cta-box .cta-title { font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.cta-box a {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 28px;
  min-height: 48px;
  border-radius: var(--radius);
  background: var(--c-amber);
  color: var(--c-charcoal);
  font-weight: 800;
  text-decoration: none;
}

.footer-note {
  font-size: 12.5px;
  color: var(--c-muted);
  text-align: center;
  margin-top: 20px;
  line-height: 1.5;
}

.share-note { font-size: 13px; color: var(--c-muted); text-align: center; margin-top: 8px; min-height: 18px; }

/* ===== Druk (Zapisz jako PDF) ===== */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .brandbar, .no-print { display: none !important; }
  .screen { display: none !important; padding-top: 0; }
  #screen-raport { display: block !important; }
  .wrap { max-width: none; padding: 0; }
  .report .card { box-shadow: none; border: 1px solid #ccc; padding: 12px 14px; margin-bottom: 10px; break-inside: avoid; }
  .report-note, .list-tight li { break-inside: avoid; }
  #r-podepnij-karta { break-inside: auto; }
  h3 { break-after: avoid; }
  .report .reco-card { border-top: 3px solid var(--c-primary); }
  .score-axis { padding: 8px; }
  .score-number { font-size: 40pt; }
  .cta-box { background: #fff; color: var(--c-text); border: 1px solid #ccc; }
  .cta-box p, .cta-box .cta-title { color: var(--c-text); }
  .cta-box a { background: none; color: var(--c-primary-d); border: 2px solid var(--c-primary-d); }
  .bar-fill, .bar-track, .score-level, .plan-days, .badge-dane { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
