/* Insula — atlas of light. Dark "night" theme with generative light covers. */
:root {
  --bg: #06060c; --bg2: #0b0b16; --bg3: #11111f; --card: rgba(255,255,255,.035); --card2: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #ececf4; --muted: #9c9cb4; --dim: #6e6e88;
  --cyan: #67e8f9; --violet: #a78bfa; --pink: #f472b6; --amber: #fbbf24;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 50%, var(--pink));
  --r: 16px; --r2: 10px; --w: 1240px;
  --ff: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fh: "Space Grotesk", var(--ff);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--ff); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 500px at 85% -10%, rgba(167,139,250,.13), transparent 60%),
              radial-gradient(700px 500px at -10% 10%, rgba(103,232,249,.08), transparent 60%),
              radial-gradient(800px 600px at 50% 120%, rgba(244,114,182,.07), transparent 60%); }
a { color: var(--cyan); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--fh); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-top: 1.6em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); }
.wrap { width: min(var(--w), 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

/* header */
.hdr { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px);
  background: rgba(6,6,12,.72); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: 1.2rem; height: 64px; }
.logo { display: flex; align-items: center; gap: .6rem; color: var(--text); font-family: var(--fh); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo em { display: block; font-style: normal; font-size: .62rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: -3px; }
.nav { display: flex; gap: .2rem; margin-left: auto; }
.nav a { color: var(--muted); padding: .45rem .7rem; border-radius: 999px; font-size: .93rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current] { color: var(--text); background: var(--card2); text-decoration: none; }
.btn-search { display: flex; align-items: center; gap: .5rem; background: var(--card); border: 1px solid var(--line2); color: var(--muted);
  border-radius: 999px; padding: .42rem .8rem; cursor: pointer; font: inherit; font-size: .9rem; }
.btn-search:hover { color: var(--text); border-color: var(--violet); }
.btn-search kbd { font: 600 .7rem var(--ff); border: 1px solid var(--line2); border-radius: 5px; padding: 0 .35rem; }
.btn-menu { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.btn-menu span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .82rem; color: var(--dim); padding-top: 1.1rem; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* hero */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.hero-in { position: relative; z-index: 1; max-width: 960px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 700; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 600; color: var(--violet); margin-bottom: .8rem; }
.eyebrow a { color: inherit; }
.lead { font-size: clamp(1.03rem, 1.5vw, 1.2rem); color: #cfcfe0; max-width: 72ch; }
.beams { position: absolute; inset: -20% -10% auto; height: 140%; pointer-events: none; opacity: .55; }
.beams i { position: absolute; top: -10%; width: 38%; height: 120%; filter: blur(30px); transform-origin: top center; mix-blend-mode: screen;
  background: linear-gradient(180deg, rgba(103,232,249,.35), transparent 70%); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); animation: sweep 14s ease-in-out infinite alternate; }
.beams i:nth-child(1) { left: 5%; transform: rotate(-18deg); }
.beams i:nth-child(2) { left: 30%; background: linear-gradient(180deg, rgba(167,139,250,.4), transparent 70%); animation-delay: -4s; transform: rotate(8deg); }
.beams i:nth-child(3) { left: 55%; background: linear-gradient(180deg, rgba(244,114,182,.32), transparent 70%); animation-delay: -8s; transform: rotate(-6deg); }
.beams i:nth-child(4) { left: 75%; animation-delay: -2s; transform: rotate(16deg); }
@keyframes sweep { from { translate: -4% 0; rotate: -4deg; } to { translate: 6% 0; rotate: 5deg; } }
@media (prefers-reduced-motion: reduce) { .beams i { animation: none; } html { scroll-behavior: auto; } }
.hero-search { display: flex; gap: .5rem; max-width: 640px; margin: 1.6rem 0 2rem; padding: .35rem; border-radius: 999px; background: rgba(255,255,255,.05);
  border: 1px solid var(--line2); box-shadow: 0 10px 40px -10px rgba(167,139,250,.35); }
.hero-search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; padding: .7rem 1rem; outline: none; }
.hero-search button, .btn { border: 0; cursor: pointer; border-radius: 999px; padding: .7rem 1.3rem; font: 600 .95rem var(--ff); color: #0b0b16; background: var(--grad); }
.btn { display: inline-block; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn-ghost { display: inline-block; border: 1px solid var(--line2); border-radius: 999px; padding: .5rem 1rem; color: var(--text); font-size: .92rem; }
.btn-ghost:hover { border-color: var(--cyan); text-decoration: none; }
.stats { display: flex; flex-wrap: wrap; gap: .8rem; }
.stats a { display: flex; flex-direction: column; padding: .8rem 1.2rem; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); color: var(--text); min-width: 120px; }
.stats a:hover { border-color: var(--line2); text-decoration: none; background: var(--card2); }
.stats strong { font: 700 1.55rem var(--fh); }
.stats span { color: var(--muted); font-size: .82rem; }

/* sections */
.sec { margin-top: clamp(2.2rem, 5vw, 3.6rem); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.sec-h h2 { margin-top: 0; }
.page-head { padding: 1.6rem 0 .4rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem 1.5rem; }
.panel h2 { margin-top: 0; }
.panel.glow { background: linear-gradient(160deg, rgba(103,232,249,.08), rgba(167,139,250,.06) 50%, rgba(244,114,182,.05)); border-color: var(--line2); }
.more { display: inline-block; margin-top: .6rem; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.grid.gl { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .25s, border-color .25s, background .25s; }
.card:hover { transform: translateY(-3px); border-color: var(--line2); background: var(--card2); }
.card-a { display: block; color: var(--text); height: 100%; }
.card-a:hover { text-decoration: none; }
.card-b { padding: .85rem 1rem 1rem; }
.card h3 { margin: 0 0 .3rem; font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { color: #c4c4d6; font-size: .86rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta2 { color: var(--dim); font-size: .78rem; margin: .25rem 0 0; }
.award { color: var(--amber); }
.ncard .card-b { padding: 1.1rem; }
.ngrid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.swcard .card-b { padding: 1.1rem; }

/* generative covers */
.cv { position: relative; aspect-ratio: 16/10; overflow: hidden; isolation: isolate;
  --c1: hsl(var(--h) 90% 62%); --c2: hsl(var(--h2) 88% 60%);
  background: radial-gradient(120% 90% at var(--x) var(--y), color-mix(in srgb, var(--c1) 45%, transparent), transparent 60%),
              radial-gradient(90% 80% at calc(100% - var(--x)) 100%, color-mix(in srgb, var(--c2) 40%, transparent), transparent 65%), #090914; }
.cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.cv::before, .cv::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.cv-0::before { background: repeating-conic-gradient(from var(--a) at var(--x) 110%, transparent 0 7deg, color-mix(in srgb, var(--c1) 55%, transparent) 8deg 9deg, transparent 10deg 18deg); mix-blend-mode: screen; opacity: .8; }
.cv-1::before { background: radial-gradient(40% 60% at var(--x) 40%, var(--c1), transparent 70%), radial-gradient(50% 50% at 70% var(--y), var(--c2), transparent 70%); filter: blur(18px); opacity: .7; }
.cv-1::after { background: repeating-linear-gradient(calc(var(--a) / 4), transparent 0 14px, rgba(255,255,255,.05) 14px 15px); }
.cv-2::before { background: linear-gradient(transparent 49%, color-mix(in srgb, var(--c1) 65%, transparent) 50%, transparent 51%) 0 0 / 100% 22px,
  linear-gradient(90deg, transparent 49%, color-mix(in srgb, var(--c2) 60%, transparent) 50%, transparent 51%) 0 0 / 22px 100%;
  transform: perspective(240px) rotateX(58deg) scale(2) translateY(18%); transform-origin: bottom; opacity: .55; }
.cv-3::before { background: repeating-radial-gradient(circle at var(--x) var(--y), transparent 0 10px, color-mix(in srgb, var(--c1) 55%, transparent) 11px 12px, transparent 13px 26px); opacity: .7; mix-blend-mode: screen; }
.cv-4::before { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--c1) 30%, transparent) 0 18%, transparent 18% 22%),
  repeating-linear-gradient(0deg, transparent 0 20%, rgba(0,0,0,.55) 20% 24%); mask: linear-gradient(transparent 22%, #000 30%); opacity: .75; }
.cv-4::after { background: linear-gradient(180deg, transparent 20%, color-mix(in srgb, var(--c2) 35%, transparent)); mix-blend-mode: screen; }
.cv-5::before { background: conic-gradient(from var(--a) at 50% 50%, var(--c1), var(--c2), transparent, var(--c1)); filter: blur(28px) saturate(130%); opacity: .55; }
.cv-5::after { background: repeating-linear-gradient(var(--a), transparent 0 3px, rgba(0,0,0,.25) 3px 4px); }
.cv-g { position: absolute; z-index: 1; right: .8rem; bottom: .55rem; font-size: 1.6rem; color: rgba(255,255,255,.7); text-shadow: 0 0 18px var(--c1); }
.cv-l { position: absolute; z-index: 3; left: .75rem; top: .65rem; font: 600 .72rem var(--ff); letter-spacing: .06em; text-transform: uppercase;
  background: rgba(6,6,12,.55); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); padding: .18rem .5rem; border-radius: 999px; color: #fff; }

/* people cards */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.pcard { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); color: var(--text); min-width: 0; }
.pcard:hover { border-color: var(--line2); background: var(--card2); text-decoration: none; }
.pcard strong { display: block; font-weight: 600; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard > span:last-child { min-width: 0; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem var(--fh); color: #fff;
  background: radial-gradient(circle at 30% 30%, hsl(var(--h) 90% 65%), hsl(var(--h2) 80% 40%)); box-shadow: 0 0 24px -6px hsl(var(--h) 90% 60%); }
.avatar.xl { width: 96px; height: 96px; font-size: 2.4rem; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0; }
.chips.sm { margin: .5rem 0 0; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .75rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--text); font-size: .86rem; white-space: nowrap; }
.chips.sm .chip { font-size: .76rem; padding: .18rem .6rem; }
a.chip:hover { border-color: var(--violet); text-decoration: none; background: var(--card2); }
.chip small { color: var(--dim); font-size: .74rem; }
.chip.on { border-color: var(--cyan); color: var(--cyan); }
.chips.big .chip { font-size: .95rem; padding: .55rem 1rem; }

/* detail pages */
.detail { padding-bottom: 1rem; }
.d-hero { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 2rem; align-items: center; margin: 1.4rem 0 1.6rem; }
.d-hero .cv { border-radius: var(--r); border: 1px solid var(--line2); box-shadow: 0 30px 80px -30px rgba(167,139,250,.45); }
.d-hero h1 { margin-bottom: .3rem; }
.by { font-size: 1.1rem; color: #cfcfe0; }
.badge { display: inline-block; margin-top: .6rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.35); color: var(--amber); font-size: .88rem; }
.a-hero { display: flex; gap: 1.6rem; align-items: center; margin: 1.6rem 0; }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.4rem; }
.d-main h2:first-child { margin-top: 0; }
.d-side { position: relative; min-width: 0; }
.facts { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .4rem 1.1rem; }
.facts > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: .84rem; }
.facts dd { margin: 0; font-size: .92rem; word-break: break-word; }
.side-links { display: flex; flex-direction: column; gap: .35rem; margin-top: 1rem; font-size: .92rem; }
.excerpt { margin: 1.2rem 0; padding: 1rem 1.3rem; border-left: 3px solid; border-image: var(--grad) 1; background: rgba(255,255,255,.025); color: #d6d6e4; }
.excerpt p { margin: 0 0 .4rem; }
.excerpt footer { color: var(--muted); font-size: .84rem; }
.src { color: var(--dim); }
.kpis { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.kpis div { padding: .65rem 1rem; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); }
.kpis strong { display: block; font: 700 1.3rem var(--fh); }
.kpis span { font-size: .78rem; color: var(--muted); }

/* lists */
.links { list-style: none; padding: 0; margin: 0; }
.links li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.links small { color: var(--dim); white-space: nowrap; }
.links.cols { columns: 2; column-gap: 2rem; }
.links.cols li { break-inside: avoid; }
.ticks { list-style: none; padding: 0; margin: 0 0 1rem; }
.ticks li { position: relative; padding: .2rem 0 .2rem 1.5rem; }
.ticks li::before { content: "✦"; position: absolute; left: 0; color: var(--violet); font-size: .8rem; top: .35rem; }
.ed-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.ed-list a { display: flex; gap: .55rem; align-items: baseline; padding: .55rem .9rem; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); color: var(--text); }
.ed-list a:hover { border-color: var(--cyan); text-decoration: none; }
.ed-list small { color: var(--dim); }
.faq details { border: 1px solid var(--line); border-radius: var(--r2); margin-bottom: .5rem; background: var(--card); }
.faq summary { cursor: pointer; padding: .8rem 1rem; font-weight: 600; }
.faq details p { padding: 0 1rem 1rem; margin: 0; color: #d0d0e0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.tiles a { padding: 1rem 1.1rem; border-radius: var(--r2); background: linear-gradient(150deg, rgba(103,232,249,.07), rgba(167,139,250,.05)); border: 1px solid var(--line); color: var(--text); }
.tiles a:hover { border-color: var(--violet); text-decoration: none; }
.tiles strong { display: block; font-family: var(--fh); }
.tiles small { color: var(--muted); }
.az { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; }
.az a { min-width: 2.6rem; text-align: center; padding: .4rem .5rem; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.az a small { display: block; font-size: .66rem; color: var(--dim); font-weight: 400; }
.az a:hover { border-color: var(--cyan); text-decoration: none; }
.bars a { display: grid; grid-template-columns: 3.5rem 1fr 3.5rem; align-items: center; gap: .7rem; padding: .22rem 0; color: var(--text); }
.bars a:hover { text-decoration: none; color: var(--cyan); }
.bar { height: 12px; width: var(--w); min-width: 3px; border-radius: 6px; background: var(--grad); }
.yn { color: var(--muted); font-size: .85rem; text-align: right; }
.gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .7rem; margin: 0; }
.gloss > div { padding: 1rem 1.1rem; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); }
.gloss dt { font-weight: 600; margin-bottom: .2rem; }
.gloss dd { margin: 0; color: #c8c8da; font-size: .92rem; }
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.cal-m { padding: 1rem 1.2rem; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.cal-m.now { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), 0 20px 60px -30px var(--violet); }
.cal-m h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.cal-m ul { list-style: none; margin: 0; padding: 0; }
.cal-m li { display: flex; justify-content: space-between; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.cal-m small { color: var(--dim); }
.alt-list { display: grid; gap: 1rem; }
.num-badge { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--grad); color: #0b0b16; font-size: .9rem; margin-right: .3rem; }
.tool-list { display: grid; gap: .6rem; margin-top: .8rem; }
.tool-list.big { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tool-list a { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r2); background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--text); }
.tool-list a:hover { border-color: var(--cyan); text-decoration: none; }
.tool-list strong { display: block; }
.tool-list small { color: var(--muted); }
.ti { flex: none; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 10px; background: var(--grad); color: #0b0b16; font-size: 1.2rem; font-weight: 700; }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; background: rgba(255,255,255,.02); position: sticky; top: 0; }
.tbl tbody tr:hover { background: rgba(255,255,255,.025); }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl.specs th { width: 34%; color: var(--muted); font-weight: 500; }
.tbl.throw td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl.cmp th[scope], .tbl.cmp tbody th { color: var(--muted); width: 18%; }
.tbl.cmp td { width: 41%; }

/* pager */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin: 2rem 0 1rem; }
.pager a, .pager span { min-width: 2.4rem; text-align: center; padding: .45rem .7rem; border-radius: var(--r2); border: 1px solid var(--line); color: var(--text); font-size: .9rem; }
.pager a:hover { border-color: var(--cyan); text-decoration: none; }
.pager [aria-current] { background: var(--grad); color: #0b0b16; border-color: transparent; font-weight: 700; }
.pager .gap { border: 0; color: var(--dim); }

/* guide prose */
.guide { padding-top: 1rem; }
.g-head { max-width: 860px; margin: 1rem 0 2rem; }
.g-grid { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 3rem; }
.toc { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: .4rem; font-size: .88rem; padding-left: 1rem; border-left: 1px solid var(--line2); }
.toc strong { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .3rem; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--text); }
.prose { font-size: 1.04rem; }
.prose h2 { margin-top: 2em; scroll-margin-top: 80px; }
.prose h3 { margin-top: 1.5em; font-size: 1.12rem; }
.prose li { margin: .3rem 0; }
.prose blockquote { margin: 1.2rem 0; padding: .9rem 1.2rem; border-left: 3px solid var(--violet); background: rgba(167,139,250,.07); border-radius: 0 var(--r2) var(--r2) 0; font-family: var(--fh); }
.prose blockquote p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .94rem; background: var(--card); border-radius: var(--r2); overflow: hidden; }
.prose th, .prose td { padding: .55rem .8rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.prose code { background: var(--card2); padding: .1rem .35rem; border-radius: 5px; }
.prose strong { color: #fff; }

/* calculators */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; }
.calc-in, .calc-out { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem 1.4rem; }
.calc-out { background: linear-gradient(160deg, rgba(103,232,249,.07), rgba(167,139,250,.06) 60%, rgba(244,114,182,.05)); border-color: var(--line2); }
.calc label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--muted); margin-bottom: .9rem; }
.calc input, .calc select { font: inherit; font-size: 1rem; color: var(--text); background: rgba(0,0,0,.35); border: 1px solid var(--line2); border-radius: 10px; padding: .6rem .75rem; width: 100%; }
.calc input:focus, .calc select:focus { outline: none; border-color: var(--cyan); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.res-big { font: 700 clamp(1.8rem, 4vw, 2.8rem) var(--fh); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.res-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.res-row span:first-child { color: var(--muted); }
.res-note { color: var(--muted); font-size: .86rem; margin-top: .8rem; }
.viz { margin: 1rem 0; height: 120px; border-radius: 10px; background: rgba(0,0,0,.3); position: relative; overflow: hidden; }

/* search */
.search-modal { position: fixed; inset: 0; z-index: 100; background: rgba(3,3,8,.72); backdrop-filter: blur(6px); display: flex; justify-content: center; padding: 10vh 1rem 1rem; }
.search-modal[hidden] { display: none; }
.search-box { width: min(720px, 100%); background: var(--bg3); border: 1px solid var(--line2); border-radius: var(--r); box-shadow: 0 30px 100px -20px rgba(0,0,0,.8); overflow: hidden; align-self: flex-start; }
.search-box input, .big-search { width: 100%; font: inherit; font-size: 1.15rem; padding: 1.1rem 1.3rem; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--text); outline: none; }
.big-search { border: 1px solid var(--line2); border-radius: var(--r); background: var(--card); margin: 1rem 0; }
.results { max-height: 60vh; overflow-y: auto; padding: .4rem; }
.results.page { max-height: none; }
.results p { padding: .6rem .9rem; margin: 0; }
.results a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .9rem; border-radius: 10px; color: var(--text); }
.results a:hover, .results a.sel { background: var(--card2); text-decoration: none; }
.results a small { color: var(--dim); white-space: nowrap; }
.results .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--violet); margin-right: .5rem; }

/* map & video */
.map { height: 70vh; min-height: 420px; border-radius: var(--r); border: 1px solid var(--line2); overflow: hidden; background: #0a0a12; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 .2rem 0 .6rem; }
.dot.f { background: var(--pink); } .dot.v { background: var(--cyan); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--bg3); color: var(--text); }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line2); margin: 1rem 0 1.4rem; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* footer */
.ftr { margin-top: 5rem; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(167,139,250,.04)); padding: 3rem 0 2rem; }
.ftr-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.ftr h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: .8rem; }
.ftr-in > div:not(.ftr-brand) { display: flex; flex-direction: column; gap: .35rem; }
.ftr-in a { color: #c9c9db; font-size: .92rem; }
.ftr-brand p { color: var(--muted); font-size: .9rem; max-width: 42ch; margin-top: .8rem; }
.ftr-note { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

/* responsive */
@media (max-width: 1080px) {
  .nav { position: fixed; inset: 64px 0 auto; flex-direction: column; background: rgba(8,8,16,.97); border-bottom: 1px solid var(--line); padding: .8rem 1.2rem 1.2rem; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: .7rem .9rem; font-size: 1rem; }
  .btn-menu { display: block; }
  .btn-search { margin-left: auto; }
}
@media (max-width: 900px) {
  .d-hero, .d-grid, .split, .calc, .g-grid { grid-template-columns: 1fr; }
  .toc { position: static; border: 0; padding: 0; }
  .ftr-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .wrap { width: min(var(--w), 100% - 1.6rem); }
  .btn-search span, .btn-search kbd { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .card-b { padding: .6rem .7rem .75rem; }
  .card h3 { font-size: .9rem; }
  .facts > div { grid-template-columns: 7.5rem 1fr; }
  .a-hero { flex-direction: column; align-items: flex-start; }
  .links.cols { columns: 1; }
  .row2 { grid-template-columns: 1fr; }
  .ftr-in { grid-template-columns: 1fr; }
  .hero-search button { padding: .7rem 1rem; }
}
