/* ==========================================================================
   naseno, design system v2
   Dark by default. One grid, one grotesk, colour comes from the work:
   every project brings its own palette.
   Every value below is a token; the ⌘C panel rewrites them live.
   ========================================================================== */

/* ---------- 1. tokens ---------- */
:root {
  /* base tones */
  --ink: #0F0F0E;            /* dark tone */
  --paper: #F1EEE8;          /* light tone */
  --accent: #FF5B35;         /* optional signal colour (off by default) */

  /* roles, themes remap these */
  --bg: var(--ink);
  --fg: var(--paper);
  --hl: var(--fg);           /* lines, highlights, solid buttons */
  --on-hl: var(--bg);        /* text on --hl surfaces */
  --head: var(--fg);         /* headline colour */
  --muted: color-mix(in oklab, var(--fg) 58%, var(--bg));
  --soft: color-mix(in oklab, var(--fg) 6%, var(--bg));     /* raised surface */
  --rule: color-mix(in oklab, var(--fg) 16%, transparent);  /* hairlines */
  --line: color-mix(in oklab, var(--fg) var(--grid-op), transparent);  /* grid overlay */

  /* type families */
  --font-display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: var(--font-body);

  /* display type */
  --d-weight: 500;
  --d-track: -0.05em;
  --d-lead: 0.86;
  --d-case: none;
  --hero-k: 1;
  --rond: 0;                 /* Allo roundness axis, ignored by other fonts */

  /* weights */
  --w-body: 400;
  --w-medium: 500;
  --w-strong: 600;
  --w-mark: 600;

  /* text scale */
  --fs: 16px;
  --ratio: 1.25;
  --t-2: calc(var(--fs) / var(--ratio) / var(--ratio));
  --t-1: calc(var(--fs) / var(--ratio));
  --t0: var(--fs);
  --t1: calc(var(--fs) * var(--ratio));
  --t2: calc(var(--fs) * var(--ratio) * var(--ratio));
  --t3: calc(var(--fs) * var(--ratio) * var(--ratio) * var(--ratio));

  /* display scale in container units: follows the page width,
     also when the ⌘C panel squeezes the page */
  --d-xl: max(46px, 10.5cqi);
  --d-l: max(38px, 7cqi);
  --d-m: max(28px, 4.4cqi);
  --d-s: max(21px, 2.6cqi);

  /* grid: content is centred up to --maxw; below that the margin is --margin.
     --pad is resolved inside #page (cqi = page width), so it also follows
     the page when the ⌘C panel is open */
  --gutter: 48px;
  --margin: 24px;
  --maxw: 1300px;
  --pad: max(var(--margin), calc((100cqi - var(--maxw)) / 2));

  /* header glass + ambient tint */
  --hdr-blur: 38px;
  --hdr-op: 87%;
  --tint: #FF5A4E;
  --tint2: #9DBF9E;
  --grid-op: 9%;
  --row: 0px;

  /* shape */
  --radius: 0px;
  --shadow: 0;
  --space: 1;
  --sec: calc(128px * var(--space));

  --panel-w: 0px;
  --ease: cubic-bezier(.2,.7,.1,1);
}

/* themes */
[data-theme="ink"]    { --bg: var(--ink); --fg: var(--paper); }
[data-theme="white"]  { --bg: color-mix(in oklab, var(--paper) 40%, white); --fg: var(--ink); }
[data-theme="paper"]  { --bg: var(--paper); --fg: var(--ink); }
[data-theme="signal"] { --bg: var(--accent); --fg: var(--paper); }
/* accent on: headlines, lines and solid buttons take the signal colour */
/* derived tokens are re-declared wherever a theme is set, so a nested
   data-theme block gets its own muted/soft/rule/line too */
[data-theme] {
  --muted: color-mix(in oklab, var(--fg) 58%, var(--bg));
  --soft: color-mix(in oklab, var(--fg) 6%, var(--bg));
  --rule: color-mix(in oklab, var(--fg) 16%, transparent);
  --line: color-mix(in oklab, var(--fg) var(--grid-op), transparent);
}
[data-head="accent"]  { --hl: var(--accent); --head: var(--accent); --on-hl: var(--paper); --rule: color-mix(in oklab, var(--accent) 60%, transparent); --line: color-mix(in oklab, var(--accent) var(--grid-op), transparent); }
[data-theme="signal"][data-head="accent"] { --hl: var(--paper); --head: var(--paper); --on-hl: var(--accent); --rule: color-mix(in oklab, var(--paper) 45%, transparent); --line: color-mix(in oklab, var(--paper) var(--grid-op), transparent); }
[data-case="upper"]   { --d-case: uppercase; }
[data-lower="on"]     { --d-case: lowercase; }
[data-lower="on"] #page, [data-lower="on"] .mmenu { text-transform: lowercase; }

/* project colours (project page): set by JS as --p-* on :root */
:root[data-pcolor="on"] {
  --bg: var(--p-bg); --fg: var(--p-fg); --hl: var(--p-hl); --on-hl: var(--p-on); --head: var(--p-hl);
  --soft: var(--p-panel);
  --rule: color-mix(in oklab, var(--p-fg) 18%, transparent);
  --line: color-mix(in oklab, var(--p-fg) var(--grid-op), transparent);
}

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t0);
  font-weight: var(--w-body);
  line-height: 1.45;
  font-variation-settings: "ROND" var(--rond);
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
ol, ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; }
::selection { background: var(--hl); color: var(--on-hl); }
:focus-visible { outline: 2px solid var(--hl); outline-offset: 3px; }

/* the page is a size container: opening the panel reflows it
   exactly like a narrower window would */
#page {
  position: relative;
  container: page / inline-size;
  margin-right: var(--panel-w);
  min-height: 100vh;
  transition: margin-right .45s var(--ease);
  overflow-x: clip;
}

/* accent: one primary colour (plus an optional second one), used sparingly
   on things you act on: the main button, links, chosen options, selection */
#page { isolation: isolate; }
[data-tintui="on"] ::selection { background: var(--tint); color: #111; }
[data-tintui="on"] :focus-visible { outline-color: var(--tint); }
[data-tintui="on"] .btn.solid { background: var(--tint); border-color: var(--tint); color: #111; }
[data-tintui="on"] .btn.solid:hover { background: transparent; color: var(--tint); }
[data-tintui="on"] .lnk { text-decoration-color: var(--tint); }
[data-tintui="on"] .lnk:hover { color: var(--tint2); text-decoration-color: var(--tint2); }
[data-tintui="on"] .nav a::after { background: var(--tint); }
[data-tintui="on"] .pill[aria-pressed="true"], [data-tintui="on"] .pill[aria-selected="true"] { background: var(--tint); border-color: var(--tint); color: #111; }
[data-tintui="on"] .msg.you { background: var(--tint); color: #111; }
[data-tintui="on"] .msg.you .who { color: rgb(17 17 17 / .6); }
[data-tintui="on"] .change ins { background: color-mix(in oklab, var(--tint2) 26%, transparent); }
[data-tintui="on"] .stat.is-ph .num { color: color-mix(in oklab, var(--tint2) 70%, var(--muted)); }

/* ---------- 3. type ---------- */
.disp {
  font-family: var(--font-display);
  font-weight: var(--d-weight);
  letter-spacing: var(--d-track);
  line-height: var(--d-lead);
  color: var(--head);
  text-transform: var(--d-case);
  font-optical-sizing: auto;
}
.d-xl { font-size: var(--d-xl); }
.d-l  { font-size: var(--d-l); }
.d-m  { font-size: var(--d-m); line-height: calc(var(--d-lead) + .08); }
.d-s  { font-size: var(--d-s); line-height: calc(var(--d-lead) + .16); letter-spacing: calc(var(--d-track) * .6); }
/* the text scale: small (t-1), body (t0), lead (t1). Everything above is display (d-s … d-xl). */
.t-1 { font-size: var(--t-1); } .t1 { font-size: var(--t1); line-height: 1.35; }
.small { font-size: var(--t-1); line-height: 1.4; }
.lead { font-size: var(--t1); line-height: 1.35; font-weight: var(--w-medium); letter-spacing: -0.012em; }
b, strong { font-weight: var(--w-strong); }
.muted { color: var(--muted); }
.ln { display: block; width: max-content; max-width: none; white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: var(--t-1); font-variant-numeric: tabular-nums; }

/* ---------- 4. grid ---------- */
.g {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-inline: var(--pad);
}
.sec { padding-block: var(--sec); position: relative; }
.rule-t { border-top: 1px solid var(--rule); }

#grid {
  position: absolute; inset: 0; z-index: 60; pointer-events: none; display: none;
  background-image: var(--row-img, none);
  background-size: 100% var(--row);
}
[data-grid="on"] #grid { display: block; }
#grid .g { height: 100%; }
#grid .g > i { border-inline: 1px solid var(--line); position: relative; }
[data-density="6"] #grid .g > i:nth-child(odd)  { border-right: 0; }
[data-density="6"] #grid .g > i:nth-child(even) { border-left: 0; }
[data-density="24"] #grid .g > i::after { content: ""; position: absolute; inset: 0 auto 0 50%; border-left: 1px solid var(--line); opacity: .6; }

@container page (max-width: 860px) {
  .g { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g > * { grid-column: 1 / -1 !important; }
  #grid .g > i:nth-child(n+5) { display: none; }
  .sec { --sec: calc(80px * var(--space)); }
  .m-hide { display: none !important; }
}
@container page (min-width: 861px) { .d-hide { display: none !important; } }

/* ---------- 5. header + mobile menu ---------- */
.hdr {
  position: sticky; top: 0; z-index: 70;
  background: color-mix(in oklab, var(--bg) var(--hdr-op), transparent);
  backdrop-filter: blur(var(--hdr-blur)) saturate(165%); -webkit-backdrop-filter: blur(var(--hdr-blur)) saturate(165%);
  border-bottom: 1px solid var(--rule);
  transition: transform .45s var(--ease), background-color .3s, box-shadow .3s;
}
.hdr .g { align-items: center; min-height: 56px; }
/* floating glass: a bar that hovers over the page with a soft edge light */
[data-hdr="float"] .hdr {
  top: 10px; margin: 10px var(--pad) 0; border: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
  border-radius: 0;
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--fg) 9%, transparent), 0 12px 36px rgb(0 0 0 / .22);
}
[data-hdr="float"] .hdr .g { padding-inline: 18px; min-height: 52px; }
[data-hdr="bar"] .hdr { box-shadow: inset 0 -1px 0 color-mix(in oklab, var(--fg) 6%, transparent); }
[data-hdr="solid"] .hdr { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-hdrhide="on"].hdr-away .hdr { transform: translateY(calc(-100% - 24px)); }
.wordmark { font-family: var(--font-display); font-weight: var(--w-mark); letter-spacing: -0.045em; font-size: var(--t1); line-height: 1; color: var(--fg); grid-column: 1 / span 3; text-transform: var(--d-case); }
.nav { display: flex; gap: 22px; font-weight: var(--w-medium); grid-column: 5 / span 5; }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: currentColor; transition: right .3s var(--ease); }
.nav a:hover::after, .nav a[aria-current]::after { right: 0; }
.hdr .cta { grid-column: 10 / span 3; justify-self: end; }
.menu-btn { display: none; justify-self: end; width: 44px; height: 44px; margin-right: -10px; position: relative; color: var(--fg); }
.burger { position: absolute; left: 50%; top: 50%; width: 22px; height: 10px; transform: translate(-50%, -50%); }
.burger i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
.burger i:first-child { top: 0; }
.burger i:last-child { top: 8px; }
.menu-btn[aria-expanded="true"] .burger i:first-child { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger i:last-child { top: 4px; transform: rotate(-45deg); }
.mmenu {
  position: fixed; inset: 0; z-index: 69; padding: 104px var(--pad) 32px;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%);
  display: flex; flex-direction: column; gap: 6px; opacity: 0; transform: translateY(-12px); transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s .45s;
  visibility: hidden;
}
.mmenu.open { opacity: 1; transform: none; visibility: visible; transition: opacity .35s var(--ease), transform .45s var(--ease); }
.mmenu a { font-family: var(--font-display); font-weight: var(--d-weight); letter-spacing: var(--d-track); font-size: var(--d-l); line-height: 1.06; color: var(--head); text-transform: var(--d-case); }
.mmenu .mm-foot { margin-top: auto; color: var(--muted); display: grid; gap: 6px; }
@container page (min-width: 861px) { .mmenu { display: none; } }
@container page (max-width: 860px) {
  .hdr .g { grid-template-columns: 1fr auto; }
  .hdr .g > * { grid-column: auto !important; }
  .hdr .nav, .hdr .cta { display: none; }
  .menu-btn { display: block; }
}

/* ---------- 6. components ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-weight: var(--w-medium); font-size: var(--t0); line-height: 1;
  padding: .9em 1.15em; border: 1px solid color-mix(in oklab, var(--fg) 40%, transparent); color: var(--fg);
  border-radius: var(--radius);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { border-color: var(--hl); }
.btn.solid { background: var(--hl); color: var(--on-hl); border-color: var(--hl); }
.btn.solid:hover { background: transparent; color: var(--hl); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.arrow { display: inline-block; transition: transform .3s var(--ease); }
a:hover .arrow { transform: translateX(4px); }
.lnk { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in oklab, currentColor 45%, transparent); }
.lnk:hover { text-decoration-color: currentColor; }

/* pills: only for a real category (what was made) or a real choice (a filter) */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: .45em;
  font-size: var(--t-1); line-height: 1; padding: .6em .9em;
  border: 1px solid var(--rule); border-radius: 999px; white-space: nowrap; color: inherit;
}
button.pill { cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
button.pill:hover { border-color: currentColor; }
.pill[aria-pressed="true"], .pill[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
[data-pill="btn"] .pill { border-radius: var(--radius); }
[data-pill="square"] .pill { border-radius: 0; }
[data-skin="allo"][data-pill="btn"] .pill { border-radius: 999px; }

/* field labels inside data blocks (never above headlines) */
.meta-grid { display: grid; gap: 16px 24px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 0; }
.meta-grid dt { font-size: var(--t-1); color: var(--muted); margin-bottom: 3px; }
.meta-grid dd { margin: 0; }

.stat .num { font-family: var(--font-display); font-weight: var(--d-weight); letter-spacing: var(--d-track); line-height: .9; color: var(--head); font-size: var(--d-l); font-variant-numeric: tabular-nums; }
.stat .cap { margin-top: 18px; max-width: 28ch; }
.stat.is-ph .num { color: var(--muted); }
.stat.is-ph .num span { outline: 1px dashed currentColor; outline-offset: 3px; }

.quote blockquote { margin: 0; font-family: var(--font-display); font-weight: var(--d-weight); letter-spacing: calc(var(--d-track) * .45); line-height: 1.1; font-size: var(--d-s); color: var(--fg); }
.quote figcaption { margin-top: 18px; color: var(--muted); }

/* screenshots */
.frame { position: relative; border-radius: var(--radius); overflow: hidden; }
.frame img { width: 100%; height: auto; transition: filter .4s var(--ease); }
.frame.cut { overflow: visible; border-radius: 0; filter: drop-shadow(0 calc(var(--shadow) * .5px) calc(var(--shadow) * 1px) rgb(0 0 0 / calc(var(--shadow) * .008))); }
.frame:not(.cut) { box-shadow: 0 calc(var(--shadow) * .6px) calc(var(--shadow) * 1.6px) rgb(0 0 0 / calc(var(--shadow) * .008)); }
[data-frame="line"] .frame:not(.cut) { box-shadow: 0 0 0 1px var(--rule), 0 calc(var(--shadow) * .6px) calc(var(--shadow) * 1.6px) rgb(0 0 0 / calc(var(--shadow) * .008)); }
[data-img="mono"] .frame img { filter: grayscale(1) contrast(1.05); }
[data-img="duo"] .frame img { filter: url(#duo); }
[data-img="mono"] .frame:hover img, [data-img="duo"] .frame:hover img { filter: none; }
.cap { color: var(--muted); font-size: var(--t-1); margin-top: 10px; line-height: 1.35; }
[data-caps="off"] .cap { display: none; }

/* spotlight: one element, isolated and enlarged on a surface */
.spot { background: var(--soft); border-radius: var(--radius); display: grid; place-items: center; padding: clamp(24px, 6cqi, 96px); position: relative; overflow: hidden; }
.spot .frame.cut { max-width: 100%; }
.spot-text h3 { font-family: var(--font-display); font-weight: var(--d-weight); letter-spacing: calc(var(--d-track) * .6); font-size: var(--d-s); line-height: 1.02; color: var(--head); text-transform: var(--d-case); margin-bottom: 10px; }

/* before / after slider */
.ba { position: relative; overflow: hidden; border-radius: var(--radius); user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; --x: 50%; }
.ba img { width: 100%; height: auto; display: block; pointer-events: none; }
.ba .ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.ba .ba-before img { height: 100%; object-fit: cover; object-position: top; }
.ba .ba-handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--hl); }
.ba .ba-handle::after { content: "↔"; position: absolute; top: 50%; left: 1px; transform: translate(-50%, -50%); width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--hl); color: var(--on-hl); font-size: 18px; }
.ba .ba-l, .ba .ba-r { position: absolute; top: 12px; font-size: var(--t-1); background: var(--bg); color: var(--fg); padding: 5px 10px; border-radius: 999px; }
.ba .ba-l { left: 12px; } .ba .ba-r { right: 12px; }

/* conversation: what working with Claude looks like */
.chat { display: grid; gap: 10px; align-content: start; }
.msg { padding: 14px 16px; max-width: 30em; border-radius: var(--radius); line-height: 1.4; }
.msg .who { display: block; font-size: var(--t-1); color: var(--muted); margin-bottom: 4px; }
.msg.you { justify-self: end; background: var(--fg); color: var(--bg); }
.msg.you .who { color: color-mix(in oklab, var(--bg) 60%, var(--fg)); }
.msg.ai { background: var(--soft); }
.change { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.change .row-c { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; font-size: var(--t-1); }
.change .row-c > span:first-child { color: var(--muted); }
.change del { color: var(--muted); }
.change ins, .change del { white-space: nowrap; }
.change ins { text-decoration: none; background: color-mix(in oklab, var(--fg) 14%, transparent); padding: 0 4px; }
.typing::after { content: ""; display: inline-block; width: 6px; height: 1em; background: currentColor; margin-left: 2px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* simple contact form */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: var(--t-1); color: var(--muted); }
.form input, .form textarea { font: inherit; color: var(--fg); background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: 8px 0 10px; border-radius: 0; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--fg); }
[data-tintui="on"] .form input:focus, [data-tintui="on"] .form textarea:focus { border-bottom-color: var(--tint); }
.form .btn { justify-self: start; margin-top: 6px; }

/* reveal on scroll */
[data-motion="on"] .rv { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-motion="on"] .rv.in { opacity: 1; transform: none; }
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after { animation: none !important; transition: none !important; }

.foot { padding-block: 22px 32px; border-top: 1px solid var(--rule); color: var(--muted); align-items: baseline; row-gap: 8px; font-size: var(--t-1); }

/* shortcut hint (design tool, not part of the site) */
.kbd-hint {
  position: fixed; left: 14px; bottom: 14px; z-index: 80;
  font: 500 11px/1 -apple-system, BlinkMacSystemFont, "Inter", sans-serif; text-transform: none;
  background: #1C1C1C; color: #EDEDED; padding: 8px 10px; border-radius: 6px;
  opacity: .85; cursor: pointer; border: 1px solid #333;
}
.kbd-hint:hover { opacity: 1; }
@media (max-width: 600px) { .kbd-hint { left: auto; right: 12px; bottom: 12px; padding: 9px; opacity: .7; } }
[data-hint="off"] .kbd-hint { display: none; }

/* ==========================================================================
   Skin: Allo, same grid and layout, re-tuned for Allo's rounded
   letterforms: softer surfaces and pill-shaped buttons.
   Font: Allo by Josh Puckett (SIL OFL), allo.joshpuckett.me
   ========================================================================== */
[data-skin="allo"] {
  --rule: color-mix(in oklab, var(--fg) 12%, transparent);
}
[data-skin="allo"] .btn, [data-skin="allo"] .spot, [data-skin="allo"] .msg, [data-skin="allo"] .change, [data-skin="allo"] .ba, [data-skin="allo"] .frame:not(.cut), [data-skin="allo"] .tile { border-radius: max(var(--radius), 18px); }
[data-skin="allo"] { --w-mark: 800; }
[data-skin="allo"] .btn { border-radius: 999px; font-weight: max(var(--w-medium), 600); padding: .85em 1.3em; }
[data-skin="allo"] .hdr { border-bottom-color: transparent; }
[data-skin="allo"] .wordmark { letter-spacing: -0.03em; }

/* ==========================================================================
   ⌘C settings panel, neutral chrome, never themed
   ========================================================================== */
#ns-panel {
  --p-bg: #111; --p-fg: #ECECEC; --p-mute: #8A8A8A; --p-line: #262626; --p-acc: #FF5B35; --p-field: #1B1B1B;
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px; z-index: 1000;
  background: var(--p-bg); color: var(--p-fg);
  font: 12px/1.4 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  text-transform: none; letter-spacing: 0;
  transform: translateX(100%); transition: transform .45s var(--ease);
  display: flex; flex-direction: column; border-left: 1px solid #2A2A2A;
}
html.ns-open #ns-panel { transform: none; }
#ns-panel * { box-sizing: border-box; text-transform: none; }
#ns-panel .p-top { padding: 14px 16px 12px; border-bottom: 1px solid var(--p-line); display: flex; align-items: center; gap: 10px; }
#ns-panel .p-top b { font-size: 13px; font-weight: 600; }
#ns-panel .p-top .k { font-size: 11px; color: var(--p-mute); }
#ns-panel .p-top .p-ds { margin-left: auto; font-size: 11px; color: #C8C8C8; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #555; }
#ns-panel .p-top .p-ds:hover { color: #fff; }
#ns-panel .p-top button { color: var(--p-mute); font-size: 16px; line-height: 1; padding: 2px 4px; }
#ns-panel .p-top button:hover { color: var(--p-fg); }
#ns-panel .p-saved { font-size: 10px; color: #4ADE80; opacity: 0; transition: opacity .3s; }
#ns-panel .p-saved.on { opacity: 1; }
#ns-panel .p-scroll { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
#ns-panel .p-scope { padding: 14px 16px 8px; display: flex; align-items: baseline; gap: 8px; position: sticky; top: 0; background: var(--p-bg); z-index: 2; border-bottom: 1px solid var(--p-line); }
#ns-panel .p-scope b { font-size: 12px; font-weight: 600; color: var(--p-fg); }
#ns-panel .p-scope span { font-size: 11px; color: var(--p-mute); }
#ns-panel .p-scope .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--p-acc); align-self: center; }
#ns-panel .p-scope.page .dot { background: #60A5FA; }
#ns-panel details { border-bottom: 1px solid var(--p-line); }
#ns-panel summary { list-style: none; cursor: pointer; padding: 11px 16px; font-weight: 600; font-size: 12px; display: flex; justify-content: space-between; color: #D4D4D4; }
#ns-panel summary::-webkit-details-marker { display: none; }
#ns-panel summary::after { content: "+"; color: var(--p-mute); font-weight: 400; }
#ns-panel details[open] summary::after { content: "−"; }
#ns-panel .p-body { padding: 2px 16px 14px; display: grid; gap: 12px; }
#ns-panel .ctl { display: grid; gap: 6px; }
#ns-panel .ctl-h { display: flex; justify-content: space-between; gap: 10px; color: #BDBDBD; }
#ns-panel .ctl-h output { font-variant-numeric: tabular-nums; color: var(--p-fg); }
#ns-panel .ctl small { color: var(--p-mute); font-size: 11px; }
#ns-panel input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: none; margin: 0; }
#ns-panel input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--p-acc) var(--fill, 50%), #333 var(--fill, 50%)); border-radius: 2px; }
#ns-panel input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--p-fg); margin-top: -6px; border: 0; }
#ns-panel input[type="range"]::-moz-range-track { height: 2px; background: #333; }
#ns-panel input[type="range"]::-moz-range-progress { height: 2px; background: var(--p-acc); }
#ns-panel input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--p-fg); border: 0; }
#ns-panel select {
  width: 100%; background: var(--p-field); color: var(--p-fg); border: 1px solid var(--p-line); border-radius: 6px;
  padding: 7px 28px 7px 9px; font: inherit; -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
#ns-panel input.txt { width: 100%; background: var(--p-field); color: var(--p-fg); border: 1px solid var(--p-line); border-radius: 6px; padding: 7px 9px; font: inherit; }
#ns-panel input.txt:focus { outline: none; border-color: #555; }
#ns-panel .seg { display: flex; background: var(--p-field); border: 1px solid var(--p-line); border-radius: 6px; padding: 2px; gap: 2px; flex-wrap: wrap; }
#ns-panel .seg button { flex: 1; padding: 6px 4px; border-radius: 4px; color: #A3A3A3; font-size: 11px; white-space: nowrap; }
#ns-panel .seg button[aria-pressed="true"] { background: #2E2E2E; color: var(--p-fg); }
#ns-panel .tog { display: flex; justify-content: space-between; align-items: center; color: #BDBDBD; cursor: pointer; }
#ns-panel .tog input { display: none; }
#ns-panel .tog i { width: 28px; height: 16px; border-radius: 9px; background: #333; position: relative; transition: background .2s; flex: none; }
#ns-panel .tog i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #CFCFCF; transition: transform .2s; }
#ns-panel .tog input:checked + i { background: var(--p-acc); }
#ns-panel .tog input:checked + i::after { transform: translateX(12px); background: #fff; }
#ns-panel .col { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#ns-panel .col input[type="color"] { width: 30px; height: 26px; border: 1px solid var(--p-line); border-radius: 6px; background: none; padding: 0; cursor: pointer; }
#ns-panel .col input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
#ns-panel .col input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
#ns-panel .col .sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15); }
#ns-panel .col .sw[aria-pressed="true"] { border-color: #fff; }
#ns-panel .col code { font: 11px ui-monospace, Menlo, monospace; color: var(--p-mute); margin-left: auto; }
#ns-panel .p-foot { border-top: 1px solid var(--p-line); padding: 10px 12px; display: flex; gap: 6px; flex-wrap: wrap; }
#ns-panel .p-foot button { flex: 1; padding: 8px 6px; border: 1px solid var(--p-line); border-radius: 6px; color: #C8C8C8; font-size: 11px; }
#ns-panel .p-foot button:hover { border-color: #555; color: #fff; }
#ns-panel .presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#ns-panel .pr { text-align: left; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--p-line); display: grid; gap: 2px; min-height: 54px; align-content: end; }
#ns-panel .pr b { font-size: 12px; font-weight: 600; }
#ns-panel .pr span { font-size: 10px; opacity: .7; }
#ns-panel .pr:hover { border-color: #666; }
#ns-panel .pr-dark { background: #111111; color: #F3EFE6; font-family: 'Allo', system-ui, sans-serif; }
#ns-panel .pr-light { background: #F7F6F2; color: #0F0F0E; }
#ns-panel .pr-inter { background: #0F0F0E; color: #F1EEE8; font-family: 'Inter Tight', sans-serif; }
#ns-panel .pr-poster { background: #E7DECD; color: #E3261C; }
#ns-panel .pr-allo { background: #111; color: #E3B778; font-family: "Allo", system-ui, sans-serif; }
#ns-panel .pr-allo b { font-weight: 800; color: #F3EFE6; }
@media (max-width: 820px) {
  #ns-panel { width: min(360px, 92vw); }
  html.ns-open #ns-panel { box-shadow: -20px 0 60px rgb(0 0 0 / .4); }
}

#ns-panel .new { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .05em; line-height: 1; color: #06210F; background: #4ADE80; padding: 3px 5px 2px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; }

/* text editing from the panel */
[data-tekstedit="on"] .ns-hov { outline: 1px dashed var(--tint, #FF5A4E); outline-offset: 3px; cursor: text; }
.ns-editing { outline: 2px solid var(--tint, #FF5A4E); outline-offset: 3px; cursor: text; }
#ns-panel .p-edit { padding: 12px 16px 14px; border-bottom: 1px solid var(--p-line); display: grid; gap: 8px; }
#ns-panel .p-edit button { padding: 9px 10px; border: 1px solid var(--p-line); border-radius: 6px; color: #C8C8C8; font-size: 12px; text-align: center; }
#ns-panel .p-edit button:hover { border-color: #555; color: #fff; }
#ns-panel .p-edit button[aria-pressed="true"] { background: var(--p-fg); color: #111; border-color: var(--p-fg); }
#ns-panel .p-edit small { color: var(--p-mute); font-size: 11px; line-height: 1.4; }
#ns-panel .p-edit .p-edit-reset { font-size: 11px; padding: 6px 10px; }
