.tarot-hub {
  --hub-border: #eadfe7;
  --hub-soft: #fff6fb;
  --hub-soft-strong: #ffeefa;
  --hub-shadow: 0 8px 28px rgba(44, 25, 39, .07);
  color: var(--txt);
}

.tarot-hub__hero {
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 86% 14%, rgba(192, 0, 143, .11), transparent 24rem),
    linear-gradient(135deg, #ffeefa 0%, #fff 72%);
  border-bottom: 1px solid var(--hub-border);
}

.tarot-hub__hero::after {
  content: "";
  position: absolute;
  width: 22rem;
  height: 22rem;
  right: -10rem;
  bottom: -14rem;
  border: 1px solid rgba(192, 0, 143, .14);
  border-radius: 50%;
  pointer-events: none;
}

.tarot-hub__hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.8rem 1.2rem 2.4rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.tarot-hub__eyebrow,
.tarot-hub__kicker {
  margin: 0 0 .6rem;
  color: var(--prim);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tarot-hub__hero h1 {
  max-width: 900px;
  margin: 0 auto 1rem;
  font-size: clamp(2.8rem, 4vw, 4rem);
  line-height: 1.16;
  letter-spacing: -.02em;
}

.tarot-hub__lead {
  max-width: 790px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.6rem, 1.8vw, 1.9rem);
  line-height: 1.55;
}

.tarot-hub__routes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
  max-width: 1000px;
  margin: 2rem auto 0;
}

.tarot-hub__route {
  display: block;
  padding: 1.4rem 1.6rem;
  color: var(--txt);
  text-align: left;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--hub-border);
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(44, 25, 39, .05);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.tarot-hub__route:hover {
  border-color: var(--prim);
  box-shadow: var(--hub-shadow);
  text-decoration: none;
  transform: translateY(-2px);
}

.tarot-hub__route strong,
.tarot-hub__route span {
  display: block;
}

.tarot-hub__route strong {
  line-height: 1.35;
}

.tarot-hub__route span {
  margin-top: .35rem;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1.4;
}

.tarot-hub__tools {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.2rem 1.3rem;
  scroll-margin-top: 7.6rem;
}

.tarot-hub__search {
  max-width: 760px;
  margin: 0 auto;
}

.tarot-hub__search > label {
  display: block;
  margin-bottom: .7rem;
  font-weight: 750;
  text-align: center;
}

.tarot-hub__search-field {
  display: flex;
  gap: .8rem;
}

.tarot-hub__search input {
  width: 100%;
  min-width: 0;
  min-height: 5.2rem;
  padding: 0 1.6rem;
  color: var(--txt);
  background: #fff;
  border: 1px solid #d8ccd5;
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(44, 25, 39, .05);
  font: inherit;
}

.tarot-hub__search input:focus {
  border-color: var(--prim);
  outline: 3px solid rgba(192, 0, 143, .14);
}

.tarot-hub__search button {
  flex: 0 0 auto;
  min-height: 5.2rem;
  padding: 0 1.4rem;
  color: var(--prim);
  background: #fff;
  border: 1px solid rgba(192, 0, 143, .35);
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tarot-hub__search button:hover {
  background: var(--hub-soft);
}

.tarot-hub__search-status,
.tarot-hub__noscript {
  display: block;
  margin-top: .7rem;
  color: var(--muted);
  font-size: 1.35rem;
  text-align: center;
}

.tarot-hub__section-nav-wrap {
  position: sticky;
  top: 64px;
  z-index: 80;
  background: rgba(249, 249, 251, .96);
  border-top: 1px solid #eee;
  border-bottom: 1px solid #e5e1e4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
  backdrop-filter: blur(10px);
}

.tarot-hub__section-nav {
  display: flex;
  gap: .7rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: .8rem 1.2rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.tarot-hub__section-nav a {
  flex: 0 0 auto;
  padding: .7rem 1.1rem;
  color: var(--txt);
  white-space: nowrap;
  background: #fff;
  border: 1px solid #e5dce3;
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 650;
}

.tarot-hub__section-nav a:hover,
.tarot-hub__section-nav a:focus-visible {
  color: #fff;
  background: var(--prim);
  border-color: var(--prim);
  text-decoration: none;
}

.tarot-hub__body {
  display: grid;
  gap: 2.4rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.4rem 1.2rem 0;
}

.tarot-hub__panel,
.tarot-hub__catalog-intro,
.tarot-hub__minor-intro,
.tarot-arcana,
.tarot-hub__guide,
.tarot-hub__spreads,
.tarot-hub__method {
  padding: clamp(1.6rem, 3vw, 2.8rem);
  background: #fff;
  border: 1px solid #eee9ed;
  border-radius: 16px;
  box-shadow: var(--hub-shadow);
}

.tarot-hub__body section[id] {
  scroll-margin-top: 13rem;
}

.tarot-hub__panel h2,
.tarot-hub__catalog-intro h2,
.tarot-hub__minor-intro h2,
.tarot-hub__guide h2,
.tarot-hub__spreads h2,
.tarot-hub__method h2,
.tarot-hub__faq h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  line-height: 1.25;
}

.tarot-hub__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  gap: 2.4rem;
  align-items: center;
}

.tarot-hub__copy p:last-child,
.tarot-hub__catalog-intro > p:last-child,
.tarot-hub__minor-intro p,
.tarot-hub__method-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.tarot-hub__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.tarot-hub__fact {
  padding: 1.2rem;
  background: var(--hub-soft);
  border: 1px solid #f0e1eb;
  border-radius: 12px;
}

.tarot-hub__fact dt {
  color: var(--muted);
  font-size: 1.25rem;
}

.tarot-hub__fact dd {
  margin: .2rem 0 0;
}

.tarot-hub__fact strong {
  font-size: 2rem;
}

.tarot-hub__catalog-intro {
  background: linear-gradient(135deg, #fff 0%, var(--hub-soft) 100%);
}

.tarot-hub__catalog-intro > p:not(.tarot-hub__kicker),
.tarot-hub__minor-intro p {
  max-width: 86ch;
}

.tarot-hub__catalog {
  display: grid;
  gap: 2.4rem;
}

.tarot-arcana h3 {
  margin: 0 0 .9rem;
  font-size: clamp(2.1rem, 2.7vw, 2.7rem);
  line-height: 1.25;
}

.tarot-hub__section-intro {
  max-width: 84ch;
  margin: 0 0 1.8rem;
  color: var(--muted);
  line-height: 1.65;
}

.tarot-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.2rem;
}

.tarot-card-tile {
  display: block;
  min-width: 0;
  padding: 1rem;
  color: var(--txt);
  text-align: center;
  background: #fbfafc;
  border: 1px solid #eee8ed;
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.tarot-card-tile:hover {
  border-color: rgba(192, 0, 143, .45);
  box-shadow: 0 7px 20px rgba(44, 25, 39, .09);
  text-decoration: none;
  transform: translateY(-3px);
}

.tarot-card-tile img {
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.tarot-card-tile__title {
  display: block;
  margin-top: .8rem;
  font-weight: 750;
  line-height: 1.3;
}

.tarot-card-tile__keywords {
  display: -webkit-box;
  min-height: 3.5rem;
  margin-top: .45rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tarot-hub__minor-intro {
  background: var(--hub-soft);
}

.tarot-hub__guide-grid,
.tarot-hub__spread-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.tarot-hub__guide-grid {
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.tarot-hub__guide-grid li {
  padding: 1.4rem;
  background: var(--hub-soft);
  border: 1px solid #f0e1eb;
  border-radius: 12px;
  counter-increment: guide-step;
}

.tarot-hub__guide-grid li::before {
  content: counter(guide-step, decimal-leading-zero);
  display: block;
  margin-bottom: .6rem;
  color: var(--prim);
  font-size: 1.3rem;
  font-weight: 800;
}

.tarot-hub__guide-grid strong,
.tarot-hub__guide-grid span {
  display: block;
}

.tarot-hub__guide-grid span {
  margin-top: .4rem;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1.5;
}

.tarot-hub__guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.8rem;
  margin-top: 1.8rem;
}

.tarot-hub__guide-links a {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.tarot-hub__spread-link {
  display: flex;
  min-height: 10rem;
  padding: 1.5rem;
  flex-direction: column;
  justify-content: space-between;
  color: var(--txt);
  background: var(--hub-soft);
  border: 1px solid #f0e1eb;
  border-radius: 12px;
}

.tarot-hub__spread-link:hover {
  border-color: var(--prim);
  text-decoration: none;
}

.tarot-hub__spread-link span {
  margin-top: 1rem;
  color: var(--prim);
  font-size: 1.35rem;
  font-weight: 700;
}

.tarot-hub__primary-link {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 1rem 1.5rem;
  color: #fff;
  background: var(--prim);
  border-radius: 12px;
  font-weight: 750;
}

.tarot-hub__primary-link:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(.94);
}

.tarot-hub__tarobot-link {
  max-width: 58rem;
  margin: 1.2rem 0 0;
  padding: 1.1rem 1.3rem;
  border: 1px solid #efd9e8;
  border-radius: 10px;
  background: #fff8fc;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1.5;
}

.tarot-hub__tarobot-link a {
  color: var(--prim);
  font-weight: 750;
}

.tarot-hub__method {
  display: grid;
  grid-template-columns: minmax(240px, .65fr) minmax(0, 1.35fr);
  gap: 2.4rem;
}

.tarot-hub__updated {
  margin-top: .8rem;
  font-size: 1.4rem;
}

.tarot-hub__faq {
  margin: 0 0 4rem;
}

.tarot-hub__empty {
  margin-top: 1.4rem;
  padding: 1.2rem 1.4rem;
  color: #6f1a56;
  background: #fff;
  border: 1px solid #edcce2;
  border-radius: 10px;
  font-weight: 650;
}

.tarot-hub [hidden] {
  display: none !important;
}

.tarot-hub a:focus-visible,
.tarot-hub button:focus-visible {
  outline: 3px solid rgba(192, 0, 143, .3);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .tarot-hub__routes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tarot-hub__panel,
  .tarot-hub__method {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

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

@media (max-width: 700px) {
  .tarot-hub__hero-inner {
    padding: 2rem 1.2rem;
  }

  .tarot-hub__routes { gap: .8rem; margin-top: 1.5rem; }

  .tarot-hub__route {
    padding: 1rem 1.3rem;
  }

  .tarot-hub__route span {
    margin-top: .2rem;
  }

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

  .tarot-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .tarot-hub__hero h1 {
    font-size: 2.8rem;
  }

  .tarot-hub__lead {
    font-size: 1.55rem;
  }

  .tarot-hub__route span {
    font-size: 1.25rem;
  }

  .tarot-hub__tools {
    padding-top: 1.4rem;
  }

  .tarot-hub__search-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tarot-hub__search input,
  .tarot-hub__search button {
    min-height: 4.8rem;
  }

  .tarot-hub__section-nav a {
    padding: .65rem 1rem;
  }

  .tarot-hub__body,
  .tarot-hub__catalog {
    gap: 1.6rem;
  }

  .tarot-hub__body {
    padding-top: 1.6rem;
  }

  .tarot-card-grid,
  .tarot-hub__guide-grid,
  .tarot-hub__spread-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tarot-card-tile {
    padding: .8rem;
  }

  .tarot-hub__guide-grid li {
    padding: 1.1rem;
  }
}

@media (max-width: 360px) {
  .tarot-hub__routes,
  .tarot-hub__guide-grid,
  .tarot-hub__spread-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tarot-hub__route,
  .tarot-card-tile {
    transition: none;
  }

  .tarot-hub__route:hover,
  .tarot-card-tile:hover {
    transform: none;
  }
}
