*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-primary: #6d5dfc;
  --color-primary-dark: #5145cd;
  --color-text: #223046;
  --color-muted: #667085;
  --color-background: #fffdf8;
  --color-surface: #ffffff;
  --color-blue: #60a5fa;
  --color-pink: #f472b6;
  --color-green: #4ade80;
  --color-purple: #8b5cf6;
  --color-orange: #fb923c;
  --color-yellow-soft: #fff8e7;
  --color-purple-soft: #f6f1ff;
  --color-footer: #1c2740;
  --shadow-soft: 0 10px 30px rgba(34, 48, 70, 0.08);
  --shadow-lift: 0 16px 36px rgba(81, 69, 205, 0.16);
  --radius-card: 1.5rem;
  --radius-pill: 999px;
  --page-pad: clamp(1rem, 4.2vw, 2.5rem);
  --content-max: 1320px;
  --header-h: 4.5rem;
  --grid-gap: clamp(1rem, 2vw, 1.5rem);
  --font: "Nunito", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --focus: 3px solid var(--color-primary);
  --story-measure: 46.875rem;
}

html {
  scroll-padding-top: 5.5rem;
}

html:not(.no-js) {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.no-js) {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.92rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-background);
  min-height: 100vh;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

img,
svg {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--page-pad);
  top: 0.75rem;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--color-primary);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(var(--content-max), calc(100% - 2 * var(--page-pad)));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(109, 93, 252, 0.08);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: clamp(0.95rem, 0.8rem + 0.7vw, 1.15rem);
  letter-spacing: -0.02em;
  color: var(--color-text);
  min-height: 44px;
  min-width: 0;
  flex: 1;
}

.logo span {
  overflow-wrap: break-word;
}

.logo-mark {
  flex: none;
  color: var(--color-primary);
}

.nav-desktop {
  display: none;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1vw, 1.25rem);
}

.nav-list a,
.footer-links a,
.mobile-nav-list a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.6rem;
  border-radius: 0.7rem;
  font-weight: 700;
  color: var(--color-text);
}

.nav-list a:hover,
.footer-links a:hover,
.mobile-nav-list a:not(.btn):hover,
.text-link:hover,
.nav-list a[aria-current="page"],
.mobile-nav-list a[aria-current="page"] {
  color: var(--color-primary-dark);
}

.header-cta.btn {
  display: none;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0.85rem;
  background: var(--color-purple-soft);
  color: var(--color-primary-dark);
  cursor: pointer;
  flex: none;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
  position: relative;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-bars::before {
  top: -6px;
}

.menu-toggle-bars::after {
  top: 6px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-menu {
  display: none;
  padding-bottom: 1rem;
  border-top: 1px solid rgba(109, 93, 252, 0.08);
  background: var(--color-background);
}

.mobile-menu.is-open,
.no-js .mobile-menu {
  display: block;
}

.no-js .mobile-menu[hidden] {
  display: block !important;
}

.mobile-nav-list {
  display: grid;
  gap: 0.2rem;
  padding: 0.5rem 0 0.25rem;
}

.mobile-cta {
  width: 100%;
  justify-content: center;
  margin-top: 0.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(109, 93, 252, 0.28);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border-color: rgba(109, 93, 252, 0.22);
}

.btn-secondary:hover {
  background: var(--color-purple-soft);
}

.btn-light {
  background: #fff;
  color: var(--color-primary-dark);
}

.btn-light:hover {
  background: var(--color-yellow-soft);
}

.support-cta {
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 800;
  color: var(--color-primary-dark);
  white-space: nowrap;
}

.hero {
  padding: clamp(2.25rem, 5vw, 4.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(circle at 12% 18%, rgba(244, 114, 182, 0.14), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(96, 165, 250, 0.16), transparent 26%),
    linear-gradient(180deg, var(--color-purple-soft) 0%, var(--color-background) 100%);
}

.hero-inner {
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  color: var(--color-primary-dark);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-soft);
}

.hero-name {
  display: block;
  margin-top: 1rem;
  color: var(--color-primary);
  font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-title {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(1.7rem, 1.1rem + 2.6vw, 3.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 18ch;
  margin-inline: auto;
}

.hero-lead {
  margin: 1.15rem auto 0;
  max-width: 42rem;
  color: var(--color-muted);
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.hero-actions .btn {
  width: 100%;
}

.hero-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(2rem, 4vw, 3rem);
  min-height: clamp(220px, 36vw, 420px);
  width: 100%;
  border-radius: 2rem;
  background:
    linear-gradient(135deg, rgba(109, 93, 252, 0.18) 0%, rgba(96, 165, 250, 0.16) 38%, rgba(255, 248, 231, 0.95) 72%, rgba(244, 114, 182, 0.16) 100%);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.hero-art.has-illustration {
  min-height: 0;
  padding: 0;
  display: block;
  background: #12081f;
  max-width: min(100%, 58rem);
  margin-inline: auto;
}

.hero-illustration {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 42%;
  border-radius: inherit;
}

.blob,
.spark {
  position: absolute;
  pointer-events: none;
}

.blob-one {
  width: clamp(7rem, 18vw, 14rem);
  height: clamp(7rem, 18vw, 14rem);
  left: 6%;
  top: 16%;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.18);
}

.blob-two {
  width: clamp(5rem, 14vw, 11rem);
  height: clamp(5rem, 14vw, 11rem);
  right: 8%;
  bottom: 18%;
  border-radius: 50%;
  background: rgba(251, 146, 60, 0.2);
}

.spark {
  width: 0.7rem;
  height: 0.7rem;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
  border-radius: 1px;
}

.spark-one {
  top: 18%;
  left: 22%;
}

.spark-two {
  top: 28%;
  right: 18%;
  width: 0.5rem;
  height: 0.5rem;
}

.spark-three {
  bottom: 22%;
  left: 18%;
}

.storybook {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  width: min(100%, 52rem);
  height: clamp(140px, 24vw, 250px);
  filter: drop-shadow(0 18px 28px rgba(81, 69, 205, 0.18));
}

.storybook-page {
  flex: 1;
  min-width: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8f5ff 100%);
}

.storybook-page-left {
  border-radius: 1.4rem 0.35rem 0.35rem 1.4rem;
  transform: perspective(700px) rotateY(9deg);
  transform-origin: right center;
}

.storybook-page-right {
  border-radius: 0.35rem 1.4rem 1.4rem 0.35rem;
  transform: perspective(700px) rotateY(-9deg);
  transform-origin: left center;
}

.storybook-spine {
  width: 0.7rem;
  flex: none;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: 0.2rem;
  z-index: 2;
}

.hero-art-caption {
  position: relative;
  z-index: 1;
  margin-top: 1.1rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  background: rgba(255, 255, 255, 0.78);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
}

.section {
  padding: clamp(3rem, 6vw, 5.25rem) 0;
}

.section-stats {
  padding-top: 0;
  background: var(--color-background);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.2rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(109, 93, 252, 0.1);
  text-align: center;
}

.stat-card strong {
  font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem);
  line-height: 1.1;
  color: var(--color-primary-dark);
}

.stat-card span {
  font-weight: 800;
  color: var(--color-text);
}

.stories-error {
  margin: 0;
  padding: clamp(1.4rem, 3vw, 2rem) 1.25rem;
  text-align: center;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(109, 93, 252, 0.12);
}

.stories-error-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-text);
}

.stories-error p + p {
  margin-top: 0.4rem;
  color: var(--color-muted);
}

.section-categories {
  background: var(--color-surface);
}

.section-stories {
  background: var(--color-yellow-soft);
}

.section-steps {
  background: var(--color-surface);
}

.section-about,
.section-support {
  background: var(--color-background);
}

.section-intro {
  max-width: 42rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}

.section-intro-split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem 1.5rem;
}

.section-intro h2,
.about-panel h2,
.support-panel h2 {
  font-size: clamp(1.55rem, 1.15rem + 1.6vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-lead,
.about-panel p,
.support-panel p {
  margin-top: 0.7rem;
  color: var(--color-muted);
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--grid-gap);
}

.category-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding: 1.35rem 1.3rem 1.2rem;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(34, 48, 70, 0.05);
}

.category-card h3 {
  margin-top: 0.9rem;
  font-size: 1.2rem;
}

.category-card p {
  margin-top: 0.4rem;
  color: var(--color-muted);
  flex: 1;
}

.category-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  color: #fff;
}

.category-count {
  margin-top: 1rem;
  font-size: 0.92rem;
  font-weight: 800;
}

.tone-blue .category-icon,
.chip-blue {
  background: #3b82f6;
}

.tone-pink .category-icon,
.chip-pink {
  background: #ec4899;
}

.tone-green .category-icon,
.chip-green {
  background: #16a34a;
}

.tone-purple .category-icon,
.chip-purple {
  background: #7c3aed;
}

.tone-orange .category-icon,
.chip-orange {
  background: #ea580c;
}

.tone-blue {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 52%);
}

.tone-pink {
  background: linear-gradient(180deg, #fdf2f8 0%, #ffffff 52%);
}

.tone-green {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 52%);
}

.tone-purple {
  background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 52%);
}

.tone-orange {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 52%);
}

.tone-blue .category-count { color: #1d4ed8; }
.tone-pink .category-count { color: #be185d; }
.tone-green .category-count { color: #15803d; }
.tone-purple .category-count { color: #6d28d9; }
.tone-orange .category-count { color: #c2410c; }

.stories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
}

.story-card {
  min-width: 0;
  height: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.story-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  color: inherit;
}

.story-card-link:focus {
  outline: none;
}

.story-card:has(.story-card-link:focus-visible) {
  outline: var(--focus);
  outline-offset: 3px;
}

.story-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.story-media.has-illustration {
  aspect-ratio: 3 / 2;
}

.story-media img,
.featured-media img,
.story-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.story-cover.has-illustration img,
.featured-media.has-illustration img {
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center 40%;
}

.has-illustration > .story-media-label,
.has-illustration > .story-cover-label,
.has-illustration > .hero-art-caption {
  display: none;
}

.story-media-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.82);
  color: var(--color-primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  max-width: calc(100% - 1.25rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-sleep {
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.55), transparent 28%),
    linear-gradient(135deg, #c4b5fd 0%, #93c5fd 100%);
}

.media-heart {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.5), transparent 26%),
    linear-gradient(135deg, #93c5fd 0%, #f9a8d4 100%);
}

.media-rainbow {
  background:
    linear-gradient(180deg, #bfdbfe 0%, #bbf7d0 42%, #fde68a 70%, #fdba74 100%);
}

.media-moon {
  background:
    radial-gradient(circle at 68% 32%, #fff7d6 0 14%, transparent 15%),
    linear-gradient(160deg, #1e1b4b 0%, #6d28d9 55%, #c4b5fd 100%);
}

.media-immune {
  background:
    radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.5), transparent 28%),
    linear-gradient(135deg, #86efac 0%, #93c5fd 100%);
}

.media-teeth {
  background:
    radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.65), transparent 26%),
    linear-gradient(135deg, #a5b4fc 0%, #7dd3fc 52%, #fde68a 100%);
}

.media-default {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), transparent 28%),
    linear-gradient(135deg, #c4b5fd 0%, #93c5fd 52%, #f9a8d4 100%);
}

.story-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 1.15rem 1.2rem;
  gap: 0.55rem;
}

.chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.story-body h3 {
  font-size: 1.18rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.story-body p {
  color: var(--color-muted);
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
}

.story-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--color-purple-soft);
  color: var(--color-primary-dark);
  font-weight: 800;
  width: fit-content;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  counter-reset: none;
}

.step-card {
  background: var(--color-background);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-soft);
}

.step-number {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
}

.step-card h3 {
  margin-top: 0.9rem;
  font-size: 1.2rem;
}

.step-card p {
  margin-top: 0.4rem;
  color: var(--color-muted);
}

.about-panel {
  background: var(--color-yellow-soft);
  border-radius: 2rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-soft);
}

.about-panel p {
  max-width: 48rem;
}

.benefit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
}

.benefit-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  font-weight: 800;
  flex: 1 1 14rem;
}

.benefit-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  background: #fff;
  color: #15803d;
  flex: none;
}

.support-panel {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #6d5dfc 0%, #5145cd 55%, #7c3aed 100%);
  color: #fff;
  border-radius: 2rem;
  padding: clamp(1.7rem, 4.5vw, 3.25rem);
  text-align: center;
  box-shadow: var(--shadow-lift);
}

.support-panel p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 38rem;
  margin-inline: auto;
}

.support-panel .btn {
  margin-top: 1.4rem;
}

.site-footer {
  background: var(--color-footer);
  color: #e8edf5;
  padding: clamp(2.2rem, 5vw, 3.5rem) 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-brand p {
  margin-top: 0.65rem;
  color: #c5d0df;
  max-width: 22rem;
}

.logo-footer {
  color: #fff;
  max-width: none;
}

.logo-footer .logo-mark {
  color: #c4b5fd;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
}

.footer-links a {
  color: #e8edf5;
}

.footer-links a:hover {
  color: #fff;
}

.footer-meta {
  display: grid;
  gap: 0.25rem;
  margin-top: 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #c5d0df;
  font-size: 0.95rem;
}

.footer-legal {
  margin-top: 0.85rem;
}

.footer-legal .footer-links {
  justify-content: center;
}

@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
    align-items: center;
  }

  .hero-actions .btn {
    width: auto;
  }
}

@media (min-width: 600px) {
  .category-card {
    width: calc((100% - var(--grid-gap)) / 2);
  }
}

@media (min-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }

  .footer-links {
    justify-content: flex-end;
  }

  .footer-legal .footer-links {
    justify-content: center;
  }

  .footer-meta {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .footer-meta p:last-child {
    text-align: right;
  }
}

@media (min-width: 900px) {
  .category-card {
    width: calc((100% - (2 * var(--grid-gap))) / 3);
  }
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: block;
  }

  .header-cta.btn {
    display: inline-flex;
  }

  .menu-toggle,
  .mobile-menu,
  .no-js .mobile-menu,
  .no-js .mobile-menu[hidden] {
    display: none;
  }

  .no-js .mobile-menu[hidden] {
    display: none !important;
  }

  .header-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
  }

  .nav-desktop {
    justify-self: center;
  }

  .logo {
    max-width: none;
    flex: 0 1 auto;
  }

  .hero-inner {
    display: grid;
    grid-template-columns: minmax(18rem, 0.92fr) minmax(20rem, 1.08fr);
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
    text-align: left;
  }

  .hero-copy .hero-title,
  .hero-copy .hero-lead {
    margin-inline: 0;
  }

  .hero-copy .hero-actions {
    justify-content: flex-start;
  }

  .hero-art,
  .hero-art.has-illustration {
    margin-top: 0;
    max-width: none;
  }
}

@media (min-width: 1024px) and (max-width: 1180px) {
  .header-bar {
    gap: 0.55rem;
  }

  .logo {
    font-size: 0.92rem;
    gap: 0.4rem;
  }

  .nav-list {
    gap: 0;
  }

  .nav-list a {
    padding-inline: 0.32rem;
    font-size: 0.92rem;
  }

  .header-cta.btn {
    min-height: 44px;
    padding-inline: 0.8rem;
    font-size: 0.92rem;
  }
}

@media (min-width: 1200px) {
  .category-card {
    width: calc((100% - (4 * var(--grid-gap))) / 5);
  }

  .stories-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .category-card,
  .story-card,
  .why-card,
  .featured-story,
  .text-link,
  .nav-list a,
  .footer-links a,
  .story-pager-link,
  .breadcrumb a {
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
  }

  .menu-toggle-bars,
  .menu-toggle-bars::before,
  .menu-toggle-bars::after {
    transition: transform 180ms ease, top 180ms ease, background-color 180ms ease;
  }

  .category-card:hover,
  .story-card:hover,
  .why-card:hover,
  .featured-story:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
  }

  .support-cta:hover,
  .support-cta:focus-visible {
    transform: translateY(-2px);
  }

  .btn-primary.support-cta:hover,
  .btn-primary.support-cta:focus-visible {
    box-shadow: 0 12px 22px rgba(109, 93, 252, 0.34);
  }

  .btn-light.support-cta:hover,
  .btn-light.support-cta:focus-visible {
    box-shadow: 0 10px 20px rgba(28, 39, 64, 0.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .storybook-page-left,
  .storybook-page-right {
    transform: none;
  }
}

body.menu-open {
  overflow: hidden;
}

.page-story {
  background: var(--color-background);
}

.story-hero {
  padding: clamp(1.1rem, 3vw, 2rem) 0 clamp(2.2rem, 5vw, 3.5rem);
  background:
    radial-gradient(circle at 88% 12%, rgba(96, 165, 250, 0.16), transparent 26%),
    linear-gradient(180deg, var(--color-purple-soft) 0%, var(--color-background) 100%);
}

.breadcrumb {
  margin-bottom: 1.15rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0;
  font-size: clamp(0.84rem, 0.78rem + 0.28vw, 0.95rem);
  font-weight: 700;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: ">";
  margin-inline: 0.45rem;
  color: var(--color-muted);
  font-weight: 800;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-primary-dark);
  border-radius: 0.5rem;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--color-muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.story-cover {
  position: relative;
  width: 100%;
  height: clamp(14rem, 42vw, 28rem);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.story-cover.has-illustration,
.featured-media.has-illustration {
  height: auto;
  min-height: 0;
}

figure.hero-art,
figure.story-cover {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
}

.story-cover.has-illustration:not(.featured-media) {
  max-width: min(100%, 58rem);
  margin-inline: auto;
}

.story-cover-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.84);
  color: var(--color-primary-dark);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  max-width: calc(100% - 1.5rem);
}

.story-hero-copy {
  width: min(var(--story-measure), 100%);
  margin: 1.75rem auto 0;
  text-align: center;
}

.story-facts {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.9rem 1.5rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 480px) {
  .story-facts {
    flex-direction: row;
  }
}

.story-facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.story-fact-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.story-fact-value {
  font-weight: 800;
  min-height: 1.7rem;
  display: inline-flex;
  align-items: center;
}

.story-fact-chip {
  align-self: center;
  gap: 0.3rem;
}

.story-hero-copy h1 {
  font-size: clamp(1.7rem, 1.15rem + 2.1vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.story-hero-lead {
  margin-top: 0.9rem;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem);
  line-height: 1.7;
}

.story-narrow {
  width: min(var(--story-measure), calc(100% - 2 * var(--page-pad)));
  margin-inline: auto;
}

.section-story-body {
  padding-top: 0.5rem;
  background: var(--color-surface);
}

.story-prose {
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.22rem);
  line-height: 1.85;
}

.story-prose p + p,
.story-prose h2 + p {
  margin-top: 1.4em;
}

.story-prose h2 {
  margin-top: 1.8em;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.55rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.story-prose ul,
.story-prose ol {
  margin: 1.3em 0;
  padding-left: 1.25em;
  list-style: disc;
}

.story-prose ol {
  list-style: decimal;
}

.story-prose li + li {
  margin-top: 0.55em;
}

.story-prose img {
  width: 100%;
  margin: 1.75rem 0;
  border-radius: 1.25rem;
}

.section-learn {
  background: var(--color-surface);
  padding-top: 1.25rem;
}

.learn-panel {
  background:
    radial-gradient(circle at 88% 12%, rgba(74, 222, 128, 0.18), transparent 34%),
    linear-gradient(180deg, #ecfdf3 0%, var(--color-yellow-soft) 100%);
  border: 2px solid rgba(22, 163, 74, 0.16);
  border-radius: 2rem;
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  box-shadow: var(--shadow-soft);
}

.learn-panel h2,
.talk-panel h2 {
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.learn-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.learn-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.18rem);
  font-weight: 800;
  line-height: 1.45;
}

.learn-check {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.8rem;
  background: #16a34a;
  color: #fff;
  flex: none;
}

.section-talk {
  background: var(--color-purple-soft);
}

.talk-panel {
  background: var(--color-surface);
  border-radius: 2rem;
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  box-shadow: var(--shadow-soft);
}

.talk-lead {
  margin-top: 0.65rem;
  color: var(--color-muted);
}

.talk-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.35rem;
  counter-reset: talk;
}

.talk-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 44px;
  padding: 0.9rem 1rem;
  border-radius: 1.1rem;
  background: var(--color-purple-soft);
  font-weight: 800;
  line-height: 1.5;
}

.talk-list li::before {
  counter-increment: talk;
  content: counter(talk);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.8rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  flex: none;
}

.section-related {
  background: var(--color-yellow-soft);
}

.stories-grid-related {
  grid-template-columns: 1fr;
}

.story-pager-wrap {
  background: var(--color-background);
  padding: 0 0 clamp(1rem, 3vw, 1.75rem);
}

.story-pager {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.story-pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 2px solid rgba(109, 93, 252, 0.18);
  font-weight: 800;
  color: var(--color-primary-dark);
  text-align: center;
}

.story-pager-link:hover {
  background: var(--color-purple-soft);
}

@media (min-width: 720px) {
  .stories-grid-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stories-grid-related .story-card:last-child {
    grid-column: 1 / -1;
    width: 100%;
    max-width: calc((100% - var(--grid-gap)) / 2);
    justify-self: center;
  }

  .story-pager {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .story-pager-next {
    margin-left: auto;
  }
}

@media (min-width: 1024px) {
  .stories-grid-related,
  .stories-grid-related.stories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stories-grid-related .story-card:last-child {
    grid-column: auto;
    max-width: none;
  }
}

@media (min-width: 1200px) {
  .stories-grid-related {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- Kategórie: landing pages --- */

.page-category {
  --category-accent: var(--color-primary);
  --category-accent-dark: var(--color-primary-dark);
  --category-soft: var(--color-purple-soft);
  --category-hero-blob-a: rgba(109, 93, 252, 0.18);
  --category-hero-blob-b: rgba(96, 165, 250, 0.2);
  --category-hero-art: linear-gradient(135deg, rgba(109, 93, 252, 0.18) 0%, rgba(96, 165, 250, 0.16) 38%, rgba(255, 248, 231, 0.95) 100%);
}

.page-category.theme-blue {
  --category-accent: #3b82f6;
  --category-accent-dark: #1d4ed8;
  --category-soft: #eff6ff;
  --category-hero-blob-a: rgba(96, 165, 250, 0.32);
  --category-hero-blob-b: rgba(59, 130, 246, 0.2);
  --category-hero-art: linear-gradient(135deg, #93c5fd 0%, #bfdbfe 42%, #eff6ff 78%, #dbeafe 100%);
}

.page-category.theme-green {
  --category-accent: #16a34a;
  --category-accent-dark: #15803d;
  --category-soft: #f0fdf4;
  --category-hero-blob-a: rgba(74, 222, 128, 0.32);
  --category-hero-blob-b: rgba(22, 163, 74, 0.18);
  --category-hero-art: linear-gradient(135deg, #86efac 0%, #bbf7d0 42%, #f0fdf4 78%, #d9f99d 100%);
}

.page-category.theme-purple {
  --category-accent: #7c3aed;
  --category-accent-dark: #6d28d9;
  --category-soft: #f5f3ff;
  --category-hero-blob-a: rgba(139, 92, 246, 0.3);
  --category-hero-blob-b: rgba(196, 181, 253, 0.35);
  --category-hero-art: linear-gradient(160deg, #1e1b4b 0%, #6d28d9 48%, #c4b5fd 100%);
}

.page-category.theme-pink {
  --category-accent: #ec4899;
  --category-accent-dark: #be185d;
  --category-soft: #fdf2f8;
  --category-hero-blob-a: rgba(244, 114, 182, 0.32);
  --category-hero-blob-b: rgba(251, 146, 60, 0.18);
  --category-hero-art: linear-gradient(135deg, #f9a8d4 0%, #fbcfe8 42%, #fdf2f8 78%, #fde68a 100%);
}

.page-category.theme-orange {
  --category-accent: #ea580c;
  --category-accent-dark: #c2410c;
  --category-soft: #fff7ed;
  --category-hero-blob-a: rgba(251, 146, 60, 0.32);
  --category-hero-blob-b: rgba(253, 224, 71, 0.28);
  --category-hero-art: linear-gradient(135deg, #fdba74 0%, #fed7aa 42%, #fff7ed 78%, #fde68a 100%);
}

.category-hero {
  padding: clamp(1.1rem, 3vw, 2rem) 0 clamp(2.6rem, 6vw, 4.5rem);
  background:
    radial-gradient(circle at 12% 18%, var(--category-hero-blob-a), transparent 28%),
    radial-gradient(circle at 88% 10%, var(--category-hero-blob-b), transparent 26%),
    linear-gradient(180deg, var(--category-soft) 0%, var(--color-background) 100%);
}

.category-hero-inner {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  align-items: center;
}

.category-hero-copy {
  min-width: 0;
}

.category-hero-copy .badge {
  color: var(--category-accent-dark);
}

.category-hero-copy h1 {
  margin-top: 1rem;
  font-size: clamp(1.7rem, 1.1rem + 2.6vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  overflow-wrap: anywhere;
  max-width: 16ch;
}

.category-hero-copy .hero-lead {
  margin-left: 0;
  margin-right: 0;
}

.category-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.category-hero-count {
  margin: 0;
  color: var(--category-accent-dark);
}

.category-hero-actions {
  margin-top: 1.5rem;
}

.category-hero-actions .btn {
  width: 100%;
}

.category-hero-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(220px, 42vw, 420px);
  width: 100%;
  min-width: 0;
  border-radius: 2rem;
  background: var(--category-hero-art);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.category-hero-art.has-illustration {
  min-height: 0;
  padding: 0;
  display: block;
}

.category-hero-art.has-illustration .hero-illustration {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.page-category .blob-one {
  background: var(--category-hero-blob-a);
}

.page-category .blob-two {
  background: var(--category-hero-blob-b);
}

.page-category.theme-purple .hero-art-caption,
.page-category.theme-purple .category-hero-art .hero-art-caption {
  color: var(--color-primary-dark);
}

.section-category-stories {
  background: var(--color-yellow-soft);
}

.section-why {
  background: var(--color-surface);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
}

.why-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: var(--color-background);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-soft);
}

.why-card h3 {
  margin-top: 0.9rem;
  font-size: 1.15rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.why-card p {
  margin-top: 0.4rem;
  color: var(--color-muted);
  flex: 1;
}

.page-category .why-card .benefit-icon {
  color: var(--category-accent-dark);
}

.section-featured {
  background: var(--color-background);
}

.featured-story {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
  background: var(--color-surface);
  border-radius: 2rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(34, 48, 70, 0.05);
}

.featured-media {
  position: relative;
  overflow: hidden;
  margin: 0;
  min-height: clamp(12rem, 38vw, 22rem);
  border-radius: 1.4rem;
}

.featured-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-copy .badge {
  align-self: flex-start;
  color: var(--category-accent-dark);
}

.featured-copy h2 {
  margin-top: 1rem;
  font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.featured-copy p {
  margin-top: 0.7rem;
  color: var(--color-muted);
}

.featured-copy .story-meta {
  margin-top: 0.85rem;
}

.featured-copy .btn {
  margin-top: 1.35rem;
  width: 100%;
}

.section-other-categories {
  background: var(--color-surface);
}

.category-grid-other {
  justify-content: flex-start;
}

.media-rain {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.55), transparent 24%),
    linear-gradient(180deg, #93c5fd 0%, #60a5fa 48%, #1d4ed8 100%);
}

.media-bees {
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.5), transparent 26%),
    linear-gradient(135deg, #fde68a 0%, #86efac 55%, #16a34a 100%);
}

.media-leaves {
  background:
    linear-gradient(180deg, #fde68a 0%, #fdba74 38%, #fb923c 68%, #15803d 100%);
}

.media-daynight {
  background:
    linear-gradient(90deg, #fde68a 0%, #93c5fd 48%, #1e1b4b 100%);
}

.media-mars {
  background:
    radial-gradient(circle at 70% 38%, #fdba74 0 16%, transparent 17%),
    linear-gradient(160deg, #7f1d1d 0%, #ea580c 55%, #c4b5fd 100%);
}

.media-sun {
  background:
    radial-gradient(circle at 50% 42%, #fff7d6 0 18%, transparent 19%),
    linear-gradient(160deg, #fb923c 0%, #f59e0b 45%, #7c3aed 100%);
}

.media-fear {
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.5), transparent 28%),
    linear-gradient(135deg, #c4b5fd 0%, #f9a8d4 100%);
}

.media-anger {
  background:
    radial-gradient(circle at 74% 30%, rgba(255, 255, 255, 0.45), transparent 26%),
    linear-gradient(135deg, #fda4af 0%, #93c5fd 100%);
}

.media-friendship {
  background:
    linear-gradient(135deg, #f9a8d4 0%, #fde68a 48%, #86efac 100%);
}

.media-kindergarten {
  background:
    radial-gradient(circle at 68% 32%, rgba(255, 255, 255, 0.55), transparent 26%),
    linear-gradient(135deg, #fbcfe8 0%, #c4b5fd 100%);
}

.media-magnet {
  background:
    radial-gradient(circle at 28% 30%, rgba(255, 255, 255, 0.5), transparent 26%),
    linear-gradient(135deg, #fb923c 0%, #f87171 48%, #60a5fa 100%);
}

.media-planes {
  background:
    linear-gradient(180deg, #7dd3fc 0%, #bfdbfe 42%, #f8fafc 100%);
}

.media-electricity {
  background:
    radial-gradient(circle at 62% 28%, #fde68a 0 12%, transparent 13%),
    linear-gradient(135deg, #1e1b4b 0%, #7c3aed 48%, #fb923c 100%);
}

.media-ice {
  background:
    radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(135deg, #e0f2fe 0%, #93c5fd 55%, #fb923c 100%);
}

@media (max-width: 374px) {
  .story-media-label,
  .story-cover-label {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }

  .breadcrumb ol {
    row-gap: 0;
  }
}

@media (min-width: 480px) {
  .category-hero-actions .btn,
  .featured-copy .btn {
    width: auto;
  }
}

@media (min-width: 768px) {
  .category-hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 3vw, 3rem);
  }

  .category-hero-art {
    min-height: clamp(280px, 32vw, 420px);
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .why-card:last-child {
    grid-column: 1 / -1;
    width: 100%;
    max-width: calc((100% - var(--grid-gap)) / 2);
    justify-self: center;
  }

  .featured-story {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
  }
}

@media (min-width: 900px) {
  .category-grid-other .category-card {
    width: calc((100% - (3 * var(--grid-gap))) / 4);
  }
}

@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .why-card:last-child {
    grid-column: auto;
    max-width: none;
  }
}

@media (min-width: 1200px) {
  .category-grid-other .category-card {
    width: calc((100% - (3 * var(--grid-gap))) / 4);
  }

  .stories-grid-category {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.page-legal {
  background: var(--color-background);
}

.legal-hero {
  background:
    radial-gradient(circle at 12% 18%, rgba(244, 114, 182, 0.14), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(96, 165, 250, 0.16), transparent 26%),
    linear-gradient(180deg, var(--color-purple-soft) 0%, var(--color-background) 42%);
}

.legal-page {
  max-width: var(--story-measure);
  margin-inline: auto;
}

.legal-page h1 {
  font-size: clamp(1.8rem, 1.15rem + 2.2vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.legal-intro {
  margin-top: 1rem;
  max-width: 40rem;
  color: var(--color-muted);
}

.legal-section {
  margin-top: 1.15rem;
  padding: clamp(1.15rem, 2.2vw, 1.6rem);
  background: var(--color-surface);
  border: 1px solid rgba(34, 48, 70, 0.05);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.legal-section h2 {
  font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.legal-section p,
.legal-section ul {
  margin-top: 0.75rem;
}

.legal-section ul {
  padding-left: 1.2rem;
  list-style: disc;
}

.legal-section li {
  margin-top: 0.4rem;
  padding-left: 0.2rem;
}

.legal-section li::marker {
  color: var(--color-primary);
}

.legal-page a:not(.btn) {
  color: var(--color-primary-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.legal-page a:not(.btn):hover {
  color: var(--color-primary);
}

.cookie-layer {
  position: fixed;
  z-index: 70;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.75rem var(--page-pad) 0.9rem;
  pointer-events: none;
}

.cookie-banner,
.cookie-dialog-panel {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid rgba(109, 93, 252, 0.16);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
}

.cookie-banner {
  pointer-events: auto;
  width: min(52rem, 100%);
  margin-inline: auto;
  padding: 1.15rem 1.2rem 1.2rem;
}

.cookie-title,
.cookie-dialog-panel h2 {
  font-size: clamp(1.2rem, 1.05rem + 0.45vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.cookie-banner p,
.cookie-dialog-panel p {
  margin-top: 0.65rem;
  color: var(--color-muted);
}

.cookie-banner a,
.cookie-dialog-panel a {
  color: var(--color-primary-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.cookie-dialog {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 1rem;
}

.cookie-dialog[hidden],
.cookie-layer[hidden],
.cookie-dialog [hidden] {
  display: none !important;
}

.cookie-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 39, 64, 0.46);
}

.cookie-dialog-panel {
  position: relative;
  width: min(36rem, 100%);
  max-height: min(34rem, calc(100vh - 2rem));
  overflow: auto;
  padding: 1.25rem 1.3rem 1.3rem;
}

.cookie-choice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: var(--color-purple-soft);
}

.cookie-choice input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex: none;
  accent-color: var(--color-primary);
}

.cookie-choice label {
  display: grid;
  gap: 0.25rem;
  font-weight: 800;
}

.cookie-choice small {
  color: var(--color-muted);
  font-weight: 600;
  line-height: 1.45;
}

body.cookie-dialog-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .cookie-actions .btn {
    width: 100%;
  }
}
