:root {
  color-scheme: dark;
  --ink: #f4f7ff;
  --soft-ink: #d5dffb;
  --blue: #b6d6ff;
  --border: #90a8fa80;
  --navy: #000052;
  --navy-bright: #000080;
  color: var(--ink);
  background: var(--navy);
}
:root:not(:has(main.motion-paused)) { scroll-behavior: smooth; }
.brand, .brand svg, h1 span, .chapter h2 span { color: var(--blue); }
.invitation, .readout, .caption, .quiet { color: var(--soft-ink); }
.dot { background: #2173a2; box-shadow: 0 0 10px #308bbf70; }
.footer { border-color: var(--border); }
#signal, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .7rem 1rem; font: inherit; font-weight: 700;
  color: white; border: 1px solid #91a5fb; background: #2b35af; border-radius: .3rem;
}
#signal:hover:not(:disabled), .button:hover { background: #3949cb; }
#signal:disabled { color: #c0cef3; background: #212665; border-color: #8798d2; }
button[hidden], [hidden] { display: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #b9dfff; outline-offset: 4px; }
.frame { width: min(100% - clamp(2.5rem,10vw,12rem), 87rem); margin-inline: auto; }
.journey-nav { border-block: 1px solid var(--border); background: #101067; }
.journey-nav .frame { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1rem; }
.journey-nav button, .journey-nav a { font-weight: 650; min-height: 3.2rem; }
.journey-nav a { display: inline-flex; align-items: center; text-decoration: none; }
.journey-nav a:hover, .journey-nav [aria-current="page"] { text-decoration: underline; }
a.quiet:focus-visible { outline: 2px solid #b9dfff; outline-offset: 4px; }
.chapter { padding-block: clamp(2.7rem, 7vw, 6.5rem); scroll-margin-top: .5rem; }
.chapter + .chapter { border-top: 1px solid var(--border); }
.chapter-intro { margin-bottom: 2rem; }
.chapter-intro :is(h1, h2) { margin: 0; font-size: clamp(2.4rem, 6.2vw, 6.9rem); letter-spacing: -.071em; line-height: .97; }
.chapter-intro p { max-width: 61ch; margin: 1rem 0 0; font-size: clamp(1rem,1.45vw,1.24rem); line-height: 1.6; color: var(--soft-ink); }
.panel {
  background: #131665;
  border: 1px solid var(--border);
  border-radius: .55rem;
  padding: clamp(.95rem,2.4vw,1.7rem);
  min-width: 0;
}
.panel h3, .explore-reference h3 { margin: 0 0 .8rem; letter-spacing: -.027em; font-size: clamp(1.23rem,2.2vw,1.8rem); }
.panel p, details p { line-height: 1.58; color: var(--soft-ink); overflow-wrap: anywhere; }
.explore-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.45fr); align-items: stretch; gap: 1rem; }
#intent-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .42rem; }
.index-button {
  min-height: 2.9rem; text-align: left; padding: .55rem .65rem; color: var(--ink);
  border: 1px solid var(--border); border-radius: .28rem; background: #1c2377;
}
.index-button strong, .index-button span { display: block; overflow-wrap: anywhere; }
.index-button span { color: var(--soft-ink); font-size: .87rem; margin-top: .22rem; }
.index-button[data-recommended] { border-color: #76a7d1; }
.index-button:hover, .index-button[aria-pressed="true"] { border-color: #a6c3ff; background: #2b35af; }
.intent-panel { display: flex; flex-direction: column; }
.intent-panel .flow { margin-block: 0; }
.intent-panel #intent-description { margin-top: 0; }
.intent-suggestions { margin-top: auto; padding-top: .65rem; }
.intent-suggestions h4 { margin: 0 0 .55rem; font-size: 1rem; }
#intent-apps { display: flex; flex-wrap: wrap; gap: .42rem; }
#intent-apps .index-button { text-align: center; padding-inline: .85rem; }

.intent-app-detail { margin-top: 1rem; }
.intent-app-detail p { margin: 0; }
#exploration-product { margin-top: .8rem; }
.module-function { margin: 1.35rem 0; }
#exploration-product h4 { margin: 0 0 .55rem; font-size: 1.08rem; }
#module-method { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#module-description, #module-purpose { margin-top: 0; }
@media (max-width: 700px) {
  #module-method { grid-template-columns: 1fr; }
}
.evidence-note { border-left: 2px solid #4685ae; padding-left: .75rem; }
.explore-reference { margin-block: 1.4rem; }
.explore-reference details, .explore-reference .reference-entry {
  background: #131665;
  border: 1px solid var(--border);
  margin-top: .55rem;
  padding: .85rem 1rem;
  border-radius: .3rem;
}
summary { cursor: pointer; font-weight: 700; padding: .2rem 0; }
details p { margin-bottom: .3rem; max-width: 83ch; }
.flow { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; list-style: none; }
.flow li { padding: .35rem .53rem; border-bottom: 1px solid #6fa9cc; color: var(--blue); background: #232c8f; font-size: .89rem; }
.reference-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem 1.15rem; color: var(--soft-ink); line-height: 1.5; }
.reference-grid dt, .result dt, .domain-records dt { color: var(--blue); font-weight: 700; }
.reference-grid dd, .result dd, .domain-records dd { margin: .3rem 0 0; line-height: 1.5; }
.demo-choices, #module-composition { border: 0; padding: 0; margin: 1rem 0; }
.demo-choices legend, #module-composition legend { margin-bottom: .45rem; font-weight: 700; padding: 0; }
.demo-choices label, #module-composition label {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; cursor: pointer; margin-right: .85rem;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); }
.result { margin: 1rem 0 0; }
.result > div, .domain-records > div { padding: .65rem 0; border-top: 1px solid var(--border); }
.result .result-domain { font-size: .92rem; color: var(--soft-ink); }
.composition { margin-top: 1rem; }
.composition-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; }
.composition-actions p { margin: 0; }
#reality-domains { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: .7rem; margin: 1rem 0; }
.domain-description { margin-top: .45rem; }
.domain-records { margin-bottom: 0; }
.chapter-footer { border-top: 1px solid var(--border); padding-block: 1rem 1.8rem; color: var(--soft-ink); font-size: .94rem; }
@media (max-width: 700px) {
  .explore-layout, #reality-domains { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 430px) {
  .reference-grid { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { :root:not(:has(main.motion-paused)) { scroll-behavior: auto; } }
.cross-domain { border-top: 1px solid var(--border); padding-top: .7rem; color: var(--soft-ink); }
.cross-domain li { margin: .35rem 0; line-height: 1.5; }

/* The opening uses the navy values from the reference palette. */
.opening {
  color: #f6fbff;
  background: radial-gradient(ellipse at 78% 40%, #2b35af 0%, var(--navy-bright) 43%, var(--navy) 83%);
}
.opening .veil {
  background: linear-gradient(90deg, #000052ec 0%, #00005296 25%, #00005214 58%, transparent 72%),
              linear-gradient(0deg, #000052ed, #00005200 41%);
}
.opening .brand, .opening .brand svg, .opening h1 span { color: #c0e8ff; }
.opening .invitation, .opening .readout, .opening .caption, .opening .quiet { color: #e3efff; }
.opening .footer { border-color: #c0dcff70; }
.opening .dot { background: #c1eaff; box-shadow: 0 0 10px #acd9ff90; }
.opening #signal, .opening .button { color: #000052; background: #ecf7ff; border-color: #c2e5ff; }
.opening #signal:hover:not(:disabled), .opening .button:hover { background: #cce9ff; }
.opening #signal:disabled { color: #e7f1ff; background: #101067; border-color: #8cabd4; }
.opening button:focus-visible { outline-color: #e4f5ff; }
@media (max-width: 700px) {
  .opening .veil {
    background: linear-gradient(0deg, #000052 0%, #000052f0 22%, #0000528c 48%, transparent 77%);
  }
}
.descent { margin-block: 1.2rem; scroll-margin-top: 1rem; }
#descent-path { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .85rem; margin-bottom: .45rem; color: var(--blue); }
#descent-path > * + * { border-left: 1px solid var(--border); padding-left: .85rem; }
#descent-content > .button, #descent-content > .index-button { margin: .35rem .5rem .35rem 0; }
a.button { text-decoration: none; }
a.button:focus-visible { outline: 2px solid #b9dfff; outline-offset: 4px; }
.domain > .index-button { margin-top: .8rem; }

.exploration-angles, .human-domain-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.exploration-angles { margin-bottom: 1.3rem; }
.angle-card { color: var(--ink); text-align: left; }
.angle-card strong {
  display: block;
  margin-bottom: .55rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}
.angle-card span { display: block; color: var(--soft-ink); line-height: 1.55; }
.angle-card:hover, .angle-card[aria-pressed="true"] {
  border-color: #accbff;
  background: #1c2377;
}
#human-domains-title { margin: 0 0 .65rem; }
.human-domain-menu { gap: .6rem; }
.human-domain-menu span { line-height: 1.45; }
#descent-content h4 { margin: .65rem 0 .45rem; }
@media (max-width: 700px) {
  .exploration-angles, .human-domain-menu { grid-template-columns: minmax(0, 1fr); }
}
