/* Research collection: shared Caltropia shell, page-specific layout. */
:root {
  --blue: #325e91;
  --blue-soft: #eaf0f5;
  --text: #222b36;
  --muted: #586574;
  --research-slate: #829cb7;
  --research-cream: #eae0ce;
  --research-ink: #172533;
  --research-selected: #edf2f7;
}
:root[data-theme="dark"] {
  --bg: #0a0e0f;
  --blue: #b5d4ff;
  --blue-soft: #182433;
  --text: #edf1f7;
  --muted: #d0d9e3;
  --research-selected: #10171e;
}
html { scroll-padding-top: 24px; }
body.research-library { font-size: 16px; line-height: 1.55; }
.research-inner { width: min(1480px, calc(100% - 64px)); margin-inline: auto; }
.research-library #nav-rail:not(.is-expanded) { display: none !important; }
.research-library .site-links { font-size: 14px; }
.research-library #nav-toggle { color: #edf1f7; }
.research-library .site-brand span { font-size: 12px; }
.research-hero { background: #111215; color: #edf1f7; }
[data-theme="dark"] .research-hero { background: var(--panel); }
.research-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 100px); padding-block: 64px 48px; align-items: center; }
.eyebrow { color: var(--blue); font-size: 13px; font-weight: 600; text-transform: uppercase; }
.research-hero .eyebrow { color: #bac7d7; }
.research-intro h1 { font-size: clamp(60px, 5.7vw, 88px); line-height: .98; margin: 25px 0; }
.intro-copy > p { max-width: 490px; color: #d0d9e3; font-size: 18px; line-height: 1.65; }
.intro-index { display: flex; align-items: center; gap: 16px; color: #bac7d7; font-size: 14px; margin-top: 38px; }
.intro-index span:first-child { font: 40px/1 var(--font-display); color: #b5d4ff; }
.intro-index span:last-child { border-left: 1px solid #39434e; padding-left: 16px; }
.research-atlas { --blue: #b5d4ff; --line: #303943; min-width: 0; }
.atlas-heading { display: flex; justify-content: space-between; font-size: 13px; color: #c4cedb; margin-bottom: 8px; }
.atlas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.atlas-choice { border: 0; border-bottom: 1px solid #303943; background: none; color: #c4cedb; padding: 13px 8px 17px; text-align: left; min-width: 0; }
.atlas-choice svg { width: 100%; height: 95px; display: block; opacity: .65; transition: opacity 240ms, transform 300ms; }
.atlas-choice > span { display: flex; gap: 9px; font-size: 13px; align-items: baseline; }
.atlas-choice small { font-size: 11px; opacity: .65; }
.atlas-choice[aria-pressed="true"], .atlas-choice:hover { color: #b5d4ff; border-bottom-color: #b5d4ff; }
.atlas-choice[aria-pressed="true"] svg, .atlas-choice:hover svg { opacity: 1; transform: translateY(-3px); }
.atlas-choice:active { transform: translateY(1px); }
.atlas-choice:focus-visible { outline: 2px solid #b5d4ff; outline-offset: -3px; }
.atlas-caption { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 18px; font-size: 14px; min-height: 64px; }
.atlas-caption span { color: #d0d9e3; }
.atlas-caption a { color: #b5d4ff; display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.research-arrow { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; transition: transform 220ms; }
a:hover > .research-arrow { transform: translate(2px, -2px); }
.research-anchor-nav { display: flex; flex-wrap: wrap; gap: 36px; border-top: 1px solid #303943; }
.research-anchor-nav a { padding: 18px 0; color: #d0d9e3; font-size: 13px; font-weight: 500; }
.research-anchor-nav a:hover { color: #b5d4ff; }
.research-section { padding-block: 64px; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 30px; }
.section-heading h2 { font-size: clamp(34px, 3vw, 44px); margin-top: 10px; }
.section-heading > p { font-size: 14px; color: var(--muted); }
.research-collection { min-width: 0; }
.family-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.family-row { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 18px 16px 20px; text-align: left; border: 0; background: transparent; color: var(--muted); }
.family-row::after { content: ''; position: absolute; bottom: -1px; left: 16px; right: 16px; height: 2px; background: var(--blue); opacity: 0; transform: scaleX(.5); transition: transform 200ms, opacity 200ms; }
.family-row > small { font: 12px/1.5 var(--font-ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.family-row strong { font-size: 16px; line-height: 1.4; font-weight: 500; }
.family-row[aria-pressed="true"], .family-row:hover { color: var(--blue); }
.family-row[aria-pressed="true"]::after { opacity: 1; transform: scaleX(1); }
.family-row:focus-visible { outline-offset: -4px; }
.family-row:active { transform: translateY(1px); }
.research-feature { min-width: 0; padding: 0; }
.feature-body { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; padding: 44px 0 38px; min-height: 390px; align-items: center; }
.feature-copy { min-width: 0; }
.feature-heading { margin-top: 19px; font: 56px/1.05 var(--font-display); color: var(--text); text-transform: uppercase; }
.feature-description { color: var(--muted); margin-top: 20px; max-width: 450px; }
.feature-primary { display: inline-flex; align-items: center; gap: 22px; color: var(--blue); margin-top: 27px; padding-block: 8px; font-weight: 500; }
.feature-primary:hover { text-decoration: underline; text-underline-offset: 5px; }
.feature-figure { margin: 0; min-width: 0; padding: 25px 28px 20px; background: var(--panel); }
.figure-heading { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.figure-heading span:last-child { font-variant-numeric: tabular-nums; }
.feature-figure > svg { width: 100%; height: 205px; display: block; color: var(--blue); margin-top: 15px; }
.feature-figure figcaption { margin-top: 7px; font-size: 11px; color: var(--muted); }
.reading-points { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 14px 0 0; border-top: 1px solid var(--line); margin: 16px 0 0; list-style: none; color: var(--muted); font-size: 12px; }
.reading-points li { display: flex; align-items: center; gap: 7px; }
.reading-points li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--research-slate); }
.feature-links { display: grid; grid-template-columns: 180px 1fr; align-items: start; border-top: 1px solid var(--line); padding-top: 22px; gap: 24px; }
.workspace-label { color: var(--muted); font-size: 12px; padding-top: 3px; }
.workspace-groups { display: flex; flex-wrap: wrap; gap: 28px 60px; min-height: 60px; }
.tool-group { min-width: 130px; }
.tool-group > span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.tool-group > div { display: flex; flex-wrap: wrap; gap: 7px 22px; }
.tool-group a { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 16px; padding-block: 5px; }
.tool-group a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tool-group a .research-arrow { width: 17px; height: 17px; flex-basis: 17px; }
.feature-enter { animation: feature-enter 320ms ease-out; }
@keyframes feature-enter { from { opacity: .25; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.diagram .axis { stroke: var(--line); stroke-width: 1; fill: none; }
.diagram .path { stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.diagram .slate-path { stroke: var(--research-slate); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.diagram .cream-path { stroke: var(--research-cream); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.diagram .blue { fill: var(--blue); }
.diagram .slate { fill: var(--research-slate); }
.diagram .cream { fill: var(--research-cream); }
.diagram .ink { fill: var(--research-ink); }
.diagram .pulse { animation: diagram-pulse 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.diagram .float { animation: diagram-float 5s ease-in-out infinite; }
.diagram .late { animation-delay: -2s; }
@keyframes diagram-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes diagram-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
html.is-idle .diagram *, .motion-off .diagram * { animation-play-state: paused !important; }
.motion-toggle { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: var(--muted); padding: 10px 0; font: inherit; font-size: 13px; }
.motion-toggle svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.question-layout { display: grid; grid-template-columns: .7fr 1.3fr; gap: 70px; }
.question-intro h2 { max-width: 320px; font-size: clamp(36px, 3.4vw, 52px); margin: 15px 0 20px; }
.question-intro p { color: var(--muted); max-width: 290px; }
.question-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 34px; }
.question-link { border-top: 1px solid var(--line); padding: 23px 0; display: grid; grid-template-columns: 1fr 22px; gap: 12px; align-content: start; }
.question-link h3 { font: 500 19px/1.4 var(--font-ui); }
.question-link > span { font-size: 13px; color: var(--muted); grid-column: 1; }
.question-link > svg { grid-column: 2; grid-row: 1; color: var(--blue); margin-top: 3px; }
.question-link:hover h3 { color: var(--blue); }
.research-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 28px; font-size: 13px; color: var(--muted); }
.research-footer .footer-brand { font: 28px/1 var(--font-display); color: var(--text); }
.research-footer > a:last-child { display: flex; align-items: center; gap: 10px; }
.noscript-links { padding: 30px; border: 1px solid var(--line); }
.noscript-links a { display: inline-block; margin: 10px; text-decoration: underline; }
@media (max-width: 1050px) {
  .research-intro { gap: 35px; grid-template-columns: 1fr 1fr; }
  .research-intro h1 { font-size: 62px; }
  .atlas-choice > span { font-size: 12px; gap: 5px; }
  .atlas-caption { align-items: flex-start; flex-direction: column; gap: 7px; }
  .feature-body { gap: 35px; }
  .family-row { padding-inline: 10px; }
  .family-row strong { font-size: 14px; }
  .feature-heading { font-size: 46px; }
  .feature-figure { padding-inline: 20px; }
  .workspace-groups { gap: 25px; }
  .question-layout { gap: 40px; }
}
@media (max-width: 760px) {
  .research-inner, .research-library .site-header-inner { width: calc(100% - 36px); }
  .research-library .site-header-inner { height: 68px; gap: 12px; }
  .research-library .site-brand { font-size: 28px; gap: 12px; }
  .research-library .site-brand span { display: none; }
  .research-library .site-links { gap: 5px; }
  .research-library .site-links > a { display: none; }
  .research-intro { grid-template-columns: 1fr; gap: 40px; padding: 38px 0 30px; }
  .research-intro h1 { font-size: clamp(54px, 12vw, 76px); margin-block: 22px; }
  .intro-copy > p { font-size: 16px; max-width: 460px; }
  .intro-index { margin-top: 24px; }
  .atlas-choice > span { font-size: 13px; }
  .atlas-caption { flex-direction: row; align-items: center; font-size: 13px; }
  .atlas-heading { font-size: 12px; }
  .research-anchor-nav { gap: 16px; justify-content: space-between; }
  .research-anchor-nav a { font-size: 11px; padding: 15px 0; }
  .research-section { padding-block: 42px; }
  .section-heading { display: block; margin-bottom: 23px; }
  .section-heading > p { margin-top: 13px; }
  .family-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 0; }
  .family-row { min-height: 83px; padding: 10px 8px 13px; gap: 5px; }
  .family-row::after { left: 8px; right: 8px; bottom: 0; }
  .family-row strong { font-size: 14px; }
  .family-row > small { font-size: 11px; }
  .feature-body { grid-template-columns: 1fr; gap: 28px; padding-block: 30px; }
  .feature-heading { font-size: 46px; margin-top: 14px; }
  .feature-description { margin-top: 15px; }
  .feature-primary { margin-top: 15px; }
  .feature-figure { padding: 20px; }
  .feature-figure > svg { height: 180px; }
  .reading-points { gap: 8px 12px; font-size: 11px; }
  .feature-links { grid-template-columns: 1fr; gap: 15px; }
  .workspace-groups { gap: 20px 30px; }
  .tool-group { min-width: 0; }
  .question-layout { grid-template-columns: 1fr; gap: 28px; }
  .question-intro h2 { max-width: none; font-size: 42px; }
  .question-intro p { max-width: none; }
  .question-links { gap: 0 24px; }
  .research-footer { flex-wrap: wrap; gap: 17px; }
  .research-footer > span { order: 1; width: 100%; }
}
@media (max-width: 390px) {
  .atlas-choice { padding-inline: 4px; }
  .atlas-choice small { display: none; }
  .atlas-choice > span { font-size: 12px; }
  .atlas-caption { flex-direction: column; align-items: flex-start; }
  .question-links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-toggle { display: none; }
}
