/* Neuralignition public sites (gateway + resources): same palette and type as Labs/Portfolio. Dark by default, light via theme.js. */
:root {
  color-scheme: dark;
  --bg: #000;
  --text: #fff;
  --muted: #8d8d8d;
  --line: rgba(255, 255, 255, 0.08);
  --tile: 260px;
  --focus: #fff;
  --sel-bg: #fff;
  --sel-fg: #000;
  --rule: rgba(255, 255, 255, 0.12);
  --section-title: #f4f4f4;
  --accent-glow: rgba(124, 100, 235, 0.55);
  --count-bg: rgba(255, 255, 255, 0.07);
  --count-fg: #8f8f8f;
  --cat: #8a8a8a;
  --thumb-bg: #141414;
  --thumb-ring: rgba(255, 255, 255, 0.06);
  --thumb-shadow: none;
  --thumb-shadow-hover: none;
  --thumb-inner-ring: rgba(255, 255, 255, 0.07);
  --thumb-hover-filter: brightness(1.12);
  --toggle-border: rgba(255, 255, 255, 0.16);
  --toggle-bg: rgba(255, 255, 255, 0.04);
  --toggle-bg-hover: rgba(255, 255, 255, 0.1);
  --blurb-bg: linear-gradient(to top, rgba(8, 8, 12, 0.95), rgba(8, 8, 12, 0.9) 72%, rgba(8, 8, 12, 0));
  --blurb-fg: #f2f2f5;
  --chip-bg: rgba(255, 255, 255, 0.04);
  --chip-bg-hover: rgba(255, 255, 255, 0.08);
  --chip-ring: rgba(255, 255, 255, 0.08);
  --chip-shadow: none;
  --panel-bg: rgba(255, 255, 255, 0.03);
  --panel-ring: rgba(255, 255, 255, 0.08);
  --bar: #8b74ff;
  --bar-today: #c9bcff;
  --track: rgba(255, 255, 255, 0.07);
  /* Sign in */
  --auth-glow: rgba(98, 78, 196, 0.22);
  --card-ring: linear-gradient(165deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.05) 38%, rgba(150, 120, 255, 0.45));
  --card-shadow: 0 0 90px rgba(120, 96, 230, 0.16), 0 40px 80px rgba(0, 0, 0, 0.55);
  --card-bg: linear-gradient(180deg, rgba(22, 22, 24, 0.96), rgba(8, 8, 10, 0.98));
  --label: #9a9a9a;
  --input-border: #2c2c2c;
  --input-bg: #0b0b0c;
  --input-fg: #fff;
  --btn-bg: #fff;
  --btn-fg: #000;
  --alert-bg: rgba(255, 90, 90, 0.1);
  --alert-fg: #ffb4b4;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f5;
  --text: #141418;
  --muted: #62626b;
  --line: rgba(20, 20, 30, 0.08);
  --focus: #141418;
  --sel-bg: #141418;
  --sel-fg: #fff;
  --rule: rgba(20, 20, 30, 0.13);
  --section-title: #141418;
  --accent-glow: rgba(111, 88, 224, 0.32);
  --count-bg: rgba(20, 20, 30, 0.07);
  --count-fg: #5d5d66;
  --cat: #6a6a73;
  --thumb-bg: #e4e4e8;
  --thumb-ring: rgba(20, 20, 30, 0.1);
  --thumb-shadow: 0 1px 2px rgba(20, 20, 40, 0.1), 0 8px 22px rgba(20, 20, 50, 0.12);
  --thumb-shadow-hover: 0 2px 4px rgba(20, 20, 40, 0.12), 0 14px 30px rgba(20, 20, 50, 0.18);
  --thumb-inner-ring: rgba(0, 0, 0, 0.1);
  --thumb-hover-filter: brightness(1.04);
  --toggle-border: rgba(20, 20, 30, 0.16);
  --toggle-bg: #fff;
  --toggle-bg-hover: #ececf0;
  --blurb-bg: linear-gradient(to top, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.93) 72%, rgba(255, 255, 255, 0));
  --blurb-fg: #18181c;
  --chip-bg: #fff;
  --chip-bg-hover: #fafafc;
  --chip-ring: rgba(20, 20, 30, 0.09);
  --chip-shadow: 0 1px 2px rgba(20, 20, 40, 0.06), 0 4px 12px rgba(20, 20, 50, 0.06);
  --panel-bg: #fff;
  --panel-ring: rgba(20, 20, 30, 0.08);
  --bar: #6f58e0;
  --bar-today: #4a35c4;
  --track: rgba(20, 20, 30, 0.07);
  --auth-glow: rgba(124, 100, 235, 0.16);
  --card-ring: linear-gradient(165deg, rgba(20, 20, 30, 0.14), rgba(20, 20, 30, 0.04) 38%, rgba(124, 100, 235, 0.42));
  --card-shadow: 0 0 80px rgba(124, 100, 235, 0.12), 0 30px 60px rgba(30, 24, 70, 0.14);
  --card-bg: linear-gradient(180deg, #ffffff, #fafafc);
  --label: #6a6a73;
  --input-border: #d4d4dc;
  --input-bg: #fff;
  --input-fg: #141418;
  --btn-bg: #141418;
  --btn-fg: #fff;
  --alert-bg: rgba(210, 40, 40, 0.08);
  --alert-fg: #a42323;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--toggle-border);
  border-radius: 999px;
  background: var(--toggle-bg);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--toggle-bg-hover);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.theme-toggle svg {
  display: block;
  flex: 0 0 auto;
}

/* Show the mode the button switches to. */
.theme-toggle .icon-moon,
.theme-toggle .theme-label-dark,
:root[data-theme="light"] .theme-toggle .icon-sun,
:root[data-theme="light"] .theme-toggle .theme-label-light {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

:root[data-theme="light"] .theme-toggle .theme-label-dark {
  display: inline;
}


/* ---- shared public chrome ------------------------------------------------ */
:root {
  --ns-glow: radial-gradient(1100px 520px at 50% -160px, rgba(124, 100, 235, 0.28), rgba(124, 100, 235, 0) 70%);
  --ns-card: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  --ns-card-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  --ns-ring: rgba(255, 255, 255, 0.09);
  --ns-ring-hover: rgba(160, 140, 255, 0.55);
  --ns-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --ns-cta-bg: #fff;
  --ns-cta-fg: #000;
  --ns-badge-bg: rgba(0, 0, 0, 0.62);
  --ns-badge-fg: #f2f2f5;
  --ns-input: rgba(255, 255, 255, 0.05);
  --ns-strong: #fff;
  --ns-dim: #6f6f78;
}
:root[data-theme="light"] {
  --ns-glow: radial-gradient(1100px 520px at 50% -160px, rgba(111, 88, 224, 0.16), rgba(111, 88, 224, 0) 70%);
  --ns-card: #fff;
  --ns-card-hover: #fff;
  --ns-ring: rgba(20, 20, 30, 0.08);
  --ns-ring-hover: rgba(111, 88, 224, 0.5);
  --ns-shadow: 0 1px 2px rgba(20, 20, 40, 0.06), 0 18px 40px -18px rgba(20, 20, 50, 0.22);
  --ns-cta-bg: #141418;
  --ns-cta-fg: #fff;
  --ns-badge-bg: rgba(255, 255, 255, 0.88);
  --ns-badge-fg: #141418;
  --ns-input: #fff;
  --ns-strong: #141418;
  --ns-dim: #8a8a94;
}
/* topic hues (no inline styles: CSP style-src 'self') */
.t-music { --hue: 268; } .t-ai { --hue: 200; } .t-creative { --hue: 320; } .t-security { --hue: 2; }
.t-network { --hue: 172; } .t-wellness { --hue: 140; } .t-musk { --hue: 28; } .t-productivity { --hue: 48; }
[class*="t-"] { --tint: hsl(var(--hue, 250) 80% 66%); --tint-bg: hsl(var(--hue, 250) 70% 60% / 0.14); --tint-ring: hsl(var(--hue, 250) 70% 62% / 0.38); }
:root[data-theme="light"] [class*="t-"] { --tint: hsl(var(--hue, 250) 62% 38%); --tint-bg: hsl(var(--hue, 250) 70% 50% / 0.1); --tint-ring: hsl(var(--hue, 250) 60% 45% / 0.32); }

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-padding-top: 16px; }
:root[data-theme="light"] { color-scheme: light; }
body.ns {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ns-glow), var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--sel-bg); color: var(--sel-fg); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 8px 14px; border-radius: 10px; background: var(--ns-cta-bg); color: var(--ns-cta-fg); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.ns-top {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 40px 0;
  padding-top: max(20px, env(safe-area-inset-top));
}
.ns-mark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 16px; font-weight: 700; letter-spacing: 0.01em; text-decoration: none; }
.ns-glyph { width: 22px; height: 22px; border-radius: 7px; background: conic-gradient(from 210deg, #8b74ff, #c9bcff, #5ad1ff, #8b74ff); box-shadow: 0 0 18px var(--accent-glow); }
.ns-nav { display: flex; gap: 4px; margin-left: auto; }
.ns-nav a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: color 0.15s ease, background-color 0.15s ease; }
.ns-nav a:hover { color: var(--text); background: var(--chip-bg-hover); }
.ns-nav a.is-on { color: var(--text); background: var(--chip-bg); box-shadow: inset 0 0 0 1px var(--chip-ring); }
.ns-main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 40px 48px; }
.ns-eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px;
  background: var(--chip-bg); box-shadow: inset 0 0 0 1px var(--chip-ring); color: var(--muted);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.ns-lede { margin: 14px auto 0; max-width: 620px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.ns-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px;
  width: 100%; max-width: 1440px; margin: 0 auto; padding: 18px 40px 26px;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px;
}
.ns-footlinks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ns-footlinks a { color: var(--muted); text-decoration: none; }
.ns-footlinks a:hover { color: var(--text); }
.ns-labin { display: inline-flex; align-items: center; gap: 5px; opacity: 0.8; }
.ns-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px;
  background: var(--ns-cta-bg); color: var(--ns-cta-fg); font-size: 14.5px; font-weight: 700; text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ns-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px var(--accent-glow); }
.ns-btn.is-ghost { background: var(--chip-bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--chip-ring); }
.ns-btn svg { transition: transform 0.2s ease; }
.ns-btn:hover svg { transform: translate(2px, -2px); }

/* ---- resources ----------------------------------------------------------- */
.rs-hero { max-width: 820px; margin: 0 auto; padding: 46px 0 26px; text-align: center; }
.rs-hero h1, .gw-hero h1 { margin: 0; color: var(--section-title); font-size: clamp(32px, 4vw, 52px); font-weight: 750; letter-spacing: -0.025em; line-height: 1.06; }
.rs-search { display: flex; gap: 8px; max-width: 600px; margin: 24px auto 0; }
.rs-search-box {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px;
  background: var(--ns-input); box-shadow: inset 0 0 0 1px var(--ns-ring); color: var(--muted);
}
.rs-search-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--ns-ring-hover), 0 0 40px -16px var(--accent-glow); }
.rs-search-box input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.rs-search-box input::-webkit-search-cancel-button { filter: grayscale(1); }
.rs-search button { padding: 0 18px; border: 0; border-radius: 14px; background: var(--ns-cta-bg); color: var(--ns-cta-fg); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }

.rs-filters {
  position: sticky; top: 0; z-index: 4; display: grid; gap: 8px; margin: 0 -40px; padding: 12px 40px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.rs-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.rs-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  background: var(--chip-bg); box-shadow: inset 0 0 0 1px var(--chip-ring); color: var(--muted);
  font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.rs-chip span { padding: 1px 7px; border-radius: 999px; background: var(--count-bg); color: var(--count-fg); font-size: 11px; font-weight: 700; }
.rs-chip:hover { color: var(--text); background: var(--chip-bg-hover); }
.rs-chip.is-on { color: var(--ns-cta-fg); background: var(--ns-cta-bg); box-shadow: none; }
.rs-chip.is-on span { background: rgba(127, 127, 127, 0.22); color: inherit; }
.rs-chip[class*="t-"].is-on { color: var(--text); background: var(--tint-bg); box-shadow: inset 0 0 0 1.5px var(--tint-ring); }
.rs-types .rs-chip { font-size: 12.5px; padding: 6px 11px; }

.rs-section { margin-top: 34px; }
.rs-sechead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.rs-sechead h2 { margin: 0; color: var(--section-title); font-size: 22px; font-weight: 720; letter-spacing: -0.01em; }
.rs-sechead p { margin: 0; color: var(--muted); font-size: 14px; }
.rs-rss { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.rs-featured { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.rs-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 18px;
  overflow-x: auto; padding: 2px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.rs-strip .rs-card { scroll-snap-align: start; }
.rs-strip .rs-blurb, .rs-strip .rs-related { display: none; }

.rs-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 16px;
  background: var(--ns-card); box-shadow: inset 0 0 0 1px var(--ns-ring), var(--ns-shadow); overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.rs-card:hover { transform: translateY(-2px); background: var(--ns-card-hover); box-shadow: inset 0 0 0 1px var(--ns-ring-hover), 0 0 50px -24px var(--accent-glow), var(--ns-shadow); }
.rs-card.is-featured { box-shadow: inset 0 0 0 1px var(--tint-ring), var(--ns-shadow); }
.rs-media { position: relative; aspect-ratio: 16 / 9; margin: 8px 8px 0; border-radius: 10px; overflow: hidden; background: var(--thumb-bg); box-shadow: inset 0 0 0 1px var(--thumb-inner-ring); }
.rs-poster { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.rs-poster img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease, filter 0.3s ease; }
.rs-card:hover .rs-poster img { transform: scale(1.03); filter: var(--thumb-hover-filter); }
.rs-noart {
  display: grid; place-items: center; width: 100%; height: 100%; color: var(--tint); font-size: 52px; font-weight: 800;
  background: radial-gradient(120% 120% at 20% 0%, var(--tint-bg), transparent 60%), var(--thumb-bg);
}
.rs-playbtn {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 58px; height: 58px; margin: -29px 0 0 -29px;
  border-radius: 50%; background: rgba(0, 0, 0, 0.62); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform 0.18s ease, background-color 0.18s ease;
}
.rs-playbtn svg { margin-left: 3px; }
.rs-poster:hover .rs-playbtn, .rs-poster:focus-visible .rs-playbtn { transform: scale(1.08); background: rgba(124, 100, 235, 0.92); }
.rs-frame { display: block; width: 100%; height: 100%; border: 0; }
.rs-type {
  position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; background: var(--ns-badge-bg); color: var(--ns-badge-fg);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.is-playing .rs-type { display: none; }
.rs-body { display: flex; flex: 1; flex-direction: column; padding: 13px 16px 16px; }
.rs-meta { display: flex; justify-content: space-between; gap: 10px; margin: 0; color: var(--cat); font-size: 12px; font-weight: 600; }
.rs-src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-meta time { flex: 0 0 auto; color: var(--ns-dim); font-weight: 500; }
.rs-title { margin: 6px 0 0; font-size: 16.5px; font-weight: 700; line-height: 1.32; letter-spacing: -0.005em; }
.rs-title a { text-decoration: none; }
.rs-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rs-blurb { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.rs-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }
.rs-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rs-tag { padding: 3px 9px; border-radius: 999px; background: var(--tint-bg); color: var(--tint); font-size: 11.5px; font-weight: 700; text-decoration: none; }
.rs-tag:hover { box-shadow: inset 0 0 0 1px var(--tint-ring); }
.rs-ext { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.rs-ext:hover { color: var(--text); }
.rs-related { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.rs-related span { color: var(--ns-dim); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 10.5px; }
.rs-related a { color: var(--tint); font-weight: 650; text-decoration: none; }
.rs-related a:hover { text-decoration: underline; }
.rs-count { font-variant-numeric: tabular-nums; }
.rs-empty { margin: 30px 0; color: var(--muted); text-align: center; }

.rs-topic {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 36px; margin-top: 26px; padding: 22px 24px; border-radius: 16px;
  background: radial-gradient(120% 160% at 0% 0%, var(--tint-bg), transparent 55%), var(--panel-bg); box-shadow: inset 0 0 0 1px var(--panel-ring);
}
.rs-topic h2 { margin: 2px 0 0; font-size: 26px; font-weight: 750; letter-spacing: -0.015em; }
.rs-topic p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.rs-topic-k { margin: 0 !important; color: var(--tint) !important; font-size: 11px !important; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.rs-lab { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; max-width: 640px; }
.rs-lab .rs-topic-k { flex-basis: 100%; }
.rs-labapp { display: grid; gap: 2px; min-width: 180px; padding: 10px 14px; border-radius: 12px; background: var(--chip-bg); box-shadow: inset 0 0 0 1px var(--chip-ring); text-decoration: none; }
.rs-labapp:hover { box-shadow: inset 0 0 0 1px var(--tint-ring); }
.rs-labapp b { font-size: 14px; }
.rs-labapp span { color: var(--muted); font-size: 12.5px; }
.rs-labapp em, .rs-labcard em { display: inline-flex; align-items: center; gap: 4px; color: var(--tint); font-size: 12px; font-style: normal; font-weight: 700; }
.rs-labgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.rs-labcard {
  display: grid; gap: 6px; padding: 20px 22px; border-radius: 16px; text-decoration: none;
  background: radial-gradient(120% 140% at 0% 0%, var(--tint-bg), transparent 60%), var(--ns-card); box-shadow: inset 0 0 0 1px var(--ns-ring), var(--ns-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rs-labcard:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--tint-ring), var(--ns-shadow); }
.rs-labcard b { font-size: 20px; font-weight: 750; }
.rs-labcard span:not(.rs-topic-k) { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---- gateway -------------------------------------------------------------- */
.gw-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: 40px; padding: 44px 0 30px; }
.gw-hero h1 { font-size: clamp(38px, 4.6vw, 66px); line-height: 1.02; }
.gw-hero h1 em { font-style: normal; background: linear-gradient(100deg, #b6a6ff, #8b74ff 40%, #5ad1ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .gw-hero h1 em { background: linear-gradient(100deg, #5a40d8, #6f58e0 40%, #1677b8); -webkit-background-clip: text; background-clip: text; }
.gw-hero .ns-lede { margin: 18px 0 0; max-width: 560px; }
.gw-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.gw-words { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.gw-words li { padding: 4px 11px; border-radius: 999px; background: var(--chip-bg); box-shadow: inset 0 0 0 1px var(--chip-ring); color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.gw-orb { position: relative; aspect-ratio: 1; width: min(100%, 400px); justify-self: center; }
.gw-orb::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: conic-gradient(from 210deg, #8b74ff, #c9bcff, #5ad1ff, #ff8fd0, #8b74ff); filter: blur(46px); opacity: 0.55;
  animation: gw-spin 18s linear infinite;
}
.gw-orb::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 45%), radial-gradient(circle, var(--bg) 55%, transparent 56%); box-shadow: inset 0 0 0 1px var(--ns-ring); }
.gw-orb ul { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; z-index: 1; }
.gw-orb li { position: absolute; padding: 7px 13px; border-radius: 999px; background: var(--ns-badge-bg); color: var(--ns-badge-fg); box-shadow: inset 0 0 0 1px var(--ns-ring); font-size: 12.5px; font-weight: 700; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); white-space: nowrap; }
.gw-orb li:nth-child(1) { left: 50%; top: 4%; transform: translateX(-50%); }
.gw-orb li:nth-child(2) { right: -2%; top: 32%; }
.gw-orb li:nth-child(3) { right: 6%; bottom: 12%; }
.gw-orb li:nth-child(4) { left: 4%; bottom: 12%; }
.gw-orb li:nth-child(5) { left: -2%; top: 32%; }
.gw-orb b { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; color: var(--ns-strong); font-size: 15px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
@keyframes gw-spin { to { transform: rotate(360deg); } }
.gw-pillars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.gw-pillar { padding: 16px 16px 18px; border-radius: 14px; background: var(--panel-bg); box-shadow: inset 0 0 0 1px var(--panel-ring); text-decoration: none; transition: box-shadow 0.18s ease, transform 0.18s ease; }
a.gw-pillar:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--ns-ring-hover); }
.gw-pillar b { display: block; font-size: 15px; }
.gw-pillar span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.gw-section { margin-top: 38px; }
.gw-latest { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.gw-latest .rs-blurb, .gw-latest .rs-related { display: none; }
.gw-latest .rs-title { font-size: 14.5px; }
.gw-latest .rs-body { padding: 11px 13px 13px; }
.gw-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.gw-app { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; background: var(--ns-card); box-shadow: inset 0 0 0 1px var(--ns-ring), var(--ns-shadow); text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
a.gw-app:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--ns-ring-hover), var(--ns-shadow); }
.gw-app img, .gw-app .gw-noshot { flex: 0 0 auto; width: 132px; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; background: var(--thumb-bg); box-shadow: inset 0 0 0 1px var(--thumb-inner-ring); }
.gw-noshot { display: grid; place-items: center; color: var(--muted); font-size: 26px; font-weight: 800; }
.gw-app div { min-width: 0; }
.gw-app small { display: block; color: var(--cat); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.gw-app b { display: block; margin-top: 2px; font-size: 17px; }
.gw-app span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gw-app em { display: inline-block; margin-top: 6px; color: var(--muted); font-size: 11.5px; font-style: normal; font-weight: 700; }
.gw-topics { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 1280px) {
  .gw-latest { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gw-pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .gw-hero { grid-template-columns: 1fr; gap: 10px; padding-top: 30px; text-align: left; }
  .gw-orb { width: min(62vw, 240px); margin-top: 22px; }
  .gw-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ns-top { flex-wrap: wrap; gap: 10px; padding: 14px 18px 0; padding-top: max(14px, env(safe-area-inset-top)); }
  .ns-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .ns-top .theme-toggle { margin-left: auto; }
  .ns-main { padding: 0 18px 30px; }
  .rs-hero { padding: 26px 0 18px; }
  .ns-lede { font-size: 15.5px; }
  .rs-filters { margin: 0 -18px; padding: 10px 18px; }
  .rs-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .rs-chips::-webkit-scrollbar { display: none; }
  .rs-grid, .rs-featured { grid-template-columns: 1fr; gap: 16px; }
  .rs-strip { grid-auto-columns: 78%; }
  .rs-topic { padding: 18px; }
  .gw-latest { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 12px; scroll-snap-type: x mandatory; scroll-padding: 0 18px; scrollbar-width: none; }
  .gw-latest::-webkit-scrollbar { display: none; }
  .gw-latest .rs-card { scroll-snap-align: start; }
  .gw-latest .rs-card:hover { transform: none; }
  .gw-pillars { grid-template-columns: 1fr 1fr; }
  .gw-pillar:last-child { grid-column: 1 / -1; }
  .gw-hero h1 { font-size: clamp(36px, 10.5vw, 48px); }
  .gw-app img, .gw-app .gw-noshot { width: 104px; }
  .ns-foot { padding: 16px 18px 22px; }
}
@media (max-width: 420px) {
  .rs-search button { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rs-card:hover, a.gw-app:hover, .ns-btn:hover { transform: none; }
}

.gw-center { justify-content: center; }
.gw-section-sm { margin-top: 18px; }
