:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --copy: #4b5563;
  --accent: #5f8bb0;
  --accent-soft: #f3f4ff;
  --shadow: rgba(0, 0, 0, 0.08);
  --line: #dbe4f0;
}

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

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

h1,
h2,
h3 {
  margin: 0 0 0.5rem 0;
}

p {
  margin: 0 0 1rem 0;
  color: var(--muted);
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-nav a {
  color: #475569;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent);
  border-radius: 8px;
  padding: 9px 14px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.75rem;
  margin-bottom: 12px;
  color: var(--muted);
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--accent);
  color: white;
}

.btn--secondary {
  background: #e8f2fb;
  color: #31536f;
  border: 1px solid #c9dff2;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn:hover {
  box-shadow: none;
}

.btn--primary:hover {
  background: #52799a;
}

.btn--secondary:hover {
  background: #d9ebfa;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 32px;
}

.card--hero {
  margin-bottom: 32px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 12px;
}

.hero-badge {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #385570;
  background: #edf5ff;
  border: 1px solid #d1e3f9;
}

.copy {
  color: var(--copy);
  line-height: 1.6;
}

.topic-page-image {
  width: 100%;
  max-width: 440px;
  display: block;
  height: auto;
  margin: 6px auto 18px;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  background: #f8fbff;
  padding: 4px;
}

.quote {
  background: var(--accent-soft);
  border: 1px solid #d7e5f6;
  border-radius: 10px;
  padding: 16px;
  margin: 18px 0 16px;
}

.quote__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.quote__text {
  font-style: italic;
  color: var(--ink);
}

.quote__author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0;
}

.footer-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0;
}

.characters {
  scroll-margin-top: 92px;
  margin-bottom: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

.characters__header {
  max-width: 560px;
  margin-bottom: 20px;
}

.characters__header p {
  color: var(--copy);
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.character {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.interaction {
  scroll-margin-top: 92px;
  margin-bottom: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

.interaction__header {
  max-width: 560px;
  margin-bottom: 20px;
}

.interaction__header p {
  color: var(--copy);
}

.interaction-scene {
  margin: 0;
  position: relative;
  min-height: 460px;
  border: 1px solid #d8e1ed;
  border-radius: 10px;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 15%, #f8fbff 0%, rgba(248, 251, 255, 0.2) 38%),
    linear-gradient(145deg, #dce9f8 0%, #f3f7fe 45%, #eaf2ff 100%);
}

.scene-avatar {
  position: absolute;
  width: 140px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #ffffff;
}

.scene-avatar--buddha {
  top: 28px;
  left: 28px;
}

.scene-avatar--stoic {
  top: 42px;
  right: 50px;
}

.scene-avatar--psych {
  bottom: 84px;
  left: 140px;
}

.scene-avatar--coach {
  bottom: 56px;
  right: 180px;
}

.scene-line {
  position: absolute;
  max-width: 250px;
  margin: 0;
  background: #ffffff;
  color: var(--copy);
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.scene-line--buddha {
  top: 56px;
  left: 190px;
}

.scene-line--stoic {
  top: 178px;
  right: 44px;
}

.scene-line--psych {
  bottom: 154px;
  left: 294px;
}

.scene-line--coach {
  bottom: 34px;
  right: 24px;
}

.scene-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 18px;
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: #3f5873;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.topics,
.practical-topics {
  scroll-margin-top: 92px;
  margin-bottom: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

.topics__header {
  max-width: 560px;
  margin-bottom: 20px;
}

.topics__header p {
  color: var(--copy);
}

.topics__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.topic-row {
  border-top: 1px solid #dce5f1;
}

.topic-row:first-child {
  border-top: 0;
}

.topic-link {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  padding: 14px 0;
}

.topic-link img {
  width: 84px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d6e2f2;
}

.topic-link__body {
  display: grid;
  gap: 4px;
}

.topic-link__coach {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #58708a;
}

.topic-link h3 {
  margin: 0;
}

.topic-link p {
  margin: 0;
  color: var(--copy);
}

.topic-link__arrow {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform 0.2s ease;
}

.topic-link:hover h3 {
  color: var(--accent);
}

.topic-link:hover .topic-link__arrow {
  transform: translateX(3px);
}

.seo-faq {
  scroll-margin-top: 92px;
  margin-bottom: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
}

.faq-item h3 {
  margin-bottom: 10px;
}

.faq-item p:last-child {
  margin-bottom: 0;
  color: var(--copy);
}

.live-cards {
  scroll-margin-top: 92px;
  margin-bottom: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

.live-cards__header {
  max-width: 560px;
  margin-bottom: 20px;
}

.live-cards__header p {
  color: var(--copy);
}

.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.topic-tab {
  border: 1px solid #d4dce8;
  background: #f7faff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.topic-tab:hover {
  border-color: #b8cde7;
}

.topic-tab.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.carousel-shell {
  display: block;
}

.carousel-progress {
  margin-top: 0;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(95, 139, 176, 0.2);
  overflow: hidden;
}

.carousel-progress__fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5f8bb0, #79a6cc);
  transition: width 0.35s ease;
}

.carousel-main {
  display: grid;
  gap: 10px;
}

.carousel-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.carousel-card {
  background: #ffffff;
  border: 1px solid #d6e1ee;
  border-radius: 10px;
  padding: 20px 22px;
  min-height: 220px;
}

.carousel-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.carousel__nav {
  min-width: 110px;
  border-radius: 8px;
  border: 1px solid #cfd9e6;
  background: #ffffff;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.carousel__nav:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: none;
}

.carousel__nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.carousel-card__status {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.carousel-card__subtitle {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.carousel-card__text {
  color: var(--copy);
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 0;
}

.carousel__meta {
  margin: 0;
  min-width: 44px;
  font-size: 0.85rem;
  color: #415b76;
  font-weight: 700;
}

.character img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.character__body h3 {
  margin-bottom: 2px;
}

.role {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.bubble {
  background: #f8f9ff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--copy);
  margin-bottom: 0;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 32px;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}

.cta p {
  color: var(--copy);
  margin-bottom: 0;
}

.cta__form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta__form input {
  border-radius: 8px;
  border: 1px solid #d7dce3;
  padding: 12px 18px;
  min-width: 220px;
  font-family: inherit;
}

.footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

.footer p {
  margin: 0;
}

.footer__legal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer a {
  color: #415b76;
  font-weight: 600;
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.card--hero,
.characters,
.interaction,
.topics,
.practical-topics,
.live-cards,
.cta {
  animation: fade-rise 0.6s ease both;
}

.characters {
  animation-delay: 0.04s;
}

.interaction {
  animation-delay: 0.08s;
}

.topics {
  animation-delay: 0.12s;
}

.practical-topics {
  animation-delay: 0.14s;
}

.live-cards {
  animation-delay: 0.16s;
}

.cta {
  animation-delay: 0.2s;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .page {
    padding-top: 24px;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .interaction-scene {
    min-height: auto;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .scene-avatar,
  .scene-line,
  .scene-caption {
    position: static;
  }

  .scene-avatar {
    width: 100%;
    max-width: 180px;
  }

  .scene-caption {
    text-align: left;
  }

  .carousel-controls {
    justify-content: stretch;
  }

  .carousel__nav {
    width: 100%;
  }

  .characters,
  .interaction,
  .topics,
  .practical-topics,
  .live-cards {
    padding: 18px;
  }

  .topic-link {
    grid-template-columns: 72px 1fr;
    align-items: start;
  }

  .topic-link img {
    width: 72px;
  }

  .topic-link__arrow {
    display: none;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.hero-shell,
.development,
.screenshots,
.exercise-library,
.exercise-encyclopedia,
.practical-topics {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(95, 139, 176, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-stack {
  position: relative;
  min-height: 640px;
}

.hero-stack__shot {
  position: absolute;
  width: min(270px, 78%);
  border-radius: 28px;
  border: 1px solid #d8e4f2;
  background: #f8fbff;
  box-shadow: 0 24px 60px rgba(27, 52, 78, 0.16);
}

.hero-stack__shot--back {
  top: 40px;
  right: 80px;
  transform: rotate(-8deg);
}

.hero-stack__shot--middle {
  top: 176px;
  left: 6px;
  z-index: 2;
  transform: rotate(4deg);
}

.hero-stack__shot--front {
  right: 10px;
  bottom: 24px;
  z-index: 3;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 22px;
}

.section-heading p {
  color: var(--copy);
}

.development,
.screenshots,
.exercise-library,
.exercise-encyclopedia,
.practical-topics {
  scroll-margin-top: 92px;
  margin-bottom: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-card p:last-child {
  margin-bottom: 0;
  color: var(--copy);
}

.feature-card__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #58708a;
  margin-bottom: 10px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.screenshot-card {
  margin: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.screenshot-card img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid #dde6f3;
  background: #f5f8fd;
}

.screenshot-card figcaption {
  color: var(--copy);
  line-height: 1.5;
}

.cta--testers {
  background:
    radial-gradient(circle at top left, rgba(95, 139, 176, 0.16), transparent 22%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.exercise-library__intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 20px;
}

.exercise-library__intro p {
  flex: 1 1 480px;
  margin-bottom: 0;
  color: var(--copy);
}

.exercise-preview-grid,
.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.exercise-carousel {
  display: grid;
  gap: 18px;
}

.exercise-carousel__viewport {
  min-height: 100%;
}

.exercise-carousel__track {
  min-height: 100%;
}

.exercise-carousel__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.exercise-carousel__meta {
  margin-bottom: 0;
  color: #415b76;
  font-weight: 700;
}

.exercise-carousel__dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exercise-carousel__dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #c9d7e6;
  cursor: pointer;
  padding: 0;
}

.exercise-carousel__dot.is-active {
  background: var(--accent);
}

.exercise-carousel__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.exercise-carousel__nav {
  min-width: 110px;
  border-radius: 8px;
  border: 1px solid #cfd9e6;
  background: #ffffff;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.exercise-carousel__nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.exercise-grid--full {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.exercise-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.exercise-card--preview {
  min-height: 100%;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: start;
  column-gap: 18px;
}

.exercise-card--preview > :not(.exercise-card__image) {
  grid-column: 1;
}

.exercise-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #d6e2f2;
  background: #f5f8fd;
}

.exercise-card__image--preview {
  grid-column: 2;
  grid-row: 1 / span 6;
  align-self: stretch;
  height: 100%;
  min-height: 180px;
  max-height: 220px;
  border-radius: 14px;
}

.exercise-card--loading,
.exercise-card--empty {
  place-content: center;
  min-height: 220px;
}

.exercise-card h3 {
  margin-bottom: 0;
}

.exercise-card p:last-child {
  margin-bottom: 0;
}

.exercise-card__label {
  margin-bottom: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #58708a;
}

.exercise-card__subtitle {
  margin-bottom: 0;
  color: var(--accent);
  font-weight: 600;
}

.exercise-card__text {
  color: var(--copy);
  line-height: 1.6;
}

.exercise-card__themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exercise-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exercise-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #edf5ff;
  border: 1px solid #d1e3f9;
  font-size: 0.78rem;
  font-weight: 700;
  color: #385570;
}

.exercise-theme-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff5e7;
  border: 1px solid #f1d9b8;
  font-size: 0.78rem;
  font-weight: 700;
  color: #8a5a1e;
}

.exercise-card__note {
  color: #4e647c;
  font-size: 0.92rem;
}

.exercise-theme-browser {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.exercise-theme-browser__copy {
  max-width: 720px;
}

.topic-browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.browse-topic-card {
  display: grid;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #dbe4f0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.browse-topic-card:hover {
  border-color: #bfd2e8;
}

.browse-topic-card:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.browse-topic-card.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
}

.browse-topic-card__eyebrow {
  margin-bottom: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #58708a;
}

.browse-topic-card h3 {
  margin-bottom: 0;
}

.browse-topic-card__copy {
  margin-bottom: 0;
  color: var(--copy);
  line-height: 1.55;
}

.browse-topic-card__sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.browse-topic-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.browse-topic-card__count {
  font-size: 0.88rem;
  font-weight: 700;
  color: #415b76;
}

.browse-topic-card__arrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.theme-exercise-browser-shell {
  margin-top: 20px;
}

.theme-exercise-browser {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #dbe4f0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.theme-exercise-browser__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.theme-exercise-browser__copy {
  max-width: 720px;
}

.theme-exercise-browser__meta {
  margin-bottom: 0;
  font-weight: 700;
  color: #415b76;
}

.theme-exercise-browser__hint {
  margin-bottom: 0;
  color: var(--copy);
}

.theme-exercise-browser__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.theme-exercise-browser__status {
  margin-bottom: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #415b76;
}

.theme-exercise-browser__viewport {
  overflow-y: auto;
  max-height: clamp(480px, 78vh, 760px);
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(244, 248, 253, 0.86), rgba(255, 255, 255, 0.96));
  padding-right: 6px;
}

.theme-exercise-browser__track {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.theme-exercise-browser__card {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.theme-exercise-browser__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.encyclopedia-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 340px);
  gap: 24px;
  align-items: center;
}

.encyclopedia-summary {
  display: grid;
  gap: 12px;
}

.summary-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbe4f0;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.summary-card__label {
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #58708a;
}

.summary-card__value {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--ink);
}

.summary-card__value--text {
  font-size: 1.1rem;
  line-height: 1.4;
}

.exercise-controls {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-field__label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #334155;
}

.search-field input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d3dfeb;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
}

.search-field input:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.exercise-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.exercise-filter {
  border: 1px solid #d4dce8;
  background: #f7faff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.exercise-filter:hover {
  border-color: #b8cde7;
}

.exercise-filter.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.exercise-results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.exercise-results-bar__text {
  margin-bottom: 0;
  color: #415b76;
  font-weight: 600;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta__contact {
  margin-top: 16px;
  font-weight: 600;
  color: var(--ink);
}

.cta__contact a {
  color: var(--accent);
  text-decoration: none;
}

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

@media (max-width: 960px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .encyclopedia-hero {
    grid-template-columns: 1fr;
  }

  .hero-stack {
    min-height: 560px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero-shell,
  .development,
  .screenshots,
  .exercise-library,
  .exercise-encyclopedia,
  .practical-topics {
    padding: 18px;
  }

  .hero-stack {
    min-height: auto;
    display: grid;
    gap: 14px;
  }

  .hero-stack__shot {
    position: static;
    width: 100%;
    transform: none;
  }

  .cta__actions {
    width: 100%;
  }

  .theme-exercise-browser {
    padding: 18px;
  }

  .theme-exercise-browser__controls {
    width: 100%;
  }

  .theme-exercise-browser__status {
    width: 100%;
  }

  .theme-exercise-browser__controls .exercise-carousel__nav {
    width: 100%;
  }

  .exercise-library__intro .btn,
  .exercise-results-bar .btn {
    width: 100%;
  }

  .exercise-card--preview {
    grid-template-columns: 1fr;
  }

  .exercise-card__image--preview {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    height: 180px;
    max-height: none;
  }

  .exercise-carousel__footer,
  .exercise-carousel__controls {
    width: 100%;
  }

  .exercise-carousel__nav {
    width: 100%;
  }

  .cta__actions .btn {
    width: 100%;
  }
}
