/* agneta.dahlbom.io, in the app's own visual language (Sources/Agneta/Style.swift): system fonts, a deep rose accent,
   and the app icon's summer evening (coral, rose, violet) as a faint glow along the top of surfaces and in a few small
   marks, never behind running text. Light and dark follow the system. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-band: #f7f4f5;
  --bg-raised: #f7f4f5;
  --bg-card: #ffffff;
  --bg-code: #f7f4f5;
  --bg-control: #ebe7e9;
  --bg-control-on: #ffffff;
  --text: #1c1a1d;
  --text-2: #6b6570;
  --line: rgb(60 30 50 / 0.1);
  --line-strong: rgb(60 30 50 / 0.17);
  --accent: #b0365f;
  /* A prominent button: the evening deepened so white reads across it (4.8:1 or more at every stop). */
  --button-fill: linear-gradient(90deg, #c2475a, #b0365f 50%, #8e3a92);
  --button-shadow: 0 1px 2px rgb(110 30 60 / 0.22), 0 8px 20px -8px rgb(176 54 95 / 0.55);
  /* The icon's evening, as the app draws its rings and its glow. */
  --evening: linear-gradient(90deg, #ff9a5a, #ff5f7e 55%, #8b3dff);
  --evening-corner: linear-gradient(135deg, #ff9a5a, #ff5f7e 50%, #8b3dff);
  --glow: 0.11;
  /* On dark ground, coral alone turns brown; the evening there starts nearer rose. */
  --evening-dusk: linear-gradient(90deg, #ff7a6e, #ff5f7e 45%, #8b3dff);
  --sky-fill: var(--evening);
  --sky: 0.1;
  --code-key: #9b2f57;
  --code-string: #8c4a1c;
  --code-number: #6b3fa0;
  --code-dim: #6b6570;
  /* The night band, in both appearances. */
  --night: #17131b;
  --night-text: #f6f2f6;
  --night-text-2: #b6adb9;
  --night-line: rgb(255 255 255 / 0.12);
  --shadow: 0 1px 2px rgb(60 20 40 / 0.06), 0 18px 48px -18px rgb(60 20 40 / 0.22);
  --bar: rgb(255 255 255 / 0.74);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 20px;
  --width: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141215;
    --bg-band: #1b181c;
    --bg-raised: #1d1a1e;
    --bg-card: #1d1a1e;
    --bg-code: #1f1b22;
    --bg-control: #2a262b;
    --bg-control-on: #4a444b;
    --text: #f5f2f5;
    --text-2: #aaa2ac;
    --line: rgb(255 240 250 / 0.1);
    --line-strong: rgb(255 240 250 / 0.17);
    --accent: #ff9db4;
    --button-fill: linear-gradient(90deg, #bf4866, #b8466e 50%, #9a48a6);
    --button-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 22px -8px rgb(184 70 110 / 0.55);
    --glow: 0.16;
    --sky: 0.1;
    --sky-fill: var(--evening-dusk);
    --code-key: #ff9db4;
    --code-string: #ffc9a6;
    --code-number: #c9a6ff;
    --code-dim: #a69cab;
    --night: #0d0b0e;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 18px 48px -18px rgb(0 0 0 / 0.7);
    --bar: rgb(20 18 21 / 0.74);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.53 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

/* The evening, faint along the top of every page, as along the top of the app's panel. */
body::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 560px; z-index: -1; pointer-events: none;
  background: var(--sky-fill); opacity: var(--sky);
  -webkit-mask: linear-gradient(#000, rgb(0 0 0 / 0.35) 45%, transparent);
  mask: linear-gradient(#000, rgb(0 0 0 / 0.35) 45%, transparent);
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 4px; }

code, pre { font-family: var(--mono); }
code { font-size: 0.86em; letter-spacing: 0; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.022em; line-height: 1.12; margin: 0; }
p { margin: 0 0 1em; }
p, li, dd, figcaption, .section-lede { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

.wrap { max-width: var(--width); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 20;
  background: var(--button-fill); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 10px; }

/* A surface with the evening's glow along its top: the app's panel and dialogs, on the web. */
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; inset: 0 0 auto; height: min(150px, 100%); z-index: -1; pointer-events: none;
  border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  background: var(--evening); opacity: var(--glow);
  -webkit-mask: linear-gradient(#000, rgb(0 0 0 / 0.35) 45%, transparent);
  mask: linear-gradient(#000, rgb(0 0 0 / 0.35) 45%, transparent);
}

/* The bar */

.bar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter);
  height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { display: block; }
.bar nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.bar nav a { color: var(--text-2); }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--text); text-decoration: none; }
.bar nav .bar-download {
  color: #fff; font-weight: 600; font-size: 13px; padding: 5px 13px; border-radius: 980px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0) 55%), var(--button-fill);
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.3), 0 1px 2px rgb(110 30 60 / 0.25);
}
.bar nav .bar-download:hover { color: #fff; filter: brightness(1.04); }

/* Buttons and small links */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; border-radius: 980px;
  font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text); background: var(--bg-card); border: 1px solid var(--line-strong);
  transition: filter 0.12s ease-out, border-color 0.12s ease-out;
}
.button:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
/* The prominent button wears the evening, as in the app: a coral-rose to violet fill, a glass sheen, a hairline. */
.button.primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0) 50%), var(--button-fill);
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.3), var(--button-shadow);
}
.button.primary:hover { filter: brightness(1.04); }
.button.primary:active { filter: brightness(0.92); }

.more { font-weight: 500; }
.more::after { content: "\00a0›"; }
.more-row { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 8px; }

/* The start page */

.home main > section { padding-top: 112px; }
.home main > section.band, .home main > section.night { margin-top: 112px; padding: 96px 0; }
.home main > section.band { background: var(--bg-band); }
.home main > section.band + section, .home main > section.night + section { padding-top: 104px; }
.home h2 { font-size: clamp(30px, 2.6vw + 16px, 44px); letter-spacing: -0.028em; line-height: 1.08; }
.section-lede { font-size: 19px; line-height: 1.5; color: var(--text-2); max-width: 44em; margin: 18px 0 40px; letter-spacing: -0.016em; }

/* The first screen: what it is beside what it looks like. */
.hero {
  max-width: var(--width); margin: 0 auto; padding: 64px var(--gutter) 0 !important;
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 32px 56px; align-items: center;
}
.hero-icon { display: block; width: 76px; height: 76px; margin: 0 0 24px -7px; }
.hero h1 { font-size: clamp(42px, 2.6vw + 18px, 58px); letter-spacing: -0.036em; line-height: 1.02; }
.hero .lede { font-size: 19px; line-height: 1.5; color: var(--text-2); margin: 24px 0 32px; letter-spacing: -0.017em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.meta { list-style: none; padding: 0; margin: 24px 0 0; font-size: 14px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 0; }
.meta li { white-space: nowrap; }
.meta li:first-child { flex-basis: 100%; }
.meta li + li + li::before { content: "·"; margin: 0 8px; }

/* The screenshots on one desktop: the app's own showcase backdrop (Sources/Agneta/Snapshots.swift), the muted dusk
   both were captured over, so each window's glass shows the colours behind it. The images keep the backdrop's edge
   around the window; clip-path cuts it off at the window's hairline and corners (23 px in, radius 24 and 28). */
.stage { margin: 0; min-width: 0; }
.desk {
  position: relative; container-type: inline-size; aspect-ratio: 720 / 600; overflow: hidden; border-radius: 24px;
  background:
    radial-gradient(46% 52% at 4% 96%, rgb(255 158 122 / 0.5), rgb(255 158 122 / 0) 100%),
    radial-gradient(50% 56% at 100% 100%, rgb(140 61 255 / 0.22), rgb(140 61 255 / 0) 100%),
    linear-gradient(196deg, #dccccf, #c8b8c3 38%, #ab9cb4 72%, #978aa8);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06), 0 30px 70px -36px rgb(80 30 70 / 0.5);
}
.menubar {
  position: absolute; inset: 0 0 auto; height: 3.6cqw; display: flex; justify-content: flex-end; align-items: center;
  padding: 0 4cqw; background: rgb(255 255 255 / 0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #1d1d1f; box-shadow: 0 1px 0 rgb(0 0 0 / 0.05);
}
.status-item { display: grid; place-items: center; width: 4.4cqw; height: 2.9cqw; border-radius: 0.8cqw; background: rgb(0 0 0 / 0.1); }
.status-item svg { width: 2.4cqw; height: 2.4cqw; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.win { position: absolute; width: var(--w); filter: drop-shadow(0 1.2cqw 2.6cqw rgb(40 10 40 / 0.3)) drop-shadow(0 0 1px rgb(0 0 0 / 0.2)); }
.win img { display: block; width: 100%; height: auto; }
/* The approval window at 72 %, its left edge 22 px in and its bottom 28 px up; the panel at 93 %, under the menu bar
   item, right edge 20 px in (positions in a 720-wide desk, as cqw). */
.win-approval { --w: 50.8cqw; left: 0.75cqw; top: 15.9cqw; }
.win-approval img { clip-path: inset(calc(var(--w) * 23 / 508) round calc(var(--w) * 28 / 508)); }
.win-panel { --w: 52.6cqw; right: -0.18cqw; top: 1cqw; }
.win-panel img { clip-path: inset(calc(var(--w) * 23 / 408) round calc(var(--w) * 24 / 408)); }
.stage figcaption { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; font-size: 13px; line-height: 1.42; color: var(--text-2); }
.stage figcaption span:last-child { padding-left: 2.6%; }

[data-shots] .dark { display: none; }
@media (prefers-color-scheme: dark) {
  [data-shots]:not([data-shots="light"]) .light { display: none; }
  [data-shots]:not([data-shots="light"]) .dark { display: block; }
  [data-shots]:not([data-shots="light"]) .menubar { background: rgb(30 26 32 / 0.5); color: #f5f5f7; }
  [data-shots]:not([data-shots="light"]) .status-item { background: rgb(255 255 255 / 0.18); }
  .desk { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 30px 70px -36px rgb(0 0 0 / 0.8); }
  .desk::before { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / 0.16); }
}
[data-shots="dark"] .light { display: none; }
[data-shots="dark"] .dark { display: block; }
[data-shots="dark"] .menubar { background: rgb(30 26 32 / 0.5); color: #f5f5f7; }
[data-shots="dark"] .status-item { background: rgb(255 255 255 / 0.18); }

.appearance {
  display: flex; width: max-content; margin: 16px 0 0; padding: 2px;
  background: var(--bg-control); border-radius: 9px;
}
.appearance[hidden] { display: none; }
.appearance button {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text);
  border: 0; background: none; padding: 4px 14px; border-radius: 7px; cursor: pointer; min-width: 64px;
}
.appearance button[aria-pressed="true"] { background: var(--bg-control-on); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }

.demo-section { padding-top: 96px !important; }
.demo { margin: 0 auto; max-width: 880px; text-align: center; }
.demo video { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); background: var(--bg-raised); }
.demo figcaption { margin-top: 14px; font-size: 14px; color: var(--text-2); }

/* Who it's for: two panels. */
.audiences { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; padding-top: 120px !important; }
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 26px; padding: 40px 40px 28px;
  box-shadow: var(--shadow);
}
.audiences h2 { font-size: clamp(25px, 1.2vw + 17px, 31px); margin-bottom: 14px; }
.audiences .card > p:first-of-type { color: var(--text-2); font-size: 19px; line-height: 1.47; margin-bottom: 22px; }
.points { list-style: none; margin: 0 0 20px; padding: 0; }
.points li { position: relative; padding: 14px 0 14px 24px; border-top: 1px solid var(--line); }
/* A small evening dot, like the rings mark's colours. */
.points li::before {
  content: ""; position: absolute; left: 1px; top: 23px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--evening-corner);
}

/* How it works */
.flow { margin: 44px 0 8px; }
.flow-row { display: grid; grid-template-columns: 1fr minmax(120px, 0.8fr) 1fr minmax(100px, 0.7fr) 1fr; align-items: center; }
.node {
  border: 1px solid var(--line-strong); border-radius: 18px; padding: 18px 20px; background: var(--bg-card);
  display: flex; flex-direction: column; gap: 4px; min-height: 96px; justify-content: center;
}
.node strong { font-size: 17px; }
.node span { font-size: 14px; color: var(--text-2); line-height: 1.38; }
/* Agneta itself: an evening hairline and the glow, as its own surfaces. */
.node-agneta {
  border-color: transparent; position: relative; isolation: isolate;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box, var(--evening-corner) border-box;
  box-shadow: 0 12px 32px -16px rgb(176 54 95 / 0.45);
}
.node-agneta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--evening); opacity: var(--glow);
  -webkit-mask: linear-gradient(#000, transparent 80%); mask: linear-gradient(#000, transparent 80%);
}
.edge { position: relative; text-align: center; padding: 0 10px 14px; font-size: 13px; color: var(--text-2); }
.edge::after { content: ""; position: absolute; left: 0; right: 6px; bottom: 4px; height: 1px; background: var(--text-2); }
.edge::before {
  content: ""; position: absolute; right: 0; bottom: 0; width: 0; height: 0;
  border-left: 7px solid var(--text-2); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}
.edge code { font-size: 12px; }
.flow-return {
  position: relative; margin: 0 10%;
  height: 40px; border: 1px solid var(--text-2); border-top: 0; border-radius: 0 0 14px 14px; text-align: center;
}
.flow-return span { position: relative; top: 30px; background: var(--bg); padding: 0 10px; font-size: 13px; color: var(--text-2); }
.flow-return::before {
  content: ""; position: absolute; left: -5px; top: -1px; width: 0; height: 0;
  border-bottom: 7px solid var(--text-2); border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
}
.steps { margin-top: 64px; }
.steps ol { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 56px; }
.steps li { counter-increment: step; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.steps li strong:first-child { display: block; color: var(--text); font-size: 19px; margin-bottom: 6px; letter-spacing: -0.016em; }
.steps li strong:first-child::before {
  content: counter(step); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 11px;
  border-radius: 50%; background: var(--button-fill); color: #fff; font-size: 13px; font-weight: 700; vertical-align: 2px;
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.3);
}

/* What stays on your Mac: a night band, the evening fading out at its top. */
.night { background: var(--night); color: var(--night-text); position: relative; isolation: isolate; overflow: hidden; }
.night::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 300px; z-index: -1; pointer-events: none;
  background: var(--evening-dusk); opacity: 0.14;
  -webkit-mask: linear-gradient(#000, rgb(0 0 0 / 0.3) 40%, transparent); mask: linear-gradient(#000, rgb(0 0 0 / 0.3) 40%, transparent);
}
.night .section-lede { color: var(--night-text-2); }
.night a { color: #ff9db4; }
.night :focus-visible { outline-color: rgb(255 157 180 / 0.8); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 44px; margin: 8px 0 40px; }
.facts > div { position: relative; padding-top: 20px; border-top: 1px solid var(--night-line); }
.facts > div::before { content: ""; position: absolute; left: 0; top: -1px; width: 36px; height: 1px; background: var(--evening); }
.facts dt { font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.facts dd { margin: 0; color: var(--night-text-2); font-size: 16px; line-height: 1.55; }

.providers .table { margin-bottom: 22px; }
.providers p:not(.section-lede) { color: var(--text-2); font-size: 16px; max-width: 46em; }
.providers p strong { color: var(--text); }

.not ul { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 44px; }
.not li { color: var(--text-2); font-size: 16px; line-height: 1.55; }
.not li strong:first-child { display: block; color: var(--text); font-size: 19px; margin-bottom: 6px; letter-spacing: -0.016em; }

/* Add it to your app: the exchange in a dark code window, in the evening's colours. */
.dev-code { margin-bottom: 44px; }
.dev pre {
  font-size: 12.5px; padding: 46px 20px 18px; border-radius: 16px; border: 1px solid rgb(255 255 255 / 0.06);
  background: #1f1b22; color: #ece6ed; box-shadow: var(--shadow);
  --code-key: #ff9db4; --code-string: #ffc9a6; --code-number: #c9a6ff; --code-dim: #a69cab;
}
.dev pre::before {
  content: ""; position: absolute; left: 18px; top: 18px; width: 10px; height: 10px; border-radius: 50%;
  background: #ff5f57; box-shadow: 16px 0 #febc2e, 32px 0 #28c840; opacity: 0.85;
}
.code-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.dev-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 16px; }
.link-list li:first-child { border-top: 0; padding-top: 0; }
.link-list a { font-weight: 600; }
.dev-shot { margin: 0; }
.dev-shot img { display: block; border-radius: 14px; box-shadow: var(--shadow); }
.dev-shot figcaption { margin-top: 14px; font-size: 14px; color: var(--text-2); line-height: 1.43; }

/* The status note, before the download. */
.callout { border-radius: 22px; background: var(--bg-raised); border: 1px solid var(--line); padding: 30px 34px; }
.callout blockquote { margin: 0; padding: 0; border: 0; }
.callout p { margin-bottom: 10px; }
.callout ul { margin: 0; padding-left: 1.2em; color: var(--text-2); }
.callout li { margin: 6px 0; }
.callout li::marker { color: var(--accent); }
.home main > section.status { padding-top: 104px; }

/* Install */
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 16px; margin-bottom: 18px; }
.download {
  display: grid; grid-template-columns: 44px 1fr 22px; grid-template-rows: auto auto auto; column-gap: 16px; align-items: center;
  padding: 18px 20px; position: relative; isolation: isolate;
  border-radius: 20px; background: var(--bg-card); border: 1px solid var(--line-strong); color: var(--text);
  box-shadow: var(--shadow); transition: border-color 0.12s ease-out, transform 0.12s ease-out;
}
.download::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 100%; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--evening); opacity: var(--glow);
  -webkit-mask: linear-gradient(#000, transparent 75%); mask: linear-gradient(#000, transparent 75%);
}
.download:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong)); }
@media (prefers-reduced-motion: no-preference) { .download:hover { transform: translateY(-1px); } }
.download img { grid-row: 1 / 4; width: 44px; height: 44px; }
.download .arch { font-weight: 600; font-size: 19px; letter-spacing: -0.016em; }
.download .detail { font-size: 14px; color: var(--text-2); grid-column: 2; }
.download .file { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0; color: var(--text-2); grid-column: 2; margin-top: 2px; }
/* A download arrow, in the accent. */
.download::after {
  content: ""; grid-column: 3; grid-row: 1 / 4; width: 22px; height: 22px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 1.6a8.4 8.4 0 1 1 0 16.8 8.4 8.4 0 0 1 0-16.8Zm-.8 3.9v7.1l-2.6-2.6-1.1 1.1 4.5 4.5 4.5-4.5-1.1-1.1-2.6 2.6V7.5h-1.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 1.6a8.4 8.4 0 1 1 0 16.8 8.4 8.4 0 0 1 0-16.8Zm-.8 3.9v7.1l-2.6-2.6-1.1 1.1 4.5 4.5 4.5-4.5-1.1-1.1-2.6 2.6V7.5h-1.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.download .arch, .download .detail, .download .file { grid-column: 2; }
.hint { font-size: 14px; color: var(--text-2); margin-bottom: 56px; }
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 64px; }
.install-grid h3 { font-size: 19px; margin: 0 0 12px; letter-spacing: -0.016em; }
.install-grid h3:not(:first-child) { margin-top: 34px; }
.install-grid ol { margin: 0; padding-left: 1.25em; }
.install-grid li { margin-bottom: 10px; padding-left: 4px; }
.install-grid li::marker { color: var(--accent); font-weight: 600; }
.install-grid p { color: var(--text-2); font-size: 16px; }
.install pre { background: var(--bg-card); }
.home main > section.install { margin-bottom: 0; }

/* Code */

pre {
  position: relative; margin: 0 0 1.2em; padding: 14px 16px; overflow-x: auto;
  background: var(--bg-code); border: 1px solid var(--line); border-radius: 12px;
  font-size: 13.5px; line-height: 1.6; letter-spacing: 0; tab-size: 2;
}
pre code { font-size: inherit; background: none; padding: 0; border-radius: 0; white-space: pre; }
pre .c, pre .a { color: var(--code-dim); }
pre .k { color: var(--code-key); }
pre .s { color: var(--code-string); }
pre .n { color: var(--code-number); }
pre[data-copy] { padding-right: 76px; }
.copy {
  position: absolute; top: 8px; right: 8px;
  font: 500 12px var(--font); color: var(--text-2); background: var(--bg-card); cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 7px; padding: 4px 10px;
}
.copy:hover { color: var(--text); }

/* Tables */

.table { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-card); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 11px 15px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: 13px; color: var(--text-2); background: var(--bg-raised); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td code { overflow-wrap: anywhere; }

/* Documentation */

.docs {
  max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 56px;
}
.docs-no-toc { grid-template-columns: 220px minmax(0, 1fr); }
.docs-nav-wide { position: sticky; top: 52px; max-height: calc(100vh - 52px); overflow-y: auto; padding: 40px 0 48px; }
.docs-nav-compact { display: none; }
.docs-nav-list h2 { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: 0; margin: 0 0 6px; }
.docs-nav-list div + div { margin-top: 22px; }
.docs-nav-list ul { list-style: none; padding: 0; margin: 0; }
.docs-nav-list a { position: relative; display: block; padding: 5px 10px; margin: 0 -10px; border-radius: 8px; color: var(--text); font-size: 14px; line-height: 1.35; }
.docs-nav-list a:hover { background: var(--bg-raised); text-decoration: none; }
.docs-nav-list a[aria-current] { background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent); font-weight: 600; }
.docs-nav-list a[aria-current]::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--evening-corner);
}

.doc-main { padding: 44px 0 96px; min-width: 0; }
.source { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.source a + a, .source a:last-child { margin-left: 4px; }

.toc { position: sticky; top: 52px; align-self: start; max-height: calc(100vh - 52px); overflow-y: auto; padding: 48px 0 48px; }
.toc h2 { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: 0; margin-bottom: 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-2); font-size: 13px; line-height: 1.35; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a[aria-current] { color: var(--accent); border-left-color: var(--accent); }
.toc ul ul { border-left: 0; margin: 1px 0 4px; }
.toc ul ul a { padding-left: 24px; font-size: 12.5px; }

.prose { max-width: 740px; }
.prose h1 { font-size: clamp(34px, 2vw + 24px, 48px); letter-spacing: -0.032em; margin: 0 0 20px; line-height: 1.06; }
.prose h1 + p { font-size: 19px; line-height: 1.5; color: var(--text-2); letter-spacing: -0.016em; }
.prose h2 { font-size: 28px; margin: 60px 0 16px; letter-spacing: -0.024em; }
.prose h3 { font-size: 21px; margin: 40px 0 12px; letter-spacing: -0.018em; }
.prose h4 { font-size: 17px; margin: 28px 0 8px; }
.prose h2, .prose h3, .prose h4 { position: relative; }
.anchor { margin-left: 8px; color: var(--text-2); opacity: 0; font-weight: 400; }
.anchor::before { content: "#"; }
.prose :is(h2, h3, h4):hover .anchor, .anchor:focus { opacity: 1; text-decoration: none; }
.prose p, .prose li { line-height: 1.62; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: 0.4em 0; }
.prose li > ul, .prose li > ol { margin: 0.4em 0 0; }
.prose li::marker { color: var(--text-2); }
.prose :not(pre) > code { background: var(--bg-raised); padding: 0.12em 0.36em; border-radius: 5px; border: 1px solid var(--line); }
.prose blockquote { margin: 0 0 1.2em; padding: 18px 22px; background: var(--bg-raised); border-radius: 14px; border: 1px solid var(--line); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose .table { max-width: none; }
.prose strong { font-weight: 600; }
/* A numbered step of the developer guide: its bold lead reads as a small heading. */
.prose .step { position: relative; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.prose h2 + .step { margin-top: 20px; padding-top: 0; border-top: 0; }
.prose .step > strong:first-child { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.018em; margin-bottom: 6px; color: var(--text); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; max-width: 740px; }
.pager a {
  display: flex; flex-direction: column; gap: 2px; padding: 15px 18px; border: 1px solid var(--line-strong); border-radius: 14px;
  font-weight: 600; font-size: 16px; background: var(--bg-card);
}
.pager a:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong)); }
.pager span { font-size: 13px; font-weight: 400; color: var(--text-2); }
.pager .next { grid-column: 2; text-align: right; }
.pager .prev span::before { content: "‹\00a0"; }
.pager .next span::after { content: "\00a0›"; }
.pager + .source { margin-top: 28px; }

.docs-index { padding-top: 64px; padding-bottom: 112px; }
.docs-index h1 { font-size: clamp(38px, 3vw + 22px, 56px); letter-spacing: -0.034em; }
.docs-index .lede { font-size: 19px; color: var(--text-2); margin: 14px 0 0; }
.docs-index section { margin-top: 52px; }
.docs-index h2 { font-size: 21px; letter-spacing: -0.018em; margin-bottom: 14px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 22px; position: relative; isolation: isolate;
  border: 1px solid var(--line-strong); border-radius: 18px; color: var(--text); background: var(--bg-card);
  transition: border-color 0.12s ease-out;
}
.cards a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--evening); opacity: 0; transition: opacity 0.15s ease-out;
  -webkit-mask: linear-gradient(#000, transparent 70%); mask: linear-gradient(#000, transparent 70%);
}
.cards a:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong)); }
.cards a:hover::before { opacity: var(--glow); }
.cards .name { font-weight: 600; font-size: 17px; color: var(--accent); }
.cards .what { font-size: 15px; color: var(--text-2); line-height: 1.45; }

.missing-page { padding-top: 96px; padding-bottom: 160px; }
.missing-page h1 { font-size: 44px; letter-spacing: -0.03em; margin-bottom: 16px; }

/* The footer */

.foot { border-top: 1px solid var(--line); background: var(--bg-band); font-size: 13px; color: var(--text-2); padding: 36px 0 44px; }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px !important; }
.foot-brand img { display: block; }
.foot-brand span { display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.foot-brand strong { color: var(--text); font-size: 15px; font-weight: 600; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; }
.foot nav a { color: var(--text); }
.foot p { max-width: 62em; line-height: 1.5; margin-bottom: 8px; }
.foot p a { color: var(--text-2); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: var(--line-strong); }

/* Narrower screens */

@media (max-width: 1180px) {
  .docs, .docs-no-toc { grid-template-columns: 210px minmax(0, 1fr); gap: 48px; }
  .toc { display: none; }
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  .hero .lede { max-width: 34em; }
}

@media (max-width: 900px) {
  .facts, .not ul { grid-template-columns: repeat(2, 1fr); }
  .audiences { grid-template-columns: 1fr; }
  .flow-row { grid-template-columns: 1fr; justify-items: stretch; }
  .flow-row .edge { padding: 10px 0 10px 22px; text-align: left; justify-self: start; margin-left: 28px; }
  .flow-row .edge::after { left: 0; right: auto; top: 0; bottom: 6px; width: 1px; height: auto; }
  .flow-row .edge::before { left: -4px; right: auto; top: auto; bottom: 0; border-top: 7px solid var(--text-2); border-left: 4.5px solid transparent; border-right: 4.5px solid transparent; border-bottom: 0; }
  .flow-return { display: none; }
  .flow-row::after { content: "The engine calls your app’s tools over MCP, on loopback."; font-size: 13px; color: var(--text-2); margin-top: 12px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .docs, .docs-no-toc { display: block; }
  .docs-nav-wide { display: none; }
  .docs-nav-compact {
    display: block; position: sticky; top: 52px; z-index: 5; margin: 0 calc(-1 * var(--gutter));
    background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
  }
  .docs-nav-compact summary { list-style: none; cursor: pointer; padding: 10px var(--gutter); display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
  .docs-nav-compact summary::-webkit-details-marker { display: none; }
  .docs-nav-compact summary .label { color: var(--text-2); }
  .docs-nav-compact summary .current { font-weight: 600; }
  .docs-nav-compact summary::after { content: "⌄"; margin-left: auto; color: var(--text-2); }
  .docs-nav-compact[open] summary::after { content: "⌃"; }
  .docs-nav-compact .docs-nav-list { padding: 4px var(--gutter) 20px; max-height: 70vh; overflow-y: auto; }
  .docs-nav-compact .docs-nav-list a { margin: 0; }
  .doc-main { padding-top: 28px; }
  html { scroll-padding-top: 108px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .home main > section { padding-top: 72px; }
  .home main > section.band, .home main > section.night { margin-top: 72px; padding: 64px 0; }
  .home main > section.band + section, .home main > section.night + section { padding-top: 72px; }
  .home main > section.status { padding-top: 72px; }
  .hero { padding-top: 40px !important; }
  .hero-icon { width: 64px; height: 64px; margin-bottom: 18px; }
  .audiences { padding-top: 80px !important; gap: 16px; }
  .card { padding: 30px 22px 18px; border-radius: 22px; }
  .install-grid, .dev-grid { grid-template-columns: 1fr; }
  .steps ol, .not ul { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 28px; }
  .downloads { grid-template-columns: 1fr; }
  .section-lede { font-size: 17px; }
  .callout { padding: 22px 20px; }
  .cards { grid-template-columns: 1fr; }
  .bar nav { gap: 18px; }
  .hero .lede { font-size: 18px; }
  .prose h2 { font-size: 24px; margin-top: 44px; }
  .prose h3 { font-size: 19px; }
  .prose h1 + p { font-size: 17px; }
  pre { font-size: 12.5px; border-radius: 10px; }
  table { font-size: 14px; }
}

/* On a phone, the two windows stack on a tall desk, nearly full width (positions in a 350-wide desk). */
@media (max-width: 600px) {
  .meta { flex-direction: column; gap: 2px; }
  .meta li + li + li::before { content: none; }
  .desk { aspect-ratio: 350 / 900; border-radius: 20px; }
  .menubar { height: 7.4cqw; padding: 0 4cqw; }
  .status-item { width: 10cqw; height: 6.4cqw; border-radius: 1.8cqw; }
  .status-item svg { width: 5cqw; height: 5cqw; }
  .win { filter: drop-shadow(0 2cqw 5cqw rgb(40 10 40 / 0.3)) drop-shadow(0 0 1px rgb(0 0 0 / 0.2)); }
  .win-panel { --w: 106.1cqw; right: -3.14cqw; top: 2.6cqw; }
  .win-approval { --w: 105.9cqw; left: -2.94cqw; top: 122.6cqw; }
  .stage figcaption { grid-template-columns: 1fr; gap: 6px; }
  .stage figcaption span:last-child { padding-left: 0; }
  .stage figcaption span:first-child { order: 1; }
}

@media (max-width: 440px) {
  .bar nav .bar-optional { display: none; }
}

/* On a phone, a table's rows become cards, each cell under its column's name. */
@media (max-width: 600px) {
  .table { border: 0; border-radius: 0; overflow: visible; background: none; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line-strong); border-radius: 14px; padding: 4px 0; margin-bottom: 10px; background: var(--bg-card); }
  .table td { border: 0; padding: 6px 14px; }
  .table td:first-child { font-weight: 600; }
  .table td[data-label]:not([data-label=""]):not(:first-child)::before {
    content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 1px;
  }
  .table td:empty { display: none; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: auto; }
}

@media print {
  body::before, .bar, .docs-nav, .toc, .foot, .appearance, .copy, .pager { display: none !important; }
  .docs { display: block; }
  .night { background: none; color: inherit; }
}
