/* =========================================================
   NetRoom landing — design tokens & base
   Scoped to #nr-root to avoid leaking into admin/other pages.
   ========================================================= */
#nr-root {
  --bg: #09090b;
  --bg-1: #0d0d10;
  --bg-2: #121216;
  --bg-3: #17171c;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.12);

  --fg: #f2f2f4;
  --fg-dim: #a1a1aa;
  --fg-faint: #6b6b74;
  --fg-mute: #4a4a52;

  --scrim-rgb: 255, 255, 255;
  --ink-rgb: 0, 0, 0;
  --nav-bg: rgba(9, 9, 11, 0.72);

  --a1: #b37aff;
  --a2: #ff7a59;
  --a3: #ffc266;
  --a4: #9ee7c7;
  --grad: linear-gradient(90deg, var(--a1) 0%, var(--a2) 45%, var(--a3) 72%, var(--a4) 100%);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px; --r-2xl: 32px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

#nr-root[data-theme="light"] {
  --bg: #ffffff;
  --bg-1: #fafafa;
  --bg-2: #f4f4f5;
  --bg-3: #ebebed;
  --line: rgba(0, 0, 0, 0.07);
  --line-2: rgba(0, 0, 0, 0.14);

  --fg: #09090b;
  --fg-dim: #52525b;
  --fg-faint: #86868d;
  --fg-mute: #b8b8be;

  --scrim-rgb: 0, 0, 0;
  --ink-rgb: 255, 255, 255;
  --nav-bg: rgba(255, 255, 255, 0.82);
}

html.nr-scope, html.nr-scope body { margin: 0; padding: 0; background: var(--bg, #09090b); }
#nr-root * { box-sizing: border-box; }
#nr-root a { color: inherit; text-decoration: none; }
#nr-root button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
#nr-root ::selection { background: rgba(179, 122, 255, 0.35); color: #fff; }

/* Utility */
#nr-root .container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
#nr-root .narrow    { max-width: 960px;  margin: 0 auto; padding: 0 32px; }

#nr-root .grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

#nr-root .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-dim);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(var(--scrim-rgb), 0.02);
}
#nr-root .eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--grad); }

/* Buttons */
#nr-root .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
#nr-root .btn:hover { transform: translateY(-1px); }
#nr-root .btn:active { transform: translateY(0); }
#nr-root .btn-primary {
  background: var(--grad); color: #1a0f08; font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(255, 122, 89, 0.5);
}
#nr-root .btn-primary:hover { box-shadow: 0 14px 36px -10px rgba(255, 122, 89, 0.65); }
#nr-root .btn-ghost {
  background: transparent; color: var(--fg);
  border: 1px solid var(--line-2);
}
#nr-root .btn-ghost:hover { background: rgba(var(--scrim-rgb), 0.04); border-color: rgba(var(--scrim-rgb), 0.2); }
#nr-root .btn-dark {
  background: var(--bg-2); color: var(--fg); border: 1px solid var(--line);
}
#nr-root .btn-dark:hover { background: var(--bg-3); }
#nr-root .btn-sm { padding: 8px 14px; font-size: 13px; }
#nr-root .btn-lg { padding: 16px 28px; font-size: 15px; }

#nr-root .hero-reassure { margin: 18px 0 0; font-size: 13px; color: var(--fg-faint); letter-spacing: 0.01em; text-align: center; }
#nr-root .hero-reassure-left { text-align: left; }

/* Type */
#nr-root .t-display { font-weight: 500; font-size: clamp(30px, 5.19vw, 71px); line-height: 0.98; letter-spacing: -0.035em; }
#nr-root .t-h1      { font-weight: 500; font-size: clamp(36px, 5vw, 68px); line-height: 1.02; letter-spacing: -0.028em; }
#nr-root .t-h2      { font-weight: 500; font-size: clamp(26px, 3vw, 42px); line-height: 1.1;  letter-spacing: -0.022em; }
#nr-root .t-h3      { font-weight: 500; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
#nr-root .t-lead    { font-size: 18px; line-height: 1.5; color: var(--fg-dim); }
#nr-root .t-body    { font-size: 15px; color: var(--fg-dim); }
#nr-root .t-small   { font-size: 13px; color: var(--fg-dim); }
#nr-root .t-mono    { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }

/* Nav */
#nr-root .nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
#nr-root .nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; max-width: 1400px; margin: 0 auto;
}
#nr-root .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
}
#nr-root .logo svg { flex-shrink: 0; }
#nr-root .nav-links { display: flex; align-items: center; gap: 4px; }
#nr-root .nav-link {
  padding: 8px 14px; color: var(--fg-dim); font-size: 14px;
  border-radius: 8px; transition: color .2s, background .2s;
}
#nr-root .nav-link:hover { color: var(--fg); background: rgba(var(--scrim-rgb), 0.05); }
#nr-root .nav-right { display: flex; align-items: center; gap: 12px; }
#nr-root .nav-burger { display: none; }
#nr-root .nav-sheet { display: none; }

#nr-root .lang { position: relative; }
#nr-root .lang-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  color: var(--fg-dim); font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: rgba(var(--scrim-rgb), 0.03);
  transition: color .2s, background .2s, border-color .2s;
}
#nr-root .lang-toggle:hover { color: var(--fg); border-color: var(--line-2); background: rgba(var(--scrim-rgb), 0.07); }
#nr-root .lang-toggle .lang-globe { flex-shrink: 0; opacity: 0.85; }
#nr-root .lang-toggle .lang-chev { flex-shrink: 0; opacity: 0.7; transition: transform .2s var(--ease); }
#nr-root .lang.open .lang-toggle { color: var(--fg); border-color: var(--line-2); background: rgba(var(--scrim-rgb), 0.07); }
#nr-root .lang.open .lang-toggle .lang-chev { transform: rotate(180deg); }
#nr-root .lang-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 170px;
  padding: 6px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45), 0 4px 12px -4px rgba(0, 0, 0, 0.2);
  display: flex; flex-direction: column; gap: 2px;
  z-index: 60;
}
#nr-root .lang-menu[hidden] { display: none; }
#nr-root .lang-opt {
  display: block; padding: 10px 12px;
  font-size: 14px; font-weight: 500; color: var(--fg-dim);
  border-radius: 8px;
  transition: background .15s, color .15s;
}
#nr-root .lang-opt:hover { background: rgba(var(--scrim-rgb), 0.06); color: var(--fg); }
#nr-root .lang-opt.active { background: rgba(var(--scrim-rgb), 0.08); color: var(--fg); }
#nr-root .theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  color: var(--fg-dim); border: 1px solid var(--line);
  background: rgba(var(--scrim-rgb), 0.03);
  transition: color .2s, background .2s, border-color .2s;
}
#nr-root .theme-toggle:hover { color: var(--fg); border-color: var(--line-2); background: rgba(var(--scrim-rgb), 0.07); }

/* Sections */
#nr-root section { padding: 120px 0; position: relative; }
#nr-root .section-head {
  text-align: center; margin-bottom: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
#nr-root .section-head p { max-width: 620px; margin: 0; }

/* Hero */
#nr-root .hero { padding: 140px 0 110px; position: relative; overflow: hidden; }
#nr-root .hero-inner { position: relative; z-index: 1; text-align: center; }
#nr-root .ambient { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
#nr-root .ambient .blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
#nr-root .ambient .b1 { width: 520px; height: 520px; background: #b37aff; top: -160px; left: -80px; opacity: .22; }
#nr-root .ambient .b2 { width: 600px; height: 600px; background: #ff7a59; bottom: -220px; right: -100px; opacity: .18; }
#nr-root .ambient .b3 { width: 400px; height: 400px; background: #9ee7c7; top: 40%; left: 50%; opacity: .10; transform: translateX(-50%); }

#nr-root .hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
#nr-root .hero-actions-left { justify-content: flex-start; }

/* Two-column hero with studio card on the right */
#nr-root .hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
}
#nr-root .hero-copy { text-align: left; }
#nr-root .hero-copy .eyebrow { margin-bottom: 24px; }
#nr-root .hero-h1 { text-align: left; }
#nr-root .hero h1.t-display { text-wrap: balance; }
#nr-root .hero-lead { margin: 22px 0 0; max-width: 540px; }

/* Studio card */
#nr-root .studio {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  /* overflow visible so the composer's assistant dropdown can open upward
     beyond the card; head corners are rounded explicitly to compensate. */
  overflow: visible;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
#nr-root[data-theme="light"] .studio {
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.18);
}
#nr-root .studio-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
#nr-root .studio-dots { display: inline-flex; gap: 7px; }
#nr-root .studio-dots .d {
  width: 11px; height: 11px; border-radius: 50%;
  display: inline-block;
}
#nr-root .studio-dots .d-r { background: #ff5f56; }
#nr-root .studio-dots .d-y { background: #ffbd2e; }
#nr-root .studio-dots .d-g { background: #27c93f; }
#nr-root .studio-title {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--fg-dim);
  letter-spacing: 0.02em;
}

#nr-root .studio-body { padding: 22px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
#nr-root .studio-label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-faint);
}
#nr-root .studio-label-sm { margin-top: 6px; }

#nr-root .studio-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
#nr-root .studio-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--fg-dim);
  font-size: 13px; line-height: 1; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
  white-space: nowrap;
}
#nr-root .studio-chip:hover { color: var(--fg); border-color: var(--line-2); }
#nr-root .studio-chip.active {
  background: var(--bg-3); color: var(--fg);
  border-color: var(--line-2);
}
#nr-root .studio-chip-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-3);
  flex-shrink: 0;
}
#nr-root .studio-chip-label { display: inline-block; }
/* Chips без иконки — компенсируем asymmetric padding-left */
#nr-root .studio-chip:not(:has(.studio-chip-icon)) { padding-left: 14px; }

/* Chat canvas */
#nr-root .studio-canvas {
  position: relative;
  min-height: 320px; max-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
  padding: 16px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin;
}
#nr-root .studio-canvas::-webkit-scrollbar { width: 6px; }
#nr-root .studio-canvas::-webkit-scrollbar-track { background: transparent; }
#nr-root .studio-canvas::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

#nr-root .studio-canvas-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-mute);
  pointer-events: none;
}
#nr-root .studio-canvas.has-content .studio-canvas-empty { display: none; }

/* Message bubbles */
#nr-root .studio-msg {
  display: flex; flex-direction: column;
  max-width: 80%;
  animation: nr-msg-in .25s var(--ease);
}
@keyframes nr-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
#nr-root .studio-msg.user { align-self: flex-end; align-items: flex-end; max-width: 75%; }
#nr-root .studio-msg.model { align-self: flex-start; align-items: flex-start; }

#nr-root .studio-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px; line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}
#nr-root .studio-msg.user .studio-bubble {
  background: var(--grad);
  color: #1a0f08; font-weight: 500;
  border-bottom-right-radius: 6px;
  box-shadow: 0 10px 24px -14px rgba(179, 122, 255, 0.55);
}
#nr-root[data-theme="light"] .studio-msg.user .studio-bubble { color: #1a0f08; }

#nr-root .studio-msg.model .studio-bubble {
  background: var(--bg-3);
  color: var(--fg);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
#nr-root .studio-msg.model.is-error .studio-bubble {
  color: var(--a2);
  border-color: rgba(255, 122, 89, 0.35);
  background: rgba(255, 122, 89, 0.08);
}

/* Rendered Markdown inside a model bubble */
#nr-root .studio-bubble.studio-md { white-space: normal; }
#nr-root .studio-md > :first-child { margin-top: 0; }
#nr-root .studio-md > :last-child { margin-bottom: 0; }
#nr-root .studio-md p { margin: 0 0 8px; }
#nr-root .studio-md h1,
#nr-root .studio-md h2,
#nr-root .studio-md h3,
#nr-root .studio-md h4,
#nr-root .studio-md h5,
#nr-root .studio-md h6 { margin: 14px 0 6px; font-weight: 600; line-height: 1.3; }
#nr-root .studio-md h1 { font-size: 18px; }
#nr-root .studio-md h2 { font-size: 16px; }
#nr-root .studio-md h3 { font-size: 15px; }
#nr-root .studio-md h4,
#nr-root .studio-md h5,
#nr-root .studio-md h6 { font-size: 14px; }
#nr-root .studio-md ul,
#nr-root .studio-md ol { margin: 6px 0 8px; padding-left: 20px; }
#nr-root .studio-md li { margin: 2px 0; }
#nr-root .studio-md strong { font-weight: 600; }
#nr-root .studio-md em { font-style: italic; }
#nr-root .studio-md a { color: var(--a3); text-decoration: underline; }
#nr-root .studio-md code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}
#nr-root .studio-md-pre {
  margin: 8px 0; padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
}
#nr-root .studio-md-pre code {
  background: none; border: none; padding: 0;
  font-size: 12.5px; line-height: 1.5; white-space: pre;
}
#nr-root .studio-md hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }
#nr-root .studio-md blockquote {
  margin: 8px 0; padding: 4px 12px;
  border-left: 3px solid var(--line-2);
  color: var(--fg-dim);
}

/* Composer layout (detail pages): input on top, controls row below */
#nr-root .studio-bar.studio-bar-col { flex-direction: column; align-items: stretch; gap: 10px; }
#nr-root .studio-bar-row { display: flex; align-items: center; gap: 8px; }
#nr-root .studio-bar-spacer { flex: 1 1 auto; }

/* Assistant selector pill + upward dropdown (mirrors the app composer picker) */
#nr-root .studio-cap { position: relative; display: inline-flex; }
#nr-root .studio-cap-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px 0 6px;
  border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--fg);
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; max-width: 240px;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
#nr-root .studio-cap-trigger:hover { background: var(--bg-3); border-color: var(--line-2); }
#nr-root .studio-cap-ico {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
#nr-root .studio-cap-ico img { width: 100%; height: 100%; object-fit: cover; }
#nr-root .studio-cap-ico-letters { color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
#nr-root .studio-cap-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nr-root .studio-cap-chev { color: var(--fg-faint); flex-shrink: 0; }

#nr-root .studio-cap-pop {
  display: none;
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 40;
  width: 320px; max-width: 92vw; max-height: 56vh;
  flex-direction: column;
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: studio-cap-in .14s var(--ease);
}
#nr-root .studio-cap[data-open="true"] .studio-cap-pop { display: flex; }
@keyframes studio-cap-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#nr-root .studio-cap-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--fg-faint);
}
#nr-root .studio-cap-search input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  font: inherit; font-size: 13px; color: var(--fg);
}
#nr-root .studio-cap-search input::placeholder { color: var(--fg-faint); }
#nr-root .studio-cap-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
#nr-root .studio-cap-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; background: transparent; border: 0;
  color: var(--fg); cursor: pointer; text-align: left;
  transition: background .12s var(--ease);
}
#nr-root .studio-cap-row:hover { background: var(--bg-2); }
#nr-root .studio-cap-row.is-active { background: var(--bg-3); }
#nr-root .studio-cap-row-ico {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
#nr-root .studio-cap-row-ico img { width: 100%; height: 100%; object-fit: cover; }
#nr-root .studio-cap-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#nr-root .studio-cap-row-name { font-size: 13.5px; font-weight: 600; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nr-root .studio-cap-row-desc { font-size: 12px; color: var(--fg-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nr-root .studio-cap-check { display: inline-flex; align-items: center; color: var(--a1); flex-shrink: 0; }
#nr-root .studio-cap-check[hidden] { display: none; }
@media (max-width: 640px) { #nr-root .studio-cap-pop { width: 280px; } }

/* Typing indicator inside model bubble */
#nr-root .studio-typing { display: inline-flex; gap: 4px; padding: 2px 0; }
#nr-root .studio-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-faint);
  animation: nr-typing 1s var(--ease) infinite;
}
#nr-root .studio-typing i:nth-child(2) { animation-delay: .15s; }
#nr-root .studio-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes nr-typing {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* Image inside model bubble */
#nr-root .studio-msg-image {
  display: block;
  width: 100%; max-width: 360px;
  height: auto; max-height: 360px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
#nr-root .studio-msg-actions {
  display: flex; gap: 6px; margin-top: 6px;
}
#nr-root .studio-dl {
  gap: 6px; padding: 6px 12px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--fg-dim);
  display: inline-flex; align-items: center; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
#nr-root .studio-dl:hover { color: var(--fg); border-color: var(--line-2); background: var(--bg-3); }
#nr-root .studio-dl[disabled] { opacity: .65; cursor: progress; }
#nr-root .studio-dl.is-loading svg { opacity: .5; }

/* Bottom input bar — single horizontal row */
#nr-root .studio-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
#nr-root .studio-bar:focus-within {
  border-color: var(--line-2);
  background: var(--bg-3);
}

#nr-root .studio-input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px; line-height: 1.4;
  padding: 8px 0;
}
#nr-root .studio-input::placeholder { color: var(--fg-mute); }

#nr-root .studio-bar-quota {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--fg-faint);
  display: inline-flex; align-items: baseline; gap: 1px;
  white-space: nowrap;
  padding: 0 4px;
}
#nr-root .studio-bar-quota-sep { color: var(--fg-mute); padding: 0 1px; }
#nr-root .studio-bar-quota-total { color: var(--fg-mute); }
#nr-root .studio-bar-quota.is-zero { color: var(--a2); }
#nr-root .studio-bar-quota.is-zero .studio-bar-quota-total,
#nr-root .studio-bar-quota.is-zero .studio-bar-quota-sep { color: var(--a2); }

/* Send button — round purple */
#nr-root .studio-send {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad);
  color: #1a0f08;
  cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(179, 122, 255, 0.55);
  transition: transform .15s var(--ease), opacity .15s var(--ease), box-shadow .2s var(--ease);
  flex-shrink: 0;
}
#nr-root .studio-send:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -14px rgba(179, 122, 255, 0.7); }
#nr-root .studio-send:active { transform: translateY(0); }
#nr-root .studio-send[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
#nr-root .studio-send-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.28); border-top-color: rgba(0,0,0,.78);
  display: none; animation: nr-spin .8s linear infinite;
}
#nr-root .studio-send.is-loading .studio-send-arrow { display: none; }
#nr-root .studio-send.is-loading .studio-send-spinner { display: inline-block; }
@keyframes nr-spin { to { transform: rotate(360deg); } }

/* Quota-exhausted CTA */
#nr-root .studio-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
  flex-wrap: wrap;
}
#nr-root .studio-cta-hint { font-size: 13px; color: var(--fg-dim); }
#nr-root .studio-cta[hidden] { display: none; }

/* Stats */
#nr-root .stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
#nr-root .stat-tile {
  padding: 28px 28px 26px; display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
}
#nr-root .stat-tile::before {
  content: ""; position: absolute; inset: auto -40% -60% auto;
  width: 220px; height: 220px; border-radius: 50%;
  background: var(--grad); opacity: .08; filter: blur(60px);
}
#nr-root .stat-num { font-weight: 500; font-size: 56px; line-height: 1; letter-spacing: -0.03em; }
#nr-root .stat-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-dim); margin-top: 8px;
}
#nr-root .stat-sub { font-size: 13px; color: var(--fg-faint); }

/* Cards */
#nr-root .card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
#nr-root .card:hover { border-color: var(--line-2); }

/* Feature tiles */
#nr-root .feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
#nr-root .feat-card { overflow: hidden; display: flex; flex-direction: column; color: inherit; }
#nr-root .feat-card:hover .feat-art { transform: scale(1.03); }
#nr-root .feat-art {
  position: relative; aspect-ratio: 1/1; overflow: hidden;
  transition: transform .5s var(--ease);
  background: linear-gradient(135deg, var(--a1), var(--a2));
}
#nr-root .feat-art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
#nr-root .feat-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff;
  padding: 5px 9px; background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 6px; border: 1px solid rgba(255,255,255,0.12);
}
#nr-root .feat-body { padding: 20px 22px 24px; }
#nr-root .feat-body .t-h3 { margin-bottom: 4px; }

/* Long-form copy cards — standalone /models, /pricing, /gallery pages.
   Replaces a bare h2+p stack that left large empty voids on these pages. */
#nr-root .copy-section { padding: 56px 0 104px; }
#nr-root .copy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
#nr-root .copy-card {
  padding: 34px 34px 36px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
#nr-root .copy-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
#nr-root .copy-card:hover { transform: translateY(-2px); }
#nr-root .copy-card:hover::before { transform: scaleX(1); }
#nr-root .copy-ix {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.14em; margin-bottom: 22px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
#nr-root .copy-card-h {
  font-weight: 500; font-size: 22px; line-height: 1.22; letter-spacing: -0.015em;
  margin: 0 0 12px;
}
#nr-root .copy-card-b {
  font-size: 15.5px; line-height: 1.62; color: var(--fg-dim); margin: 0;
}

/* Models catalog */
#nr-root .filter-row { display: flex; justify-content: center; gap: 6px; margin: -24px 0 40px; flex-wrap: wrap; }
#nr-root .filter-chip {
  padding: 8px 16px; border-radius: 999px; font-size: 13px;
  color: var(--fg-dim); border: 1px solid var(--line);
  background: transparent; transition: all .2s var(--ease);
}
#nr-root .filter-chip:hover { color: var(--fg); border-color: var(--line-2); }
#nr-root .filter-chip.active { color: var(--bg); background: var(--fg); border-color: var(--fg); }
#nr-root .models-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
#nr-root .model-card {
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
  position: relative; color: inherit; cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
#nr-root .model-card:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--bg-2); }
#nr-root .model-card:hover .mc-arrow { opacity: 1; transform: translate(0, 0); color: var(--fg); }
#nr-root .mc-arrow {
  position: absolute; bottom: 18px; right: 18px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(var(--scrim-rgb), 0.05);
  border: 1px solid var(--line); color: var(--fg-dim);
  opacity: 0; transform: translate(-2px, -2px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), color .25s;
}
#nr-root .mc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#nr-root .mc-cat {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-faint);
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px;
}
#nr-root .mc-name { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
#nr-root .mc-desc { font-size: 13px; color: var(--fg-dim); line-height: 1.45; flex: 1; text-wrap: pretty; }
#nr-root .mc-price {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; color: var(--fg);
  padding-top: 10px; padding-right: 38px; border-top: 1px solid var(--line);
}
#nr-root .mc-div { color: var(--fg-mute); }
#nr-root .mc-mtok { color: var(--fg-faint); margin-left: 2px; }
#nr-root .mc-free { color: #6ce3a4; font-weight: 600; }

#nr-root .model-icon {
  width: 32px; height: 32px; border-radius: 8px; object-fit: cover;
  background: rgba(var(--scrim-rgb), 0.06);
  border: 1px solid var(--line);
}
#nr-root .model-icon-fb {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  background: var(--grad); color: #1a0f08;
}

/* Price calculator */
#nr-root .calc { padding: 36px; margin-bottom: 48px; position: relative; overflow: hidden; }
#nr-root .calc::before {
  content: ""; position: absolute; inset: auto -30% -50% auto;
  width: 420px; height: 420px; border-radius: 50%;
  background: var(--grad); opacity: .06; filter: blur(80px);
}
#nr-root .calc-head { margin-bottom: 28px; }
#nr-root .calc-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; position: relative; }
#nr-root .calc-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-dim);
  display: block; margin-bottom: 14px;
}
#nr-root .model-pills { display: flex; flex-direction: column; gap: 16px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
#nr-root .mp-group .mp-cat {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-mute);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px;
}
#nr-root .mp-row { display: flex; flex-wrap: wrap; gap: 6px; }
#nr-root .mp-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(var(--scrim-rgb), 0.02);
  font-size: 12.5px; color: var(--fg-dim);
  transition: all .2s var(--ease);
}
#nr-root .mp-chip:hover { color: var(--fg); border-color: var(--line-2); }
#nr-root .mp-chip.active {
  background: rgba(var(--scrim-rgb), 0.08); color: var(--fg);
  border-color: rgba(var(--scrim-rgb), 0.24);
}
#nr-root .mp-chip img, #nr-root .mp-chip .prov-mono {
  width: 22px; height: 22px; border-radius: 6px; object-fit: cover;
  background: rgba(var(--scrim-rgb), 0.06);
}
#nr-root .mp-chip .prov-mono {
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 11px;
  background: var(--grad); color: #1a0f08;
}

#nr-root .slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 999px;
  background: linear-gradient(to right, var(--fg) 0%, var(--fg) var(--pct, 50%), rgba(var(--scrim-rgb), 0.08) var(--pct, 50%), rgba(var(--scrim-rgb), 0.08) 100%);
  outline: none; margin: 8px 0 16px;
}
#nr-root .slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; cursor: pointer; border: 3px solid var(--bg-1);
  box-shadow: 0 0 0 1px rgba(var(--scrim-rgb), 0.2);
}
#nr-root .slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; cursor: pointer; border: 3px solid var(--bg-1);
}
#nr-root .calc-volume { display: flex; justify-content: space-between; margin-bottom: 28px; gap: 10px; flex-wrap: wrap; }
#nr-root .calc-cost {
  padding: 22px; background: rgba(var(--scrim-rgb), 0.03);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
#nr-root .calc-cost-sub {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-faint);
}
#nr-root .calc-cost-big {
  font-size: 56px; font-weight: 500;
  line-height: 1; letter-spacing: -0.04em; margin: 10px 0 18px;
}
#nr-root .calc-presets { display: flex; gap: 6px; flex-wrap: wrap; }

/* Steps */
#nr-root .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }
#nr-root .step {
  padding: 24px; background: rgba(var(--scrim-rgb), 0.02);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
#nr-root .step-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--fg-faint); margin-bottom: 20px; }
#nr-root .step-t { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 6px; }
#nr-root .step-s { color: var(--fg-dim); font-size: 14px; }

/* Gallery */
#nr-root .gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px; gap: 12px; grid-auto-flow: dense;
}
#nr-root .gallery-tile {
  position: relative; border-radius: var(--r-md);
  overflow: hidden; background: #111; cursor: pointer;
  min-width: 0; min-height: 0;
}
#nr-root .gallery-tile.span-1x1 { grid-column: span 1; grid-row: span 1; }
#nr-root .gallery-tile.span-1x2 { grid-column: span 1; grid-row: span 2; }
#nr-root .gallery-tile.span-2x1 { grid-column: span 2; grid-row: span 1; }
#nr-root .gallery-tile.span-2x2 { grid-column: span 2; grid-row: span 2; }
#nr-root .gallery-tile img,
#nr-root .gallery-tile video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s var(--ease);
}
#nr-root .gallery-tile:hover img,
#nr-root .gallery-tile:hover video { transform: scale(1.04); }

/* Always-visible model badge in the corner */
#nr-root .gallery-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
  padding: 5px 9px; border-radius: 6px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  max-width: calc(100% - 20px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}

/* Teaser prompt at bottom — clamped so it never overflows the tile */
#nr-root .gallery-overlay {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  padding: 28px 14px 14px; color: #fff;
  opacity: 0; transition: opacity .3s var(--ease);
  pointer-events: none;
}
#nr-root .gallery-tile:hover .gallery-overlay { opacity: 1; }
#nr-root .gallery-prompt {
  font-size: 12px; line-height: 1.45; color: rgba(255,255,255,0.92);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}

/* Gallery modal */
#nr-root .gallery-modal[hidden] { display: none; }
#nr-root .gallery-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
#nr-root .gallery-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
#nr-root .gallery-modal-card {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr);
  gap: 0;
  width: min(1100px, 100%); max-height: 90vh;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-lg, 16px); overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
#nr-root .gallery-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(0,0,0,0.55); color: #fff; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s var(--ease);
}
#nr-root .gallery-modal-close:hover { background: rgba(0,0,0,0.8); }
#nr-root .gallery-modal-media {
  background: #000;
  display: flex; align-items: center; justify-content: center;
  min-height: 320px; max-height: 90vh;
}
#nr-root .gallery-modal-media img,
#nr-root .gallery-modal-media video {
  width: 100%; height: 100%; max-height: 90vh;
  object-fit: contain; display: block;
}
#nr-root .gallery-modal-meta {
  padding: 28px; display: flex; flex-direction: column;
  gap: 6px; overflow-y: auto;
}
#nr-root .gallery-modal-label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-faint);
  margin-bottom: 6px;
}
#nr-root .gallery-modal-model {
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--fg);
}
#nr-root .gallery-modal-prompt {
  font-size: 14px; line-height: 1.55; color: var(--fg-dim);
  white-space: pre-wrap; word-break: break-word;
  max-height: 50vh; overflow-y: auto;
  padding: 12px 14px; background: var(--bg-0);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
#nr-root .gallery-modal-copy {
  margin-top: 16px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
}
#nr-root .gallery-modal-copy.is-copied { opacity: .8; }

/* Final CTA */
#nr-root .final-box {
  text-align: center; padding: 96px 48px;
  border: 1px solid var(--line); border-radius: var(--r-2xl);
  background:
    radial-gradient(circle at 50% 0%, rgba(179,122,255,0.14), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(255,122,89,0.10), transparent 60%),
    var(--bg-1);
  position: relative; overflow: hidden;
}

/* Footer */
#nr-root .foot {
  padding: 72px 0 48px; border-top: 1px solid var(--line);
  color: var(--fg-faint); font-size: 13px;
}
#nr-root .foot-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px; }
#nr-root .foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
#nr-root .foot-col h5 { color: var(--fg); font-size: 13px; font-weight: 500; margin: 0 0 14px; }
#nr-root .foot-col a { display: block; color: var(--fg-faint); margin-bottom: 8px; transition: color .2s; }
#nr-root .foot-col a:hover { color: var(--fg); }

/* Scrollbar */
#nr-root ::-webkit-scrollbar { width: 10px; height: 10px; }
#nr-root ::-webkit-scrollbar-track { background: transparent; }
#nr-root ::-webkit-scrollbar-thumb { background: rgba(var(--scrim-rgb), 0.1); border-radius: 10px; }
#nr-root ::-webkit-scrollbar-thumb:hover { background: rgba(var(--scrim-rgb), 0.2); }

/* Model detail page styles are now in model-page.css (scoped to #nr-root) */

@keyframes nr-sheet-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 1040px) {
  #nr-root .stat-grid,
  #nr-root .feat-grid,
  #nr-root .models-grid { grid-template-columns: repeat(2, 1fr); }
  #nr-root .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  #nr-root .calc-grid { grid-template-columns: 1fr; gap: 28px; }
  #nr-root .steps-grid { grid-template-columns: 1fr; }
  #nr-root .nav-links { display: none; }
  #nr-root .lang-menu { left: auto; right: 0; }
  #nr-root .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  #nr-root .hero-actions-left { justify-content: flex-start; }
}
@media (max-width: 640px) {
  #nr-root { font-size: 16px; }
  #nr-root section { padding: 64px 0; }
  #nr-root .section-head { margin-bottom: 36px; gap: 14px; }
  #nr-root .container { padding: 0 20px; }
  #nr-root .narrow { padding: 0 20px; }
  #nr-root .copy-section { padding: 32px 0 64px; }
  #nr-root .copy-grid { grid-template-columns: 1fr; }
  #nr-root .copy-card { padding: 26px 24px 28px; }
  #nr-root .mc-desc, #nr-root .t-small { font-size: 14px; }
  #nr-root .studio-input { font-size: 16px; }
  #nr-root .nav-inner { padding: 14px 20px; gap: 10px; }
  #nr-root .logo span { display: none; }

  /* Mobile nav: collapse the desktop cluster to one CTA + a hamburger sheet. */
  #nr-root .nav-right { gap: 8px; }
  #nr-root .nav-right .theme-toggle,
  #nr-root .nav-right .lang,
  #nr-root .nav-right .nav-signin { display: none; }
  #nr-root .nav-right .btn-primary { padding: 8px 14px; }
  #nr-root .nav-right .btn-primary svg { display: none; }

  #nr-root .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 11px; border-radius: 12px;
    border: 1px solid var(--line); background: rgba(var(--scrim-rgb), 0.03);
  }
  #nr-root .nav-burger-bar {
    height: 2px; width: 100%; border-radius: 2px; background: var(--fg-dim);
    transition: transform .25s var(--ease), opacity .2s var(--ease);
  }
  #nr-root .nav-burger[aria-expanded="true"] .nav-burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #nr-root .nav-burger[aria-expanded="true"] .nav-burger-bar:nth-child(2) { opacity: 0; }
  #nr-root .nav-burger[aria-expanded="true"] .nav-burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  #nr-root .nav-sheet {
    display: block;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 49;
    padding: 14px 20px 20px;
    background: var(--bg-1);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(0,0,0,0.5);
    animation: nr-sheet-in .2s var(--ease);
  }
  #nr-root .nav-sheet[hidden] { display: none; }

  #nr-root .nav-sheet-util {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
  }
  #nr-root .nav-sheet-util .theme-toggle { width: 44px; height: 44px; }
  #nr-root .nav-sheet-lang { display: inline-flex; gap: 4px; }
  #nr-root .nav-sheet-lang-opt {
    min-width: 48px; height: 44px; padding: 0 16px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; border: 1px solid var(--line);
    font-size: 14px; font-weight: 500; color: var(--fg-dim);
    background: rgba(var(--scrim-rgb), 0.03);
  }
  #nr-root .nav-sheet-lang-opt.active { color: var(--fg); border-color: var(--line-2); background: rgba(var(--scrim-rgb), 0.08); }

  #nr-root .nav-sheet-links { display: flex; flex-direction: column; }
  #nr-root .nav-sheet-link {
    display: flex; align-items: center; min-height: 48px;
    padding: 0 4px; font-size: 16px; font-weight: 500; color: var(--fg);
    border-bottom: 1px solid var(--line);
  }
  #nr-root .nav-sheet-link:last-child { border-bottom: 0; }
  #nr-root .nav-sheet-link:active { color: var(--fg-dim); }

  #nr-root .nav-sheet-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
  #nr-root .nav-sheet-cta .btn { width: 100%; justify-content: center; padding: 14px 20px; font-size: 15px; }
  #nr-root .calc { padding: 22px; }
  #nr-root .calc-cost-big { font-size: 44px; }
  #nr-root .final-box { padding: 56px 24px; }
  #nr-root .stat-num { font-size: 40px; }
  #nr-root .stat-grid,
  #nr-root .feat-grid,
  #nr-root .models-grid { grid-template-columns: 1fr; }
  #nr-root .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  #nr-root .gallery-tile.span-2x2 { grid-column: span 2; grid-row: span 2; }
  #nr-root .gallery-tile.span-2x1 { grid-column: span 2; grid-row: span 1; }
  #nr-root .gallery-tile.span-1x2 { grid-column: span 1; grid-row: span 2; }
  #nr-root .gallery-modal-card { grid-template-columns: 1fr; max-height: 94vh; }
  #nr-root .gallery-modal-media { max-height: 50vh; min-height: 220px; }
  #nr-root .gallery-modal-meta { padding: 20px; }
  #nr-root .foot-cols { gap: 32px; }
  #nr-root .hero { padding: 80px 0 60px; }
  #nr-root .studio-body { padding: 18px 16px; gap: 10px; }
  #nr-root .studio-canvas { min-height: 240px; max-height: 320px; }
  #nr-root .studio-msg, #nr-root .studio-msg.user { max-width: 88%; }

  #nr-root .hero-actions,
  #nr-root .hero-actions-left { flex-direction: column; align-items: stretch; gap: 10px; }
  #nr-root .hero-actions .btn { width: 100%; justify-content: center; }
  /* Activation-first: show the interactive demo above the pitch on phones. */
  #nr-root .hero-grid .studio { order: -1; }

  #nr-root .gallery-modal-close { width: 44px; height: 44px; }

  #nr-root .studio-bar { padding: 5px 5px 5px 12px; gap: 6px; }
  #nr-root .studio-bar-quota { font-size: 11px; }
  #nr-root .studio-send { width: 36px; height: 36px; }
}


/* =============================================================
 * BLOG — использует глобальные netroom-переменные, поэтому
 * реагирует на theme-toggle вместе с остальным сайтом.
 * ============================================================= */

#nr-root .blog-hero { padding: 96px 0 64px; }
#nr-root .blog-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(var(--scrim-rgb), 0.04);
  color: var(--fg-dim);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
#nr-root .blog-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.14);
}
#nr-root .blog-h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 24px 0 24px;
  color: var(--fg);
}
#nr-root .blog-h1-grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
#nr-root .blog-lead {
  max-width: 580px; margin: 0;
  font-size: 17px; line-height: 1.6; color: var(--fg-dim);
}

#nr-root .blog-tabs {
  display: inline-flex; gap: 4px; margin-top: 32px;
  padding: 4px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(var(--scrim-rgb), 0.04);
}
#nr-root .blog-tab {
  padding: 8px 18px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim); text-decoration: none;
  transition: all 160ms var(--ease);
}
#nr-root .blog-tab:hover { color: var(--fg); }
#nr-root .blog-tab.is-active {
  color: var(--bg); background: var(--fg);
}

#nr-root .blog-section { padding-bottom: 120px; }
#nr-root .blog-section-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1; letter-spacing: -0.01em;
  color: var(--fg); margin: 0 0 24px;
}

#nr-root .blog-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 32px;
}
#nr-root .blog-filter {
  padding: 8px 14px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  border: 1px solid var(--line-2);
  background: rgba(var(--scrim-rgb), 0.02);
  text-decoration: none;
  transition: all 160ms var(--ease);
}
#nr-root .blog-filter:hover { color: var(--fg); background: rgba(var(--scrim-rgb), 0.06); }
#nr-root .blog-filter.is-active {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}

#nr-root .blog-grid {
  display: grid; gap: 24px;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
}

#nr-root .blog-col { display: flex; flex-direction: column; gap: 20px; }

#nr-root .blog-card {
  display: block;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
#nr-root .blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  box-shadow: 0 18px 40px -20px rgba(var(--ink-rgb), 0.35);
}
#nr-root .blog-card--featured { display: flex; flex-direction: column; }
#nr-root .blog-card--row {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0;
}

#nr-root .blog-cover {
  position: relative;
  background: linear-gradient(135deg, var(--c-from, #b37aff) 0%, var(--c-to, #ff7a59) 100%);
  overflow: hidden;
}
#nr-root .blog-card--featured .blog-cover { aspect-ratio: 16 / 11; }
#nr-root .blog-card--row .blog-cover { min-height: 220px; height: 100%; }
#nr-root .blog-cover::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 35% 40%, rgba(255,255,255,0.32), transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(255,255,255,0.16), transparent 60%);
  pointer-events: none;
}
#nr-root .blog-cover--img { background: var(--bg-3); }
#nr-root .blog-cover--img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

#nr-root .blog-chip {
  position: absolute; top: 14px; left: 14px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(9, 9, 11, 0.82);
  color: #f5efe6;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  backdrop-filter: blur(8px);
}
#nr-root .blog-chip--static { position: static; display: inline-block; margin-right: 8px; }

#nr-root .blog-card--featured .blog-card__body { padding: 28px 32px 32px; }
#nr-root .blog-card--row .blog-card__body {
  padding: 22px 24px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
}

#nr-root .blog-meta {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-faint);
}
#nr-root .blog-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }

#nr-root .blog-card__title {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(26px, 2.8vw, 32px);
  line-height: 1.12; letter-spacing: -0.01em;
  color: var(--fg); margin: 16px 0 16px;
}
#nr-root .blog-card__title--sm { font-size: 20px; line-height: 1.15; }
#nr-root .blog-card__excerpt { margin: 0 0 24px; color: var(--fg-dim); font-size: 15px; line-height: 1.55; }
#nr-root .blog-card__excerpt--sm { font-size: 13px; margin: 0; }

#nr-root .blog-author { display: flex; align-items: center; gap: 12px; }
#nr-root .blog-author__avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--a-from, #ff7a59), var(--a-to, #b37aff));
  color: #fff; font-family: var(--font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; justify-content: center;
}
#nr-root .blog-card--row .blog-author__avatar { width: 30px; height: 30px; font-size: 9px; }
#nr-root .blog-author__name { font-size: 13px; font-weight: 500; color: var(--fg); }
#nr-root .blog-author__role {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-faint); margin-top: 2px;
}
#nr-root .blog-author--byline { margin: 28px 0 32px; }

#nr-root .blog-empty {
  padding: 80px 24px; text-align: center; color: var(--fg-faint);
  border: 1px dashed var(--line-2); border-radius: var(--r-xl);
  font-size: 12px;
}

/* Article */
#nr-root .blog-article { max-width: 760px; margin: 0 auto; padding: 40px 0 60px; }
#nr-root .blog-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-faint); text-decoration: none;
}
#nr-root .blog-back:hover { color: var(--fg); }
#nr-root .blog-article__title {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05; letter-spacing: -0.02em;
  color: var(--fg); margin: 14px 0 18px;
}
#nr-root .blog-article__lead { font-size: 18px; line-height: 1.6; color: var(--fg-dim); max-width: 620px; }
#nr-root .blog-article__cover {
  position: relative; aspect-ratio: 16 / 8; overflow: hidden;
  border-radius: var(--r-xl); margin: 28px 0 32px;
  background: linear-gradient(135deg, var(--c-from, #b37aff), var(--c-to, #ff7a59));
}
#nr-root .blog-article__cover::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.32), transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(255,255,255,0.16), transparent 60%);
}
#nr-root .blog-article__cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

#nr-root .blog-body { font-size: 17px; line-height: 1.7; color: var(--fg-dim); }
#nr-root .blog-body p { margin: 0 0 1.1em; }
#nr-root .blog-body h2 {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: 32px; line-height: 1.15; letter-spacing: -0.01em;
  color: var(--fg); margin: 2em 0 0.6em;
}
#nr-root .blog-body h3 {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: 24px; color: var(--fg); margin: 1.6em 0 0.5em;
}
#nr-root .blog-body a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
#nr-root .blog-body ul, #nr-root .blog-body ol { padding-left: 1.2em; margin: 0 0 1.1em; }
#nr-root .blog-body li { margin-bottom: 0.4em; }
#nr-root .blog-body blockquote {
  border-left: 2px solid var(--fg); padding-left: 20px; margin: 1.6em 0;
  font-family: "Instrument Serif", Georgia, serif; font-size: 22px;
  line-height: 1.45; color: var(--fg);
}
#nr-root .blog-body code, #nr-root .blog-body pre {
  font-family: var(--font-mono); font-size: 14px;
  background: var(--bg-2); border-radius: 8px;
}
#nr-root .blog-body code { padding: 2px 6px; }
#nr-root .blog-body pre { padding: 16px 20px; overflow-x: auto; border: 1px solid var(--line); }

/* "Recent changes" — встраиваемый блок на /models/<key>/ */
#nr-root .mpage-recent-list {
  list-style: none; padding: 0; margin: 0 0 24px;
  border-top: 1px solid var(--line);
}
#nr-root .mpage-recent-item {
  display: grid; grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
#nr-root .mpage-recent-date {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-faint);
}
#nr-root .mpage-recent-summary {
  font-size: 14px; color: var(--fg); line-height: 1.5;
}
#nr-root .mpage-recent-summary a {
  color: var(--fg); text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}
#nr-root .mpage-recent-summary a:hover { border-color: var(--fg); }
#nr-root .mpage-recent-more {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg); text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}
#nr-root .mpage-recent-more:hover { border-color: var(--fg); }
@media (max-width: 720px) {
  #nr-root .mpage-recent-item { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
}

/* ──────────────────────────────────────────────────────────────
 * Changelog (`/blog/changelog/`) — timeline-spine layout
 * ────────────────────────────────────────────────────────────── */

/* Hero: дашборд-панель с агрегатами вместо стандартного blog-hero */
#nr-root .chlog-hero { padding: 96px 0 48px; }
#nr-root .chlog-hero__row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px; align-items: end; margin-top: 24px;
}
#nr-root .chlog-hero__title {
  margin: 0; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-sans); font-weight: 500;
  letter-spacing: -0.025em; line-height: 1;
}
#nr-root .chlog-hero__num {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(72px, 12vw, 160px); line-height: 0.9;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#nr-root .chlog-hero__lbl {
  font-size: clamp(14px, 1.4vw, 18px); color: var(--fg-dim);
  text-transform: lowercase; letter-spacing: 0; max-width: 220px;
}
#nr-root .chlog-hero__sub {
  margin: 0; max-width: 420px; color: var(--fg-dim);
  display: flex; flex-direction: column; gap: 12px;
}
#nr-root .chlog-hero__sub-line {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; color: var(--fg);
  letter-spacing: -0.01em;
}
#nr-root .chlog-hero__sub-line em { font-style: italic; color: var(--fg-dim); }
#nr-root .chlog-hero__sub-tail { font-size: 15px; line-height: 1.55; }

#nr-root .chlog-aggregates {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
#nr-root .chlog-agg {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(var(--scrim-rgb), 0.04);
}
#nr-root .chlog-agg__num {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 13px; color: var(--fg);
}
#nr-root .chlog-agg__lbl {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; color: var(--fg-dim);
  text-transform: lowercase;
}
#nr-root .chlog-agg--text    .chlog-agg__num { color: #C5A8FF; }
#nr-root .chlog-agg--image   .chlog-agg__num { color: #FF9B6A; }
#nr-root .chlog-agg--video   .chlog-agg__num { color: #7DDE92; }
#nr-root .chlog-agg--sound   .chlog-agg__num { color: #FDB39A; }
#nr-root .chlog-agg--assistant .chlog-agg__num { color: #9BD0FF; }

/* Timeline-spine */
#nr-root .chlog-section { padding-bottom: 120px; }
#nr-root .chlog-spine { position: relative; padding-left: 0; }
#nr-root .chlog-month-block { position: relative; padding: 32px 0 0; }
#nr-root .chlog-month-block + .chlog-month-block { margin-top: 16px; }
#nr-root .chlog-month-head {
  position: sticky; top: 16px; z-index: 2;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
  padding: 16px 0; margin-bottom: 8px;
}
#nr-root .chlog-month-anchor {
  display: inline-block; text-decoration: none; color: inherit;
}
#nr-root .chlog-month-title {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.01em;
  margin: 0; color: var(--fg);
}
#nr-root .chlog-month-anchor:hover .chlog-month-title { color: var(--fg-dim); }

#nr-root .chlog-entries {
  list-style: none; padding: 0; margin: 0;
  position: relative;
}
#nr-root .chlog-entries::before {
  content: ""; position: absolute;
  left: 11px; top: 12px; bottom: 12px;
  width: 1px; background: var(--line);
}

#nr-root .chlog-entry {
  position: relative;
  padding: 12px 0 12px 44px;
  --chip: #C5A8FF;
}
#nr-root .chlog-dot {
  position: absolute; left: 4px; top: 26px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--chip);
}
#nr-root .chlog-entry[data-catalog="text"]      { --chip: #C5A8FF; }
#nr-root .chlog-entry[data-catalog="runware"]   { --chip: #FF9B6A; }
#nr-root .chlog-entry[data-catalog="assistant"] { --chip: #9BD0FF; }
#nr-root .chlog-entry[data-catalog="other"]     { --chip: #9BA3AF; }

#nr-root .chlog-card {
  display: block; padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(var(--scrim-rgb), 0.02);
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
#nr-root .chlog-card:hover {
  border-color: var(--line-2);
  background: rgba(var(--scrim-rgb), 0.05);
}
#nr-root .chlog-card--fresh {
  box-shadow: inset 3px 0 0 var(--chip);
}

#nr-root .chlog-card__head {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 12px;
}
#nr-root .chlog-card__date {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-faint);
}
#nr-root .chlog-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600;
}
#nr-root .chlog-badge--new {
  color: #fff; background: var(--grad);
}
#nr-root .chlog-badge--added   { color: #7DDE92; border: 1px solid rgba(125, 222, 146, 0.3); }
#nr-root .chlog-badge--updated { color: #FFD27A; border: 1px solid rgba(255, 210, 122, 0.3); }
#nr-root .chlog-badge--removed { color: #9BA3AF; border: 1px solid var(--line-2); }

#nr-root .chlog-chip {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--chip);
  border: 1px solid var(--line-2);
  background: rgba(var(--scrim-rgb), 0.04);
}
#nr-root .chlog-chip::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--chip);
}

#nr-root .chlog-card__body {
  display: flex; gap: 14px; align-items: flex-start;
}
#nr-root .chlog-card__icon {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 8px;
  object-fit: cover;
  background: rgba(var(--scrim-rgb), 0.06);
}
#nr-root .chlog-card__icon--ph {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--fg-dim);
  border: 1px solid var(--line-2);
}
#nr-root .chlog-card__text { flex: 1 1 auto; min-width: 0; }
#nr-root .chlog-card__name {
  font-family: var(--font-sans); font-weight: 500;
  font-size: 16px; line-height: 1.35; color: var(--fg);
  margin: 0 0 4px;
}
#nr-root .chlog-card__vendor {
  color: var(--fg-faint); font-weight: 400;
}
#nr-root .chlog-card__summary {
  font-size: 14px; line-height: 1.5; color: var(--fg-dim);
  margin: 0;
}

#nr-root .chlog-card__foot {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--line);
}
#nr-root .chlog-card__foot:empty { display: none; }
#nr-root .chlog-card__foot:has(:nth-child(1):last-child) { padding-top: 12px; }
#nr-root .chlog-card__link {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg); text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px; transition: border-color 160ms var(--ease);
}
#nr-root .chlog-card__link:hover { border-color: var(--fg); }
#nr-root .chlog-card__link--ghost { color: var(--fg-dim); }

/* Empty state */
#nr-root .chlog-empty {
  padding: 40px 0 0; max-width: 520px;
}
#nr-root .chlog-empty__title {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic;
  font-weight: 400; font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.1; color: var(--fg); margin: 0 0 8px;
}
#nr-root .chlog-empty__sub {
  font-size: 15px; line-height: 1.6; color: var(--fg-dim); margin: 0;
}
#nr-root .chlog-skel {
  display: flex; flex-direction: column; gap: 12px; margin-top: 32px;
}
#nr-root .chlog-skel__row {
  display: flex; gap: 12px; padding: 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(var(--scrim-rgb), 0.02);
}
#nr-root .chlog-skel__row span {
  height: 12px; border-radius: 4px;
  background: linear-gradient(90deg,
    rgba(var(--scrim-rgb), 0.04),
    rgba(var(--scrim-rgb), 0.10),
    rgba(var(--scrim-rgb), 0.04));
  background-size: 200% 100%;
  animation: chlog-shimmer 1.6s ease-in-out infinite;
}
#nr-root .chlog-skel__row span:nth-child(1) { width: 80px; }
#nr-root .chlog-skel__row span:nth-child(2) { flex: 1; }
#nr-root .chlog-skel__row span:nth-child(3) { width: 60px; }
@keyframes chlog-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 1040px) {
  #nr-root .blog-grid { grid-template-columns: 1fr; }
  #nr-root .chlog-hero__row { grid-template-columns: 1fr; gap: 24px; align-items: start; }
}
@media (max-width: 720px) {
  #nr-root .blog-hero { padding: 56px 0 40px; }
  #nr-root .chlog-hero { padding: 56px 0 32px; }
  #nr-root .blog-card--row { grid-template-columns: 1fr; }
  #nr-root .blog-card--row .blog-cover { aspect-ratio: 16 / 10; min-height: 0; }
  #nr-root .blog-card--featured .blog-card__body,
  #nr-root .blog-card--row .blog-card__body { padding: 20px; }
  #nr-root .chlog-month-head { position: static; }
  #nr-root .chlog-card__head .chlog-chip { margin-left: 0; }
}


/* =========================================================
   /assistants/ — index page (catalog of pre-built assistants).
   Scoped to #nr-root. Reuses tokens; new classes use nr-asst- prefix.
   ========================================================= */

/* Breadcrumbs — semantic <nav><ol><li>, separators via CSS (W3C APG pattern).
   Used on index + detail pages; keep generic. */
#nr-root .crumbs {
  color: var(--fg-faint); font-size: 12px;
  margin-bottom: 28px;
}
#nr-root .crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
#nr-root .crumbs li { display: inline-flex; align-items: center; gap: 8px; }
#nr-root .crumbs li + li::before { content: "/"; color: var(--fg-faint); }
#nr-root .crumbs a { color: var(--fg-dim); transition: color .15s var(--ease); }
#nr-root .crumbs a:hover { color: var(--fg); }
#nr-root .crumbs [aria-current="page"] { color: var(--fg); }

/* ── Hero ── */
#nr-root .nr-asst-hero {
  padding: 120px 0 80px;
  position: relative; overflow: hidden;
}
#nr-root .nr-asst-hero-inner {
  position: relative; z-index: 1;
  max-width: 820px;
  display: flex; flex-direction: column; gap: 22px;
}
#nr-root .nr-asst-hero-inner .eyebrow { align-self: flex-start; }
#nr-root .nr-asst-hero-h1 { margin: 6px 0 0; }
#nr-root .nr-asst-hero-lead { max-width: 660px; margin: 0; }
#nr-root .nr-asst-hero-cta {
  display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap;
}
#nr-root .nr-asst-hero-note {
  color: var(--fg-faint); font-size: 12px; letter-spacing: 0.04em;
}

/* ── Section spacing — slightly tighter than the landing hero spacing ── */
#nr-root .nr-asst-featured-sec,
#nr-root .nr-asst-grid-sec,
#nr-root .nr-asst-why,
#nr-root .nr-asst-pricing,
#nr-root .nr-asst-trust,
#nr-root .nr-asst-faq,
#nr-root .nr-asst-long { padding: 96px 0; }

/* ── Cards (shared between featured + grid) ── */
#nr-root .nr-asst-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: var(--r-lg);
  color: inherit;
  cursor: pointer;
  position: relative;
  transition: transform .2s var(--ease),
              border-color .2s var(--ease),
              background .2s var(--ease),
              box-shadow .2s var(--ease);
}
#nr-root .nr-asst-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--bg-2);
  box-shadow: 0 16px 36px -20px rgba(0, 0, 0, 0.5);
}
#nr-root .nr-asst-card:hover .nr-asst-card-cta {
  color: var(--fg);
  border-color: var(--line-2);
  background: var(--bg-3);
}
#nr-root .nr-asst-card:hover .nr-asst-card-arrow {
  color: var(--fg);
  transform: translate(2px, -2px);
}
#nr-root .nr-asst-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--a1);
}

#nr-root .nr-asst-card-head {
  display: flex; align-items: center; gap: 12px;
}
#nr-root .nr-asst-card-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  object-fit: cover;
  background: var(--bg-2);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
#nr-root .nr-asst-card-icon-fb {
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 18px;
  background: var(--grad); color: #1a0f08;
}
/* Type accent — 2px coloured edge inside the icon frame. Maps to brand stops:
   text=purple, image=yellow, video=orange. Mint is reserved for "new" badges. */
#nr-root .nr-asst-card [data-nr-type-label="text"]  ~ * .nr-asst-card-icon,
#nr-root .nr-asst-card-head .nr-asst-card-icon { box-shadow: inset 2px 0 0 var(--line-2); }
#nr-root .nr-asst-card[data-nr-type="text"]  .nr-asst-card-icon { box-shadow: inset 2px 0 0 var(--a1); }
#nr-root .nr-asst-card[data-nr-type="image"] .nr-asst-card-icon { box-shadow: inset 2px 0 0 var(--a3); }
#nr-root .nr-asst-card[data-nr-type="video"] .nr-asst-card-icon { box-shadow: inset 2px 0 0 var(--a2); }

#nr-root .nr-asst-card-meta {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1;
}
#nr-root .nr-asst-card-type {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-dim);
}
#nr-root .nr-asst-card[data-nr-type="text"]  .nr-asst-card-type { color: var(--a1); }
#nr-root .nr-asst-card[data-nr-type="image"] .nr-asst-card-type { color: var(--a3); }
#nr-root .nr-asst-card[data-nr-type="video"] .nr-asst-card-type { color: var(--a2); }
#nr-root .nr-asst-card-engine {
  font-size: 11px; color: var(--fg-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#nr-root .nr-asst-card-cta {
  padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-dim);
  background: rgba(var(--scrim-rgb), 0.02);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
  flex-shrink: 0;
}

#nr-root .nr-asst-card-name {
  font-size: 18px; font-weight: 500; letter-spacing: -0.012em;
  margin: 0;
}
#nr-root .nr-asst-card-desc {
  color: var(--fg-dim); font-size: 13.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
#nr-root .nr-asst-card-preview {
  font-size: 11.5px; line-height: 1.5; color: var(--fg-faint);
  background: rgba(var(--scrim-rgb), 0.03);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
#nr-root .nr-asst-card-preview-arrow { color: var(--a1); margin-right: 6px; }
#nr-root .nr-asst-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--line);
}
#nr-root .nr-asst-card-runs { font-size: 11px; color: var(--fg-faint); }
#nr-root .nr-asst-card-arrow {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(var(--scrim-rgb), 0.02);
  color: var(--fg-dim);
  transition: color .2s var(--ease), transform .2s var(--ease);
}

/* Featured grid (3 columns desktop) with hero-card variant */
#nr-root .nr-asst-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
#nr-root .nr-asst-card-hero {
  background:
    linear-gradient(var(--bg-1), var(--bg-1)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  padding: 24px;
  min-height: 260px;
}
#nr-root .nr-asst-card-hero:hover {
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    var(--grad) border-box;
}
#nr-root[data-theme="light"] .nr-asst-card-hero {
  background:
    linear-gradient(var(--bg-1), var(--bg-1)) padding-box,
    var(--grad) border-box;
}

/* ── Filter strip ── */
#nr-root .nr-asst-filter {
  position: sticky; top: 0; z-index: 30;
  margin: 0 -16px 24px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 16px;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
#nr-root .nr-asst-grid-sec { padding-top: 64px; }
#nr-root .nr-asst-filter::after {
  content: ""; position: absolute; inset: auto 0 -1px 0;
  height: 1px; background: var(--line); opacity: 0;
  transition: opacity .2s var(--ease);
}

#nr-root .nr-asst-chips {
  display: flex; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-right: 4px;
}
#nr-root .nr-asst-chips::-webkit-scrollbar { display: none; }
#nr-root .nr-asst-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--fg-dim);
  font-size: 13px; line-height: 1;
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background .2s var(--ease);
  white-space: nowrap; cursor: pointer;
}
#nr-root .nr-asst-chip:hover { color: var(--fg); border-color: var(--line-2); }
#nr-root .nr-asst-chip.is-active {
  color: var(--fg);
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
}
#nr-root .nr-asst-chip-label { font-weight: 500; }
#nr-root .nr-asst-chip-count {
  color: var(--fg-faint); font-size: 11px;
  padding-left: 8px;
  border-left: 1px solid var(--line-2);
}
#nr-root .nr-asst-chip.is-active .nr-asst-chip-count { color: var(--fg-dim); }
#nr-root .nr-asst-chip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block;
}
#nr-root .nr-asst-chip-dot[data-nr-type-dot="text"]  { background: var(--a1); }
#nr-root .nr-asst-chip-dot[data-nr-type-dot="image"] { background: var(--a3); }
#nr-root .nr-asst-chip-dot[data-nr-type-dot="video"] { background: var(--a2); }

#nr-root .nr-asst-search {
  flex: 1 1 280px; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: 999px;
  color: var(--fg-dim);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
#nr-root .nr-asst-search:focus-within {
  border-color: var(--line-2); background: var(--bg-2);
}
#nr-root .nr-asst-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  color: var(--fg); font-family: var(--font-sans); font-size: 13.5px;
}
#nr-root .nr-asst-search input::placeholder { color: var(--fg-faint); }
#nr-root .nr-asst-search input::-webkit-search-cancel-button { display: none; }

#nr-root .nr-asst-meta-row {
  color: var(--fg-faint); font-size: 11px; letter-spacing: 0.06em;
  margin: 0 0 24px;
}

/* Grid — override .models-grid gap for richer cards */
#nr-root .nr-asst-grid { gap: 14px; }

/* Empty state */
#nr-root .nr-asst-empty {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 80px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--r-xl);
  text-align: center;
}
#nr-root .nr-asst-empty-title { margin: 0; }

/* ── Why pre-built ── */
#nr-root .nr-asst-why-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
}
#nr-root .nr-asst-why-col {
  background: var(--bg-1);
  padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
}
#nr-root .nr-asst-why-col.is-pro {
  background:
    linear-gradient(180deg, rgba(179, 122, 255, 0.05), transparent 40%),
    var(--bg-1);
}
#nr-root .nr-asst-why-lbl {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint);
}
#nr-root .nr-asst-why-col.is-pro .nr-asst-why-lbl {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
#nr-root .nr-asst-why-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
#nr-root .nr-asst-why-list li {
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--fg-dim); font-size: 14px; line-height: 1.55;
}
#nr-root .nr-asst-why-icon { flex-shrink: 0; margin-top: 2px; }
#nr-root .nr-asst-why-icon-no  { color: var(--fg-faint); }
#nr-root .nr-asst-why-icon-yes { color: var(--a4); }

/* ── Pricing ── */
#nr-root .nr-asst-price-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
#nr-root .nr-asst-price-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
}
#nr-root .nr-asst-price-card.is-featured {
  background:
    linear-gradient(var(--bg-1), var(--bg-1)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
}
#nr-root .nr-asst-price-card.is-featured::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(179, 122, 255, 0.08), transparent 60%);
  border-radius: inherit; pointer-events: none;
}
#nr-root .nr-asst-price-t {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint);
}
#nr-root .nr-asst-price-card.is-featured .nr-asst-price-t {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
#nr-root .nr-asst-price-p {
  font-weight: 500; font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em; line-height: 1;
}
#nr-root .nr-asst-price-s { color: var(--fg-dim); font-size: 13.5px; line-height: 1.5; }

#nr-root .nr-asst-pay {
  margin-top: 28px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(var(--scrim-rgb), 0.02);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
#nr-root .nr-asst-pay-lbl {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint);
}
#nr-root .nr-asst-pay-line { color: var(--fg-dim); font-size: 13px; }

/* ── Trust ── */
#nr-root .nr-asst-trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
#nr-root .nr-asst-trust-cell {
  padding: 24px; border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
#nr-root .nr-asst-trust-bar {
  width: 32px; height: 2px; border-radius: 2px;
  background: var(--a1);
}
#nr-root .nr-asst-trust-cell[data-nr-pillar="0"] .nr-asst-trust-bar { background: var(--a1); }
#nr-root .nr-asst-trust-cell[data-nr-pillar="1"] .nr-asst-trust-bar { background: var(--a2); }
#nr-root .nr-asst-trust-cell[data-nr-pillar="2"] .nr-asst-trust-bar { background: var(--a3); }
#nr-root .nr-asst-trust-cell[data-nr-pillar="3"] .nr-asst-trust-bar { background: var(--a4); }
#nr-root .nr-asst-trust-t { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
#nr-root .nr-asst-trust-s { color: var(--fg-dim); font-size: 13.5px; line-height: 1.55; }

/* ── FAQ ── */
#nr-root .nr-asst-faq-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-1);
}
#nr-root .nr-asst-faq-item { border-bottom: 1px solid var(--line); }
#nr-root .nr-asst-faq-item:last-child { border-bottom: 0; }
#nr-root .nr-asst-faq-item summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px;
  font-size: 15px; font-weight: 500; color: var(--fg);
  cursor: pointer;
  transition: background .15s var(--ease);
}
#nr-root .nr-asst-faq-item summary::-webkit-details-marker { display: none; }
#nr-root .nr-asst-faq-item summary:hover { background: rgba(var(--scrim-rgb), 0.03); }
#nr-root .nr-asst-faq-chev {
  flex-shrink: 0; color: var(--fg-faint);
  transition: transform .25s var(--ease);
}
#nr-root .nr-asst-faq-item[open] .nr-asst-faq-chev { transform: rotate(180deg); }
#nr-root .nr-asst-faq-a {
  padding: 0 24px 22px;
  color: var(--fg-dim); font-size: 14px; line-height: 1.65;
}

/* ── Long-form copy ── */
#nr-root .nr-asst-long-body {
  display: flex; flex-direction: column; gap: 16px;
  color: var(--fg-dim); font-size: 15px; line-height: 1.7;
}
#nr-root .nr-asst-long-body p { margin: 0; }
#nr-root .nr-asst-long-body strong { color: var(--fg); }

/* ── Final CTA — reuse .final-box from main landing if present ── */

/* ══════════════════════════════════════════════════════════════════════
   Responsive — /assistants/ specific overrides
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1040px) {
  #nr-root .nr-asst-hero { padding: 80px 0 56px; }
  #nr-root .nr-asst-featured-grid,
  #nr-root .nr-asst-price-grid { grid-template-columns: repeat(2, 1fr); }
  #nr-root .nr-asst-trust-grid { grid-template-columns: repeat(2, 1fr); }
  #nr-root .nr-asst-featured-sec,
  #nr-root .nr-asst-grid-sec,
  #nr-root .nr-asst-why,
  #nr-root .nr-asst-pricing,
  #nr-root .nr-asst-trust,
  #nr-root .nr-asst-faq,
  #nr-root .nr-asst-long { padding: 72px 0; }
}
@media (max-width: 640px) {
  #nr-root .nr-asst-hero { padding: 64px 0 40px; }
  #nr-root .nr-asst-featured-grid,
  #nr-root .nr-asst-price-grid,
  #nr-root .nr-asst-trust-grid { grid-template-columns: 1fr; }
  #nr-root .nr-asst-why-grid { grid-template-columns: 1fr; }
  #nr-root .nr-asst-filter { flex-direction: column; align-items: stretch; gap: 10px; margin: 0 -16px 20px; padding: 12px 16px; }
  #nr-root .nr-asst-search { flex: 0 0 auto; }
  #nr-root .nr-asst-card { padding: 18px; }
  #nr-root .nr-asst-card-hero { min-height: 220px; padding: 20px; }
  #nr-root .nr-asst-card-cta { display: none; }
}

/* =============================================================
 * LEGAL pages (Terms / Privacy / Refund) — netroom design.
 * ============================================================= */

#nr-root .legal-hero {
  position: relative;
  padding: 96px 0 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
#nr-root .legal-hero-glow {
  position: absolute; top: -120px; width: 520px; height: 520px;
  border-radius: 50%; filter: blur(120px); opacity: 0.55;
  pointer-events: none;
}
#nr-root .legal-hero-glow-l { left: -160px; background: radial-gradient(circle, rgba(179,122,255,0.30), transparent 70%); }
#nr-root .legal-hero-glow-r { right: -160px; background: radial-gradient(circle, rgba(255,122,89,0.22), transparent 70%); }
#nr-root[data-theme="light"] .legal-hero-glow { opacity: 0.40; }

#nr-root .legal-hero .crumbs {
  color: var(--fg-faint); font-size: 11px;
  margin-bottom: 24px;
}
#nr-root .legal-hero .crumbs a { color: var(--fg-dim); transition: color .2s; }
#nr-root .legal-hero .crumbs a:hover { color: var(--fg); }
#nr-root .legal-hero .crumbs [aria-current="page"] { color: var(--fg); }

#nr-root .legal-hero-body { max-width: 820px; }
#nr-root .legal-hero-title { margin: 18px 0 16px; }
#nr-root .legal-hero-sub { max-width: 640px; margin: 0 0 24px; }

#nr-root .legal-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 8px;
}
#nr-root .legal-meta-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--bg-1); border: 1px solid var(--line);
  font-size: 12px; color: var(--fg-dim);
  font-family: var(--font-mono); letter-spacing: 0.02em;
}
#nr-root .legal-meta-pill svg { opacity: 0.7; }
#nr-root .legal-meta-pill-soft {
  background: rgba(158, 231, 199, 0.06);
  border-color: rgba(158, 231, 199, 0.25);
  color: var(--a4);
}
#nr-root[data-theme="light"] .legal-meta-pill-soft {
  background: rgba(70, 160, 120, 0.08);
  border-color: rgba(70, 160, 120, 0.28);
  color: #2d8a64;
}

/* Document switcher tabs */
#nr-root .legal-tabs {
  display: flex; gap: 8px; margin-top: 40px;
  padding: 6px; border-radius: 999px;
  background: var(--bg-1); border: 1px solid var(--line);
  width: fit-content;
  flex-wrap: wrap;
}
#nr-root .legal-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--fg-dim);
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
#nr-root .legal-tab:hover { color: var(--fg); background: rgba(var(--scrim-rgb), 0.04); }
#nr-root .legal-tab.is-active {
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 4px 14px -6px rgba(0,0,0,0.4), inset 0 0 0 1px var(--line-2);
}
#nr-root[data-theme="light"] .legal-tab.is-active {
  box-shadow: 0 4px 14px -8px rgba(0,0,0,0.2), inset 0 0 0 1px var(--line-2);
}
#nr-root .legal-tab svg { opacity: 0.85; }

/* Body grid */
#nr-root .legal-body { padding: 64px 0 96px; }
#nr-root .legal-grid {
  display: grid; grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px; align-items: flex-start;
}

/* TOC sidebar */
#nr-root .legal-toc { position: relative; }
#nr-root .legal-toc-sticky {
  position: sticky; top: 96px;
  display: flex; flex-direction: column; gap: 18px;
}
#nr-root .legal-toc-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-faint);
}
#nr-root .legal-toc-label .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--grad); }
#nr-root .legal-toc-nav {
  display: flex; flex-direction: column; gap: 2px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}
#nr-root .legal-toc-link {
  display: block; padding: 7px 10px;
  font-size: 13px; line-height: 1.4; color: var(--fg-faint);
  border-radius: 8px;
  transition: color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
  position: relative;
}
#nr-root .legal-toc-link:hover { color: var(--fg); background: rgba(var(--scrim-rgb), 0.03); }
#nr-root .legal-toc-link.is-active {
  color: var(--fg); background: rgba(var(--scrim-rgb), 0.05);
  font-weight: 500;
}
#nr-root .legal-toc-link.is-active::before {
  content: ''; position: absolute; left: -15px; top: 7px; bottom: 7px;
  width: 2px; background: var(--grad); border-radius: 2px;
}
#nr-root .legal-toc-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
#nr-root .legal-toc-help {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--bg-1); border: 1px solid var(--line);
  color: var(--fg-dim); font-size: 12px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
#nr-root .legal-toc-help:hover { background: var(--bg-2); color: var(--fg); }

/* Article card with prose styling */
#nr-root .legal-article { min-width: 0; }
#nr-root .legal-article-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 48px 56px;
  color: var(--fg-dim);
  font-size: 15px; line-height: 1.7;
}
#nr-root .legal-article-card > *:first-child { margin-top: 0; }
#nr-root .legal-article-card > *:last-child { margin-bottom: 0; }
#nr-root .legal-article-card h2 {
  color: var(--fg);
  font-size: 24px; font-weight: 600; letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 56px 0 18px;
  scroll-margin-top: 96px;
  position: relative; padding-top: 24px;
  border-top: 1px solid var(--line);
}
#nr-root .legal-article-card > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
#nr-root .legal-article-card h2::before {
  content: ''; position: absolute; left: 0; top: -1px;
  width: 36px; height: 2px; background: var(--grad);
}
#nr-root .legal-article-card > h2:first-child::before { display: none; }
#nr-root .legal-article-card h3 {
  color: var(--fg);
  font-size: 17px; font-weight: 600; letter-spacing: -0.005em;
  margin: 32px 0 12px;
}
#nr-root .legal-article-card h4 {
  color: var(--fg);
  font-size: 15px; font-weight: 600;
  margin: 24px 0 8px;
}
#nr-root .legal-article-card p { margin: 0 0 16px; }
#nr-root .legal-article-card ul,
#nr-root .legal-article-card ol { margin: 0 0 18px; padding-left: 22px; }
#nr-root .legal-article-card li { margin: 0 0 8px; }
#nr-root .legal-article-card li::marker { color: var(--fg-faint); }
#nr-root .legal-article-card a {
  color: var(--fg);
  text-decoration: underline; text-decoration-color: rgba(var(--scrim-rgb), 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s var(--ease);
}
#nr-root .legal-article-card a:hover { text-decoration-color: var(--a2); }
#nr-root .legal-article-card strong { color: var(--fg); font-weight: 600; }
#nr-root .legal-article-card code {
  font-family: var(--font-mono); font-size: 13px;
  padding: 2px 6px; border-radius: 6px;
  background: rgba(var(--scrim-rgb), 0.06);
  border: 1px solid var(--line);
}
#nr-root .legal-article-card blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 2px solid;
  border-image: var(--grad) 1;
  background: rgba(var(--scrim-rgb), 0.03);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--fg);
  font-size: 14px;
}
#nr-root .legal-article-card hr {
  border: 0; border-top: 1px solid var(--line);
  margin: 32px 0;
}
#nr-root .legal-article-card table {
  width: 100%; border-collapse: collapse;
  margin: 18px 0; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden;
}
#nr-root .legal-article-card th,
#nr-root .legal-article-card td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--line);
}
#nr-root .legal-article-card th { background: rgba(var(--scrim-rgb), 0.04); color: var(--fg); font-weight: 600; }
#nr-root .legal-article-card tr:last-child td { border-bottom: 0; }

/* Highlighted callout for refund “service rendered” clause */
#nr-root .legal-article-card .legal-callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(179,122,255,0.10), rgba(255,122,89,0.08));
  border: 1px solid rgba(179,122,255,0.28);
  color: var(--fg);
  display: flex; gap: 14px; align-items: flex-start;
}
#nr-root .legal-article-card .legal-callout svg {
  flex-shrink: 0; margin-top: 2px;
  color: var(--a1);
}
#nr-root .legal-article-card .legal-callout p { margin: 0; }
#nr-root .legal-article-card .legal-callout strong { color: var(--fg); }

/* Inline accept card after article */
#nr-root .legal-accept-card {
  margin-top: 32px;
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(circle at 0% 0%, rgba(179,122,255,0.08), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(255,122,89,0.06), transparent 60%),
    var(--bg-1);
  border-radius: var(--r-xl);
  transition: opacity .3s var(--ease);
  flex-wrap: wrap;
}
#nr-root .legal-accept-card.is-accepted {
  border-color: rgba(158, 231, 199, 0.35);
  background:
    radial-gradient(circle at 0% 0%, rgba(158,231,199,0.10), transparent 60%),
    var(--bg-1);
}
#nr-root .legal-accept-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(var(--scrim-rgb), 0.05);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--a4);
  flex-shrink: 0;
}
#nr-root .legal-accept-text { flex: 1; min-width: 220px; }
#nr-root .legal-accept-title { color: var(--fg); font-size: 15px; font-weight: 600; }
#nr-root .legal-accept-sub { color: var(--fg-faint); font-size: 13px; margin-top: 4px; }
#nr-root .legal-accept-card.is-accepted .legal-accept-btn {
  pointer-events: none; opacity: 0.55;
}
#nr-root .legal-accept-card.is-accepted .legal-accept-btn span,
#nr-root .legal-accept-card.is-accepted .legal-accept-btn svg { transition: opacity .3s var(--ease); }

/* CTA section */
#nr-root .legal-cta { padding: 0 0 96px; }

/* Responsive */
@media (max-width: 1040px) {
  #nr-root .legal-grid { grid-template-columns: 1fr; gap: 32px; }
  #nr-root .legal-toc { display: none; }
  #nr-root .legal-article-card { padding: 36px 32px; }
}
@media (max-width: 640px) {
  #nr-root .legal-hero { padding: 64px 0 40px; }
  #nr-root .legal-body { padding: 40px 0 64px; }
  #nr-root .legal-cta { padding: 0 0 64px; }
  #nr-root .legal-article-card { padding: 28px 22px; border-radius: var(--r-lg); }
  #nr-root .legal-article-card h2 { font-size: 20px; margin-top: 40px; }
  #nr-root .legal-tabs { width: 100%; }
  #nr-root .legal-tab { flex: 1 1 auto; justify-content: center; padding: 10px 12px; font-size: 12px; }
  #nr-root .legal-tab span { white-space: nowrap; }
  #nr-root .legal-accept-card { padding: 18px; }
}

/* =============================================================
 * CONSENT MODAL — beautiful Accept modal shown on first visit.
 * ============================================================= */

#nr-root .nr-consent[hidden] { display: none; }
#nr-root .nr-consent {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: nrConsentFade .25s var(--ease);
}
@keyframes nrConsentFade { from { opacity: 0; } to { opacity: 1; } }
#nr-root .nr-consent-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
#nr-root[data-theme="light"] .nr-consent-backdrop { background: rgba(20, 20, 25, 0.42); }

#nr-root .nr-consent-card {
  position: relative; z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 36px 36px 32px;
  border-radius: var(--r-2xl);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.6),
    0 0 0 1px rgba(var(--scrim-rgb), 0.04);
  animation: nrConsentRise .35s var(--ease);
}
@keyframes nrConsentRise {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1);       opacity: 1; }
}
#nr-root .nr-consent-glow {
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 360px; height: 200px;
  background: radial-gradient(ellipse, rgba(179,122,255,0.30), transparent 60%);
  filter: blur(50px);
  pointer-events: none;
  border-radius: 50%;
}
#nr-root .nr-consent-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-faint);
  background: rgba(var(--scrim-rgb), 0.04);
  transition: background .2s var(--ease), color .2s var(--ease);
}
#nr-root .nr-consent-close:hover { background: rgba(var(--scrim-rgb), 0.1); color: var(--fg); }

#nr-root .nr-consent-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-dim);
  padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(var(--scrim-rgb), 0.02);
  position: relative; z-index: 1;
}
#nr-root .nr-consent-eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--grad); }

#nr-root .nr-consent-title {
  position: relative; z-index: 1;
  margin: 18px 0 12px;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.15; letter-spacing: -0.02em;
  font-weight: 500; color: var(--fg);
}
#nr-root .nr-consent-lead {
  color: var(--fg-dim); font-size: 14px; line-height: 1.55;
  margin: 0 0 22px;
  position: relative; z-index: 1;
}

#nr-root .nr-consent-list {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative; z-index: 1;
}
#nr-root .nr-consent-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  background: rgba(var(--scrim-rgb), 0.03);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
#nr-root .nr-consent-list li:hover {
  border-color: var(--line-2);
  background: rgba(var(--scrim-rgb), 0.05);
}
#nr-root .nr-consent-bullet {
  flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg);
  background: rgba(var(--scrim-rgb), 0.05);
  border: 1px solid var(--line);
}
#nr-root .nr-consent-link {
  display: block; color: var(--fg);
  font-size: 14px; font-weight: 600;
  text-decoration: underline; text-decoration-color: transparent;
  transition: text-decoration-color .2s var(--ease);
}
#nr-root .nr-consent-link:hover { text-decoration-color: var(--a2); }
#nr-root .nr-consent-list-sub {
  display: block; color: var(--fg-faint);
  font-size: 12px; line-height: 1.45;
  margin-top: 4px;
}

#nr-root .nr-consent-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  position: relative; z-index: 1;
}
#nr-root .nr-consent-accept { flex: 1 1 220px; justify-content: center; }
#nr-root .nr-consent-decline { flex: 0 0 auto; }

#nr-root .nr-consent-fineprint {
  margin: 16px 0 0;
  font-size: 11px; color: var(--fg-faint);
  line-height: 1.5;
  position: relative; z-index: 1;
}

@media (max-width: 520px) {
  #nr-root .nr-consent-card { padding: 28px 22px; }
  #nr-root .nr-consent-actions { flex-direction: column; }
  #nr-root .nr-consent-accept,
  #nr-root .nr-consent-decline { flex: 1 1 auto; width: 100%; justify-content: center; }
}



/* =========================================================
   404 page
   ========================================================= */
#nr-root .nf {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: calc(100vh - 74px);
  min-height: calc(100svh - 74px);
  padding: 72px 0 96px;
}
#nr-root .nf-inner {
  position: relative; z-index: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}

/* Animated blobs (reuse .ambient markup; b3 keeps its static translateX) */
#nr-root .nf .blob.b1 { animation: nf-drift 18s ease-in-out infinite alternate; }
#nr-root .nf .blob.b2 { animation: nf-drift 24s ease-in-out -8s infinite alternate-reverse; }
@keyframes nf-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(48px, -36px, 0) scale(1.1); }
}

/* Big 404 */
#nr-root .nf-code {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(10px, 2.4vw, 26px);
  margin-top: 30px;
  user-select: none; -webkit-user-select: none;
}
#nr-root .nf-digit {
  font-weight: 600; line-height: 0.92;
  font-size: clamp(96px, 21vw, 196px);
  letter-spacing: -0.05em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: nf-float 7s ease-in-out infinite;
}
#nr-root .nf-code .nf-digit:last-child { animation-delay: -3.5s; }
#nr-root .nf-zero {
  width: clamp(78px, 16.5vw, 152px); flex-shrink: 0;
  animation: nf-float 7s ease-in-out -1.8s infinite;
}
#nr-root .nf-zero svg { display: block; width: 100%; height: auto; }
@keyframes nf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
#nr-root .nf-orbit {
  transform-origin: 60px 60px;
  animation: nr-spin 6s linear infinite;
}
#nr-root .nf-ring-dash {
  transform-origin: 60px 60px;
  animation: nr-spin 40s linear infinite reverse;
}

/* Copy */
#nr-root .nf-title { margin: 26px 0 0; font-size: clamp(30px, 4.6vw, 56px); }
#nr-root .nf-lead  { margin: 16px auto 0; max-width: 560px; }

/* Terminal chip */
#nr-root .nf-term {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 26px; padding: 10px 18px;
  max-width: min(92vw, 620px);
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(var(--scrim-rgb), 0.03);
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em;
  color: var(--fg-dim);
}
#nr-root .nf-term-get { color: var(--fg-faint); flex-shrink: 0; }
#nr-root .nf-term-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#nr-root .nf-term-status { color: var(--a2); font-weight: 500; white-space: nowrap; flex-shrink: 0; }
#nr-root .nf-cursor {
  width: 7px; height: 14px; flex-shrink: 0; border-radius: 1px;
  background: var(--fg-dim);
  animation: nf-blink 1.1s steps(2, end) infinite;
}
@keyframes nf-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Actions */
#nr-root .nf-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 36px;
}
#nr-root .nf-actions .btn { min-width: 200px; justify-content: center; }

/* Quick links */
#nr-root .nf-links {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  width: 100%; max-width: 920px;
  margin-top: 64px;
}
#nr-root .nf-card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 18px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: rgba(var(--scrim-rgb), 0.02);
  transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
#nr-root .nf-card:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--bg-2); }
#nr-root .nf-card-ic {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 11px;
  background: rgba(var(--scrim-rgb), 0.03);
  color: var(--fg-dim);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
#nr-root .nf-card:hover .nf-card-ic { color: var(--fg); border-color: var(--line-2); }
#nr-root .nf-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#nr-root .nf-card-t { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; color: var(--fg); }
#nr-root .nf-card-s { font-size: 13px; line-height: 1.45; color: var(--fg-faint); }
#nr-root .nf-card-arrow {
  position: absolute; top: 16px; right: 16px;
  color: var(--fg-dim); opacity: 0; transform: translate(-4px, 4px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
#nr-root .nf-card:hover .nf-card-arrow { opacity: 1; transform: translate(0, 0); }

/* Support line */
#nr-root .nf-support { margin: 36px 0 0; font-size: 13.5px; color: var(--fg-faint); }
#nr-root .nf-support a {
  color: var(--fg-dim); padding-bottom: 1px;
  border-bottom: 1px solid var(--line-2);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
#nr-root .nf-support a:hover { color: var(--fg); border-color: var(--fg-dim); }

/* Staggered entrance */
#nr-root .nf-in { opacity: 0; transform: translateY(16px); animation: nf-in .7s var(--ease) forwards; }
#nr-root .nf-d1 { animation-delay: .04s; }
#nr-root .nf-d2 { animation-delay: .10s; }
#nr-root .nf-d3 { animation-delay: .18s; }
#nr-root .nf-d4 { animation-delay: .26s; }
#nr-root .nf-d5 { animation-delay: .34s; }
#nr-root .nf-d6 { animation-delay: .42s; }
#nr-root .nf-d7 { animation-delay: .52s; }
#nr-root .nf-d8 { animation-delay: .62s; }
@keyframes nf-in { to { opacity: 1; transform: none; } }

@media (max-width: 1040px) {
  #nr-root .nf-links { grid-template-columns: repeat(2, 1fr); max-width: 640px; }
}
@media (max-width: 640px) {
  #nr-root .nf { padding: 48px 0 72px; min-height: 0; }
  #nr-root .nf-links { grid-template-columns: 1fr; max-width: 440px; margin-top: 48px; }
  #nr-root .nf-card { flex-direction: row; align-items: center; padding: 14px 16px; }
  #nr-root .nf-card-arrow { top: 50%; margin-top: -7px; }
  #nr-root .nf-term { font-size: 11.5px; gap: 8px; padding: 9px 14px; }
  #nr-root .nf-actions { width: 100%; }
  #nr-root .nf-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  #nr-root .nf-in { animation: none; opacity: 1; transform: none; }
  #nr-root .nf-digit, #nr-root .nf-zero,
  #nr-root .nf-orbit, #nr-root .nf-ring-dash,
  #nr-root .nf-cursor,
  #nr-root .nf .blob.b1, #nr-root .nf .blob.b2 { animation: none; }
}
