/* Shared chrome for the long-form document pages: /guide, /privacy, /terms
   and /help. Extracted from guide.html so the four pages stay visually
   identical by construction instead of by four copies of the same rules.

   The class names keep the `guide-` prefix they were born with - it is the
   vocabulary of a document page here, not a claim about which page you are
   on. Page-specific extras (the guide's screenshots and toggle cards) stay
   inline in their own file. */

body.page-guide {
  height: auto;
  overflow: auto;
  display: block;
  padding: 24px 16px 80px;
  min-height: 100vh;
}

.guide-wrap {
  max-width: 820px;
  margin: 0 auto;
}

/* ─── Hero ────────────────────────────────────────────────────────────── */

.guide-hero {
  text-align: center;
  margin-bottom: 28px;
}
.guide-hero-sprites {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 12px;
  height: 56px;
}
.guide-hero-sprites img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.guide-hero-sprites img:nth-child(1),
.guide-hero-sprites img:nth-child(3) {
  width: 40px;
  height: 40px;
}
.guide-hero-sprites img:nth-child(2) {
  width: 56px;
  height: 56px;
}
.guide-logo img {
  height: 56px;
  width: auto;
  display: block;
  margin: 0 auto 10px;
}
.guide-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-top: 4px;
}
.guide-subtitle {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 6px;
}
.guide-discord {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 10px;
}
.guide-discord a {
  color: var(--cta);
  text-decoration: underline;
  font-weight: 600;
}

/* Effective/last-updated stamp under a legal page's title. */
.guide-updated {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 8px;
  letter-spacing: 0.5px;
}

/* ─── Cross-page links ────────────────────────────────────────────────── */
/* Sits directly under the hero on every document page. The current page is
   marked `is-current` and rendered as a flat chip rather than a link. */

.guide-doclinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.guide-doclinks a,
.guide-doclinks span {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.guide-doclinks a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.guide-doclinks .is-current {
  background: var(--surface2);
  border-color: var(--cta);
  color: var(--cta);
  cursor: default;
}

/* ─── Contents nav ────────────────────────────────────────────────────── */

.guide-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 22px;
}
.guide-nav h3 {
  font-size: 12px;
  color: var(--cta);
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.guide-nav ol {
  list-style: none;
  counter-reset: gnav;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 18px;
}
.guide-nav ol li {
  counter-increment: gnav;
}
.guide-nav ol li a::before {
  content: counter(gnav) ". ";
  color: var(--text-dim);
  margin-right: 4px;
}
/* Unnumbered variant - legal pages label their own sections (A, B, C ...),
   so a second set of numbers in the contents would fight them. */
.guide-nav ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 18px;
}
.guide-nav ol li a,
.guide-nav ul li a {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.guide-nav ol li a:hover,
.guide-nav ul li a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Sections ────────────────────────────────────────────────────────── */

.guide-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 18px;
  scroll-margin-top: 16px;
}
.guide-section h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  overflow-wrap: anywhere;
}
.guide-section h2 .step-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--bg);
  background: var(--cta);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.guide-section h3 {
  font-size: 12px;
  color: var(--cta);
  letter-spacing: 1px;
  margin: 18px 0 8px;
}
.guide-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 12px 0 6px;
}
.guide-section p {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 10px;
}
.guide-section a {
  color: var(--accent);
  text-decoration: underline;
}
.guide-section ul {
  list-style: none;
  margin: 6px 0 10px;
  padding-left: 0;
}
.guide-section ul > li {
  position: relative;
  padding: 4px 0 4px 22px;
  font-size: 14px;
  color: var(--text);
}
.guide-section ul > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent-glow);
}
.guide-section ol {
  margin: 6px 0 10px;
  padding-left: 22px;
}
.guide-section ol > li {
  padding: 4px 0;
  font-size: 14px;
  color: var(--text);
}
.guide-section strong {
  color: var(--cta);
  font-weight: 600;
}

/* ─── Callouts ────────────────────────────────────────────────────────── */

.guide-tip {
  margin: 10px 0;
  padding: 10px 12px 10px 14px;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
}
.guide-tip::before {
  content: "TIP";
  display: inline-block;
  margin-right: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}
/* Neutral variant for the plain-language summaries on the legal pages -
   same slab, no "TIP" tag. */
.guide-tip.is-summary::before {
  content: "IN SHORT";
  color: var(--cta);
}

.guide-warn {
  margin: 10px 0;
  padding: 10px 12px 10px 14px;
  background: rgba(248, 113, 113, 0.08);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
}
.guide-warn::before {
  content: "IMPORTANT";
  display: inline-block;
  margin-right: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.5px;
}

/* ─── Tables ──────────────────────────────────────────────────────────── */
/* Wrap in .guide-tablewrap so a wide table scrolls itself instead of the
   page. */

.guide-tablewrap {
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.guide-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 13px;
}
.guide-table th,
.guide-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.guide-table th {
  background: var(--surface2);
  color: var(--cta);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 700;
}
.guide-table tr:last-child td {
  border-bottom: none;
}

/* ─── Footer ──────────────────────────────────────────────────────────── */

.guide-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 18px;
  background: var(--cta);
  color: var(--bg);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.15s;
}
.guide-back:hover {
  opacity: 0.85;
}

.guide-footer {
  text-align: center;
  margin-top: 24px;
}
.guide-footer-links {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-dim);
}
.guide-footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  margin: 0 6px;
}
.guide-footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  body.page-guide {
    padding: 16px 10px 60px;
  }
  .guide-section {
    padding: 18px 14px;
  }
  .guide-nav {
    padding: 14px 14px;
  }
}

@media (max-width: 420px) {
  body.page-guide {
    padding: 12px 8px 56px;
  }
  .guide-hero {
    margin-bottom: 20px;
  }
  .guide-hero-sprites {
    gap: 2px;
    height: 48px;
    margin-bottom: 8px;
  }
  .guide-hero-sprites img:nth-child(1),
  .guide-hero-sprites img:nth-child(3) {
    width: 32px;
    height: 32px;
  }
  .guide-hero-sprites img:nth-child(2) {
    width: 48px;
    height: 48px;
  }
  .guide-logo img {
    height: 44px;
  }
  .guide-title {
    font-size: 19px;
  }
  .guide-subtitle {
    font-size: 13px;
  }
  .guide-section {
    padding: 16px 12px;
    border-radius: 12px;
  }
  .guide-nav {
    padding: 12px 12px;
  }
  .guide-nav ol,
  .guide-nav ul {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .guide-doclinks a,
  .guide-doclinks span {
    font-size: 12px;
    padding: 6px 12px;
  }
  .guide-section h2 {
    font-size: 16px;
  }
  .guide-section p,
  .guide-section ul > li,
  .guide-section ol > li {
    font-size: 13px;
  }
  .guide-section ol {
    padding-left: 20px;
  }
  .guide-tip,
  .guide-warn {
    font-size: 12px;
    padding: 8px 10px 8px 12px;
  }
}
