/* ═══════════════════════════════════════
   WOBAZI — Tutorial guide pages (/guides, /th/guides, /zh/guides)
   public/css/guides.css   loaded by views/partials/guide-head.ejs only

   Everything is scoped to body.guide-page so nothing else on the site changes. Tokens come from
   app/style.css (--gold, --text, --muted, --bg-card, --border). Spacing: 32 between blocks,
   16 inside cards, 12 between rows.
═══════════════════════════════════════ */

.guide-page {
  --g-block: 32px;
  --g-pad: 16px;
  --g-row: 12px;
  --g-radius: 16px;
  --g-card: rgba(255, 255, 255, 0.035);
  --g-line: rgba(240, 240, 255, 0.09);
}

.guide-feature { color: var(--gold, #f0c040); }

/* Plain dark background: no galaxy image on guide pages (the shared nav partial still draws it). */
body.guide-page { background: var(--bg, #07070f); }
body.guide-page .site-galaxy { display: none; }

.guide-page .guide-main { display: grid; gap: var(--g-block); padding-top: 20px; }
.guide-page .guide-main > * { min-width: 0; }
.guide-page h1, .guide-page h2 { margin: 0; color: var(--text, #f0f0ff); }
.guide-page p { margin: 0; }

.guide-page .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Breadcrumb ── */
.guide-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted, rgba(240,240,255,0.45)); margin-bottom: calc(-1 * var(--g-block) + 12px); }
.guide-crumbs a { color: inherit; text-decoration: none; }
.guide-crumbs a:hover, .guide-crumbs a:focus-visible { color: var(--gold, #f0c040); }

/* ── Hero ── */
.guide-hero { display: grid; gap: var(--g-row); }
.guide-hero h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
.guide-hook { font-size: 17px; line-height: 1.55; color: rgba(240, 240, 255, 0.78); max-width: 62ch; text-wrap: pretty; }
.guide-meta { display: flex; gap: 8px; font-size: 14px; color: var(--muted, rgba(240,240,255,0.45)); font-variant-numeric: tabular-nums; }
.guide-needs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.guide-needs-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted, rgba(240,240,255,0.45)); margin-right: 4px; }
.guide-chip { font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(240, 192, 64, 0.35); color: var(--gold, #f0c040); background: rgba(240, 192, 64, 0.06); }
.guide-chip.is-optional { border-style: dashed; color: rgba(240, 240, 255, 0.7); border-color: var(--g-line); background: transparent; }
.guide-chip small { font-size: 11px; opacity: 0.7; }

/* ── Video ── */
.guide-video { margin: 0; display: grid; gap: 8px; }
.guide-video video { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; border-radius: var(--g-radius); background: #000; border: 1px solid var(--g-line); }
.guide-video figcaption { font-size: 13px; color: var(--muted, rgba(240,240,255,0.45)); }

/* ── Steps ── */
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--g-block); counter-reset: none; }
.guide-step { display: grid; gap: var(--g-pad); scroll-margin-top: 80px; }
.guide-step-text { display: grid; grid-template-columns: 36px 1fr; gap: var(--g-row); align-items: start; }
.guide-step-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold, #f0c040); color: #07070f; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.guide-step h2 { font-size: 20px; line-height: 1.25; font-weight: 600; margin-top: 5px; }
.guide-step-text p { margin-top: 6px; font-size: 16px; line-height: 1.55; color: rgba(240, 240, 255, 0.78); }
.guide-step-text .guide-lock { font-size: 14px; color: var(--muted, rgba(240,240,255,0.55)); }
.guide-shot { margin: 0; justify-self: center; width: min(100%, 300px); }
.guide-shot img { display: block; width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--g-line); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45); background: #07070f; }

@media (min-width: 768px) {
  .guide-shot { width: 100%; justify-self: stretch; }
  .guide-shot img { border-radius: 12px; aspect-ratio: 1440 / 900; }
}

/* ── Cards: plans, terms, FAQ ── */
.guide-card { display: grid; gap: var(--g-pad); padding: var(--g-pad); border-radius: var(--g-radius); background: var(--g-card); border: 1px solid var(--g-line); }
.guide-card h2 { font-size: 18px; font-weight: 600; }
.guide-plans, .guide-terms { margin: 0; display: grid; gap: var(--g-row); }
.guide-plan { display: grid; grid-template-columns: 110px 1fr; gap: var(--g-row); align-items: baseline; }
.guide-plan dt { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(240, 240, 255, 0.6); }
.guide-plan.is-premium dt { color: var(--gold, #f0c040); }
.guide-plan dd, .guide-terms dd { margin: 0; font-size: 15px; line-height: 1.5; color: rgba(240, 240, 255, 0.82); }
.guide-terms dt { font-weight: 600; color: var(--text, #f0f0ff); font-size: 15px; }
.guide-terms dd { margin-top: 2px; }
.guide-native { color: var(--gold, #f0c040); font-weight: 500; margin-left: 4px; }
.guide-faq { border-top: 1px solid var(--g-line); padding-top: var(--g-row); }
.guide-faq:first-of-type { border-top: 0; padding-top: 0; }
.guide-faq summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text, #f0f0ff); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: '+'; color: var(--gold, #f0c040); font-weight: 400; }
.guide-faq[open] summary::after { content: '−'; }
.guide-faq p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: rgba(240, 240, 255, 0.78); }
.guide-faq summary:focus-visible, .guide-tile:focus-visible, .guide-more a:focus-visible { outline: 2px solid var(--gold, #f0c040); outline-offset: 3px; border-radius: 8px; }

/* ── CTA, languages, more guides ── */
.guide-cta { display: flex; justify-content: center; }
.guide-cta .btn-primary { text-decoration: none; }
.guide-langs { font-size: 14px; color: var(--muted, rgba(240,240,255,0.45)); text-align: center; margin-top: calc(-1 * var(--g-block) + 16px); }
.guide-langs a { color: var(--gold, #f0c040); text-decoration: none; }
.guide-more { display: grid; gap: var(--g-row); }
.guide-more h2 { font-size: 18px; font-weight: 600; }
.guide-more ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.guide-more a { display: grid; grid-template-columns: 32px 1fr; gap: var(--g-row); align-items: center; padding: 12px var(--g-pad); border-radius: 12px; border: 1px solid var(--g-line); background: var(--g-card); color: var(--text, #f0f0ff); text-decoration: none; }
.guide-more a:hover { border-color: rgba(240, 192, 64, 0.4); }
.guide-more-n, .guide-tile-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(240, 192, 64, 0.5); color: var(--gold, #f0c040); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.guide-more strong { display: block; font-weight: 600; font-size: 15px; }
.guide-more small { display: block; font-size: 12px; color: var(--muted, rgba(240,240,255,0.45)); margin-top: 2px; }

/* ── Index ── */
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--g-pad); }
@media (min-width: 640px) { .guide-list { grid-template-columns: 1fr 1fr; } }
.guide-tile { display: grid; height: 100%; border-radius: var(--g-radius); overflow: hidden; border: 1px solid var(--g-line); background: var(--g-card); color: var(--text, #f0f0ff); text-decoration: none; transition: border-color 0.2s; }
.guide-tile:hover { border-color: rgba(240, 192, 64, 0.45); }
.guide-tile img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.guide-tile-body { display: grid; gap: 8px; padding: var(--g-pad); align-content: start; }
.guide-tile strong { font-size: 18px; font-weight: 600; line-height: 1.25; }
.guide-tile-hook { font-size: 14px; line-height: 1.5; color: rgba(240, 240, 255, 0.72); }
.guide-tile small { font-size: 12px; color: var(--muted, rgba(240,240,255,0.45)); }

@media (max-width: 480px) {
  .guide-page .guide-main { padding-left: 16px; padding-right: 16px; }
  .guide-plan { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { .guide-tile { transition: none; } }
