/* Shared styles for the generated pages (guides, support, 404). Tokens match index.html. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --green: #2DA44E;
  --green-hover: #278c43;
  --soft-green: #E8F5E9;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-tertiary: #888;
  --bg: #FAFAFA;
  --card-bg: #fff;
  --card-border: rgba(0,0,0,0.08);
  --quick-bg: #f0faf2;
  --xsell-bg: #f5f5f7;
  --footer-border: #eee;
}
[data-theme="dark"] {
  --green: #34C759;
  --green-hover: #2db84e;
  --soft-green: #1a2e1e;
  --text: #f0f0f0;
  --text-secondary: #a1a1a6;
  --text-tertiary: #8e8e93;
  --bg: #1C1C1E;
  --card-bg: #2c2c2e;
  --card-border: rgba(255,255,255,0.1);
  --quick-bg: #1a2e1e;
  --xsell-bg: #161618;
  --footer-border: #2c2c2e;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav (same look as the homepage) */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(250,250,250,0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--card-border);
}
[data-theme="dark"] .site-nav { background: rgba(28,28,30,0.85); }
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.nav-brand:hover { text-decoration: none; }
.nav-icon { width: 32px; height: 32px; border-radius: 8px; }
.nav-name { font-size: 17px; font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { font-size: 14px; color: var(--text-secondary); }
.nav-links a:hover { color: var(--green); text-decoration: none; }
.nav-cta { font-size: 14px; font-weight: 600; color: #fff !important; background: var(--green); padding: 8px 18px; border-radius: 20px; }
.nav-cta:hover { background: var(--green-hover); text-decoration: none; }
.theme-toggle {
  background: none; border: 1px solid var(--card-border); border-radius: 10px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); flex-shrink: 0;
}
.theme-toggle:hover { color: var(--green); border-color: var(--green); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (max-width: 760px) { .nav-links { display: none; } .site-nav { padding: 12px 16px; } }

/* Article */
.article, .hub { max-width: 720px; margin: 0 auto; padding: 40px 20px 64px; }
.hub { max-width: 960px; }
.crumbs { font-size: 14px; color: var(--text-tertiary); margin-bottom: 20px; }
.crumbs span { margin: 0 6px; }
h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.15; letter-spacing: -0.6px; margin-bottom: 16px; }
.article h2, .hub h2 { font-size: 23px; line-height: 1.3; margin: 40px 0 12px; letter-spacing: -0.2px; }
.article h3, .hub h3 { font-size: 18px; margin: 24px 0 8px; }
.lede { font-size: 19px; color: var(--text-secondary); margin-bottom: 24px; }
.article p { margin-bottom: 14px; }
.article ul, .article ol { margin: 0 0 16px 22px; }
.article li { margin-bottom: 8px; }
.quick { background: var(--quick-bg); border-left: 4px solid var(--green); border-radius: 12px; padding: 18px 20px; margin: 8px 0 28px; }
.note-box { background: var(--xsell-bg); border-radius: 12px; padding: 14px 18px; font-size: 15px; color: var(--text-secondary); margin: 8px 0 20px; }
figure { margin: 28px auto; text-align: center; }
img.screen { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }
figcaption { font-size: 14px; color: var(--text-tertiary); margin-top: 10px; }

/* Cross-promotion box */
.xsell { background: var(--xsell-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 20px 22px; margin: 36px 0; }
.xsell h2 { font-size: 18px !important; margin: 0 0 8px !important; }
.xsell p { margin: 0 !important; color: var(--text-secondary); }

/* FAQ */
.faq { margin-top: 40px; }
.faq-item { border-bottom: 1px solid var(--card-border); padding: 14px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: -1px; font-size: 22px; font-weight: 400; color: var(--green); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 10px 0 2px; color: var(--text-secondary); }

/* CTA */
.cta-box { text-align: center; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px; padding: 32px 24px; margin: 44px 0 16px; }
.cta-icon { border-radius: 14px; margin-bottom: 8px; }
.cta-box h2 { margin: 6px 0 6px !important; }
.cta-box p { color: var(--text-secondary); margin-bottom: 16px; }
.app-store-badge img { height: 54px; width: auto; }

/* Related + hub cards */
.related { margin-top: 36px; }
.related-grid, .guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.related-card, .guide-card {
  display: block; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px;
  padding: 16px 18px; color: var(--text);
}
.related-card:hover, .guide-card:hover { border-color: var(--green); text-decoration: none; }
.related-card span { font-weight: 600; font-size: 15px; }
.guide-card h3 { margin: 0 0 6px !important; font-size: 17px; }
.guide-card p { font-size: 14px; color: var(--text-secondary); margin: 0; }
.cluster { margin-top: 36px; }
.cluster > p { color: var(--text-secondary); max-width: 720px; }
.updated { font-size: 13px; color: var(--text-tertiary); margin-top: 32px; }
.notfound { text-align: center; padding-top: 80px; }

/* Footer (same as homepage) */
.site-footer { text-align: center; padding: 40px 20px; border-top: 1px solid var(--footer-border); }
.footer-brand { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.footer-tagline { font-size: 14px; color: var(--text-tertiary); margin-bottom: 18px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 14px; }
.footer-links a, .footer-more a, .footer-copy a { color: var(--text-secondary); font-size: 14px; }
.footer-more { font-size: 14px; color: var(--text-tertiary); margin-bottom: 12px; }
.footer-copy { font-size: 13px; color: var(--text-tertiary); }
