@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Libre Caslon Text'; font-weight: 400; font-display: swap; src: url(/fonts/libre-caslon-text-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Libre Caslon Text'; font-weight: 400; font-style: italic; font-display: swap; src: url(/fonts/libre-caslon-text-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Libre Caslon Text'; font-weight: 700; font-display: swap; src: url(/fonts/libre-caslon-text-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'IM Fell English SC'; font-weight: 400; font-display: swap; src: url(/fonts/im-fell-english-sc-latin-400-normal.woff2) format('woff2'); }

:root {
  --ground: #F4F1EA; --raised: #FBF9F4; --card: #FFFFFF; --line: #E4DDCF; --line-soft: #EEE8DC;
  --text: #1B2433; --muted: #5A5F6A; --link: #23507F; --link-hover: #163A60;
  --navy: #1F3A5F; --on-navy: #FFFFFF; --marker: #94740F; --malachite: #0A6B3D; --chop: #A3262A;
  --note-ground: #F7F0DC; --note-line: #E5D3A0; --note-icon: #6E570B;
  --code-ground: #1B2433; --code-head: #243045; --code-text: #EEF0F3; --code-muted: #B4BCC8;
  --night: #121821; --night-raised: #18202B; --night-line: #263040; --brass: #D9B54A; --on-brass: #1A1404;
  --rose: rgba(31, 58, 95, 0.06);
  /* Colours that stay the same in light and dark mode: the dark bands, the code surfaces and the company colours. */
  --on-night: #EEF0F3; --on-night-soft: #D5DCE6; --on-night-muted: #B4BCC8; --on-night-faint: #8A94A3; --on-night-link: #E2C25E;
  --night-edge: #56637A; --deep: #0B1018; --deep-line: #2C3746; --code-edge: #3A475A; --navy-edge: #8FA3BF;
  --company-navy: #1F3A5F; --company-ochre: #94740F; --white: #FFFFFF; --brass-rose: rgba(217, 181, 74, 0.07);
  --warning-icon: #A3262A;
  --serif: 'Libre Caslon Text', Georgia, serif;
  --sans: 'Segoe UI Variable Text', 'Segoe UI', Inter, system-ui, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  color-scheme: light dark;
}
/* Dark colours. They follow the device's setting unless the reader picks a theme with the header's theme button, which
   sets data-theme on the html element; /assets/theme.js restores that choice before the page is drawn. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #121821; --raised: #18202B; --card: #1E2733; --line: #2C3746; --line-soft: #263040;
    --text: #EEF0F3; --muted: #B4BCC8; --link: #E2C25E; --link-hover: #F0D684;
    --navy: #D9B54A; --on-navy: #1A1404; --marker: #D9B54A;
    --note-ground: #2A2617; --note-line: #5C4D1F; --note-icon: #D9B54A;
    --code-ground: #0B1018; --code-head: #141C28;
    --rose: rgba(217, 181, 74, 0.07);
    --warning-icon: #F08A86;
    --eyebrow: #D9B54A; --search-edge: #63738A;
  }
}
:root[data-theme="dark"] {
  --ground: #121821; --raised: #18202B; --card: #1E2733; --line: #2C3746; --line-soft: #263040;
  --text: #EEF0F3; --muted: #B4BCC8; --link: #E2C25E; --link-hover: #F0D684;
  --navy: #D9B54A; --on-navy: #1A1404; --marker: #D9B54A;
  --note-ground: #2A2617; --note-line: #5C4D1F; --note-icon: #D9B54A;
  --code-ground: #0B1018; --code-head: #141C28;
  --rose: rgba(217, 181, 74, 0.07);
  --warning-icon: #F08A86;
  --eyebrow: #D9B54A; --search-edge: #63738A;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
code, pre, .prompt-text { font-variant-ligatures: none; font-feature-settings: 'calt' 0, 'liga' 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--sans); font-size: 1rem; line-height: 1.6; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--raised); border: 1px solid var(--line-soft); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.2; }
:where(.hero h1, .band h2, .lead h1, .cta h2, .docs-main h1, .legal h1, .start-here h2, .faq h2, .cookie-dialog h2, .page404 h1, .brand span) { font-size-adjust: from-font; }
img, svg { max-width: 100%; }
.visually-hidden:where(:not(:focus-within, :active)) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: 12px; z-index: 40; padding: 10px 16px; border-radius: 6px; background: var(--navy); color: var(--on-navy); font-weight: 600; }
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:hover { color: var(--on-navy); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 6px; font-weight: 600; font-size: 1rem; line-height: 1.2; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn, .btn:hover { text-decoration: none; }
.btn.small { padding: 9px 16px; font-size: 0.9375rem; }
.btn.primary { background: var(--navy); color: var(--on-navy); }
.btn.primary:hover { filter: brightness(1.12); color: var(--on-navy); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--muted); color: var(--text); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.link-button:hover { text-decoration: underline; }

.site-header { background: var(--raised); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { max-width: 1360px; margin: 0 auto; padding: 0 24px; min-height: 64px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand, .brand:hover { text-decoration: none; }
.brand svg { color: var(--marker); }
.brand span { font-family: var(--serif); font-weight: 700; font-size: 1.3125rem; }
/* The navigation, laid out inline. Below 1,180px the same element becomes the Menu button's popover (see the end of the file),
   so this rule also undoes the browser's own popover styles. */
.main-nav { display: flex; flex: 1 1 auto; align-items: center; }
.menu-button { display: none; }
.site-menu { position: static; inset: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; overflow: visible; color: inherit; background: transparent; display: flex; flex: 1 1 auto; align-items: center; gap: 32px; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex: 1 1 auto; flex-wrap: wrap; font-size: 0.9375rem; font-weight: 500; }
.nav-links a { display: block; color: var(--text); padding: 21px 0 18px; border-bottom: 3px solid transparent; text-decoration: none; }
.nav-links a[aria-current] { border-bottom-color: var(--marker); }
.header-end { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.header-link { color: var(--text); font-size: 0.9375rem; font-weight: 500; }
.theme-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 -8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; }
.theme-button[hidden], .theme-bar { display: none; }
.theme-button:hover { background: var(--line-soft); }
.theme-button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.theme-button[aria-pressed="true"] .moon, .theme-button[aria-pressed="false"] .sun { display: none; }
.search { position: relative; }
.search label { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; height: 36px; min-width: 240px; color: var(--muted); }
.search input { background: transparent; border: 0; color: var(--text); font: inherit; font-size: 0.875rem; flex: 1; outline: none; min-width: 0; }
.search label:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.search-results { position: absolute; right: 0; top: 42px; width: min(480px, 90vw); max-height: 70dvh; overflow: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); padding: 8px; z-index: 30; }
.search-results a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--text); }
.search-results a:hover, .search-results a:focus { background: var(--raised); text-decoration: none; }
.search-results strong { display: block; font-weight: 600; }
.search-results span { display: block; font-size: 0.8125rem; color: var(--muted); }
.search-results mark { background: var(--note-ground); color: inherit; }
.search-results p { margin: 8px 12px; color: var(--muted); font-size: 0.875rem; }

.rose { width: 760px; height: 760px; fill: none; stroke: var(--rose); stroke-width: 0.6; }
/* The compass rose stays still while the page scrolls. One copy sits behind the whole page; the bands with their own
   background cover it. The hero and the lead band each draw a copy in their own colour at the same place, and their
   clip-path shows that copy only inside the band. */
.hero-rose, .page-rose { position: fixed; right: -160px; top: -56px; pointer-events: none; }
.page-rose { z-index: -1; }
.hero, .lead { clip-path: inset(0); }
.hero-rose .rose { stroke: var(--brass-rose); }
.lead .hero-rose .rose { stroke: var(--rose); }

.hero { position: relative; overflow: clip; background: var(--night); color: var(--on-night); }
.hero-grid { padding-top: 88px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; position: relative; }
.hero-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(2.5rem, 6vw, 3.625rem); line-height: 1.1; }
.hero p { margin: 0; font-size: 1.375rem; line-height: 1.5; color: var(--on-night-soft); max-width: 560px; }
.hero .btn.primary { background: var(--brass); color: var(--on-brass); }
.hero .btn.secondary { color: var(--on-night); border-color: var(--night-edge); }
.hero .fineprint p, .fineprint { font-size: 0.875rem; color: var(--on-night-faint); }
.hero-card { flex: 1 1 440px; min-width: 0; }

.prompt-card { background: var(--deep); border: 1px solid var(--deep-line); border-radius: 10px; overflow: clip; color: var(--on-night); }
.prompt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--night-line); font-size: 0.8125rem; color: var(--on-night-muted); }
.prompt-head button, .code-head button { background: var(--brass); border: 0; color: var(--on-brass); border-radius: 4px; padding: 6px 12px; font: inherit; font-size: 0.8125rem; font-weight: 600; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.prompt-text { margin: 0; padding: 20px 22px 12px; font-family: var(--mono); font-size: 0.8438rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-card.full .prompt-text { padding-bottom: 22px; }
.prompt-more { padding: 4px 22px 18px; }
.prompt-more a { color: var(--on-night-link); font-size: 0.875rem; font-weight: 600; }
.docs-main .prompt-card { margin: 18px 0 26px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }

.band { padding: 88px 0 80px; }
/* A solid band has the page's own colour, so it hides the still compass rose as it scrolls past. */
.band.solid { background: var(--ground); }
.band.raised { background: var(--raised); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.band.dark { background: var(--night); color: var(--on-night); }
.band.dark p { color: var(--on-night-muted); }
.band.dark a { color: var(--on-night-link); }
.band h2, .lead h1, .cta h2, .plans-heading { font-family: var(--serif); font-weight: 700; }
.band h2 { margin: 0 0 12px; font-size: clamp(1.875rem, 4vw, 2.375rem); }
.band .intro p, .band > .wrap > p { font-size: 1.125rem; color: var(--muted); max-width: 760px; margin: 0 0 40px; }
.lead { position: relative; overflow: clip; background: var(--raised); border-bottom: 1px solid var(--line); }
.lead .wrap { padding-top: 80px; padding-bottom: 64px; position: relative; }
.lead h1 { margin: 0 0 16px; font-size: clamp(2.375rem, 5vw, 3.125rem); line-height: 1.15; max-width: 820px; }
.lead p { margin: 0 0 8px; font-size: 1.1875rem; color: var(--muted); max-width: 760px; }
.eyebrow p { font-family: 'IM Fell English SC', Georgia, serif; color: var(--marker); font-size: 1.1875rem; margin: 0 0 8px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 24px; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card-icon { color: var(--marker); display: block; }
.card blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.3125rem; line-height: 1.4; }
.card blockquote p, .card p { margin: 0; }
.card p { font-size: 0.9375rem; color: var(--muted); }
.card blockquote p { color: var(--text); font-size: 1.3125rem; }
.card h3 { margin: 0; font-size: 1.3125rem; font-weight: 600; }
.card > p:last-child a { font-weight: 600; font-size: 0.9375rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.step h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 12px; font-size: 1.3125rem; font-weight: 600; }
.step h3::before { counter-increment: step; content: counter(step); flex: none; width: 36px; height: 36px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--white); background: var(--company-ochre); }
.step:nth-child(2) h3::before { background: var(--company-navy); }
.step:nth-child(3) h3::before { background: var(--malachite); }
.step p { margin: 0; color: var(--muted); }

.flow ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; counter-reset: flow; }
.flow li { border-top: 3px solid var(--navy); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; color: var(--muted); counter-increment: flow; }
.flow li::before { content: counter(flow); font-size: 0.8125rem; font-weight: 600; }
.flow li strong { font-size: 1.0625rem; font-weight: 600; color: var(--text); display: block; }

.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.split > .col { flex: 1 1 440px; min-width: 0; }
.split h2 { margin-top: 0; }
.split .col > p { font-size: 1.0625rem; color: var(--muted); }
.band.dark .code { box-shadow: none; }
.band.dark .split .col > p { color: var(--on-night-muted); }
.band.dark p code { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: var(--on-night); }

.table { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-weight: 600; background: var(--raised); }
tr:last-child td { border-bottom: 0; }
td code, th code { background: none; border: 0; padding: 0; color: var(--link); }

.cta { background: var(--company-navy); color: var(--white); }
.cta .wrap { padding-top: 64px; padding-bottom: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: center; }
.cta h2 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.375rem); grid-column: 1; }
.cta p { margin: 0; color: var(--on-night-soft); grid-column: 1; }
.cta .buttons { grid-column: 2; grid-row: 1 / span 2; padding: 0; }
@media (max-width: 800px) { .cta .wrap { grid-template-columns: minmax(0, 1fr); } .cta .buttons { grid-column: 1; grid-row: auto; } }
.cta .btn.primary { background: var(--brass); color: var(--on-brass); }
.cta .btn.secondary { color: var(--white); border-color: var(--navy-edge); }

.site-footer { background: var(--night); color: var(--on-night-muted); font-size: 0.9375rem; }
.footer-grid { padding-top: 56px; padding-bottom: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.site-footer .brand { color: var(--on-night); }
.site-footer .brand svg { color: var(--brass); }
.site-footer h2 { font-size: 0.9375rem; font-weight: 600; color: var(--on-night); margin: 0 0 10px; font-family: var(--sans); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a, .site-footer .link-button { color: var(--on-night-muted); }
.footer-brand p { font-size: 0.875rem; margin: 12px 0 0; }
.footer-base { border-top: 1px solid var(--night-line); padding-top: 20px; padding-bottom: 28px; font-size: 0.8125rem; color: var(--on-night-faint); }
.small-footer { border-top: 1px solid var(--line); background: var(--raised); font-size: 0.8125rem; color: var(--muted); }
.small-footer .wrap { padding-top: 24px; padding-bottom: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.small-footer .link-button { color: var(--link); }

.docs { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: 260px minmax(0, 1fr) 240px; position: relative; overflow-x: clip; }
.sidebar { padding: 32px 16px 32px 24px; font-size: 0.875rem; border-right: 1px solid var(--line-soft); position: sticky; top: 64px; align-self: start; max-height: calc(100dvh - 64px); overflow: auto; overscroll-behavior: contain; }
/* The contents list, shown as the left column. Below 800px it becomes the Contents button's popover, so undo the popover styles here. */
.contents-button { display: none; }
.toc { position: static; inset: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; overflow: visible; color: inherit; background: transparent; display: block; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc-heading { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 20px 12px 8px; }
.toc-group:first-child .toc-heading { padding-top: 0; }
.sidebar a { display: block; padding: 7px 12px; color: var(--text); border-left: 3px solid transparent; border-radius: 0 4px 4px 0; line-height: 1.3; }
.sidebar a[aria-current] { border-left-color: var(--marker); background: var(--line-soft); font-weight: 600; }
.docs-main { padding: 32px 48px 64px; min-width: 0; max-width: 860px; }
.crumbs { font-size: 0.875rem; color: var(--muted); margin-bottom: 8px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.crumbs ol > li { margin: 0; font-size: inherit; line-height: inherit; }
.crumbs li + li::before { content: '›'; content: '›' / ''; margin: 0 0.28em; }
.crumbs a[aria-current] { color: inherit; }
.docs-main h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.125rem, 4vw, 2.75rem); margin: 0 0 20px; }
.docs-main > p:first-of-type { font-size: 1.125rem; }
.docs-main p, .docs-main li { font-size: 1.0625rem; line-height: 1.7; }
.docs-main h2 { font-size: 1.6875rem; font-weight: 600; margin: 48px 0 12px; }
.docs-main h3 { font-size: 1.25rem; font-weight: 600; margin: 32px 0 10px; }
.docs-main li { margin: 4px 0; }
.docs-main td, .docs-main th { font-size: 0.9375rem; }
.numbered > h2 { display: flex; align-items: center; gap: 12px; }
.numbered > h2 .num { flex: none; width: 32px; height: 32px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9375rem; color: var(--white); }
.numbered.n1 > h2 .num { background: var(--company-ochre); }
.numbered.n2 > h2 .num { background: var(--company-navy); }
.numbered.n3 > h2 .num { background: var(--malachite); }
.rail { padding: 40px 24px 32px 0; position: sticky; top: 64px; align-self: start; font-size: 0.875rem; }
.rail-heading { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.on-page { border-left: 2px solid var(--line); margin-bottom: 24px; }
.on-page .rail-heading { padding-left: 14px; }
.on-page a { display: block; padding: 4px 14px; color: var(--muted); line-height: 1.35; }
.on-page a.active { color: var(--text); font-weight: 600; border-left: 2px solid var(--marker); margin-left: -2px; }
.for-agent .btn { white-space: nowrap; padding: 7px 12px; font-size: 0.875rem; }
.for-agent { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.rail-title { font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; border-top: 1px solid var(--line-soft); padding-top: 24px; }
.pager a { display: flex; flex-direction: column; font-weight: 600; }
.pager a span { font-size: 0.8125rem; color: var(--muted); font-weight: 400; }
.pager .next { text-align: right; margin-left: auto; }

.code { margin: 16px 0 24px; border-radius: 8px; overflow: clip; background: var(--code-ground); color: var(--code-text); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 8px 16px; background: var(--code-head); font-size: 0.8125rem; color: var(--code-muted); min-height: 40px; }
.code-head button { background: transparent; color: var(--code-text); border: 1px solid var(--code-edge); }
.code pre { margin: 0; padding: 18px 16px; overflow-x: auto; font-family: var(--mono); font-size: 0.875rem; line-height: 1.7; }
.code code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }

.callout { display: flex; gap: 14px; border-radius: 8px; padding: 16px 18px; margin: 16px 0 24px; border: 1px solid var(--line); background: var(--card); }
.callout > svg { flex: none; margin-top: 3px; }
.callout.note { background: var(--note-ground); border-color: var(--note-line); }
.callout.note > svg { color: var(--note-icon); }
.callout.warning > svg { color: var(--warning-icon); }
.callout strong { display: block; font-weight: 600; }
main .callout p { margin: 4px 0 0; font-size: 0.9375rem; line-height: 1.65; }


.layers ul { list-style: none; margin: 16px 0 24px; padding: 0; display: flex; flex-direction: column; }
.layers li { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 14px 20px; margin: 0 20px -1px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; font-size: 0.9375rem; color: var(--muted); }
.layers li:nth-child(2) { margin: 0 10px -1px; }
.layers li:last-child { margin: 0; background: var(--company-navy); border-color: var(--company-navy); color: var(--on-night-soft); }
.layers li strong { color: var(--text); font-weight: 600; }
.layers li:last-child strong { color: var(--white); }
.layers li em { font-style: normal; text-align: right; }
.layers li p { margin: 0; grid-column: 1 / -1; font-size: 0.9375rem; }
.layers li > p:first-child { display: contents; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto 64px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 36px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--navy); }
.plan h3 { margin: 0 0 12px; font-size: 1.375rem; font-weight: 600; }
.plan h3 + p { margin: 0 0 16px; font-family: var(--serif); font-weight: 700; font-size: 2.875rem; line-height: 1; }
.plan h3 + p em { font-family: var(--sans); font-style: normal; font-weight: 400; font-size: 0.9375rem; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 28px; position: relative; font-size: 0.9375rem; }
.plan li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 12px; height: 6px; border-left: 1.5px solid var(--navy); border-bottom: 1.5px solid var(--navy); transform: rotate(-45deg); }
.plan .buttons { padding: 0; }
.plan .btn { width: 100%; justify-content: center; }
.plan:not(.featured) .btn.primary { background: transparent; color: var(--text); border-color: var(--text); }
.faq { max-width: 1000px; margin: 0 auto; }
.faq h2 { font-family: var(--serif); font-size: 2.375rem; margin: 0 0 24px; }
.faq h3 { font-size: 1.125rem; font-weight: 600; margin: 24px 0 6px; }
.faq p { color: var(--muted); margin: 0; }

.docs.docs-home { grid-template-columns: 260px minmax(0, 1fr); }
.docs-home-main { min-width: 0; }
.docs-home-main .lead .wrap { padding-left: 48px; }
.start-here { background: var(--night); color: var(--on-night); border-radius: 12px; padding: 32px 36px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; margin: 0 48px 24px; }
.start-here, .start-here:hover { text-decoration: none; }
.start-here > div { flex: 1 1 420px; }
.start-here p { margin: 0; color: var(--on-night-muted); }
.start-here p:first-child { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass); }
.start-here h2 { margin: 6px 0; font-family: var(--serif); font-size: 1.875rem; color: var(--on-night); }
.start-here .btn.primary { background: var(--brass); color: var(--on-brass); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 0 48px 40px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px; display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.tile, .tile:hover { text-decoration: none; }
.tile:hover { border-color: var(--muted); color: var(--text); }
.tile h3 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.tile p { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.agent-box { margin: 0 48px 72px; }
.agent-box h2 { font-size: 1.375rem; font-weight: 600; }
.agent-box ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.agent-box li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }

.legal { padding: 64px 0 88px; }
.legal h1 { font-family: var(--serif); font-size: clamp(2.25rem, 5vw, 2.875rem); margin: 0 0 8px; }
.legal h2 { font-size: 1.5rem; margin: 40px 0 10px; }
.legal h3 { font-size: 1.125rem; margin: 28px 0 8px; }
.legal p, .legal li { font-size: 1rem; line-height: 1.7; }
.legal .table { margin-top: 12px; }

.page404 { padding: 120px 0; text-align: center; }
.page404 h1 { font-family: var(--serif); font-size: 2.875rem; margin: 0 0 12px; }

.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 920px; margin: 0 auto; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; z-index: 50; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 4px 0 0; font-size: 0.875rem; color: var(--muted); }
.cookie-banner > div:first-child { flex: 1 1 420px; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 18px; font-size: 0.9375rem; }
.btn.link-like { background: none; color: var(--link); padding-left: 6px; padding-right: 6px; }
.cookie-dialog { border: 1px solid var(--line); border-radius: 10px; padding: 24px; max-width: 560px; width: calc(100% - 32px); background: var(--card); color: var(--text); }
.cookie-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.cookie-dialog h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.625rem; }
.cookie-dialog p { font-size: 0.875rem; color: var(--muted); margin: 4px 0 0; }
.cookie-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; border-top: 1px solid var(--line-soft); padding: 16px 0; }
.always { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.switch input { width: 40px; height: 22px; accent-color: var(--company-navy); }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 16px; }

/* The panel the Menu and Contents buttons open on narrow screens. It sits just under the 64px header. */
.menu-button, .contents-button { align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); font: inherit; font-size: 0.9375rem; font-weight: 500; cursor: pointer; }
.menu-button svg, .contents-button svg { color: var(--marker); flex: none; }

@media (max-width: 1100px) {
  .docs { grid-template-columns: 240px minmax(0, 1fr); }
  .rail { display: none; }
}
/* The header row needs about 1,130px on a docs page (brand, five links, search, GitHub, Download); below 1,180px it collapses to the Menu button. */
@media (max-width: 1180px) {
  .main-nav { justify-content: flex-end; }
  .menu-button { display: inline-flex; }
  .theme-bar:not([hidden]) { display: inline-flex; margin: 0 8px 0 0; }
  .theme-row { display: none; }
  .site-menu { position: fixed; inset: auto; top: 72px; right: 16px; left: auto; width: min(22rem, calc(100dvw - 32px)); max-height: calc(100dvh - 88px); overflow: auto; overscroll-behavior: contain; padding: 8px; display: block; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); }
  /* Hidden until opened. The :where() keeps the rule valid in browsers without :popover-open, which open it with the 'open' class. */
  .site-menu:not(:where(:popover-open)):not(.open) { display: none; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-bottom: 0; border-left: 3px solid transparent; border-radius: 0 4px 4px 0; }
  .nav-links a[aria-current] { border-left-color: var(--marker); background: var(--line-soft); font-weight: 600; }
  .site-menu .header-end { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 8px; padding: 12px 4px 4px; border-top: 1px solid var(--line-soft); }
  .site-menu .header-link { display: flex; align-items: center; min-height: 44px; padding: 0 11px; }
  .site-menu .btn { justify-content: center; min-height: 44px; }
  .search label { min-width: 0; width: 100%; height: 44px; }
  .site-menu .search-results { position: static; width: auto; max-height: none; margin-top: 8px; box-shadow: none; }
}
@media (max-width: 800px) {
  .docs, .docs.docs-home { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; max-height: none; overflow: visible; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .contents-button { display: inline-flex; }
  .toc { position: fixed; inset: auto; top: 72px; left: 16px; right: 16px; max-height: calc(100dvh - 88px); overflow: auto; overscroll-behavior: contain; padding: 16px 8px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); }
  .toc:not(:where(:popover-open)):not(.open) { display: none; }
  .toc a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; }
  .docs-main { padding: 24px 16px 48px; }
  .header-inner { padding: 0 16px; gap: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .start-here, .tiles, .agent-box { margin-left: 16px; margin-right: 16px; }
  .docs-home-main .lead .wrap { padding-left: 16px; }
  .layers li, .layers li:nth-child(2) { margin: 0 0 -1px; }
  /* Less space above and below each band on a phone, where the desktop spacing leaves half a screen empty. */
  .hero-grid { padding-top: 48px; padding-bottom: 56px; gap: 40px; }
  .band { padding: 56px 0 48px; }
  .lead .wrap { padding-top: 48px; padding-bottom: 40px; }
  .cta .wrap { padding-top: 48px; padding-bottom: 48px; }
  .legal { padding: 40px 0 56px; }
  .page404 { padding: 72px 0; }
  .plans { margin-bottom: 40px; }
}

/* Code blocks and the prompt card are dark in both modes, so their scrollbars and controls are dark too. */
.code, .prompt-card { color-scheme: dark; }

/* Headings break into lines of similar length; paragraphs avoid a lone last word. */
h1, h2, h3 { text-wrap: balance; }
.docs-main p, .docs-main li, .lead p, .band p, .card p, .legal p, .legal li { text-wrap: pretty; }

/* Docs prose stops at about 72 characters a line; code blocks, tables and the layer diagram keep the full column. */
.docs-main :is(p, ul, ol):not(.layers ul, .crumbs ol, .toc ul) { max-width: 72ch; }

/* On a touch screen every link in a list is at least 44px tall. */
@media (pointer: coarse) {
  .site-footer ul { gap: 0; }
  .site-footer li > a, .site-footer li > .link-button { display: inline-flex; align-items: center; min-height: 44px; }
  .sidebar a, .on-page a { display: flex; align-items: center; min-height: 44px; }
  .small-footer a, .small-footer .link-button { display: inline-flex; align-items: center; min-height: 44px; }
}

/* A cross-fade between pages in browsers that support it, with the header held still. Off when the reader asks for less motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }

  /* The cookie dialog and its backdrop fade in and out. */
  .cookie-dialog, .cookie-dialog::backdrop { opacity: 0; transition: opacity 0.2s, display 0.2s, overlay 0.2s; transition-behavior: allow-discrete; }
  .cookie-dialog[open], .cookie-dialog[open]::backdrop { opacity: 1; }
  @starting-style {
    .cookie-dialog[open], .cookie-dialog[open]::backdrop { opacity: 0; }
  }
}

/* Links in docs and legal prose are underlined, so they differ from the text around them by more than colour. */
:where(.docs-main, .legal) :is(p, li, td) a:not(.crumbs a) { text-decoration: underline; text-decoration-thickness: max(1px, 0.08em); text-underline-offset: 0.2em; }

/* The analytics switch takes the theme's accent colour (navy in light mode, brass in dark) and a 44px target. */
.switch { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.switch input { accent-color: var(--navy); }

/* A darker brass for small text and for white numbers on brass: 4.70:1 and 4.94:1 instead of 4.19:1 and 4.41:1. */
:root { --brass-text: #8B6C0E; --eyebrow: #8B6C0E; --search-edge: #948C7C; }
.eyebrow p { color: var(--eyebrow); }
.step h3::before, .numbered.n1 > h2 .num { background: var(--brass-text); }

/* Search text at 16px, so iPhones do not zoom in on focus, and a field border at 3:1 or more. */
.search input { font-size: max(1rem, 1em); }
.search label { border-color: var(--search-edge); }

/* A phone or tablet cannot run the Windows installer, so touch-only devices get no Download buttons. */
@media (hover: none) and (pointer: coarse) {
  .btn[data-event="download"] { display: none; }
}
