/* Matches acler.cz: PP Neue Machina is licensed, so it is NOT bundled here. The site serves it from /fonts/
   when this demo is hosted on acler.cz; elsewhere the system-ui fallback applies. */
@font-face { font-family: "PP Neue Machina"; src: url("/fonts/PPNeueMachina-PlainLight.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "PP Neue Machina"; src: url("/fonts/PPNeueMachina-PlainRegular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PP Neue Machina"; src: url("/fonts/PPNeueMachina-PlainUltrabold.otf") format("opentype"); font-weight: 800; font-display: swap; }
:root {
  --bg: #0e0e0e; --surface: #0e0e0e; --surface-2: #1a1a1a; --text: #f0f0f0; --muted: #bbb; --line: #262626;
  --accent: #f0f0f0; --accent-fg: #0e0e0e; --code-bg: #0a0a0a; --warn: #f0a35e; --ok: #55c98d;
  --link-hl: #333; --sel-bg: #b5a000; --sel-fg: #0e0e0e;
  --radius: 4px; --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "PP Neue Machina", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --stage-light: #fff; --stage-dark: #0a0a0a; color-scheme: dark;
}
:root.light {
  --bg: #fff; --surface: #fff; --surface-2: #efefef; --text: #1a1a1a; --muted: #4a4a4a; --line: #e5e5e5;
  --accent: #1a1a1a; --accent-fg: #fff; --code-bg: #f6f6f6; --warn: #b4540a; --ok: #1a7f4b;
  --link-hl: #efefef; --sel-bg: #ffe066; --sel-fg: #1a1a1a; color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
::selection { background: var(--sel-bg); color: var(--sel-fg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 21px/1.45 var(--sans); letter-spacing: -.02em; overflow-x: hidden; transition: background-color .2s, color .2s; }
/* the site's link style: a highlighter stripe under the text that grows on hover */
p a, footer a, .lnk { color: var(--text); text-decoration: none; background: linear-gradient(var(--link-hl), var(--link-hl)) 0 88% / 100% .35em no-repeat; border-radius: 2px; padding: 0 4px; margin: 0 -4px; transition: background-size .3s; }
p a:hover, footer a:hover, .lnk:hover { background-size: 100% .6em; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }
code, pre, kbd { font-family: var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

header.top { background: var(--bg); }
header.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { font-weight: 800; letter-spacing: -.02em; color: var(--text); text-decoration: none; margin-right: auto; }
header.top nav { display: flex; gap: 16px; flex-wrap: wrap; }
header.top nav a { color: var(--muted); text-decoration: none; font-size: 19px; }
header.top nav a:hover { color: var(--text); }
header.top nav { align-items: center; }
header.top nav a.gh { display: inline-flex; align-items: center; gap: 7px; }

.banner { background: #fdecea; color: #7a1d14; padding: 12px 16px; font-size: 18px; border-bottom: 1px solid #f5c2bd; }
.banner code { background: rgba(0,0,0,.07); padding: 1px 5px; border-radius: 4px; }

/* hero */
.hero { padding: 72px 0 56px; text-align: center; }
.hero-card { max-width: 680px; margin: 0 auto 28px; padding: 32px 24px; }
.hero-hint { margin: 0 0 12px; font-size: 17px; color: var(--muted); }
.hero-widget { display: flex; justify-content: center; min-height: 44px; }
.hero h1 { font-weight: 800; font-size: clamp(30px, 5.5vw, 52px); line-height: 1.1; letter-spacing: -.03em; margin: 0 auto 14px; max-width: 20ch; text-wrap: balance; }
.hero p.lead { margin: 0 auto 24px; max-width: 56ch; color: var(--muted); font-size: 22px; text-wrap: pretty; }
.facts { margin: 20px 0 0; font-size: 17px; color: var(--muted); }
.facts b { color: var(--text); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 4px; padding: 9px 14px; font: inherit; font-size: 18px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn { transition: transform .06s ease-out, box-shadow .06s ease-out, background-color .15s; }
.btn:active, .btn.pressed { transform: translateY(1px) scale(.96); box-shadow: inset 0 2px 4px rgba(0,0,0,.18); background: var(--surface-2); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { opacity: .9; background: var(--text); }
.btn.primary:active, .btn.primary.pressed { background: var(--text); opacity: .8; box-shadow: inset 0 2px 5px rgba(0,0,0,.45); }
.btn code { font: inherit; }
.dev { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin-top: 14px; font-size: 17px; color: var(--muted); }
.dev .btn { background: none; border-color: transparent; padding: 3px 8px; border-radius: 4px; color: var(--text); }
.dev .btn:hover { background: var(--surface-2); }
.dev .btn:active, .dev .btn.pressed { background: var(--surface-2); box-shadow: none; }
.btn .lbl { display: inline-grid; }
.btn .lbl > * { grid-area: 1 / 1; text-align: center; }
.btn .done { visibility: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn .done .ok { color: var(--ok); flex: none; position: relative; top: 1px; }
.btn.primary .done .ok { color: #1a7f4b; }
:root.light .btn.primary .done .ok { color: #55c98d; }
.btn.copied .idle { visibility: hidden; }
.btn.copied .done { visibility: visible; }
.btn kbd { font-size: 15px; line-height: 1; min-width: 18px; text-align: center; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); }
.btn.primary kbd { border-color: color-mix(in srgb, var(--bg) 35%, transparent); color: var(--bg); background: transparent; }
@media (hover: none) { .btn kbd { display: none; } }

section { padding: 48px 0; }
section > .wrap > h2 { font-size: 32px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 6px; }
section > .wrap > p.sub { margin: 0 0 24px; color: var(--muted); max-width: 70ch; }

/* configurator */
.cfg { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .cfg { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.controls { padding: 4px 18px 8px; }
fieldset { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 16px 0 18px; min-width: 0; }
fieldset:last-of-type { border-bottom: 0; }
legend { font-size: 16px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0; float: left; width: 100%; margin-bottom: 12px; }
legend + * { clear: both; }
.field { display: block; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field > span.l, .l { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; font-weight: 550; margin-bottom: 5px; }
.l small { font-weight: 400; color: var(--muted); }
input[type=text], textarea:not(.aai__input), select { width: 100%; font: inherit; font-size: 18px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 7px 10px; min-width: 0; }
textarea:not(.aai__input) { resize: vertical; min-height: 60px; font-family: var(--mono); font-size: 17px; }
input[type=text]::placeholder, textarea:not(.aai__input)::placeholder { color: var(--muted); opacity: .8; }
input[type=color] { width: 36px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 18px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); padding: 2px; gap: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 4px 11px; font-size: 17px; border-radius: 3px; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }

/* services chips */
#svc { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#svc li { display: flex; align-items: center; gap: 6px; border-radius: 4px; }
#svc li.dragging { opacity: .45; }
.chip { flex: 1; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 4px; padding: 6px 10px; font: inherit; font-size: 18px; cursor: pointer; text-align: left; }
.chip svg { width: 16px; height: 16px; flex: none; fill: currentColor; opacity: .55; }
.chip[aria-pressed=true] { color: var(--text); border-color: var(--text); background: var(--surface); }
.chip[aria-pressed=true] svg { opacity: 1; }
.chip[aria-disabled=true] { cursor: not-allowed; }
.grip { cursor: grab; color: var(--muted); font-size: 18px; line-height: 1; user-select: none; padding: 0 2px; letter-spacing: -2px; }
.mini { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 4px; width: 30px; height: 30px; font: inherit; font-size: 16px; cursor: pointer; flex: none; padding: 0; }
.mini:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.mini:disabled { opacity: .35; cursor: default; }
.hint { font-size: 16px; color: var(--muted); margin: 8px 0 0; }
.ins { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ins button { font: 16px var(--mono); border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 6px; padding: 1px 6px; cursor: pointer; }
.ins button:hover { color: var(--text); background: var(--surface-2); }

.vrow { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; margin-bottom: 10px; }
.vrow .name { font-size: 17px; font-weight: 550; display: flex; gap: 8px; align-items: center; }
.vrow .name code { font-size: 15px; color: var(--muted); font-weight: 400; }
.vrow .ctl { grid-column: 2; display: flex; align-items: center; gap: 8px; }
.vrow .ctl output { font: 16px var(--mono); color: var(--muted); min-width: 4.5ch; text-align: right; }
.vrow[data-on=false] .ctl { opacity: .4; pointer-events: none; }
.vrow .ctl input[type=text] { font: 16px var(--mono); padding: 4px 6px; }

/* right column */
.out { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
@media (min-width: 901px) and (min-height: 760px) { .out { position: sticky; top: 16px; min-height: calc(100vh - 32px); grid-template-rows: minmax(0, 1fr) auto auto; } }
.stage { border-radius: var(--radius); border: 1px solid var(--line); padding: 36px 20px; display: flex; justify-content: center; align-items: center; min-height: 220px; background: var(--stage-light); overflow-x: auto; }
.stage[data-stage=dark] { background: var(--stage-dark); }
:root:not(.light) .stage[data-stage=auto] { background: var(--stage-dark); }
.stage > .aai, .stage > div { max-width: 100%; }
.stage[data-layout=menu] { overflow: visible; align-items: flex-start; min-height: 380px; }
.box-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.box-h small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.promptbox pre { margin: 0; padding: 12px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 1.5; max-height: 240px; overflow: auto; }
.warn { color: var(--warn); }

.tabs { display: flex; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid var(--line); overflow-x: auto; align-items: end; }
.tabs [role=tab] { font: inherit; font-size: 17px; border: 0; background: none; color: var(--muted); padding: 7px 12px; border-radius: 4px 8px 0 0; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs [role=tab][aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs [role=tab]:hover { color: var(--text); }
.tabs .grow { flex: 1; }
.tabs label { font-size: 16px; color: var(--muted); padding: 0 8px 8px; white-space: nowrap; }
.tabpanel { position: relative; }
.tabpanel[hidden] { display: none; }
.tabpanel pre { margin: 0; padding: 14px 14px 14px; background: var(--code-bg); font-size: 17px; line-height: 1.55; overflow: auto; max-height: 420px; border-radius: 0 0 var(--radius) var(--radius); tab-size: 2; }
.copy { position: absolute; top: 8px; right: 8px; font: inherit; font-size: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 3px; padding: 3px 10px; cursor: pointer; }
.copy:hover { background: var(--surface-2); }
.note { font-size: 16px; color: var(--muted); padding: 8px 14px; border-top: 1px solid var(--line); margin: 0; }

/* events */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .two { grid-template-columns: minmax(0, 1fr); } }
.card { padding: 16px; }
.card h3 { margin: 0 0 10px; font-size: 19px; }
#log { list-style: none; margin: 0; padding: 0; font: 16px/1.5 var(--mono); max-height: 220px; overflow: auto; }
#log li { padding: 6px 0; border-bottom: 1px dashed var(--line); word-break: break-word; }
#log li:last-child { border-bottom: 0; }
#log .t { color: var(--muted); }
#log .s { font-weight: 700; }
#log .empty { color: var(--muted); font-family: system-ui, sans-serif; font-size: 17px; }
.card pre { margin: 12px 0 0; padding: 12px; background: var(--code-bg); border-radius: 4px; font-size: 16px; overflow: auto; }
.byo { display: grid; gap: 12px; }

footer { padding: 56px 0 48px; font-size: 17px; color: var(--muted); }
footer p { margin: 0 auto; max-width: 80ch; text-align: center; }

/* theme toggle in the footer, with the site's hairline */
.foot { display: flex; align-items: center; gap: 24px; margin-top: 24px; }
.foot::after { content: ""; order: 1; flex: 1; height: 1px; background: var(--line); }
.foot .tg { order: 0; border: 0; background: none; color: var(--muted); cursor: pointer; display: flex; padding: 0; transition: color .15s; }
.foot .tg:hover { color: var(--text); }

/* back button, same as the site's subpage header */
.back { display: inline-flex; align-items: center; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); text-decoration: none; font-size: 1.15rem; line-height: 1; transition: color .15s, border-color .15s; }
.back:hover { color: var(--text); border-color: var(--text); }
header.top .wrap { padding-top: 32px; padding-bottom: 16px; gap: 16px; }
.brand { margin-right: auto; }
header.top nav a[aria-current=page] { color: var(--text); }

/* footer sticks to the bottom, page content is centered in the space above it */
body { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* header and footer span the full width with the site's gutters (2rem, 4rem from md up) */
header.top .wrap, footer .wrap { max-width: none; padding-left: 32px; padding-right: 32px; }
@media (min-width: 768px) { header.top .wrap, footer .wrap { padding-left: 64px; padding-right: 64px; } }
header.top nav { gap: 32px; }

/* back button as on acler.cz posts: 44px round, fixed so it stays put while scrolling */
.back { position: fixed; top: 32px; left: 24px; z-index: 10; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0; border-radius: 50%; background: var(--bg); font-size: 1.15rem; transition: color .15s, border-color .15s, transform .15s; }
.back:hover { transform: scale(1.05); }
@media (min-width: 768px) { .back { left: 56px; } }
header.top .wrap { min-height: 92px; }
.brand { margin-left: 56px; }

/* let the hero breathe */
.hero h1 { margin-bottom: 36px; line-height: 1.15; }
.hero p.lead { margin-bottom: 56px; line-height: 1.6; }
.hero-hint { margin-bottom: 20px; }
.hero-card { margin-bottom: 56px; }
.cta { gap: 16px; }
.dev { margin-top: 28px; gap: 16px; }
.facts { margin-top: 48px; }
.hero p.lead { max-width: 40ch; text-wrap: balance; }
.hero p.lead { margin-bottom: 32px; }
.hero-widget { --aai-font-size: 20px; }
.hero p.lead { color: var(--text); }
.facts b { color: inherit; }

/* larger buttons; squircle corners where supported (Chrome 139+), plain rounded elsewhere */
.btn { padding: 14px 22px; font-size: 19px; border-radius: 18px; corner-shape: squircle; gap: 10px; }
.dev .btn { padding: 8px 14px; border-radius: 14px; font-size: 17px; }
.hero-card { border-radius: 28px; corner-shape: squircle; }
.btn .lbl { position: relative; top: 1px; }

/* pressing keeps the button's colors (no fill/opacity change); only the push-in transform and inset shadow stay */
.btn.pressed:not(:hover) { background: var(--surface); }
.btn.primary.pressed:not(:hover) { background: var(--text); opacity: 1; }
.btn.primary:active:hover { opacity: .9; }
.dev .btn.pressed:not(:hover) { background: none; }

/* npm button reads as a link: the site's highlighter stripe, growing on hover, no fill */
.dev .btn code { background: linear-gradient(var(--link-hl), var(--link-hl)) 0 88% / 100% .35em no-repeat; border-radius: 2px; padding: 0 4px; margin: 0 -4px; transition: background-size .3s; }
.dev .btn:hover code, .dev .btn.pressed code { background-size: 100% .6em; }
.dev .btn:hover, .dev .btn:active, .dev .btn.pressed { background: none; }
.hero-card { background: color-mix(in srgb, var(--text) 2%, var(--bg)); }
header.top nav a.gh { display: flex; align-items: baseline; }
header.top nav a.gh svg { width: 1cap; height: 1cap; }
header.top nav a.gh svg { width: 1.3cap; height: 1.3cap; }
header.top nav a.gh svg { width: 1.7cap; height: 1.7cap; }
/* baseline-aligned, then nudged down so the icon is centered on the capital letters: (1.7cap - 1cap) / 2 */
header.top nav a.gh svg { transform: translateY(.35cap); }

/* small screens: nav collapses into a floating hamburger at the bottom right (thumb reach); the menu opens above it */
.burger { display: none; }
@media (max-width: 600px) {
  header.top .wrap { padding-left: 24px; padding-right: 24px; min-height: 0; padding-bottom: 8px; }
  header.top .wrap > .brand { min-height: 44px; display: flex; align-items: center; }
  .burger { position: fixed; z-index: 20; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--text); cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); transition: border-color .15s, transform .15s; }
  .burger:hover { border-color: var(--text); }
  .burger:active { transform: scale(.94); }
  .burger path { transform-box: fill-box; transform-origin: center; transition: transform .3s, opacity .2s; }
  .open .burger path:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .open .burger path:nth-child(2) { opacity: 0; }
  .open .burger path:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
  header.top nav { display: none; position: fixed; z-index: 20; right: 24px; bottom: calc(max(24px, env(safe-area-inset-bottom)) + 3.5rem + 12px); flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px 28px; background: var(--bg); border: 1px solid var(--line); border-radius: 24px; corner-shape: squircle; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
  header.top .wrap.open nav { display: flex; }
  header.top nav a { font-size: 19px; }
  header.top nav a.gh svg { width: 1.3cap; height: 1.3cap; transform: translateY(.15cap); }
}
@media (min-width: 601px) { header.top nav { gap: 48px; } }
/* wide screens: nav centered on the page (the back button and name stay left); narrower keeps it on the right */
@media (min-width: 1000px) {
  header.top .wrap { position: relative; }
  header.top nav { position: absolute; left: 50%; top: 32px; height: 44px; transform: translateX(-50%); align-items: center; }
}
.brand { font-weight: 400; }

/* header holds only the (fixed) back circle and the nav; keep its height and push the nav right */
header.top nav { margin-left: auto; }
@media (max-width: 600px) { header.top .wrap { min-height: 92px; } }
.seg span { padding-top: 5px; padding-bottom: 3px; }
.mini { display: inline-flex; align-items: center; justify-content: center; }
.mini svg { position: relative; top: 1px; }
.mini svg { width: 15px; height: 15px; }
.chip > span { position: relative; top: 1px; }

/* rule of thumb: small text uses Inter, which holds up better at small sizes than PP Neue Machina */
:root { --small: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.hint, .note, .hero-hint, .facts, footer p, .l small, .box-h small, .tabs label, .field > span.l, .l, .vrow .name, .check, #log .empty { font-family: var(--small); }
legend, .box-h, .seg span, .copy, .tabs [role=tab], .hint { font-size: 14px; padding-left: 20px; }
/* the options panel keeps the site font; only its hint text stays Inter */
.controls legend, .controls .l, .controls .l small, .controls .vrow .name, .controls .check, .controls .check span, .controls .seg span, .controls input[type=text], .controls select { font-family: var(--sans); }
.controls .hint { font-family: var(--sans); }
.controls .l small { font-family: var(--small); }
/* segmented controls span the full width; options share it evenly and wrap onto full rows if needed */
.seg { display: flex; width: 100%; }
.seg label { flex: 1 1 auto; }
.seg span { text-align: center; }
.seg { flex-wrap: nowrap; }
.seg span { padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.seg[data-key=mode] { flex-wrap: wrap; }
/* selected option: a soft fill and full-strength text, no second border, no bold */
.seg input:checked + span { background: var(--surface-2); color: var(--text); box-shadow: none; font-weight: 400; }
/* parameter name on the checkbox row: same size, font and right alignment as on the other fields */
.l small, .check small { font-size: 14px; }
.controls .check small { margin-left: auto; font-family: var(--small); font-weight: 400; }

.tabs { overflow-y: hidden; }
.tabpanel pre { padding-right: 52px; }

/* icon-only copy buttons; a checkmark replaces the icon after a click */
.copy { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: var(--muted); }
.copy:hover { color: var(--text); }
.copy .i-ok { display: none; color: var(--ok); }
.copy.copied .i-copy { display: none; }
.copy.copied .i-ok { display: block; }

/* tab icons (simple-icons, CC0) */
.tabs [role=tab] { display: inline-flex; align-items: center; gap: 8px; }
.tabs .ti { flex: none; opacity: .7; }
.tabs [role=tab][aria-selected=true] .ti, .tabs [role=tab]:hover .ti { opacity: 1; }
.tabs [role=tab][hidden] { display: none; }
.tabs [role=tab] { gap: 6px; padding-left: 8px; padding-right: 8px; }

/* every snippet tab has the same height, so switching technologies never resizes the columns */
.tabpanel pre { height: 360px; max-height: none; }

/* services: the row name is a plain label; visibility is controlled by the eye button */
.chip { color: var(--text); border-color: var(--line); background: var(--surface); }
.chip svg { opacity: 1; }
#svc li.off .chip { color: var(--muted); }
#svc li.off .chip svg, #svc li.off .chip > span { opacity: .45; }
.vis .i-off { display: none; }
.vis[aria-pressed=false] .i-on { display: none; }
.vis[aria-pressed=false] .i-off { display: block; }
.vis svg { width: 16px; height: 16px; top: 0; }
.grip { display: flex; align-items: center; padding: 0 2px; letter-spacing: 0; }

/* page content paints above the pixel canvas (header above main so its fixed menu stays on top) */
body > header, body > main, body > footer { position: relative; z-index: 1; }
body > header { z-index: 2; }
header.top { background: none; }
footer p { font-size: 13px; }
footer p { color: color-mix(in srgb, var(--text) 50%, var(--bg)); }

/* custom cursor (cursor.js): hide the native one for fine pointers, pulse over links */
@media (pointer: fine) { html, * { cursor: none !important; } }
@keyframes cursor-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(2); } }
.cursor-inner.cursor-pulse { animation: cursor-pulse .9s ease-in-out infinite; }

/* back button hover as on acler.cz posts: text goes to full color and it scales up 5%; the outline stays as it is, no transition */
.back, .back:hover { transition: none; }
.back:hover { color: var(--text); border-color: var(--line); transform: none; scale: 1.05; }

/* landing page: the hero fills the first screen, the install snippets follow below it */
main:has(.hero) { justify-content: flex-start; }
.hero { min-height: calc(100dvh - 190px); display: flex; align-items: center; }
.hero > .wrap { width: 100%; }
.install { padding: 32px 0 72px; }
.install .wrap { max-width: 600px; }
.install h2 { margin: 0 0 8px; }
.install .sub { margin: 0 0 28px; max-width: 70ch; font-family: var(--small); color: var(--muted); }
.snips { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.snips figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.snips figcaption { padding: 10px 16px; border-bottom: 1px solid var(--line); font: 500 15px var(--small); color: var(--muted); }
.snips pre { margin: 0; padding: 14px 16px; overflow: auto; font: 14px/1.6 var(--mono); background: var(--code-bg); border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 760px) { .snips { grid-template-columns: minmax(0, 1fr); } }
.flinks { margin-bottom: 10px; }
.snips pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.snips figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; padding-bottom: 4px; }
.snips .copy { position: static; flex: none; }
.snips .cap { display: inline-flex; align-items: center; gap: 8px; }
.snips .ti { flex: none; opacity: .75; }
.snips .code { position: relative; }
.snips .code .copy { position: absolute; top: 8px; right: 8px; }
.snips .code pre { padding-right: 56px; }
.snips figcaption { padding-top: 10px; padding-bottom: 10px; }
