/* QDX section patterns. Every section on qdx.systems is built from one of these; deploy/site/_library/ shows
   each with its use-when rules. Loaded after /site.css and uses its tokens. Class prefix: p-. */

:root {
  --pad-art: 48px;          /* inside an illustration frame: never under 28px */
  --pad-panel: 40px;        /* inside a large panel (tabs, closing split) */
  --gap-split: 72px;        /* between the text and the visual of a split */
  --gap-steps: 40px;        /* between step cards (room for the connector) */
  --t-statement: clamp(1.6rem, 3.2vw, 2.6rem); /* the statement band */
  /* Section widths. Each pattern takes the one that suits how much it holds; full is the page column. */
  --w-wide: 1040px;         /* splits, pairs, compare, closing panel, reading page */
  --w-mid: 960px;           /* wall, statement, contact: short items that look lost at full width */
  --w-narrow: 880px;        /* timeline, tabs: one focused panel */
  --r-seg: 14px;            /* the tab bar's pill */
  --r-note: 12px;           /* timeline corner notes */
}
@media (max-width: 1100px) { :root { --gap-split: 56px; } }
@media (max-width: 720px) { :root { --pad-art: 28px; --pad-panel: 24px; --gap-steps: 40px; } }

/* ---------- Shared parts ---------- */
.p-card { position: relative; border-radius: var(--r-card); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; overflow: hidden; }
.p-card h3, .p-text h3 { margin: 0; }
.p-card p { color: var(--muted); text-wrap: pretty; }
.p-body { padding: var(--pad-card); }
.p-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.p-title .pill { flex: none; }
.p-n { display: block; font: 500 var(--t-label) var(--mono); color: var(--accent-2); margin-bottom: 14px; }
.p-eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 var(--t-small) var(--sans); color: var(--accent-2); }
.p-dot { width: 18px; height: 18px; flex: none; position: relative; }
.p-dot::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); }

/* Text column of any split */
.p-text > h2 + p, .p-text > h3 + p { margin-top: var(--s-gap-heading); }
.p-text > p { color: var(--muted); font-size: var(--t-lead); }
.p-text .actions { margin-top: var(--s-gap-actions); }

/* Illustration frame: the drawing is centred with equal margins, at least --pad-art on every side */
.p-frame { position: relative; isolation: isolate; display: grid; place-items: center; padding: var(--pad-art); border-radius: var(--r-card); border: 1px solid var(--line); background: linear-gradient(90deg, transparent 25%, rgba(143,176,255,.42), transparent 75%) top center / 100% 1px no-repeat, radial-gradient(40% 14% at 50% 0%, rgba(214,228,253,.07), transparent), radial-gradient(70% 60% at 50% 100%, rgba(91,140,255,.12), transparent 72%), linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.006)); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; overflow: hidden; min-width: 0; }
.p-frame::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(214,228,253,.12) 1.2px, transparent 1.5px); background-size: 24px 24px; background-position: center; -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000 10%, transparent 80%); mask-image: radial-gradient(60% 60% at 50% 50%, #000 10%, transparent 80%); }
.p-frame.bare { border: 0; border-radius: 0; box-shadow: none; }
.p-card > .p-frame { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.p-draw { display: block; width: 100%; max-width: var(--w, 360px); height: auto; overflow: visible; }

/* Drawing vocabulary: white hairlines, accent strokes, 13px+ labels */
.p-draw .s { stroke: rgba(255,255,255,.22); fill: none; stroke-width: 1.2; }
.p-draw .s2 { stroke: rgba(255,255,255,.12); fill: none; stroke-width: 1; }
.p-draw .a { stroke: var(--accent-2); fill: none; stroke-width: 1.6; }
.p-draw .af { fill: var(--accent); }
.p-draw .ok { fill: var(--ok); }
.p-draw .fill { fill: rgba(255,255,255,.04); }
.p-draw .tint { fill: rgba(91,140,255,.12); stroke: rgba(143,176,255,.5); stroke-width: 1.2; }
.p-draw .tw { stroke: var(--warn); fill: none; stroke-width: 1.4; stroke-dasharray: 4 4; }
.p-draw .dw { fill: var(--warn); }
.p-draw .t { fill: var(--muted); font: 500 13px var(--sans); }
.p-draw .ti { fill: var(--ink); font: 500 13px var(--sans); }
.p-draw .ta { fill: var(--accent-2); font: 500 13px var(--sans); }
.p-draw .tm { fill: var(--muted); font: 400 13px var(--mono); font-stretch: 87.5%; }
.p-draw .tmk { fill: var(--accent-2); font: 500 13px var(--mono); font-stretch: 87.5%; }
.p-draw .tbtn { fill: var(--accent-ink); font: 600 13px var(--sans); }
.p-draw .core { fill: #111a2e; stroke: rgba(143,176,255,.55); stroke-width: 1.2; filter: drop-shadow(0 0 22px rgba(91,140,255,.45)); }
.p-draw .core-t { fill: var(--ink); font: 700 20px var(--sans); letter-spacing: .14em; }
.p-draw .ico { color: var(--accent-2); }
.p-draw .ico.q { color: var(--muted); }
.p-draw .node { fill: #0e1218; stroke: rgba(92,201,131,.7); stroke-width: 1.4; }
.p-draw .node.t { stroke: rgba(227,164,59,.65); stroke-dasharray: 4 3; }
.p-draw .dim { opacity: .45; }
.p-draw.phone { display: none; }
@media (max-width: 720px) { .p-draw.wide { display: none; } .p-draw.phone { display: block; } }

/* Compact rows: tile, name and meaning, status in one right-aligned column */
.p-rows { list-style: none; margin: var(--s-gap-actions) 0 0; padding: 0; border-top: 1px solid var(--line); }
.p-rows li { display: grid; grid-template-columns: var(--tile) minmax(0, 1fr) 6.4rem; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.p-rows li > .pill { justify-self: end; }
.p-rows strong { display: block; font-weight: 600; line-height: 1.35; }
/* A row whose title opens its own page: the title reads as a link (a chevron that moves on hover), the rest stays text */
.p-rows a.p-row-link { color: var(--ink); text-decoration: none; transition: color var(--dur) var(--ease); }
.p-rows a.p-row-link span { display: inline-block; margin-left: 6px; color: var(--accent-2); transition: transform var(--dur) var(--ease); }
.p-rows a.p-row-link:hover { color: var(--accent-2); }
.p-rows a.p-row-link:hover span { transform: translateX(3px); }
.p-rows small { display: block; color: var(--muted); font-size: var(--t-small); line-height: 1.45; margin-top: 2px; }
.p-rows.plain li { grid-template-columns: 20px minmax(0, 1fr) 6.4rem; padding: 12px 0; }
.p-rows.plain li > svg { width: 18px; height: 18px; color: var(--accent-2); }
.p-text > p.p-soon, .p-soon { font-size: var(--t-small); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; color: var(--muted); font-size: var(--t-small); }
.p-soon .pill { margin: 0; }
.p-checks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.p-checks li { text-wrap: balance; display: flex; gap: 12px; align-items: flex-start; }
.p-checks svg { width: 18px; height: 18px; color: var(--accent-2); margin-top: 4px; flex: none; }

/* ---------- 01 / 02 Split, and its mirror ---------- */
/* Like the tabs: a capped width, and a square drawing beside vertically centred text. */
.p-split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--s-gap-content) var(--gap-split); align-items: center; max-width: var(--w-wide); margin: 0 auto; }
.p-split.mirror { grid-template-columns: 420px minmax(0, 1fr); }
.p-split > .p-frame { aspect-ratio: 1 / 1; }
@media (max-width: 960px) {
  .p-split, .p-split.mirror { grid-template-columns: 1fr; }
  .p-split > .p-text { max-width: 38em; }
  .p-split > .p-frame { width: 100%; max-width: 420px; justify-self: center; }
  .p-split.mirror > .p-frame { order: 2; }
  .p-split > .p-frame { min-height: 0; }
}

/* ---------- 03 Three-step sequence ---------- */
.p-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-steps); }
.p-steps > li { position: relative; display: flex; }
.p-steps .p-card { display: flex; flex-direction: column; flex: 1; }
.p-steps .p-frame { height: 264px; padding: 28px; }
.p-steps .p-body { flex: 1; }
.p-next { position: absolute; z-index: 2; top: 116px; right: calc(var(--gap-steps) / -2 - 16px); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(120% 120% at 50% 0%, #1a2440, #0c111c 70%); border: 1px solid rgba(143,176,255,.4); color: var(--accent-2); box-shadow: 0 0 20px -4px var(--glow); }
.p-next svg { width: 16px; height: 16px; }
@media (max-width: 1100px) {
  .p-steps { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
  .p-steps .p-card { flex-direction: row; }
  .p-steps .p-frame { width: 46%; flex: none; height: auto; min-height: 264px; border-bottom: 0; border-right: 1px solid var(--line); }
  .p-steps .p-body { display: flex; flex-direction: column; justify-content: center; }
  .p-next { top: auto; right: auto; left: calc(23% - 16px); bottom: calc(var(--gap-steps) / -2 - 16px); transform: rotate(90deg); }
}
@media (max-width: 640px) {
  .p-steps .p-card { flex-direction: column; }
  .p-steps .p-frame { width: auto; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .p-next { left: calc(50% - 16px); }
}

/* ---------- 04 Feature trio ---------- */
.p-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-grid); }
/* Same card as the bento: a lit frame with a small drawing, then a title and two lines. */
.p-trio > .p-card { display: flex; flex-direction: column; }
.p-trio .p-frame { height: 208px; padding: 32px; }
.p-trio .p-draw { max-height: 144px; }
.p-trio .p-body { flex: 1; }
@media (max-width: 860px) {
  .p-trio { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}

/* ---------- 05 Bento, 2 x 3 x 2 ---------- */
.p-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-grid); }
.p-bento > .p-card { grid-column: span 2; display: flex; flex-direction: column; }
/* Two-card rows are centred on the three-card row, so every card is the same width (2 × 3 × 2). */
.p-bento > .p-card.w3 { grid-column: span 2; }
.p-bento > .p-card.w3:nth-child(1), .p-bento > .p-card.w3:nth-child(6) { grid-column: 2 / span 2; }
.p-bento .p-frame { height: 208px; padding: 32px; }
.p-bento .p-draw { max-height: 144px; }
.p-bento .p-body { flex: 1; }
@media (max-width: 900px) {
  .p-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-bento > .p-card, .p-bento > .p-card.w3, .p-bento > .p-card.w3:nth-child(1), .p-bento > .p-card.w3:nth-child(6) { grid-column: span 1; }
  .p-bento > .p-card:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .p-bento { grid-template-columns: 1fr; }
  .p-bento > .p-card:nth-child(3) { grid-column: auto; }
  .p-bento .p-frame { padding: 28px; }
}

/* ---------- 06 Large feature ---------- */
.p-feature .p-frame { padding: 56px var(--pad-art); }
.p-feature .p-frame::after { content: ""; position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(91,140,255,.12), transparent); z-index: -1; pointer-events: none; }
.p-captions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-grid); margin-top: var(--s-grid); }
/* Each caption is a card, so the row matches the panel above it. */
.p-captions > div { position: relative; border-radius: var(--r-card); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; padding: var(--pad-card); }
.p-captions h3 { display: flex; align-items: center; gap: 10px; }
.p-captions h3 .ic { width: var(--tile-sm); height: var(--tile-sm); border-radius: var(--r-tile-sm); }
.p-captions h3 .ic svg { width: var(--tile-sm-icon); height: var(--tile-sm-icon); }
.p-captions p { color: var(--muted); font-size: var(--t-small); margin-top: 12px; }
@media (max-width: 760px) { .p-captions { grid-template-columns: 1fr; } .p-feature .p-frame { padding: 32px var(--pad-art); } }

/* ---------- 07 Comparison: without / with ---------- */
.p-compare { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto repeat(4, auto); column-gap: 56px; max-width: var(--w-wide); margin: 0 auto; }
.p-compare > .p-card { grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; padding: 12px var(--pad-card) 12px; }
.p-compare > .p-card:first-child { background: rgba(255,255,255,.012); border-style: dashed; border-color: var(--line-2); }
.p-compare > .p-card.lit-card { border-color: rgba(143,176,255,.3); background: radial-gradient(90% 60% at 50% 0%, rgba(91,140,255,.14), transparent 70%), linear-gradient(180deg, #0e1422, #0a0d13); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 80px -40px var(--glow); }
.p-compare header { display: flex; align-items: center; gap: 12px; padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.p-compare header strong { font-size: var(--t-card); font-weight: 600; letter-spacing: -.015em; }
.p-compare header .brandmark { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 14px var(--glow); }
.p-compare header .nomark { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--quiet); }
.p-compare .row span { text-wrap: balance; }
.p-compare .row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.p-compare header + .row { border-top: 0; }
.p-compare .row > i { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; position: relative; border: 1px solid var(--line-2); }
.p-compare .row > i::before { content: ""; position: absolute; left: 5px; right: 5px; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--quiet); }
.p-compare .row > svg { flex: none; width: 20px; height: 20px; margin-top: 2px; padding: 3px; border-radius: 50%; color: var(--accent-ink); background: var(--accent-2); box-shadow: 0 0 12px -2px var(--glow); }
.p-compare .p-card:first-child .row { color: var(--muted); }
.p-vs { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; display: grid; place-items: center; z-index: 1; background: radial-gradient(120% 120% at 50% 0%, #1a2440, #0c111c 70%); border: 1px solid rgba(143,176,255,.4); color: var(--accent-2); box-shadow: 0 0 24px -4px var(--glow); }
.p-vs svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .p-compare { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 48px; max-width: 520px; }
  .p-compare > .p-card { grid-row: auto; display: block; }
  .p-vs { transform: rotate(90deg); }
}

/* ---------- 08 Vertical timeline ---------- */
/* A framed panel, like the site's drawings, so the timeline reads as a graphic, not as page text. */
.p-tl-frame { max-width: 700px; margin: 0 auto; padding: 56px 40px; border-radius: var(--r-card); border: 1px solid var(--line); background: radial-gradient(70% 60% at 50% 100%, rgba(91,140,255,.1), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
.p-tl { list-style: none; margin: 0; padding: 0; position: relative; }
/* The rail runs through the centre of the icons: the middle column is centred, so the rail sits at 50%. */
.p-tl::before { content: ""; position: absolute; left: 50%; top: 28px; bottom: 28px; width: 2px; margin-left: -1px; border-radius: 2px; background: linear-gradient(rgba(143,176,255,.55), rgba(143,176,255,.15)); }
.p-tl li { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); column-gap: 28px; align-items: center; min-height: 100px; }
.p-tl .when { text-align: right; }
.p-tl .when h3 { margin: 0; }
.p-tl time { display: block; margin-top: 4px; font: 400 var(--t-label) var(--mono); color: var(--quiet); }
.p-tl .dot { position: relative; z-index: 1; width: 56px; height: 56px; border-radius: var(--r-card); display: grid; place-items: center; background: radial-gradient(120% 120% at 50% 0%, #1a2440, #0c111c 70%); border: 1px solid rgba(143,176,255,.35); color: var(--accent-2); box-shadow: 0 0 0 6px #0d1016, 0 0 30px -8px var(--glow); }
.p-tl .dot svg { width: 22px; height: 22px; }
.p-tl li:last-child .dot { border-color: rgba(143,176,255,.7); box-shadow: 0 0 0 6px #0d1016, 0 0 40px -4px var(--glow); background: radial-gradient(120% 120% at 50% 0%, #263766, #0f1628 70%); }
/* Descriptions are labels on the graphic: smaller, two short lines beside the icon. */
.p-tl p { color: var(--muted); font-size: var(--t-small); line-height: 1.5; max-width: 17em; }
@media (max-width: 720px) {
  .p-tl-frame { padding: 32px 22px; }
  .p-tl::before { left: 28px; }
  .p-tl li { grid-template-columns: 56px minmax(0, 1fr); column-gap: 18px; row-gap: 2px; align-items: start; min-height: 0; padding-bottom: 28px; }
  .p-tl li:last-child { padding-bottom: 0; }
  .p-tl .dot { grid-row: 1 / span 2; }
  .p-tl .when { text-align: left; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 4px; }
  .p-tl time { margin: 0; }
  .p-tl p { grid-column: 2; max-width: none; }
}

/* ---------- 09 Tabbed showcase (radio tabs, no script) ---------- */
.p-tabs { position: relative; max-width: var(--w-narrow); margin: 0 auto; }
.p-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.p-seg { display: flex; width: fit-content; margin: 0 auto 24px; padding: 5px; gap: 4px; border-radius: var(--r-seg); border: 1px solid var(--line-2); background: rgba(255,255,255,.03); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.p-seg label { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: var(--r-control); color: var(--muted); font-size: var(--t-small); font-weight: 500; cursor: pointer; transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.p-seg label:hover { color: var(--ink); }
.p-seg svg { width: 18px; height: 18px; }
#tab-portal:checked ~ .p-seg label[for="tab-portal"], #tab-emr:checked ~ .p-seg label[for="tab-emr"], #tab-api:checked ~ .p-seg label[for="tab-api"] { color: var(--ink); background: linear-gradient(180deg, rgba(143,176,255,.2), rgba(91,140,255,.08)); box-shadow: 0 0 0 1px rgba(143,176,255,.35) inset, 0 6px 20px -8px var(--glow); }
#tab-portal:checked ~ .p-seg label[for="tab-portal"] svg, #tab-emr:checked ~ .p-seg label[for="tab-emr"] svg, #tab-api:checked ~ .p-seg label[for="tab-api"] svg { color: var(--accent-2); }
#tab-portal:focus-visible ~ .p-seg label[for="tab-portal"], #tab-emr:focus-visible ~ .p-seg label[for="tab-emr"], #tab-api:focus-visible ~ .p-seg label[for="tab-api"] { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.p-tab { display: none; }
#tab-portal:checked ~ .p-tab.portal, #tab-emr:checked ~ .p-tab.emr, #tab-api:checked ~ .p-tab.api { display: grid; }
.p-tab { grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: center; padding: var(--pad-panel); }
/* The picture is square, and the drawing fills it. */
.p-tab > .p-frame { aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 24px; }
.p-tab > .p-frame .p-draw { width: 100%; max-width: none; height: auto; }
.p-tab > .window { aspect-ratio: 1 / 1; display: flex; flex-direction: column; }
.p-tab > .window pre { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.p-tab > .p-text { align-self: center; }
.p-tab > .p-frame { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
.p-tab .window { align-self: center; }
.p-tab .window pre { font-size: var(--t-code); }
@media (max-width: 900px) { .p-tab { grid-template-columns: 1fr; gap: 32px; } .p-tab > .p-frame, .p-tab > .window { margin: 0 calc(-1 * var(--pad-panel)) calc(-1 * var(--pad-panel)); border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; } }
@media (max-width: 520px) { .p-seg { width: 100%; } .p-seg label { flex: 1; justify-content: center; padding: 10px 8px; gap: 8px; } }
@media (max-width: 360px) { .p-seg svg { display: none; } }

/* ---------- 10 Integrations wall ---------- */
.p-wall { position: relative; max-width: var(--w-mid); margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: var(--r-card); border: 1px solid var(--line); overflow: hidden; background: radial-gradient(60% 70% at 50% 50%, rgba(91,140,255,.1), transparent 75%); }
.p-wall > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 124px; padding: 24px 16px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.p-wall b { font-size: var(--t-card); font-weight: 650; letter-spacing: -.02em; color: var(--ink); line-height: 1.2; }
.p-wall b.lc { font-weight: 600; letter-spacing: -.035em; }
.p-wall .coming-name { color: var(--muted); }
.p-wall-foot { display: flex; justify-content: center; margin-top: 28px; }
@media (max-width: 760px) { .p-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } .p-wall > div { min-height: 108px; } }

/* ---------- 11 Statement band ---------- */
.p-statement { position: relative; text-align: center; max-width: var(--w-mid); margin: 0 auto; }
/* The statement's mark: the router in miniature, one order in, every result out. */
.p-mark { display: block; width: 320px; max-width: 80%; height: auto; margin: 0 auto 36px; overflow: visible; }
.p-mark .w { fill: none; stroke: rgba(143,176,255,.7); stroke-width: 1.6; }
.p-mark .d { fill: var(--accent-2); filter: drop-shadow(0 0 6px var(--g, var(--accent))); }
.p-mark .core { fill: #111a2e; stroke: rgba(143,176,255,.6); filter: drop-shadow(0 0 22px rgba(91,140,255,.55)); }
.p-mark .core-t { fill: var(--ink); font: 700 19px var(--sans); letter-spacing: .14em; }
.p-mark .tile { filter: drop-shadow(0 0 22px rgba(91,140,255,.45)); }
.p-mark .ico { color: var(--accent-2); }
.p-statement p { font-size: var(--t-statement); line-height: 1.22; letter-spacing: -.025em; font-weight: 500; color: var(--quiet); text-wrap: balance; }
.p-statement p strong { color: var(--ink); font-weight: 600; }
.p-statement .actions { justify-content: center; margin-top: 40px; }
.p-lit-band { position: relative; isolation: isolate; overflow: hidden; }
.p-lit-band::before { content: ""; position: absolute; left: 50%; top: 0; width: min(900px, 100%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(143,176,255,.6), transparent); }
.p-lit-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 60% at 50% 0%, rgba(91,140,255,.12), transparent 70%); pointer-events: none; }

/* ---------- 12 FAQ ---------- */
.p-faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px var(--gap-split); align-items: start; }
.p-faq > .p-text { position: sticky; top: 96px; }
.p-qs { border-top: 1px solid var(--line-2); }
.p-qs details { border-bottom: 1px solid var(--line); }
.p-qs summary { text-wrap: balance; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; cursor: pointer; font-size: var(--t-card); font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.p-qs summary::-webkit-details-marker { display: none; }
.p-qs summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); background: linear-gradient(var(--muted), var(--muted)) center / 11px 1.5px no-repeat, linear-gradient(var(--muted), var(--muted)) center / 1.5px 11px no-repeat; transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.p-qs details[open] summary::after { transform: rotate(45deg); border-color: rgba(143,176,255,.5); }
.p-qs summary:hover::after { border-color: rgba(143,176,255,.5); }
.p-qs details > div { padding: 0 52px 24px 0; color: var(--muted); }
.p-qs details > div .pill { margin-left: 6px; vertical-align: 1px; }
@media (max-width: 900px) { .p-faq { grid-template-columns: 1fr; } .p-faq > .p-text { position: static; } }
@media (max-width: 520px) { .p-qs details > div { padding-right: 0; } }

/* ---------- 13 Audience pair ---------- */
.p-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-grid); max-width: var(--w-wide); margin: 0 auto; }
.p-pair > .p-card { display: flex; flex-direction: column; }
/* The drawing spans the same width as the text and list below it. */
.p-pair .p-frame { height: auto; padding: 36px var(--pad-panel); }
/* Drawn at 1:1 for the card's content width; phones get a narrower drawing so its text stays 13px. */
.p-pair .p-frame .p-draw { width: 100%; max-width: 430px; margin: 0 auto; }
.p-pair .p-frame .p-narrow { display: none; max-width: 300px; }
@media (max-width: 520px) { .p-pair .p-frame .p-wide { display: none; } .p-pair .p-frame .p-narrow { display: block; } }
.p-pair .p-body { flex: 1; display: flex; flex-direction: column; padding: 32px var(--pad-panel) var(--pad-panel); }
.p-pair .p-eyebrow { margin-bottom: 16px; }
.p-pair h3 { font-size: var(--t-sub); line-height: 1.12; letter-spacing: -.025em; }
.p-pair h3 + p { margin-top: 12px; }
.p-pair .p-rows { margin-top: 24px; }
.p-pair .actions { margin-top: 28px; }
@media (max-width: 860px) { .p-pair { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; } }

/* ---------- 14 Closing split ---------- */
.p-close { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: stretch; border-radius: var(--r-feature); border: 1px solid rgba(143,176,255,.25); overflow: hidden; isolation: isolate; background: radial-gradient(70% 120% at 100% 50%, rgba(91,140,255,.2), transparent 65%), linear-gradient(180deg, #0e1422, #0a0d13); }
.p-close > .p-text { padding: 72px 0 72px 64px; align-self: center; }
.p-close h2 { font-size: var(--t-title); line-height: 1.03; letter-spacing: -.032em; }
.p-close .p-frame { border: 0; border-radius: 0; background: none; box-shadow: none; }
@media (max-width: 900px) { .p-close { grid-template-columns: 1fr; } .p-close > .p-text { padding: 56px var(--pad-panel) 0; } .p-close .p-frame { padding: 40px var(--pad-art) 48px; } }
@media (max-width: 520px) { .p-close .actions .button { flex: 1 1 0; min-width: max-content; } }

/* Phones: a row's status sits directly under its name, so names and meanings stay on one line */
@media (max-width: 520px) {
  .p-rows li, .p-rows.plain li { grid-template-columns: var(--tile) minmax(0, 1fr); row-gap: 8px; }
  .p-rows.plain li { grid-template-columns: 20px minmax(0, 1fr); }
  .p-rows li > .ic, .p-rows li > svg { grid-row: 1 / span 2; align-self: start; }
  .p-rows.plain li > svg { margin-top: 3px; }
  .p-rows li > .pill { grid-column: 2; justify-self: start; }
}
.p-seg label { white-space: nowrap; }
@media (max-width: 520px) { .p-pair .actions .button { flex: 1 1 0; min-width: max-content; } .p-rows li { row-gap: 6px; } }
/* Captions on tablets: every pill drops under its title together, so the three cards stay alike. */
@media (min-width: 761px) and (max-width: 1100px) { .p-captions .p-title { flex-direction: column; align-items: flex-start; } }
@media (max-width: 900px) { .p-captions { grid-template-columns: 1fr; } .p-captions .p-title { flex-direction: row; align-items: center; } }
@media (max-width: 380px) { .p-captions .p-title { flex-direction: column; align-items: flex-start; } }

/* App windows in the tabbed showcase: all three are the same window, filling a square. */
.p-tab > .window { aspect-ratio: 1 / 1; display: flex; flex-direction: column; }
.window .bar i:nth-child(1) { background: #ff6159; } .window .bar i:nth-child(2) { background: #ffbd2e; } .window .bar i:nth-child(3) { background: #28c941; }
.window .bar i { opacity: .85; }
.app-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 18px; font-size: var(--t-small); min-height: 0; }
.app-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.app-name { font-weight: 600; color: var(--ink); }
.app-meta { color: var(--quiet); font-size: var(--t-label); }
.app-search { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-tile-sm); border: 1px solid var(--line-2); color: var(--quiet); background: rgba(255,255,255,.02); }
.app-search svg { width: 16px; height: 16px; }
.app-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-tile-sm); border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--ink); }
.app-item.on { border-color: rgba(143,176,255,.45); background: rgba(91,140,255,.1); }
.app-item.tall { padding: 14px; }
.app-item b { display: block; font-weight: 500; color: var(--accent-2); }
.app-item small { display: block; color: var(--muted); font-size: var(--t-label); margin-top: 2px; }
.app-tick { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex: none; }
.app-tick svg { width: 13px; height: 13px; color: var(--accent-ink); stroke-width: 2.6; }
.app-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.app-btn { padding: 8px 14px; border-radius: var(--r-tile-sm); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.app-tabs { display: flex; gap: 6px; margin: -2px 0 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.app-tabs span { padding: 5px 10px; border-radius: 6px; color: var(--muted); }
.app-tabs span.on { color: var(--accent-2); background: rgba(91,140,255,.12); box-shadow: 0 0 0 1px rgba(143,176,255,.4) inset; }
.app-lines { display: grid; gap: 8px; margin: 2px 0 6px; }
.app-lines i { display: block; height: 7px; border-radius: 4px; background: rgba(255,255,255,.06); width: 70%; }
.app-lines i + i { width: 48%; }
@media (max-width: 900px) { .p-tab > .window { aspect-ratio: auto; min-height: 320px; } }

/* Integrations wall: every tile has an icon, no container; EMRs are tinted in a colour from their brand (never their logo). */
.p-wall .w-ic { display: grid; place-items: center; color: var(--c, var(--accent-2)); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c, var(--accent)) 45%, transparent)); }
.p-wall .w-ic svg { width: 30px; height: 30px; stroke-width: 1.5; }
.p-wall > div:has(.pill.coming) .w-ic { opacity: .7; }

/* A relaxed head: the heading and its line run wider without forced balancing, for short, one-line statements. */
.head.relaxed { max-width: var(--w-mid); }
.head.relaxed h2, .head.relaxed p { text-wrap: wrap; max-width: none; }

/* Timeline as a staircase: each step one tread further right, joined by one continuous drawn path. */
.p-tl-wire, .p-tl-note { display: none; }
@media (min-width: 901px) {
  .p-tl-frame { position: relative; max-width: var(--w-narrow); padding: 56px 48px; }
  .p-tl { width: fit-content; margin: 0 auto; }
  .p-tl::before { display: none; }
  .p-tl li { grid-template-columns: 128px 56px 17em; margin-left: calc(var(--i) * 52px); height: 100px; min-height: 0; padding: 0; align-items: start; }
  .p-tl li:last-child { height: 56px; }
  .p-tl li > .when, .p-tl li > p { align-self: start; margin-top: 0; height: 56px; display: flex; flex-direction: column; justify-content: center; }
  .p-tl-wire { display: block; position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
  .p-tl-wire path { fill: none; stroke: rgba(143,176,255,.5); stroke-width: 2; stroke-linecap: round; }
  .p-tl-note { display: flex; flex-direction: column; gap: 6px; position: absolute; width: auto; padding: 14px 16px; border-radius: var(--r-note); border: 1px solid var(--line-2); background: rgba(12,16,24,.8); box-shadow: 0 12px 30px -16px #000; font-size: var(--t-label); color: var(--muted); }
  .p-tl-note.tr { top: 36px; right: 36px; }
  .p-tl-note.bl { bottom: 36px; left: 36px; }
  .p-tl-note .nk { font: 500 var(--t-label) var(--mono); color: var(--accent-2); }
  .p-tl-note .nv { color: var(--ink); font-size: var(--t-small); }
  .p-tl-note .nv b { color: var(--accent-2); font-weight: 600; }
  .p-tl-note .nt { font-family: var(--mono); color: var(--quiet); }
  .p-tl-note .nr { display: flex; align-items: center; gap: 8px; color: var(--read); font-size: var(--t-small); }
  .p-tl-note .nr svg { width: 14px; height: 14px; color: var(--ok); flex: none; }
}
@media (min-width: 721px) and (max-width: 900px) { .p-tl-frame { max-width: 560px; } }
/* Step titles warm very slightly, from white at Placed to light gold at Delivered. Not the amber used for status. */
.p-tl .when h3 { color: color-mix(in oklab, var(--ink), var(--gold) calc(var(--i, 0) * 16%)); }

/* ---------- 16 Subpage hero ---------- */
/* Quieter than the home hero: a small lit square mark, a one-word-audience eyebrow, the headline, one line and two buttons. */
.p-mark-tile { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 28px; border-radius: var(--r-feature); border: 1px solid rgba(143,176,255,.32); background: radial-gradient(80% 80% at 50% 0%, rgba(91,140,255,.3), transparent 70%), linear-gradient(180deg, #131a2b, #0a0d13); box-shadow: 0 0 64px -12px var(--glow), 0 1px 0 rgba(255,255,255,.08) inset; color: var(--accent-2); }
.p-mark-tile svg { width: 36px; height: 36px; }
.p-sub .p-eyebrow { display: block; margin-bottom: 18px; }
.p-sub .lede { text-wrap: pretty; }
@media (max-width: 520px) { .p-mark-tile { width: 72px; height: 72px; margin-bottom: 22px; } .p-mark-tile svg { width: 30px; height: 30px; } }

/* ---------- 17 Closing panel ---------- */
/* The site's close-panel with the library's lit finish: a masked dot grid, a lit top edge, and one wire in and three out behind the text. */
.p-closing { max-width: var(--w-wide); margin: 0 auto; padding: 88px 32px; }
.p-closing::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(214,228,253,.12) 1.2px, transparent 1.5px); background-size: 24px 24px; background-position: center; -webkit-mask-image: radial-gradient(55% 70% at 50% 40%, #000 10%, transparent 80%); mask-image: radial-gradient(55% 70% at 50% 40%, #000 10%, transparent 80%); }
.p-closing::after { content: ""; position: absolute; left: 15%; right: 15%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(143,176,255,.7), transparent); }
.p-closing-wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; fill: none; }
.p-closing-wires path { stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: .6; }
.p-closing-wires path.in { stroke-width: 2.2; }
@media (max-width: 720px) { .p-closing { padding: 64px 22px; } .p-closing-wires { display: none; } }

/* ---------- 18 Code split ---------- */
/* The 01/02 split with the tabs' window in place of the drawing: square, code centred in it, never scrolled or wrapped. */
.p-split > .window { aspect-ratio: 1 / 1; display: flex; flex-direction: column; min-width: 0; }
.p-split > .window pre { flex: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; white-space: pre; }
@media (max-width: 960px) {
  .p-split > .window { width: 100%; max-width: 420px; justify-self: center; }
  .p-split.mirror > .window { order: 2; }
}
@media (max-width: 520px) { .p-split > .window { aspect-ratio: auto; } .p-split > .window pre { white-space: pre; overflow-wrap: normal; font-size: var(--t-code-xs); padding: 18px 16px; } }

/* ---------- 19 Reading page ---------- */
/* A 38rem reading column with a sticky contents list beside it; on phones the list folds into "On this page". */
.p-read { display: grid; grid-template-columns: 200px minmax(0, 38rem); column-gap: 64px; justify-content: center; max-width: var(--w-wide); margin: 0 auto; }
.p-read-head { grid-column: 2; padding-bottom: 0; margin-bottom: 56px; }
.p-read-head .p-eyebrow { display: block; margin-bottom: 16px; }
.p-read-head .lede { margin-top: var(--s-gap-heading); }
.p-read-meta { margin-top: 16px; font: 400 var(--t-label)/1.6 var(--mono); color: var(--quiet); }
.p-toc { grid-column: 1; grid-row: 2; position: sticky; top: 96px; align-self: start; padding-top: 52px; font-size: var(--t-small); }
.p-toc p { margin: 0 0 12px; font: 500 var(--t-small) var(--sans); letter-spacing: 0; color: var(--quiet); }
.p-toc ul, .p-toc-m ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.p-toc a, .p-toc-m a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; }
.p-toc a:hover, .p-toc-m a:hover { color: var(--ink); }
.p-toc a[aria-current] { color: var(--ink); border-left-color: var(--accent); }
.p-toc-m { display: none; }
.p-article { grid-column: 2; grid-row: 2; min-width: 0; padding-top: 8px; }
.p-article > h2:first-child { margin-top: 40px; }
main .p-article h2 { background: none; -webkit-text-fill-color: currentColor; color: var(--ink); font-size: var(--t-sub); letter-spacing: -.015em; line-height: 1.15; margin: 56px 0 14px; } /* "main" outranks the gradient rule on main h2; html's scroll-padding already clears the header */
.p-article h3 { font-size: var(--t-card); margin: 32px 0 10px; }
.p-article p, .p-article ul { margin: 0 0 16px; color: var(--read); line-height: 1.7; }
.p-article ul { padding-left: 1.1em; }
.p-article li { margin: 6px 0; }
.p-article li::marker { color: var(--accent-2); }
.p-article pre { margin: 0 0 20px; padding: 16px 18px; background: #0a0d13; border: 1px solid var(--line); border-radius: var(--r-control); font-size: var(--t-code); line-height: 1.7; color: #d5dbe6; overflow-x: auto; }
.p-table { margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--r-control); overflow-x: auto; }
.p-table table { width: 100%; border-collapse: collapse; font-size: var(--t-small); line-height: 1.45; }
.p-table th, .p-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--read); }
.p-table th { font: 500 var(--t-label) var(--mono); letter-spacing: .04em; color: var(--muted); background: rgba(255,255,255,.025); }
.p-table tr:last-child td { border-bottom: 0; }
.p-table td code { white-space: nowrap; }
@media (max-width: 900px) {
  .p-read { grid-template-columns: minmax(0, 38rem); }
  .p-read-head, .p-article { grid-column: 1; }
  .p-read-head { grid-row: 1; }
  .p-toc { display: none; }
  .p-toc-m { display: block; grid-row: 2; margin: 24px 0 8px; border: 1px solid var(--line); border-radius: var(--r-control); background: rgba(255,255,255,.02); font-size: var(--t-small); }
  .p-toc-m summary { cursor: pointer; padding: 12px 16px; color: var(--muted); font: 500 var(--t-label) var(--mono); letter-spacing: .06em; text-transform: uppercase; }
  .p-toc-m ul { margin: 0 16px 14px; }
  .p-article { grid-row: 3; }
}
@media (max-width: 520px) { .p-read:not(.wide) .p-table th:nth-child(3), .p-read:not(.wide) .p-table td:nth-child(3) { display: none; } }
/* The API reference: a wider column for its tables and code; a table too wide for a phone scrolls inside its frame. */
.p-read.wide { grid-template-columns: 200px minmax(0, 52rem); max-width: 1180px; }
.p-read.wide .p-table td:first-child code, .p-read.wide .p-table td code { white-space: nowrap; }
.p-read.wide .p-table td:nth-child(2) { min-width: 14rem; }
@media (max-width: 900px) { .p-read.wide { grid-template-columns: minmax(0, 52rem); } .p-read.wide .p-table table { min-width: 620px; } }

/* ---------- 20 Contact ---------- */
/* Three cards with one shape: icon beside the title, two lines on what it's for, then the action in the same place on every card. */
.p-contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-grid); max-width: var(--w-mid); margin: 0 auto; }
.p-contact > .p-card { display: flex; flex-direction: column; padding: 32px var(--pad-card) var(--pad-card); }
.p-contact > .p-card::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(143,176,255,.55), transparent); }
.p-cc-top { display: flex; align-items: center; gap: 16px; }
.p-cc-top h3 { font-size: var(--t-card); }
.p-contact p, .p-contact address { margin-top: 18px; color: var(--muted); font-style: normal; line-height: 1.6; }
.p-cc-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: auto; padding-top: 22px; color: var(--accent-2); font-weight: 500; text-decoration: none; }
.p-cc-link:hover { color: var(--ink); }
.p-cc-link svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.p-cc-link:hover svg { transform: translateX(3px); }
.p-contact > .p-card > p:last-child:has(a.more) { margin-top: auto; padding-top: 22px; }
.p-contact-note { margin-top: var(--s-gap-content); text-align: center; color: var(--quiet); font-size: var(--t-small); }
@media (max-width: 900px) { .p-contact { grid-template-columns: 1fr; max-width: 560px; } }

/* ---------- 21 Capability grid ---------- */
/* Rows of three cards: icon and status on top, then a title and two lines. Always a multiple of three, so no row is short. */
.p-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-grid); max-width: var(--w-wide); margin: 0 auto; }
.p-grid > .p-card { display: flex; flex-direction: column; padding: 28px var(--pad-card) var(--pad-card); }
.p-gc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.p-grid h3 { font-size: var(--t-card); }
.p-grid h3 + p { margin-top: 8px; }
.p-grid .more { margin-top: auto; padding-top: 16px; font-size: var(--t-small); color: var(--accent-2); text-decoration: none; font-weight: 500; }
.p-grid .more:hover { color: var(--ink); }
@media (max-width: 720px) { .p-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }

/* ---------- Lit grid (21, and any card grid that is a page's centrepiece) ---------- */
/* The page-head light turned outward: a mark above the heading, and a light at the centre of the grid
   that spreads past the cards over a dot field. The band clips the spill so nothing scrolls sideways. */
.p-lit-grid { overflow-x: clip; }
.p-lit-grid .head .p-mark-tile { width: 72px; height: 72px; margin-bottom: 24px; }
.p-lit-grid .head .p-mark-tile svg { width: 30px; height: 30px; }
.p-lit-grid .head .p-eyebrow { display: block; margin: 0 0 16px; }
.p-lit-grid .p-lit { position: relative; isolation: isolate; }
.p-lit-grid .p-lit::before { content: ""; position: absolute; inset: -160px -320px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(110,155,255,.42), rgba(91,140,255,.14) 40%, rgba(91,140,255,.04) 65%, transparent 85%); }
.p-lit-grid .p-lit::after { content: ""; position: absolute; inset: -120px -260px; z-index: -2; pointer-events: none; background-image: radial-gradient(rgba(214,228,253,.14) 1.2px, transparent 1.5px); background-size: 28px 28px; background-position: center; -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%); mask-image: radial-gradient(closest-side, #000 30%, transparent 100%); }
.p-lit-grid .p-lit > .p-card { background: linear-gradient(180deg, rgba(16,20,30,.62), rgba(10,13,19,.78)); backdrop-filter: blur(6px); border-color: rgba(143,176,255,.12); }

/* Divider: a hairline that brightens toward a small lit spark, joining a section head to what sits under it. */
.p-divider { display: flex; align-items: center; gap: 14px; max-width: var(--w-wide); margin: 0 auto 28px; }
.p-lit-grid .head:has(+ .p-divider) { margin-bottom: 24px; } /* only a divider sits close under the head; content keeps the standard gap */
.p-divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(143,176,255,.45)); }
.p-divider span:last-child { background: linear-gradient(90deg, rgba(143,176,255,.45), transparent); }
.p-divider i { display: block; line-height: 0; }
.p-divider svg { width: 10px; height: 10px; fill: var(--accent-2); }

/* The lit grid's cards catch the light: a gradient border, brightest on the corner or edge that faces the grid's centre. */
.p-lit-grid .head.wide { max-width: var(--w-narrow); }
.p-lit-grid .head.wide.xl { max-width: var(--w-wide); }
.p-lit-grid .head.wide > p:last-child { max-width: none; }
.p-lit-grid .p-lit > li > .p-card { position: relative; background: linear-gradient(180deg, rgba(16,20,30,.62), rgba(10,13,19,.78)); backdrop-filter: blur(6px); }
.p-lit-grid .p-lit > li > .p-card, .p-lit-grid .p-lit > .p-card { --rim: to bottom; border-color: rgba(143,176,255,.07); }
.p-lit-grid .p-lit > li > .p-card::after, .p-lit-grid .p-lit > .p-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(var(--rim), rgba(143,176,255,.32), rgba(143,176,255,.1) 35%, rgba(143,176,255,.03) 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (min-width: 901px) {
  .p-lit-grid .p-grid > .p-card:nth-child(1) { --rim: to top left; }
  .p-lit-grid .p-grid > .p-card:nth-child(2) { --rim: to top; }
  .p-lit-grid .p-grid > .p-card:nth-child(3) { --rim: to top right; }
  .p-lit-grid .p-grid > .p-card:nth-child(4) { --rim: to bottom left; }
  .p-lit-grid .p-grid > .p-card:nth-child(5) { --rim: to bottom; }
  .p-lit-grid .p-grid > .p-card:nth-child(6) { --rim: to bottom right; }
  .p-lit-grid .p-contact > .p-card:nth-child(1) { --rim: to left; }
  .p-lit-grid .p-contact > .p-card:nth-child(2) { --rim: to top; }
  .p-lit-grid .p-contact > .p-card:nth-child(3) { --rim: to right; }
  .p-lit-grid .p-bento > .p-card:nth-child(1) { --rim: to top left; }
  .p-lit-grid .p-bento > .p-card:nth-child(2) { --rim: to top right; }
  .p-lit-grid .p-bento > .p-card:nth-child(3) { --rim: to left; }
  .p-lit-grid .p-bento > .p-card:nth-child(4) { --rim: to top; }
  .p-lit-grid .p-bento > .p-card:nth-child(5) { --rim: to right; }
  .p-lit-grid .p-bento > .p-card:nth-child(6) { --rim: to bottom left; }
  .p-lit-grid .p-bento > .p-card:nth-child(7) { --rim: to bottom right; }
  .p-lit-grid .p-pair > .p-card:nth-child(1) { --rim: to left; }
  .p-lit-grid .p-pair > .p-card:nth-child(2) { --rim: to right; }
  .p-lit-grid .p-trio > .p-card:nth-child(1) { --rim: to left; }
  .p-lit-grid .p-trio > .p-card:nth-child(2) { --rim: to top; }
  .p-lit-grid .p-trio > .p-card:nth-child(3) { --rim: to right; }
  .p-lit-grid .p-steps > li:nth-child(1) > .p-card { --rim: to left; }
  .p-lit-grid .p-steps > li:nth-child(2) > .p-card { --rim: to top; }
  .p-lit-grid .p-steps > li:nth-child(3) > .p-card { --rim: to right; }
}
.p-lit-grid .p-contact > .p-card::before { display: none; }
.p-divider.mid { max-width: var(--w-mid); }
.p-divider.narrow { max-width: var(--w-narrow); }

/* Lit compare: the light comes from the QDX side, so the old way sits in the dark beside it. */
.p-lit-grid .p-compare { isolation: isolate; }
.p-lit-grid .p-compare::before { content: ""; position: absolute; inset: -140px -240px -140px 30%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(110,155,255,.28), rgba(91,140,255,.08) 50%, transparent 85%); }
.p-lit-grid .p-compare::after { content: ""; position: absolute; inset: -100px -200px -100px 20%; z-index: -2; pointer-events: none; background-image: radial-gradient(rgba(214,228,253,.14) 1.2px, transparent 1.5px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%); mask-image: radial-gradient(closest-side, #000 30%, transparent 100%); }
.p-lit-grid .p-compare > .p-card:first-child { background: rgba(10,12,17,.85); }
.p-lit-grid .p-compare > .p-card.lit-card { --rim: to left; border-color: rgba(143,176,255,.12); }
.p-lit-grid .p-compare > .p-card.lit-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(to bottom left, rgba(143,176,255,.32), rgba(143,176,255,.1) 40%, rgba(143,176,255,.03) 75%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (max-width: 760px) {
  .p-lit-grid .p-compare::before { inset: 45% -120px -140px; }
  .p-lit-grid .p-compare::after { inset: 45% -100px -100px; }
}

/* An eyebrow above a left-aligned heading (splits, questions, closing split). */
.p-text > .p-eyebrow { margin-bottom: 16px; }

/* Lit wall: narrower, with the dot field and a light at the centre of the grid. */
.p-lit-grid .p-wall { max-width: var(--w-narrow); isolation: isolate; background: radial-gradient(closest-side, rgba(110,155,255,.24), rgba(91,140,255,.07) 55%, transparent 100%), rgba(255,255,255,.012); box-shadow: 0 0 120px -30px var(--glow); }
.p-lit-grid .p-wall::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.1) 1px, transparent 1.2px); background-size: 24px 24px; background-position: center; -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent 100%); mask-image: radial-gradient(closest-side, #000 25%, transparent 100%); }
.p-lit-grid .head.relaxed { max-width: var(--w-narrow); }

/* Lit wall lines: the cell borders give way to hairlines that glow at the centre and fade to the edges,
   with a small cross where they meet. Phones keep the plain borders (two columns, eight rows). */
@media (min-width: 761px) {
  .p-lit-grid .p-wall > div { border: 0; margin: 0; }
  .p-lit-grid .p-wall::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
      linear-gradient(rgba(143,176,255,.55), rgba(143,176,255,.55)) 25% 0 / 1px 100% no-repeat,
      linear-gradient(rgba(143,176,255,.55), rgba(143,176,255,.55)) 50% 0 / 1px 100% no-repeat,
      linear-gradient(rgba(143,176,255,.55), rgba(143,176,255,.55)) 75% 0 / 1px 100% no-repeat,
      linear-gradient(rgba(143,176,255,.55), rgba(143,176,255,.55)) 0 25% / 100% 1px no-repeat,
      linear-gradient(rgba(143,176,255,.55), rgba(143,176,255,.55)) 0 50% / 100% 1px no-repeat,
      linear-gradient(rgba(143,176,255,.55), rgba(143,176,255,.55)) 0 75% / 100% 1px no-repeat;
    -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.08) 100%); mask-image: radial-gradient(closest-side, #000 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.08) 100%); }
  .p-wall-x { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
  .p-wall-x path { stroke: #b9cdff; stroke-width: 1.2; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(143,176,255,.8)); }
  .p-wall-x svg:nth-child(5) path { stroke-width: 1.5; }
  .p-wall-x svg:not(:nth-child(5)) { opacity: .55; }
  .p-wall-x svg:is(:nth-child(1), :nth-child(3), :nth-child(7), :nth-child(9)) { opacity: .3; }
}
@media (max-width: 760px) { .p-wall-x { display: none; } }

/* Questions, lit: the intro sits in a lit card with the dot field; each question is its own panel,
   quiet when closed and lit like the QDX side of the compare when open. */
.p-faq-card { padding: 40px; border-radius: var(--r-feature); border: 1px solid rgba(143,176,255,.18); background: radial-gradient(90% 70% at 50% 0%, rgba(91,140,255,.2), transparent 70%), linear-gradient(180deg, #0f1524, #0a0d13); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 40px 90px -50px var(--glow); overflow: hidden; isolation: isolate; }
.p-faq-card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(214,228,253,.14) 1.2px, transparent 1.5px); background-size: 24px 24px; -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 20%, transparent 85%); mask-image: radial-gradient(80% 60% at 50% 0%, #000 20%, transparent 85%); }
.p-faq-card .p-mark-tile { width: 72px; height: 72px; margin: 0 0 24px; }
.p-faq-card .p-mark-tile svg { width: 30px; height: 30px; }
.p-faq-card .p-eyebrow { display: block; margin-bottom: 14px; }
.p-qs { border-top: 0; display: grid; gap: 10px; }
.p-qs details { border: 1px solid var(--line); border-radius: var(--r-card); background: rgba(255,255,255,.015); padding: 0 24px; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.p-qs details:not([open]):hover { border-color: var(--line-2); background: rgba(255,255,255,.03); }
.p-qs summary { padding: 20px 0; color: var(--read); }
.p-qs details[open] { border-color: rgba(143,176,255,.45); }
.p-qs details[open] summary { color: var(--ink); }
.p-qs details[open] summary::after { background-color: var(--accent); border-color: var(--accent); background-image: linear-gradient(#060a14, #060a14), linear-gradient(#060a14, #060a14); box-shadow: 0 0 16px var(--glow); }
.p-qs details > div { padding: 0 52px 22px 0; }
@media (max-width: 520px) { .p-faq-card { padding: 28px 24px; } .p-qs details { padding: 0 18px; } }

/* Hero accent word: one word of the home headline in a contrasting serif italic, in the warm accent. */
.display .alt { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; letter-spacing: -.035em; margin-right: .06em; color: var(--gold); }

/* Home hero: the router sits in a quiet stage whose top edge catches the light from above. */
.hero-stage { position: relative; isolation: isolate; max-width: 1180px; margin: var(--s-gap-content) auto 0; padding: 48px 40px; border-radius: var(--r-feature); border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.012); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 50px 120px -60px rgba(0,0,0,.9); }
.hero-stage::before { content: ""; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(143,176,255,.35) 50%, transparent); pointer-events: none; }
.hero-stage > .router { margin-top: 0; }
@media (max-width: 720px) { .hero-stage { padding: 28px 18px; } }

/* Large feature (06) and step drawings: wires drawn at a true 1.1px whatever the drawing's scale. */
.p-feature .p-draw.wide .a, .p-feature .p-draw.wide .tw, .p-steps .p-draw .a, .p-steps .p-draw .tw { vector-effect: non-scaling-stroke; stroke-width: 1.1; }
.p-steps .p-draw .a, .p-feature .p-draw.wide .a { stroke: rgba(143,176,255,.75); }

/* Home hero: the divider joins the buttons to the router, as it joins a section head to its content. */
.p-hero-divider { margin: var(--s-gap-showpiece) auto 0; }
.p-hero-divider + .router { margin-top: 32px; }

/* The top light: the home hero's brighter glow on every page head that has one. */
.hero.lit::before, .page-head.lit::before { background: radial-gradient(50% 55% at 50% 0%, rgba(91,140,255,.38), rgba(91,140,255,.12) 45%, transparent 72%); }


/* ==========================================================================
   Additions after the Resend study (docs/research/resend-00-plan.md)
   ========================================================================== */

/* Left-aligned section head: for a split's neighbour, a pair or a triad, so centred and left alternate. */
.head.left { margin-left: 0; margin-right: auto; text-align: left; max-width: 40rem; }
.head.left > p { margin-left: 0; }
.head.left .p-eyebrow { margin-bottom: 16px; }
.head.left h2 + p { text-wrap: pretty; }
@media (max-width: 720px) { .head.left { text-align: center; margin-left: auto; } .head.left > p { margin-left: auto; } .head.left .p-eyebrow { justify-content: center; } }

/* 22 Two-card pair: a light section between heavy ones. Two cards, each a cropped drawing that fades at
   the bottom, then a title, two lines and one "Learn more" link. */
.p-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.p-duo > .p-card { display: flex; flex-direction: column; background: transparent; }
.p-duo .p-frame { height: 280px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.p-duo .p-body { flex: 1; display: flex; flex-direction: column; padding: 24px var(--pad-card) var(--pad-card); }
.p-duo .p-body .more { margin-top: auto; padding-top: 16px; }
@media (max-width: 860px) { .p-duo { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } .p-duo .p-frame { height: 240px; } }

/* 23 Divided triad: three columns split by hairlines, no cards; calmer than the trio. */
.p-triad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: var(--w-mid); margin: 0 auto; }
.p-triad > div { padding: 8px 32px; border-left: 1px solid var(--line); }
.p-triad > div:first-child { border-left: 0; padding-left: 0; }
.p-triad > div:last-child { padding-right: 0; }
.p-triad .ic { margin-bottom: 18px; }
.p-triad h3 { margin-bottom: 8px; }
.p-triad p { color: var(--muted); text-wrap: pretty; }
.p-triad .more { display: inline-block; margin-top: 14px; }
@media (max-width: 900px) { .p-triad { grid-template-columns: 1fr; max-width: 520px; } .p-triad > div { border-left: 0; border-top: 1px solid var(--line); padding: 28px 0; } .p-triad > div:first-child { border-top: 0; padding-top: 0; } }

/* 24 Open feature rows: icon, title, one muted line; no border, no fill. For text-only features. */
.p-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 56px; }
.p-features > div { display: grid; grid-template-columns: var(--tile) minmax(0, 1fr); column-gap: 16px; align-content: start; }
.p-features .ic { grid-row: 1 / span 3; }
.p-features h3 { margin-top: 8px; }
.p-features > div > .pill { grid-column: 2; justify-self: start; margin-top: 14px; } /* name, then what it does, then its status */
.p-features p { color: var(--muted); font-size: var(--t-small); margin-top: 6px; text-wrap: pretty; }
.p-features .pill { font-size: var(--t-label); }
@media (max-width: 900px) { .p-features { gap: 36px 32px; } }
@media (max-width: 720px) { .p-features { grid-template-columns: 1fr; gap: 32px; } }

/* "Learn more ›": the one quiet link a section gets instead of a button pair. */
a.more { color: var(--accent-2); text-decoration: none; font-weight: 500; font-size: var(--t-small); }
a.more::after { content: " ›"; transition: margin var(--dur) var(--ease); }
a.more:hover { color: var(--ink); }

/* Integration requests from the page teams (docs/research/requests-team-*.md). */
.head.left + .p-triad { max-width: none; margin: 0; }
/* Under a centred head the three columns centre too, with even padding, so the row sits on the page's axis. */
/* (sibling, not only adjacent: a divider may sit between the head and the row) */
.head.center ~ .p-triad > div { padding: 8px 32px; text-align: center; }
.head.center ~ .p-triad p { text-wrap: balance; }
.head.center ~ .p-triad > div:has(> .more) { display: flex; flex-direction: column; align-items: center; }
.head.center ~ .p-triad > div > .more { margin-top: auto; } .head.center ~ .p-triad > div > p:has(+ .more) { margin-bottom: 14px; }
.head.center ~ .p-triad .ic { margin-left: auto; margin-right: auto; }
@media (max-width: 900px) { .head.center ~ .p-triad > div { padding: 28px 0; } .head.center ~ .p-triad > div:first-child { padding-top: 0; } }
.p-text > p:has(> a.more:only-child) { margin-top: 20px; }
.head.left > .actions { margin-top: 24px; }
.p-show { max-width: 720px; margin: 0 auto; }

/* API reference: endpoint badge and path under each endpoint heading, the endpoint index, code labels. */
.p-article .p-endpoint { display: flex; align-items: center; gap: 10px; margin: -2px 0 18px; }
.p-article .p-endpoint code { padding: 0; background: none; border: 0; font-size: var(--t-small); color: var(--ink); }
.p-method { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-tile-sm); border: 1px solid rgba(143,176,255,.35); background: rgba(91,140,255,.12); color: var(--accent-2); font: 600 var(--t-label) var(--mono); letter-spacing: .04em; }
.p-article .p-endpoints { list-style: none; padding: 0; margin: 0 0 28px; border: 1px solid var(--line); border-radius: var(--r-control); }
.p-article .p-endpoints li { margin: 0; border-bottom: 1px solid var(--line); }
.p-article .p-endpoints li:last-child { border-bottom: 0; }
.p-article .p-endpoints a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; color: var(--read); text-decoration: none; font-size: var(--t-small); }
.p-article .p-endpoints a:hover { color: var(--ink); background: rgba(255,255,255,.03); }
.p-article .p-endpoints code { background: none; border: 0; color: var(--muted); }
.p-article .p-code-label { margin: 0; padding: 8px 18px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-control); border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: rgba(255,255,255,.025); color: var(--quiet); }
.p-article .p-code-label + pre { border-top-left-radius: 0; border-top-right-radius: 0; }
.p-read.wide .p-table td:nth-child(2) { min-width: 0; }
.p-read.wide .p-table tr:has(> td:nth-child(2):last-child) > td:nth-child(2), .p-read.wide .p-table tr:has(> td:nth-child(3):last-child) > td:nth-child(2) { min-width: 14rem; }
.p-split.p-code > .window { align-self: center; }

/* Review 1 (docs/research/review-1.md), shared fixes. */
@media (max-width: 720px) { .head.left > .actions { justify-content: center; } }
@media (max-width: 520px) { .head.left > .actions .button { flex: 1 1 0; min-width: max-content; } }
/* The closing band's wires fade out behind the text instead of running into it. */
.p-closing-wires { -webkit-mask-image: linear-gradient(90deg, #000 0 12%, transparent 26% 74%, #000 88%); mask-image: linear-gradient(90deg, #000 0 12%, transparent 26% 74%, #000 88%); }
/* Reading-page tables on phones: each row becomes a short stacked block instead of a sideways scroll. */
@media (max-width: 520px) {
  .p-read .p-table table, .p-read .p-table tbody, .p-read .p-table tr, .p-read .p-table td { display: block; }
  .p-read .p-table table { min-width: 0 !important; }
  .p-read .p-table thead { display: none; }
  .p-read .p-table tr { padding: 12px 14px; border-top: 1px solid var(--line); }
  .p-read .p-table tr:first-child { border-top: 0; }
  .p-read .p-table td { border: 0; padding: 2px 0; }
  .p-read .p-table td:first-child { font-weight: 500; overflow-wrap: normal; }
  .p-read .p-table td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--quiet); font: 500 var(--t-label) var(--mono); }
  .p-read:not(.wide) .p-table th:nth-child(3), .p-read:not(.wide) .p-table td:nth-child(3) { display: block; }
}
.p-features { max-width: none; } /* grids span the column under any head, so two on one page line up */

/* ==========================================================================
   Eyebrows are labels, links are buttons (owner, 2026-10-03).
   An eyebrow above a heading sits in a soft tinted pill so it reads as a label;
   "Learn more ›" is a quiet bordered button so it reads as something to click.
   ========================================================================== */
.p-eyebrow, .p-sub .p-eyebrow, .p-read-head .p-eyebrow, .p-lit-grid .head .p-eyebrow, .p-faq-card .p-eyebrow {
  display: inline-flex; width: fit-content; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 1px solid rgba(143,176,255,.22); background: rgba(91,140,255,.08);
  font: 500 var(--t-label) var(--sans); letter-spacing: .01em; color: var(--accent-2); line-height: 1.4;
}
.p-eyebrow svg { width: 14px; height: 14px; }
.head.center .p-eyebrow, .center > .wrap > .p-eyebrow, .p-sub .p-eyebrow { margin-left: auto; margin-right: auto; }
.p-sub .p-eyebrow, .p-lit-grid .head .p-eyebrow { display: flex; }
.head.left .p-eyebrow, .p-text > .p-eyebrow, .p-read-head .p-eyebrow { margin-left: 0; }

a.more, .p-grid .more, .p-duo .p-body .more, .p-triad .more {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 34px;
  padding: 6px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
  color: var(--read); font: 500 var(--t-small) var(--sans); text-decoration: none;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
a.more::after { content: "›"; margin: 0; color: var(--accent-2); }
a.more:hover { color: var(--ink); border-color: rgba(143,176,255,.4); background: rgba(91,140,255,.08); }
.p-grid .more, .p-duo .p-body .more { margin-top: auto; }
.p-grid > .p-card > p:has(+ .more), .p-duo .p-body > p:has(+ .more) { margin-bottom: 18px; }
.p-text > p:has(> a.more:only-child) { margin-top: 24px; }

/* ==========================================================================
   Site-wide from the home page (owner, 2026-10-03): what made the home page work, on every page.
   ========================================================================== */
/* Sections are separated by space alone, no hairlines. */
main > .section + .section, .page-head + .section { border-top: 0; }
.page-head { border-bottom: 0; }
/* Splits span the page column, so every left edge sits on the container. */
main .p-split, main .p-split.mirror { max-width: none; grid-template-columns: minmax(0, 1fr) 480px; column-gap: 96px; }
main .p-split.mirror { grid-template-columns: 480px minmax(0, 1fr); }
main .p-split .p-text > p { max-width: 30em; }
@media (max-width: 1100px) {
  main .p-split { grid-template-columns: minmax(0, 1fr) 440px; column-gap: 64px; }
  main .p-split.mirror { grid-template-columns: 440px minmax(0, 1fr); }
  main .p-split > .p-frame { padding: 28px; }
}
/* Questions: unboxed rows divided by hairlines. */
main .p-qs { gap: 0; border-top: 1px solid var(--line-2); }
main .p-qs details, main .p-qs details[open], main .p-qs details:not([open]):hover { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 0; }
@media (max-width: 520px) { main .p-qs details > div { padding-right: 0; } }
/* A big mark tile belongs to a page's top only; centred sections lower down carry just their eyebrow. */
main > .section .head .p-mark-tile { display: none; }
/* The close: an unboxed display line over a ghost wordmark the footer cuts, as on the home page. */
.section:has(> .wrap > .close-panel) { padding-bottom: 0; overflow: hidden; isolation: isolate; }
.section:has(> .wrap > .close-panel)::before { content: ""; position: absolute; left: 50%; bottom: -260px; width: min(1100px, 100%); height: 520px; transform: translateX(-50%); z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(91,140,255,.14), rgba(91,140,255,.04) 55%, transparent); }
main .close-panel { border: 0; border-radius: 0; background: none; padding: var(--section-y) 0 0; overflow: visible; max-width: none; }
main .close-panel::before, main .close-panel::after, main .close-panel .p-closing-wires { display: none; }
main .close-panel h2 { font-size: var(--t-display); line-height: 1; letter-spacing: -.038em; max-width: 14ch; }
.section:has(> .wrap > .close-panel) > .wrap::after { content: "QDX"; display: block; height: .64em; margin-top: 80px; overflow: hidden; text-align: center; font: 700 var(--t-wordmark)/1 var(--sans); letter-spacing: .12em; text-indent: .12em; color: rgba(214,228,253,.04); pointer-events: none; }
@media (max-width: 720px) { main .close-panel h2 { font-size: var(--t-display-sm); } }
/* Phones and tablets: the picture first, then the words; heads centre, lists stay left. */
@media (max-width: 960px) {
  main .p-split, main .p-split.mirror { grid-template-columns: 1fr; }
  main .p-split > .p-frame, main .p-split.mirror > .p-frame, main .p-split > .window { order: -1; max-width: 480px; }
}
/* Tablets: the words stay left, so the picture spans the same column instead of floating centred. */
@media (min-width: 721px) and (max-width: 960px) {
  main .p-split > .p-frame, main .p-split.mirror > .p-frame, main .p-split > .window { max-width: none; width: 100%; }
}
@media (max-width: 720px) {
  main .p-split > .p-text, main .p-faq > .p-text { text-align: center; }
  main .p-split > .p-text > p, main .p-faq > .p-text > p { margin-left: auto; margin-right: auto; }
  main .p-text > .p-eyebrow { margin-left: auto; margin-right: auto; }
  main .p-rows { text-align: left; }
}

/* Site-wide review A (docs/research/sitewide/review-a.md), shared fixes. */
.head.center > .p-eyebrow { display: table; margin: 0 auto 16px; }
.head.left + .p-features, .head.left + .p-grid { max-width: none; margin-left: 0; margin-right: 0; }
.p-split > .window { aspect-ratio: auto; align-self: center; }
.p-split > .window pre { justify-content: flex-start; }
/* Page titles carry the page; the close no longer shouts louder than them. */
.page-head.p-sub h1 { font-size: var(--t-close); }
@media (max-width: 720px) { main > section:not(.h-close) .close-panel h2 { font-size: var(--t-title); } }

/* Site-wide review B (docs/research/sitewide/review-b.md), shared fixes. */
.p-split.p-code > .window { aspect-ratio: auto; }
.p-split.p-code > .window pre { padding: 20px 22px 28px; }
@media (max-width: 960px) { main .p-split.mirror > .window { order: -1; } }
.p-article code.nw { white-space: nowrap; }
.p-article :not(pre) > code { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.head.left ~ .p-contact { max-width: none; margin-left: 0; margin-right: 0; }
.head.left ~ .p-contact-note { text-align: left; }
@media (max-width: 720px) { .head.left ~ .p-contact-note { text-align: center; } }
@media (max-width: 720px) { .head.left .p-eyebrow { display: table; margin-left: auto; margin-right: auto; } }
/* Final review (docs/research/sitewide/review-final.md), shared fixes. */
@media (max-width: 520px) { main .p-split > .window pre { font-size: var(--t-code-sm); padding: 18px 18px 22px; } }
@media (max-width: 560px) { .p-lit-grid .head.left + .p-grid > .p-card { padding: 20px; } }
@media (max-width: 900px) { .p-toc-m summary { font: 500 var(--t-small) var(--sans); letter-spacing: 0; text-transform: none; } }
@media (max-width: 380px) { main .p-split > .window pre { font-size: var(--t-code-xs); padding: 16px 14px 20px; } }

/* Page-head tile one step smaller (owner, 2026-10-03): 72 tile / 30 icon, 60 / 26 on phones. */
.p-sub .p-mark-tile { width: 72px; height: 72px; margin-bottom: 24px; border-radius: 20px; }
.p-sub .p-mark-tile svg { width: 30px; height: 30px; }
@media (max-width: 520px) { .p-sub .p-mark-tile { width: 60px; height: 60px; margin-bottom: 20px; border-radius: 16px; } .p-sub .p-mark-tile svg { width: 26px; height: 26px; } }
/* Phones and tablets: a split's frame grows to fit its drawing instead of staying square, so nothing is cut off. */
@media (max-width: 960px) { main .p-split > .p-frame, main .p-split.mirror > .p-frame { aspect-ratio: auto; } }
/* Phones and tablets (owner, 2026-10-03): a split reads eyebrow, heading and lede, then its picture, then the list
   and link, so the label introduces the picture and nothing seems to belong to the section above. */
@media (max-width: 960px) {
  main .p-split, main .p-split.mirror { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  main .p-split > .p-text { display: contents; }
  main .p-split > .p-text > * { order: 3; }
  main .p-split > .p-text > .p-eyebrow, main .p-split > .p-text > h2, main .p-split > .p-text > h2 + p { order: 1; }
  main .p-split > .p-frame, main .p-split.mirror > .p-frame, main .p-split > .window, main .p-split.mirror > .window { order: 2; align-self: center; width: 100%; margin: 32px 0 0; }
  main .p-split > .p-text > .p-rows { margin-top: 32px; }
}
/* Phones (owner, 2026-10-03): each split list row becomes a small centred block, so the list holds the same
   centre line as the heading, picture and button around it. Hairlines between rows stay. */
@media (max-width: 720px) {
  main .p-split .p-rows li, main .p-split .p-rows.plain li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 20px 0; }
  main .p-split .p-rows li > .ic, main .p-split .p-rows li > svg { margin: 0 0 4px; align-self: center; }
  main .p-split .p-rows li > .pill { margin: 2px 0 0; justify-self: auto; }
  main .p-split .p-rows { text-align: center; }
}
/* Phones: the ghost wordmark sized to the screen so it fits and stays centred (at a fixed 9rem it ran past the edge). */
/* The ghost wordmark stays oversized on phones and runs past both edges equally, so it reads centred. */
.section:has(> .wrap > .close-panel) > .wrap::after { display: flex; justify-content: center; white-space: nowrap; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
/* The ghost wordmark (owner, 2026-10-03): heavier and tighter, filled with a fine grid that is brightest at the top,
   where the close's light falls, and fades as the footer cuts it. */
.section:has(> .wrap > .close-panel) > .wrap::after {
  font-weight: 900; letter-spacing: -.035em; text-indent: 0; font-stretch: 105%;
  color: transparent; -webkit-text-fill-color: transparent;
  background:
    repeating-linear-gradient(90deg, rgba(143,176,255,.14) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(0deg, rgba(143,176,255,.14) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, rgba(91,140,255,.1), rgba(91,140,255,.02) 75%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-mask-image: linear-gradient(180deg, #000 10%, rgba(0,0,0,.35) 100%); mask-image: linear-gradient(180deg, #000 10%, rgba(0,0,0,.35) 100%);
}

/* API reference review (2026-10-03). */
/* Inline code breaks only where it must: routes break after a slash (the build adds <wbr>), never mid-word. */
.p-article :not(pre) > code { overflow-wrap: break-word; }
.p-article :not(pre) > code.nw { overflow-wrap: normal; }
/* The endpoint index: the name, then the method badge and its path. */
.p-article .p-endpoints a { align-items: center; }
.p-article .p-endpoints .p-route { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); align-items: center; gap: 8px; width: min(22rem, 58%); flex: none; }
.p-article .p-endpoints .p-route .p-method { justify-self: start; }
@media (max-width: 520px) {
  .p-article .p-endpoints a { flex-direction: column; align-items: flex-start; gap: 4px; }
  .p-article .p-endpoints .p-route { width: 100%; }
  .p-article pre { font-size: var(--t-code-sm); padding: 14px; }
  .p-article pre code { white-space: pre; overflow-wrap: normal; } /* code keeps its lines; a long one scrolls inside its block */
}
/* Wide tables: the reads list's description column keeps a readable measure. */
.p-read.wide .p-table tr:has(> td:nth-child(4):last-child) > td:nth-child(2) { min-width: 14rem; }
.p-read.wide .p-table td:nth-child(3) code { white-space: normal; }
.p-article code .tok { white-space: nowrap; } /* a hyphenated name (QDX-Signature) never breaks at its hyphen */
.p-toc { max-height: calc(100vh - 110px); overflow-y: auto; }
.p-table td code:not(.nw) { white-space: normal; } /* multi-word code in a table wraps at its spaces; single tokens stay whole */
@media (max-width: 900px) { .p-contact p br { display: none; } } /* stacked cards flow as one line; the breaks only balance the row */
/* Stacked steps and pairs under a left-aligned head span the column, so their edge lines up with the head. */
.head.left ~ .p-steps, .head.left ~ .p-duo { max-width: none; margin-left: 0; margin-right: 0; }

/* Cards, one look everywhere (owner, 2026-10-04: "cards have to have borders or they look wrong"). Every repeated item
   in a three-up row or an icon grid is a bordered card, the same as the setup-guide cards (.p-card). */
.p-triad, .p-features { gap: var(--s-grid); }
.p-triad > div, .p-features > div { position: relative; border-radius: var(--r-card); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; padding: var(--pad-card); }
.p-triad > div, .p-triad > div:first-child, .p-triad > div:last-child, .head.center ~ .p-triad > div { padding: var(--pad-card); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
@media (max-width: 900px) { .p-triad, .p-features { gap: 16px; } .p-triad > div, .p-triad > div:first-child, .head.center ~ .p-triad > div, .head.center ~ .p-triad > div:first-child { padding: var(--pad-card); } }
.p-triad > div p, .p-features > div p { text-wrap: balance; } /* card lines break evenly, never a lone last word */
@media (max-width: 1100px) { .p-features > div { padding: 22px; column-gap: 14px; } }
@media (min-width: 721px) and (max-width: 1100px) { .p-features > div { display: block; } .p-features > div > .ic { margin-bottom: 14px; } }
/* Lit sections: every card group catches the light, whatever kind of card it holds (owner, 2026-10-04). Three-up rows and
   icon grids get the same glass and rim as the setup cards, each rim brightest on the edge that faces the light. */
.p-lit-grid .p-lit > div { background: linear-gradient(180deg, rgba(16,20,30,.62), rgba(10,13,19,.78)); backdrop-filter: blur(6px); border-color: rgba(143,176,255,.07); --rim: to bottom; }
.p-lit-grid .p-lit > div::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(var(--rim), rgba(143,176,255,.32), rgba(143,176,255,.1) 35%, rgba(143,176,255,.03) 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (min-width: 901px) {
  .p-lit-grid .p-triad > div:nth-child(1) { --rim: to left; }
  .p-lit-grid .p-triad > div:nth-child(2) { --rim: to top; }
  .p-lit-grid .p-triad > div:nth-child(3) { --rim: to right; }
  .p-lit-grid .p-features > div:nth-child(3n+1) { --rim: to left; }
  .p-lit-grid .p-features > div:nth-child(3n+2) { --rim: to top; }
  .p-lit-grid .p-features > div:nth-child(3n) { --rim: to right; }
}
/* Plain (unlit) cards wear the drawing frame's edge light (owner, 2026-10-04): the lit hairline across the top, a soft
   glow under it and a faint blue at the foot. No section light source or dot field; those stay with lit sections. */
:is(.p-triad, .p-features):not(.p-lit) > div { background: linear-gradient(90deg, transparent 25%, rgba(143,176,255,.42), transparent 75%) top center / 100% 1px no-repeat, radial-gradient(40% 14% at 50% 0%, rgba(214,228,253,.07), transparent), radial-gradient(70% 60% at 50% 100%, rgba(91,140,255,.12), transparent 72%), linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.006)); }
/* The picture spans the same height as the words (owner, 2026-10-04: "the most important thing"). Side by side, a split's
   frame or code window runs from the top of the eyebrow to the bottom of the last link, so both columns share edges. */
@media (min-width: 961px) {
  main .p-split { align-items: stretch; }
  main .p-split > .p-frame, main .p-split > .window, main .p-split.p-code > .window { align-self: stretch; aspect-ratio: auto; height: auto; min-height: 0; }
  main .p-split > .window { display: flex; flex-direction: column; }
  main .p-split > .window > pre { flex: 1; }
  /* A frame never sets the height: its drawing keeps its margins inside, so a shorter text column still matches. */
  main .p-split > .p-frame { padding-block: 36px; }
}
/* Code windows are drawings of the API, not reference: the code trails off over its last third (owner, 2026-10-04). */
main .p-split > .window pre code, main .p-tabs .window pre code { display: block; -webkit-mask-image: linear-gradient(#000 62%, rgba(0,0,0,.35)); mask-image: linear-gradient(#000 62%, rgba(0,0,0,.35)); }
/* Two equal cards side by side: a wider gap with a sparkle medallion marks where one ends and the next begins
   (owner, 2026-10-04). An arrow would imply a sequence; these are a pair. */
.p-duo { position: relative; column-gap: 56px; }
.p-vs-pair svg { width: 14px; height: 14px; }
@media (max-width: 860px) { .p-duo { row-gap: 48px; } }

/* Status page (served by the API at /status): a summary line heading the list of systems */
.p-status .wrap { max-width: 880px; }
.p-status .list > .p-status-sum { display: flex; align-items: center; gap: 14px; padding: var(--pad-row); font-size: var(--t-lead); font-weight: 600; color: var(--ink); background: rgba(255,255,255,.02); }
.p-status-sum span { flex: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.p-status-sum.up span { color: var(--ok); } .p-status-sum.unknown span { color: var(--warn); } .p-status-sum.down span { color: var(--down); }
.p-status-checked { margin-top: 16px; color: var(--quiet); font-size: var(--t-small); }
.p-status-checked a { color: var(--muted); }

/* Test menu (tests.html, built from the orderable catalog): a search bar over one bordered list of tests */
.p-menu .wrap { max-width: 920px; }
.p-menu-bar { position: sticky; top: 72px; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.p-menu-search { position: relative; flex: 1; display: block; }
.p-menu-search svg.i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--quiet); pointer-events: none; }
.p-menu-search input { width: 100%; font: inherit; font-size: var(--t-body); color: var(--ink); padding: 14px 16px 14px 48px; border-radius: var(--r-card); border: 1px solid var(--line-2); background: rgba(255,255,255,.03); }
.p-menu-search input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-color: var(--accent); }
.p-menu-search input::placeholder { color: var(--quiet); }
.p-menu-count { flex: none; margin: 0; color: var(--muted); font-size: var(--t-small); min-width: 7em; text-align: right; }
.p-menu-list { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: rgba(255,255,255,.015); overflow: hidden; }
.p-menu-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.p-menu-list li:first-child { border-top: 0; }
.p-menu-list li[hidden] { display: none; }
.p-menu-list h3 { margin: 0; font-size: var(--t-body); font-weight: 600; letter-spacing: -.005em; }
.p-menu-list p { margin: 4px 0 0; color: var(--muted); font-size: var(--t-small); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-tag { flex: none; font-size: var(--t-label); color: var(--read); padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(255,255,255,.03); white-space: nowrap; }
.p-menu-none { margin: 16px 0 0; padding: 32px 20px; text-align: center; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-card); }
.p-menu-note { margin: 20px 0 0; color: var(--quiet); font-size: var(--t-small); }
@media (max-width: 720px) { .p-menu-bar { top: 60px; } .p-menu-count { display: none; } .p-menu-list li { padding: 14px 16px; } }

/* A test's own page (tests/<slug>.html): its name, what it measures with LOINC codes, preparation, specimen and turnaround,
   beside a card to order it */
.p-test .wrap { max-width: 1040px; }
.p-test-back { margin: 0 0 18px; font-size: var(--t-small); }
.p-test-back a { color: var(--muted); text-decoration: none; }
.p-test-back a::before { content: "← "; }
.p-test-back a:hover { color: var(--ink); }
.p-test-head h1 { margin: 0; font-size: var(--t-sub); letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
.p-test-aka { margin: 10px 0 0; color: var(--muted); }
.p-test-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; margin-top: 36px; }
.p-test-part { padding: 24px 0; border-top: 1px solid var(--line); }
.p-test-part:first-child { padding-top: 0; border-top: 0; }
.p-test-part h2 { margin: 0 0 14px; font-size: var(--t-label); text-transform: uppercase; letter-spacing: .08em; color: var(--quiet); font-weight: 600; }
.p-test-part p { margin: 0 0 8px; color: var(--read); }
.p-test-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: rgba(255,255,255,.015); overflow: hidden; }
.p-test-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; border-top: 1px solid var(--line); }
.p-test-list li:first-child { border-top: 0; }
.p-loinc { flex: none; font-family: var(--mono); font-size: var(--t-label); color: var(--quiet); }
.p-test-kv { margin: 0; display: grid; gap: 10px; }
.p-test-kv > div { display: grid; grid-template-columns: 10em minmax(0, 1fr); gap: 16px; }
.p-test-kv dt { color: var(--quiet); }
.p-test-kv dd { margin: 0; color: var(--read); }
.p-test-part p.p-test-note { margin-top: 14px; font-size: var(--t-small); color: var(--muted); }
.p-test-cta { position: sticky; top: 96px; padding: 24px; border: 1px solid var(--line-2); border-radius: var(--r-card); background: radial-gradient(80% 140px at 50% 0, rgba(91,140,255,.12), transparent), rgba(255,255,255,.02); }
.p-test-cta h2 { margin: 0 0 8px; font-size: var(--t-card); }
.p-test-cta p { margin: 0 0 18px; color: var(--muted); font-size: var(--t-small); }
.p-test-cta .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.p-menu-list h3 a { color: inherit; text-decoration: none; }
.p-menu-list h3 a:hover { color: var(--accent-2); }
.p-menu-list p.p-menu-aka { margin: 2px 0 0; color: var(--quiet); font-size: var(--t-label); -webkit-line-clamp: 1; }
@media (max-width: 860px) { .p-test-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } .p-test-cta { position: static; } .p-test-kv > div { grid-template-columns: 1fr; gap: 2px; } }

/* The test menu's layout: a rail (categories, filter, A to Z, an order card) beside the search and the cards, grouped by letter */
.p-menu .wrap.p-menu-layout { max-width: 1240px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.p-menu-rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 92px); overflow-y: auto; padding-bottom: 4px; scrollbar-width: none; }
.p-menu-label { margin: 0 0 6px; font-size: var(--t-label); text-transform: uppercase; letter-spacing: .08em; color: var(--quiet); }
.p-menu-cats { display: flex; flex-direction: column; gap: 2px; }
.p-menu-cats button { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: var(--r-control); background: none; color: var(--muted); font: inherit; font-size: var(--t-small); text-align: left; cursor: pointer; }
.p-menu-cats button span { color: var(--quiet); font-size: var(--t-label); font-variant-numeric: tabular-nums; }
.p-menu-cats button:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.p-menu-cats button.on { color: var(--ink); background: rgba(255,255,255,.07); }
.p-menu-cats button.on span { color: var(--read); }
.p-menu-filter label { display: flex; align-items: center; gap: 10px; color: var(--read); font-size: var(--t-small); cursor: pointer; }
.p-menu-filter input { accent-color: var(--accent); width: 16px; height: 16px; }
.p-menu-az nav { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.p-menu-az a { display: grid; place-items: center; height: 24px; border-radius: var(--r-control); color: var(--muted); font-size: var(--t-label); text-decoration: none; border: 1px solid var(--line); }
.p-menu-az a:hover { color: var(--ink); border-color: var(--line-2); }
.p-menu-order { padding: 16px; border: 1px solid var(--line-2); border-radius: var(--r-card); background: radial-gradient(90% 120px at 50% 0, rgba(91,140,255,.14), transparent), rgba(255,255,255,.02); }
.p-menu-order h2 { margin: 0 0 6px; font-size: var(--t-body); }
.p-menu-order p { margin: 0 0 12px; color: var(--muted); font-size: var(--t-small); }
.p-menu-main .p-menu-bar { top: 64px; }
.p-menu-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 24px; }
.p-menu-popular span { color: var(--quiet); font-size: var(--t-small); margin-right: 2px; }
.p-menu-popular button { padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--read); font: inherit; font-size: var(--t-small); cursor: pointer; }
.p-menu-popular button:hover { color: var(--ink); border-color: rgba(143,176,255,.45); }
.p-menu-group { scroll-margin-top: 150px; }
.p-menu-group + .p-menu-group { margin-top: 28px; }
.p-menu-group[hidden] { display: none; }
.p-menu-group > h2 { margin: 0 0 12px; font-size: var(--t-small); color: var(--quiet); font-weight: 600; letter-spacing: .04em; }
.p-menu-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-grid); }
.p-menu-cards li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: rgba(255,255,255,.015); transition: border-color var(--dur) var(--ease); }
.p-menu-cards li:hover { border-color: var(--line-2); }
.p-menu-cards li[hidden] { display: none; }
.p-menu-cards h3 { margin: 0; font-size: var(--t-body); font-weight: 600; padding-right: 72px; }
.p-menu-cards h3 a { color: var(--ink); text-decoration: none; }
.p-menu-cards h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.p-menu-cards h3 a:hover { color: var(--accent-2); }
.p-menu-cards p { margin: 0; color: var(--muted); font-size: var(--t-small); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-menu-cards p.p-menu-aka { color: var(--quiet); font-size: var(--t-label); -webkit-line-clamp: 1; }
.p-menu-cards p.p-menu-measures span { color: var(--quiet); }
.p-menu-cards .p-cpt { position: absolute; top: 15px; right: 16px; font-family: var(--mono); font-size: var(--t-label); color: var(--quiet); white-space: nowrap; }
.p-menu-cards .p-cpt small { margin-left: 4px; color: var(--quiet); opacity: .75; }
.p-menu-cards h3 { padding-right: 96px; }
.p-menu-cards .p-tag { align-self: flex-start; margin-top: 4px; }
@media (max-width: 1000px) {
  .p-menu .wrap.p-menu-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .p-menu-rail { position: static; max-height: none; overflow: visible; gap: 16px; }
  .p-menu-cats { flex-direction: row; overflow-x: auto; gap: 6px; margin-right: -16px; padding-right: 16px; }
  .p-menu-cats button { flex: none; border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 6px 12px; }
  .p-menu-az, .p-menu-order, .p-menu-cats .p-menu-label, .p-menu-filter .p-menu-label { display: none; }
}
@media (max-width: 640px) { .p-menu-cards { grid-template-columns: minmax(0, 1fr); } }

/* ---- Reference pages: legibility (code, inline code, subheads, endpoints) ------------------------------------
   Code is the thing developers read most, so it gets the contrast of body text (AA and better), a heavier mono, a
   comfortable size and line height, restrained colour for structure, and a Copy button (site.js). */
.p-article pre { position: relative; background: #0b0f16; border-color: var(--line-2); color: #e4e9f2; font-size: var(--t-code-read); font-weight: 450; line-height: 1.75; padding: 18px 20px; tab-size: 2; }
.p-article pre code { font: inherit; color: inherit; }
.p-article .p-code-label { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 8px 0 18px; border-color: var(--line-2); color: var(--muted); font-weight: 500; letter-spacing: .04em; }
.tk-key { color: #a9c3ff; }               /* keys: the accent, lightened */
.tk-str { color: #b8e3c4; }               /* strings: soft green */
.tk-num, .tk-lit { color: #f2cf8a; }      /* numbers, true/false/null: the warm accent */
.tk-kw { color: #c7b4ff; }
.tk-p { color: #8a94a6; }                 /* punctuation steps back */
.tk-com { color: #8a94a6; font-style: italic; }
/* Copy: in the code's label bar, or at the block's top right when it has none. */
.code-copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-tile-sm); background: rgba(255,255,255,.04); color: var(--read); font: 500 var(--t-label) var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; }
.code-copy:hover { color: var(--ink); border-color: rgba(214,228,253,.28); background: rgba(255,255,255,.07); }
.code-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.p-article pre > .code-copy { position: absolute; top: 10px; right: 10px; }
/* Inline code: as easy to read as the prose around it, on its baseline. */
.p-article :not(pre) > code { font-size: .86em; font-weight: 500; color: var(--ink); background: rgba(143,176,255,.09); border-color: rgba(143,176,255,.22); padding: .08em .4em; border-radius: 5px; vertical-align: baseline; }
.p-article .p-endpoint code, .p-article .p-endpoints code { font-weight: 500; }
/* Line length: prose stays near 75 characters; tables and code use the column's full width. */
.p-article > p:not(.p-code-label, .p-endpoint), .p-article > ul:not(.p-endpoints) { max-width: 75ch; }
/* The basics read as subheads with their text, each set off by space and a rule. */
.p-article h4.p-def { margin: 32px 0 8px; padding-top: 24px; border-top: 1px solid var(--line); font-size: var(--t-body); font-weight: 600; color: var(--ink); letter-spacing: -.005em; scroll-margin-top: 96px; }
.p-article h2 + h4.p-def, .p-article h3 + h4.p-def { margin-top: 16px; padding-top: 0; border-top: 0; }
/* Methods in four colours: reading blue, creating green, changing amber, removing red. */
.p-method[data-method="get"] { color: #9dbcff; border-color: rgba(143,176,255,.4); background: rgba(91,140,255,.14); }
.p-method[data-method="post"] { color: #8fdca8; border-color: rgba(92,201,131,.4); background: rgba(92,201,131,.12); }
.p-method[data-method="put"], .p-method[data-method="patch"] { color: #f2c477; border-color: rgba(227,164,59,.42); background: rgba(227,164,59,.12); }
.p-method[data-method="delete"] { color: #f69a97; border-color: rgba(239,111,108,.42); background: rgba(239,111,108,.12); }
.p-article .p-endpoint { padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r-control); background: rgba(255,255,255,.02); }
.p-article .p-endpoint code { font-size: var(--t-small); }
/* Field tables: the field name as code, the header row distinct. */
.p-table td:first-child code { color: var(--ink); }
.p-table th { color: var(--read); }
@media (max-width: 520px) {
  .p-article pre { font-size: var(--t-code-read-sm); padding: 14px 14px; }
  .p-article pre > .code-copy { top: 8px; right: 8px; }
  .p-article h4.p-def { margin-top: 24px; padding-top: 18px; }
}
/* Code windows on the other pages (developers, setup guides, home): the same palette and contrast as the
   reference, so code reads one way across the site. */
.window pre { color: #e4e9f2; font-weight: 450; }
.window .k { color: #a9c3ff; } .window .s { color: #b8e3c4; } .window .c { color: #8a94a6; }
/* SMS terms: the portal's consent text, quoted as practices see it, and the screenshots of the opt-in. */
.p-article .sms-consent-quote { margin: 0 0 20px; padding: 14px 18px; border-left: 2px solid var(--accent); background: rgba(143,176,255,.06); border-radius: var(--r-control); border-top-left-radius: 0; border-bottom-left-radius: 0; color: var(--read); line-height: 1.65; max-width: 75ch; }
.p-article .sms-shots { font-size: var(--t-small); }
/* Field lists in the reference ("`name`: what it is"): no bullets, each field on its own line with its name first and
   a rule between, nested fields indented under their parent. */
.p-article ul.p-fields { list-style: none; padding: 0; margin: 0 0 20px; border-top: 1px solid var(--line); }
.p-article ul.p-fields > li { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.p-article ul.p-fields > li::marker { content: none; }
.p-article .p-field-name code { font-weight: 600; }
.p-article ul.p-fields ul.p-fields { margin: 10px 0 0 18px; border-top: 0; border-left: 1px solid var(--line-2); padding-left: 14px; }
.p-article ul.p-fields ul.p-fields > li { padding: 6px 0; border-bottom: 0; }
@media (max-width: 520px) { .p-article :not(pre) > code { font-size: .8em; padding: .04em .32em; } }
/* A field list reads as two columns: the field's name (plain mono, not a pill, so it never runs into code at the start of
   its description) and what it is; nested fields span under their parent. On a phone the name sits above. */
.p-article ul.p-fields > li { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); column-gap: 20px; align-items: baseline; }
.p-article ul.p-fields > li > ul.p-fields { grid-column: 1 / -1; }
.p-article .p-field-name code { background: none; border: 0; padding: 0; color: var(--accent-2); }
@media (max-width: 520px) { .p-article ul.p-fields > li { grid-template-columns: minmax(0, 1fr); row-gap: 2px; } }
