/* ============================================================
   MetaPurge — content layer
   Guides, policy pages, about, contact.
   Loaded after css/app.css and reuses its tokens (--surface,
   --violet, --radius-*, --font) so everything reads as one site.
   ============================================================ */

/* ---------- header navigation ---------- */

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--dim);
  transition: color 0.18s, background-color 0.18s;
}

.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.055); }

.nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
}

.nav-cta {
  margin-left: 6px;
  color: #0a0b10 !important;
  background: var(--grad) !important;
  font-weight: 700;
}

.nav-cta:hover { filter: brightness(1.08); background: var(--grad) !important; }

@media (max-width: 860px) {
  .topbar-inner { padding: 12px 20px; flex-wrap: wrap; row-gap: 10px; }
  .topbar-right { flex-wrap: wrap; gap: 8px; width: 100%; }
  .nav { width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .secure-pill { display: none; }
}

/* ---------- page scaffolding ---------- */

.page-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 32px 8px;
}

.page-hero--narrow { max-width: 820px; }

.page-hero h1 {
  margin: 16px 0 14px;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.page-hero .lede {
  max-width: 66ch;
  color: var(--dim);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.65;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--faint);
}

.page-meta time { color: var(--dim); }

/* ---------- breadcrumbs ---------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--faint);
}

.breadcrumbs a { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.18); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; color: rgba(255, 255, 255, 0.22); }

/* ---------- reading layout ---------- */

.reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 56px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 32px 0;
  align-items: start;
}

.reading--full { grid-template-columns: minmax(0, 1fr); max-width: 820px; }

.toc {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.018);
  font-size: 12.5px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.toc ol { margin: 0; padding-left: 16px; list-style: decimal; }
.toc li { margin: 0 0 7px; color: var(--dim); line-height: 1.45; }
.toc a { color: var(--dim); }
.toc a:hover { color: var(--text); }

@media (max-width: 980px) {
  .reading { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 20px 0; }
  .toc { position: static; order: -1; }
  .page-hero { padding: 44px 20px 4px; }
}

/* ---------- prose ---------- */

.prose {
  max-width: 70ch;
  font-size: 15.5px;
  line-height: 1.72;
  color: #d3dae6;
}

.prose > * + * { margin-top: 18px; }

.prose h2 {
  margin-top: 42px;
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
  scroll-margin-top: 92px;
}

.prose h3 {
  margin-top: 30px;
  font-size: 1.06rem;
  letter-spacing: -0.012em;
  color: var(--text);
  scroll-margin-top: 92px;
}

.prose p { margin: 0; }

.prose a {
  color: #c4b5fd;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(196, 181, 253, 0.4);
}

.prose a:hover { text-decoration-color: #c4b5fd; }

.prose ul, .prose ol { margin: 0; padding-left: 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--violet-soft); }

.prose strong { color: var(--text); font-weight: 650; }

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.86em;
  color: #d8ccff;
}

.prose pre {
  overflow-x: auto;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #0a0d13;
  font-size: 13px;
  line-height: 1.6;
}

.prose pre code { padding: 0; border: 0; background: none; }

.prose blockquote {
  margin: 26px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid rgba(139, 92, 246, 0.55);
  color: var(--dim);
  font-size: 1.02em;
}

.prose hr {
  height: 1px;
  margin: 36px 0;
  border: 0;
  background: var(--line);
}

.prose img { border-radius: var(--radius-md); border: 1px solid var(--line); }

/* tables */
.table-wrap { overflow-x: auto; margin: 26px 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.5;
}

.prose th, .prose td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose th {
  color: var(--text);
  font-weight: 650;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.prose td { color: var(--dim); }

/* ---------- callouts ---------- */

.callout {
  margin: 26px 0;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  font-size: 14px;
  line-height: 1.6;
  color: var(--dim);
}

.callout strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 13px; }

.callout--info { border-color: rgba(34, 211, 238, 0.26); background: rgba(34, 211, 238, 0.055); }
.callout--warn { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.06); }
.callout--danger { border-color: rgba(251, 113, 133, 0.28); background: rgba(251, 113, 133, 0.055); }

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

.cta-card {
  margin: 34px 0;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(34, 211, 238, 0.07));
}

.cta-card h2 { margin: 0 0 6px; font-size: 1.05rem; letter-spacing: -0.015em; color: var(--text); }
.cta-card p { margin: 0 0 14px; font-size: 13.5px; color: var(--dim); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 650;
  color: #0a0b10;
  background: var(--grad);
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }

.btn--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
}

.btn--ghost:hover { background: rgba(255, 255, 255, 0.09); }

/* ---------- hub grid ---------- */

.hub {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 32px 0;
}

.hub-section + .hub-section { margin-top: 48px; }

.hub-section h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.hub-section > p { margin: 0 0 18px; color: var(--dim); font-size: 13.5px; }

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

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.guide-card:hover {
  border-color: rgba(139, 92, 246, 0.32);
  transform: translateY(-2px);
}

.guide-card h3 { margin: 0; font-size: 15px; letter-spacing: -0.015em; }
.guide-card p { margin: 0; font-size: 12.8px; line-height: 1.55; color: var(--dim); flex: 1; }

.guide-card .tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-soft);
}

@media (max-width: 640px) {
  .hub { padding: 18px 20px 0; }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- article footer furniture ---------- */

.author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 44px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.author-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad-soft);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-weight: 700;
  color: #d8ccff;
}

.author p { margin: 0; font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.author strong { display: block; font-size: 13.5px; color: var(--text); }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.018);
}

.pager a:hover { border-color: var(--line-strong); }
.pager span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.pager .next { text-align: right; }

@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* ---------- policy / form pages ---------- */

.content-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 34px 32px 0;
}

@media (max-width: 640px) { .content-wrap { padding: 26px 20px 0; } }

.policy-lede {
  padding: 16px 18px;
  margin: 0 0 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.6;
}

.field-grid { display: grid; gap: 16px; margin: 26px 0; }

.field { display: grid; gap: 6px; }

.field label { font-size: 12.5px; font-weight: 650; color: var(--dim); letter-spacing: 0.01em; }

.field input, .field textarea, .field select {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: #0a0d13;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.field textarea { min-height: 130px; resize: vertical; }

.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.field .hint { font-size: 11.5px; color: var(--faint); }

/* ---------- footer ---------- */

.footer--rich {
  display: block;
  max-width: 1180px;
  margin: 80px auto 0;
  padding: 34px 32px 44px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-col h3 {
  margin: 0 0 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.footer-col ul { display: grid; gap: 8px; }
.footer-col a { color: var(--dim); }
.footer-col a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.footer-brand p { margin: 10px 0 0; max-width: 34ch; line-height: 1.6; color: var(--faint); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-bottom button {
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--dim);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-bottom button:hover { color: var(--text); }

@media (max-width: 820px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer--rich { padding: 28px 20px 36px; }
}

@media (max-width: 480px) { .footer-cols { grid-template-columns: 1fr; } }

/* ---------- consent bar ---------- */

.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 130;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: rgba(14, 18, 26, 0.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dim);
}

.cookie-bar[hidden] { display: none; }

.cookie-bar p { margin: 0 0 12px; }
.cookie-bar a { color: #c4b5fd; text-decoration: underline; text-underline-offset: 3px; }

.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.cookie-actions .btn { min-height: 40px; padding: 0 16px; font-size: 12.5px; }

/* ---------- FAQ disclosure ---------- */

.faq-list {
  display: grid;
  gap: 8px;
  max-width: 880px;
}

.faq-list details {
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.018);
}

.faq-list details[open] { border-color: var(--line-strong); }

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
  color: var(--faint);
}

.faq-list details[open] summary::after { content: "−"; }

.faq-list details p {
  margin: 0;
  padding: 0 0 16px;
  max-width: 70ch;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--dim);
}

/* ---------- utilities ---------- */

.prose--narrow { max-width: 72ch; }

.link-like {
  padding: 0;
  border: 0;
  background: none;
  color: #c4b5fd;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(196, 181, 253, 0.45);
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-like:hover { color: #ddd6fe; text-decoration-color: currentColor; }

.section-more { margin-top: 18px; }

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

.stack-sm > * + * { margin-top: 8px; }
.stack-md > * + * { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .guide-card, .btn, .nav a { transition: none; }
  .guide-card:hover { transform: none; }
}
