/* openwith.dev — one stylesheet, no build step.
   Every colour below comes from the apps' source (CANVAS, ACCENT, TEXT, TEXT_DIM, SHEET, the diff pink),
   and the fonts match theirs: Segoe UI Variable and Cascadia Mono, with Inter and JetBrains Mono elsewhere. */
:root {
  --page: #0d0d0f;
  --canvas: #131315;
  --window: #1c1c20;
  --panel: rgba(22, 22, 26, 0.92);
  --raised: #202026;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #e9e9ec;
  --dim: #8d8d95;
  --faint: #5f5f68;
  --amber: #f5b84a;
  --amber-hi: #ffe3a3;
  --amber-lo: #e48a1c;
  --sheet: #6ea8ff;
  --pink: #ff6e96;
  --green: #78dc8c;
  --radius: 12px;
  --sans: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", "JetBrains Mono", ui-monospace, Consolas, monospace;
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 400 16px/1.62 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { /* the faint amber dawn behind the page */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(245, 184, 74, 0.10), transparent 70%),
    radial-gradient(700px 500px at -10% 30%, rgba(228, 138, 28, 0.05), transparent 70%);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.86em; color: var(--amber-hi); background: rgba(245, 184, 74, 0.08); padding: 0.12em 0.38em; border-radius: 5px; white-space: nowrap; }
kbd {
  display: inline-block; min-width: 1.65em; padding: 0.06em 0.42em; margin: 0 0.08em;
  font-size: 0.76em; line-height: 1.55; text-align: center; color: var(--text);
  background: var(--raised); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
}
b { font-weight: 600; }
::selection { background: rgba(245, 184, 74, 0.32); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; border-radius: 8px; background: var(--amber); color: #1a1206; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.amber {
  background: linear-gradient(100deg, var(--amber-hi), var(--amber) 45%, var(--amber-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ───────── Nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 22px;
  padding: 12px max(16px, calc((100vw - var(--max)) / 2));
  background: rgba(13, 13, 15, 0.7);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 650 18px/1 var(--display); letter-spacing: -0.02em; }
.spark { width: 17px; height: 17px; fill: var(--amber); filter: drop-shadow(0 0 8px rgba(245, 184, 74, 0.55)); }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--dim); font-size: 14.5px; transition: color .2s, background .2s; }
.nav-links a img { width: 18px; height: 18px; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.palette-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 11px; border-radius: 9px; cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2); color: var(--dim); font-size: 14px; transition: border-color .2s, color .2s;
}
.palette-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.24); }
.palette-btn svg, .palette-input svg, .l-find svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.palette-btn span { margin-right: 10px; }
.palette-btn kbd { font-size: 11px; }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border-radius: 10px; border: 0; cursor: pointer;
  font: 600 15px/1 var(--sans); text-decoration: none; color: #1a1206;
  background: linear-gradient(180deg, var(--amber-hi), var(--amber) 55%, var(--amber-lo));
  box-shadow: 0 0 0 1px rgba(255, 227, 163, 0.35) inset, 0 10px 30px -10px rgba(245, 184, 74, 0.65);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 0 0 1px rgba(255, 227, 163, 0.5) inset, 0 14px 38px -10px rgba(245, 184, 74, 0.8); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-small { padding: 9px 15px; font-size: 14px; border-radius: 9px; }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--line-2) inset; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24) inset; }

/* ───────── Type and layout ───────── */
main > section { max-width: var(--max); margin: 0 auto; padding: 132px 16px 0; }
.hero > *, .app-head > *, .f-layout > *, .desk > *, .cli-grid > *, .dl-grid > *, .shots > *, .features > *, .l-body > * { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 500 12.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 650; letter-spacing: -0.03em; }
h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1; max-width: 13ch; }
h2 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.06; }
h3 { font-size: 16.5px; letter-spacing: -0.01em; line-height: 1.3; }
.section-head { max-width: 780px; }
.section-head p:not(.eyebrow) { color: var(--dim); font-size: 18px; margin: 18px 0 0; }
.section-head.center { text-align: center; margin: 0 auto; }

/* ───────── Hero ───────── */
.hero { padding-top: 76px !important; display: grid; gap: 56px; }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { max-width: 15ch; font-size: clamp(44px, 7.2vw, 96px); }
.hero .cta-row, .hero .facts { justify-content: center; }
.lede { font-size: clamp(17px, 1.55vw, 20px); color: var(--dim); max-width: 700px; margin: 26px 0 0; }
.lede b { color: var(--text); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 26px 0 0; color: var(--faint); font: 13px var(--mono); }
.facts li::before { content: "✦"; color: var(--amber); margin-right: 8px; font-size: 10px; vertical-align: 1px; }
.hero-stage { position: relative; margin: 0; }
.hero-stage figcaption { margin-top: 14px; color: var(--faint); font-size: 13.5px; text-align: center; }
.glow { position: absolute; inset: -10% -6% auto; height: 80%; z-index: -1; pointer-events: none; background: radial-gradient(55% 60% at 50% 45%, rgba(245, 184, 74, 0.2), transparent 70%); filter: blur(24px); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trio-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); text-decoration: none; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); color: var(--dim); font-size: 14.5px; transition: border-color .25s, background .25s, transform .25s; }
.trio-card:hover { border-color: rgba(245, 184, 74, 0.35); background: rgba(245, 184, 74, 0.04); transform: translateY(-2px); }
.trio-card img { width: 44px; flex: none; }
.trio-card b { color: var(--text); }

/* ───────── Window chrome (matches the apps' dark title bars) ───────── */
.window { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--canvas); box-shadow: 0 0 0 1px var(--line-2), 0 40px 100px -40px rgba(0, 0, 0, 0.95); }
.titlebar { position: relative; display: flex; align-items: center; gap: 4px; height: 42px; padding: 0 8px; background: var(--window); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.titlebar.plain { gap: 12px; padding: 0 14px; }
.win-title { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-title img { width: 16px; height: 16px; flex: none; }
.live { margin-left: auto; padding: 3px 8px; border-radius: 6px; font: 500 11px/1.4 var(--mono); color: var(--amber); background: rgba(245, 184, 74, 0.1); border: 1px solid rgba(245, 184, 74, 0.25); white-space: nowrap; }
.lights { flex: none; width: 46px; height: 10px; background:
  radial-gradient(circle at 5px 5px, #3a3a42 4.5px, transparent 5px),
  radial-gradient(circle at 23px 5px, #3a3a42 4.5px, transparent 5px),
  radial-gradient(circle at 41px 5px, #3a3a42 4.5px, transparent 5px); }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background .2s, color .2s; }
.tab img { width: 18px; height: 18px; }
.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.tab.is-active { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.tab-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.tab-progress.run { animation: progress var(--dur, 6s) linear forwards; }
@keyframes progress { to { width: 100%; } }
.viewport { position: relative; aspect-ratio: 1920 / 1013; background: var(--canvas); }
.viewport img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.01); transition: opacity .6s ease, transform 1.2s ease; }
.viewport img.is-active { opacity: 1; transform: none; }

/* HUD pill: the same translucent panel the apps float over their content */
.hud { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); font: 12px/1.2 var(--mono); color: var(--dim); white-space: nowrap; }
.hud b { color: var(--text); font-weight: 500; }
.hud .sep { width: 1px; height: 12px; background: var(--line-2); }

/* ───────── App sections ───────── */
.app-head { display: flex; align-items: center; gap: 22px; }
.app-icon { width: 80px; height: 80px; flex: none; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.55)); }
.app-head .eyebrow { margin-bottom: 10px; }
.app-lede { max-width: 780px; color: var(--dim); font-size: 18px; margin: 24px 0 0; }
.demo { margin-top: 40px; border-radius: calc(var(--radius) + 2px); }
.demo:focus-visible { outline-offset: 6px; }
.hint-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; margin: 16px 2px 0; color: var(--dim); font-size: 14.5px; }
.hint-row > span:first-child { max-width: 720px; }
.hint-row b { color: var(--text); }
.keys { color: var(--faint); font-size: 13px; white-space: nowrap; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 56px; }
.features > div { padding-top: 18px; border-top: 1px solid var(--line-2); transition: border-color .3s; }
.features > div:hover { border-top-color: var(--amber); }
.features p { margin: 8px 0 0; color: var(--dim); font-size: 14.5px; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 56px; }
.shots figure { margin: 0; }
.shots figcaption { margin-top: 12px; color: var(--dim); font-size: 14px; }

/* Toolbars inside demo windows */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; background: var(--window); border-top: 1px solid var(--line); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 9px; background: var(--canvas); border: 1px solid var(--line); }
.seg button { padding: 6px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--dim); font-size: 13px; cursor: pointer; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.is-active { background: rgba(245, 184, 74, 0.16); color: var(--amber); box-shadow: 0 0 0 1px rgba(245, 184, 74, 0.32) inset; }
.tool-btns { display: inline-flex; gap: 4px; margin-left: auto; }
.tool-btns button { min-width: 32px; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--canvas); color: var(--dim); font-size: 13px; cursor: pointer; }
.tool-btns button:hover { color: var(--text); border-color: var(--line-2); }
.tool-btns button[aria-pressed="true"] { color: var(--amber); border-color: rgba(245, 184, 74, 0.32); }
.slider { display: inline-flex; align-items: center; }
.slider input, .l-find input[type=range] { accent-color: var(--amber); width: 130px; }
.metrics-bar { padding: 9px 14px; font: 12.5px var(--mono); color: var(--dim); background: var(--canvas); border-top: 1px solid var(--line); }
.metrics-bar .bad { color: var(--pink); }
.metrics-bar .ok { color: var(--green); }

/* ───────── Glint demo ───────── */
.g-stage { position: relative; height: clamp(320px, 46vw, 520px); background: var(--canvas); }
.g-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.g-stage canvas.dragging { cursor: grabbing; }
.g-hud { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: calc(100% - 24px); overflow: hidden; }
.g-px { display: inline-flex; align-items: center; gap: 7px; min-width: 15ch; }
.swatch { width: 11px; height: 11px; border-radius: 3px; background: transparent; box-shadow: 0 0 0 1px var(--line-2); }

/* ───────── Flick demo ───────── */
.f-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.f-stage { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; user-select: none; }
.f-stage video { display: block; width: 100%; height: 100%; object-fit: contain; }
.f-stage.cropping { cursor: crosshair; }
.f-bigplay { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; border: 0; cursor: pointer; background: var(--panel); box-shadow: 0 0 0 1px var(--line-2), 0 10px 30px rgba(0, 0, 0, 0.5); transition: opacity .25s, transform .25s; }
.f-bigplay svg { width: 30px; height: 30px; margin-left: 4px; fill: var(--amber); }
.f-bigplay:hover { transform: scale(1.06); }
.f-stage.playing .f-bigplay { opacity: 0; pointer-events: none; transform: scale(0.9); }
.f-controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); transition: opacity .35s; }
.f-stage.idle .f-controls { opacity: 0; }
.f-stage.idle { cursor: none; }
.f-track { position: relative; height: 18px; cursor: pointer; }
.f-track::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); }
.f-played, .f-clip { position: absolute; top: 8px; height: 3px; border-radius: 2px; left: 0; width: 0; }
.f-played { background: var(--amber); }
.f-clip { background: rgba(245, 184, 74, 0.3); }
.f-mark { position: absolute; top: 1px; width: 2px; height: 16px; margin-left: -1px; background: var(--amber); display: none; border-radius: 1px; }
.f-knob { position: absolute; top: 4px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); left: 0; }
.f-row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.f-icon { width: 32px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; cursor: pointer; color: var(--text); }
.f-icon:hover { background: rgba(255, 255, 255, 0.08); }
.f-icon svg { width: 17px; height: 17px; fill: currentColor; }
.f-icon[data-f-act=loop] svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.f-icon.is-on { color: var(--amber); }
.f-icon .i-pause, .f-stage.playing .f-icon .i-play { display: none; }
.f-stage.playing .f-icon .i-pause { display: block; }
.f-time { margin-left: 6px; font: 12.5px var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.f-spacer { flex: 1; }
.f-cliplabel { font: 12px var(--mono); color: var(--amber); margin-right: 6px; }
.f-crop { position: absolute; inset: 0; pointer-events: none; }
.f-crop-box { position: absolute; outline: 1.5px solid var(--amber); box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55); }
.f-crop-tag { position: absolute; left: 0; bottom: calc(100% + 8px); display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font: 12px var(--mono); color: var(--text); white-space: nowrap; pointer-events: auto; }
.f-crop-box.below .f-crop-tag { bottom: auto; top: 8px; left: 8px; }
.f-crop-tag button { border: 0; background: transparent; color: var(--dim); font: 12px var(--sans); cursor: pointer; padding: 0; }
.f-crop-tag button:hover { color: var(--amber); }
.f-toast, .l-toast { position: absolute; left: 50%; top: 14px; transform: translate(-50%, -6px); padding: 7px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--text); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.f-toast.show, .l-toast.show { opacity: 1; transform: translate(-50%, 0); }
.f-side { display: grid; gap: 12px; }
.f-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.f-buttons button { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); color: var(--text); font-size: 13.5px; cursor: pointer; text-align: left; transition: border-color .2s, background .2s; }
.f-buttons button:hover { border-color: rgba(245, 184, 74, 0.4); background: rgba(245, 184, 74, 0.05); }
.f-buttons button.is-on { border-color: rgba(245, 184, 74, 0.55); background: rgba(245, 184, 74, 0.1); color: var(--amber); }

/* Terminals */
.term, .claude { border-radius: var(--radius); background: #0a0a0c; box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px -40px #000; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; background: #151518; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--faint); }
.term-bar .copy { margin-left: auto; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--dim); font: 12px var(--sans); cursor: pointer; }
.term-bar .copy:hover { color: var(--amber); border-color: rgba(245, 184, 74, 0.4); }
.term pre { margin: 0; padding: 14px 16px; font-size: 12.5px; line-height: 1.65; color: #c9c9cf; overflow-x: auto; white-space: pre-wrap; word-break: break-word; min-height: 3em; }
.term.cmd pre { white-space: pre-wrap; word-break: break-word; }
.term .k { color: #8ab4ff; } .term .s { color: var(--amber-hi); } .term .n { color: #b9e28c; } .term .nul { color: var(--faint); }
.term .flash { animation: flash .8s ease; border-radius: 3px; }
@keyframes flash { from { background: rgba(245, 184, 74, 0.35); } }
.c { color: var(--faint); }

/* ───────── Leaf demo ───────── */
.l-body { display: grid; grid-template-columns: 240px 1fr; height: clamp(440px, 52vw, 560px); }
.l-side { padding: 14px 10px; background: var(--canvas); border-right: 1px solid var(--line); overflow-y: auto; font-size: 12.5px; }
.l-label { margin: 2px 6px 8px; font-weight: 600; color: var(--text); font-size: 12.5px; }
.l-label + ol + .l-label { margin-top: 18px; }
.l-results, .l-toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.l-results button, .l-toc button { width: 100%; text-align: left; padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--dim); font-size: 12px; line-height: 1.45; cursor: pointer; }
.l-results button:hover, .l-toc button:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.l-results button.is-cur { background: rgba(110, 168, 255, 0.16); color: var(--text); }
.l-results .pg { color: var(--amber); margin-right: 5px; }
.l-results mark { background: rgba(245, 184, 74, 0.35); color: var(--text); border-radius: 2px; }
.l-empty { padding: 6px 8px; color: var(--faint); }
.l-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #2a2a2f; }
.l-find { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--window); border-bottom: 1px solid var(--line); color: var(--dim); }
.l-find input[type=search] { flex: 1; min-width: 60px; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--canvas); color: var(--text); font: 13px var(--sans); outline: none; }
.l-find input[type=search]:focus { border-color: rgba(245, 184, 74, 0.5); }
.l-count { font: 12px var(--mono); color: var(--dim); min-width: 4.5ch; text-align: right; }
.l-find button { height: 30px; min-width: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--canvas); color: var(--dim); cursor: pointer; font-size: 13px; }
.l-find button:hover { color: var(--text); border-color: var(--line-2); }
.l-find .l-night[aria-pressed=true] { color: var(--amber); border-color: rgba(245, 184, 74, 0.4); }
.l-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 22px 22px 40px; scrollbar-width: none; }
.l-scroll::-webkit-scrollbar { display: none; }
.l-page { container-type: inline-size; max-width: 640px; margin: 0 auto; padding: 34px 38px 40px; background: #fbfbf9; color: #202024; border-radius: 3px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45); transition: background .35s, color .35s; }
.l-page h1, .l-page h2 { font-family: var(--sans); letter-spacing: -0.01em; color: inherit; max-width: none; }
.l-page h1 { font-size: min(30px, 6cqi); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(0, 0, 0, 0.18); }
.l-page h2 { font-size: min(21px, 4.2cqi); margin: 22px 0 8px; }
.l-page .para { margin: 0 0 14px; font-size: min(17.5px, calc(100cqi / 29)); line-height: 1.6; }
.l-page .line { display: block; white-space: nowrap; }
.l-page mark { background: rgba(245, 184, 74, 0.45); color: inherit; border-radius: 2px; padding: 0; }
.l-page mark.cur { background: rgba(255, 120, 0, 0.67); }
.l-page figure { margin: 10px 0 18px; display: flex; gap: 14px; align-items: center; }
.l-page figure img { width: 34%; border-radius: 2px; }
.l-page figcaption { font-size: min(13px, 2.8cqi); color: #55555c; }
.l-ticks { position: absolute; right: 3px; top: 47px; bottom: 6px; width: 6px; pointer-events: none; }
.l-ticks i { position: absolute; left: 0; width: 6px; height: 2px; border-radius: 1px; background: var(--amber); }
.l-ticks i.cur { background: #ff7800; height: 3px; }
.l-main.night .l-page { background: #1e1e22; color: #e9e9ec; }
.l-main.night .l-page h1 { border-bottom-color: rgba(255, 255, 255, 0.16); }
.l-main.night .l-page figcaption { color: #8d8d95; }
.l-main.night .l-page mark { background: rgba(245, 184, 74, 0.38); }
.l-main.night .l-page mark.cur { background: rgba(255, 120, 0, 0.6); }

/* Before/after swipe (Leaf night rendering) */
.night-compare { margin: 56px 0 0; display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 36px; align-items: center; }
.night-compare figcaption { color: var(--dim); font-size: 16px; }
.night-compare figcaption b { color: var(--text); display: block; font-size: 18px; margin-bottom: 8px; font-family: var(--display); letter-spacing: -0.01em; }
.swipe { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px -30px #000; background: var(--canvas); user-select: none; touch-action: pan-y; }
.swipe > img, .swipe-b img { width: 100%; height: auto; }
.swipe-b { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.swipe-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--amber); box-shadow: 0 0 14px rgba(245, 184, 74, 0.8); pointer-events: none; }
.swipe-handle span { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--amber); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5); }
.swipe-handle span::before, .swipe-handle span::after { content: ""; position: absolute; top: 12px; border: 5px solid transparent; }
.swipe-handle span::before { left: 4px; border-right-color: #1a1206; }
.swipe-handle span::after { right: 4px; border-left-color: #1a1206; }
.swipe input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.tag { position: absolute; top: 10px; padding: 5px 8px; border-radius: 7px; font: 500 11px/1 var(--mono); background: var(--panel); color: var(--text); pointer-events: none; }
.tag-a { left: 10px; } .tag-b { right: 10px; }

/* ───────── Instant ───────── */
.desk { margin-top: 40px; display: grid; grid-template-columns: 250px 1fr; gap: 20px; }
.files { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; background: transparent; border: 1px solid transparent; color: var(--text); font: 13.5px/1 var(--mono); cursor: default; text-align: left; user-select: none; transition: background .15s; }
.file:hover { background: rgba(255, 255, 255, 0.04); }
.file.is-selected { background: rgba(110, 168, 255, 0.14); border-color: rgba(110, 168, 255, 0.35); }
.file-icon { width: 30px; height: 36px; border-radius: 4px 9px 4px 4px; position: relative; flex: none; background: #2a2a31; }
.file-icon::after { content: ""; position: absolute; inset: 9px 6px; border-radius: 2px; }
.file-icon.img::after { background: linear-gradient(135deg, #2ec27e 40%, #f5b84a 41% 60%, #62a0ea 61%); }
.file-icon.vid::after { inset: 10px 8px; background: var(--amber); clip-path: polygon(15% 0, 100% 50%, 15% 100%); }
.file-icon.doc::after { background: repeating-linear-gradient(180deg, #8d8d95 0 2px, transparent 2px 5px); }
.hint { margin: auto 0 0; padding-top: 14px; color: var(--faint); font-size: 13px; }
.mini-window { border-radius: var(--radius); overflow: hidden; background: var(--canvas); box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px -30px #000; display: flex; flex-direction: column; min-height: 340px; }
.mini-bar { display: flex; justify-content: space-between; align-items: center; height: 38px; padding: 0 14px; background: var(--window); border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--dim); }
.mini-app { display: inline-flex; align-items: center; gap: 7px; color: var(--amber); }
.mini-app img { width: 16px; height: 16px; }
.mini-view { position: relative; flex: 1; display: grid; place-items: center; }
.mini-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: pop .14s ease-out; }
.mini-empty { color: var(--faint); font-size: 14px; margin: 0; }
@keyframes pop { from { opacity: 0; transform: scale(0.985); } }

/* ───────── Agents ───────── */
.claude { margin-top: 40px; max-width: 920px; }
.claude-body { padding: 20px 22px 24px; font: 13.5px/1.65 var(--mono); color: #c9c9cf; min-height: 268px; }
.claude-body p { margin: 0 0 10px; overflow-wrap: anywhere; }
.claude-body .u { color: var(--text); padding: 10px 14px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); margin-bottom: 18px; }
.claude-body .u span { color: var(--amber); margin-right: 6px; }
.claude-body .t b { color: var(--text); font-weight: 500; }
.claude-body .o { color: var(--faint); padding-left: 18px; }
.claude-body .a { color: var(--text); margin-top: 16px; }
.bullet { color: #2ec27e; margin-right: 4px; }
.bullet.amber { color: var(--amber); }
[data-typer].armed .claude-body > p { opacity: 0; transform: translateY(4px); }
[data-typer] .claude-body > p { transition: opacity .35s ease, transform .35s ease; }
[data-typer] .claude-body > p.shown { opacity: 1; transform: none; }
.cli-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.cli { padding: 20px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); }
.cli h3 { display: flex; align-items: center; gap: 10px; font: 500 15px var(--mono); letter-spacing: 0; }
.cli h3 img { width: 26px; }
.cli dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; margin: 16px 0 0; font-size: 13.5px; }
.cli dt { font-family: var(--mono); color: var(--amber-hi); white-space: nowrap; }
.cli dd { margin: 0; color: var(--dim); }

/* ───────── Family ───────── */
.traits { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.traits li { padding: 26px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 6px; align-content: start; transition: background .3s; }
.traits li:hover { background: radial-gradient(120% 120% at 0 0, rgba(245, 184, 74, 0.06), transparent 60%); }
.traits span { color: var(--dim); font-size: 14.5px; }

/* ───────── Download ───────── */
.download { padding-bottom: 20px !important; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 44px auto 0; max-width: 940px; }
.dl { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 32px 18px 22px; border-radius: 16px; text-align: center; background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)); border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .3s; }
.dl:hover { transform: translateY(-3px); border-color: rgba(245, 184, 74, 0.4); box-shadow: 0 20px 60px -24px rgba(245, 184, 74, 0.3); }
.dl img { width: 92px; margin-bottom: 10px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5)); }
.dl-name { font: 650 22px var(--display); letter-spacing: -0.02em; }
.dl-kind { color: var(--dim); font-size: 14px; margin-bottom: 16px; }
.dl-meta { margin-top: 12px; font: 12px var(--mono); color: var(--faint); }
.dl-meta a { color: var(--dim); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 40px auto 0; max-width: 940px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { counter-increment: s; position: relative; padding: 18px 18px 18px 56px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); color: var(--dim); font-size: 14.5px; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--mono); color: #1a1206; background: var(--amber); }
.steps b { color: var(--text); display: block; margin-bottom: 4px; }
.note { max-width: 940px; margin: 18px auto 0; color: var(--faint); font-size: 14px; text-align: center; }
.note b { color: var(--dim); }
.source { max-width: 940px; margin: 24px auto 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.02); }
.source summary { cursor: pointer; padding: 15px 20px; color: var(--dim); font-size: 15px; list-style: none; }
.source summary::-webkit-details-marker { display: none; }
.source summary::before { content: "›"; display: inline-block; margin-right: 10px; color: var(--amber); transition: transform .2s; }
.source[open] summary::before { transform: rotate(90deg); }
.source pre { margin: 0 20px; padding: 14px 16px; border-radius: 9px; background: #0a0a0c; font-size: 13px; line-height: 1.7; overflow-x: auto; }
.source p { margin: 0; padding: 14px 20px 18px; color: var(--dim); font-size: 14px; }

/* ───────── Footer ───────── */
.footer { max-width: var(--max); margin: 110px auto 0; padding: 32px 16px 48px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; color: var(--dim); font-size: 14px; }
.footer p { margin: 10px 0 0; }
.footer a { color: var(--text); text-decoration-color: var(--faint); text-underline-offset: 3px; }
.footer .brand { text-decoration: none; }
.footer-keys { color: var(--faint); }
.credits { max-width: 560px; font-size: 13px; color: var(--faint); }

/* ───────── Command palette and help (the apps' Ctrl+P look) ───────── */
.palette, .help { position: fixed; inset: 0; z-index: 120; display: grid; place-items: start center; padding: 12vh 16px 16px; background: rgba(5, 5, 7, 0.55); backdrop-filter: blur(3px); }
.palette[hidden], .help[hidden] { display: none; }
.palette-box, .help-box { width: min(560px, 100%); border-radius: 14px; background: rgba(28, 28, 32, 0.97); border: 1px solid var(--line-2); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); overflow: hidden; animation: drop .16s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--dim); }
.palette-input input { flex: 1; height: 52px; border: 0; background: transparent; color: var(--text); font: 16px var(--sans); outline: none; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; cursor: pointer; color: var(--text); font-size: 14.5px; }
.palette-list li img, .palette-list li .pi { width: 20px; height: 20px; flex: none; display: grid; place-items: center; color: var(--amber); font-size: 14px; }
.palette-list li small { margin-left: auto; color: var(--faint); font-size: 12px; }
.palette-list li.is-active { background: rgba(245, 184, 74, 0.13); }
.palette-list .none { color: var(--faint); cursor: default; }
.palette-foot, .help-foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; }
.help-box { width: min(860px, 100%); }
.help-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.help-head h2 { font-size: 18px; letter-spacing: -0.01em; }
.help-head button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--dim); font-size: 18px; cursor: pointer; }
.help-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 20px; max-height: 64vh; overflow-y: auto; }
.help-cols h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 12px; }
.help-cols h3 img { width: 18px; }
.help-cols dl { margin: 0; display: grid; gap: 7px; font-size: 13px; }
.help-cols dt { color: var(--text); }
.help-cols dd { margin: -4px 0 4px; color: var(--dim); }

/* ───────── Reveal ───────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ───────── Responsive ───────── */
@media (max-width: 1080px) {
  .features { grid-template-columns: 1fr 1fr; }
  .f-layout { grid-template-columns: 1fr; }
  .f-side { grid-template-columns: 1fr 1fr; }
  .f-buttons { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .help-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-links, .palette-btn span, .palette-btn kbd { display: none; }
  .palette-btn { margin-left: auto; padding: 0 10px; }
  .trio, .cli-grid, .traits, .steps { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .night-compare { grid-template-columns: 1fr; }
  .night-compare .swipe { max-width: 460px; }
  .l-body { grid-template-columns: 1fr; height: auto; }
  .l-side { display: none; }
  .l-scroll { height: 460px; flex: none; }
}
@media (max-width: 640px) {
  main > section { padding-top: 92px; }
  .hero { padding-top: 44px !important; gap: 44px; }
  .app-icon { width: 60px; height: 60px; }
  .app-head { gap: 16px; }
  .features, .f-side, .dl-grid { grid-template-columns: 1fr; }
  .f-buttons { grid-template-columns: 1fr 1fr; }
  .desk { grid-template-columns: 1fr; }
  .files { flex-direction: row; padding: 8px; }
  .file { flex: 1 1 0; flex-direction: column; gap: 8px; font-size: 11px; padding: 10px 4px; text-align: center; }
  .hint { display: none; }
  .mini-window { min-height: 210px; }
  .tab { padding: 0 9px 0 7px; font-size: 12.5px; gap: 6px; }
  .tab img { width: 16px; height: 16px; }
  .live { display: none; }
  .g-hud .g-px, .g-hud .sep:first-of-type { display: none; }
  .tool-btns { margin-left: 0; }
  .l-scroll { padding: 12px 10px 28px; height: 400px; }
  .l-page { padding: 22px 18px 26px; }
  .l-find .l-night { padding: 0 6px; }
  .keys { white-space: normal; }
  .claude-body { font-size: 12px; padding: 16px; }
  .term pre { font-size: 11.5px; }
  .help-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
