/* base.css */
/* Shared design tokens: edit these to restyle the whole site. */
:root {
  --paper: #fafaf8;
  --ink: #20221f;
  --violet: #6b37d9;
  --muted: #61645f;
  --line: #dcddd7;
  --lavender: #f0edf7;
  --mono: "Courier New", monospace;
  --serif: Georgia, "Times New Roman", serif;
  --gutter: 4.5%;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a { color: inherit; text-underline-offset: 5px; }
button { font: inherit; color: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 5px;
}
[hidden] { display: none !important; }
.mono {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .055em;
  line-height: 1.5;
  text-transform: uppercase;
}
p { margin: 0 0 1.1em; }
h2, h3, h4 { text-wrap: balance; }
.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  background: var(--ink);
  color: white;
  padding: 12px 20px;
}
.skip:focus { top: 12px; }
.text-link { color: var(--violet); font-size: .875rem; }
.citation {
  color: var(--violet);
  font: .78em var(--mono);
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}
.citation:hover { text-decoration: underline; }



/* layout.css */
/* Site chrome and the editorial hero. */
.header {
  max-width: 1600px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.back { font-size: .875rem; text-decoration: none; white-space: nowrap; }
.back span { margin-right: 10px; }
.back:hover { color: var(--violet); }
.wordmark {
  font-family: var(--mono);
  font-size: .875rem;
  letter-spacing: .09em;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark > span:first-child {
  color: var(--violet);
  font-size: 1.45rem;
  vertical-align: middle;
  margin-right: 8px;
}
main { max-width: 1600px; margin: auto; }
.hero { padding: 40px var(--gutter) 42px; }
h1 {
  font-family: var(--mono);
  font-size: clamp(2.6rem, 7.8vw, 8rem);
  letter-spacing: -.075em;
  line-height: 1.12;
  margin: 0 0 15px;
  font-weight: 700;
}
.hero-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.7rem);
  line-height: 1.5;
  color: #555750;
  margin: 0;
}
.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 13fr);
  gap: 6%;
  margin-top: 30px;
}
.roots { display: flex; gap: 48px; align-items: flex-start; }
.roots > div { display: flex; flex-direction: column; }
.roots strong { font-family: var(--serif); font-size: 1.9rem; font-weight: 400; }
.root-meaning { font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--muted); }
.hero-description h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.35;
  margin: 0 0 14px;
}
.hero-description p { color: var(--muted); margin: 0 0 16px; max-width: 72ch; }
.hero-description p:last-child { margin-bottom: 0; }
.hero-definition { font-size: .95rem; }
.hero-attribution { color: var(--muted); font-size: .85rem; margin: 18px 0 0; }
.hero-attribution a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.hero-attribution a:hover { color: var(--violet); text-decoration-color: currentColor; }


/* figure.css */
/* Figure 1: distinct structures and reciprocal feedback. */
.research-figure {
  margin: 0 var(--gutter) 60px;
  padding: 16px 18px 12px;
  background: #f0edf5;
  border: 1px solid #e4dfeb;
}
.scale-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.scale-panel {
  border-top: 1px solid #c4b9d4;
  border-bottom: 1px solid #c4b9d4;
  padding: 18px 22px 20px;
  transition: background .2s;
  position: relative;
}
.scale-panel:first-child { border-left: 1px solid #c4b9d4; }
.scale-panel { border-right: 1px solid #c4b9d4; }
.scale-panel.is-interactive { cursor: pointer; }
[data-active="individual"] [data-scale-panel="individual"],
[data-active="relational"] [data-scale-panel="relational"],
[data-active="collective"] [data-scale-panel="collective"] {
  background: #faf9fc;
  box-shadow: inset 0 3px 0 var(--violet);
}
.scale-selector {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 0 19px 0 0;
  border: 0;
  text-align: left;
  background: transparent;
  position: relative;
  cursor: pointer;
}
.scale-selector:disabled { cursor: default; opacity: 1; }
.scale-selector .mono { color: #715889; }
.scale-number { padding-right: 8px; }
.scale-title { display: block; font: 1.08rem/1.35 var(--serif); margin-top: 8px; }
.scale-select-arrow { position: absolute; right: 0; top: 0; color: var(--violet); font-size: 1.3rem; }
.scale-selector:hover .scale-title { color: var(--violet); }
.scale-selector[aria-pressed="true"] .scale-select-arrow { transform: rotate(45deg); }
.scale-diagram { display: block; width: 100%; height: auto; margin: 12px auto; overflow: visible; }
.scale-diagram text { font: 12px var(--mono); text-anchor: middle; fill: #655377; }
.agent-boundary { fill: #eae3f5; stroke: #b4a0d0; stroke-width: 1; }
.model-core { fill: var(--violet); }
.scale-diagram .model-name { fill: white; font-size: 20px; font-weight: bold; }
.diagram-link { stroke: #b2a1c8; stroke-width: 1.5; fill: none; }
.flow {
  fill: none;
  stroke: var(--violet);
  stroke-width: 2;
  stroke-dasharray: 4 16;
  animation: signal-travel 5s linear infinite;
  opacity: .32;
}
[data-active="individual"] [data-scale-panel="individual"] .flow,
[data-active="relational"] [data-scale-panel="relational"] .flow,
[data-active="collective"] [data-scale-panel="collective"] .flow { opacity: 1; }
.is-paused .flow { animation-play-state: paused; }
.agent-node { fill: var(--violet); stroke: var(--violet); }
.human-node { fill: var(--paper); stroke: #726086; stroke-width: 2; }
.human-head { fill: #726086; }
.human-body { fill: none; stroke: #726086; stroke-width: 2; }
.scale-diagram .node-letter { fill: white; font-size: 18px; }
.scale-diagram .signal-label { font-size: 11px; fill: #7e6d90; }
.ecology-boundary { fill: #e8e1f2; stroke: #ad96c9; stroke-dasharray: 3 5; }
.institution { fill: #fbf9fe; stroke: #8e70b6; stroke-width: 1.5; }
.scale-diagram .institution-label { fill: #573384; font-size: 13px; }
.scale-diagram .ecology-label { font-size: 11px; }
.scale-description { font-size: .875rem; color: #655b70; line-height: 1.55; margin: 0; }
.ecology-feedback {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  text-align: center;
  padding: 18px 0;
}
.feedback-arrow { color: var(--violet); font: 2.5rem/1 var(--serif); }
.ecology-feedback strong { font-weight: 400; font-family: var(--serif); font-size: 1.1rem; color: #503370; }
.ecology-feedback p { color: #6b5c7a; font-size: .8rem; margin: 5px 0 0; }
@keyframes signal-travel { to { stroke-dashoffset: -100; } }


/* sections.css */
/* Shared section layout. */
.section { padding: 0 var(--gutter) 60px; }
.section-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 13fr); gap: 6%; margin-bottom: 30px; border-top: 1px solid var(--line); padding-top: 26px; }
.section h2 { font-size: clamp(2rem, 3.3vw, 3.2rem); font-weight: 400; line-height: 1.09; letter-spacing: -.04em; margin: 0; }
.intro-copy p { color: var(--muted); }
.lead, .intro-copy .lead { font-family: var(--serif); color: #33362f; font-size: 1.25rem; line-height: 1.5; }
.statement { border-left: 2px solid var(--violet); padding: 5px 0 5px 30px; margin-top: 55px; max-width: 1080px; }
.statement p { font-family: var(--serif); font-size: clamp(1.65rem, 2.6vw, 2.5rem); line-height: 1.4; margin: 0; }
.closing { max-width: 710px; margin: 35px 0 0 auto; color: var(--muted); }

/* Challenges: native details elements, all closed in the initial HTML. */
.challenge { border-top: 1px solid var(--line); }
.challenge:last-child { border-bottom: 1px solid var(--line); }
.challenge summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 65px 1fr 30px;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
}
.challenge summary::-webkit-details-marker { display: none; }
.challenge-number { color: var(--violet); }
.challenge h3 { font-size: 1.1rem; font-weight: 400; line-height: 1.45; margin: 0; text-wrap: initial; }
.expand { font: 1.65rem var(--mono); color: var(--violet); transition: transform .2s; }
.challenge[open] .expand { transform: rotate(45deg); }
.challenge[open] summary h3, .challenge summary:hover h3 { color: var(--violet); }
.challenge-body { margin: 0 45px 26px 85px; max-width: 800px; color: var(--muted); }
.challenge-body .takeaway { font: 1.25rem/1.5 var(--serif); color: var(--ink); border-left: 2px solid var(--violet); padding-left: 20px; }

/* Developmental positive alignment. */
.approach { background: var(--lavender); padding-top: 24px; }
.approach .section-intro { border-color: #d2c8e4; }
.approach-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin: 30px 0 0; }
.approach-card { border-top: 1px solid #c9bfd9; padding-top: 18px; }
.card-symbol { height: 48px; display: flex; justify-content: space-between; color: var(--violet); }
.card-symbol > span { font: 40px/1 var(--serif); }
.card-symbol small { font: 12px var(--mono); color: #78618f; }
.approach-card h3 { font: 1.5rem var(--serif); margin: 6px 0 12px; }
.approach-card p { color: var(--muted); font-size: .95rem; }

/* Disciplines bring the technical and societal questions together. */
.disciplines { background: var(--paper); color: var(--ink); padding-top: 24px; }
.discipline { display: grid; grid-template-columns: 45px 1fr 1.6fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.topic-number { color: var(--violet); padding-top: 8px; }
.discipline h3 { font: 1.6rem/1.3 var(--serif); margin: 0; }
.discipline h4 { font-size: 1rem; font-weight: 400; margin: 0 0 15px; color: var(--ink); }
.discipline p { color: var(--muted); font-size: .95rem; }

/* Document placeholders and contact. */
.join { padding-top: 16px; }
.join .section-intro { grid-template-columns: 1fr; }
.resource-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.resource-card { display: flex; flex-direction: column; padding: 22px 24px; border-right: 1px solid var(--line); }
.resource-card:first-child { padding-left: 0; }
.resource-card:last-child { border-right: 0; }
.resource-card h3 { font: 1.35rem/1.3 var(--serif); margin: 0 0 12px; }
.resource-card p { font-size: .95rem; color: var(--muted); margin-bottom: 18px; }
.resource-pending, .resource-link { font-size: .8rem; margin-top: auto; align-self: flex-start; }
.resource-pending { color: #62665f; border: 1px dashed #aeb0a8; padding: 4px 10px; }
.resource-link { color: var(--violet); padding: 4px 0; }
.contact { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 9%; }
.contact h3 { font: 1.35rem var(--serif); margin: 0 0 15px; }
.contact p { color: var(--muted); max-width: 420px; font-size: .95rem; }
.contact address { font-style: normal; display: flex; flex-direction: column; align-items: flex-start; font-size: .875rem; color: var(--muted); }
.contact-name { font-size: 1.2rem; color: var(--ink); text-decoration: none; margin-bottom: 7px; }
.contact-email { margin-top: 15px; color: var(--violet); overflow-wrap: anywhere; }

/* Reference IDs are generated automatically from the order in the content file. */
.references-header { border-top: 1px solid var(--line); padding-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 9%; }
.references-header h2 { font: 1.6rem/1.2 var(--serif); letter-spacing: -.01em; }
.references-header p { color: var(--muted); font-size: .9rem; }
.references { margin: 22px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 45px; }
.references li { border-top: 1px solid var(--line); scroll-margin-top: 35px; }
.references li:target { background: #eee8f7; outline: 8px solid #eee8f7; }
.references a { display: grid; grid-template-columns: 30px 1fr 18px; gap: 15px; text-decoration: none; padding: 18px 0; }
.ref-id, .ref-arrow { color: var(--violet); }
.references h3 { font-size: 1rem; font-weight: 400; line-height: 1.4; margin: 8px 0; text-wrap: initial; }
.references p { font-size: .875rem; color: var(--muted); margin: 0; }
.references a:hover h3 { color: var(--violet); }


/* Avoid stacked paragraph margins at the end of content blocks. */
.intro-copy > :last-child, .approach-card > :last-child,
.discipline-copy > :last-child, .contact p:last-child { margin-bottom: 0; }

/* A related preprint is distinct from the project's planned outputs. */
.related-publication { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 13fr); gap: 6%; border-top: 1px solid var(--line); padding-top: 24px; }
.related-publication h3 { font: 1.35rem/1.3 var(--serif); margin: 0; }
.related-publication p { margin: 0 0 8px; }
.related-publication .publication-byline, .related-publication .publication-source { color: var(--muted); font-size: .875rem; }
.related-publication .publication-title { font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; }
.related-publication .publication-title a { text-decoration-color: var(--line); }
.related-publication .publication-title a:hover { color: var(--violet); }
.related-publication p:last-child { margin-bottom: 0; }


/* responsive.css */
/* Keep the same reading order on tablets and phones. */
@media (max-width: 1050px) {
  .wordmark-rest { display: none; }
  .hero-bottom, .section-intro { gap: 6%; }
  .roots { gap: 28px; }
  .root-meaning { font-size: .95rem; }
  .scale-panel { padding: 17px 12px; }
  .scale-selector { min-height: 84px; }
  .scale-description { font-size: .82rem; }
  .approach-cards { gap: 25px; }
  .discipline { grid-template-columns: 30px 1fr 1.7fr; gap: 18px; }
  .discipline h3 { font-size: 1.5rem; }
}
@media (max-width: 760px) {
  :root { --gutter: 6%; }
  .header { flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; gap: 15px; }
  .wordmark-rest { display: inline; }
  .header .back { font-size: .8rem; }
  .wordmark { font-size: .72rem; }
  .hero { padding-top: 28px; padding-bottom: 32px; }
  h1 { font-size: 9vw; margin-bottom: 14px; }
  .hero-subtitle { font-size: 1.1rem; }
  .hero-bottom { grid-template-columns: 1fr; gap: 24px; margin-top: 28px; }
  .roots { gap: 45px; }
  .roots strong { font-size: 1.6rem; }
  .hero-description h2 { font-size: 1.3rem; }
  .research-figure { padding: 12px; margin-bottom: 42px; }
  .scale-panels { grid-template-columns: 1fr; gap: 12px; }
  .scale-panel { padding: 18px; border: 1px solid #c4b9d4; }
  .scale-selector { min-height: 65px; }
  .scale-title { font-size: 1.1rem; }
  .scale-diagram { max-width: 310px; margin: 5px auto 15px; }
  .scale-description { font-size: .875rem; }
  .ecology-feedback { gap: 10px; }
  .feedback-arrow { font-size: 1.8rem; }
  .ecology-feedback strong { font-size: 1.1rem; }
  .section { padding-bottom: 44px; }
  .section-intro { grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; padding-top: 22px; }
  .section h2 { font-size: 2rem; }
  .lead, .intro-copy .lead { font-size: 1.16rem; }
  .challenge summary { grid-template-columns: 27px 1fr 18px; gap: 12px; padding: 18px 0; }
  .challenge h3 { font-size: 1rem; }
  .challenge-body { margin: 0 0 25px 39px; font-size: .95rem; }
  .statement { padding-left: 20px; margin-top: 35px; }
  .statement p { font-size: 1.6rem; }
  .approach { padding-top: 20px; }
  .approach-cards { grid-template-columns: 1fr; gap: 22px; margin: 26px 0 0; }
  .card-symbol { height: 44px; }
  .card-symbol > span { font-size: 36px; }
  .approach-card p { font-size: .95rem; }
  .disciplines { padding-top: 20px; }
  .discipline { grid-template-columns: 28px 1fr; gap: 12px; padding: 22px 0; }
  .discipline h3 { font-size: 1.45rem; }
  .discipline-copy { grid-column: 2; margin-top: 10px; }
  .related-publication { grid-template-columns: 1fr; gap: 16px; }
  .join { padding-top: 12px; }
  .resource-cards { grid-template-columns: 1fr; }
  .resource-card, .resource-card:first-child { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 0; }
  .resource-card:last-child { border-bottom: 0; }
  .contact { grid-template-columns: 1fr; gap: 22px; }
  .references-header { grid-template-columns: 1fr; gap: 20px; }
  .references-header h2 { font-size: 1.6rem; }
  .references { grid-template-columns: 1fr; }
  .references a { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .scale-select-arrow, .skip { display: none !important; }
  .section, .hero { padding: 20px 0; }
  .research-figure { margin: 20px 0; }
  .disciplines { background: white; color: black; }
  .disciplines p, .disciplines h4 { color: #333; }
  .flow { animation: none; }
}
