/* Shared styles for the Nefin pages (landing + docs + legal) */
html { color-scheme: dark; scroll-behavior: smooth; }
  /* never let long content (code lines etc.) stretch a single-column grid beyond the viewport */
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid > * { min-width: 0; }
body { font-family: 'IBM Plex Sans', sans-serif; background: #0b0b0b; overflow-x: hidden; font-size: 15px; line-height: 1.7; }
::selection { background: #17a697; color: #0b0b0b; }
:focus-visible { outline: 2px solid #43cdbd; outline-offset: 3px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }

#progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #17a697, #8ff0e3); z-index: 60; }
#glow { position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 9999px; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(23,166,151,.12), transparent 62%); opacity: 0; transition: opacity .6s; }
#bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #43cdbd; }
.grad { background: linear-gradient(95deg, #8ff0e3 0%, #17a697 55%, #4fd0c0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Floating pill nav */
.pillnav { box-shadow: 0 8px 40px -12px rgba(0,0,0,.8); }
.navlink { padding: .375rem .8rem; white-space: nowrap; border-radius: 9999px; transition: color .2s, background-color .2s; }
.navlink:hover { color: #ecebe8; background: rgba(255,255,255,.05); }
.navlink[aria-current="page"] { color: #ecebe8; background: rgba(255,255,255,.06); }

/* Documentation / legal pages: calmer, smaller type on the same tokens */
body.doc main { position: relative; z-index: 10; padding-top: 5rem; }
body.doc footer { position: relative; z-index: 10; }
body.doc main h1 { font-size: 1.9rem; line-height: 1.15; letter-spacing: -.03em; font-weight: 500; }
body.doc main h2 { font-weight: 500; letter-spacing: -.02em; }
body.doc main h3 { font-weight: 500; }
body.doc .font-bold { font-weight: 500; }
body.doc .font-semibold { font-weight: 500; }
body.doc main p.text-sm.font-semibold.uppercase, body.doc main p.uppercase { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .18em; font-weight: 400; }
body.doc main code { font-family: 'JetBrains Mono', monospace; font-size: .85em; }
body.doc main pre { font-family: 'JetBrains Mono', monospace; }
body.doc main .bg-card { background: rgba(19,19,19,.82); backdrop-filter: blur(6px); }
body.doc main a.text-accent:hover { text-decoration: underline; text-underline-offset: 3px; }
body.doc .doc-in { opacity: 0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
body.doc .doc-in.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.doc .doc-in { opacity: 1; transform: none; transition: none; }
  #glow { display: none; }
}
body.doc main p, body.doc main li, body.doc main td, body.doc main th, body.doc main h1, body.doc main h2, body.doc main h3, body.doc main code { overflow-wrap: anywhere; }
body.doc main pre code, body.doc main pre { overflow-wrap: normal; }
