/* Warstwa UX v2: zachowuje kolorystykę marki, ale skraca drogę do ćwiczenia. */
:root {
  --gold-text: #73551f;
}

body .card-kicker,
body .work-label {
  color: var(--gold-text);
}

body .hero {
  padding-block: clamp(30px, 4vw, 52px) clamp(34px, 4vw, 58px);
}

body .hero h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2.8rem, 4.7vw, 4.15rem);
  line-height: 1.06;
}

.hero-route {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--violet-900);
  background: rgba(255, 249, 235, 0.68);
  font-size: 0.84rem;
  font-weight: 750;
}

body .hero-buttons {
  margin-top: 20px;
}

.hero-start-note {
  margin: 9px 0 0;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

body .hero-note {
  margin-top: 16px;
}

body .hero-visual {
  min-height: 430px;
}

.hero-route span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.hero-route span:not(:last-child)::after {
  margin-left: 9px;
  color: var(--gold-text);
  content: "→";
}

.continue-card {
  display: grid;
  gap: 2px;
  padding: 13px 15px;
  border: 1px solid rgba(75, 59, 120, 0.22);
  border-radius: 15px;
  color: var(--violet-900);
  background: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.continue-card:hover {
  border-color: var(--violet-500);
  color: var(--violet-900);
  background: white;
  transform: translateY(-2px);
}

.continue-card > span,
.continue-card > small {
  color: var(--ink-muted);
  font-size: 0.76rem;
}

body .list-hero {
  padding-block: clamp(32px, 4.5vw, 52px);
}

body .list-hero h1 {
  font-size: clamp(2.5rem, 4.4vw, 4.1rem);
}

body .question-hero {
  padding-block: 26px 32px;
}

body .breadcrumbs {
  margin-bottom: 20px;
}

body .official-card {
  padding: clamp(24px, 4vw, 38px);
}

body .official-card h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.3;
}

.jump-to-exercise {
  margin-top: 16px;
}

.step-mode-note {
  margin: -4px 0 18px;
  color: var(--ink-muted);
  font-size: 0.83rem;
}

.self-score {
  display: grid;
  gap: 9px;
  margin: 18px 0 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 249, 235, 0.8);
}

.self-score-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink-muted);
  font-size: 0.86rem;
}

.self-score-meta strong {
  color: var(--violet-900);
  text-align: right;
}

.self-score-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(75, 59, 120, 0.13);
}

.self-score-track span {
  display: block;
  width: var(--self-score, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet-700), var(--gold));
  transition: width 180ms ease;
}

body .tag[data-status="progress"] {
  border-color: rgba(101, 82, 143, 0.38);
  color: var(--violet-900);
  background: rgba(232, 224, 249, 0.82);
}

body .step-list {
  scrollbar-color: rgba(75, 59, 120, 0.28) transparent;
  scrollbar-width: thin;
}

body .step-list button {
  transition: color 150ms ease, background-color 150ms ease;
}

body .step-list button:hover {
  color: var(--violet-900);
}

body .step-panel {
  min-height: 560px;
}

body .flow-controls {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 249, 235, 0.92);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(16px);
}

body .mini-course [data-course-link] {
  width: fit-content;
  margin-top: 8px;
}

.filter-mobile-toggle {
  display: none;
}

[data-course-link][aria-disabled="true"] {
  cursor: default;
}

@media (max-width: 920px) {
  body .step-list li {
    scroll-snap-align: center;
  }
}

@media (max-width: 680px) {
  body .hero {
    padding-block: 28px 34px;
  }

  body .hero h1 {
    font-size: clamp(2.35rem, 11.5vw, 3rem);
    line-height: 1.02;
  }

  body .hero .lead {
    font-size: 1rem;
    line-height: 1.5;
  }

  body .hero-buttons {
    margin-top: 16px;
  }

  body .hero-buttons .button,
  body .hero-buttons .button-secondary {
    min-height: 48px;
  }

  body .hero-buttons .button-ghost {
    min-height: auto;
    padding: 6px 2px;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 0.22em;
  }

  .hero-route {
    display: grid;
    gap: 8px;
    margin: 18px 0;
  }

  body .hero-note {
    margin-top: 13px;
    font-size: 0.8rem;
  }

  .hero-route span:not(:last-child)::after {
    display: none;
  }

  body .list-hero {
    padding-block: 22px 18px;
  }

  body .list-hero h1 {
    margin-bottom: 12px;
    font-size: clamp(2.05rem, 9.7vw, 2.55rem);
    line-height: 1.04;
  }

  body .list-hero .lead {
    margin-bottom: 14px;
    font-size: 0.96rem;
    line-height: 1.5;
  }

  body .list-hero .progress-card {
    gap: 11px;
    padding: 15px;
  }

  body .list-hero .progress-actions {
    gap: 7px;
  }

  body .questions-section {
    padding-top: 14px;
  }

  body .filters {
    gap: 10px;
    padding: 14px;
  }

  .filter-mobile-toggle {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--violet-900);
    background: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
    font-weight: 750;
  }

  body .filters:not([data-mobile-open="true"]) .secondary-filter {
    display: none;
  }

  body .question-hero {
    padding-block: 18px 24px;
  }

  body .breadcrumbs {
    margin-bottom: 14px;
  }

  body .official-card {
    padding: 22px;
    gap: 18px;
  }

  body .official-card h1 {
    font-size: 1.5rem;
    line-height: 1.27;
  }

  body .official-number {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
  }

  body .author-note {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  .jump-to-exercise {
    width: 100%;
  }

  body .question-toolbar {
    gap: 10px;
    margin-top: 14px;
  }

  body .mode-switch button {
    padding-inline: 10px;
    font-size: 0.74rem;
  }

  body .step-sidebar {
    border-radius: 18px;
  }

  body .step-list button {
    width: 118px;
  }

  body .step-panel {
    min-height: 0;
    padding-bottom: 100px;
  }

  body .flow-controls {
    position: fixed;
    z-index: 48;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: none;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 8px;
    margin: 0;
  }

  body .flow-controls[data-mobile-visible="true"] {
    display: grid;
  }

  body .flow-controls .button,
  body .flow-controls .button-ghost {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 0.8rem;
  }

  .self-score-meta {
    display: grid;
    gap: 2px;
  }

  .self-score-meta strong {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .continue-card,
  .self-score-track span,
  body .step-list button {
    transition: none;
  }
}
