/* Tokeny z youniversity.be (stan 2026-10-28). Bebas Neue Pro jest hostowany przez youniversity.be
   bez CORS, więc poza ich domeną działa zapasowy Oswald, tak jak w ich własnym stosie fontów. */
:root {
  --bg: #00021c;
  --surface: #10162a;
  --surface-hover: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.24);
  --text: #d0d5dd;
  --text-strong: #ffffff;
  --muted: #98a2b3;
  --accent: #d32244;
  --accent-hover: #e3385a;
  --accent-soft: rgba(211, 34, 68, 0.16);
  --ok: #55cfa4;

  --display: "Bebas Neue Pro", Oswald, "Arial Narrow", sans-serif;
  --body: Lato, "Helvetica Neue", Arial, sans-serif;

  --measure: 44rem;

  /* Ruch: mocny ease-out na wejścia i reakcje, krótkie czasy */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --press: 120ms;
  --radius-card: 20px;
}

* { box-sizing: border-box; }

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

button, a, .option { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.7 var(--body);
}

/* Pasek górny jak na youniversity.be */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 2, 28, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo-link { color: var(--text-strong); display: inline-flex; }
.logo { height: 22px; width: auto; }
.topbar-label {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.topbar-company:not(:empty)::before { content: " · "; }
.topbar-company { color: var(--text-strong); }

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
}

.app { flex: 1; }

/* Typografia */
.eyebrow {
  font: 700 0.8125rem/1.4 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.eyebrow:focus { outline: none; }
.eyebrow-muted { color: var(--muted); }

.display {
  font: 700 clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem)/1 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text-strong);
  margin: 0 0 1.5rem;
}
.display:focus { outline: none; }
.display-thesis { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); margin-bottom: 1rem; }

.intro {
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 2rem;
  max-width: 36rem;
}

/* Zdanie składane z odpowiedzi */
.sentence {
  font: 300 clamp(1.5rem, 1.15rem + 1.6vw, 2.125rem)/1.45 var(--body);
  color: var(--text-strong);
  margin: 0 0 2.5rem;
  text-wrap: pretty;
}
.filled {
  color: var(--text-strong);
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 100% 3px, var(--accent-soft);
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-color 150ms ease;
}
.filled.is-new { animation: fill-in 320ms var(--ease-out) both; }
@media (hover: hover) and (pointer: fine) {
  .filled:hover { background-color: rgba(211, 34, 68, 0.3); }
}
.sentence-done { font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem); margin-bottom: 2rem; }
@keyframes fill-in {
  from { background-size: 0% 3px, auto; }
  to { background-size: 100% 3px, auto; }
}
.blank {
  display: inline-block;
  min-width: 5em;
  border-bottom: 2px solid var(--border-strong);
  transform: translateY(-0.15em);
}

/* Opcje */
.options {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.options li { border-bottom: 1px solid var(--border); }
.option {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.75rem;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  color: var(--text-strong);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .option:hover { background: var(--surface-hover); border-left-color: var(--accent); }
}
.option:active { background: rgba(255, 255, 255, 0.07); border-left-color: var(--accent); transition-duration: 0ms; }
.option-text { display: flex; flex-direction: column; gap: 0.15rem; }
.option-label { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.option-hint { font-size: 0.875rem; color: var(--muted); line-height: 1.4; }
.option-count { flex-shrink: 0; font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.option-any .option-label { font-weight: 400; color: var(--muted); }

/* Przyciski: pigułki z wersalikami jak na stronie */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 0.9375rem/1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform var(--press) var(--ease-out);
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn-ghost:hover { border-color: var(--text-strong); }
  .cart:hover { border-color: var(--text-strong); }
  .add-toggle:hover { border-color: var(--text-strong); background: var(--surface-hover); }
}
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-strong); }
.btn-small { min-height: 38px; padding: 0 18px; font-size: 0.8125rem; }

.link {
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text-strong);
  background: none;
  border: 0;
  padding: 0.25rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 4px;
}
.link:hover { text-decoration-color: var(--accent); }
.link-muted { color: var(--muted); }
.question .link { margin-top: 1rem; }

.nav { display: flex; gap: 1.5rem; margin-top: 2.5rem; }

/* Wynik */
.note { font-size: 0.9375rem; color: var(--muted); margin: -0.5rem 0 1rem; }

.card {
  background:
    radial-gradient(75% 42% at 88% 0, rgba(211, 34, 68, 0.16), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  padding: 1.75rem;
}
.card-title {
  font: 700 clamp(1.875rem, 1.5rem + 1.4vw, 2.5rem)/1 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text-strong);
  margin: 0 0 1rem;
}
.card-situation { margin: 0 0 1.5rem; }

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.6rem 1.5rem;
  margin: 0 0 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.facts dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 0.2rem;
}
.facts dd { margin: 0; color: var(--text-strong); }

.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

.added {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
  white-space: nowrap;
}
.added::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ok);
}
.added-primary { min-height: 48px; font-size: 0.9375rem; }

.alternatives { margin-top: 2.5rem; }
.alt-list, .picked {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.alt, .picked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.alt-text { display: flex; flex-direction: column; gap: 0.15rem; }
.alt-name { color: var(--text-strong); font-weight: 700; line-height: 1.4; }
.alt-goal { font-size: 0.875rem; color: var(--muted); line-height: 1.4; }

.next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.5rem;
}

.finish {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
}
.finish-title { margin: 0 0 0.25rem; color: var(--text-strong); font: 700 1.125rem/1.3 var(--body); }
.finish-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.25rem; }

.gap { margin: 2rem 0 0; font-size: 0.9375rem; color: var(--muted); }

/* Lista i formularz */
.picked { margin-bottom: 1rem; }
.send {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; }
.field label { color: var(--text-strong); font-weight: 700; font-size: 0.9375rem; }
.optional { color: var(--muted); font-weight: 400; }
.field-hint { margin: 0; font-size: 0.875rem; color: var(--muted); line-height: 1.5; }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text-strong);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--text-strong); }
.form-error { margin: 0; color: #ff8fa3; font-size: 0.9375rem; }

/* Koszyk w nagłówku */
.cart {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 38px;
  padding: 0 0.6rem 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-strong);
  font: 700 0.8125rem/1 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
}
.cart:not(:has(.cart-badge)) { padding-right: 1rem; }
.cart[aria-current="page"] { border-color: var(--text-strong); }
.cart { transition: border-color 150ms ease, transform var(--press) var(--ease-out); }
.cart:active { transform: scale(0.97); }
.cart-badge {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  letter-spacing: 0;
}
.cart.bump .cart-badge { animation: bump 360ms var(--ease-out); }
@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Przełącznik na wierszach: dodaj / na liście */
.add-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-strong);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform var(--press) var(--ease-out);
}
.add-toggle:active { transform: scale(0.92); }
.add-toggle svg { width: 16px; height: 16px; }
.add-toggle.is-added { border-color: var(--ok); background: rgba(85, 207, 164, 0.14); color: var(--ok); }

.added-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }

.back { display: inline-block; margin-bottom: 1.5rem; }
.section-hint { margin: -0.5rem 0 1rem; }

.footer { margin-top: 4rem; font-size: 0.8125rem; color: var(--muted); }
.footer p { margin: 0; max-width: 36rem; }
.footer a, .privacy a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer a:hover, .privacy a:hover { color: var(--text-strong); }

/* Informacja o prywatności: przyklejona do dołu, znika po "Rozumiem" */
.privacy {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20;
  max-width: 44rem; margin: 0 auto; padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1rem 1.5rem;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  font-size: 0.875rem; line-height: 1.55; color: var(--text);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
@starting-style {
  .privacy { opacity: 0; transform: translateY(12px); }
}
.privacy p { margin: 0; }
.privacy .btn { flex-shrink: 0; }
@media (max-width: 560px) {
  .privacy { left: 12px; right: 12px; bottom: 12px; padding: 0.875rem 1rem; gap: 0.75rem; font-size: 0.8125rem; flex-direction: column; align-items: stretch; }
  .privacy .btn { min-height: 40px; }
}

/* Wejście nowego ekranu (pytanie, wynik, lista). Zdanie u góry trwa między krokami, więc się nie rusza. */
.app.enter > :not(.sentence) { animation: enter 240ms var(--ease-out) both; }
@keyframes enter {
  from { opacity: 0; transform: translateY(6px); }
}

.loading { color: var(--muted); }

:focus-visible {
  outline: 2px solid var(--text-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 480px) {
  .page { padding-top: 2rem; }
  .intro { font-size: 0.9375rem; line-height: 1.6; }
  .logo { height: 18px; }
  .topbar-label { display: none; }
  .card { padding: 1.25rem; }
  .facts { grid-template-columns: 1fr; gap: 0.15rem; }
  .facts dd { margin-bottom: 0.6rem; }
  .alt, .picked-item { padding-inline: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .filled.is-new { animation: none; }
  .btn:active:not(:disabled), .cart:active, .add-toggle:active { transform: none; }
  .privacy { transition: opacity 200ms ease; transform: none; }
  .app.enter > :not(.sentence) { animation: fade 200ms ease both; }
  .cart.bump .cart-badge { animation: none; }
}
@keyframes fade { from { opacity: 0; } }
.more { margin-top: 1.25rem; }
.preview-banner {
  margin: 0 0 2rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--muted);
}
