/* Content pages (guide, FAQ, privacy, terms). Loaded after app.css and reuses its tokens. */

/* Bilingual content: show only the blocks for the selected language. */
:root:not([data-page-lang="en"]) .lang-en,
:root[data-page-lang="en"] .lang-zh { display: none !important; }

.brand-link { color: inherit; text-decoration: none; }
.brand-link:hover span { color: var(--accent); }

.page-lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 999px;
}
.page-lang button {
  min-block-size: 2.25rem;
  min-inline-size: 2.75rem;
  padding: 0 .7rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 700;
}
.page-lang [aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px rgb(15 42 68 / .14); }

.page { width: min(100% - 2.5rem, 48rem); margin-inline: auto; padding-block: 2rem 1rem; }
.page-hero { display: grid; gap: .6rem; margin-bottom: 1.5rem; }
.page-hero .eyebrow { color: var(--accent); font-size: .8125rem; font-weight: 700; letter-spacing: .02em; }
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.page-hero p { color: var(--muted); }
.page-meta { color: var(--muted); font-size: .8125rem; }

.toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.toc a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.5rem;
  padding: .35rem .9rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.toc a:hover { border-color: var(--accent); color: var(--accent); }

.prose { display: grid; gap: 1rem; }
.prose section { scroll-margin-top: 5rem; }
.prose .card { display: grid; gap: .75rem; }
.prose h2 { font-size: 1.25rem; font-weight: 750; line-height: 1.35; letter-spacing: -.01em; }
.prose h3 { margin-top: .5rem; font-size: 1.0625rem; font-weight: 700; }
.prose p, .prose li { line-height: 1.75; }
.prose ul, .prose ol { display: grid; gap: .35rem; margin: 0; padding-inline-start: 1.3rem; }
.prose strong { font-weight: 700; }
.prose a { font-weight: 600; }
.prose .source { color: var(--muted); font-size: .875rem; }
.prose .callout {
  display: flex;
  gap: .6rem;
  padding: .85rem 1rem;
  color: var(--ink);
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.prose .callout.warn { background: var(--warn-bg); }
.prose .callout .ui-icon { margin-top: .2rem; color: var(--accent); }
.prose .callout.warn .ui-icon { color: var(--warn); }

.table-scroll { overflow-x: auto; margin-inline: -.25rem; padding-inline: .25rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.prose th, .prose td { padding: .65rem .75rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.prose td:first-child { font-weight: 650; white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }
/* Keep measurements on one line; on narrow screens the table scrolls sideways instead. */
.spec-table { min-width: 34rem; }
.spec-table td:nth-child(2), .spec-table td:nth-child(3) { white-space: nowrap; }

.faq { display: grid; gap: .6rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-block-size: 3.25rem;
  padding: .6rem 1rem;
  list-style: none;
  font-size: 1rem;
  font-weight: 650;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  margin-inline-start: auto;
  inline-size: .5rem;
  block-size: .5rem;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details[open] { border-color: var(--line-strong); }
.faq .answer { display: grid; gap: .6rem; padding: 0 1rem 1rem; color: var(--ink); line-height: 1.75; }
.faq h2 { margin-top: 1rem; font-size: 1.0625rem; color: var(--muted); }

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.4rem;
  color: #fff;
  background: var(--brand);
  border-radius: var(--radius-lg);
}
.cta p { font-weight: 650; }
.cta .button.primary { text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }

@media (max-width: 37rem) {
  .page { width: calc(100% - 2rem); padding-top: 1.25rem; }
  .brand span { font-size: .95rem; }
  .prose th, .prose td { padding: .55rem .5rem; }
}
