/* Interface only. Research text remains in index.html without rewriting. */
:root { --reading-width: 68ch; --interface-accent: #dcff00; --interface-green: #b2ffd1; --interface-blue: #a6e3ff; --interface-blue-gradient: linear-gradient(180deg, #004dff 0%, #009dff 100%); }
html { scroll-padding-top: 28px; }
body { hyphens: none; -webkit-hyphens: none; }
.research-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  width: min(1420px, calc(100% - 7rem));
  margin-inline: auto;
  align-items: start;
}
.research-layout > main { width: 100%; min-width: 0; max-width: none; padding: 0; margin: 0; }
.page-navigation { position: sticky; top: 28px; padding-top: 48px; min-width: 0; z-index: 15; }
.page-index { border: 0; margin: 0; padding: 0; background: transparent; }
.page-index > summary { display: none; }
.page-index nav { display: block; margin: 0; font-size: 14px; }
.page-index ul { list-style: none; padding: 0; margin: 0; }
.page-index .index-links { max-height: calc(100dvh - 105px); overflow-y: auto; padding: 4px 8px 4px 0; scrollbar-width: thin; }
.page-index a {
  display: flex; align-items: center; min-height: 44px;
  padding: 10px 12px 10px 16px; border-left: 2px solid #303239;
  color: #b7b8c1; line-height: 1.4; text-decoration: none;
}
.page-index .index-child a { padding-left: 27px; font-size: 13px; }
.page-index a:hover { color: #f1f1f5; background: #17191b; }
.page-index a[aria-current="location"] { color: var(--interface-accent); background: #dcff000a; border-left-color: var(--interface-accent); }
.page-index a:focus-visible, .page-index summary:focus-visible { outline: 2px solid var(--interface-accent); outline-offset: -2px; }
.page-index .index-chevron { width: 18px; height: 18px; flex-shrink: 0; transition: transform .18s ease; }
.page-index[open] .index-chevron { transform: rotate(180deg); }
body.map-open .page-navigation { visibility: hidden; }

main > .intro { padding: 48px 0 56px; border-bottom: 1px solid var(--line); }
.intro h1 { font-size: clamp(56px, 6.5vw, 88px); letter-spacing: -.055em; line-height: 1.02; margin: 20px 0 26px; }
.intro-bottom { display: block; max-width: var(--reading-width); }
.intro-bottom > p { font-size: clamp(23px, 2.1vw, 29px); line-height: 1.35; letter-spacing: -.02em; }
.intro-bottom .edition { display: block; text-align: left; margin-top: 18px; font-size: 12px; }
.approved-copy { max-width: var(--reading-width); font-size: 18px; margin: 28px 0; }
.approved-copy p, .intro .approved-copy p,
.inquiry-content .approved-copy p { font-size: 18px; line-height: 1.55; letter-spacing: normal; color: #d0d0d7; margin: 0 0 1.15em; }
.approved-copy p:last-child { margin-bottom: 0; }
.approved-copy ul { font-size: 18px; line-height: 1.55; color: #d0d0d7; padding-left: 1.25em; margin-bottom: 1.15em; }
.approved-copy li + li { margin-top: .6em; }
.intro .approved-copy .approved-source { font-size: 14px; margin-top: -.65em; margin-bottom: 1.6em; color: #bfc0c9; }
.approved-source a { display: inline-block; padding: 4px 0; text-underline-offset: 4px; }
[data-approved-block="abundance"] { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
main h2[data-step], .approved-copy h2, .inquiry h2, .map-section h2, .next-research > h2, .context h2, .sources-section > h2 {
  font-size: clamp(30px, 3vw, 40px); letter-spacing: -.035em; line-height: 1.15;
  font-weight: 500; margin: 0 0 24px; max-width: 28ch;
}
.approved-copy h3 { font-size: clamp(25px, 2.5vw, 31px); line-height: 1.25; letter-spacing: -.02em; font-weight: 500; margin: 0 0 24px; }
main > .inquiry, main > .map-section, main > .next-research, main > .context, main > .sources-section {
  display: block; padding: 52px 0; border-bottom: 1px solid var(--line);
}
.inquiry > div:first-child { margin-bottom: 24px; }
.inquiry > div:first-child > .eyebrow, .map-section .section-heading .eyebrow, .context .section-heading .eyebrow { display: block; margin-bottom: 13px; color: #b5b5bf; }
.inquiry-content { max-width: var(--reading-width); font-size: 18px; }
.inquiry-content h3 { font-size: 23px; line-height: 1.35; max-width: 44ch; margin-bottom: 26px; }
.inquiry-content > .approved-copy { margin-top: 0; }
.approved-copy .question { padding: 24px 26px; margin: 30px 0; border-left: 2px solid #007bff; background: #17191c; border-radius: 0 6px 6px 0; }
.approved-copy .question .eyebrow { font-size: 12px; letter-spacing: .08em; color: #c3c4ca; }
.inquiry-content .approved-copy .question p { font-size: clamp(21px, 2.1vw, 25px); line-height: 1.4; color: #f4f4f2; margin: 12px 0 0; }
.inquiry-content .micro { font-size: 13px; line-height: 1.5; color: #b2b3bd; }
.section-heading { align-items: flex-start; margin-bottom: 24px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading .quiet-link { margin-top: 8px; }
.map-section > .approved-copy { margin: 0 0 30px; }
.map-section > [data-approved-block="map-relationship"] { margin: 36px 0; padding-top: 32px; border-top: 1px solid var(--line); }
.approved-table-wrap { margin: 24px 0; }
.approved-table { table-layout: fixed; font-size: 17px; line-height: 1.5; color: #d0d0d7; }
.approved-table th, .approved-table td { padding: 15px 12px; overflow-wrap: normal; word-break: normal; }
.approved-table thead { color: #f1f1f4; background: #17191c; }
.approved-table th:first-child { width: 34%; }
.approved-table tbody th { color: #ededf1; }
.map-top button, .search input { min-height: 44px; font-size: 14px; }
.map-top { align-items: center; }
.map-tools { flex-wrap: wrap; }
.map-caption { flex-wrap: wrap; }
.chart-layout { grid-template-columns: minmax(0, 1fr) 250px; }
.expanded .chart-layout { grid-template-columns: minmax(0, 1fr) 300px; }
#inspector { max-height: 520px; }
#inspector p { font-size: 14px; }
.method > summary, .catalogue > summary, .iterations > summary, .sources-disclosure > summary, .proposal-inline > summary { min-height: 52px; font-size: 17px; color: #dddde4; }
.math-method p { font-size: 16px; }
.next-intro, .context-content p, .listening-intro { max-width: var(--reading-width); font-size: 18px; line-height: 1.55; color: #d0d0d7; }
.next-grid { gap: 26px; }
.next-grid p { font-size: 17px; line-height: 1.55; color: #d0d0d7; }
.context-content { margin-left: 0; max-width: var(--reading-width); font-size: 18px; }
.context h3 { font-size: 23px; line-height: 1.3; }
.context-item summary { grid-template-columns: 80px 1fr 24px; }
.bibliography li { font-size: 16px; }
.sources-section > h2 { max-width: none; }
/* The reading outline follows scrolling; keyboard controls keep their own focus indicators. */
.research-layout [data-research-section] { position: relative; scroll-margin-top: 20px; }
.research-layout [data-research-section]:focus { outline: none; }
/* A one-pixel gradient outline keeps the blue transition visible without covering content. */
.research-layout [data-research-section].is-current-section::after {
  content: ""; position: absolute; inset: -6.5px; padding: 1px;
  background: var(--interface-blue-gradient); pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* Run the full cobalt-to-bright-blue transition down each highlight bar. */
.research-layout :is(.question, .equation-panel, .origin-record, .inquiry-focus, .y-note) {
  border-left: 2px solid #007bff;
  border-image: var(--interface-blue-gradient) 1;
}
#inspector, .page-index a[aria-current="location"] { border-image: var(--interface-blue-gradient) 1; }
@media (forced-colors: active) {
  .research-layout [data-research-section].is-current-section { outline: 0.5px solid Highlight; outline-offset: 6px; }
  .research-layout [data-research-section].is-current-section::after { display: none; }
  .research-layout :is(.question, .equation-panel, .origin-record, .inquiry-focus, .y-note),
  #inspector, .page-index a[aria-current="location"] { border-image: none; border-color: Highlight; }
}

@media (max-width: 1200px) {
  .research-layout { width: calc(100% - 4rem); grid-template-columns: 190px minmax(0, 1fr); gap: 32px; }
  .page-index nav { font-size: 13px; }
  .map-shell:not(.expanded) .chart-layout { grid-template-columns: 1fr; }
  .map-shell:not(.expanded) #inspector { border-left: 0; border-top: 1px solid #303039; margin: 0; padding: 24px; max-height: 400px; }
  .map-shell:not(.expanded) .stat-pair { margin: 18px 0; }
  .next-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  html { scroll-padding-top: 84px; }
  .research-layout { display: block; width: calc(100% - 3rem); }
  .page-navigation { top: 0; padding: 0; background: #0b0c0ef7; border-bottom: 1px solid #3c3e44; backdrop-filter: blur(12px); }
  .page-index > summary { display: flex; min-height: 58px; padding: 13px 12px; gap: 20px; color: #ededf1; font-size: 15px; line-height: 1.4; }
  .page-index > summary > span:last-child { font-size: inherit; transform: none; }
  .page-index { position: relative; }
  .page-index nav { position: absolute; top: 100%; left: 0; right: 0; padding: 0 8px 12px; font-size: 15px; background: #0b0c0e; border-bottom: 1px solid #3c3e44; box-shadow: 0 16px 24px #0005; }
  .page-index .index-links { max-height: min(65dvh, 510px); padding: 0; }
  .page-index .index-child a { font-size: 14px; }
  .intro h1 { font-size: clamp(52px, 9vw, 76px); }
  main > .intro { padding-top: 32px; }
  .research-layout [data-research-section] { scroll-margin-top: 14px; }
  .expanded .chart-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .research-layout { width: calc(100% - 2.25rem); }
  main > .intro, main > .inquiry, main > .map-section, main > .next-research, main > .context, main > .sources-section { padding-block: 34px; }
  .approved-copy p, .intro .approved-copy p, .inquiry-content .approved-copy p, .approved-copy ul,
  .next-intro, .context-content p, .listening-intro { font-size: 17px; }
  .approved-copy .question { padding: 20px 18px; }
  .intro-bottom .edition { display: block; }
  main h2[data-step], .approved-copy h2, .inquiry h2, .map-section h2, .next-research > h2, .context h2, .sources-section > h2 { font-size: 30px; letter-spacing: -.025em; }
  .approved-table { font-size: 16px; }
  .approved-table th:first-child { width: 38%; }
  .approved-table th, .approved-table td { padding: 12px 8px; }
  .context-item summary { grid-template-columns: 54px minmax(0, 1fr) 20px; gap: 10px; }
  .context h3 { font-size: 21px; }
  .section-heading .quiet-link { white-space: normal; }
  .map-top { padding: 12px; }
  .search input { min-width: 0; }
  .view-switch button { padding-inline: 12px; }
  .map-caption .count { display: block; flex-basis: 100%; margin-left: 0; }
  .math-method p, .bibliography li { font-size: 16px; }
  .status-line .right { display: block; }
  .status-line { flex-wrap: wrap; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .page-navigation { display: none; }
  .research-layout { display: block; width: 100%; }
}

/* Requested title hierarchy and matching section numbers. */
main h2[data-step], main h3[data-step] { color: var(--interface-green); }
.intro > h2[data-step="01"] { color: var(--interface-accent); }
main h2[data-step] .period { color: inherit; }
[data-approved-block="abundance"] > h3,
[data-approved-block="map-relationship"] > h3,
.inquiry-content > h3 { color: var(--interface-green); }
.intro-bottom > p { color: var(--interface-green); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .intro > h2[data-step="01"], .intro-bottom > p {
    background-image: linear-gradient(135deg, #dcff00 0%, #ccff74 45%, #b2ffd1 100%);
    background-clip: text; -webkit-background-clip: text;
    color: transparent;
  }
}
main h1[data-step]::before, main h2[data-step]::before, main h3[data-step]::before {
  content: attr(data-step);
  display: inline-block; margin-right: 14px;
  font: 500 12px/1 Arial, sans-serif; font-variant-numeric: tabular-nums;
  letter-spacing: .06em; color: var(--interface-blue); vertical-align: middle;
}
.page-index a[data-step]::before, .page-index-current[data-step]::before {
  content: attr(data-step);
  display: inline-block; min-width: 1.7em; margin-right: 8px;
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--interface-blue); flex-shrink: 0;
}
.page-index .index-child a { padding-left: 27px; }
.page-index .index-child a::before { min-width: 2.5em; }
.page-index a[aria-current="location"]::before { color: var(--interface-blue); }

/* The map keeps its coordinates and mark shapes; only the palette changes. */
.map-section .pastel { background: linear-gradient(100deg, #dcff00, #b2ffd1); box-shadow: 0 0 7px #dcff0040; }
.map-section .bright, .map-section .record-row .bright { background: var(--interface-blue); box-shadow: 0 0 8px #a6e3ff60; }
.map-section .score, .map-section .equation, .map-section .math-method td { color: var(--interface-blue); }
.map-section .mark .point { filter: drop-shadow(0 0 2px #b2ffd130); }
.map-section .mark:has(path) .point { filter: drop-shadow(0 0 3px #a6e3ff60); }
.map-section .mark:hover, .map-section .mark:focus { filter: drop-shadow(0 0 6px #a6e3ff); }
.map-section :is(button, a, summary, input, [role="button"]):focus-visible { outline-color: var(--interface-blue); }
@media (forced-colors: active) {
  .intro > h2[data-step="01"], .intro-bottom > p { background: none; color: CanvasText; }
  main h1[data-step], main h2[data-step], main h3[data-step],
  .intro > h2[data-step="01"],
  [data-approved-block="abundance"] > h3,
  [data-approved-block="map-relationship"] > h3,
  .inquiry-content > h3 { color: CanvasText; }
}
@media print {
  .intro > h2[data-step="01"], .intro-bottom > p { background: none; color: inherit; }
}

/* Page identity sits above the numbered research sections. */
.research-page-title {
  margin: 48px 0 28px;
  font: 600 14px/1.4 Arial, Helvetica, sans-serif;
  letter-spacing: .14em;
  color: var(--interface-blue);
}
.research-layout { row-gap: 0; }
.research-layout > .research-page-title { grid-column: 2; }
.research-layout > .page-navigation { grid-column: 1; grid-row: 2; padding-top: 0; }
.research-layout > main { grid-column: 2; grid-row: 2; }
.research-layout > main > .intro { padding-top: 0; }
main > .research-page-title + .intro { padding-top: 0; }
.intro > h2[data-step] {
  font-size: clamp(30px, 3vw, 40px); font-weight: 500;
  line-height: 1.15; letter-spacing: -.035em; max-width: 28ch;
  margin: 0 0 24px;
}
.intro > h2[data-step] { margin-top: 20px; }
@media (max-width: 960px) {
  .research-page-title { margin-top: 32px; }
  .research-layout > .research-page-title { margin-bottom: 20px; }
  .research-layout > main > .intro { padding-top: 30px; }
}
@media (max-width: 600px) {
  .research-page-title { margin-top: 34px; }
  .intro > h2[data-step] { font-size: 30px; letter-spacing: -.025em; }
}

/* Approved inquiry document-access row and relocated map status. */
#contribution .proposal-links { display:flex; flex-wrap:wrap; align-items:baseline; gap:12px 20px; margin-top:28px; padding-top:20px; border-top:1px solid var(--line); }
#contribution .proposal-links > a { padding-block:4px; text-decoration:underline; text-decoration-color:var(--interface-blue); text-underline-offset:4px; }
#contribution .proposal-links time, #inquiry .proposal-download, #map > .micro { font-size:13px; line-height:1.5; color:#b2b3bd; }
#map > .micro { margin:0 0 20px; }
/* Reserved space for Lightroom documentation. */
#lightroom-documentation {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 24px;
  margin: 28px 0;
  background: #162d38;
  border: 1px solid var(--interface-blue);
  border-radius: 6px;
  text-align: center;
}
#lightroom-documentation > p {
  margin: 0;
  color: var(--interface-blue);
  font-size: 20px;
  font-weight: 500;
}

/* Requested disclosure clarification: Inference only. */
#inference > summary { display:flex; align-items:center; justify-content:space-between; gap:16px; }
#inference > summary .disclosure-action { flex:none; font-size:24px; line-height:1.4; transform:none; color:inherit; }
#inference > summary .disclosure-action span { font:inherit; transform:none; }
#inference:not([open]) .when-open, #inference[open] .when-closed { display:none; }
