/* Transmute — transmute.run
   One stylesheet for every page: front pages (EN/DA), guides, cheat sheet, privacy, search, 404.
   Identity: a terminal that happens to be a website. IBM Plex Sans for reading, IBM Plex Mono for
   everything that runs, one teal accent, dark terminal blocks in both themes.
   Layout tokens are shared by header, main and footer so nothing moves between pages. */

/* Fonts are served from here (latin subset, covers Danish), so no third-party request blocks rendering. */
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url(/fonts/plex-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/plex-mono-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/plex-mono-500-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Layout */
  --w-page: 1200px;
  --w-wide: 1400px;
  --w-prose: 72ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 64px;
  --family-h: 28px;
  --space-section: clamp(2.5rem, 6vw, 5rem);
  --measure: 66ch;
  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 180ms;

  /* Type */
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  /* Light palette */
  --bg: #f5f6f4;
  --surface: #ffffff;
  --surface-2: #eef0ee;
  --ink: #171a1e;
  --ink-2: #4a525a;
  --ink-3: #626b73;
  --line: #dbe0e2;
  --accent: #0f7b6c;
  --accent-hover: #0b6558;
  --accent-soft: #e3f2ee;
  --on-accent: #ffffff;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --warn: #8a5a00;
  --warn-soft: #fdf4e3;
  --warn-line: #e8d3a8;
  --header-bg: rgba(245, 246, 244, 0.86);
  --shadow: 0 18px 50px -20px rgba(23, 26, 30, 0.35);

  --term-bg: #15181c;
  --term-bar: #1e2226;
  --term-fg: #e6eae8;
  --term-dim: #97a1a7;
  --term-accent: #5fd3bc;
  --term-string: #c8e39a;
  --term-line: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] {
  --bg: #111416;
  --surface: #191d20;
  --surface-2: #1f2428;
  --ink: #e8eaea;
  --ink-2: #a3abb1;
  --ink-3: #7c858c;
  --line: #2a2f33;
  --accent: #3fcdb2;
  --accent-hover: #6adcc6;
  --accent-soft: #14302b;
  --on-accent: #0f1a17;
  --danger: #ff8a80;
  --danger-soft: #3a1d1b;
  --warn: #f0b429;
  --warn-soft: #2e2512;
  --warn-line: #4d3d18;
  --header-bg: rgba(17, 20, 22, 0.82);
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --term-bg: #0b0d0e;
  --term-bar: #141719;
  --term-dim: #8e979d;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111416;
    --surface: #191d20;
    --surface-2: #1f2428;
    --ink: #e8eaea;
    --ink-2: #a3abb1;
    --ink-3: #7c858c;
    --line: #2a2f33;
    --accent: #3fcdb2;
    --accent-hover: #6adcc6;
    --accent-soft: #14302b;
    --on-accent: #0f1a17;
    --danger: #ff8a80;
    --danger-soft: #3a1d1b;
    --warn: #f0b429;
    --warn-soft: #2e2512;
    --warn-line: #4d3d18;
    --header-bg: rgba(17, 20, 22, 0.82);
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
    --term-bg: #0b0d0e;
    --term-bar: #141719;
    --term-dim: #8e979d;
  }
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; scroll-padding-top: calc(var(--header-h) + 1rem); }
html.palette-open { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1 0 auto; }

.container { width: 100%; max-width: var(--w-page); margin-inline: auto; padding-inline: var(--gutter); }
.layout-wide { max-width: var(--w-wide); }
main.container { padding-block: var(--space-section); }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; transition: color var(--t) var(--ease); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1:focus, h1:focus-visible { outline: none; }

h1, h2, h3 { font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.6em; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.85rem, 1.2rem + 3vw, 3rem); letter-spacing: -0.025em; max-width: 24ch; }
h2 { font-size: 1.55rem; margin-top: 0; }
h3 { font-size: 1.125rem; margin-top: 1.6em; }
p, ul, ol, table, pre, blockquote { margin: 0 0 1.1em; }
p, li, blockquote { max-width: var(--measure); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 600; }
small { font-size: 0.875rem; color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
img, svg { max-width: 100%; height: auto; }
img { display: block; }
kbd { font: 500 0.72rem/1 var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0.25em 0.45em; background: var(--surface); white-space: nowrap; }
mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 2px; padding: 0; }
svg.icon { width: 1em; height: 1em; vertical-align: -0.15em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  padding: 0.5rem 0.75rem; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; z-index: 60;
}
.skip:focus { top: 1rem; }

/* Family bar: the one piece of navigation shared with the other Mahope sites */

.family-bar { height: var(--family-h); font-size: 0.75rem; line-height: var(--family-h); color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.family-bar nav { display: flex; align-items: center; gap: 0.75rem; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.family-bar nav::-webkit-scrollbar { display: none; }
.family-bar span { flex-shrink: 0; }
.family-bar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.9rem; max-width: none; }
.family-bar li { margin: 0; max-width: none; }
.family-bar li.all { margin-left: auto; padding-left: 0.9rem; }
.family-bar a { color: var(--ink-2); text-decoration: none; }
.family-bar a:hover { color: var(--ink); }
.family-bar a[aria-current] { color: var(--accent); font-weight: 600; }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55em; font-weight: 600; font-size: 1.125rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 1.15em; height: 1.15em; border-radius: 4px; background: var(--accent); flex-shrink: 0; }
.brand .mark path { fill: var(--on-accent); }

.site-nav { margin-left: 0.5rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; max-width: none; }
.site-nav li { margin: 0; max-width: none; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: 0.95rem; padding: 0.2em 0;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: color var(--t) var(--ease), background-size var(--t) var(--ease);
}
.site-nav a:hover { color: var(--ink); background-size: 100% 1px; }
.site-nav a[aria-current="page"] { color: var(--ink); background-size: 100% 1px; }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.header-tools > * { height: 2.25rem; }

.search-open, .theme-toggle, .nav-toggle, .lang-switch {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  appearance: none; background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 0 0.6rem; cursor: pointer;
  font: 500 0.875rem/1 var(--sans); text-decoration: none;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.search-open:hover, .theme-toggle:hover, .nav-toggle:hover, .lang-switch:hover { border-color: var(--ink-3); color: var(--ink); }
.search-open .icon, .theme-toggle .icon, .nav-toggle .icon { width: 1.15rem; height: 1.15rem; }
.search-open { min-width: 2.25rem; }
.search-open kbd { margin-left: 0.35em; }
.lang-switch { width: 2.6rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; }
.lang-switch.is-hidden { visibility: hidden; }
.theme-toggle { width: 2.25rem; padding: 0; display: none; }
.js .theme-toggle { display: inline-flex; }
.theme-toggle .moon { display: none; }
[data-theme-effective="dark"] .theme-toggle .sun { display: none; }
[data-theme-effective="dark"] .theme-toggle .moon { display: block; }

.nav-toggle { width: 2.25rem; padding: 0; display: none; }
.nav-toggle .icon line { transition: transform var(--t) var(--ease), opacity var(--t) var(--ease); transform-origin: center; }
.nav-toggle[aria-expanded="true"] .l1 { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .l2 { opacity: 0; }
.nav-toggle[aria-expanded="true"] .l3 { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 767px) {
  .search-open span, .search-open kbd { display: none; }
  .search-open { width: 2.25rem; padding: 0; }
}
@media (max-width: 719px) {
  .site-nav { margin: 0; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: 0.5rem 0 0.75rem;
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
  }
  .js .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .js .site-nav ul { flex-direction: column; gap: 0; max-width: var(--w-page); margin-inline: auto; padding-inline: var(--gutter); }
  .js .site-nav a { display: block; padding: 0.7em 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); background: none; }
  .js .site-nav li:last-child a { border-bottom: 0; }
  html:not(.js) .site-header { height: auto; min-height: var(--header-h); }
  html:not(.js) .site-header .container { flex-wrap: wrap; padding-block: 0.6rem; row-gap: 0.4rem; }
  html:not(.js) .site-nav { order: 3; width: 100%; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; gap: 0.5rem 1rem; }
}

/* Footer */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: 0.925rem; color: var(--ink-2); }
.site-footer .container { padding-block: 3rem 2rem; }
.footer-grid { display: grid; gap: 2rem 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.3fr 0.8fr 0.8fr 1.3fr; } }
.footer-col h2 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); margin: 0 0 0.75em; }
.footer-col .brand { font-size: 1rem; margin-bottom: 0.6rem; }
.footer-col p { margin: 0 0 0.6em; max-width: 34ch; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 0.35em; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer a[aria-current] { color: var(--ink); font-weight: 500; }
.report-bug .icon { margin-right: 0.35em; }
.bb-badge { font-size: 0.8rem; color: var(--ink-3); margin-top: 0.9em; }
.bb-badge a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 0.15em; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; font-size: 0.85rem; color: var(--ink-3); }
.footer-bottom p { margin: 0; max-width: none; }
.lang-switch-footer { height: 2rem; }

/* Terminal blocks */

pre {
  position: relative;
  background: var(--term-bg);
  color: var(--term-fg);
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  overflow-x: auto;
  tab-size: 2;
  max-width: 100%;
  border: 1px solid var(--term-line);
}
.js pre:has(> .copy) { padding-top: 2.4rem; }
pre code { font: inherit; background: none; padding: 0; color: inherit; }
code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
pre .p, pre .prompt { color: var(--term-accent); user-select: none; }
pre .out, pre .cm, pre .nm { color: var(--term-dim); }
pre .str { color: var(--term-string); }
pre .kw { color: var(--term-fg); font-weight: 500; }
pre .cmd { color: var(--term-fg); }

.copy {
  position: absolute; top: 0.55rem; right: 0.6rem;
  display: inline-flex; align-items: center; gap: 0.4em;
  font: 500 0.75rem/1 var(--sans); color: var(--term-dim);
  background: var(--term-bar); border: 1px solid var(--term-line); border-radius: 6px;
  padding: 0.4em 0.65em; cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.copy:hover { color: var(--term-fg); border-color: rgba(255, 255, 255, 0.25); }
.copy:focus-visible { outline-color: var(--term-accent); }
.copy .icon { width: 0.95em; height: 0.95em; }
.copy.is-done { color: var(--term-accent); border-color: var(--term-accent); }
.copy-inline { position: static; margin-left: 0.6em; background: var(--surface); color: var(--ink-2); border-color: var(--line); vertical-align: middle; }
.copy-inline:hover { color: var(--ink); border-color: var(--ink-3); }
.copy-inline.is-done { color: var(--accent); border-color: var(--accent); }

/* Buttons and inputs */

.btn {
  display: inline-flex; align-items: center; gap: 0.5em; padding: 0.55em 1.1em; border-radius: 8px; font-weight: 500; font-size: 0.975rem;
  text-decoration: none; border: 1px solid transparent; line-height: 1.3; cursor: pointer; font-family: inherit;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-quiet { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-quiet:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-ghost { color: var(--ink-2); background: transparent; }
.btn-ghost:hover { color: var(--ink); background: var(--surface-2); }

.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field > label, .field-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
input[type="search"], input[type="text"], textarea, select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 0.55em 0.8em; width: 100%; min-width: 0;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
input[type="search"]:focus, input[type="text"]:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea { font-family: var(--mono); font-size: 0.85rem; line-height: 1.55; resize: vertical; tab-size: 2; }
select { width: auto; font-size: 0.8rem; font-weight: 500; padding: 0.3em 0.5em; border-radius: 6px; cursor: pointer; }
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

/* Front page */

.hero { padding: 0 0 var(--space-section); display: grid; gap: 2rem; align-items: center; }
@media (min-width: 1100px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; } }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 52ch; margin-bottom: 1.6rem; }
.hero .install { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.hero .install code { font-size: 0.95rem; padding: 0.45em 0.8em; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }
.hero pre { margin: 0; font-size: 0.9rem; }
.hero-terminal { min-width: 0; }

.formats-row { list-style: none; padding: 0; margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: none; }
.formats-row li { margin: 0; font: 500 0.8rem/1 var(--mono); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.45em 0.8em; }

.section { padding: var(--space-section) 0 0; min-width: 0; }
.hero + .section, main > .section:first-child { padding-top: 0; }
.section > h2 { margin-bottom: 1rem; }
.section .intro { color: var(--ink-2); margin-bottom: 1.75rem; }

.examples { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .examples { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
.example { min-width: 0; display: flex; flex-direction: column; }
.example h3 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.example p { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 0.7rem; }
.example pre { margin: auto 0 0; }

.two-col { display: grid; gap: 2.5rem; min-width: 0; }
.two-col > * { min-width: 0; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* Playground */

.try { }
.try-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .try-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .try-grid .try-output { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .try-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1.1fr); } .try-grid .try-output { grid-column: auto; } }
.try textarea { min-height: 15rem; }
.try-output { position: relative; display: flex; flex-direction: column; min-width: 0; }
.try-output pre { margin: 0; flex: 1; min-height: 15rem; white-space: pre; padding-top: 1rem !important; }
.try-output .copy { top: 2.55rem; }
.try-output pre[data-role="output"] { border-color: var(--term-line); }
.try.has-error .try-output pre { border-color: var(--danger); color: var(--danger); }
.try-status { font: 500 0.75rem/1 var(--mono); color: var(--ink-3); min-width: 3em; text-align: right; }
.try-warnings { margin-top: 0.6rem; padding: 0.65rem 0.75rem; border: 1px solid var(--warn-line); border-left-width: 3px; border-radius: 8px; background: var(--warn-soft); }
.try-warnings[hidden] { display: none; }
.try-warnings-label { margin: 0 0 0.35rem; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--warn); }
.try-warnings ul { margin: 0; padding-left: 1.1rem; }
.try-warnings li { font: 400 0.8rem/1.45 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }
.try-warnings li::marker { color: var(--warn); }
.try-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; max-width: none; }
.try-presets li { margin: 0; }
.try-presets button { font: 500 0.825rem/1 var(--sans); padding: 0.5em 0.85em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: border-color var(--t) var(--ease), color var(--t) var(--ease), background-color var(--t) var(--ease); }
.try-presets button:hover { border-color: var(--ink-3); color: var(--ink); }
.try-presets button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.try-command { margin: 1rem 0 0; font-size: 0.9rem; color: var(--ink-2); max-width: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em; }
.try-command code { color: var(--ink); }
.try-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0; max-width: none; }
.share.is-done { color: var(--accent); border-color: var(--accent); }
.try-static-note { color: var(--ink-2); font-size: 0.925rem; }
.js .try-static-note { display: none; }

/* Tables */

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55em 0.75em; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); font-size: 0.875rem; background: var(--surface); position: sticky; top: 0; z-index: 1; }
tbody tr:nth-child(even) td, tr:nth-child(even):not(:first-child) td { background: color-mix(in srgb, var(--ink) 3%, transparent); }
td code { white-space: nowrap; }
td:first-child { white-space: nowrap; }
.table-wrap { overflow: auto; margin-bottom: 1.1em; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); max-height: 70vh; }
.table-wrap table { margin: 0; min-width: 28rem; }
.table-wrap tr:last-child td { border-bottom: 0; }

.formats dt { font-weight: 600; margin-top: 0.9em; }
.formats dd { margin: 0.15em 0 0; color: var(--ink-2); max-width: var(--measure); }

.guide-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
@media (min-width: 820px) { .guide-list { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.guide-list li { margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: none; }
.guide-list a {
  display: grid; grid-template-columns: 1.5rem 1fr; column-gap: 0.85rem; align-items: start;
  padding: 0.9em 0.4em 0.9em 0; margin-left: -0.4em; padding-left: 0.4em; border-radius: 6px;
  font-weight: 500; text-decoration: none; color: var(--ink);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.guide-list a:hover { color: var(--accent); background: var(--accent-soft); }
.guide-list .icon { width: 1.35rem; height: 1.35rem; margin-top: 0.15rem; color: var(--accent); }
.guide-list .t { display: block; min-width: 0; }
.guide-list .t > span { display: block; color: var(--ink-2); font-size: 0.925rem; margin-top: 0.15em; font-weight: 400; }

.faq details { border-top: 1px solid var(--line); padding: 0.9em 0; max-width: var(--measure); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--ink-3); transition: transform var(--t) var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { margin: 0.75em 0 0; color: var(--ink-2); }
.faq details p code { overflow-wrap: anywhere; }
.faq details:target { background: var(--accent-soft); margin-inline: calc(-1 * var(--gutter) / 2); padding-inline: calc(var(--gutter) / 2); border-radius: 6px; }

.maker { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 720px) { .maker { grid-template-columns: 1fr 1fr; } }
.maker p { margin-bottom: 0.7em; }

/* Documents: guides, cheat sheet, privacy */

.crumbs { font-size: 0.9rem; color: var(--ink-2); margin: 0 0 1.5rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35em; max-width: none; }
.crumbs li { margin: 0; display: inline-flex; align-items: center; gap: 0.35em; }
.crumbs a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 0.35em; }
.crumbs a:hover { color: var(--ink); }
.crumbs .icon { color: var(--ink-3); width: 0.85em; height: 0.85em; }
.crumbs [aria-current] { color: var(--ink); }

.doc-layout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.doc-layout .toc-side { order: -1; }
@media (min-width: 1100px) { .doc-layout .toc-side { order: 0; } }
@media (min-width: 1100px) { .doc-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 4rem; } .doc-layout.no-toc { grid-template-columns: minmax(0, 1fr); } }
.prose { max-width: var(--w-prose); min-width: 0; }
.prose h1 { max-width: 22ch; }
.prose h2 { margin-top: 2.2em; font-size: 1.4rem; scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.prose h3 { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.prose h2:first-of-type { margin-top: 1.5em; }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: 0.6em 1em; margin: 1.2em 0;
  background: var(--surface); border-radius: 0 6px 6px 0; color: var(--ink-2);
}
.prose blockquote p { margin: 0; }
.prose > h1 + p:not(.meta), .prose .lede { font-size: 1.15rem; color: var(--ink-2); }
.prose .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em 1rem; color: var(--ink-3); font-size: 0.875rem; margin: -0.2em 0 1.8em; max-width: none; }
.prose .meta time { color: var(--ink-2); }
.share { display: inline-flex; align-items: center; gap: 0.4em; font: 500 0.8rem/1 var(--sans); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0.4em 0.65em; cursor: pointer; transition: border-color var(--t) var(--ease), color var(--t) var(--ease); }
.share:hover { color: var(--ink); border-color: var(--ink-3); }
a.ext::after { content: ""; display: inline-block; width: 0.7em; height: 0.7em; margin-left: 0.25em; vertical-align: 0; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat; opacity: 0.7; }

.toc-side { min-width: 0; }
@media (min-width: 1100px) { .toc-side { position: sticky; top: calc(var(--header-h) + 1.5rem); max-height: calc(100vh - var(--header-h) - 3rem); overflow: auto; } }
.toc { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 0.75rem 1rem; font-size: 0.9rem; }
.toc summary { cursor: pointer; font-weight: 600; font-size: 0.8rem; color: var(--ink-3); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-family: var(--mono); color: var(--ink-3); }
.toc[open] summary::after { content: "–"; }
@media (min-width: 1100px) { .toc summary { pointer-events: none; } .toc summary::after { content: none !important; } }
.toc ol { list-style: none; margin: 0.6rem 0 0; padding: 0; max-width: none; }
.toc li { margin: 0; max-width: none; }
.toc li.h3 { padding-left: 0.9rem; }
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 0.3em 0.6em; margin-left: -0.6em; border-left: 2px solid transparent; border-radius: 0 4px 4px 0; line-height: 1.35; transition: color var(--t) var(--ease), border-color var(--t) var(--ease); }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--accent); border-color: var(--accent); }

.aside {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; margin: 3rem 0 0; max-width: var(--measure);
}
.aside h2 { font-size: 1.1rem; margin: 0 0 0.5em; }
.aside p { margin: 0 0 0.6em; font-size: 0.975rem; }
.aside p:last-child { margin: 0; }
.aside ul { margin: 0.4em 0 0; font-size: 0.975rem; }

.guide-nav { display: grid; gap: 1rem; margin-top: 2.5rem; max-width: var(--measure); }
@media (min-width: 620px) { .guide-nav { grid-template-columns: 1fr 1fr; } }
.guide-nav a {
  display: block; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--surface);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.guide-nav a:hover { border-color: var(--accent); }
.guide-nav a.next { text-align: right; grid-column: 2; }
@media (max-width: 619px) { .guide-nav a.next { grid-column: auto; } }
.guide-nav small { display: flex; align-items: center; gap: 0.35em; color: var(--ink-3); margin-bottom: 0.3em; }
.guide-nav a.next small { justify-content: flex-end; }
.guide-nav strong { font-weight: 500; }

/* Cheat sheet */

.ref { border-top: 1px solid var(--line); padding: 1.4rem 0 0.4rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.ref h3 { margin: 0 0 0.4em; font-family: var(--mono); font-weight: 500; font-size: 1.05rem; display: flex; align-items: baseline; gap: 0.6em; flex-wrap: wrap; }
.ref h3 .sig { font-size: 0.8rem; color: var(--ink-3); font-weight: 400; }
.ref h3 a { color: inherit; text-decoration: none; }
.ref h3 a:hover::after { content: " #"; color: var(--ink-3); }
.ref p { color: var(--ink-2); font-size: 0.975rem; }
.ref pre { font-size: 0.8rem; }
.ref-grid { display: grid; gap: 0 2.5rem; }
@media (min-width: 1100px) { .doc-layout.layout-cheat { grid-template-columns: minmax(0, 1fr) 220px; } }

/* Search: page and palette */

.search-form { position: relative; display: flex; align-items: center; margin-bottom: 1rem; max-width: 40rem; }
.search-form .icon { position: absolute; left: 0.85rem; color: var(--ink-3); width: 1.1rem; height: 1.1rem; pointer-events: none; }
.search-form input { padding-left: 2.6rem; font-size: 1.05rem; padding-block: 0.7em; }
.search-count { font-size: 0.875rem; color: var(--ink-3); margin: 0 0 1.5rem; }
.search-results { max-width: 44rem; }
.search-group { margin-bottom: 1.75rem; }
.search-group h3 { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); margin: 0 0 0.5em; letter-spacing: 0.01em; }
.search-group ul { list-style: none; padding: 0; margin: 0; max-width: none; }
.search-group li { margin: 0; max-width: none; }
.search-group a { display: block; text-decoration: none; color: var(--ink); padding: 0.6em 0.75em; margin-left: -0.75em; border-radius: 8px; transition: background-color var(--t) var(--ease); }
.search-group a:hover, .search-group li[aria-selected="true"] a { background: var(--accent-soft); color: var(--ink); }
.r-title { display: flex; align-items: center; gap: 0.5em; font-weight: 500; }
.r-snip { display: block; color: var(--ink-2); font-size: 0.9rem; line-height: 1.45; margin-top: 0.1em; }
.r-url { display: block; font: 0.75rem/1.4 var(--mono); color: var(--ink-3); margin-top: 0.2em; overflow-wrap: anywhere; }
.badge { font: 500 0.65rem/1 var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0.2em 0.35em; }
.search-empty { color: var(--ink-2); }

.palette { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 14, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: clamp(1rem, 10vh, 6rem) var(--gutter) 1rem; }
.palette[hidden] { display: none; }
.palette-box { width: min(100%, 40rem); max-height: calc(100vh - clamp(1rem, 10vh, 6rem) - 1rem); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.palette-form { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.palette-form .icon { color: var(--ink-3); width: 1.2rem; height: 1.2rem; }
.palette-form input { border: 0; background: none; padding: 0.4em 0; font-size: 1.1rem; box-shadow: none !important; }
.palette-results { overflow: auto; padding: 0.75rem 1rem; }
.palette-results[hidden] { display: none; }
.palette-results .search-group { margin-bottom: 1rem; }
.palette-results .search-group a { margin-left: 0; }
.palette-results .r-url { display: none; }
.palette-hint { margin: 0; padding: 0.6rem 1rem; border-top: 1px solid var(--line); font-size: 0.775rem; color: var(--ink-3); max-width: none; }
.palette-hint a { color: var(--ink-2); }
@media (max-width: 600px) { .palette { padding: 0.5rem; align-items: stretch; } .palette-box { max-height: calc(100vh - 1rem); border-radius: 10px; } .palette-hint { display: none; } }
@media (prefers-reduced-motion: no-preference) { .palette-box { animation: rise 160ms var(--ease) both; } }

/* 404 */

.error-page .code { font: 500 0.9rem var(--mono); color: var(--accent); margin-bottom: 1rem; }
.error-page h1 { margin-bottom: 0.4em; }
.error-page .search-form { margin-top: 1.5rem; }

/* Back to top: bottom-left, so BugBottle keeps bottom-right */

.to-top { position: fixed; left: 1rem; bottom: 1rem; z-index: 30; width: 2.6rem; height: 2.6rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow); transition: color var(--t) var(--ease), border-color var(--t) var(--ease); }
.to-top[hidden] { display: none; }
.to-top:hover { color: var(--ink); border-color: var(--ink-3); }
.to-top .icon { transform: rotate(-90deg); width: 1.1rem; height: 1.1rem; }
@media (prefers-reduced-motion: no-preference) { .to-top { animation: rise 200ms var(--ease) both; } }

/* Motion: one page-load moment in the hero, then only user-triggered transitions. */

@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 600ms var(--ease) both; }
  .hero > :nth-child(2) { animation-delay: 120ms; }
  .prose > h1, .crumbs, .error-page > * { animation: rise 500ms var(--ease) both; }
  .prose > h1 { animation-delay: 60ms; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}

/* Print */

@media print {
  .family-bar, .site-header, .site-footer, .copy, .share, .to-top, .toc-side, .guide-nav, .try-presets, .skip, .palette { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main.container { padding-block: 0; max-width: none; }
  .doc-layout { display: block; }
  .prose { max-width: none; }
  pre { background: #f3f3f3 !important; color: #000 !important; border: 1px solid #ccc; white-space: pre-wrap; }
  pre .p, pre .out, pre .cm, pre .str { color: #333 !important; }
  a { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after, .section a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; background: none; mask: none; -webkit-mask: none; width: auto; height: auto; display: inline; margin: 0; }
  .faq details { break-inside: avoid; }
  .faq details:not([open]) > *:not(summary) { display: block; }
}
