.catalog-body {
  --page-accent: #218a78;
  --page-accent-soft: #dff5ef;
}

.catalog-body[data-accent="orange"] {
  --page-accent: #e87542;
  --page-accent-soft: #fff0e7;
}

.catalog-body[data-accent="green"],
.catalog-body[data-accent="mint"] {
  --page-accent: #4c9c62;
  --page-accent-soft: #e9f6e9;
}

.catalog-body[data-accent="blue"],
.catalog-body[data-accent="sky"],
.catalog-body[data-accent="cyan"] {
  --page-accent: #397fab;
  --page-accent-soft: #e7f4fb;
}

.catalog-body[data-accent="purple"],
.catalog-body[data-accent="violet"],
.catalog-body[data-accent="indigo"] {
  --page-accent: #715bb1;
  --page-accent-soft: #f0ecfb;
}

.catalog-body[data-accent="red"],
.catalog-body[data-accent="pink"] {
  --page-accent: #c95d66;
  --page-accent-soft: #fbedef;
}

.catalog-body[data-accent="amber"],
.catalog-body[data-accent="gold"],
.catalog-body[data-accent="yellow"] {
  --page-accent: #b17a19;
  --page-accent-soft: #fff6db;
}

.catalog-body[data-accent="navy"],
.catalog-body[data-accent="slate"] {
  --page-accent: #34576a;
  --page-accent-soft: #e9f0f3;
}

.catalog-shell {
  margin-bottom: 28px;
}

.catalog-header {
  grid-template-columns: 1fr auto auto;
  gap: 26px;
}

.catalog-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

.catalog-nav a {
  min-height: 41px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.catalog-nav a:hover,
.catalog-nav a.active {
  color: var(--teal-dark);
  background: var(--surface-soft);
}

.header-start-link {
  min-width: 142px;
  min-height: 48px;
  padding: 7px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: var(--teal);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.header-start-link span {
  font-size: 10px;
  opacity: 0.8;
}

.header-start-link strong {
  margin-top: 2px;
  font-size: 13px;
}

.catalog-main {
  padding-top: 18px;
}

.catalog-hero {
  min-height: 390px;
  padding: clamp(30px, 5vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: center;
  gap: clamp(28px, 5vw, 66px);
  overflow: hidden;
  border: 1px solid rgba(24, 59, 78, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 10%, rgba(21, 118, 110, 0.13), transparent 20rem),
    radial-gradient(circle at 10% 110%, rgba(20, 47, 63, 0.08), transparent 22rem),
    #fff;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 900;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4.3vw, 54px);
  line-height: 1.28;
  letter-spacing: -0.035em;
}

.hero-description {
  max-width: 630px;
  margin: 19px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.9;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.catalog-primary-link,
.catalog-secondary-link {
  min-height: 50px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.catalog-primary-link {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 4px 0 var(--teal-dark);
}

.catalog-primary-link:hover {
  background: #1b8279;
  transform: translateY(-1px);
}

.catalog-secondary-link {
  border: 2px solid #c8dcd7;
  color: var(--teal-dark);
  background: #fff;
}

.hero-route {
  padding: 24px;
  border: 2px solid #d2e5e0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 13px 30px rgba(48, 85, 79, 0.08);
}

.hero-route > p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.hero-route ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.hero-route li {
  min-height: 70px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 15px;
  background: var(--surface-soft);
}

.hero-route li > span {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #fff;
  background: var(--teal);
  font-size: 15px;
  font-weight: 900;
}

.hero-route li:nth-child(2) > span {
  background: #4a88ae;
}

.hero-route li:nth-child(3) > span {
  background: var(--orange);
}

.hero-route strong,
.hero-route small {
  display: block;
}

.hero-route strong {
  font-size: 15px;
}

.hero-route small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.catalog-section {
  padding-top: 38px;
}

.section-heading {
  min-height: 62px;
  margin-bottom: 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading p {
  margin: 0 0 5px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.section-heading h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.2;
}

.section-heading > span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 800;
}

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

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

.category-card,
.group-card,
.course-card {
  --card-accent: #218a78;
  --card-soft: #e3f5ef;
}

[data-accent="orange"] {
  --card-accent: #e87542;
  --card-soft: #fff0e7;
}

[data-accent="green"],
[data-accent="mint"] {
  --card-accent: #4c9c62;
  --card-soft: #e9f6e9;
}

[data-accent="blue"],
[data-accent="sky"],
[data-accent="cyan"] {
  --card-accent: #397fab;
  --card-soft: #e7f4fb;
}

[data-accent="purple"],
[data-accent="violet"],
[data-accent="indigo"] {
  --card-accent: #715bb1;
  --card-soft: #f0ecfb;
}

[data-accent="red"],
[data-accent="pink"] {
  --card-accent: #c95d66;
  --card-soft: #fbedef;
}

[data-accent="amber"],
[data-accent="gold"],
[data-accent="yellow"] {
  --card-accent: #b17a19;
  --card-soft: #fff6db;
}

[data-accent="navy"],
[data-accent="slate"] {
  --card-accent: #34576a;
  --card-soft: #e9f0f3;
}

.category-card {
  position: relative;
  min-height: 310px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(24, 59, 78, 0.12);
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 24px rgba(44, 79, 76, 0.06);
  text-decoration: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  background: var(--card-accent);
}

.category-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 65%, #fff);
  box-shadow: 0 16px 34px rgba(44, 79, 76, 0.12);
  transform: translateY(-4px);
}

.category-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-number {
  color: var(--card-accent);
  font-size: 13px;
  font-weight: 900;
}

.category-icon {
  min-width: 50px;
  height: 50px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--card-accent);
  background: var(--card-soft);
  font-size: 18px;
  font-weight: 900;
}

.category-card h3 {
  margin: 15px 0 0;
  font-size: 22px;
}

.category-card > p {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

.category-chips {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-chips span {
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--card-accent);
  background: var(--card-soft);
  font-size: 10px;
  font-weight: 800;
}

.category-meta {
  margin-top: auto;
  padding-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.category-meta strong {
  color: var(--card-accent);
}

.card-action {
  margin-top: 13px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e5eeeb;
  color: var(--card-accent);
  font-size: 12px;
  font-weight: 900;
}

.card-action b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--card-accent);
}

.catalog-guide-banner {
  margin-top: 38px;
  padding: 25px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border: 1px solid #c4ded8;
  border-radius: 24px;
  background:
    linear-gradient(100deg, rgba(223, 245, 239, 0.92), rgba(255, 255, 255, 0.96));
}

.catalog-guide-banner > div {
  display: flex;
  align-items: center;
  gap: 18px;
}

.catalog-guide-banner > div > span {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 21px;
  color: #fff;
  background: var(--teal);
  font-size: 21px;
  font-weight: 900;
}

.catalog-guide-banner > div > span .illustration-icon {
  width: 36px;
  height: 36px;
}

.catalog-guide-banner p,
.catalog-guide-banner h2,
.catalog-guide-banner small {
  margin: 0;
}

.catalog-guide-banner p {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.catalog-guide-banner h2 {
  margin-top: 3px;
  font-size: 21px;
}

.catalog-guide-banner small {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.breadcrumb {
  min-height: 40px;
  padding: 0 5px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.breadcrumb a {
  color: var(--teal-dark);
  text-decoration: none;
}

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

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

.breadcrumb-separator {
  color: #aebdb9;
}

.category-detail-hero,
.course-group-hero {
  padding: clamp(22px, 3vw, 32px);
  display: grid;
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(24, 59, 78, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 20%, color-mix(in srgb, var(--page-accent) 16%, transparent), transparent 20rem),
    #fff;
  box-shadow: var(--shadow);
}

.category-detail-hero {
  grid-template-columns: auto 1fr auto;
}

.category-detail-mark {
  width: 108px;
  height: 108px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 28px;
  color: #fff;
  background: var(--page-accent);
}

.category-detail-mark span {
  font-size: 12px;
  font-weight: 900;
  opacity: 0.78;
}

.category-detail-mark strong {
  align-self: flex-end;
  font-size: 35px;
}

.category-detail-copy > p,
.course-group-hero > div > p {
  margin: 0 0 6px;
  color: var(--page-accent);
  font-size: 13px;
  font-weight: 900;
}

.category-detail-copy h1,
.course-group-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
}

.category-detail-copy > span,
.course-group-hero > div > span {
  display: block;
  max-width: 600px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.category-detail-stats {
  min-width: 200px;
  display: grid;
  gap: 7px;
}

.category-detail-stats > div {
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 11px;
  background: var(--page-accent-soft);
}

.category-detail-stats strong {
  color: var(--page-accent);
  font-size: 12px;
}

.category-detail-stats span {
  color: var(--muted);
  font-size: 10px;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.group-card {
  position: relative;
  min-height: 190px;
  padding: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  gap: 16px;
  overflow: hidden;
  border: 1px solid rgba(24, 59, 78, 0.12);
  border-radius: 21px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 22px rgba(44, 79, 76, 0.055);
  text-decoration: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease;
}

.group-card:hover {
  border-color: var(--card-accent);
  transform: translateY(-3px);
}

.group-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--card-accent);
  background: var(--card-soft);
  font-size: 13px;
  font-weight: 900;
}

.group-card-copy h3 {
  margin: 1px 0 0;
  font-size: 20px;
}

.group-card-copy p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.group-meta {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.group-meta strong.available {
  color: var(--card-accent);
}

.group-card .card-action {
  grid-column: 1 / -1;
}

.course-group-hero {
  grid-template-columns: auto 1fr auto;
}

.course-group-icon {
  min-width: 88px;
  height: 88px;
  padding: 0 14px;
  display: grid;
  place-items: center;
  border-radius: 25px;
  color: #fff;
  background: var(--page-accent);
  font-size: 28px;
  font-weight: 900;
}

.course-group-hero > strong {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--page-accent);
  background: var(--page-accent-soft);
  font-size: 12px;
}

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

.course-card {
  min-height: 225px;
  padding: 19px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(24, 59, 78, 0.12);
  border-radius: 20px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 22px rgba(44, 79, 76, 0.055);
  text-decoration: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

a.course-card:hover {
  border-color: var(--card-accent);
  box-shadow: 0 15px 30px rgba(44, 79, 76, 0.11);
  transform: translateY(-3px);
}

.course-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.course-index {
  margin-right: auto;
  color: var(--card-accent);
  font-size: 12px;
  font-weight: 900;
}

.level-chip {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.level-chip {
  color: var(--card-accent);
  background: var(--card-soft);
}

.course-card h3 {
  margin: 17px 0 0;
  font-size: 20px;
}

.course-card > p {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.course-card-footer {
  margin-top: auto;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e5eeeb;
}

.course-card-footer strong {
  color: var(--muted);
  font-size: 10px;
}

.course-card-footer span {
  color: var(--card-accent);
  font-size: 12px;
  font-weight: 900;
}

.back-catalog-link {
  min-height: 46px;
  margin-top: 24px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbded9;
  border-radius: 13px;
  color: var(--teal-dark);
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.not-found-panel {
  min-height: 380px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border: 1px solid rgba(24, 59, 78, 0.12);
  border-radius: 28px;
  background: #fff;
  text-align: center;
}

.not-found-panel > span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: var(--orange);
  font-size: 32px;
  font-weight: 900;
}

.not-found-panel h1 {
  margin: 0;
  font-size: 28px;
}

@media (max-width: 980px) {
  .catalog-header {
    grid-template-columns: 1fr auto;
  }

  .catalog-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

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

  .hero-route ol {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-route li {
    min-height: 105px;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .category-detail-hero {
    grid-template-columns: auto 1fr;
  }

  .category-detail-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .catalog-header {
    gap: 10px;
  }

  .header-start-link {
    min-width: auto;
  }

  .header-start-link span {
    display: none;
  }

  .catalog-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .catalog-nav a {
    white-space: nowrap;
  }

  .catalog-hero {
    min-height: auto;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .hero-route li {
    min-height: 66px;
    flex-direction: row;
    align-items: center;
  }

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

  .featured-grid,
  .category-grid,
  .group-grid,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 285px;
  }

  .catalog-guide-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .category-detail-hero,
  .course-group-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .category-detail-mark,
  .course-group-icon {
    justify-self: center;
  }

  .category-detail-stats {
    grid-template-columns: 1fr;
  }

  .course-group-hero > strong {
    justify-self: center;
  }
}

/*
 * v1.45: premium hero artwork with a deterministic, readable copy area.
 * The image remains decorative; navigation and explanatory text stay as HTML.
 */
.catalog-hero {
  position: relative;
  isolation: isolate;
  display: block;
  min-height: 430px;
  padding: clamp(34px, 5vw, 58px);
  background: #071a29;
}

.catalog-hero-image {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

.catalog-hero .hero-copy {
  width: min(56%, 630px);
  position: relative;
  z-index: 1;
}

.catalog-hero .hero-description {
  color: rgba(247, 251, 253, 0.84);
}

@media (max-width: 900px) {
  .catalog-hero .hero-copy {
    width: min(72%, 620px);
  }

  .catalog-hero-image {
    opacity: 0.62;
  }
}

/*
 * v1.42: a calmer contemporary catalogue. Strong typography and restrained
 * depth replace the older stacked-card look while preserving the 1,200px
 * reading width and the edge-to-edge fixed header.
 */
.catalog-body {
  background:
    radial-gradient(circle at 9% 2%, rgba(45, 191, 166, 0.09), transparent 25rem),
    radial-gradient(circle at 95% 18%, rgba(79, 113, 209, 0.08), transparent 30rem),
    #f5f7fa;
}

.catalog-body .catalog-header {
  background: rgba(252, 253, 254, 0.94);
  box-shadow: 0 10px 34px rgba(20, 38, 53, 0.09);
}

.catalog-nav a {
  border-radius: 9px;
  font-size: 14px;
}

.header-start-link,
.catalog-primary-link {
  background: linear-gradient(135deg, #0d6f69, #11977f);
  box-shadow: 0 7px 18px rgba(15, 124, 111, 0.2);
}

.catalog-hero {
  min-height: 430px;
  border: 0;
  border-radius: 34px;
  color: #f7fbff;
  background:
    radial-gradient(circle at 82% 5%, rgba(65, 223, 185, 0.22), transparent 24rem),
    radial-gradient(circle at 20% 115%, rgba(255, 183, 91, 0.16), transparent 28rem),
    linear-gradient(135deg, #0c2435 0%, #103d4b 58%, #0d5a55 100%);
  box-shadow: 0 26px 70px rgba(12, 36, 53, 0.2);
}

.catalog-hero .eyebrow {
  color: #8cebd5;
  letter-spacing: 0.08em;
}

.catalog-hero .hero-copy h1 {
  font-size: clamp(30px, 3.5vw, 44px);
  line-height: 1.18;
}

.catalog-hero .hero-description {
  color: rgba(242, 250, 252, 0.78);
  font-size: 17px;
}

.catalog-hero .catalog-secondary-link {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.catalog-hero .hero-route {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.catalog-hero .hero-route > p,
.catalog-hero .hero-route small {
  color: rgba(239, 248, 250, 0.7);
}

.catalog-hero .hero-route li {
  background: rgba(255, 255, 255, 0.09);
}

.catalog-hero .hero-route li > span {
  color: #0d3b44;
  background: #85e7d0;
}

.catalog-hero .hero-route li:nth-child(2) > span {
  background: #9cc8ff;
}

.catalog-hero .hero-route li:nth-child(3) > span {
  background: #ffc987;
}

.category-card,
.group-card,
.course-card {
  border-color: rgba(20, 48, 64, 0.1);
  border-radius: 20px;
  box-shadow: 0 9px 28px rgba(27, 54, 66, 0.07);
}

.category-card:hover,
.group-card:hover,
.course-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 48%, white);
  box-shadow: 0 18px 42px rgba(27, 54, 66, 0.13);
  transform: translateY(-4px);
}

.category-family {
  padding: 24px;
  border: 1px solid rgba(20, 48, 64, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.68);
}

.beginner-entry-banner {
  position: relative;
  min-height: 280px;
  margin-top: 34px;
  padding: 34px 36px;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  overflow: hidden;
  border: 1px solid #dfb562;
  border-radius: 26px;
  color: #49361f;
  background: #f3cf82;
  box-shadow: 0 18px 44px rgba(119, 82, 24, 0.14);
}

.beginner-entry-visual {
  width: 118px;
  height: 118px;
  padding: 10px;
  border: 1px solid #d9a753;
  border-radius: 25px;
  background: #fff0c9;
}

.beginner-entry-visual img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
  object-fit: contain;
}

.beginner-entry-copy > p {
  margin: 0 0 8px;
  color: #7a4e12;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.beginner-entry-copy h2 {
  margin: 0;
  font-size: clamp(28px, 3.3vw, 38px);
  line-height: 1.15;
}

.beginner-entry-copy > span {
  max-width: 640px;
  margin-top: 13px;
  display: block;
  color: #5f4c31;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.8;
}

.beginner-entry-copy ul {
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.beginner-entry-copy li {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid #e5bd6c;
  color: #62491f;
  background: #fff0c9;
  font-size: 13px;
  font-weight: 800;
}

.beginner-entry-banner > a {
  min-width: 280px;
  min-height: 68px;
  padding: 10px 12px 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 16px;
  border: 2px solid #8d5918;
  color: #fff;
  background: #a9681b;
  box-shadow: 0 9px 20px rgba(93, 60, 18, 0.2);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.beginner-entry-banner > a:hover {
  color: #fff;
  background: #8e5718;
}

@media (max-width: 980px) {
  .beginner-entry-banner {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .beginner-entry-visual {
    width: 100px;
    height: 100px;
  }

  .beginner-entry-banner > a {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

@media (max-width: 700px) {
  .catalog-hero {
    min-height: 0;
    border-radius: 24px;
  }

  .category-family {
    padding: 16px;
    border-radius: 22px;
  }

  .beginner-entry-banner {
    padding: 24px 20px;
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .beginner-entry-visual {
    width: 84px;
    height: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-card,
  .group-card,
  .course-card {
    transition: none;
  }
}

/* v1.11: make the actual exercise-library size visible on every card. */
.course-card-stats {
  display: grid;
  gap: 3px;
}

.course-card-footer .course-card-stats strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.course-card-stats small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.category-meta strong,
.group-meta strong {
  font-size: 14px;
}

/* v1.7: professional top-page information architecture */
.trust-strip {
  margin-top: 16px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(20, 47, 63, 0.12);
  border-radius: 18px;
  background: #dce6e7;
  overflow: hidden;
}

.trust-strip > div {
  min-height: 62px;
  padding: 8px 16px;
  display: grid;
  align-content: center;
  background: #fff;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  color: var(--teal-dark);
  font-size: 14px;
}

.trust-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-text-link {
  color: var(--teal-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

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

.audience-grid article {
  min-height: 210px;
  padding: 24px;
  border: 1px solid rgba(20, 47, 63, 0.12);
  border-radius: 20px;
  background: #fff;
}

.audience-grid article > span {
  color: var(--teal);
  font: 800 13px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.audience-grid h3 {
  margin: 30px 0 0;
  font-size: 21px;
}

.audience-grid p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
}

.method-section {
  margin-top: 42px;
  padding: clamp(28px, 4vw, 46px);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 68px);
  border-radius: 26px;
  color: #fff;
  background: #143b4a;
}

.method-intro > p,
.use-notice > div > p {
  margin: 0 0 9px;
  color: #88cec4;
  font-size: 12px;
  font-weight: 900;
}

.method-intro h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.45;
}

.method-intro > span {
  display: block;
  margin-top: 18px;
  color: #d9e5e8;
  font-size: 14px;
  line-height: 1.9;
}

.method-steps {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
}

.method-steps li {
  min-height: 78px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.method-steps b {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #143b4a;
  background: #9dd8cf;
}

.method-steps strong,
.method-steps span {
  display: block;
}

.method-steps strong {
  font-size: 15px;
}

.method-steps span {
  margin-top: 4px;
  color: #cbdcdf;
  font-size: 12px;
  line-height: 1.55;
}

.use-notice {
  margin-top: 34px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 26px;
  border: 1px solid #cbd9dd;
  border-radius: 20px;
  background: #fff;
}

.use-notice > div > p {
  color: var(--teal-dark);
}

.use-notice h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
}

.use-notice > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.use-notice > a {
  color: var(--teal-dark);
  white-space: nowrap;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.standard-evaluation {
  padding-top: 48px;
}

.standard-evaluation-heading > span {
  color: var(--teal-dark);
  font-weight: 900;
}

.standard-evaluation-intro {
  max-width: 980px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.85;
}

.standard-evaluation-grid {
  min-width: 0;
  margin-top: 22px;
  display: grid;
  gap: 24px;
}

.standard-evaluation-grid > article {
  min-width: 0;
  padding: 26px;
  border: 1px solid #cbdadd;
  border-radius: 22px;
  background: #f9fcfc;
}

.standard-evaluation-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
}

.standard-evaluation-grid article > p {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
}

.standard-table-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid #cbdadd;
  border-radius: 17px;
  background: #fff;
}

.standard-evaluation-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.standard-evaluation-table th,
.standard-evaluation-table td {
  padding: 13px 15px;
  border-right: 1px solid #dde7e9;
  border-bottom: 1px solid #dde7e9;
  text-align: left;
  vertical-align: middle;
}

.standard-evaluation-table thead th {
  color: #173f4a;
  background: #e8f4f2;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.standard-evaluation-table tr > :last-child {
  border-right: 0;
}

.standard-evaluation-table tbody tr:last-child > * {
  border-bottom: 0;
}

.standard-evaluation-table tbody tr:nth-child(even) > * {
  background: #f8fbfb;
}

.standard-evaluation-table tbody th {
  width: 86px;
  color: #fff;
  background: #247b70;
  text-align: center;
  font-size: 17px;
  white-space: nowrap;
}

.standard-evaluation-table tbody tr:nth-child(even) > th {
  background: #1f6d64;
}

.standard-evaluation-table tbody tr.is-secret[data-secret-rank="light"] > th {
  color: #fff;
  background: #124f61;
}

.standard-evaluation-table tbody tr.is-secret[data-secret-rank="light"] > td {
  color: #173f4a;
  background: #e4f1f3;
}

.standard-evaluation-table tbody tr.is-secret[data-secret-rank="sound"] > th {
  color: #fff;
  background: #247b70;
}

.standard-evaluation-table tbody tr.is-secret[data-secret-rank="sound"] > td {
  color: #173f4a;
  background: #edf7f5;
}

.standard-use-table {
  min-width: 620px;
}

.standard-use-table tbody th {
  width: 130px;
}

.site-footer {
  margin-top: 42px;
  padding: 34px 36px 20px;
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 34px;
  border: 1px solid rgba(20, 47, 63, 0.13);
  border-radius: 24px;
  color: #dce7ea;
  background: #102e3b;
}

.footer-brand strong {
  color: #fff;
  font-size: 24px;
}

.footer-brand > span {
  display: block;
  margin-top: 5px;
  color: #9bcfc7;
  font-size: 12px;
  font-weight: 800;
}

.footer-brand p {
  max-width: 360px;
  margin: 16px 0 0;
  color: #b9ccd2;
  font-size: 13px;
  line-height: 1.75;
}

.site-footer > nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.site-footer nav strong,
.site-footer nav a {
  display: block;
}

.site-footer nav strong {
  margin-bottom: 11px;
  color: #fff;
  font-size: 12px;
}

.site-footer nav a {
  margin-top: 8px;
  color: #b9ccd2;
  text-decoration: none;
  font-size: 12px;
}

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

.footer-tool-ad {
  width: fit-content;
  max-width: 390px;
  min-height: 56px;
  grid-column: 2;
  justify-self: end;
  margin: -5px 0 0;
  padding: 7px 10px 7px 8px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  color: #b9ccd2;
  background: rgba(255, 255, 255, 0.055);
  text-decoration: none;
  transition: 150ms ease;
}

.footer-tool-ad img {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 10px;
}

.footer-tool-ad span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.footer-tool-ad small {
  color: #9bcfc7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.footer-tool-ad strong {
  overflow: hidden;
  color: #e7eff1;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-tool-ad b {
  color: #9bcfc7;
  font-size: 15px;
}

.footer-tool-ad:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #91aab2;
  font-size: 11px;
}

@media (max-width: 900px) {
  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .audience-grid,
  .method-section,
  .use-notice {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-tool-ad {
    grid-column: 1;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .trust-strip,
  .audience-grid,
  .site-footer > nav {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 28px 22px 18px;
  }

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

  .footer-tool-ad {
    width: fit-content;
    max-width: 100%;
  }
}

/* v1.7: readable type floor for cards, metadata and site information */
.header-start-link span,
.category-card-tag,
.category-card-stats,
.category-detail-stats span,
.level-chip,
.course-card-footer strong {
  font-size: 12px;
}

.hero-route small,
.category-detail-breadcrumb,
.group-heading span,
.footer-bottom {
  font-size: 13px;
}

.category-card p,
.course-card p,
.audience-grid p,
.method-steps span,
.use-notice > p {
  font-size: 15px;
  line-height: 1.75;
}

.category-card h3,
.course-card h3,
.audience-grid h3 {
  font-size: 20px;
  line-height: 1.4;
}

/* v1.10: purpose-based large-category groups and larger interaction targets */
.category-groups {
  display: grid;
  gap: 30px;
}

.category-family {
  padding: 24px;
  border: 1px solid rgba(24, 59, 78, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 24px rgba(44, 79, 76, 0.05);
}

.category-family-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.category-family-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 12px;
}

.category-family-number {
  width: 40px;
  height: 40px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.category-family-copy h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.category-family-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.category-family-count {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-light);
  font-size: 13px;
}

.category-family-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-family-grid .category-card {
  min-height: 294px;
}

.category-card > p,
.category-chips span,
.category-meta,
.card-action {
  font-size: 12px;
}

.card-action {
  min-height: 44px;
  align-items: center;
  font-size: 14px;
}

.catalog-nav a,
.header-start-link,
.catalog-primary-link,
.catalog-secondary-link,
.course-card-footer,
.info-toc a {
  min-height: 44px;
}

@media (max-width: 1080px) {
  .category-family-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .category-family {
    padding: 18px;
  }

  .category-family-heading {
    align-items: flex-start;
  }

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

@media (max-width: 520px) {
  .category-family-heading {
    display: grid;
  }

  .category-family-count {
    justify-self: start;
  }

  .category-family-grid {
    grid-template-columns: 1fr;
  }

  .category-family-grid .category-card {
    min-height: 0;
  }
}

/* v1.24: fixed navigation, related illustration icons and one-point artwork. */
html {
  scroll-padding-top: 112px;
}

.catalog-body {
  scroll-padding-top: 112px;
}

.catalog-body .catalog-header {
  position: sticky;
  z-index: 100;
  top: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(34, 68, 73, 0.12);
}

.illustration-icon {
  width: 1em;
  height: 1em;
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.category-icon .illustration-icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.85;
}

.group-card-visual {
  display: grid;
  gap: 10px;
  align-content: start;
}

.group-card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 22%, #d9e4e6);
  border-radius: 14px;
  color: var(--card-accent);
  background: #fff;
}

.group-card-icon .illustration-icon {
  width: 25px;
  height: 25px;
}

.course-card-icon {
  width: 38px;
  height: 38px;
  margin-right: 2px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--card-accent);
  background: var(--card-soft);
}

.course-card-icon .illustration-icon {
  width: 23px;
  height: 23px;
}

.category-detail-mark strong {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.category-detail-mark .illustration-icon {
  width: 50px;
  height: 50px;
}

.course-group-icon .illustration-icon {
  width: 48px;
  height: 48px;
}

/* v1.37: crisp, restrained containers for the original monoline icon set. */
.category-icon,
.group-card-icon,
.course-card-icon {
  border: 1px solid color-mix(in srgb, var(--card-accent) 24%, #dce7e8);
  border-radius: 12px;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--card-soft) 88%, #fff),
      #fff
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 5px 14px color-mix(in srgb, var(--card-accent) 9%, transparent);
}

.category-icon .illustration-icon,
.group-card-icon .illustration-icon,
.course-card-icon .illustration-icon {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
}

.back-to-top {
  position: fixed;
  z-index: 110;
  right: max(18px, calc((100vw - 1160px) / 2 - 4px));
  bottom: 20px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border: 1px solid rgba(11, 85, 79, 0.28);
  border-radius: 18px;
  color: #fff;
  background: rgba(20, 59, 74, 0.94);
  box-shadow: 0 9px 24px rgba(20, 47, 63, 0.2);
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.back-to-top span {
  font-size: 20px;
  font-weight: 900;
  line-height: 0.9;
}

/*
 * v1.39: commercial-quality PNG illustration system.
 * The keycap base shared by every image keeps even subject-specific cards
 * visibly connected to touch-typing practice.
 */
.illustration-icon {
  display: block;
  object-fit: contain;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

.category-icon {
  min-width: 68px;
  width: 68px;
  height: 68px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 20%, #dce7e8);
  border-radius: 19px;
  background: linear-gradient(145deg, #f5faf8, #fff);
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 20px color-mix(in srgb, var(--card-accent) 10%, transparent);
}

.category-icon .illustration-icon {
  width: 62px;
  height: 62px;
  filter: none;
}

.group-card-icon {
  width: 54px;
  height: 54px;
  padding: 2px;
  border-radius: 16px;
  background: linear-gradient(145deg, #f4f9f7, #fff);
}

.group-card-icon .illustration-icon {
  width: 49px;
  height: 49px;
  filter: none;
}

.course-card-icon {
  width: 48px;
  height: 48px;
  padding: 2px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f4f9f7, #fff);
}

.course-card-icon .illustration-icon {
  width: 44px;
  height: 44px;
  filter: none;
}

.category-detail-mark {
  width: 112px;
  height: 112px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--page-accent) 22%, #d9e5e6);
  color: var(--page-accent);
  background:
    radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--page-accent) 10%, transparent), transparent 60%),
    #fff;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--page-accent) 12%, transparent);
}

.category-detail-mark strong {
  width: 76px;
  height: 76px;
}

.category-detail-mark .illustration-icon {
  width: 76px;
  height: 76px;
}

.course-group-icon {
  min-width: 96px;
  width: 96px;
  height: 96px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--page-accent) 22%, #d9e5e6);
  border-radius: 26px;
  color: var(--page-accent);
  background:
    radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--page-accent) 10%, transparent), transparent 60%),
    #fff;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--page-accent) 12%, transparent);
}

.course-group-icon .illustration-icon {
  width: 84px;
  height: 84px;
}

.catalog-guide-banner > div > span {
  width: 74px;
  height: 74px;
  padding: 3px;
  border: 1px solid rgba(20, 99, 91, 0.16);
  border-radius: 22px;
  color: var(--teal);
  background: linear-gradient(145deg, #eff8f4, #fff);
}

.catalog-guide-banner > div > span .illustration-icon {
  width: 68px;
  height: 68px;
}

.back-to-top strong {
  font-size: 11px;
  letter-spacing: 0.05em;
}

.back-to-top:hover {
  background: var(--teal);
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 142px;
  }

  .catalog-body {
    scroll-padding-top: 142px;
  }

  .catalog-body .catalog-header {
    top: 6px;
  }

  .back-to-top {
    right: max(9px, env(safe-area-inset-right));
    bottom: max(9px, env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }
}

/* v1.26: keep catalogue and information pages comfortably bounded on wide screens. */
.catalog-body .catalog-shell {
  width: calc(100% - 40px);
  max-width: 1200px;
}

.category-family-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.featured-grid,
.course-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.group-grid {
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}

.back-to-top {
  right: 20px;
  bottom: 20px;
  background: rgba(20, 59, 74, 0.72);
  box-shadow: 0 7px 20px rgba(20, 47, 63, 0.14);
}

.back-to-top:hover {
  background: rgba(15, 98, 87, 0.9);
}

@media (max-width: 700px) {
  .catalog-body .catalog-shell {
    width: calc(100% - 24px);
  }

  .category-family-grid,
  .featured-grid,
  .course-grid,
  .group-grid {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    right: 12px;
    bottom: 12px;
  }
}

/*
 * v1.41: edge-to-edge fixed navigation.
 * The header is a real top bar instead of a floating rounded card. Its inner
 * content stays aligned with the 1,200px page column.
 */
:root {
  --catalog-header-height: 76px;
}

html,
.catalog-body {
  scroll-padding-top: calc(var(--catalog-header-height) + 20px);
}

.catalog-body .catalog-shell {
  margin-top: 0;
}

.catalog-body .catalog-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  min-height: var(--catalog-header-height);
  padding: 10px max(20px, calc((100vw - 1200px) / 2 + 20px));
  border: 0;
  border-bottom: 1px solid rgba(24, 59, 78, 0.14);
  border-radius: 0;
  background: rgba(250, 253, 252, 0.97);
  box-shadow: 0 7px 22px rgba(25, 59, 67, 0.11);
  backdrop-filter: blur(14px);
}

.catalog-body .catalog-main {
  padding-top: calc(var(--catalog-header-height) + 20px);
}

/*
 * v1.50: the compact header no longer carries a right-side shortcut.
 * Page-switch banners use an explicit two-line action button.
 */
html {
  scroll-behavior: smooth;
}

.catalog-body .catalog-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.course-switch-button {
  min-width: 260px;
  min-height: 68px;
  padding: 10px 12px 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 2px solid #9a641e;
  border-radius: 16px;
  color: #fff;
  background: #a9681b;
  box-shadow: 0 9px 20px rgba(93, 60, 18, 0.2);
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.course-switch-button .course-switch-button-copy {
  margin: 0;
  display: grid;
  gap: 2px;
  color: inherit;
  text-align: left;
}

.course-switch-button .course-switch-button-copy small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.course-switch-button .course-switch-button-copy strong {
  color: inherit;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

.course-switch-button > b {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #7b4d14;
  background: #fff4d5;
  font-size: 21px;
  line-height: 1;
}

.course-switch-button:hover {
  color: #fff;
  background: #8e5718;
  box-shadow: 0 12px 25px rgba(93, 60, 18, 0.25);
  transform: translateY(-2px);
}

.course-switch-button:focus-visible {
  outline: 3px solid #f0ae42;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .course-switch-button {
    transition: none;
  }
}

@media (max-width: 700px) {
  .course-switch-button {
    width: 100%;
    min-width: 0;
  }

  .course-switch-button .course-switch-button-copy strong {
    white-space: normal;
  }
}

@media (max-width: 980px) {
  :root {
    --catalog-header-height: 126px;
  }

  .catalog-body .catalog-header {
    padding-inline: 20px;
  }
}

@media (max-width: 700px) {
  :root {
    --catalog-header-height: 124px;
  }

  .catalog-body .catalog-header {
    padding: 8px 12px;
  }

  .catalog-body .catalog-main {
    padding-top: calc(var(--catalog-header-height) + 14px);
  }
}

/* Final v1.42 cascade: keep the modern surfaces after legacy compatibility rules. */
.catalog-body .catalog-header {
  background: rgba(252, 253, 254, 0.94);
  box-shadow: 0 10px 34px rgba(20, 38, 53, 0.09);
}

.category-family {
  border-color: rgba(20, 48, 64, 0.08);
  border-radius: 28px;
  box-shadow: none;
}

.category-family-number {
  border-radius: 11px;
  background: linear-gradient(145deg, #123447, #107469);
}

/* v1.43: keep headings strong without overwhelming the catalogue column. */
.section-heading h2,
.method-intro h2,
.catalog-guide-banner h2 {
  font-size: clamp(25px, 2.8vw, 34px);
}

/* v1.59: search-intent guidance that remains useful as ordinary page content. */
.typing-search-guide {
  display: grid;
  gap: 24px;
  padding: clamp(30px, 4vw, 46px);
  border: 1px solid rgba(20, 66, 73, 0.1);
  border-radius: 28px;
  background: #f7faf9;
}

.typing-search-guide-lead {
  max-width: 920px;
  margin: 0;
  color: #49616a;
  font-size: 17px;
  line-height: 1.9;
}

.typing-search-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.typing-search-guide-grid article {
  display: flex;
  min-height: 238px;
  flex-direction: column;
  gap: 11px;
  padding: 24px;
  border: 1px solid rgba(20, 66, 73, 0.09);
  border-radius: 20px;
  background: #fff;
}

.typing-search-guide-grid article > span {
  color: #16756d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.typing-search-guide-grid h3 {
  margin: 0;
  color: #173b49;
  font-size: 20px;
  line-height: 1.45;
}

.typing-search-guide-grid p {
  margin: 0;
  color: #526a72;
  font-size: 15px;
  line-height: 1.8;
}

.typing-search-guide-grid a {
  margin-top: auto;
  color: #126c65;
  font-weight: 800;
  text-decoration: none;
}

.typing-search-guide-grid a::after {
  content: " →";
}

.typing-faq {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.typing-faq h3 {
  margin: 0 0 4px;
  color: #173b49;
  font-size: 21px;
}

.typing-faq details {
  border: 1px solid rgba(20, 66, 73, 0.1);
  border-radius: 14px;
  background: #fff;
}

.typing-faq summary {
  padding: 16px 18px;
  color: #244b57;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.typing-faq details p {
  margin: 0;
  padding: 0 18px 18px;
  color: #526a72;
  font-size: 15px;
  line-height: 1.8;
}

@media (max-width: 900px) {
  .typing-search-guide-grid {
    grid-template-columns: 1fr;
  }

  .typing-search-guide-grid article {
    min-height: 0;
  }
}
