/* ClashReply — guides hub & article pages */

.guide-page {
  --g-navy: #0b1930;
  --g-navy-mid: #132743;
  --g-blue: #3d6f9f;
  --g-blue-bright: #2563eb;
  --g-blue-light: #dbeafe;
  --g-canvas: #f4f7fb;
  --g-ink: #162033;
  --g-muted: #5d6878;
  --g-line: #dfe4e8;
  background: var(--g-canvas);
  color: var(--g-ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* ── Header ── */
.guide-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 25, 48, 0.97);
  backdrop-filter: blur(12px);
}

.guide-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}

.guide-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.guide-logo-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.guide-logo-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  color: #fff;
}

.guide-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.guide-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.guide-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.guide-nav a.is-active {
  color: #fff;
  background: rgba(61, 111, 159, 0.35);
}

.guide-nav-cta {
  margin-left: 0.35rem;
  padding: 0.5rem 1rem !important;
  border-radius: 0.55rem !important;
  background: linear-gradient(135deg, #2563eb, #3d6f9f) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.guide-nav-cta:hover {
  background: linear-gradient(135deg, #1d4ed8, #315f86) !important;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .guide-nav .guide-nav-link,
  .guide-nav .guide-nav-cta {
    display: none;
  }

  .guide-menu-button {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
  }

  .guide-menu-button svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .guide-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 5rem 1.25rem 1.5rem;
    background: rgba(11, 25, 48, 0.98);
    backdrop-filter: blur(12px);
  }

  .guide-mobile-menu[hidden] {
    display: none !important;
  }

  .guide-mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.55rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
  }

  .guide-mobile-menu a:hover,
  .guide-mobile-menu a.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  .guide-mobile-menu .guide-mobile-cta {
    margin-top: 0.5rem;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #3d6f9f);
    font-weight: 600;
  }
}

@media (min-width: 641px) {
  .guide-menu-button {
    display: none;
  }
}

.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;
}

/* ── Hero ── */
.guide-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(61, 111, 159, 0.45), transparent),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(37, 99, 235, 0.2), transparent),
    linear-gradient(165deg, var(--g-navy) 0%, var(--g-navy-mid) 55%, #1a3050 100%);
  color: #fff;
  padding: 2.5rem 1.25rem 3rem;
}

.guide-hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.guide-hero-inner {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
}

.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.guide-breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.guide-breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.guide-breadcrumb-sep {
  opacity: 0.4;
}

.guide-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.guide-hero-badge-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: #34d399;
}

.guide-hero h1 {
  margin-top: 1rem;
  max-width: 42rem;
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.guide-hero-lead {
  margin-top: 1rem;
  max-width: 40rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

.guide-hero-meta {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Hub hero (index) */
.guide-hub-hero {
  padding-bottom: 4rem;
}

.guide-hub-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-hub-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.guide-hub-stat span {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Layout ── */
.guide-body {
  max-width: 72rem;
  margin: -2rem auto 0;
  padding: 0 1.25rem 4rem;
  position: relative;
  z-index: 1;
}

.guide-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr) 17rem;
    align-items: start;
  }
}

/* ── Article card ── */
.guide-article {
  border-radius: 1.25rem;
  border: 1px solid var(--g-line);
  background: #fff;
  padding: 2rem 1.75rem;
  box-shadow: 0 16px 48px rgba(11, 25, 48, 0.07);
}

@media (min-width: 640px) {
  .guide-article {
    padding: 2.5rem 2.75rem;
  }
}

.guide-prose {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--g-muted);
}

.guide-prose > * + * {
  margin-top: 1.25rem;
}

.guide-prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--g-blue);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--g-navy);
  line-height: 1.35;
}

.guide-prose h2:first-child {
  margin-top: 0;
}

.guide-prose p strong,
.guide-prose li strong {
  color: var(--g-ink);
  font-weight: 600;
}

.guide-prose ul,
.guide-prose ol {
  margin: 0.75rem 0;
  padding-left: 0;
  list-style: none;
}

.guide-prose ul li,
.guide-prose ol li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.guide-prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: var(--g-blue);
}

.guide-prose ol {
  counter-reset: guide-step;
}

.guide-prose ol li {
  counter-increment: guide-step;
  padding-left: 2.25rem;
}

.guide-prose ol li::before {
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 0.1em;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.4rem;
  background: var(--g-blue-light);
  color: var(--g-blue);
  font-size: 0.75rem;
  font-weight: 700;
}

.guide-example {
  margin: 1.25rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(61, 111, 159, 0.2);
  border-left: 4px solid var(--g-blue);
  background: linear-gradient(135deg, rgba(61, 111, 159, 0.06), rgba(37, 99, 235, 0.04));
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--g-muted);
}

.guide-example-label {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g-blue);
}

.guide-note {
  font-size: 0.8125rem;
  color: #94a3b8;
  font-style: italic;
}

/* ── Sidebar ── */
.guide-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guide-sidebar-card {
  border-radius: 1rem;
  border: 1px solid var(--g-line);
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(11, 25, 48, 0.05);
}

.guide-sidebar-card h3 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g-blue);
}

.guide-toc {
  margin-top: 0.75rem;
  list-style: none;
  padding: 0;
}

.guide-toc a {
  display: block;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--g-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.guide-toc a:hover {
  color: var(--g-blue);
}

.guide-toc li:last-child a {
  border-bottom: 0;
}

.guide-cta-card {
  border: none;
  background: linear-gradient(145deg, var(--g-navy), #1a3a5c);
  color: #fff;
  box-shadow: 0 16px 40px rgba(11, 25, 48, 0.25);
}

.guide-cta-card h3 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}

.guide-cta-card p {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

.guide-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #2563eb, #3d6f9f);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.guide-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
}

@media (min-width: 1024px) {
  .guide-sidebar-sticky {
    position: sticky;
    top: 5.5rem;
  }
}

/* ── Related guides ── */
.guide-related {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--g-line);
}

.guide-related h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--g-navy);
}

.guide-related-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  list-style: none;
  padding: 0;
}

@media (min-width: 640px) {
  .guide-related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.guide-related-grid a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--g-line);
  background: var(--g-canvas);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--g-ink);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.guide-related-grid a:hover {
  border-color: rgba(61, 111, 159, 0.4);
  background: var(--g-blue-light);
  transform: translateX(3px);
}

.guide-related-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(61, 111, 159, 0.12);
  color: var(--g-blue);
}

.guide-related-icon svg {
  width: 1rem;
  height: 1rem;
}

/* ── Hub cards ── */
.guide-card-grid {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 640px) {
  .guide-card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.guide-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 1rem;
  border: 1px solid var(--g-line);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(11, 25, 48, 0.06);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 111, 159, 0.35);
  box-shadow: 0 20px 48px rgba(11, 25, 48, 0.12);
}

.guide-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--g-blue), #2563eb);
}

.guide-card-body {
  flex: 1;
  padding: 1.5rem;
}

.guide-card-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(61, 111, 159, 0.15), rgba(37, 99, 235, 0.1));
  color: var(--g-blue);
}

.guide-card-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.guide-card h2 {
  margin-top: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

.guide-card h2 a {
  color: var(--g-navy);
  text-decoration: none;
}

.guide-card h2 a:hover {
  color: var(--g-blue);
}

.guide-card p {
  margin-top: 0.65rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--g-muted);
}

.guide-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--g-blue);
  text-decoration: none;
}

.guide-card-link:hover {
  color: #2563eb;
}

.guide-card-link svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.15s;
}

.guide-card:hover .guide-card-link svg {
  transform: translateX(3px);
}

/* ── Hub CTA band ── */
.guide-band {
  margin-top: 3rem;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(61, 111, 159, 0.35), transparent 50%),
    linear-gradient(135deg, var(--g-navy), #1a3a5c);
  color: #fff;
  box-shadow: 0 24px 60px rgba(11, 25, 48, 0.2);
}

.guide-band h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.guide-band p {
  margin-top: 0.75rem;
  max-width: 36rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.guide-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.guide-band-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.35rem;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s;
}

.guide-band-btn-primary {
  background: linear-gradient(135deg, #2563eb, #3d6f9f);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.guide-band-btn-primary:hover {
  transform: translateY(-2px);
}

.guide-band-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.guide-band-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ── Footer ── */
.guide-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--g-navy);
  color: rgba(255, 255, 255, 0.55);
  padding: 2rem 1.25rem;
  font-size: 0.8125rem;
}

.guide-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
}

.guide-footer nav a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.guide-footer nav a:hover {
  color: #fff;
}

.guide-footer-sep {
  margin: 0 0.5rem;
  opacity: 0.35;
}
