:root {
  --bg: #1d2021; --surface: #282828; --text: #ebdbb2; --mute: #a89984;
  --border: #504945; --border-active: #fabd2f; --accent: #fe8019;
  --cursor-bg: #fabd2f; --cursor-fg: #282828; --cursor-inactive: #3c3836;
  --dir: #83a598; --exec: #b8bb26; --link: #d3869b; --error: #fb4934;
  --bar-bg: #3c3836; --bar-fg: #ebdbb2; --bar-key: #fabd2f;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 6px; --wrap: 1160px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--border-active); }
:focus-visible { outline: 2px solid var(--border-active); outline-offset: 2px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--cursor-bg) 35%, transparent); }
h1, h2, h3, h4 { font-family: var(--mono); font-weight: 500; line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.9em; color: var(--accent); }
kbd { display: inline-block; font-size: 0.8em; line-height: 1.5; padding: 0 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--bar-key); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.mute { color: var(--mute); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cursor-bg); color: var(--cursor-fg); padding: 6px 10px; z-index: 50; }
.skip:focus { left: 8px; }

/* frames: 1px rounded box with a title chip set into the top border */
.frame { position: relative; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.frame.active { border-color: var(--border-active); }
.chip { position: absolute; top: 0; left: 12px; transform: translateY(-50%); max-width: calc(100% - 24px); padding: 0 6px; font: 500 12px/1.6 var(--mono); color: var(--text); background: var(--surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 2px; }
.frame.active > .chip:not(.chip-end) { background: var(--border-active); color: var(--cursor-fg); }
.chip-end { top: auto; bottom: 0; left: auto; right: 12px; transform: translateY(50%); color: var(--mute); font-weight: 400; }
.on-bg .chip, .frame.on-bg { background: var(--bg); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--accent); border-radius: var(--r); background: transparent; color: var(--accent); font: 500 14px/1.2 var(--mono); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.btn:active { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.btn-primary { background: var(--cursor-bg); border-color: var(--cursor-bg); color: var(--cursor-fg); }
.btn-primary:hover { background: color-mix(in srgb, var(--cursor-bg) 85%, var(--text)); color: var(--cursor-fg); }
.btn-primary:active { background: color-mix(in srgb, var(--cursor-bg) 80%, var(--bg)); }
.btn i { font-size: 17px; }

/* header */
.site-head { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 4px 20px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--text); text-decoration: none; font: 500 15px var(--mono); }
.brand img { width: 24px; height: 24px; }
.site-nav { display: flex; gap: 18px; font: 400 14px var(--mono); }
.site-nav a { color: var(--mute); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); }
.site-nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }

/* support banner */
.support { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 9px 16px; background: var(--cursor-inactive); border-bottom: 1px solid var(--border); color: var(--text); font: 400 13px/1.4 var(--mono); text-decoration: none; text-align: center; flex-wrap: wrap; }
.support i { font-size: 17px; color: var(--accent); }
.support span { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.support:hover { background: color-mix(in srgb, var(--cursor-inactive) 70%, var(--border)); color: var(--text); }
.support:hover span { color: var(--border-active); }

/* hero */
.hero { padding-top: 72px; }
.kicker { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid var(--border); border-radius: 4px; font: 500 12px/1.6 var(--mono); color: var(--text); background: var(--surface); }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); margin: 18px 0 20px; max-width: 30ch; }
.hero h1 span { display: block; }
.hero h1 span { color: var(--mute); }
.lede { font-size: 18px; max-width: 62ch; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; font: 400 13px var(--mono); }
.stage { position: relative; margin-top: 56px; }
.stage::before { content: ""; position: absolute; inset: 8% 6% -4%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 11%, transparent), transparent); filter: blur(30px); pointer-events: none; }

/* app mock-up */
.app { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font: 400 13px/1.5 var(--mono); }
.app-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 0 10px 10px; }
.pane { display: flex; flex-direction: column; min-width: 0; }
.tabs { display: flex; height: 26px; margin-bottom: 10px; }
.tab { padding: 0 18px; line-height: 26px; color: var(--mute); }
.tab.on { background: var(--cursor-inactive); color: var(--text); font-weight: 700; }
.pane.focus .tab.on { background: var(--border-active); color: var(--cursor-fg); }
.pane .frame { flex: 1; display: flex; flex-direction: column; padding: 14px 8px 18px; background: var(--surface); min-height: 360px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 8ch 16ch; gap: 0 12px; padding: 0 8px; }
.cols.hdr { color: var(--accent); font-weight: 700; margin-bottom: 2px; }
.cols > :nth-child(n+2) { text-align: right; white-space: nowrap; }
.files { list-style: none; margin: 0; padding: 0; outline: none; }
.files:focus-visible { outline: 2px solid var(--border-active); outline-offset: 3px; }
.files li { cursor: pointer; line-height: 26px; }
.files li > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li.dir { color: var(--dir); }
.files li:hover { background: color-mix(in srgb, var(--cursor-inactive) 70%, transparent); }
.files li[aria-selected="true"] { background: var(--cursor-inactive); }
.files:focus li[aria-selected="true"], .files.live li[aria-selected="true"] { background: var(--cursor-bg); color: var(--cursor-fg); }
.viewas { display: flex; gap: 2px; color: var(--mute); padding: 0 6px; margin-bottom: 10px; }
.viewas span { padding: 0 14px; }
.viewas .on { background: var(--cursor-inactive); color: var(--text); font-weight: 700; }
.preview { flex: 1; display: grid; place-items: center; padding: 6px; min-height: 0; }
.preview img { max-height: 320px; width: auto; border-radius: 2px; }
.preview .folder-info { color: var(--dir); text-align: center; display: grid; gap: 6px; justify-items: center; }
.preview .folder-info i { font-size: 40px; }

/* F-key bar (decoration in "Shortcuts you may already know") */
.fbar { display: flex; flex-wrap: wrap; gap: 0 18px; padding: 4px 12px; background: var(--bar-bg); color: var(--bar-fg); font: 400 13px/1.6 var(--mono); border-radius: var(--r); }
.fbar b { color: var(--bar-key); font-weight: 700; margin-right: 6px; }

/* features */
.features { padding-top: 120px; padding-bottom: 40px; display: grid; gap: 120px; }
.features h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 16px; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.shot { display: block; width: 100%; padding: 14px 10px 10px; cursor: zoom-in; font: inherit; color: inherit; text-align: left; }
.shot:hover { border-color: color-mix(in srgb, var(--border-active) 60%, var(--border)); }
.shot img { width: 100%; height: auto; border-radius: 2px; }
.shot .zoom { position: absolute; right: 10px; top: 0; transform: translateY(-50%); padding: 0 6px; background: var(--surface); color: var(--mute); font-size: 14px; line-height: 1.4; }

/* same workflow everywhere: centred, with plain system labels */
.platforms { max-width: 720px; margin: 0 auto; text-align: center; }
.platforms p { font-size: 17px; }
.os-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 32px 0 0; padding: 0; }
.os-list li { padding: 8px 22px; font: 500 14px/1.4 var(--mono); color: var(--text); background: transparent; }

/* shortcuts: the F-key bar left of the text (the first section has its picture on the right) */
.keys { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.keys .fbar { order: -1; }
.keys .fbar { justify-content: center; padding: 14px 18px; gap: 10px 20px; font-size: 15px; border: 1px solid var(--border); }

/* tools grid */
.tools > h2 { margin-bottom: 36px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tool { padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 10px; background: transparent; }
.tool h3 { font-size: 17px; font-weight: 700; color: var(--text); }
.tool p { font-size: 15px; }
.tool > .shot, .tool-shots .shot { padding: 0; margin-top: auto; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); overflow: hidden; }
.tool > .shot { margin-top: 8px; }
.tool-wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; align-items: start; }
.tool-text { display: grid; gap: 10px; }
.tool-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-shots .shot:first-child { grid-column: span 2; }
.tool-archive { grid-column: span 2; grid-row: span 2; }
.tool-archive .app { margin-top: 8px; flex: 1; display: flex; flex-direction: column; }
.tool-archive .app-panes { flex: 1; }
.app.small .pane .frame { min-height: 260px; padding-top: 16px; }
.app.small .app-panes { padding-top: 14px; }
.app.small .preview img { max-height: 220px; }
.app.small .cols { grid-template-columns: minmax(0, 1fr) 8ch; }
.app.small .cols > :nth-child(3) { display: none; }

/* made for working across systems: a short statement with an accent rule */
.why { max-width: 760px; margin: 0 auto; width: 100%; padding: 4px 0 4px 26px; border-left: 3px solid var(--accent); }
.why h2 { font-size: clamp(22px, 2.6vw, 28px); }
.why p { font-size: clamp(17px, 1.8vw, 19px); line-height: 1.65; }

/* download */
.download { margin-top: 96px; padding: 88px 0 96px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.download h2 { font-size: clamp(26px, 3.6vw, 38px); margin: 12px 0 40px; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px 20px; }
.dl { padding: 30px 22px 22px; display: flex; flex-direction: column; gap: 6px; }
.dl > i { font-size: 30px; color: var(--mute); margin-bottom: 6px; }
.dl.active > i { color: var(--border-active); }
.dl .req { font: 400 13px/1.6 var(--mono); color: var(--mute); }
.dl .actions { margin-top: auto; padding-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.cmd { min-width: 0; }
.dl .actions .btn { justify-content: space-between; }
.dl .file { font: 400 12px var(--mono); color: var(--mute); overflow-wrap: anywhere; }
.alts { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 400 13px var(--mono); }
.alts span { color: var(--mute); }
.cmd { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); font: 400 12px/1.5 var(--mono); }
.cmd code { flex: 1; padding: 8px 10px; color: var(--text); overflow-x: auto; white-space: nowrap; }
.cmd code::before { content: "$ "; color: var(--exec); }
.cmd button { flex: none; align-self: stretch; min-width: 44px; border: 0; border-left: 1px solid var(--border); background: transparent; color: var(--mute); cursor: pointer; font: inherit; padding: 0 10px; border-radius: 0 var(--r) var(--r) 0; }
.cmd button:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.cmd button.ok { color: var(--exec); }
.dl-note { margin-top: 36px; color: var(--mute); max-width: 64ch; font-size: 15px; }
.badge { display: none; font: 500 11px var(--mono); color: var(--cursor-fg); background: var(--border-active); padding: 0 6px; border-radius: 2px; position: absolute; right: 12px; top: 0; transform: translateY(-50%); }
.dl.active .badge { display: inline-block; }

/* footer */
.site-foot { padding: 28px 0 40px; font: 400 13px var(--mono); color: var(--mute); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.site-foot .wrap > :first-child { margin-right: auto; display: flex; align-items: center; gap: 10px; }
.site-foot a { color: var(--mute); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }

/* lightbox */
.lightbox { border: 1px solid var(--border-active); border-radius: var(--r); background: var(--surface); color: var(--text); padding: 18px 12px 12px; max-width: min(1400px, 94vw); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.lightbox img { max-height: calc(92vh - 50px); width: auto; margin: 0 auto; }
.lightbox .chip { background: var(--border-active); color: var(--cursor-fg); }
.lightbox .close { position: absolute; right: 10px; top: 0; transform: translateY(-50%); border: 0; background: var(--surface); color: var(--text); font: 500 12px var(--mono); padding: 2px 8px; cursor: pointer; border-radius: 2px; }
.lightbox .close:hover { color: var(--accent); }

@media (max-width: 960px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-wide, .tool-archive { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 860px) {
  .feature, .keys { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .keys .fbar { order: 0; }
  .features { gap: 88px; padding-top: 88px; }
}
@media (max-width: 680px) {
  .app-panes { grid-template-columns: minmax(0, 1fr); }
  .pane .frame { min-height: 0; }
  .pane + .pane .tabs { display: none; }
  .hero { padding-top: 48px; }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-wide { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .site-nav { gap: 14px; }
  .site-nav .gh-label { display: none; }
  .keys .fbar { font-size: 13px; gap: 6px 14px; }
  .cols { grid-template-columns: minmax(0, 1fr) 8ch; }
  .cols > :nth-child(3) { display: none; }
  .app { font-size: 12px; }
  .tab { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- manual ---------- */
.doc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 96px; align-items: start; }
.toc { position: sticky; top: 80px; padding: 20px 6px 10px; background: var(--bg); }
.toc .chip { background: var(--bg); }
.toc ol { list-style: none; margin: 0; padding: 0; font: 400 13px/1.4 var(--mono); counter-reset: ch; }
.toc li { counter-increment: ch; }
.toc a { display: grid; grid-template-columns: 3ch 1fr; gap: 6px; padding: 6px 10px; color: var(--text); text-decoration: none; border-radius: 2px; }
.toc a::before { content: counter(ch, decimal-leading-zero); color: var(--mute); }
.toc a:hover { background: var(--cursor-inactive); color: var(--text); }
.toc a[aria-current="page"] { background: var(--cursor-bg); color: var(--cursor-fg); }
.toc a[aria-current="page"]::before { color: var(--cursor-fg); }
.toc details summary { display: none; }
.prose { max-width: 760px; }
.prose > * + * { margin-top: 18px; }
.prose h1 { font-size: clamp(30px, 4vw, 40px); margin-top: 10px; }
.prose h2 { font-size: 22px; margin-top: 52px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.prose h2::before { content: "## "; color: var(--accent); }
.prose h3 { font-size: 17px; margin-top: 32px; color: var(--text); }
.prose h3::before { content: "### "; color: var(--mute); }
.prose .lede { font-size: 18px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose ul li::marker { content: "› "; color: var(--accent); font-family: var(--mono); }
.prose ol li::marker { color: var(--accent); font-family: var(--mono); font-size: 0.9em; }
.prose strong { font-weight: 600; }
.prose .dir { color: var(--dir); }
.codeblock { margin: 26px 0 0; padding: 18px 0 0; }
.codeblock pre { margin: 0; padding: 4px 16px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; color: var(--text); }
.codeblock .c { color: var(--mute); }
.codeblock .p { color: var(--exec); }
.codeblock .s { color: var(--exec); }
.codeblock .k { color: var(--link); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-wrap th { text-align: left; font: 700 12px/1.4 var(--mono); color: var(--accent); background: var(--surface); padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table-wrap td { padding: 10px 14px; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); vertical-align: top; }
.table-wrap tr:first-child td { border-top: 0; }
.table-wrap td:first-child { white-space: nowrap; }
.note { padding: 20px 18px 16px; background: transparent; }
.note .chip { background: var(--bg); color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.note.warn .chip { color: var(--error); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px !important; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r); text-decoration: none; color: var(--text); font: 500 14px var(--mono); }
.pager a span { font-weight: 400; font-size: 12px; color: var(--mute); }
.pager a:hover { border-color: var(--border-active); color: var(--text); }
.pager a.next { text-align: right; grid-column: 2; }
@media (max-width: 860px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .toc { position: static; padding: 0; border: 0; background: none; }
  .toc > .chip { display: none; }
  .toc details { border: 1px solid var(--border); border-radius: var(--r); }
  .toc details summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; min-height: 44px; font: 500 13px var(--mono); cursor: pointer; list-style: none; }
  .toc details summary::-webkit-details-marker { display: none; }
  .toc details[open] summary { border-bottom: 1px solid var(--border); }
  .toc details ol { padding: 6px; }
  .toc a { padding: 10px; }
}
@media (min-width: 861px) { .toc details > ol { display: block; } }

/* family */
.family { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; padding: 30px 28px 28px; background: transparent; }
.family img { width: 64px; height: 64px; }
.family h2 { font-size: clamp(20px, 2.4vw, 24px); margin: 0 0 8px; }
.family p { font-size: 16px; max-width: 60ch; }
.family-links { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 680px) {
  .family { grid-template-columns: auto minmax(0, 1fr); }
  .family .btn { grid-column: 1 / -1; justify-self: start; }
  .family .family-links { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .family { grid-template-columns: minmax(0, 1fr); }
  .family img { width: 48px; height: 48px; }
}
