/*
 * Atelier website. Tokens are the app's own (design/tokens/tokens.json): the same paper, ink and clay, Inter for
 * the interface, Source Serif 4 for titles, JetBrains Mono for code. Light and dark follow the system unless the
 * visitor picks one (theme.js sets data-theme).
 */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light dark;
  --paper: light-dark(#fcfcfb, #151515);
  --sunken: light-dark(#f6f5f2, #111111);
  --surface: light-dark(#ffffff, #1a1a19);
  --raised: light-dark(#ffffff, #20201f);
  --ink: light-dark(#0b0b0b, #f0efec);
  --ink-2: light-dark(#52514e, #c3c2b7);
  --ink-3: light-dark(#686762, #9c9a94);
  --line: light-dark(rgba(11, 11, 11, 0.1), rgba(255, 255, 255, 0.1));
  --line-soft: light-dark(rgba(11, 11, 11, 0.06), rgba(255, 255, 255, 0.06));
  --line-strong: light-dark(rgba(11, 11, 11, 0.2), rgba(255, 255, 255, 0.2));
  --clay: #c6613f;
  --clay-soft: #d97757;
  --fill: light-dark(#0b0b0b, #ffffff);
  --fill-hover: light-dark(#2a2926, #e1e0d9);
  --on-fill: light-dark(#ffffff, #0b0b0b);
  --focus: #2a78d6;
  --shadow-window: light-dark(0 1px 2px rgba(11, 11, 11, 0.06), 0 1px 2px rgba(0, 0, 0, 0.4));
  --shadow-lift: light-dark(0 30px 80px -30px rgba(11, 11, 11, 0.35), 0 30px 80px -30px rgba(0, 0, 0, 0.8));

  --sans: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 24px;
  --ease: cubic-bezier(0.165, 0.84, 0.44, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--clay) 28%, transparent); }

.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--fill); color: var(--on-fill); text-decoration: none; }
.skip:focus { top: 12px; }

/* One page width for everything, so the header, headline, product window and sections share their edges. */
.wrap, .wrap-wide { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* Type */
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); line-height: 1.04; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.12; }
h3 { font: 600 1rem/1.4 var(--sans); margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.muted { color: var(--ink-3); }
code, kbd { font-family: var(--mono); font-size: 0.9em; }
code { padding: 0.1em 0.35em; border-radius: 5px; background: var(--sunken); border: 1px solid var(--line-soft); }
kbd { padding: 0.12em 0.45em; border-radius: 5px; border: 1px solid var(--line); background: var(--sunken); box-shadow: 0 1px 0 var(--line); white-space: nowrap; }

/* Header */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color 200ms var(--ease); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.375rem/1 var(--serif); letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; }
.nav { display: none; gap: 4px; margin-left: 8px; }
.nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: 0.9375rem; transition: color 150ms, background-color 150ms; }
.nav a:hover { color: var(--ink); background: var(--sunken); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
@media (min-width: 820px) { .nav { display: flex; } }

.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color 150ms, color 150ms; }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .i-sun { display: block; }
  :root:not([data-theme]) .i-moon { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 9px; border: 1px solid transparent; font: 550 0.9375rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color 150ms, border-color 150ms, transform 120ms var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--fill); color: var(--on-fill); }
.btn-primary:hover { background: var(--fill-hover); }
.btn-quiet { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-quiet:hover { background: var(--sunken); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.875rem; }
.btn .icon { width: 17px; height: 17px; }

/* Hero */
.hero { padding-block: clamp(36px, 5.5vw, 72px) 0; }
.hero h1 { max-width: 15em; }
.hero .lead { max-width: 38rem; margin-top: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fine { margin-top: 18px; font-size: 0.875rem; color: var(--ink-3); }
.fine span + span::before { content: "·"; margin-inline: 8px; }

/* The product window: tabs for the rooms, then one big capture */
.showcase { margin-top: clamp(32px, 4vw, 48px); }
.tabs { position: relative; isolation: isolate; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 11px; background: var(--sunken); border: 1px solid var(--line-soft); }
.tab { appearance: none; border: 0; padding: 8px 16px; border-radius: 8px; background: transparent; color: var(--ink-2); font: 500 0.9375rem/1.2 var(--sans); cursor: pointer; transition: background-color 150ms, color 200ms var(--ease); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(11, 11, 11, 0.06); }
.tabs.has-glide .tab[aria-selected="true"] { background: transparent; box-shadow: none; }
/* The highlight behind the chosen tab or section; it glides from one to the next (download.js). */
.has-glide > .glide { position: absolute; z-index: -1; top: 0; left: 0; width: 0; height: 0; border-radius: 8px; transition: transform 320ms var(--ease), width 320ms var(--ease), height 320ms var(--ease); pointer-events: none; }
.tabs > .glide { background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(11, 11, 11, 0.06); }
@media (prefers-reduced-motion: reduce) { .has-glide > .glide { transition: none; } }
.tab-note { margin-top: 14px; max-width: 46rem; color: var(--ink-2); min-height: 4.8em; }
.tab-note strong { color: var(--ink); font-weight: 600; }
.window { position: relative; margin-top: 16px; border-radius: 14px; overflow: hidden; background: #151515; box-shadow: 0 0 0 1px var(--line), var(--shadow-window), var(--shadow-lift); }
.window::before { content: ""; position: absolute; z-index: 1; left: 20px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); box-shadow: 16px 0 0 rgba(255, 255, 255, 0.2), 32px 0 0 rgba(255, 255, 255, 0.2); pointer-events: none; }
.window img { width: 100%; height: auto; aspect-ratio: 4080 / 2550; }
.window [role="tabpanel"][hidden] { display: none; }

/* Sections */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 40rem; }
.section-head .lead { margin-top: 18px; }
.split h2 + .lead { margin-top: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
@media (min-width: 920px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }

.ticks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 22px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 7px; height: 7px; border-radius: 2px; background: var(--clay); }
.ticks strong { color: var(--ink); font-weight: 550; }

.runs { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; padding-top: 22px; border-top: 1px solid var(--line-soft); color: var(--ink-2); font-size: 0.9375rem; }
.runs .label { color: var(--ink-3); font-size: 0.8125rem; letter-spacing: 0.02em; }

.split > .frame, .split > .reveal > .pre { margin-top: 8px; }
.frame { border-radius: 12px; overflow: hidden; background: #1a1a19; box-shadow: 0 0 0 1px var(--line), var(--shadow-window), 0 24px 60px -28px rgba(11, 11, 11, 0.3); }
.frame img { width: 100%; height: auto; }

/* Cards */
.cards { display: grid; gap: 14px; margin-top: 48px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { padding: 28px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transition: border-color 200ms var(--ease); }
.card:hover { border-color: var(--line-strong); }
.card .icon { width: 22px; height: 22px; color: var(--clay); margin-bottom: 18px; }
.card p { margin-top: 8px; color: var(--ink-2); font-size: 0.9688rem; text-wrap: pretty; }

.trio { display: grid; gap: 28px; margin-top: 48px; }
@media (min-width: 820px) { .trio { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.trio h3 { margin-bottom: 8px; }
.trio p { color: var(--ink-2); font-size: 0.9688rem; text-wrap: pretty; }
.trio > div { padding-top: 22px; border-top: 1px solid var(--line); }

.pre { margin: 0; padding: 22px 24px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); font: 400 0.8438rem/1.75 var(--mono); color: var(--ink-2); overflow-x: auto; }
.pre .c { color: var(--ink-3); }
.pre .k { color: var(--ink); }

.steps { list-style: none; counter-reset: step; margin: 44px 0 0; padding: 0; display: grid; gap: 28px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.steps li { counter-increment: step; padding-top: 22px; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 16px; border-radius: 50%; background: var(--sunken); border: 1px solid var(--line); font: 500 0.8125rem/1 var(--mono); color: var(--ink-2); }
.steps p { margin-top: 6px; color: var(--ink-2); font-size: 0.9688rem; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.plain { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; color: var(--ink-2); }
.plain li { padding-left: 18px; position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1px; background: var(--ink-3); }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 920px) { .faq-layout { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 80px; } }
.faq { margin-top: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; cursor: pointer; font-weight: 550; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; background: linear-gradient(var(--ink-2), var(--ink-2)) center / 12px 1.5px no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) center / 1.5px 12px no-repeat; transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 22px 0; color: var(--ink-2); text-wrap: pretty; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 48px; color: var(--ink-3); font-size: 0.9rem; }
.foot { display: grid; gap: 36px; }
@media (min-width: 820px) { .foot { grid-template-columns: 1.4fr 1fr 1fr; } }
.tagline { margin-top: 14px; max-width: 22rem; }
.foot h3 { font-size: 0.8125rem; color: var(--ink); margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-soft); max-width: 46rem; }

/* Impressum */
.imprint { max-width: 46rem; }
.imprint h1 { margin-bottom: 32px; hyphens: auto; overflow-wrap: break-word; }
.imprint h2 { font: 600 1rem/1.4 var(--sans); letter-spacing: -0.005em; margin: 32px 0 8px; }
.imprint p { color: var(--ink-2); line-height: 1.6; }

/* Comparisons (/compare/) */
.compare { max-width: 58rem; }
.compare h1 { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.1; margin-bottom: 20px; hyphens: auto; overflow-wrap: break-word; }
.compare h2 { font: 600 1.25rem/1.3 var(--sans); letter-spacing: -0.01em; margin: 44px 0 14px; }
.compare p, .compare li { color: var(--ink-2); line-height: 1.6; }
.compare .lead { margin-bottom: 8px; }
.compare .fine { margin-top: 0; margin-bottom: 16px; }
.compare ul { margin: 0 0 8px; padding-left: 1.25rem; display: grid; gap: 8px; }
.compare .btn + .btn { margin-left: 8px; }
.crumbs { margin: 0 0 16px; font-size: 0.875rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-3); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.compare table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.compare th, .compare td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { font-weight: 600; color: var(--ink); background: var(--sunken); }
.compare tbody th { width: 11rem; font-weight: 600; color: var(--ink); }
.compare td { min-width: 15rem; color: var(--ink-2); }
.compare table.wide { min-width: 52rem; }
.compare table.wide tbody th { width: auto; white-space: nowrap; }
.compare table.wide td { min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 640px) { .compare th, .compare td { padding: 10px 12px; } .compare tbody th { width: 8rem; } }

/* Scroll entry: only where scripting is on, only for motion-tolerant visitors */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* 404 */
.notfound { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding-block: 64px; }
.notfound .actions { margin-top: 12px; }

/* Download page */
.dl-hero { display: flow-root; padding-block: 0 clamp(20px, 3vw, 36px); }
.dl-hero .lead { max-width: 40rem; margin-top: 18px; }
.dl-section { padding-bottom: clamp(48px, 7vw, 96px); }
.dl-card { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-window), var(--shadow-lift); }
@media (min-width: 920px) { .dl-card { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.dl-left { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding: clamp(24px, 4vw, 48px); }
.dl-left h2 { font-size: clamp(1.625rem, 3vw, 2.125rem); }
.dl-left .actions { margin-top: 0; }
.dl-left .fine { margin-top: -8px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; border-radius: 11px; }
.btn-lg .icon { width: 19px; height: 19px; }
.os-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; width: 100%; }
.js .os-panels { display: grid; width: 100%; }
.js .os-panel { grid-area: 1 / 1; }
/* The inactive panels keep their place (so the card never changes size when you switch) but are not reachable. */
.js .os-panel[hidden] { display: flex; visibility: hidden; pointer-events: none; }
.builds { list-style: none; margin: 0; padding: 0; width: 100%; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.builds li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px 18px; padding: 14px 18px; border-top: 1px solid var(--line-soft); }
.builds li:first-child { border-top: 0; }
.builds li.is-lead { background: var(--sunken); }
.build-name { font-weight: 550; }
.build-name small { display: block; margin-top: 1px; font-size: 0.8125rem; font-weight: 400; color: var(--ink-3); }
.build-kind { font: 500 0.8125rem var(--mono); color: var(--ink-3); }
.build-size { min-width: 5ch; text-align: right; font-size: 0.8125rem; color: var(--ink-3); }
.build-get { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line-strong); font-size: 0.875rem; font-weight: 550; text-decoration: none; transition: background-color 150ms; }
.build-get:hover { background: var(--sunken); }
.is-lead .build-get { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.is-lead .build-get:hover { background: var(--fill-hover); }
@media (max-width: 560px) { .builds li { grid-template-columns: minmax(0, 1fr) auto; } .build-kind, .build-size { display: none; } }
.how { width: 100%; color: var(--ink-2); font-size: 0.9375rem; }
.how summary { cursor: pointer; padding: 4px 0; color: var(--ink); font-weight: 550; }
.how ol { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 1.25rem; }
.dl-foot { width: 100%; margin-top: 4px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: 0.9375rem; color: var(--ink-2); text-wrap: pretty; }
.dl-visual { display: none; position: relative; background: #151515; }
@media (min-width: 920px) { .dl-visual { display: block; } .dl-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; } }
.dl-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 22px; font-size: 0.9375rem; }
.dl-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.dl-links a:hover { color: var(--ink); }
.dl-links .icon { width: 15px; height: 15px; }

/* Download page: the three things on it, beside the heading, so the app, the terminal app and the server aren't taken for each other. */
.dl-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.dl-choose { position: relative; isolation: isolate; display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 0.45em; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); }
.choice { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 8px; font: 500 0.875rem/1.2 var(--sans); color: var(--ink-2); white-space: nowrap; text-decoration: none; transition: color 200ms var(--ease); }
.choice:hover { color: var(--ink); }
.choice .icon { flex: none; width: 16px; height: 16px; color: var(--ink-3); transition: color 200ms var(--ease); }
.choice.is-here { color: var(--ink); }
.choice.is-here .icon { color: var(--clay); }
.dl-choose > .glide { background: var(--raised); box-shadow: 0 0 0 1px var(--line-strong) inset; }
.dl-choose:not(.has-glide) .choice.is-here { background: var(--raised); box-shadow: 0 0 0 1px var(--line-strong) inset; }
@media (max-width: 520px) { .dl-choose { margin-bottom: 0; } .choice { padding: 6px 9px; font-size: 0.8125rem; } .choice .icon { display: none; } }

/* "Download Atelier" and its switch stay under the site's row once they reach it; download.js shrinks the heading into a
   bar as the page scrolls on (--stuck goes from 0 to 1), and the bar's background fades in with it. */
.dl-head-marker { height: clamp(40px, 6vw, 80px); }
/* On a phone the title keeps a row of its own, so the switch rises smoothly as the title folds away (download.js, under 640px). */
@media (max-width: 639px) { .dl-head-row h1 { flex-basis: 100%; } }
.dl-head { position: sticky; top: 64px; z-index: 40; isolation: isolate; --stuck: 0; }
.dl-head::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: var(--stuck); background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
body:has(.dl-head.is-stuck) .site-header { border-bottom-color: transparent; }
html:has(.dl-head) { scroll-padding-top: 132px; }

/* What a section is, above its heading: "Atelier CLI · terminal app". */
.kind { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 5px 11px 5px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 0.8125rem/1.2 var(--sans); color: var(--ink-2); }
.kind .icon { width: 16px; height: 16px; color: var(--clay); }
.kind-note { margin-top: 14px; color: var(--ink-3); font-size: 0.9375rem; max-width: 36rem; text-wrap: pretty; }

/* Atelier Server: its one-line installer, and the setup wizard's first question as atelier-setup draws it. */
.server-install { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 26px; max-width: 34rem; }
.server-install .fine { margin-top: 2px; }
.server-install + .ticks { margin-top: 26px; }
.term-body.setup { white-space: normal; }
.setup-head { margin-bottom: 6px; }
.setup-head .t-name { letter-spacing: 0.08em; }
.setup-crumbs { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-bottom: 14px; font-size: 0.75rem; }
.setup-box { padding: 14px 16px 10px; border: 1px solid #3a3936; border-radius: 10px; }
.setup-title { text-align: center; color: #f0efec; font-weight: 600; }
.setup-rule { width: 62%; margin: 8px auto 12px; border-top: 1px solid #3a3936; }
.setup-opt { padding: 1px 0 1px 1.25em; color: #b8b3a9; }
.setup-opt.is-on { padding-left: 0; color: #f0efec; }
.setup-desc { margin: 2px 0 8px 1.25em; color: #8d897f; font-size: 0.75rem; line-height: 1.5; }
.setup-keys { margin-top: 12px; font-size: 0.75rem; }

/* Atelier CLI: its own band, an install command to copy, and a terminal showing it. */
.cli-section { background: var(--sunken); }
.cli-section + .section { border-top-color: var(--line); }
.cli-install { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 26px; max-width: 34rem; }
.cli-install .tabs { justify-self: start; background: var(--surface); }
.cli-install .tab[aria-selected="true"], .cli-install .tabs > .glide { background: var(--sunken); }
.cli-install .fine { margin-top: 2px; }
/* A command to copy (Atelier CLI, the server's installer): longer than its box, it scrolls under the copy button, which fades it out. */
.command-box { position: relative; display: flex; align-items: center; min-height: 56px; padding: 0 10px 0 16px; border-radius: 11px; background: #141413; border: 1px solid rgba(255, 255, 255, 0.08); }
.command-box[hidden] { display: none; }
.command-box code { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 15px 52px 15px 0; white-space: nowrap; font: 500 0.875rem/1.6 var(--mono); color: #f0efec; background: none; border: 0; border-radius: 0; }
.command-box code::-webkit-scrollbar { display: none; }
.command-box code::before { content: "$ "; color: #d97757; }
.command-box .copy { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); box-shadow: -14px 0 12px 2px #141413; background-color: #1c1c1a; }
.command-box .copy:hover { background-color: #2a2a27; }
.copy { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); color: #d6d3cc; cursor: pointer; transition: background-color 150ms, color 150ms; }
.copy:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.copy .icon { grid-area: 1 / 1; width: 16px; height: 16px; }
.copy .i-done { opacity: 0; color: #7fcf8a; }
.copy.copied .i-copy { opacity: 0; }
.copy.copied .i-done { opacity: 1; }

.term { margin: 8px 0 0; border-radius: 14px; overflow: hidden; background: #141413; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: var(--shadow-lift); color: #e7e4dd; }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #1d1d1b; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.term-dots { display: inline-flex; gap: 7px; }
.term-dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3936; }
.term-title { flex: 1; text-align: center; margin-right: 50px; font: 500 0.75rem var(--sans); color: #8d897f; }
.term-body { padding: 18px 20px 14px; font: 400 0.8125rem/1.65 var(--mono); overflow-x: auto; }
.term-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; white-space: nowrap; }
.term-pip { flex: none; width: 48px; height: 40px; }
.term-lines { white-space: pre; }
.term-box { margin-top: 12px; padding: 4px 0; border-top: 1px solid #3a3936; border-bottom: 1px solid #3a3936; }
.term-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; white-space: nowrap; font-size: 0.75rem; }
.t-name { background: linear-gradient(90deg, #f0a07c, #c6613f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t-name + b { color: #e6b86a; }
.t-dim { color: #8d897f; }
.t-soft { color: #b8b3a9; }
.t-you { color: #f0efec; font-weight: 500; }
.t-clay { color: #d97757; }
.t-good { color: #7fcf8a; }
.t-add { color: #7fcf8a; }
.t-del { color: #e88a7d; }
.t-path { color: #f0efec; }
.t-row { display: inline-block; min-width: 100%; padding-right: 8px; }
.t-row-del { background: rgba(232, 138, 125, 0.12); color: #e88a7d; }
.t-row-add { background: rgba(127, 207, 138, 0.12); color: #7fcf8a; }
.t-cursor { display: inline-block; width: 0.6em; height: 1.1em; vertical-align: text-bottom; background: #e7e4dd; animation: t-blink 1.06s steps(1) infinite; }
@keyframes t-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .t-cursor { animation: none; } }
@media (max-width: 520px) {
  .term-body { padding: 14px 14px 12px; font-size: 0.6875rem; }
  .term-foot { font-size: 0.625rem; }
  .term-foot > :last-child { display: none; }
}
