/* Trebuchet site. Static, no scripts. Design system built from the app icon (icon-source/) and the launcher windows
   (night/integrator/launcher-shots/shots3/); documented in site/DESIGN.md. Light + dark like the app. */
:root {
  color-scheme: light dark;
  /* slate, sampled from the icon background (top → bottom) and the Launch button */
  --slate-800: #2f3e55;
  --slate-700: #3c516d;     /* icon top */
  --slate-600: #46536e;     /* Launch button, light (rendered) · seal marker */
  --slate-500: #516782;     /* icon middle */
  --slate-400: #586a8c;     /* Launch button, dark */
  --slate-300: #677d96;     /* icon bottom */
  --slate-200: #8fa6c4;     /* launcher accent, dark */
  --slate-100: #e6ebf2;
  /* aluminium, sampled from the icon foreground */
  --alu-100: #f4f4f5; --alu-200: #e4e5e8; --alu-300: #d0d1d5; --alu-400: #b0b2b8; --alu-500: #8e8e93;
  /* semantic, light (app: white window, #f4f4f4 cards) */
  --c-bg: #ffffff;
  --c-bg-alt: #f5f5f7;
  --c-card: #f4f4f4;
  --c-line: #e3e3e6;
  --c-line-strong: #8e8e93;     /* outline button border, 3.3:1 */
  --c-text: #1d1d1f;            /* 16.8:1 */
  --c-text-2: #48484d;          /* 9.1:1 */
  --c-text-3: #6e6e73;          /* 5.1:1 on white, 4.7:1 on alt */
  --c-accent: var(--slate-600); /* links, primary button, numbers, seal: 7.7:1 */
  --c-accent-hover: var(--slate-700);
  --c-on-accent: #ffffff;
  --c-band-top: var(--slate-700); --c-band-bottom: var(--slate-400);   /* white text ≥ 5.4:1 everywhere on the band */
  --c-on-band: #ffffff; --c-on-band-2: #dfe6f0;
  --c-focus: var(--slate-600);
  --c-ok: #34c759;
  /* type: the app's system font; Inter only where SF is missing */
  --f-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", sans-serif;
  --f-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --t-hero: clamp(48px, 7.4vw, 88px);
  --t-h1: clamp(38px, 5.6vw, 64px);
  --t-h2: clamp(30px, 4vw, 46px);
  --t-h3: 22px;
  --t-num: 44px;
  --t-lede: clamp(19px, 2vw, 22px);
  --t-body: 17px; --t-small: 14px; --t-caption: 13px;
  /* space (= launcher 4/8/12/20/28 pt, extended) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 20px; --s-5: 28px; --s-6: 44px; --s-7: 64px; --s-8: 96px;
  /* shape (launcher card radius 10 pt; site cards a step larger) */
  --r-card: 14px; --r-window: 12px; --r-code: 10px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 30px rgba(0, 0, 0, .10);
  --shadow-window: 0 0 0 .5px rgba(0, 0, 0, .18), 0 22px 60px rgba(10, 20, 40, .35);
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #1f2023; --c-bg-alt: #18191b; --c-card: #292a2d; --c-line: #3a3b3f; --c-line-strong: #6e6e73;
    --c-text: #f5f5f7; --c-text-2: #c7c7cc; --c-text-3: #98989d;
    --c-accent: var(--slate-200); --c-accent-hover: #aebfd6; --c-on-accent: #ffffff;
    --c-band-top: var(--slate-800); --c-band-bottom: var(--slate-600);
    --c-focus: var(--slate-200);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .45);
  }
  .btn-primary { background: var(--slate-400); }
  .btn-primary:hover { background: var(--slate-300); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font: 400 var(--t-body)/1.55 var(--f-text); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; border-radius: 6px; }
.band :focus-visible, footer :focus-visible { outline-color: #ffffff; }
.skip { position: absolute; left: var(--s-3); top: -60px; background: var(--slate-600); color: #fff; padding: var(--s-2) var(--s-3); border-radius: var(--r-code); z-index: 20; }
.skip:focus { top: var(--s-3); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-5); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.022em; line-height: 1.07; margin: 0; }
h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0 0 1em; }
.eyebrow { font: 600 var(--t-caption)/1 var(--f-text); letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 14px; }
.lede { font-size: var(--t-lede); line-height: 1.45; color: var(--c-text-2); max-width: 38em; }
.small { font-size: var(--t-small); color: var(--c-text-3); }
.measure-text { max-width: 46em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--c-bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--c-line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--c-text); text-decoration: none; font: 600 19px/1 var(--f-display); letter-spacing: -.01em; min-height: 44px; }
.brand:hover { text-decoration: none; }
.icon-slot { width: 28px; height: 28px; }
.nav ul { list-style: none; display: flex; gap: var(--s-1); margin: 0; padding: 0; }
.nav a.link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3); color: var(--c-text-2); font-size: 14px; }
.nav a.link:hover { color: var(--c-text); text-decoration: none; }
.nav a.link[aria-current="page"] { color: var(--c-text); font-weight: 600; }

/* Buttons (app: Launch = filled slate capsule; links = plain) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 48px; padding: 0 24px; border-radius: var(--r-pill); font-weight: 600; font-size: 17px; text-decoration: none; border: 1px solid transparent; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--slate-600); color: #fff; }
.btn-primary:hover { background: var(--slate-700); color: #fff; }
.btn-outline { border-color: var(--c-line-strong); color: var(--c-text); }
.btn-outline:hover { border-color: var(--c-accent); }
.btn-on-band { background: #fff; color: var(--slate-700); }
.btn-on-band:hover { background: var(--slate-100); color: var(--slate-800); }
.btn-outline-band { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-outline-band:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.btn .glyph { width: 14px; height: 14px; }
.actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-5); }

/* Band: the icon's slate gradient (hero, closing CTA, statement) */
.band { background: linear-gradient(180deg, var(--c-band-top), var(--c-band-bottom)); color: var(--c-on-band); }
.band h1, .band h2, .band h3 { color: var(--c-on-band); }
.band p, .band .lede { color: var(--c-on-band-2); }
.band .small { color: var(--c-on-band-2); }
.band .eyebrow { color: var(--c-on-band-2); }

/* Hero */
.hero { padding: 76px 0 0; text-align: center; overflow: hidden; }
.hero .app-icon { width: 156px; height: 156px; margin: 0 auto 20px; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .35)); }
.hero h1 { max-width: 12em; margin: 0 auto; }
.hero h1 .tag { display: block; font-weight: 600; font-size: .5em; letter-spacing: -.01em; margin-top: .35em; color: var(--c-on-band-2); }
.hero .lede { margin: 24px auto 0; }
.hero .actions { justify-content: center; }
.hero .meta { margin-top: 16px; }
.hero .stage { position: relative; margin: var(--s-7) auto 0; max-width: 980px; padding: 0 var(--s-4); }
.hero .stage .window { position: relative; z-index: 2; width: 440px; margin: 0 auto -150px; }
.hero .stage .scene { position: relative; z-index: 1; }

/* App window (screenshots of the launcher, light/dark via <picture>) */
.window { border-radius: var(--r-window); overflow: hidden; box-shadow: var(--shadow-window); background: var(--c-bg); }
.window img { width: 100%; }

/* Screenshots */
.shot img, .framed { width: 100%; border-radius: var(--r-card); box-shadow: var(--shadow); }
figure { margin: 0; }
figcaption { font-size: var(--t-small); color: var(--c-text-3); margin-top: var(--s-3); text-align: center; }

/* Sections */
section { padding: var(--s-8) 0; }
section.tight { padding: var(--s-7) 0; }
section.flush-top { padding-top: 0; }
section.after-stage { padding-top: var(--s-8); }
.section-head { max-width: 46em; margin-bottom: var(--s-6); }
.section-head h2 { margin-bottom: 16px; }
.center { text-align: center; }
.center .section-head, .center .lede { margin-left: auto; margin-right: auto; }
.alt { background: var(--c-bg-alt); }

/* Stat cards (= launcher StatusCard: card fill, 1 title, 1 detail) */
.gains { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
.gain { background: var(--c-card); border-radius: var(--r-card); padding: 28px 30px 24px; }
.gain .num { font: 700 var(--t-num)/1 var(--f-display); letter-spacing: -.02em; color: var(--c-accent); font-variant-numeric: tabular-nums; }
.gain .num small { font-size: 20px; font-weight: 600; color: var(--c-text-3); }
.gain h3 { margin: 14px 0 6px; }
.gain p { color: var(--c-text-2); margin: 0 0 12px; }
.gain .cond { font-size: var(--t-caption); color: var(--c-text-3); border-top: 1px solid var(--c-line); padding-top: 10px; margin: 0; }

/* Statement (the app's footer line, with its shield) */
.statement { text-align: center; }
.statement .shield { width: 34px; height: 34px; margin: 0 auto 22px; color: var(--c-on-band); }
.statement blockquote { margin: 0 auto; max-width: 28em; font: 600 clamp(22px, 2.6vw, 30px)/1.35 var(--f-display); letter-spacing: -.01em; color: var(--c-on-band); }

/* Split rows */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split > figure img { border-radius: var(--r-card); box-shadow: var(--shadow); }
.split h2 { margin-bottom: 16px; }
.split .window { max-width: 480px; margin: 0 auto; }

/* Lists */
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 16px 0; border-top: 1px solid var(--c-line); }
.plain li:last-child { border-bottom: 1px solid var(--c-line); }
.plain strong { display: block; font-size: 18px; margin-bottom: 2px; }
.plain span { color: var(--c-text-2); }

/* Seal marker (= launcher seal.fill, slate) */
.seal { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; color: var(--c-accent); }

/* Fix groups (= launcher Settings: grouped Form, section headers) */
.fix-group { margin-top: var(--s-6); }
.fix-group > h2 { font-size: 24px; letter-spacing: -.01em; margin-bottom: var(--s-1); }
.fix-group > p.small { margin: 0 0 var(--s-3); }
.fixes { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--c-card); border-radius: var(--r-card); overflow: hidden; }
.fixes th, .fixes td { text-align: left; vertical-align: top; padding: 18px 20px; border-top: 1px solid var(--c-line); }
.fixes thead th { font-size: var(--t-caption); letter-spacing: .06em; text-transform: uppercase; color: var(--c-text-3); font-weight: 600; border-top: 0; padding-bottom: 6px; }
.fixes td:first-child { width: 26%; }
.fixes td:last-child { width: 16%; }
.fixes .name { font: 600 19px/1.25 var(--f-display); }
.fixes td p { margin: 0 0 6px; color: var(--c-text-2); }
.fixes td .measure { font-size: var(--t-small); color: var(--c-text); }
.pill { display: inline-block; font-size: var(--t-caption); font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); background: var(--alu-200); color: var(--c-text-2); }
.pill.on { background: var(--slate-600); color: #fff; }
@media (prefers-color-scheme: dark) { .pill { background: #3a3b3f; } .pill.on { background: var(--slate-400); } }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps > li { counter-increment: step; position: relative; padding: 24px 28px 20px 82px; background: var(--c-card); border-radius: var(--r-card); }
.steps > li::before { content: counter(step); position: absolute; left: 26px; top: 22px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--slate-600); color: #fff; font: 700 17px/1 var(--f-text); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--c-text-2); margin: 0 0 10px; }
pre, code { font-family: var(--f-mono); font-size: var(--t-small); }
pre { background: #1d1d1f; color: #f5f5f7; padding: 16px 18px; border-radius: var(--r-code); overflow-x: auto; margin: 6px 0 4px; white-space: pre-wrap; word-break: break-all; }
:not(pre) > code { background: var(--alu-200); color: var(--c-text); padding: 1px 6px; border-radius: 5px; }
@media (prefers-color-scheme: dark) { pre { background: #0f1012; } :not(pre) > code { background: #3a3b3f; } }

/* FAQ */
.faq details { border-top: 1px solid var(--c-line); }
.faq details:last-of-type { border-bottom: 1px solid var(--c-line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font: 600 21px/1.3 var(--f-display); letter-spacing: -.01em; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font: 300 28px/1 var(--f-text); color: var(--c-accent); }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 22px; color: var(--c-text-2); max-width: 44em; }

/* Licences / credits */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.cols h3 { margin-bottom: 8px; }
.cols p { color: var(--c-text-2); font-size: 16px; }
.credits { margin-top: 30px; }

/* Page header (sub pages) */
.page-head { padding: 72px 0 40px; }
.page-head h1 { font-size: var(--t-h1); margin-bottom: 16px; }

/* Footer */
footer { background: var(--c-bg-alt); color: var(--c-text-3); padding: 48px 0 56px; font-size: var(--t-small); border-top: 1px solid var(--c-line); }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
footer .brand { margin-bottom: 10px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
footer ul a { display: inline-flex; align-items: center; min-height: 36px; color: var(--c-text-2); }
footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--c-line); padding-top: 20px; font-size: var(--t-caption); line-height: 1.55; }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .wrap { padding: 0 var(--s-4); }
  .nav .hide-sm { display: none; }
  .nav a.link { padding: 0 var(--s-2); }
  section { padding: 68px 0; }
  section.after-stage { padding-top: 68px; }
  .hero { padding-top: 52px; }
  .hero .app-icon { width: 120px; height: 120px; }
  .hero .stage { margin-top: var(--s-6); padding: 0 var(--s-3); }
  .hero .stage .window { width: min(330px, 86vw); margin-bottom: -110px; }
  .gains, .split, .cols, footer .wrap { grid-template-columns: 1fr; }
  .split { gap: 30px; }
  .split.flip > :first-child { order: 0; }
  .shot img, .split .wide, .hero .scene img { height: 220px; object-fit: cover; object-position: 30% 50%; }
  .fixes thead { display: none; }
  .fixes, .fixes tbody, .fixes tr, .fixes td { display: block; width: 100% !important; }
  .fixes tr { border-top: 1px solid var(--c-line); padding: 14px 18px; }
  .fixes tr:first-child { border-top: 0; }
  .fixes td { border: 0; padding: 3px 0; }
  .steps > li { padding: 22px 20px 18px 66px; }
  .steps > li::before { left: 18px; width: 32px; height: 32px; }
}
@media (max-width: 420px) {
  .nav a.link { font-size: 13px; padding: 0 6px; }
  .brand { font-size: 18px; }
  .btn { width: 100%; }
}
.gain-line { font-weight: 600; color: var(--c-accent); margin: 0 0 6px; }
.num-cap { font-size: var(--t-caption); color: var(--c-text-3); margin: 4px 0 0; }
