/* Ridge Arc Network developer portal.
   Brand tokens are the ones ridgearcnetwork.com ships: the same ground, surfaces,
   Manrope and accent. Depth follows the platform workspace: edge-light on raised
   surfaces, two shadows scaled to float distance. */

@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a1019;
  --surface: #101a28;
  --elevated: #152234;
  --deep: #070d15;
  --text: #f1f4f5;
  --heading: #ffffff;
  --muted: #a5b3c3;
  --faint: #77899e;
  --border: #253346;
  --border-strong: #31435a;
  --accent: #6bd7d4;
  --accent-strong: #35cbd1;
  --accent-ink: #0c1822;
  --accent-tint: rgba(107, 215, 212, 0.12);
  --button: #eff4f4;
  --button-text: #0c1822;
  --ok: #7ee2a8;
  --ok-tint: rgba(126, 226, 168, 0.12);
  --warn: #f2c27b;
  --warn-tint: rgba(242, 194, 123, 0.12);
  --danger: #ff8f86;
  --danger-tint: rgba(255, 143, 134, 0.12);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 30px -20px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 4px 8px rgba(0, 0, 0, 0.3), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1440px;
  --gutter: clamp(20px, 4vw, 40px);
  --prose: 72ch;
  --side: 248px;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--bg); }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--text); background: var(--bg) radial-gradient(900px 480px at 92% -8%, rgba(107, 215, 212, 0.07), transparent 62%) no-repeat; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.18em; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.15; margin: 0 0 0.45em; text-wrap: balance; }
h1 { font-size: clamp(32px, 4.2vw, 52px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.06; }
h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.025em; margin-top: 2.1em; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-top: 1.4em; }
h4 { font-size: 14px; font-weight: 700; margin-top: 1.2em; }
h2[id], h3[id] { scroll-margin-top: 96px; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: 0.3em 0; }
strong { color: var(--heading); font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
img, svg { max-width: 100%; }
::selection { background: rgba(107, 215, 212, 0.32); }

code, pre, kbd, .mono { font-family: var(--mono); font-size: 0.88em; line-height: 1.55; }
code { background: var(--surface); color: #bfe9e8; padding: 0.12em 0.42em; border-radius: 6px; border: 1px solid var(--border); overflow-wrap: anywhere; }
pre { background: var(--deep); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; overflow-x: auto; margin: 14px 0 20px; box-shadow: var(--edge); font-size: 13.5px; }
pre code { background: none; border: 0; padding: 0; color: var(--text); font-size: inherit; overflow-wrap: normal; }
pre .c { color: var(--faint); }
pre .k { color: var(--accent); }
pre .s { color: #f2c27b; }

/* ---- Top navigation (rendered by /assets/nav.js) ---- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(10, 16, 25, 0.86); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border-bottom: 1px solid var(--border); }
.nav-inner { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 0 auto; min-height: 76px; display: flex; align-items: center; gap: 24px; }
.nav-brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--heading); }
.nav-brand:hover { text-decoration: none; }
.nav-brand img { height: 26px; width: auto; display: block; }
.nav-brand .dev { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); border-left: 1px solid var(--border-strong); padding-left: 12px; line-height: 1.4; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 14px; padding: 9px 13px; border-radius: 999px; text-decoration: none; transition: color 160ms ease-out, background 160ms ease-out; }
.nav-links a:hover { color: var(--heading); background: var(--surface); }
.nav-links a.active { color: var(--heading); background: var(--elevated); box-shadow: var(--edge); }
.nav-links a.cta { margin-left: 10px; color: var(--button-text); background: var(--button); box-shadow: var(--edge), var(--shadow-1); }
.nav-links a.cta:hover { background: #fff; }
.nav-toggle { display: none; min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--heading); cursor: pointer; align-items: center; justify-content: center; gap: 8px; font: 600 13px/1 var(--sans); padding: 0 12px; }
.nav-toggle svg { width: 18px; height: 18px; }

/* ---- Layout ---- */
.page { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 40px 0 96px; overflow-x: clip; }
.docs { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: 48px; }
@media (min-width: 1200px) { .docs:has(.toc) { grid-template-columns: var(--side) minmax(0, 1fr) 200px; } }
.toc { position: sticky; top: 92px; align-self: start; font-size: 13px; display: none; }
@media (min-width: 1200px) { .toc { display: block; } }
.toc h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--faint); margin: 0 0 8px 12px; }
.toc a { display: block; padding: 5px 12px; color: var(--faint); border-left: 2px solid var(--border); line-height: 1.35; }
.toc a:hover { color: var(--heading); text-decoration: none; }
.toc a.active { color: var(--heading); border-left-color: var(--accent); }
.side { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14px; padding-right: 6px; }
.side h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--faint); margin: 20px 0 6px 12px; }
.side h4:first-child { margin-top: 0; }
.side a { display: block; color: var(--muted); padding: 7px 12px; border-radius: 10px; transition: color 160ms ease-out, background 160ms ease-out; }
.side a:hover { color: var(--heading); background: var(--surface); text-decoration: none; }
.side a.active { color: var(--heading); background: var(--elevated); box-shadow: var(--edge); }
.side-menu > summary { display: none; }
.main { min-width: 0; }
.prose { max-width: none; }
.prose > :is(p, ul, ol, h1, h2, h3, h4, .lede, .kicker, .callout, .notice), .prose .hero > * { max-width: var(--prose); }
.page > .hero:not(.hero-grid), .page > .section.prose, .page.prose > *, .page > .notice { width: min(1100px, 100%); margin-inline: auto; }
.prose > h1:first-child, .hero + * { margin-top: 0; }
.section { margin-top: 56px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

/* ---- Hero ---- */
.hero { padding: 8px 0 8px; }
.hero .kicker, .kicker, .eyebrow { display: block; color: var(--accent); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 18px; }
.hero .lede, .lede { font-size: 18px; color: var(--muted); max-width: 62ch; margin-top: 4px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding: 24px 0 8px; }
.showcase { display: grid; gap: 10px; }
.pane { background: var(--deep); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--edge), var(--shadow-2); overflow: hidden; }
.pane-h { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); font: 600 12.5px/1.4 var(--mono); color: var(--muted); overflow-x: auto; white-space: nowrap; }
.pane-h .m { font-size: 11px; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 6px; color: var(--accent-ink); background: var(--accent); }
.pane-h .m.post { background: var(--button); }
.pane-h .m.event { background: var(--warn); }
.pane pre { margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 14px 16px; font-size: 12.75px; }
.pane-flow { display: flex; align-items: center; gap: 12px; padding: 2px 8px; color: var(--faint); font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; }
.pane-flow::before, .pane-flow::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }

/* ---- Cards ---- */
.card { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #ffffff), var(--surface)); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--edge), var(--shadow-1); min-width: 0; }
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.accent, .card.gold { border-color: var(--border); }
.card.accent h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: 2px; box-shadow: 0 0 0 4px var(--accent-tint); }
.card.navy { background: linear-gradient(160deg, #0e2a4d, #0b1f3a); border-color: #1d3d66; }
.card.navy h2, .card.navy h3, .card.navy strong { color: #fff; }
.card.hover { transition: transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out; }
.card.hover:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 12px rgba(0, 0, 0, 0.32), 0 24px 44px -18px rgba(0, 0, 0, 0.7); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---- Pills ---- */
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 999px; vertical-align: middle; text-transform: uppercase; border: 1px solid transparent; }
.pill.live { background: var(--accent-tint); color: var(--accent); border-color: rgba(107, 215, 212, 0.35); }
.pill.pilot { background: var(--warn-tint); color: var(--warn); border-color: rgba(242, 194, 123, 0.35); }
.pill.planned { background: transparent; color: var(--muted); border-color: var(--border-strong); }
.pill.ok { background: var(--ok-tint); color: var(--ok); border-color: rgba(126, 226, 168, 0.35); }
.pill.warn { background: var(--warn-tint); color: var(--warn); border-color: rgba(242, 194, 123, 0.35); }
.pill.no { background: var(--danger-tint); color: var(--danger); border-color: rgba(255, 143, 134, 0.35); }

/* ---- Endpoint rows ---- */
.endpoint { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 10px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--edge); }
.endpoint .m { font: 700 11px/1 var(--mono); letter-spacing: 0.08em; padding: 6px 9px; border-radius: 7px; color: var(--accent-ink); background: var(--accent); }
.endpoint .m.post { background: var(--button); }
.endpoint .m.put, .endpoint .m.patch { background: var(--warn); }
.endpoint .m.delete { background: var(--danger); }
.endpoint .p { font: 600 15px/1.3 var(--mono); color: var(--heading); overflow-wrap: anywhere; }
.endpoint .scope { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.endpoint .scope code { color: var(--accent); }

/* ---- Callouts ---- */
.callout { border-left: 3px solid var(--accent); background: var(--accent-tint); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 20px 0; }
.callout.gold { border-color: var(--warn); background: var(--warn-tint); }
.callout.warn { border-color: var(--warn); background: var(--warn-tint); }
.callout.danger { border-color: var(--danger); background: var(--danger-tint); }
.callout p:last-child { margin-bottom: 0; }
.callout .t { font-weight: 700; color: var(--heading); display: block; margin-bottom: 4px; }

/* ---- Tables: always inside a scrolling wrapper; nav.js adds one where a page forgot ---- */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 16px 0; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--faint); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; background: rgba(255, 255, 255, 0.02); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--edge); background: var(--surface); margin: 16px 0 20px; -webkit-overflow-scrolling: touch; }
.table-wrap table { margin: 0; min-width: 560px; }
td.y { color: var(--ok); font-weight: 700; }
td.n { color: var(--faint); }
td.r { color: var(--danger); font-weight: 700; }

/* ---- Steps: a horizontal timeline on wide screens, a list on phones ---- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.step { counter-increment: step; position: relative; padding: 22px 22px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--edge), var(--shadow-1); }
.step::before { content: counter(step, decimal-leading-zero); display: block; font: 600 12px/1 var(--mono); letter-spacing: 0.14em; color: var(--accent); margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; font-size: 14.5px; color: var(--muted); }
.step p:last-child { margin-bottom: 0; }

/* ---- Forms ---- */
form.portal { max-width: 860px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px 12px; margin: 0 0 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #ffffff), var(--surface)); box-shadow: var(--edge), var(--shadow-1); min-width: 0; }
legend { float: left; width: 100%; padding: 0; margin: 0 0 18px; font-size: 16.5px; font-weight: 700; color: var(--heading); letter-spacing: -0.01em; }
legend::after { content: ""; display: block; height: 1px; background: var(--border); margin-top: 12px; }
legend + * { clear: both; }
.f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 18px; }
.f-grid .wide { grid-column: 1 / -1; }
label.f { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 12px; min-width: 0; }
label.f span { display: block; margin-bottom: 5px; font-weight: 600; color: var(--text); }
label.f .hint { display: block; font-weight: 400; color: var(--faint); font-size: 12.5px; margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--deep);
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 11px 13px; outline: none; min-height: 46px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25); transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
textarea { min-height: 104px; resize: vertical; }
input[type=file] { color: var(--muted); font-size: 14px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent-strong); width: 17px; height: 17px; vertical-align: -3px; margin-right: 7px; }
/* The box hangs in a gutter and the label text flows as text, so links, code chips and emphasis stay inline. */
label.check { display: block; position: relative; padding-left: 28px; font-size: 14.5px; margin: 7px 0; color: var(--text); line-height: 1.45; min-width: 0; }
label.check input[type=checkbox], label.check input[type=radio] { position: absolute; left: 0; top: 3px; margin: 0; }
label.check code { overflow-wrap: anywhere; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 18px; align-items: start; }
.roles label.f { margin-bottom: 6px; }
.roles input[type=number] { width: 96px; }
.req::after { content: " *"; color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 650 14.5px/1.2 var(--sans); min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; background: var(--button); color: var(--button-text); box-shadow: var(--edge), var(--shadow-1); transition: transform 120ms ease-out, background 160ms ease-out, box-shadow 160ms ease-out; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #ffffff; color: var(--button-text); text-decoration: none; transform: translateY(-1px); box-shadow: var(--edge), var(--shadow-2); }
.btn:active { transform: translateY(0) scale(0.985); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border-strong); box-shadow: none; }
.btn.ghost:hover { background: var(--surface); color: var(--heading); box-shadow: var(--edge); }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); margin: 16px 0; border: 1px solid var(--border); background: var(--surface); }
.notice.ok { border-color: rgba(126, 226, 168, 0.4); background: var(--ok-tint); }
.notice.err { border-color: rgba(255, 143, 134, 0.4); background: var(--danger-tint); }
.notice.warn { border-color: rgba(242, 194, 123, 0.4); background: var(--warn-tint); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[data-turnstile]:empty { display: none; }

/* ---- Account page ---- */
.req-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin: 10px 0; background: var(--surface); box-shadow: var(--edge); display: grid; gap: 6px; }
.req-card .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.keybox { font: 600 14px/1.5 var(--mono); background: var(--deep); border: 1px dashed var(--accent); color: var(--accent); padding: 12px 14px; border-radius: 10px; word-break: break-all; margin-top: 8px; user-select: all; }

/* ---- Gate and sign-in landing ---- */
.gate-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate { width: min(460px, 100%); display: grid; gap: 22px; }
.gate-brand { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--heading); }
.gate-brand:hover { text-decoration: none; }
.gate-brand img { height: 28px; width: auto; }
.gate-brand .dev { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); border-left: 1px solid var(--border-strong); padding-left: 12px; }
.gate-card { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #ffffff), var(--surface)); border: 1px solid var(--border); border-radius: 22px; padding: 30px 30px 24px; box-shadow: var(--edge), var(--shadow-2); }
.gate-card h1 { font-size: 26px; }
.gate-card .lede { font-size: 15.5px; }
.gate-card .btn { width: 100%; }

/* ---- Footer ---- */
.foot { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 22px 0 56px; border-top: 1px solid var(--border); color: var(--faint); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; }
.foot a { color: var(--muted); }

/* ---- Phones and small tablets ---- */
@media (max-width: 900px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; padding: 12px 0; min-height: 64px; }
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 0 4px; border-top: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 12px; font-size: 15px; }
  .nav-links a.cta { margin: 6px 0 4px; text-align: center; }
  .docs { grid-template-columns: 1fr; gap: 20px; }
  .side { position: static; max-height: none; overflow: visible; padding: 0; }
  .side-menu { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--edge); }
  .side-menu > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; min-height: 48px; padding: 0 16px; font-weight: 700; color: var(--heading); }
  .side-menu > summary::-webkit-details-marker { display: none; }
  .side-menu > summary::after { content: "+"; font-size: 20px; color: var(--accent); }
  .side-menu[open] > summary::after { content: "–"; }
  .side-menu > div { padding: 4px 8px 10px; border-top: 1px solid var(--border); }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .page { padding: 24px 0 72px; }
  .card { padding: 20px; }
  .steps { grid-template-columns: 1fr; }
  .endpoint .scope { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
  h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card.hover, .nav-links a, .side a { transition: none; }
}
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #161d18; }
  .nav, .foot, .side, .nav-toggle { display: none; }
  .page { padding: 0; width: auto; }
  .docs { display: block; }
}

/* ---- Form pages: intro rail beside the form ---- */
.page-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.page-intro .hero { padding: 0; }
.page-intro .hero .lede { font-size: 16.5px; }
.page-intro .hero h1 { font-size: clamp(28px, 3vw, 38px); }
.page-body { min-width: 0; }
.page-body form.portal { max-width: none; }
.page-body .section { margin-top: 0; }
.page-body .section > h2 { margin-top: 0; }
.who-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.who-row .btn { min-height: 38px; padding: 8px 16px; font-size: 13.5px; }
.intro-sections { counter-reset: intro; display: grid; gap: 2px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.intro-sections:empty { display: none; }
.intro-sections a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.intro-sections a::before { counter-increment: intro; content: counter(intro, decimal-leading-zero); font: 600 11px/1 var(--mono); letter-spacing: 0.12em; color: var(--accent); }
.intro-sections a:hover, .intro-sections a.active { color: var(--heading); background: var(--surface); text-decoration: none; }
@media (min-width: 1000px) {
  .page-split { grid-template-columns: minmax(300px, 400px) minmax(0, 760px); gap: 64px; justify-content: center; align-items: start; }
  .page-intro { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow: auto; padding-right: 4px; }
  /* A rail that carries a list (the account page's requests) scrolls with the page instead of clipping. */
  .page-intro:has(.section) { position: static; max-height: none; overflow: visible; }
}

/* ---- Small fact lists (sandbox host, header, prefix) ---- */
.facts { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; }
.facts > div { display: grid; gap: 3px; }
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 0; font-size: 13.5px; }
.facts code { overflow-wrap: anywhere; }

/* ---- Validation messages ---- */
.field-error { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--danger); }
label.check .field-error { margin-top: 4px; }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-tint); }
.notice ul { margin: 8px 0 0; padding-left: 1.2em; }
.notice li { margin: 3px 0; }
.notice.err a { color: var(--heading); text-decoration: underline; text-underline-offset: 0.15em; }
