/**
 * guide.css
 * Styles for the help centre: the guides index, step-by-step tutorials, FAQ, glossary, support and legal pages.
 *
 * Dependencies: site.css (theme tokens)
 */

/* ============================================
   PAGE HEADER
   ============================================ */

.page-hero { background: var(--accent-strong); color: var(--on-dark); padding: 40px 0 48px; }
.page-hero .eyebrow { color: var(--sun); }
.page-hero h1 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 2.8rem); max-width: 24ch; }
.page-hero p { margin: 0; color: var(--on-dark-soft); font-size: 1.15rem; max-width: 42rem; }
.crumbs { font-size: 0.95rem; margin: 0 0 14px; }
.crumbs a { color: var(--on-dark-soft); }

/* ============================================
   GUIDES INDEX
   ============================================ */

.guide-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.guide-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); transition: transform 0.15s ease, border-color 0.15s ease;
}
.guide-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.guide-card .num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-bg); color: var(--accent-ink); font-weight: 800; margin-bottom: 6px;
}
.guide-card h3 { margin: 0; font-size: 1.2rem; }
.guide-card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.guide-card .time { margin-top: auto; padding-top: 8px; font-size: 0.9rem; color: var(--accent-ink); font-weight: 600; }

.group-title { font-size: 1.35rem; margin: 40px 0 16px; }

/* ============================================
   TUTORIAL LAYOUT
   ============================================ */

.tutorial { display: grid; gap: 32px; padding-top: 36px; }
@media (min-width: 62rem) { .tutorial { grid-template-columns: 15rem 1fr; align-items: start; } }

.toc { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; }
@media (min-width: 62rem) { .toc { position: sticky; top: 88px; } }
.toc h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin: 6px 0; font-size: 0.98rem; }

.tutorial-body { min-width: 0; max-width: 48rem; }
.tutorial-body > h2 { font-size: 1.6rem; margin: 40px 0 12px; scroll-margin-top: 90px; }
.tutorial-body > h2:first-child { margin-top: 0; }
.tutorial-body p, .tutorial-body li { font-size: 1.08rem; }

.you-need { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 22px; }
.you-need h2 { font-size: 1.1rem; margin: 0 0 6px; }
.you-need ul { margin: 0; padding-left: 1.2rem; }

/* A numbered step: text beside a phone screenshot on wide screens, stacked on phones */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.step {
  counter-increment: step; display: grid; gap: 20px; padding: 24px 0; border-top: 1px solid var(--rule);
  scroll-margin-top: 90px;
}
.step:first-child { border-top: 0; }
@media (min-width: 44rem) { .step.has-shot { grid-template-columns: 1fr 230px; align-items: start; } }
.step h3 { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 8px; font-size: 1.25rem; }
.step h3::before {
  content: counter(step); flex: none; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.05rem; font-weight: 800; margin-top: -4px;
}
.step h4.sub-step { margin: 20px 0 8px; font-size: 1.2rem; line-height: 1.25; }
.step p { margin: 0 0 10px; }
.step ul { margin: 0 0 10px; padding-left: 1.3rem; }
.step .phone { max-width: 230px; }

/* An on-screen button or label, written the way it appears in the app */
.ui {
  display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--accent-bg); color: var(--accent-ink);
  font-weight: 700; white-space: nowrap;
}

.field-table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 1rem; }
.field-table th, .field-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.field-table th { background: var(--surface-2); font-size: 0.9rem; }
.field-table td:first-child { font-weight: 700; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.next-prev { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); }

/* ============================================
   FAQ AND GLOSSARY
   ============================================ */

.faq { max-width: 48rem; }
.faq details { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); margin: 10px 0; }
.faq summary { cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 700; font-size: 1.08rem; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 1.5rem; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 16px; }
.faq details > div p { margin: 0 0 10px; }

.glossary { display: grid; gap: 12px; max-width: 52rem; }
.glossary dt { font-weight: 800; font-size: 1.12rem; }
.glossary dd { margin: 2px 0 0; color: var(--ink-soft); }
.glossary .term { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 16px 20px; scroll-margin-top: 90px; }

/* ============================================
   SUPPORT
   ============================================ */

.contact-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.contact-grid .card h2 { font-size: 1.2rem; margin: 0 0 6px; }
.contact-grid .card p { margin: 0 0 12px; color: var(--ink-soft); }

/* ============================================
   PRIVACY POLICY AND TERMS
   ============================================ */

.legal { padding-top: 36px; max-width: 48rem; }
.legal-meta { color: var(--ink-soft); margin: 0 0 24px; }
.legal-intro { background: var(--accent-bg); border-radius: var(--radius); padding: 4px 22px; margin-bottom: 28px; }
.legal-section { margin-bottom: 28px; }
.legal-section h2 { font-size: 1.3rem; margin: 0 0 8px; scroll-margin-top: 90px; }
.legal-section ul { padding-left: 1.25rem; }
.legal-section li { margin-bottom: 6px; }
