/* Whole-page proposal. One canvas, explicit surface roles, untouched artwork. */
:root {
  color-scheme:dark;
  --paper:#0D111B; --paper-2:#111927; --card:#182235;
  --ink:#F4F2FA; --muted:#BBC6DC; --soft:#9CAAC3;
  --line:#34435F; --line-strong:#667999;
  --accent:#9EB1FF; --accent-ink:#BDC9FF; --accent-soft:#233353;
  --term:#101725; --term-2:#182235; --term-line:#34435F;
  --term-ink:#F4F2FA; --term-muted:#BBC6DC; --term-hot:#F2C27C;
  --term-border:#667999; --term-hover:#28354F;
  --term-accent:#BDC9FF; --term-focus:#9EB1FF;
  --success:#91D6AF; --success-soft:#18392F; --success-fill:#66BA8B;
  --danger:#FFAAA5; --warning:#F2C27C; --rating:var(--warning);
  --radius-card:16px; --radius-inner:12px; --radius-control:12px;
  --action:#3446D4; --action-hover:#4559DF;
  --picture-paper:#FFFDF9; --surface-raised:#202D43;
}

/* Freeze the approved hero's inherited palette, including white comic balloons. */
.full-night :is(.top,.hero) {
  --paper:#F6F2EB; --paper-2:#EEE8DE; --card:#FFFDF9;
  --ink:#1C1B22; --muted:#5B5764; --soft:#8A8592;
  --line:#DFD7CA; --line-strong:#CDC3B4;
  --accent:#3446D4; --accent-ink:#2533A8; --accent-soft:#E5E8FA;
  --term:#17161F; --term-2:#211F2B; --term-line:#2E2C3A;
  --term-ink:#ECEAF3; --term-muted:#A8A5B7; --term-hot:#F2B45A;
  --term-border:#514D65; --term-hover:#333044;
  --term-accent:#DADFFF; --term-focus:#A6B0FF;
  --success:#1F7A47; --success-soft:#E3F3E8; --success-fill:#2F9D5C;
  --danger:#B3261E; --warning:#A2551B; --rating:var(--warning);
  --radius-card:22px; --radius-inner:16px; --radius-control:12px;
}

html { scrollbar-color:#667999 #0D111B; }
::selection { color:#F4F2FA; background:#3446D4; }
.full-night { caret-color:var(--accent); }
.full-night > .skip { color:var(--ink); background:var(--card); }
.full-night :focus-visible { outline-color:#9EB1FF; outline-width:3px; }

/* Quiet changes of depth define chapters, without a white page below the hero. */
.full-night .block { background:var(--paper); border-top-color:var(--line); }
.full-night :is(.how,.control,.compare,.reviews,.integrate) { background:var(--paper-2); }
.full-night .team, .full-night .start { background:var(--paper); }
.full-night .identity-future { background:var(--accent-soft); }
.full-night .foot { background:var(--paper-2); }
.full-night .final { background:var(--paper); }
.full-night .block h2 { letter-spacing:-.03em; }
.full-night main > :not(.hero) .num { color:var(--accent); }
.full-night main > :not(.hero) .kicker { color:var(--muted); }
.full-night main > :not(.hero) .btn-primary { color:#FFF; background:var(--action); }
.full-night main > :not(.hero) .btn-primary:hover { background:var(--action-hover); }
.full-night main > :not(.hero) .btn-ghost { border-color:var(--line-strong); }
.full-night main > :not(.hero) .btn-ghost:hover { background:var(--surface-raised); }
.full-night main > :not(.hero) summary:hover { color:var(--accent-ink); }
.full-night main > :not(.hero) summary::after { border-color:var(--line-strong); }
.full-night main > :not(.hero) details[open] summary { color:var(--accent-ink); }

/* Illustration windows preserve the complete original drawing and its white paint.
   Only the surface around it changes; no filters or new alpha are applied. */
.full-night .visual-window {
  background:var(--picture-paper); border-radius:16px;
  overflow:hidden; isolation:isolate;
}
.full-night .visual-window img,
.full-night .visual-window img.alpha-scene,
.full-night .store.visual-window > img.on-white {
  display:block; width:100%; max-width:100%; height:auto; margin:0;
  mix-blend-mode:normal; filter:none;
  -webkit-mask-image:none; mask-image:none;
}
.full-night .visual-window picture { display:block; }
.full-night :is(.friends-art,.meet-art,.master-art,.find-art,.night-art,.start-art) { background:none; }
.full-night .team-art figcaption { margin-top:28px; }
.full-night .team-task { color:var(--ink); }
.full-night .start-art .visual-window { max-width:460px; }
.full-night .night-card { background:var(--card); color:var(--ink); border-radius:16px; }
.full-night .night h2 em { color:var(--accent-ink); }
.full-night .night-art { margin:0; }
.full-night .company-art { padding-bottom:20px; }
.full-night .qr-card { bottom:-16px; background:var(--card); box-shadow:none; }
.full-night .qr-card > img { background:#FFF; border-radius:6px; }

/* Diagrams use the same blue paths and muted secondary infrastructure. */
.full-night .topo-normal { stroke:var(--line-strong); }
.full-night .topo-manual { stroke:var(--muted); }
.full-night :is(.team-a4a,.own-a4a,.knock-yes) { background:var(--action); color:#FFF; }
.full-night .relay { background:var(--card); border-radius:16px; }
.full-night :is(.relay-end,.relay-node) { background:var(--paper-2); box-shadow:none; }
.full-night .relay-end { border-radius:12px; }
.full-night .relay-node svg { stroke:var(--muted); }
.full-night .relay-wire::before { border-color:var(--line-strong); }
.full-night .relay-see { background:var(--card); }
.full-night .relay-env .env-lock { background:var(--action); }
.full-night :is(.pub-sealed,.env-body) { background:var(--surface-raised); border-color:var(--line-strong); }
.full-night :is(.pub-sealed,.env-body) i { background:var(--line-strong); }
.full-night .trail-dot { border-color:var(--line-strong); }
.full-night .pass-revoke { color:var(--danger); border-color:#A86B75; }
.full-night .pass-revoke:hover { background:#472833; }
.full-night .pass.revoked .pass-state { background:#472833; color:var(--danger); }
.full-night .identity-examples article, .full-night .identity-evidence { border-color:var(--line-strong); }
.full-night .native-app { background:var(--card); }

/* Light-only diagram colours are replaced explicitly, rather than inverted. */
.full-night :is(.sc-wire,.sc-mesh,.sc-own) { stroke:var(--line-strong); }
.full-night .sc-plug, .full-night .sc-person { fill:var(--muted); }
.full-night .sc-node { fill:var(--card); stroke:var(--line-strong); }
.full-night .sc-sys { fill:var(--paper-2); stroke:var(--line-strong); }
.full-night .proto-a4a { background:var(--accent-soft); border-color:var(--line-strong); }
.full-night .proto-a4a .proto-art { background:var(--paper-2); }
.full-night .proto-a4a :is(.sc-mesh,.sc-own) { stroke:var(--line-strong); }
.full-night .proto-a4a .sc-node { fill:var(--card); stroke:var(--accent); }
.full-night .proto-a4a .sc-agent { fill:var(--accent-soft); stroke:var(--accent); }
.full-night .proto-a4a .sc-person { fill:var(--muted); }
.full-night .proto-a4a :is(.proto-q,.proto-like,.proto-pair) { color:var(--muted); }
.full-night .proto-a4a .sc-t-net { fill:var(--muted); }
.full-night .proto-a4a .proto-pair span { background:var(--paper-2); }

/* Consistent elevations, speech and semantic states throughout the page. */
.full-night main > :not(.hero) :is(.route,.case,.proto,.pillar-vis,.pillars>li,
  .feat-showcase,.rep-card,.chat,.app-group,.grow-col,.final-card,.ask,.knock,.pass,.pub-card) {
  border-radius:var(--radius-card); box-shadow:none;
}
.full-night main > :not(.hero) .ava { background-color:var(--picture-paper); box-shadow:none; }
.full-night .line-a { background:var(--surface-raised); border-color:var(--line-strong); }
.full-night .line-b { background:var(--accent-soft); border-color:var(--line-strong); }
.full-night .line span { color:var(--muted); }
.full-night .chat { background:var(--card); }
.full-night .chat-head { border-color:var(--line); }
.full-night .ask-tag, .full-night .grow-next .grow-you { color:var(--accent-ink); }
.full-night .rep-stars s { color:var(--soft); }
.full-night .rep-void q { text-decoration-color:var(--danger); }
.full-night .start-cta .copy-status { color:var(--success); }
.full-night main > :not(.hero) .install-line { background:var(--card); color:var(--ink); }
.full-night .final-card .btn { width:fit-content; }

@media (max-width:700px) {
  .full-night :is(.meet-art,.find-art,.company-art,.master-art) { margin-inline:0; }
  .full-night .visual-window { border-radius:12px; }
  .full-night .team-art figcaption { margin-top:24px; }
  .full-night .qr-card { right:10px; bottom:-24px; }
  .full-night .company-art { margin-bottom:32px; }
  .full-night .night-card { padding:28px 18px 18px; }
  .full-night .night-art { margin:0; }
  .full-night .final-card .btn { width:100%; line-height:1.35; padding-block:14px; }
}
@media (forced-colors:active) {
  .full-night .block, .full-night .night-card, .full-night .foot { background:Canvas; color:CanvasText; }
  .full-night .visual-window { border:1px solid CanvasText; }
  .full-night :focus-visible { outline-color:Highlight; }
}
