/* Editorial guides hub + article pages */

.guides-hub,
.guide-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guides-hub-head,
.guide-hero {
  display: grid;
  gap: 18px;
  align-items: end;
}

@media (min-width: 900px) {
  .guides-hub-head {
    grid-template-columns: 1fr auto;
  }
  .guide-hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
  }
}

.guides-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
}

.guides-hub-head h1,
.guide-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.guides-lead,
.guide-deck {
  margin: 10px 0 0;
  color: var(--muted, #9aa3b5);
  max-width: 62ch;
  font-size: 1.02rem;
}

.guides-hub-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: var(--muted, #9aa3b5);
}
.guides-hub-meta strong {
  font-size: 1.6rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.guides-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.guides-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border, #2a3140);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel, #171a22) 88%, transparent);
  color: var(--muted, #9aa3b5);
  font-size: 0.92rem;
}
.guides-tab span {
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}
.guides-tab:hover,
.guides-tab.is-active {
  border-color: var(--accent-emphasis, var(--accent));
  color: var(--text);
  background: var(--accent-soft, rgba(139, 92, 246, 0.16));
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.guides-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border, #2a3140);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel, #171a22);
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.guides-card:hover {
  border-color: var(--accent-emphasis, var(--accent));
  transform: translateY(-1px);
}

.guides-card-media {
  aspect-ratio: 16 / 10;
  background: #12151c;
  overflow: hidden;
}
.guides-card-media img,
.guides-card-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guides-card-fallback {
  background:
    radial-gradient(80% 80% at 20% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%),
    linear-gradient(135deg, #1a1f2b, #10131a);
}

.guides-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}
.guides-card-body h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.guides-card-body p {
  margin: 0;
  color: var(--muted, #9aa3b5);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.guides-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted, #9aa3b5);
  font-size: 0.78rem;
}
.guides-topic {
  color: var(--accent);
  font-weight: 600;
}

.guides-empty {
  padding: 28px;
  border: 1px dashed var(--border, #2a3140);
  border-radius: 12px;
  color: var(--muted, #9aa3b5);
}

.peps-sidebar-guide-link span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.guide-hero-media {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border, #2a3140);
  background: #12151c;
  min-height: 220px;
}
.guide-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 220px;
}
.guide-meta {
  margin-top: 14px;
  color: var(--muted, #9aa3b5);
  font-size: 0.88rem;
}

.guide-layout {
  display: grid;
  gap: 18px;
}
@media (min-width: 980px) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
}

.guide-content.prose {
  border: 1px solid var(--border, #2a3140);
  border-radius: 16px;
  background: var(--panel, #171a22);
  padding: clamp(16px, 2.5vw, 28px);
  font-size: 1.02rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--text) 92%, #9aa3b5);
}
.guide-content.prose > *:first-child { margin-top: 0; }
.guide-content.prose > *:last-child { margin-bottom: 0; }
.guide-content.prose h2,
.guide-content.prose h3,
.guide-content.prose h4 {
  margin: 1.5em 0 0.55em;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.015em;
}
.guide-content.prose p { margin: 0 0 1em; }
.guide-content.prose ul,
.guide-content.prose ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}
.guide-content.prose li { margin: 0.25em 0; }
.guide-content.prose a { color: var(--accent); }
.guide-content.prose img,
.guide-content.prose figure {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.2em 0;
}
.guide-content.prose figure img {
  display: block;
  width: 100%;
  margin: 0;
}
.guide-content.prose figcaption {
  margin-top: 0.5em;
  color: var(--muted, #9aa3b5);
  font-size: 0.86rem;
}
.guide-content.prose blockquote {
  margin: 1.2em 0;
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid var(--accent);
  color: var(--muted, #9aa3b5);
}
.guide-content.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.92rem;
}
.guide-content.prose th,
.guide-content.prose td {
  border: 1px solid var(--border, #2a3140);
  padding: 8px 10px;
  text-align: left;
}

.guide-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-aside-card {
  border: 1px solid var(--border, #2a3140);
  border-radius: 14px;
  background: var(--panel, #171a22);
  padding: 14px;
}
.guide-aside-card h2 {
  margin: 0 0 10px;
  font-size: 0.92rem;
}
.guide-aside-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guide-aside-card a {
  color: var(--muted, #9aa3b5);
}
.guide-aside-card a:hover { color: var(--accent); }
.guide-related a {
  display: block;
  line-height: 1.35;
}
