/* EndoLore: Software and Questionnaire pages. Shared pieces come from site.css and page.css. */
  .caveat { margin: 26px 0 0; display: inline-block; padding: 10px 16px 10px 14px; border-left: 3px solid #5a1faf; background: #f3ebff; color: #3a3145; letter-spacing: 0.14em; }

  /* headline adapted for a full research question */
  .software-hero h1 { font-size: clamp(46px, 6.2vw, 94px); max-width: 18ch; }
  .software-hero .lede { max-width: 63ch; }

  /* concise opening lessons, without putting performance figures ahead of the story */
  .software-hero .lede-followup { margin-top: 18px; padding-top: 0; border: 0; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; }
  .hero-findings { margin: 30px 0 0; max-width: 1060px; border-top: 1px solid rgba(27,16,36,0.14); padding-top: 22px; }
  .hero-findings > .mono { display: block; color: #5a1faf; }
  .hero-findings ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; list-style: none; margin: 16px 0 0; padding: 0; counter-reset: lessons; }
  .hero-findings li { position: relative; padding-left: 29px; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 1.65; color: #4a4155; }
  .hero-findings li::before { counter-increment: lessons; content: '0' counter(lessons); position: absolute; left: 0; top: 2px; color: #9959d1; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .06em; }
  .hero-findings li b { display: block; font-weight: 600; color: #22182c; margin-bottom: 3px; }
  .prose .software-reuse-link { font-family: 'Open Sans', sans-serif; font-size: 14px; line-height: 1.65; color: #4a4155; margin: 0 0 28px; }
  .ledger .what b { font-weight: 600; color: #1b1024; }
  @media (max-width: 760px) { .hero-findings ol { grid-template-columns: 1fr; gap: 16px; } }

  /* four numbers under the title */
  .keys { margin: 46px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(27,16,36,0.14); max-width: 1060px; }
  .keys div { padding: 22px 22px 6px 0; }
  .keys div + div { border-left: 1px solid rgba(27,16,36,0.14); padding-left: 22px; }
  .keys b { display: block; font-family: 'Arapey', serif; font-weight: 400; font-size: clamp(34px, 3.6vw, 50px); line-height: 1; color: #5a1faf; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .keys span { display: block; margin-top: 12px; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 1.6; color: #4a4155; }

  /* the question, set apart */
  .prose .question { margin: 1.4em 0 1.6em; padding: 4px 0 4px 20px; border-left: 3px solid #5a1faf; font-family: 'Arapey', serif; font-size: clamp(22px, 2.3vw, 29px); line-height: 1.35; color: #1b1024; max-width: 30ch; }

  /* the questionnaire, the output, the method: a short term + its explanation */
  .spec { margin: 8px 0 30px; max-width: 66ch; }
  .spec p { margin: 0 0 16px; }
  .spec b { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #5a1faf; margin-right: 8px; }

  /* small headings inside a section (page.js lists the ones with an id in the contents) */
  .prose h3 { margin: 2.4em 0 1em; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: #5a1faf; }

  /* a cycle: the letter stays in the margin, as on the Engineering page */
  .cyc .cyc-intro { color: #4a4155; margin-bottom: 1.6em; }
  .dbtl { max-width: 62ch; margin: 0 0 2em; border-top: 1px solid rgba(27,16,36,0.14); }
  .dbtl-row { display: grid; grid-template-columns: 2.1em minmax(0, 1fr); gap: 0 clamp(14px, 1.8vw, 26px); padding: 20px 0; border-bottom: 1px solid rgba(27,16,36,0.10); }
  .dbtl-row:last-child { border-bottom: 0; }
  .dbtl-key { font-family: 'Arapey', serif; font-size: clamp(30px, 3.6vw, 44px); line-height: 0.82; color: #9959d1; text-decoration: none; border: 0; cursor: help; }
  .prose .dbtl-row p { margin: 0; }

  /* figures: drawn in the page itself, nothing loaded from outside */
  .fig { margin: 14px 0 38px; }
  .fig .frame { background: #ffffff; border: 1px solid rgba(27,16,36,0.12); border-radius: 18px; padding: 20px 16px 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; color: #22182c; font-family: 'Open Sans', sans-serif; }
  .fig svg { display: block; width: 100%; min-width: 560px; height: auto; }

  /* what went wrong first, and where the Dry Lab met the outreach team */
  .note { margin: 6px 0 30px; padding: 16px 20px; border-left: 3px solid #9959d1; background: #f3ebff; border-radius: 0 14px 14px 0; max-width: 66ch; }
  .note .mono { display: block; margin-bottom: 8px; color: #5a1faf; }
  .prose .note p { font-size: clamp(17px, 1.45vw, 19px); margin: 0 0 0.7em; }
  .prose .note p:last-child { margin-bottom: 0; }
  .note.link { border-left-color: #b39c12; background: #fbf7c8; }
  .note.link .mono { color: #6b5a00; }

  /* tables */
  .perf-wrap { margin: 8px 0 18px; overflow-x: auto; max-width: 74ch; }
  .perf { width: 100%; min-width: 560px; border-collapse: collapse; font-family: 'Arapey', serif; font-size: 16px; line-height: 1.45; color: #22182c; }
  .perf caption { caption-side: top; text-align: left; padding: 0 0 12px; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 1.6; color: #4a4155; }
  .perf th, .perf td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid rgba(27,16,36,0.12); }
  .perf td { font-family: 'IBM Plex Mono', monospace; font-size: 13.5px; font-variant-numeric: tabular-nums; }
  .perf thead th { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #3a3145; border-bottom-color: rgba(27,16,36,0.3); }
  .perf tbody th { font-weight: 400; }
  .perf .ours { background: #f3ebff; }
  .perf .ours th { color: #5a1faf; }
  .perf .ref-row th, .perf .ref-row td { color: #6b6478; }
  .prose .perf-note { font-family: 'IBM Plex Mono', monospace; font-size: 11px; line-height: 1.6; letter-spacing: 0.06em; color: #6b6478; margin: 0 0 26px; max-width: 74ch; }

  /* numbered lists: lessons, strengths and limits */
  .limits { list-style: none; margin: 8px 0 26px; padding: 0; counter-reset: q; max-width: 66ch; }
  .limits li { padding: 18px 0 18px 52px; position: relative; border-top: 1px solid rgba(27,16,36,0.14); font-family: 'Arapey', serif; font-size: 17.5px; line-height: 1.6; color: #22182c; }
  .limits li::before { counter-increment: q; content: counter(q, decimal-leading-zero); position: absolute; left: 0; top: 22px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.1em; color: #9959d1; }
  .limits li b { font-weight: 400; color: #5a1faf; }

  /* "how to read the numbers": the few words the rest of the page relies on */
  .reader { margin: 12px 0 36px; padding: 22px 26px 24px; background: #ffffff; border: 1px solid rgba(27,16,36,0.14); border-radius: 18px; max-width: 70ch; }
  .reader > .mono { display: block; color: #5a1faf; margin-bottom: 6px; }
  .reader dl { margin: 0; }
  .reader dt { margin: 22px 0 0; font-family: 'Arapey', serif; font-size: 20px; line-height: 1.3; color: #1b1024; }
  .reader .metric-eq { display: block; margin: 9px 0 12px; padding: 10px 12px; background: #f7f1ff; border-radius: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; line-height: 1.65; color: #51238d; white-space: normal; }
  .reader dd { margin: 4px 0 0; font-family: 'Open Sans', sans-serif; font-size: 14.5px; line-height: 1.7; color: #3a3145; }

  /* "in short": one plain sentence under each cycle title */
  .prose .short { margin: -6px 0 1.4em; font-family: 'Open Sans', sans-serif; font-size: 15px; line-height: 1.7; color: #3a3145; max-width: 62ch; }
  .prose .short b { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: #5a1faf; margin-right: 8px; }

  @media (max-width: 860px) {
    .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .keys div:nth-child(3) { border-left: 0; padding-left: 0; }
    .keys div:nth-child(n+3) { border-top: 1px solid rgba(27,16,36,0.14); }
  }
  @media (max-width: 480px) {
    .keys { grid-template-columns: minmax(0, 1fr); }
    .keys div + div { border-left: 0; padding-left: 0; border-top: 1px solid rgba(27,16,36,0.14); }
  }

  /* --- layout for this page: a narrow margin for the section number, a text column that
     always stops before the contents rail on the right, and justified text. --- */
  .prose p, .prose li, .prose dd, .prose figcaption, .ledger .what, .note p, .dbtl-row p, .spec p, .limits li {
    text-align: justify; text-align-last: left; -webkit-hyphens: auto; hyphens: auto; }
  .prose .question, .prose .perf-note, .perf caption { text-align: left; -webkit-hyphens: manual; hyphens: manual; }
  .ledger li { grid-template-columns: 96px minmax(0, 1fr); gap: 6px 18px; }
  .ledger, .dbtl, .limits, .spec, .note, .reader, .perf-wrap { max-width: 68ch; }
  .prose p { max-width: 68ch; }

  @media (min-width: 861px) {
    .sec { grid-template-columns: 128px minmax(0, 1fr); gap: 0 clamp(28px, 3.4vw, 52px); }
    .sec-no { font-size: clamp(52px, 5vw, 76px); }
    .sec-lbl { line-height: 1.6; }
  }
  /* from 1180 px the contents rail is shown, fixed on the right: keep a gutter for it */
  @media (min-width: 1180px) {
    main .wrap { --rail: calc(186px + clamp(14px, 2.2vw, 40px) + 44px);
      max-width: calc(1060px + var(--rail)); padding-right: var(--rail); }
    .toc { background: rgba(255,252,246,0.94); border-radius: 14px; padding: 14px 12px 14px 4px; box-shadow: 0 10px 30px rgba(27,16,36,0.08); }
  }

  /* --- additions: expandable blocks, text tables, notes, recap --- */
  .fold { margin: 14px 0 30px; max-width: 68ch; border: 1px solid rgba(27,16,36,0.14); border-radius: 14px; background: #ffffff; }
  .fold > summary { cursor: pointer; list-style: none; padding: 15px 20px 15px 48px; position: relative; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: #5a1faf; }
  .fold > summary::-webkit-details-marker { display: none; }
  .fold > summary::before { content: '+'; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; line-height: 17px; text-align: center; border: 1px solid #9959d1; border-radius: 50%; font-size: 14px; letter-spacing: 0; }
  .fold[open] > summary::before { content: '\2212'; }
  .fold > summary small { display: block; margin-top: 4px; font-family: 'Open Sans', sans-serif; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 400; color: #4a4155; }
  .fold > summary:focus-visible { outline: 2px solid #5a1faf; outline-offset: 2px; border-radius: 14px; }
  .fold .fold-body { padding: 2px 20px 18px; }
  .fold .fold-body > :first-child { margin-top: 0; }
  .fold.wide { max-width: 100%; }
  .prose .fold h4 { margin: 1.8em 0 0.6em; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: #3a3145; }
  .prose .fold p { font-size: 15.5px; }

  .prose .perf-wrap.wide { max-width: 100%; }
  .perf.txt { min-width: 640px; }
  .perf.txt td, .perf.txt th { font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 1.6; font-variant-numeric: normal; letter-spacing: 0; text-transform: none; }
  .perf.txt thead th { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
  .perf.txt tbody th { font-weight: 600; color: #22182c; }
  .perf.txt td { text-align: left; }
  .perf.txt .tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: #f3ebff; color: #5a1faf; white-space: nowrap; }
  .perf.txt .tag.plan { background: #fbf7c8; color: #6b5a00; }
  .perf.txt .tag.no { background: #eee9f3; color: #5d5568; }

  .note.ethics { border-left-color: #5a1faf; background: #f3ebff; }
  .note.ethics .mono { color: #5a1faf; }
  .prose .note ul { margin: 0 0 0.7em; padding-left: 1.2em; }
  .prose .note li { font-size: clamp(16px, 1.35vw, 18px); margin: 0 0 0.35em; }

  .fig img { display: block; width: 100%; height: auto; border-radius: 8px; }
  .fig .frame.img { padding: 12px; }

  .recap { margin: 8px 0 8px; padding: 0; list-style: none; counter-reset: rc; max-width: 70ch; }
  .recap li { position: relative; padding: 16px 0 16px 52px; border-top: 1px solid rgba(27,16,36,0.14); font-family: 'Arapey', serif; font-size: 18px; line-height: 1.55; color: #22182c; }
  .recap li::before { counter-increment: rc; content: counter(rc, decimal-leading-zero); position: absolute; left: 0; top: 20px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.1em; color: #9959d1; }
  .recap li b { font-weight: 400; color: #5a1faf; }

  .prose pre.code { margin: 8px 0 22px; padding: 14px 18px; max-width: 68ch; overflow-x: auto; background: #1b1024; color: #f3ebff; border-radius: 12px; font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; line-height: 1.7; text-align: left; hyphens: manual; }
  .prose .card-link { display: block; margin: 8px 0 26px; max-width: 68ch; padding: 16px 20px; border: 1px solid rgba(27,16,36,0.14); border-left: 3px solid #5a1faf; border-radius: 0 14px 14px 0; background: #fff; text-decoration: none; color: #22182c; }
  .prose .card-link .mono { display: block; color: #5a1faf; margin-bottom: 4px; }
  .prose .card-link span.t { font-family: 'Arapey', serif; font-size: 21px; line-height: 1.3; display: block; }
  .prose .card-link span.s { font-family: 'Open Sans', sans-serif; font-size: 14px; color: #4a4155; text-align: left; display: block; margin-top: 4px; }
  .qstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 10px 0 26px; max-width: 68ch; border-top: 1px solid rgba(27,16,36,0.14); }
  .qstats div { padding: 16px 14px 6px 0; }
  .qstats div + div { border-left: 1px solid rgba(27,16,36,0.14); padding-left: 14px; }
  .qstats b { display: block; font-family: 'Arapey', serif; font-weight: 400; font-size: clamp(28px, 3vw, 40px); color: #5a1faf; line-height: 1; font-variant-numeric: tabular-nums; }
  .qstats span { display: block; margin-top: 8px; font-family: 'Open Sans', sans-serif; font-size: 12.5px; line-height: 1.5; color: #4a4155; text-align: left; }
  @media (max-width: 640px) { .qstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qstats div:nth-child(3) { border-left: 0; padding-left: 0; } .qstats div:nth-child(n+3) { border-top: 1px solid rgba(27,16,36,0.14); } }
  .prose .fold ul, .prose .fold ol { max-width: 66ch; }

  /* --- round 3: question explorer, simulator, small additions --- */
  .qx { margin: 10px 0 30px; max-width: 100%; }
  .qx-nav { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
  .qx-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 6px; }
  .qx-group > .mono { flex: 0 0 150px; color: #6b6478; font-size: 10px; }
  .qx-btn { font: 500 12.5px/1 'Open Sans', sans-serif; padding: 7px 11px; border-radius: 99px; border: 1px solid rgba(27,16,36,0.18); background: #ffffff; color: #3a3145; cursor: pointer; }
  .qx-btn:hover { border-color: #6d36c8; color: #5a1faf; }
  .qx-btn.is-on { background: #5a1faf; border-color: #5a1faf; color: #ffffff; }
  .qx-btn:focus-visible { outline: 2px solid #5a1faf; outline-offset: 2px; }
  .qx-panel { border: 1px solid rgba(27,16,36,0.12); border-radius: 18px; background: #ffffff; padding: 18px 20px 14px; margin-bottom: 16px; }
  .qx-panel h4 { margin: 0 0 4px; font-family: 'Arapey', serif; font-weight: 400; font-size: 22px; color: #1b1024; }
  .qx-panel h4 .mono { font-size: 11px; color: #9959d1; margin-right: 8px; vertical-align: middle; }
  .prose .qx-panel .qx-ask { margin: 0 0 10px; font-family: 'Open Sans', sans-serif; font-size: 13.5px; color: #6b6478; font-style: italic; }
  .qx-panel .frame { overflow-x: auto; }
  .qx-panel svg { display: block; width: 100%; max-width: 640px; min-width: 480px; height: auto; }
  .prose .qx-panel .qx-insight { margin: 8px 0 0; font-size: clamp(16px, 1.35vw, 18px); max-width: 68ch; }
  @media (max-width: 640px) { .qx-group > .mono { flex-basis: 100%; } }

  .sim { margin: 14px 0 34px; padding: 20px 22px 18px; border: 1px solid rgba(27,16,36,0.14); border-radius: 18px; background: #ffffff; }
  .sim > .mono { display: block; color: #5a1faf; margin-bottom: 6px; }
  .sim-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 22px; margin: 10px 0 12px; }
  .sim fieldset { border: 0; margin: 0; padding: 0; }
  .sim legend { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #6b6478; margin-bottom: 6px; }
  .sim label { display: block; font-family: 'Open Sans', sans-serif; font-size: 13.5px; line-height: 1.5; color: #22182c; cursor: pointer; }
  .sim input[type=radio] { accent-color: #5a1faf; margin-right: 6px; }
  .sim input[type=range] { width: 100%; accent-color: #5a1faf; }
  .sim .sim-level { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #5a1faf; margin-left: 6px; }
  .sim-chart { overflow-x: auto; }
  .sim-chart svg { display: block; width: 100%; max-width: 640px; min-width: 480px; height: auto; color: #22182c; }
  .prose .sim .sim-readout { margin: 8px 0 6px; font-family: 'Open Sans', sans-serif; font-size: 14.5px; line-height: 1.65; color: #22182c; max-width: 70ch; text-align: left; }
  .prose .sim .sim-note { margin: 6px 0 0; font-family: 'Open Sans', sans-serif; font-size: 12.5px; line-height: 1.6; color: #6b6478; text-align: left; }

  .prose code { overflow-wrap: anywhere; }
  .fig .duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 18px; }
  .fig .duo svg { min-width: 0; }
  .prose pre.code { max-width: 100%; }
  .prose p.left { text-align: left; }

/* Compact navigation for the six software research cycles. */
@media (min-width:1180px) {
  .toc-software { max-height:74vh; width:190px; }
  .toc-software .toc-cycle { display:inline-block; margin:3px 2px !important; vertical-align:top; }
  .toc-software .toc-cycle > a { display:flex; justify-content:center; align-items:center; width:32px; height:34px; padding:0; border:1px solid #dcc9ef; border-radius:8px; background:#faf6ff; }
  .toc-software .toc-cycle.is-active > a { background:#5a1faf; border-color:#5a1faf; color:#fff; }
  .toc-software .toc-cycle .l, .toc-software .toc-cycle .subs { display:none !important; }
  .toc-software .toc-cycle .n { font-size:13px; color:#5a1faf; }
  .toc-software .toc-cycle.is-active .n { color:white; }
}
.metric-eq math { font-size:1.1rem; line-height:1.6; margin:15px auto; max-width:100%; overflow-x:auto; }
.australia-study { margin:2.5rem 0; padding-top:14px; border-top:1px solid #e3d8ea; }
.australia-fig .frame img { display:block; width:100%; height:auto; object-fit:contain; border-radius:8px; }
.future-note { margin:14px 0 28px; padding:12px 17px; border-left:3px solid #9959d1; background:#f9f5ff; }
.sim-presets { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:10px 0 18px; }
.sim-presets .mono { width:100%; font-size:10px; letter-spacing:.16em; }
.sim-presets button { font-family:'Open Sans',sans-serif; border:1px solid #dfccef; border-radius:20px; background:#faf7ff; color:#492979; padding:8px 12px; font-size:12px; cursor:pointer; }
.sim-presets button:hover, .sim-presets button:focus-visible { background:#5a1faf; color:#fff; }
.sim-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:12px 0; }
.sim-metrics > div { padding:12px 13px; border:1px solid #eee4f3; border-radius:10px; background:#faf7fd; }
.sim-metrics span { font:11px/1.5 'Open Sans',sans-serif; color:#625870; display:block; }
.sim-metrics strong { display:block; margin-top:5px; font:normal 28px/1.1 'Arapey',serif; color:#5a1faf; }
.sim-people { margin:20px 0 12px; padding-top:15px; border-top:1px solid #e9dfef; }
.sim-people-header b { display:block; font:600 14px/1.5 'Open Sans',sans-serif; }
.sim-people-header span { display:block; font:12px/1.6 'Open Sans',sans-serif; color:#625870; }
.sim-legend { display:flex; flex-wrap:wrap; gap:12px; margin:14px 0; }
.sim-key { font:11px/1.5 'Open Sans',sans-serif; color:#3a3145; }
.sim-key:before { content:''; display:inline-block; width:10px;height:10px;border-radius:3px; margin-right:6px; }
.key-actual:before { background:#5a1faf; } .key-moved:before { background:#e89533; } .key-control:before { background:#e8daf6; }
.sim-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:5px; }
.sim-grid button { position:relative; border:1px solid #d2c4db; border-radius:5px; min-height:21px; min-width:0; cursor:pointer; background:#e8daf6; }
.sim-grid button[data-status=positive] { background:#5a1faf; } .sim-grid button[data-status=moved] { background:#e89533; }
.sim-grid button:focus-visible { outline:2px solid #292034; outline-offset:2px; }
.prose .sim-person-readout { min-height:38px; margin:12px 0 2px; font:12.5px/1.6 'Open Sans',sans-serif; color:#4a4155; }
.q-donut-row { display:flex; align-items:center; gap:28px; flex-wrap:wrap; }
.q-donut-row svg { flex:0 0 220px; max-width:220px; }
.q-donut-total { fill:#372344; font:normal 49px 'Arapey',serif; }
.q-donut-label { fill:#6b5877; font:11px 'Open Sans',sans-serif; }
.q-donut-legend { flex:1; min-width:240px; }
.q-donut-legend p { display:block; margin:7px 0 15px; }
.q-donut-legend .dot { display:inline-block; width:12px;height:12px;border-radius:50%;margin-right:8px; }
.q-donut-legend .diag { background:#5a1faf; } .q-donut-legend .undiag { background:#e8daf6; }
.q-donut-legend b { font:normal 28px/1 'Arapey',serif;color:#5a1faf;margin-right:6px; }
.q-donut-legend small {display:block;margin-left:21px;color:#817488;font-size:11px;}
.q-donut-legend .q-legend-note {font-size:12px;line-height:1.6;color:#73637d;}
.q-demographic {max-width:70ch;margin:10px 0 26px;padding:12px 10px;}
.q-demographic figcaption {font:12px/1.6 'Open Sans',sans-serif;color:#746878;margin:5px 0 0;}
.q-thanks {margin:80px auto 70px;max-width:min(1100px,calc(100% - 40px));padding:clamp(45px,7vw,90px);background:#3e1779;border-radius:32px;color:#fff;text-align:center;}
.q-thanks .mono {color:#dbc3ff;text-transform:uppercase;letter-spacing:.24em;font-size:11px;}
.q-thanks h2 {font:normal clamp(42px,6.7vw,86px)/1.05 'Arapey',serif; margin:25px auto 34px;max-width:16ch;}
.q-thanks h2 em {font-weight:400;color:#e8cbff;}
.q-thanks p {font:normal clamp(17px,1.9vw,23px)/1.65 'Arapey',serif;max-width:64ch;margin:16px auto;color:#f7f1ff;}
.q-thanks .q-thanks-signature {margin:35px auto 0;color:#dccaff;font:11px/1.6 'IBM Plex Mono',monospace;letter-spacing:.08em;}
@media (max-width:650px) {.sim-grid {grid-template-columns:repeat(9,minmax(0,1fr));}.sim-metrics{grid-template-columns:1fr;}.q-thanks{border-radius:22px;}}

/* The privacy note uses the same reading rhythm throughout. */
.prose .note.ethics p, .prose .note.ethics li { font: 400 clamp(16px, 1.35vw, 18px)/1.7 'Open Sans', sans-serif; text-align: left; margin-bottom: .65em; }
.prose .note.ethics b, .prose .note.ethics strong { font-weight: 500; }
.note.ethics .mono { font-size: 10px; letter-spacing: .08em; line-height: 1.6; }

/* Give the two research-resource headings a clear reading hierarchy. */
.research-digest > summary { font: 500 clamp(18px, 1.8vw, 22px)/1.45 'Open Sans', sans-serif; letter-spacing: 0; text-transform: none; background: #f3ebff; border-radius: 14px; }
.research-digest > summary small { font-size: 16px; line-height: 1.6; margin-top: 8px; }
