/* Page-specific styles: legal, FAQ, support, contact, 404 */

.page-hero {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(800px 300px at 20% 0%, rgba(232, 165, 58, 0.08), transparent 60%);
}
.page-hero .eyebrow { text-align: left; }
.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 8px; }
.page-hero p { color: var(--text-muted); max-width: 700px; margin: 0; }

.doc {
  padding: 48px 0 64px;
}
.doc-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 90px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 0.92rem;
}
.doc-toc h4 {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.doc-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.doc-toc li { counter-increment: toc; margin-bottom: 6px; }
.doc-toc li::before { content: counter(toc) ". "; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.doc-toc a { color: var(--text-soft); }
.doc-toc a:hover { color: var(--primary); }

.doc-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-card);
}
.doc-content h2 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  padding-top: 0.6em;
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}
.doc-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.doc-content h3 { margin-top: 1.6em; font-size: 1.1rem; }
.doc-content p, .doc-content li { color: var(--text-soft); }
.doc-content code {
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9em;
}
.doc-content strong { color: var(--text); }
.doc-content ul, .doc-content ol { padding-left: 1.4em; }
.doc-content li { margin-bottom: 6px; }
.doc-content .meta {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 0.92rem;
}
.doc-content .meta strong { color: var(--primary); }

@media (max-width: 900px) {
  .doc-grid { grid-template-columns: 1fr; }
  .doc-toc { position: static; }
  .doc-content { padding: 24px 20px; }
}

/* ---------- FAQ ---------- */
.faq-search {
  margin: 0 auto 32px;
  max-width: 560px;
  position: relative;
}
.faq-search input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
.faq-search input:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.faq-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.faq-group { margin-bottom: 28px; }
.faq-group h2 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--text-soft); }
.faq-item .faq-body p:last-child { margin-bottom: 0; }
.faq-empty { text-align: center; color: var(--text-muted); padding: 40px; display: none; }
.faq-empty.show { display: block; }

/* ---------- Support / Contact cards ---------- */
.help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.help-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--text-soft);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: block;
}
.help-card:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--text-soft); }
.help-card h3 { color: var(--text); margin-bottom: 6px; font-size: 1.02rem; }
.help-card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.help-card .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(232,165,58,0.12); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.help-card .icon svg { width: 22px; height: 22px; }
@media (max-width: 900px) { .help-grid { grid-template-columns: 1fr; } }

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}
.contact-card img { width: 72px; height: 72px; border-radius: 16px; margin: 0 auto 20px; }
.contact-card h2 { margin-bottom: 6px; }
.contact-card .role { color: var(--text-muted); margin-bottom: 24px; }
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(232,165,58,0.12);
  color: var(--primary);
  border: 1px solid rgba(232,165,58,0.28);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.contact-email:hover { background: rgba(232,165,58,0.18); color: var(--primary-2); }
.contact-note { margin-top: 24px; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- 404 ---------- */
.notfound {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}
.notfound-inner { max-width: 480px; }
.notfound .code {
  font-size: clamp(6rem, 18vw, 10rem);
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.notfound h1 { margin-bottom: 12px; }
.notfound p { color: var(--text-muted); margin-bottom: 28px; }
