/* mURL site — design system
   -------------------------------------------------------------------------
   Technical editorial. Dark canvas by default, a real light theme, one
   accent, three tier colours that never double as decoration. Monospace is
   part of the identity: murl:// is the logo. Instrument Serif italic is the
   one flourish, reserved for a single emphasised word in a headline.

   Fonts and libraries are vendored (see vendor/VENDOR.md): no runtime
   request leaves this origin. */

/* ---- fonts ------------------------------------------------------------ */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("vendor/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("vendor/fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("vendor/fonts/ibm-plex-mono-600.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: normal; font-display: swap; src: url("vendor/fonts/instrument-serif-400.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("vendor/fonts/instrument-serif-400-italic.woff2") format("woff2"); }

/* ---- tokens ----------------------------------------------------------- */
:root {
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;

  /* dark is the default; light overrides below */
  --bg-0: #0a0c10;          /* canvas */
  --bg-1: #10141a;          /* raised: cards, header */
  --bg-2: #161b23;          /* sunk: code, inputs */
  --bg-3: #1d232d;          /* hover */
  --line: #212934;
  --line-strong: #2f3947;
  --fg-0: #eef1f4;
  --fg-1: #a7b0bb;
  --fg-2: #6b7481;
  --accent: #5ad3f2;
  --accent-strong: #8ee3fb;
  --accent-ink: #04141b;
  --accent-soft: rgba(90, 211, 242, 0.12);
  --accent-line: rgba(90, 211, 242, 0.35);
  --safe: #3ddc97;      --safe-soft: rgba(61, 220, 151, 0.13);
  --sensitive: #f5b841; --sensitive-soft: rgba(245, 184, 65, 0.14);
  --danger: #ff6b6b;    --danger-soft: rgba(255, 107, 107, 0.14);
  --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 30px rgba(0,0,0,0.35);
  --glow: radial-gradient(60% 50% at 50% -10%, rgba(90,211,242,0.16), transparent 70%);
  --grid: rgba(255,255,255,0.035);
  --selection: rgba(90, 211, 242, 0.3);

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px;
  --wrap: 74rem; --prose: 46rem;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg-0: #f7f8fa; --bg-1: #ffffff; --bg-2: #eff2f5; --bg-3: #e6eaef;
  --line: #e2e7ec; --line-strong: #c9d2db;
  --fg-0: #0e1420; --fg-1: #4b5563; --fg-2: #7b8794;
  --accent: #0b7fb2; --accent-strong: #096c98; --accent-ink: #ffffff;
  --accent-soft: rgba(11, 127, 178, 0.10); --accent-line: rgba(11, 127, 178, 0.35);
  --safe: #15803d;      --safe-soft: rgba(21, 128, 61, 0.11);
  --sensitive: #b45309; --sensitive-soft: rgba(180, 83, 9, 0.12);
  --danger: #b91c1c;    --danger-soft: rgba(185, 28, 28, 0.10);
  --shadow: 0 1px 2px rgba(15,23,42,0.06), 0 10px 30px rgba(15,23,42,0.08);
  --glow: radial-gradient(60% 50% at 50% -10%, rgba(11,127,178,0.12), transparent 70%);
  --grid: rgba(15,23,42,0.05);
  --selection: rgba(11, 127, 178, 0.2);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg-0: #f7f8fa; --bg-1: #ffffff; --bg-2: #eff2f5; --bg-3: #e6eaef;
    --line: #e2e7ec; --line-strong: #c9d2db;
    --fg-0: #0e1420; --fg-1: #4b5563; --fg-2: #7b8794;
    --accent: #0b7fb2; --accent-strong: #096c98; --accent-ink: #ffffff;
    --accent-soft: rgba(11, 127, 178, 0.10); --accent-line: rgba(11, 127, 178, 0.35);
    --safe: #15803d;      --safe-soft: rgba(21, 128, 61, 0.11);
    --sensitive: #b45309; --sensitive-soft: rgba(180, 83, 9, 0.12);
    --danger: #b91c1c;    --danger-soft: rgba(185, 28, 28, 0.10);
    --shadow: 0 1px 2px rgba(15,23,42,0.06), 0 10px 30px rgba(15,23,42,0.08);
    --glow: radial-gradient(60% 50% at 50% -10%, rgba(11,127,178,0.12), transparent 70%);
    --grid: rgba(15,23,42,0.05);
    --selection: rgba(11, 127, 178, 0.2);
    color-scheme: light;
  }
}

/* ---- base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg-0); color: var(--fg-0);
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background-image: var(--glow); background-repeat: no-repeat;
}
::selection { background: var(--selection); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: .2em; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .6em; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 4rem); letter-spacing: -0.03em; font-weight: 600; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
p, li { max-width: var(--prose); }
ul, ol { padding-left: 1.3rem; }
li { margin: .3rem 0; }
strong { font-weight: 600; }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
img, svg { max-width: 100%; }
code, kbd, pre, samp { font-family: var(--font-mono); font-size: .92em; }
code { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .1em .4em; }
pre {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1rem 1.2rem; overflow-x: auto; line-height: 1.55; font-size: .875rem; margin: 0 0 1.25rem;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: .05em .4em; font-size: .8em; background: var(--bg-1); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-2); font-weight: 600; }
.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: var(--r-md); }
.table-scroll table { margin: 0; }
.table-scroll th { background: var(--bg-1); }

/* ---- type utilities --------------------------------------------------- */
.display { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem; display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 1.4rem; height: 1px; background: var(--accent); opacity: .7; }
.lede { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); color: var(--fg-1); line-height: 1.5; max-width: 40rem; text-wrap: pretty; }
.small { font-size: .875rem; color: var(--fg-1); }
.muted { color: var(--fg-1); }
.faint { color: var(--fg-2); }
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---- layout ----------------------------------------------------------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.wrap-narrow { max-width: var(--prose); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
main { padding: 0 0 5rem; }
section { padding: clamp(3rem, 6vw, 6rem) 0; }
section + section { border-top: 1px solid var(--line); }
.grid { display: grid; gap: 1.25rem; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 62rem) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 62rem) { .split { grid-template-columns: 1.05fr .95fr; } }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.dots { background-image: radial-gradient(var(--grid) 1px, transparent 1px); background-size: 22px 22px; }

/* ---- header ----------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-0) 72%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 3.75rem; }
.brand {
  font-family: var(--font-mono); font-weight: 600; font-size: 1.05rem; color: var(--fg-0);
  display: inline-flex; align-items: center; gap: .55rem; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--fg-0); }
.brand .mark {
  width: 1.4rem; height: 1.4rem; border-radius: 6px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-ink);
  font-size: .85rem; font-weight: 700;
}
.brand .scheme { color: var(--accent); }
.site-head nav { display: flex; align-items: center; gap: .25rem; }
.site-head nav a {
  color: var(--fg-1); font-size: .92rem; font-weight: 500; padding: .45rem .7rem; border-radius: var(--r-sm);
}
.site-head nav a:hover { color: var(--fg-0); background: var(--bg-3); text-decoration: none; }
.site-head nav a[aria-current="page"] { color: var(--fg-0); background: var(--bg-2); }
.site-head .actions { display: flex; align-items: center; gap: .35rem; }
.icon-btn {
  appearance: none; border: 1px solid var(--line); background: var(--bg-1); color: var(--fg-1);
  width: 2.25rem; height: 2.25rem; border-radius: var(--r-sm); display: inline-grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { color: var(--fg-0); border-color: var(--line-strong); background: var(--bg-3); }
.icon-btn .icon { width: 1.05rem; height: 1.05rem; }
[data-theme-toggle] .icon-moon { display: none; }
:root[data-theme="light"] [data-theme-toggle] .icon-sun { display: none; }
:root[data-theme="light"] [data-theme-toggle] .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) [data-theme-toggle] .icon-sun { display: none; }
  :root:not([data-theme]) [data-theme-toggle] .icon-moon { display: block; }
}
.nav-toggle { display: none; }
@media (max-width: 52rem) {
  .nav-toggle { display: inline-grid; }
  .site-head nav {
    display: none; position: absolute; left: 0; right: 0; top: 3.75rem; flex-direction: column; align-items: stretch;
    background: var(--bg-1); border-bottom: 1px solid var(--line); padding: .5rem; gap: .1rem;
  }
  .site-head.open nav { display: flex; }
  .site-head nav a { padding: .7rem .9rem; }
}

/* ---- footer ----------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--fg-2); font-size: .875rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.site-foot a { color: var(--fg-1); }
.site-foot p { margin: 0; }
.site-foot .brand { font-size: .95rem; }

/* ---- icons ------------------------------------------------------------ */
.icon {
  width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---- buttons ---------------------------------------------------------- */
.btn {
  appearance: none; border: 1px solid var(--line-strong); background: var(--bg-1); color: var(--fg-0);
  font: inherit; font-weight: 500; font-size: .95rem; padding: .6rem 1rem; border-radius: var(--r-md);
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; line-height: 1;
  transition: transform .15s var(--ease), background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--bg-3); border-color: var(--fg-2); text-decoration: none; color: var(--fg-0); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 1rem; height: 1rem; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-1); }
.btn-ghost:hover { background: var(--bg-3); border-color: transparent; }
.btn-sm { font-size: .82rem; padding: .4rem .7rem; }
.btn-mono { font-family: var(--font-mono); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---- badges & tier pills ---------------------------------------------- */
.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0; }
.badge {
  font-family: var(--font-mono); font-size: .76rem; padding: .28em .7em; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--fg-1); background: var(--bg-1);
}
.badge.warn { color: var(--sensitive); border-color: color-mix(in srgb, var(--sensitive) 45%, transparent); background: var(--sensitive-soft); }
.badge.accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.pill {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: .22em .55em; border-radius: 5px; white-space: nowrap; display: inline-flex; align-items: center; gap: .35em; line-height: 1.2;
}
.pill.safe { color: var(--safe); background: var(--safe-soft); }
.pill.sensitive { color: var(--sensitive); background: var(--sensitive-soft); }
.pill.dangerous { color: var(--danger); background: var(--danger-soft); }
.pill.kind { color: var(--fg-1); background: var(--bg-2); border: 1px solid var(--line); font-weight: 500; text-transform: none; letter-spacing: 0; }
.tier-name { font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em; font-size: .8rem; }
.tier-safe .tier-name { color: var(--safe); }
.tier-sensitive .tier-name { color: var(--sensitive); }
.tier-dangerous .tier-name { color: var(--danger); }
.t-safe { color: var(--safe); } .t-sensitive { color: var(--sensitive); } .t-danger { color: var(--danger); }

/* ---- cards & notes ---------------------------------------------------- */
.cards { display: grid; gap: 1rem; margin: 1.5rem 0; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 48rem) { .cards.two, .cards.three { grid-template-columns: 1fr; } }
.card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.35rem 1.4rem;
  position: relative; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.card:hover { border-color: var(--line-strong); }
.card.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .5rem; }
.card p { margin-bottom: .6rem; color: var(--fg-1); font-size: .95rem; }
.card p:last-child { margin-bottom: 0; }
.card .icon-lg { width: 1.5rem; height: 1.5rem; color: var(--accent); margin-bottom: .9rem; display: block; }
.card.tier { border-top: 3px solid var(--line-strong); }
.card.tier-safe { border-top-color: var(--safe); }
.card.tier-sensitive { border-top-color: var(--sensitive); }
.card.tier-dangerous { border-top-color: var(--danger); }
.note {
  border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--bg-1);
  border-radius: var(--r-md); padding: 1rem 1.2rem; margin: 1.5rem 0; font-size: .95rem; color: var(--fg-1);
}
.note strong { color: var(--fg-0); }
.note p:last-child { margin-bottom: 0; }
.note.warn { border-left-color: var(--sensitive); }
.note.danger { border-left-color: var(--danger); }
.figure { margin: 1.5rem 0; }
.figure figcaption { color: var(--fg-2); font-size: .85rem; margin-top: .6rem; }
.linklist { list-style: none; padding: 0; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.linklist li { margin: 0; border-top: 1px solid var(--line); max-width: none; }
.linklist li:first-child { border-top: 0; }
.linklist a { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; color: var(--fg-0); font-weight: 500; }
.linklist a:hover { background: var(--bg-3); text-decoration: none; }
.linklist span { color: var(--fg-2); font-weight: 400; font-size: .9rem; }

/* ---- terminal window -------------------------------------------------- */
.terminal {
  background: #0b0f14; color: #d6dee7; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden; font-family: var(--font-mono); font-size: .84rem; line-height: 1.6;
}
:root[data-theme="light"] .terminal { border-color: #1f2937; }
.terminal .bar {
  display: flex; align-items: center; gap: .45rem; padding: .6rem .9rem; background: #10161d; border-bottom: 1px solid #1c242e;
  font-size: .72rem; color: #6b7481;
}
.terminal .bar i { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; }
.terminal .bar i:nth-child(1) { background: #ff5f57; } .terminal .bar i:nth-child(2) { background: #febc2e; } .terminal .bar i:nth-child(3) { background: #28c840; }
.terminal .bar .title { margin-left: auto; margin-right: auto; }
.terminal pre { background: none; border: 0; border-radius: 0; margin: 0; padding: 1rem 1.2rem; color: inherit; font-size: inherit; }
.terminal .prompt { color: #5ad3f2; }
.terminal .cmd { color: #eef1f4; font-weight: 500; }
.terminal .dim { color: #6b7481; }
.terminal .safe { color: #3ddc97; } .terminal .sensitive { color: #f5b841; } .terminal .danger { color: #ff6b6b; }
.terminal .cursor { display: inline-block; width: .55em; height: 1.1em; background: #5ad3f2; vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- code (highlight.js theme, token colours) ------------------------- */
.hljs { color: var(--fg-0); background: transparent; }
.hljs-comment, .hljs-quote { color: var(--fg-2); font-style: italic; }
.hljs-attr, .hljs-property, .hljs-attribute { color: var(--accent); }
.hljs-string, .hljs-regexp { color: var(--safe); }
.hljs-number, .hljs-literal { color: var(--sensitive); }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-type { color: #c792ea; }
:root[data-theme="light"] .hljs-keyword, :root[data-theme="light"] .hljs-built_in, :root[data-theme="light"] .hljs-type { color: #7c3aed; }
.hljs-title, .hljs-function .hljs-title, .hljs-section { color: var(--fg-0); font-weight: 600; }
.hljs-punctuation { color: var(--fg-1); }
.hljs-meta, .hljs-variable, .hljs-template-variable { color: var(--sensitive); }
.hljs-deletion { color: var(--danger); } .hljs-addition { color: var(--safe); }
.codeblock { position: relative; margin: 0 0 1.25rem; }
.codeblock pre { margin: 0; padding-top: 2.4rem; }
.codeblock .lang {
  position: absolute; top: .55rem; left: 1rem; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fg-2);
}
.codeblock .copy { position: absolute; top: .45rem; right: .5rem; }

/* ---- tabs ------------------------------------------------------------- */
.tabs { display: inline-flex; gap: .15rem; padding: .2rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.tabs button {
  appearance: none; border: 0; background: transparent; color: var(--fg-1); font: inherit; font-size: .85rem; font-weight: 500;
  padding: .42rem .8rem; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
}
.tabs button:hover { color: var(--fg-0); }
.tabs button[aria-selected="true"] { background: var(--bg-1); color: var(--fg-0); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
[data-panel] { display: none; }
[data-panel].active { display: block; }

/* ---- forms ------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .8rem; font-weight: 600; color: var(--fg-1); display: flex; justify-content: space-between; gap: .5rem; }
.field label .hint { color: var(--fg-2); font-weight: 400; }
.input, textarea.input {
  font: inherit; font-size: .95rem; color: var(--fg-0); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: .6rem .75rem; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { font-family: var(--font-mono); font-size: .88rem; line-height: 1.6; resize: vertical; min-height: 10rem; }
.input::placeholder { color: var(--fg-2); }

/* ---- toc (docs pages) ------------------------------------------------- */
.docs { display: grid; gap: 3rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 66rem) { .docs { grid-template-columns: 14rem minmax(0, var(--prose)); gap: 4rem; } }
.toc { position: sticky; top: 5rem; font-size: .86rem; display: none; }
@media (min-width: 66rem) { .toc { display: block; } }
.toc .eyebrow { margin-bottom: .6rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; color: var(--fg-1); padding: .3rem 0 .3rem .9rem; margin-left: -1px; border-left: 1px solid transparent; }
.toc a:hover { color: var(--fg-0); text-decoration: none; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }
.prose h2 { margin-top: 3rem; padding-top: .5rem; scroll-margin-top: 5rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: 2rem; }
.prose h2 .anchor { opacity: 0; margin-left: .4rem; font-weight: 400; color: var(--fg-2); font-size: .8em; }
.prose h2:hover .anchor { opacity: 1; }

/* ---- stats ------------------------------------------------------------ */
.stats { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 48rem) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--bg-1); padding: 1.25rem 1.4rem; }
.stat .n { font-family: var(--font-mono); font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; color: var(--fg-0); line-height: 1.1; }
.stat .l { color: var(--fg-2); font-size: .82rem; margin-top: .35rem; }

/* ---- toast ------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  background: var(--fg-0); color: var(--bg-0); font-size: .85rem; font-weight: 500; padding: .55rem .9rem; border-radius: 999px;
  box-shadow: var(--shadow); transition: opacity .2s, transform .25s var(--ease); z-index: 100; display: inline-flex; align-items: center; gap: .45rem;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- reveal (Motion drives these; static without JS) ------------------ */
[data-reveal] { opacity: 0; transform: translateY(14px); }
.no-motion [data-reveal], [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }

/* ---- misc ------------------------------------------------------------- */
.skip { position: absolute; left: -999px; top: .5rem; background: var(--accent); color: var(--accent-ink); padding: .5rem .8rem; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: .5rem; }
.divider { height: 1px; background: var(--line); margin: 2rem 0; }
.kicker { font-family: var(--font-mono); color: var(--fg-2); font-size: .8rem; }
.murl-str { font-family: var(--font-mono); color: var(--fg-0); }
.murl-str .s { color: var(--accent); } .murl-str .a { color: var(--fg-1); } .murl-str .n { color: var(--fg-0); font-weight: 600; } .murl-str .f { color: var(--sensitive); }

/* ---- grid blowout guard ------------------------------------------------
   A 1fr track is minmax(auto, 1fr): its floor is the content min-width, so
   one <pre> with white-space: pre inside any grid column widens the column
   past the viewport and takes the whole page with it. Every page overflowed
   on mobile the same way. Grid children get an explicit zero minimum and
   scrollable code stays inside its box. */
.grid > *, .split > *, .stats > *, .docs > *, .cards > *,
.cols-2 > *, .cols-3 > *, .cols-4 > * { min-width: 0; }
pre, .codeblock, .terminal, .table-scroll { max-width: 100%; }
body { overflow-x: clip; }

/* ---- brand spacing -----------------------------------------------------
   The flex gap meant to separate the mark from the wordmark also separated
   "murl" from "://". Only the mark carries spacing now. */
.brand { gap: 0; }
.brand .mark { margin-right: .55rem; }

/* A scroll container should never dictate the width of the grid around it:
   with size containment its intrinsic inline size is zero, so the column
   is sized by the layout and the code scrolls inside it. */
pre, .table-scroll, textarea { contain: inline-size; }
