/* The apex pages: the home page, the architecture page and its fallback. The tokens are the
 * console's (src/capabilities/src/console/web/shell.css), light and dark by the system theme
 * only: the apex policy runs no scripts, so there is no theme switch. Two additions: --fs-hero
 * and --sp-8. System fonts only, no shadows, radii 3 and 6px. One 1040px column.
 * One source for two pages: home.rs inlines it, and the landing@1 template (src/landing) serves
 * it as /assets/pigeon.css. A change here is a new landing version (the smoke suite pins its
 * digest). */
:root {
  --bg: #FFFFFF; --sunk: #F6F5F7; --surface: #FFFFFF; --raised: #FAF9FB; --hover: #F3F1F5;
  --line: #E4E2E8; --line-strong: #CFCCD6;
  --ink: #1D1B21; --ink-2: #47434F; --muted: #6E6A76;
  --accent: #B03A6A; --accent-ink: #FFFFFF; --accent-soft: #FBEAF1; --accent-line: #E9B7CC;
  --ok: #1F7A4D; --ok-soft: #E4F3EB; --warn: #8F5600; --warn-soft: #FCF0DA;
  --bad: #B42318; --bad-soft: #FCEBE9; --info: #2C5E9E; --info-soft: #E7EEF8;
  --font-ui: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-lg: 15px; --fs-xl: 18px;
  --fs-hero: 30px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-8: 48px;
  --r-1: 3px; --r-2: 6px;
  --row: 32px; --ctl: 26px;
  --col: 1040px;
  --mark-ground: #F9E5EE; --mark-edge: #EEB9CF;
  --dot: #D5D1DB;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141418; --sunk: #101013; --surface: #18181D; --raised: #1D1D23; --hover: #212128;
    --line: #2A2A31; --line-strong: #3B3B44;
    --ink: #ECEAE6; --ink-2: #C3C0C8; --muted: #98949F;
    --accent: #E07FA8; --accent-ink: #1A0F14; --accent-soft: #2B1821; --accent-line: #6A3550;
    --ok: #6CCB93; --ok-soft: #13261B; --warn: #E8B04A; --warn-soft: #2A2112;
    --bad: #F08A7A; --bad-soft: #2E1815; --info: #8DB6F0; --info-soft: #15202F;
    --mark-ground: #3D2935; --mark-edge: #844F67;
    --dot: #34333D;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
html, body { overflow-x: clip; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 var(--fs-md)/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
body > main { flex: 1 0 auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-1); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.label { font-size: var(--fs-xs); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wrap { width: 100%; max-width: calc(var(--col) + 32px); margin-inline: auto; padding-inline: 16px; }
.skip:not(:focus) { position: absolute; clip-path: inset(50%); }
.skip:focus { position: fixed; z-index: 60; top: 8px; left: 8px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-1); }

/* Console components */
.btn { display: inline-flex; align-items: center; gap: 6px; height: var(--ctl); padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-1);
  background: var(--surface); color: var(--ink); font: 500 var(--fs-sm)/1 var(--font-ui); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-lg { height: 32px; padding: 0 14px; font-size: var(--fs-md); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 6px; border-radius: var(--r-1); font: 500 var(--fs-xs)/1 var(--font-ui);
  background: var(--raised); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag { display: inline-block; padding: 0 5px; border: 1px solid var(--line); border-radius: var(--r-1); font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.panel { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); min-width: 0; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.tbl th { height: 28px; padding: 0 10px; text-align: left; font-size: var(--fs-xs); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--raised); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl td { height: var(--row); padding: 5px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tr.hit td, .tbl tr.hit:hover td { background: var(--accent-soft); }
.tbl .sub { display: block; color: var(--muted); font-size: var(--fs-sm); }
.tbl td.mono { white-space: nowrap; }

/* Top bar */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: var(--sp-4); height: 48px; }
.brand { color: var(--ink); font-weight: 600; font-size: var(--fs-lg); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; }
.nav a { display: inline-flex; align-items: center; height: var(--ctl); padding: 0 8px; border-radius: var(--r-1); color: var(--ink-2); font-size: var(--fs-md); font-weight: 500; }
.nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--hover); }
.top .spacer { flex: 1; }

/* The mark: the head crop on a flat ground, a rounded square (radius about 23%) with a 1px edge */
.mark { display: block; width: 64px; height: 64px; border-radius: 15px; border: 1px solid var(--mark-edge);
  background: url("/mark/head.webp") center / cover no-repeat border-box, var(--mark-ground); }

/* Hero */
.hero { padding-block: var(--sp-8) var(--sp-6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--sp-6); align-items: start; position: relative; isolation: isolate; }
/* The hero's dotted ground, the only one: full width from under the top bar (main has no top
 * padding) to the hero's end, fading over its last third so the next section starts on --bg. */
.hero::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background-image: radial-gradient(circle, var(--dot) 1.1px, transparent 1.5px); background-size: 16px 16px; background-position: 8px 8px;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent); mask-image: linear-gradient(to bottom, #000 65%, transparent); pointer-events: none; }
.hero-copy { display: grid; gap: var(--sp-4); max-width: 34em; padding-top: var(--sp-2); }
.hero h1 { font: 600 var(--fs-hero)/1.15 var(--font-ui); letter-spacing: -.02em; text-wrap: balance; }
.lede { font-size: var(--fs-lg); line-height: 1.55; color: var(--ink-2); max-width: 32em; }
.actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.fine { font-size: var(--fs-sm); color: var(--muted); }

/* The example record */
.record { margin: 0; }
.record-head { display: flex; align-items: center; gap: var(--sp-2); padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.record-head .t { font-weight: 600; flex: 1; min-width: 12em; }
.record-sum { padding: 10px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); background: var(--raised); }
.record-sum dt { font-size: var(--fs-xs); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.record-sum dd { font: 600 var(--fs-lg)/1.3 var(--font-ui); font-variant-numeric: tabular-nums; }
.record-foot { padding: 8px 12px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: space-between; }

/* Sections */
section.block { border-top: 1px solid var(--line); padding-block: var(--sp-6); display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--sp-5); }
section.block > header { display: grid; gap: 6px; align-content: start; }
section.block h2 { font: 600 var(--fs-xl)/1.3 var(--font-ui); letter-spacing: -.01em; }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); counter-reset: s; }
.steps li { display: grid; gap: 6px; align-content: start; counter-increment: s; }
.steps h3 { font: 600 var(--fs-lg)/1.3 var(--font-ui); display: flex; align-items: baseline; gap: 8px; }
.steps h3::before { content: counter(s); font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--accent); border: 1px solid var(--accent-line); border-radius: var(--r-1); padding: 3px 5px; }
.steps p { color: var(--ink-2); max-width: 30em; }

.kv { width: 100%; border-collapse: collapse; }
.kv th { width: 180px; text-align: left; vertical-align: top; padding: 10px 12px 10px 0; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); }
.kv td { padding: 10px 0; color: var(--ink-2); border-bottom: 1px solid var(--line); vertical-align: top; }
.kv td.st { width: 1%; padding-left: 12px; white-space: nowrap; text-align: right; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }

.hood { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; color: var(--ink-2); }
.stack { display: grid; gap: var(--sp-3); }

/* The architecture page */
.page-head { padding-block: var(--sp-6) var(--sp-4); display: grid; gap: 6px; }
.page-head h1 { font: 600 var(--fs-xl)/1.3 var(--font-ui); letter-spacing: -.01em; }
.figure { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); padding: var(--sp-2); overflow-x: auto; margin-bottom: var(--sp-6); }
.figure img { display: block; width: 100%; min-width: 840px; height: auto; }
.notice { border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--r-1); background: var(--surface); padding: 10px 12px; max-width: 720px; color: var(--ink-2); margin-bottom: var(--sp-6); }

/* Footer */
footer.foot { border-top: 1px solid var(--line); }
footer.foot .wrap { display: flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: space-between; padding-block: 14px 20px; font: var(--fs-xs) var(--font-mono); color: var(--muted); }
footer.foot nav { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
footer.foot a { color: var(--muted); }
footer.foot a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: var(--sp-6) var(--sp-5); }
  section.block { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
}
@media (max-width: 520px) {
  :root { --fs-hero: 24px; }
  .nav { display: none; }
  .record-sum { gap: var(--sp-2); }
  .record-sum dd { font-size: var(--fs-md); }
  .kv th { width: auto; display: block; padding-bottom: 0; border-bottom: 0; }
  .kv tr { display: block; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  .kv td { display: inline-block; padding-top: 4px; border-bottom: 0; }
  .kv td.st { text-align: left; padding-left: 0; display: block; }
  .tbl .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
