/* ─── SUBPAGE STYLES ──────────────────────────────────────────────────────
   Loaded after style.css on every page except the home page. Reuses the
   tokens defined in style.css :root — do not redefine colours here.
   ───────────────────────────────────────────────────────────────────────── */

/* ─── PAGE HEADER ─────────────────────────────────────────────────────── */
.page-hero {
  position: relative;
  padding: 150px 24px 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero .hero-glow { opacity: 0.28; }
.page-hero-inner { position: relative; z-index: 1; text-align: center; }
.page-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 18px;
}
.page-hero .lede {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ─── BREADCRUMB ──────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-dimmer);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-dimmer); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--purple); }
.breadcrumb span[aria-current] { color: var(--text-dim); }

/* ─── GENERIC SECTION ─────────────────────────────────────────────────── */
.page-section { padding: 80px 24px; }
.page-section.tinted { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.narrow { max-width: 780px; margin: 0 auto; }

/* ─── PROSE (articles, legal copy) ────────────────────────────────────── */
.prose { color: var(--text-dim); font-size: 1.02rem; line-height: 1.75; }
.prose h2 {
  color: var(--text);
  font-size: 1.6rem;
  margin: 48px 0 16px;
  scroll-margin-top: 90px;
}
.prose h3 { color: var(--text); font-size: 1.18rem; margin: 32px 0 12px; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { margin-bottom: 18px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.prose li { padding-left: 4px; }
.prose a { color: #a78bfa; text-decoration: none; border-bottom: 1px solid rgba(167,139,250,0.35); }
.prose a:hover { color: #c4b5fd; border-bottom-color: #c4b5fd; }
.prose strong { color: var(--text); font-weight: 700; }
.prose code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.88em;
}
.prose blockquote {
  border-left: 3px solid var(--purple);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 0 0 24px;
  color: var(--text-dim);
}
.prose hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 0.94rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 700; }

/* ─── ACCORDION (FAQ / help) ──────────────────────────────────────────── */
.accordion { display: flex; flex-direction: column; gap: 12px; }
.accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.accordion-item.open { border-color: rgba(139, 92, 246, 0.45); }
.accordion-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.accordion-q::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--purple);
  line-height: 1;
  transition: transform 0.25s ease;
}
.accordion-item.open .accordion-q::after { transform: rotate(45deg); }
/* Collapsed with max-height rather than display:none so the answer text stays
   in the DOM and in the rendered page for crawlers. */
.accordion-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.accordion-item.open .accordion-a { max-height: 900px; }
.accordion-a-inner {
  padding: 0 24px 22px;
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.7;
}
.accordion-a-inner p + p { margin-top: 12px; }
.accordion-a-inner a { color: #a78bfa; text-decoration: none; }
.accordion-a-inner a:hover { text-decoration: underline; }

/* ─── BLOG ────────────────────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.post-card:hover { transform: translateY(-6px); border-color: rgba(139, 92, 246, 0.4); }
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-dimmer);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.post-tag {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: #c4b5fd;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: none;
  letter-spacing: 0;
}
.post-card h2, .post-card h3 { font-size: 1.15rem; line-height: 1.35; margin-bottom: 10px; }
.post-card p { color: var(--text-dim); font-size: 0.92rem; flex: 1; }
.post-more { margin-top: 18px; color: #a78bfa; font-size: 0.88rem; font-weight: 600; }

/* Article byline under a post title */
.article-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-dimmer);
  font-size: 0.88rem;
  margin-top: 18px;
}

/* ─── HELP CENTER CARDS ───────────────────────────────────────────────── */
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 64px; }
.help-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.help-card:hover { transform: translateY(-6px); border-color: rgba(139, 92, 246, 0.4); }
.help-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.help-card p { color: var(--text-dim); font-size: 0.9rem; }

/* ─── CONTENTS LIST ───────────────────────────────────────────────────── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 40px;
}
.toc h2 { font-size: 0.82rem !important; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim) !important; margin: 0 0 14px !important; }
.toc ol { margin: 0 0 0 18px; gap: 8px; }
.toc a { color: var(--text-dim); border: none; }
.toc a:hover { color: #c4b5fd; }

/* ─── 404 ─────────────────────────────────────────────────────────────── */
.notfound { min-height: 72vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.notfound .code {
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-grid, .help-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 130px 20px 52px; }
  .page-section { padding: 60px 20px; }
}
