:root {
  --primary: #7a42ff;
  --primary-dark: #5b26db;
  --primary-soft: #f0eaff;
  --orange: #ff9742;
  --ink: #171429;
  --muted: #6f6b7d;
  --line: #e9e6f0;
  --surface: #ffffff;
  --background: #f8f7fc;
  --success: #20a66a;
  --danger: #e7515a;
  --shadow: 0 16px 45px rgba(43, 25, 89, 0.09);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

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

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(233, 230, 240, 0.8);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: initial;
  font-size: 23px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a,
.footer-nav a {
  color: #4c4859;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.main-nav a:hover,
.footer-nav a:hover {
  color: var(--primary);
}

.header-actions,
.streak {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 14px;
}

.streak {
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.streak strong {
  color: var(--ink);
}

.profile-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #8e5aff, #ff9d52);
  font-weight: 700;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 98px;
  background:
    linear-gradient(112deg, rgba(248, 247, 252, 0.6), rgba(244, 239, 255, 0.92)),
    radial-gradient(circle at 17% 28%, #fff 0 2px, transparent 3px);
  background-size: auto, 22px 22px;
}

.hero::after {
  position: absolute;
  right: -80px;
  bottom: -250px;
  width: 620px;
  height: 520px;
  border: 1px solid rgba(122, 66, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.hero-orb-one {
  top: -120px;
  right: 12%;
  width: 320px;
  height: 320px;
  background: rgba(122, 66, 255, 0.09);
}

.hero-orb-two {
  bottom: -130px;
  left: -90px;
  width: 270px;
  height: 270px;
  background: rgba(255, 151, 66, 0.09);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  align-items: center;
  gap: 88px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow {
  margin-bottom: 20px;
  padding: 7px 13px;
  border: 1px solid #e2d6ff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.hero h1 {
  max-width: 690px;
  margin: 0 0 23px;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.gradient-text {
  background: linear-gradient(100deg, var(--primary) 10%, #a447e7 54%, var(--orange));
  background-clip: text;
  color: transparent;
}

.hero-copy > p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin: 31px 0 26px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), #6831e9);
  box-shadow: 0 10px 24px rgba(122, 66, 255, 0.24);
}

.button-primary:hover {
  box-shadow: 0 14px 30px rgba(122, 66, 255, 0.31);
}

.button-ghost {
  border: 1px solid #ded8e9;
  background: rgba(255, 255, 255, 0.75);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  color: #696477;
  font-size: 12px;
  list-style: none;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-points span {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--success);
  background: #e6f7ef;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  min-height: 425px;
  display: grid;
  place-items: center;
}

.hero-visual::before {
  position: absolute;
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e5d8ff, #f8e9ff 50%, #ffe1c8);
  content: "";
}

.demo-card {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 70px rgba(61, 34, 120, 0.17);
  transform: rotate(1.5deg);
}

.demo-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.demo-card-top div {
  display: flex;
  flex-direction: column;
}

.demo-card-top small,
.demo-step {
  color: var(--muted);
  font-size: 11px;
}

.demo-card-top strong {
  font-size: 17px;
}

.demo-icon {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #f0eaff;
  font-size: 24px;
}

.demo-time {
  padding: 5px 9px;
  border-radius: 999px;
  color: #4e495d;
  background: #f4f2f7;
  font-size: 11px;
  font-weight: 600;
}

.sound-wave {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 24px 0 11px;
  border-radius: 16px;
  background: #faf8ff;
}

.sound-wave i {
  width: 4px;
  height: 20px;
  border-radius: 3px;
  background: var(--primary);
}

.sound-wave i:nth-child(2n) { height: 33px; }
.sound-wave i:nth-child(3n) { height: 44px; }
.sound-wave i:nth-child(4n) { height: 26px; }

.demo-question {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.demo-options {
  display: grid;
  gap: 7px;
}

.demo-options span {
  padding: 8px 11px;
  border: 1px solid #ece8f3;
  border-radius: 9px;
  color: #6e687c;
  font-size: 11px;
}

.demo-options .is-selected {
  border-color: #b9e6cf;
  color: #167949;
  background: #effaf5;
  font-weight: 600;
}

.demo-progress,
.inline-progress,
.exercise-progress {
  overflow: hidden;
  border-radius: 999px;
  background: #eeeaf4;
}

.demo-progress {
  height: 5px;
  margin: 20px 0 5px;
}

.demo-progress span,
.inline-progress span,
.exercise-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #a966ff);
}

.demo-progress span { width: 66%; }

.floating-tag {
  position: absolute;
  z-index: 4;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 12px 30px rgba(45, 27, 89, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.tag-top {
  top: 34px;
  right: -2px;
  color: var(--success);
  transform: rotate(5deg);
}

.tag-bottom {
  bottom: 39px;
  left: -16px;
  transform: rotate(-4deg);
}

.quick-progress {
  position: relative;
  z-index: 3;
  margin-top: -38px;
}

.progress-panel {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 34px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.progress-heading,
.current-course {
  display: flex;
  align-items: center;
}

.progress-heading {
  gap: 14px;
}

.progress-emoji,
.current-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
}

.progress-emoji {
  width: 52px;
  height: 52px;
  background: #fff5e9;
  font-size: 25px;
}

.progress-heading p,
.progress-heading h2 {
  margin: 0;
}

.progress-heading p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.progress-heading h2 {
  font-size: 16px;
}

.current-course {
  gap: 12px;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.current-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-soft);
}

.current-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.current-info strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-info > span {
  color: var(--muted);
  font-size: 10px;
}

.inline-progress {
  width: 100%;
  height: 4px;
  margin-top: 7px;
}

.button-small {
  min-height: 38px;
  padding: 0 16px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
}

.categories-section,
.catalog-section {
  padding: 100px 0;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.split-heading,
.catalog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.split-heading > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  min-width: 0;
  padding: 22px 12px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.category-card:hover,
.category-card:focus-visible {
  border-color: #cdbdff;
  box-shadow: 0 13px 30px rgba(65, 41, 120, 0.08);
  transform: translateY(-4px);
}

.category-card span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--category-soft);
  font-size: 26px;
}

.category-card strong,
.category-card small {
  display: block;
}

.category-card strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
}

.category-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.catalog-section {
  background: var(--background);
}

.catalog-heading {
  align-items: center;
  margin-bottom: 28px;
}

.search-box {
  width: 365px;
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 6px 18px rgba(40, 27, 74, 0.04);
}

.search-box > span:first-child {
  color: #777080;
  font-size: 22px;
  transform: rotate(-15deg);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.search-box kbd {
  padding: 3px 6px;
  border: 1px solid #ded9e7;
  border-radius: 5px;
  color: #8e8799;
  background: #faf9fc;
  font: 10px "Inter", sans-serif;
}

.active-filter-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 25px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill,
.filter-toggle {
  min-height: 37px;
  padding: 0 15px;
  border: 1px solid #e2deea;
  border-radius: 999px;
  color: #625d6e;
  background: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.filter-pill.is-active {
  border-color: var(--primary);
  color: white;
  background: var(--primary);
  box-shadow: 0 6px 13px rgba(122, 66, 255, 0.18);
}

.filter-toggle {
  display: none;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.filters {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.filter-header h3 {
  margin: 0;
  font-size: 14px;
}

.filter-header button {
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.filters fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 19px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.filters legend {
  margin-bottom: 11px;
  font-size: 12px;
  font-weight: 700;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #686271;
  font-size: 11px;
  cursor: pointer;
}

.filters input[type="checkbox"],
.filters input[type="radio"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--primary);
}

.filters label span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 9px;
  font-weight: 700;
}

.switch-row {
  position: relative;
  justify-content: space-between;
  padding-top: 18px;
}

.switch-row > span {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  padding: 0 !important;
  color: inherit !important;
  background: transparent !important;
}

.switch-row strong {
  color: var(--ink);
  font-size: 11px;
}

.switch-row small {
  color: var(--muted);
  font-size: 8px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
}

.switch-row i {
  position: relative;
  width: 31px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d7d3de;
  transition: 180ms ease;
}

.switch-row i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  content: "";
  transition: 180ms ease;
}

.switch-row input:checked + i {
  background: var(--primary);
}

.switch-row input:checked + i::after {
  transform: translateX(13px);
}

.catalog-toolbar {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
}

.catalog-toolbar p {
  margin: 0;
}

.catalog-toolbar strong {
  color: var(--ink);
}

.catalog-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalog-toolbar select {
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 600;
}

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

.exercise-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 6px 20px rgba(42, 26, 79, 0.03);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  animation: card-in 320ms both;
}

.exercise-card:hover,
.exercise-card:focus-within {
  border-color: #d4c8f4;
  box-shadow: 0 17px 34px rgba(49, 28, 98, 0.09);
  transform: translateY(-4px);
}

.exercise-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.exercise-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--card-soft);
  font-size: 23px;
}

.favorite-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #aaa5b2;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.favorite-button:hover,
.favorite-button.is-favorite {
  color: #ff9742;
  background: #fff5e9;
}

.exercise-badges {
  min-height: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 15px 0 7px;
}

.exercise-badge {
  padding: 3px 7px;
  border-radius: 999px;
  color: #746e7e;
  background: #f4f2f7;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.exercise-badge.is-new {
  color: #158355;
  background: #e7f8ef;
}

.exercise-card h3 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.3;
}

.exercise-card > p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.exercise-meta {
  display: flex;
  gap: 12px;
  margin-top: auto;
  color: #7b7587;
  font-size: 9px;
}

.exercise-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.exercise-progress-wrap {
  margin-top: 14px;
}

.exercise-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
}

.exercise-progress {
  height: 4px;
}

.card-action {
  width: 100%;
  min-height: 36px;
  margin-top: 15px;
  border: 1px solid #e1d8fb;
  border-radius: 10px;
  color: var(--primary);
  background: #f9f6ff;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.exercise-card:hover .card-action {
  color: white;
  background: var(--primary);
}

.load-more {
  min-height: 43px;
  display: block;
  margin: 24px auto 0;
  padding: 0 22px;
  border: 1px solid #ded8e7;
  border-radius: 12px;
  background: white;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.empty-state {
  padding: 55px 20px;
  border: 1px dashed #d8d1e4;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.empty-state > span {
  font-size: 40px;
}

.empty-state h3 {
  margin: 12px 0 5px;
}

.empty-state p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.how-section {
  padding: 80px 0;
}

.how-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
  padding: 54px 60px;
  border-radius: 30px;
  color: white;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.16), transparent 31%),
    linear-gradient(135deg, #6330df, #834cff 63%, #a76aff);
}

.how-panel::after {
  position: absolute;
  right: -45px;
  bottom: -100px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  content: "";
}

.section-kicker.light {
  color: #e8ddff;
}

.how-panel h2 {
  font-size: 32px;
}

.steps {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  align-items: start;
}

.steps li > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 13px;
  background: rgba(255,255,255,.14);
  font-weight: 800;
}

.steps strong {
  font-size: 14px;
}

.steps p {
  margin: 3px 0 0;
  color: rgba(255,255,255,.7);
  font-size: 11px;
}

.site-footer {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 50px;
}

.footer-logo {
  font-size: 19px;
}

.footer-logo .logo-mark {
  width: 35px;
  height: 35px;
  font-size: 19px;
}

.footer-inner > div > p,
.copyright {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.copyright {
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 14, 39, 0.62);
  backdrop-filter: blur(7px);
  animation: fade-in 180ms both;
}

.modal-backdrop[hidden] {
  display: none;
}

.exercise-modal {
  position: relative;
  width: min(540px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 32px;
  border-radius: 26px;
  background: white;
  box-shadow: 0 32px 90px rgba(19, 10, 42, 0.35);
  animation: modal-in 240ms both;
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 50%;
  color: #6b6575;
  background: #f3f1f6;
  font-size: 22px;
  cursor: pointer;
}

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

.modal-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: var(--modal-soft, var(--primary-soft));
  font-size: 34px;
}

.modal-hero h2 {
  margin: 0 35px 8px;
  font-size: 25px;
  line-height: 1.2;
}

.modal-hero > p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0;
}

.modal-stats div {
  padding: 13px 8px;
  border-radius: 12px;
  background: #f8f7fb;
  text-align: center;
}

.modal-stats strong,
.modal-stats span {
  display: block;
}

.modal-stats strong {
  font-size: 13px;
}

.modal-stats span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.learn-list {
  margin: 0 0 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  list-style: none;
}

.learn-list strong {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
}

.learn-list li {
  margin-top: 7px;
  color: #5f5969;
  font-size: 11px;
}

.learn-list li::before {
  margin-right: 7px;
  color: var(--success);
  content: "✓";
  font-weight: 800;
}

.modal-start {
  width: 100%;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 25px;
  padding-right: 43px;
}

.quiz-header strong {
  font-size: 12px;
}

.quiz-header span {
  color: var(--muted);
  font-size: 10px;
}

.quiz-progress {
  height: 6px;
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 99px;
  background: #eeeaf5;
}

.quiz-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #a968ff);
  transition: width 250ms ease;
}

.quiz-question {
  margin: 0 0 20px;
  font-size: 21px;
  line-height: 1.35;
}

.speak-button {
  width: 100%;
  min-height: 62px;
  margin: 0 0 18px;
  border: 1px solid #ddd2fa;
  border-radius: 15px;
  color: var(--primary);
  background: #f8f5ff;
  font-weight: 700;
  cursor: pointer;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #e5e0eb;
  border-radius: 12px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.quiz-option:hover:not(:disabled) {
  border-color: #bca7f7;
  background: #faf8ff;
}

.quiz-option.is-correct {
  border-color: #65c495;
  color: #147548;
  background: #edf9f3;
}

.quiz-option.is-wrong {
  border-color: #f0a5aa;
  color: #b93841;
  background: #fff1f2;
}

.quiz-feedback {
  min-height: 38px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.quiz-next {
  width: 100%;
  margin-top: 5px;
}

.quiz-next:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.result-view {
  padding: 12px 0 0;
  text-align: center;
}

.result-icon {
  font-size: 58px;
}

.result-view h2 {
  margin: 12px 0 6px;
  font-size: 27px;
}

.result-view > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.score-ring {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  margin: 25px auto;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--score), #eeeaf4 0);
}

.score-ring div {
  width: 102px;
  height: 102px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
}

.score-ring strong {
  font-size: 25px;
}

.result-actions {
  display: flex;
  gap: 10px;
}

.result-actions .button {
  flex: 1;
}

.toast {
  position: fixed;
  z-index: 150;
  right: 22px;
  bottom: 22px;
  max-width: 330px;
  padding: 13px 17px;
  border-radius: 12px;
  color: white;
  background: #201a2c;
  box-shadow: 0 12px 35px rgba(0,0,0,.2);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 200ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
}

@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: 1fr 420px;
    gap: 38px;
  }

  .hero h1 { font-size: 48px; }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .exercise-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .main-nav { display: none; }

  .hero {
    padding-top: 60px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy > p { margin-inline: auto; }
  .hero-actions,
  .hero-points { justify-content: center; }
  .hero-visual { min-height: 390px; }

  .progress-panel { grid-template-columns: 1fr; }
  .current-course { padding: 20px 0 0; border-top: 1px solid var(--line); border-left: 0; }

  .split-heading,
  .catalog-heading { align-items: flex-start; flex-direction: column; }
  .search-box { width: 100%; }

  .filter-toggle { display: block; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { display: none; }
  .filters.is-open { display: block; }

  .how-panel { grid-template-columns: 1fr; gap: 35px; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .footer-nav { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 580px) {
  .container { width: min(100% - 28px, 1180px); }
  .site-header .container { width: min(100% - 22px, 1180px); }
  .header-inner { min-height: 66px; }
  .logo { font-size: 19px; }
  .logo-mark { width: 36px; height: 36px; font-size: 20px; }
  .streak span:last-child { display: none; }

  .hero { padding: 44px 0 78px; }
  .hero h1 { font-size: 39px; }
  .hero-copy > p { font-size: 15px; }
  .hero-actions { flex-direction: column; }
  .hero-points { gap: 10px; }
  .hero-visual { min-height: 350px; margin-top: 10px; }
  .hero-visual::before { width: 320px; height: 320px; }
  .demo-card { width: calc(100% - 16px); padding: 20px; }
  .floating-tag { font-size: 10px; }
  .tag-top { right: -1px; }
  .tag-bottom { left: -2px; }

  .quick-progress { margin-top: -25px; }
  .progress-panel { padding: 20px; }
  .current-course { align-items: flex-start; flex-wrap: wrap; }
  .current-info { min-width: calc(100% - 60px); }
  .current-course .button { width: 100%; }

  .categories-section,
  .catalog-section { padding: 72px 0; }
  .split-heading { margin-bottom: 27px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }

  .active-filter-row { align-items: flex-start; }
  .filter-pills { flex-wrap: nowrap; overflow: auto; padding-bottom: 6px; }
  .filter-pill { flex: 0 0 auto; }

  .exercise-grid { grid-template-columns: 1fr; }
  .exercise-card > p { min-height: 0; }

  .how-section { padding: 55px 0; }
  .how-panel { width: calc(100% - 28px); padding: 38px 24px; border-radius: 24px; }
  .how-panel h2 { font-size: 27px; }

  .exercise-modal { padding: 27px 20px 22px; border-radius: 22px; }
  .modal-stats { grid-template-columns: 1fr 1fr 1fr; }
  .result-actions { flex-direction: column; }
}

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