/* Mage Guides - hub + pillar pages (lounge2-aligned) */

body.guides-skin {
  background: #060609;
  color: #f3f4f6;
}

body.guides-skin .site-header {
  background: rgba(6, 6, 9, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.guides-skin .site-header a,
body.guides-skin .main-nav a:not(.nav-reserve-table) {
  color: #e5e7eb;
}

body.guides-skin .main-nav a:not(.nav-reserve-table):hover,
body.guides-skin .main-nav a:not(.nav-reserve-table):focus-visible,
body.guides-skin .main-nav a.nav-link--active {
  color: #e1b929;
}

body.guides-skin .nav-dropdown__toggle {
  color: #e5e7eb;
}

body.guides-skin .nav-dropdown__toggle:hover,
body.guides-skin .nav-dropdown__toggle:focus-visible,
body.guides-skin .nav-dropdown__toggle.nav-link--active {
  color: #e1b929;
}

body.guides-skin .menu-toggle {
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.25);
}

body.guides-skin .site-footer {
  background: #050508 !important;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0;
}

body.guides-skin .footer-left h4,
body.guides-skin .footer-center h5,
body.guides-skin .footer-right h5 {
  color: #e1b929;
}

body.guides-skin .footer-center ul li a,
body.guides-skin .footer-left a,
body.guides-skin .footer-right a,
body.guides-skin .footer-left p {
  color: #d1d5db;
}

body.guides-skin .footer-center ul li a:hover,
body.guides-skin .footer-left a:hover,
body.guides-skin .footer-right a:hover {
  color: #e1b929;
}

body.guides-skin .footer-bottom {
  color: #6b7280;
  border-top-color: rgba(255, 255, 255, 0.06);
}

body.guides-skin .main-nav.open {
  background: rgba(8, 8, 14, 0.98);
  border-color: rgba(255, 255, 255, 0.08);
}

body.guides-skin .main-nav.open a:not(.nav-reserve-table) {
  color: #e5e7eb;
}

body.guides-skin .site-header .main-nav a.nav-reserve-table {
  color: #e1b929;
  background: transparent;
  border: 2px solid #e1b929;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-weight: 700;
}

body.guides-skin .site-header .main-nav a.nav-reserve-table:hover,
body.guides-skin .site-header .main-nav a.nav-reserve-table:focus-visible {
  background: rgba(225, 185, 41, 0.14);
  color: #fff;
  border-color: #fff;
  text-decoration: none;
}

.guides-hub,
.guides-page {
  --g-bg: #060609;
  --g-bg-elevated: rgba(14, 12, 22, 0.92);
  --g-ink: #f3f4f6;
  --g-muted: #9ca3af;
  --g-faint: #6b7280;
  --g-gold: #e1b929;
  --g-gold-soft: #fde68a;
  --g-purple: #391047;
  --g-violet: #8b5cf6;
  --g-teal: #2180a2;
  --g-line: rgba(255, 255, 255, 0.08);
  --g-line-strong: rgba(225, 185, 41, 0.35);
  --g-glass: rgba(12, 12, 20, 0.72);
  --g-glass-hover: rgba(22, 18, 34, 0.92);
  --g-radius: 14px;
  --g-max: 42rem;
  --g-wide: 70rem;
  --g-head: "Outfit", "Montserrat", sans-serif;
  --g-body: "Plus Jakarta Sans", sans-serif;
  --g-ease: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  position: relative;
  isolation: isolate;
  margin-top: -1px;
  min-height: 70vh;
  color: var(--g-ink);
  background: var(--g-bg);
  font-family: var(--g-body);
  overflow-x: clip;
}

/* Defeat global.css section max-width/padding */
.guides-hub section,
.guides-page section,
.guides-hub .guides-section,
.guides-page .guides-section {
  max-width: none !important;
  width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

.guides-hub::before,
.guides-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 45% at 12% -5%, rgba(57, 16, 71, 0.55), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 8%, rgba(33, 128, 162, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(225, 185, 41, 0.06), transparent 55%);
}

.guides-hub::after,
.guides-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 70%);
}

.guides-container {
  width: min(100% - 2.5rem, var(--g-wide));
  margin-inline: auto;
}

.guides-body,
.guides-page-hero .guides-container,
.guides-hub .guides-hero .guides-container {
  width: min(100% - 2.5rem, var(--g-max));
}

.guides-featured .guides-container,
.guides-groups .guides-container,
.guides-questions .guides-container,
.guides-downstream .guides-container,
.guides-related .guides-container,
.guides-grimoire .guides-container,
.guides-hub-cta .guides-container,
.guides-page-cta .guides-container {
  width: min(100% - 2.5rem, var(--g-wide));
}

/* ----- Hero ----- */

.guides-hero,
.guides-page-hero {
  position: relative;
  padding: clamp(3.25rem, 8vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.guides-hero .guides-container,
.guides-page-hero .guides-container {
  position: relative;
}

.guides-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  font-family: var(--g-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--g-gold);
}

.guides-kicker::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, var(--g-gold), transparent);
}

.guides-kicker a {
  color: inherit;
  text-decoration: none;
}

.guides-kicker a:hover,
.guides-kicker a:focus-visible {
  color: var(--g-gold-soft);
}

.guides-hero h1,
.guides-page-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--g-head);
  font-weight: 800;
  font-size: clamp(2.35rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #fff;
  text-wrap: balance;
  background: linear-gradient(135deg, #fff 20%, var(--g-gold-soft) 55%, var(--g-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: guides-rise 0.7s var(--g-ease) both;
}

.guides-page-hero h1 {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #fff;
}

.guides-lede {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.65;
  color: var(--g-muted);
  animation: guides-rise 0.7s var(--g-ease) 0.08s both;
}

.guides-search {
  display: block;
  position: relative;
  max-width: 34rem;
  animation: guides-rise 0.7s var(--g-ease) 0.16s both;
}

.guides-search input {
  width: 100%;
  padding: 1rem 1.15rem 1rem 3rem;
  border: 1px solid var(--g-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--g-ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--g-ease), background var(--g-ease), box-shadow var(--g-ease);
}

.guides-search::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 50%;
  width: 0.95rem;
  height: 0.95rem;
  border: 1.5px solid var(--g-faint);
  border-radius: 50%;
  transform: translateY(-60%);
  pointer-events: none;
}

.guides-search::after {
  content: "";
  position: absolute;
  left: 1.95rem;
  top: 58%;
  width: 0.45rem;
  height: 1.5px;
  background: var(--g-faint);
  transform: rotate(45deg);
  pointer-events: none;
}

.guides-search input::placeholder {
  color: var(--g-faint);
}

.guides-search input:focus {
  outline: none;
  border-color: rgba(225, 185, 41, 0.55);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(225, 185, 41, 0.12);
}

.guides-search-status {
  min-height: 1.25rem;
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  color: var(--g-faint);
}

/* ----- Sections ----- */

.guides-section {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.guides-section h2 {
  margin: 0 0 1.35rem;
  font-family: var(--g-head);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.guides-group {
  margin-bottom: 2.5rem;
}

.guides-group:last-of-type {
  margin-bottom: 0;
}

.guides-group-title {
  margin: 0 0 0.95rem;
  padding-bottom: 0.55rem;
  font-family: var(--g-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g-teal);
  border-bottom: 1px solid var(--g-line);
}

/* ----- Interactive guide tiles ----- */

.guides-card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: auto;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
}

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

.guides-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 1.25rem 1.3rem 1.5rem;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  background: var(--g-glass);
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform var(--g-ease),
    border-color var(--g-ease),
    background var(--g-ease),
    box-shadow var(--g-ease);
}

.guides-card::after {
  content: "→";
  align-self: flex-end;
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--g-gold);
  opacity: 0.45;
  transition: opacity var(--g-ease), transform var(--g-ease);
}

.guides-card:hover,
.guides-card:focus-visible {
  background: var(--g-glass-hover);
  border-color: rgba(225, 185, 41, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  outline: none;
  text-decoration: none;
  color: inherit;
}

.guides-card:hover::after,
.guides-card:focus-visible::after {
  opacity: 1;
  transform: translateX(0.15rem);
}

.guides-card h3,
.guides-card h4 {
  margin: 0;
  font-family: var(--g-head);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
}

.guides-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--g-muted);
}

.guides-featured .guides-card {
  border-color: rgba(225, 185, 41, 0.18);
  background:
    linear-gradient(160deg, rgba(225, 185, 41, 0.08), transparent 45%),
    var(--g-glass);
}

/* ----- Lists ----- */

.guides-question-list,
.guides-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--g-line);
}

.guides-question-list li,
.guides-link-list li {
  margin: 0;
  border-bottom: 1px solid var(--g-line);
}

.guides-question-list a,
.guides-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.15rem;
  color: var(--g-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.02rem;
  transition: color var(--g-ease), padding-left var(--g-ease);
}

.guides-question-list a::after,
.guides-link-list a::after {
  content: "→";
  flex: none;
  color: var(--g-gold);
  opacity: 0.55;
  transition: opacity var(--g-ease), transform var(--g-ease);
}

.guides-question-list a:hover,
.guides-link-list a:hover,
.guides-question-list a:focus-visible,
.guides-link-list a:focus-visible {
  color: var(--g-gold-soft);
  padding-left: 0.35rem;
  outline: none;
}

.guides-question-list a:hover::after,
.guides-link-list a:hover::after,
.guides-question-list a:focus-visible::after,
.guides-link-list a:focus-visible::after {
  opacity: 1;
  transform: translateX(0.2rem);
}

/* ----- Article body ----- */

.guides-body {
  padding: 0.5rem 0 1.5rem;
}

.guides-prose {
  padding: clamp(1.25rem, 3vw, 1.85rem) clamp(1.1rem, 3vw, 1.75rem);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--g-line);
  border-radius: calc(var(--g-radius) + 4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.guides-body h2,
.guides-prose h2 {
  margin: 2.75rem 0 0.85rem;
  font-family: var(--g-head);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  scroll-margin-top: 5.5rem;
}

.guides-prose h2:first-child {
  margin-top: 0.25rem;
}

.guides-body h3,
.guides-prose h3 {
  margin: 1.75rem 0 0.55rem;
  font-family: var(--g-head);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--g-gold-soft);
}

.guides-body p,
.guides-body li,
.guides-prose p,
.guides-prose li {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #d1d5db;
}

.guides-body p,
.guides-prose p {
  margin: 0 0 1.15rem;
}

.guides-body ul,
.guides-body ol,
.guides-prose ul,
.guides-prose ol {
  margin: 0 0 1.35rem;
  padding-left: 1.2rem;
}

.guides-body li,
.guides-prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}

.guides-body li::marker,
.guides-prose li::marker {
  color: var(--g-gold);
}

.guides-body strong,
.guides-prose strong {
  color: #fff;
  font-weight: 600;
}

.guides-body a,
.guides-prose a {
  color: var(--g-gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.guides-body a:hover,
.guides-prose a:hover {
  color: var(--g-gold-soft);
}

.guides-callout {
  margin: 1.75rem 0;
  padding: 1.15rem 1.25rem;
  background:
    linear-gradient(135deg, rgba(57, 16, 71, 0.55), rgba(12, 12, 20, 0.4)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(225, 185, 41, 0.28);
  border-radius: var(--g-radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.guides-callout p {
  color: #e5e7eb;
}

.guides-callout p:last-child {
  margin-bottom: 0;
}

/* ----- CTA ----- */

.guides-hub-cta,
.guides-page-cta {
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.guides-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.35rem;
  background: linear-gradient(135deg, rgba(57, 16, 71, 0.45), rgba(33, 128, 162, 0.12));
  border: 1px solid var(--g-line);
  border-radius: calc(var(--g-radius) + 2px);
}

.guides-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.3rem;
  font-family: var(--g-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform var(--g-ease), background var(--g-ease), border-color var(--g-ease), color var(--g-ease);
}

.guides-btn--primary {
  background: linear-gradient(135deg, var(--g-gold), #d97706);
  color: #1a1208;
}

.guides-btn--primary:hover,
.guides-btn--primary:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  color: #1a1208;
  outline: none;
}

.guides-btn--ghost {
  background: transparent;
  color: var(--g-ink);
  border-color: rgba(255, 255, 255, 0.18);
}

.guides-btn--ghost:hover,
.guides-btn--ghost:focus-visible {
  border-color: rgba(225, 185, 41, 0.5);
  color: var(--g-gold-soft);
  outline: none;
}

.guides-empty {
  margin: 1.25rem 0 0;
  color: var(--g-muted);
}

.guides-group[hidden],
.guides-card[hidden] {
  display: none !important;
}

.guides-downstream,
.guides-related,
.guides-grimoire {
  border-top: 1px solid var(--g-line);
}

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

@keyframes guides-rise {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .guides-hero h1,
  .guides-lede,
  .guides-search,
  .guides-card,
  .guides-btn,
  .guides-question-list a,
  .guides-link-list a {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 960px) {
  .guides-featured .guides-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .guides-card-grid,
  .guides-featured .guides-card-grid {
    grid-template-columns: 1fr;
  }

  .guides-cta-row {
    flex-direction: column;
  }

  .guides-btn {
    width: 100%;
  }

  .guides-body,
  .guides-page-hero .guides-container,
  .guides-hub .guides-hero .guides-container,
  .guides-featured .guides-container,
  .guides-groups .guides-container,
  .guides-questions .guides-container,
  .guides-downstream .guides-container,
  .guides-related .guides-container,
  .guides-grimoire .guides-container,
  .guides-hub-cta .guides-container,
  .guides-page-cta .guides-container {
    width: min(100% - 1.5rem, var(--g-wide));
  }
}
