:root { --bg: #fbfbfc; --surface: #fff; --text: #0b0c10; --muted: #61666f; --border: rgba(11,12,16,.09); --accent: #2f5bea; --tip: #f0f3ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #07080b; --surface: #0f1115; --text: #f2f3f7; --muted: #9096a3; --border: rgba(255,255,255,.09); --tip: #12172b; }
}
:root[data-theme="dark"] { --bg: #07080b; --surface: #0f1115; --text: #f2f3f7; --muted: #9096a3; --border: rgba(255,255,255,.09); --tip: #12172b; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; font: 17px/1.7 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif; }
main { max-width: 720px; margin: 0 auto; padding: 32px 20px 80px; }
a { color: var(--accent); }
.top { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 700; }
.top img { width: 28px; height: 28px; }
h1 { font-size: clamp(30px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.04em; font-weight: 700; margin: 32px 0 10px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 8px; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
h2 { font-size: 24px; letter-spacing: -0.01em; margin: 40px 0 8px; }
h3 { font-size: 19px; margin: 26px 0 6px; }
ol li, ul li { margin-bottom: 6px; }
.tip { background: var(--tip); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; margin: 22px 0; }
.tip p { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 16px 0; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.cta { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px 22px; margin-top: 44px; }
.cta p { margin: 0 0 12px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; }
footer { margin-top: 48px; color: var(--muted); font-size: 14px; }
.disclosure { font-size: 14px; color: var(--muted); font-style: italic; }

/* shared nav */
header.nav { position: sticky; top: 0; z-index: 10; background: var(--nav-bg, rgba(251,251,252,.72)); border-bottom: 1px solid var(--border); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) header.nav { --nav-bg: rgba(7,8,11,.7); } }
.nav-in { max-width: 1080px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 10px; height: 56px; }
.nav-in .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.nav-in img { width: 26px; height: 26px; border-radius: 7px; }
.nav-in nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 14px; }
.nav-in nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; }
.nav-in nav a:hover { color: var(--text); background: var(--surface); }
.nav-in nav a.nav-cta { color: #fff; background: var(--text); font-weight: 600; margin-left: 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-in nav a.nav-cta { color: #07080b; background: #f2f3f7; } }
.nav-in nav a.nav-cta:hover { opacity: .88; }
main { padding-top: 8px; }
h1 { margin-top: 28px; }

/* guides index */
main.wide { max-width: 1080px; padding: 0 24px 96px; }
.g-hero { position: relative; text-align: center; padding: 72px 0 48px; }
.g-hero::before { content: ""; position: absolute; left: 50%; top: -160px; width: 800px; height: 520px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(47,91,234,.16), transparent); pointer-events: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .g-hero::before { background: radial-gradient(closest-side, rgba(80,110,255,.22), transparent); } }
.g-hero > * { position: relative; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.g-hero h1 { font-size: clamp(36px, 6vw, 60px); letter-spacing: -0.045em; line-height: 1.03; margin: 0 auto 16px; max-width: 700px; }
.g-hero .lede { max-width: 560px; margin: 0 auto; }
.g-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 700px) { .g-grid { grid-template-columns: 1fr; } .g-card.featured { padding: 26px; } }
.g-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s, box-shadow .2s; }
.g-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 18px 40px -20px rgba(47,91,234,.35); }
.g-card.featured { grid-column: 1 / -1; padding: 34px; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--accent), #6d5dfc) border-box; border: 1.5px solid transparent; }
.g-card.featured h2 { font-size: clamp(24px, 3.4vw, 34px); max-width: 640px; }
.g-tag { align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.g-card h2 { font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; margin: 0; text-align: left; max-width: none; }
.g-card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.g-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13.5px; }
.g-foot b { color: var(--accent); font-weight: 600; transition: transform .2s; }
.g-card:hover .g-foot b { transform: translateX(3px); }
.g-cta { margin: 56px auto 0; max-width: 720px; text-align: center; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* phones */
@media (max-width: 700px) {
  .nav-in { padding: 0 16px; }
  .nav-in nav a:not(.nav-cta) { display: none; }
  main { padding: 8px 18px 64px; }
  main.wide { padding: 0 16px 64px; }
  .g-hero { padding: 48px 0 32px; }
  .g-card { padding: 22px; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: normal; }
  th, td { min-width: 110px; }
}
