html, body { overflow-x: hidden; }
body { font-family: 'Inter', system-ui, sans-serif; background: #ffffff; color: #334155; }
.grid > * { min-width: 0; }
input, textarea, select { max-width: 100%; }
::selection { background: rgba(99,102,241,.25); }

/* Backgrounds */
.grid-bg {
  background-image:
    linear-gradient(to right, rgba(99,102,241,.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99,102,241,.08) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at center top, #000 25%, transparent 72%);
          mask-image: radial-gradient(ellipse at center top, #000 25%, transparent 72%);
}
.hero-glow { background: radial-gradient(60% 55% at 50% 0%, rgba(129,140,248,.28), transparent 70%), radial-gradient(40% 40% at 90% 20%, rgba(34,211,238,.20), transparent 70%); }
.text-grad { background: linear-gradient(90deg, #4f46e5, #0891b2 60%, #059669); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Cards */
.glass { background: #ffffff; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.10); }
.card-hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-3px); border-color: #a5b4fc; box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 18px 40px -16px rgba(79,70,229,.35); }

/* Motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .chev { transform: rotate(180deg); }

/* Nav */
.nav-link { color: #475569; font-weight: 500; transition: color .15s; position: relative; padding: .25rem 0; }
.nav-link:hover, .nav-link.active { color: #0f172a; }
.nav-link.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #6366f1, #06b6d4); }

/* Forms */
.input { width: 100%; border-radius: .6rem; background: #fff; border: 1px solid #cbd5e1; padding: .7rem .85rem; font-size: .875rem; color: #0f172a; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.input::placeholder { color: #94a3b8; }

/* Buttons */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: .75rem; padding: .85rem 1.75rem; font-weight: 600; color: #fff; background: linear-gradient(90deg, #4f46e5, #0891b2); box-shadow: 0 10px 25px -10px rgba(79,70,229,.6); transition: filter .15s, transform .15s; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; border-radius: .75rem; padding: .85rem 1.75rem; font-weight: 600; color: #0f172a; background: #fff; border: 1px solid #cbd5e1; transition: background .15s, border-color .15s; }
.btn-ghost:hover { background: #f1f5f9; border-color: #94a3b8; }

/* Dark code panels (kept dark for contrast) */
.code-panel { background: #0f172a; border-radius: .9rem; overflow: hidden; border: 1px solid #1e293b; }
.code-panel .bar { display: flex; align-items: center; justify-content: space-between; padding: .55rem 1rem; border-bottom: 1px solid #1e293b; font-size: .75rem; color: #94a3b8; font-family: 'JetBrains Mono', monospace; }
.code-panel pre { padding: 1rem; font-size: .75rem; line-height: 1.65; overflow-x: auto; font-family: 'JetBrains Mono', monospace; color: #a7f3d0; max-height: 15rem; }
.code-panel .copyBtn { background: rgba(255,255,255,.08); color: #e2e8f0; border-radius: .4rem; padding: .2rem .65rem; }
.code-panel .copyBtn:hover { background: rgba(255,255,255,.16); }

/* Checks (readiness tool) */
.check-item { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem .8rem; border-radius: .7rem; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.check-item:hover { border-color: #a5b4fc; background: #f8faff; }
.check-item input { margin-top: .2rem; width: 1rem; height: 1rem; accent-color: #4f46e5; flex-shrink: 0; }

/* Long-form article typography */
.prose-geo h2 { color: #0f172a; font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 .9rem; letter-spacing: -.01em; }
.prose-geo h3 { color: #0f172a; font-size: 1.1rem; font-weight: 600; margin: 1.8rem 0 .6rem; }
.prose-geo p { color: #475569; line-height: 1.8; margin: 1rem 0; }
.prose-geo ul, .prose-geo ol { color: #475569; line-height: 1.8; margin: 1rem 0 1rem 1.25rem; }
.prose-geo ul { list-style: disc; } .prose-geo ol { list-style: decimal; }
.prose-geo li { margin: .35rem 0; }
.prose-geo a { color: #4f46e5; text-decoration: underline; text-underline-offset: 3px; }
.prose-geo a:hover { color: #3730a3; }
.prose-geo strong { color: #0f172a; }
.prose-geo code { font-family: 'JetBrains Mono', monospace; font-size: .85em; background: #eef2ff; padding: .1em .4em; border-radius: .3rem; color: #3730a3; }
.prose-geo pre { background: #0f172a; border-radius: .75rem; padding: 1rem; overflow-x: auto; font-size: .8rem; line-height: 1.6; margin: 1.2rem 0; }
.prose-geo pre code { background: none; padding: 0; color: #e2e8f0; }
.prose-geo blockquote { border-left: 3px solid #6366f1; padding-left: 1rem; color: #334155; margin: 1.5rem 0; }

/* Back to top */
#toTop { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; width: 2.6rem; height: 2.6rem; border-radius: 9999px; background: #fff; border: 1px solid #cbd5e1; box-shadow: 0 8px 20px -8px rgba(15,23,42,.35); display: none; align-items: center; justify-content: center; color: #334155; }
#toTop.show { display: flex; }
#toTop:hover { background: #f1f5f9; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #0f172a; color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }

@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .card-hover:hover { transform: none; } }
