/* ===== Page-specific composition ===== */

/* ---------- Home hero ---------- */
.hero { padding-block: var(--space-8) var(--space-8); position: relative; overflow: hidden; }
.hero::before {
  /* faint engineering grid, fades out to the right */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0) 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0) 85%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-7); align-items: center; }
.hero-copy { display: grid; gap: var(--space-5); }
.hero h1 { max-width: 16ch; }
.hero h1 .accent { color: var(--red); }
.hero .lede { max-width: 52ch; }
.hero-principle {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
.hero-principle b { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
@media (max-width: 1024px) { .hero-grid { grid-template-columns: 1fr; } .hero h1 { max-width: 20ch; } }

/* ---------- Questions grid ---------- */
.questions { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.questions li { padding: var(--space-4) var(--space-5); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: var(--fs-sm); color: var(--fg-2); min-width: 0; }
.questions li b { display: block; font-family: var(--font-display); font-size: var(--fs-md); color: var(--fg); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 860px) { .questions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .questions { grid-template-columns: 1fr; } }

/* ---------- Mode cards ---------- */
.mode {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  min-width: 0;
}
.mode h3 { font-size: var(--fs-2xl); }
.mode .q { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--fg); font-weight: 500; line-height: 1.35; border-left: 2px solid var(--red); padding-left: var(--space-4); }
.mode-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- Benefits ---------- */
.benefit h3 { display: flex; align-items: center; gap: 10px; }
.benefit h3 .cat-dot { width: 10px; height: 10px; }

/* ---------- Core message band ---------- */
.message-band { padding-block: var(--space-9); }
.message-band .statement { color: var(--bg); max-width: 26ch; }
.message-band .statement em { color: #ff6b70; }
.message-band p { margin-top: var(--space-5); max-width: 58ch; }
.message-band .eyebrow { color: color-mix(in srgb, var(--bg) 60%, var(--fg)); }

/* ---------- Loop diagram ---------- */
.loop-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); align-items: center; }
@media (max-width: 900px) { .loop-wrap { grid-template-columns: 1fr; } }
.loop-svg { max-width: 460px; margin-inline: auto; width: 100%; }
.loop-svg text { font-family: var(--font-body); font-size: 13px; font-weight: 600; fill: var(--fg); }
.loop-svg .ring { fill: none; stroke: var(--rule-strong); stroke-width: 1.2; }
.loop-svg .arc { fill: none; stroke: var(--red); stroke-width: 2; }
.loop-svg .node { fill: var(--bg-raised); stroke: var(--fg); stroke-width: 1.5; }
.loop-svg .node--offline { stroke: var(--blue); }
.loop-svg .node--online { stroke: var(--orange); }
.loop-svg .center-t { font-family: var(--font-logo); font-size: 26px; font-weight: 400; fill: var(--red); }
.loop-svg .center-s { font-family: var(--font-mono); font-size: 10px; fill: var(--fg-3); font-weight: 400; letter-spacing: 0.08em; }

/* ---------- Online live panel ---------- */
.live-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 50%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.reco {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}
.reco-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.reco dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-5); }
.reco dt { font-size: var(--fs-xs); color: var(--fg-3); }
.reco dd { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--fg); }
@media (max-width: 520px) { .reco dl { grid-template-columns: 1fr; } }

.autonomy { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.autonomy li { padding: var(--space-5); border-right: 1px solid var(--rule); background: var(--bg-raised); min-width: 0; }
.autonomy li:last-child { border-right: none; }
.autonomy li b { display: block; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); font-weight: 500; letter-spacing: 0.06em; }
.autonomy li h3 { font-size: var(--fs-md); margin: 8px 0 6px; }
.autonomy li p { font-size: var(--fs-sm); }
.autonomy li.is-now { background: var(--red-soft); }
.autonomy li.is-now b { color: var(--red-ink); }
.autonomy li.is-later { background: var(--bg-sunk); }
.autonomy li.is-later h3, .autonomy li.is-later p { color: var(--fg-3); }
@media (max-width: 900px) { .autonomy { grid-template-columns: 1fr 1fr; } .autonomy li:nth-child(2) { border-right: none; } .autonomy li:nth-child(-n+2) { border-bottom: 1px solid var(--rule); } }
@media (max-width: 520px) { .autonomy { grid-template-columns: 1fr; } .autonomy li { border-right: none; border-bottom: 1px solid var(--rule); } }

/* ---------- Library loop strip ---------- */
.lib-loop { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--space-3); align-items: stretch; }
.lib-loop .arrow { align-self: center; font-family: var(--font-mono); color: var(--fg-3); }
@media (max-width: 860px) { .lib-loop { grid-template-columns: 1fr; } .lib-loop .arrow { transform: rotate(90deg); justify-self: center; } }

/* ---------- How it works steps ---------- */
.hiw-step {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-6);
  padding-block: var(--space-7);
  border-top: 1px solid var(--rule);
  align-items: start;
}
.hiw-step:last-child { border-bottom: 1px solid var(--rule); }
.hiw-n { font-family: var(--font-mono); font-size: var(--fs-3xl); color: var(--rule-strong); line-height: 1; font-weight: 400; }
.hiw-step h3 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.hiw-step .q { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--red-ink); letter-spacing: 0.04em; margin-bottom: var(--space-3); display: block; }
@media (max-width: 960px) { .hiw-step { grid-template-columns: 1fr; gap: var(--space-4); } .hiw-n { font-size: var(--fs-2xl); } }

/* ---------- Application domains ---------- */
.domain { display: grid; gap: var(--space-3); align-content: start; }
.domain h3 { font-size: var(--fs-lg); }
.domain dl { display: grid; gap: var(--space-3); margin: 0; }
.domain dt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.domain dd { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--fg-2); }

/* ---------- Research themes ---------- */
.theme { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-5) 0; border-top: 1px solid var(--rule); }
.theme .t-n { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--red); }
.theme h3 { font-size: var(--fs-lg); margin-bottom: 6px; }
.theme .rq { font-family: var(--font-display); font-style: italic; color: var(--fg); font-size: var(--fs-md); margin-bottom: 8px; max-width: 60ch; }
.theme p { font-size: var(--fs-sm); }

/* ---------- Roadmap ---------- */
.roadmap { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); position: relative; }
.roadmap li { padding-top: var(--space-5); border-top: 2px solid var(--rule-strong); position: relative; min-width: 0; }
.roadmap li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--rule-strong); }
.roadmap li.is-now { border-top-color: var(--red); }
.roadmap li.is-now::before { border-color: var(--red); background: var(--red); }
.roadmap b { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); font-weight: 500; letter-spacing: 0.08em; }
.roadmap h3 { font-size: var(--fs-lg); margin: 6px 0 8px; }
.roadmap p { font-size: var(--fs-sm); }
@media (max-width: 900px) { .roadmap { grid-template-columns: 1fr 1fr; row-gap: var(--space-6); } }
@media (max-width: 520px) { .roadmap { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-7); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.hiw-step > * { min-width: 0; }

/* ---------- Planned papers ---------- */
.papers { display: grid; gap: var(--space-6); }
.paper-wave h3 { margin-bottom: var(--space-3); }
.paper-wave ol { list-style: none; border-top: 1px solid var(--rule); }
.paper-wave li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--space-4); align-items: start; padding: var(--space-4) 0; border-bottom: 1px solid var(--rule); }
.paper-wave .p-id { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--red); padding-top: 2px; }
.paper-wave .p-title { color: var(--fg); font-weight: 500; font-size: var(--fs-md); line-height: 1.45; }
.paper-wave .p-kind { display: block; margin-top: 4px; font-size: var(--fs-xs); color: var(--fg-3); }
@media (max-width: 520px) { .paper-wave li { grid-template-columns: 36px minmax(0, 1fr); } .paper-wave li .tag { grid-column: 2; justify-self: start; } }

/* ---------- Support FAQ ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: var(--space-4) 0; font-weight: 600; color: var(--fg); display: flex; justify-content: space-between; gap: var(--space-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--fg-3); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: var(--space-4); max-width: 70ch; }

/* ---------- v03 (Kofi's notes, 2026-11-14) ---------- */
/* Hero label stays on one row: it scales with the column width. */
.hero-copy { container-type: inline-size; }
.hero-eyebrow { white-space: nowrap; letter-spacing: 0.06em; font-size: min(var(--fs-xs), calc((100cqi - 28px) / 42)); }
@media (max-width: 560px) {
  .hero-eyebrow { letter-spacing: 0; font-size: min(var(--fs-xs), calc(100cqi / 38.5)); }
  .hero-eyebrow::before { display: none; }
}

/* Nine questions as a colour-coded diagram */
.q-diagram { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); counter-reset: q; }
.q-diagram li {
  position: relative; min-width: 0;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--space-3); row-gap: 2px; align-items: start;
  padding: var(--space-4); border-radius: var(--radius);
  background: color-mix(in srgb, var(--c) 9%, var(--bg-raised));
  border: 1px solid color-mix(in srgb, var(--c) 28%, var(--rule));
  border-top: 4px solid var(--c);
  font-size: var(--fs-sm); color: var(--fg-2); line-height: 1.45;
  transition: transform .18s ease, box-shadow .18s ease;
}
.q-diagram li:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.q-ico { grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--bg-raised); }
.q-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.q-n { position: absolute; top: 8px; right: 10px; font-family: var(--font-mono); font-size: 0.7rem; color: color-mix(in srgb, var(--c) 70%, var(--fg-3)); }
.q-diagram b { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 650; color: var(--c); padding-right: 18px; }
@media (max-width: 1024px) { .q-diagram { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .q-diagram { grid-template-columns: 1fr; } }

/* Ecosystem in colour */
.eco-node[style*="--c"] {
  background: color-mix(in srgb, var(--c) 9%, var(--bg-raised));
  border-color: color-mix(in srgb, var(--c) 30%, var(--rule));
  border-top: 4px solid var(--c);
}
.eco-node[style*="--c"] .eco-k { color: var(--c); font-weight: 500; }
.eco-node[style*="--c"] h3 { color: color-mix(in srgb, var(--c) 55%, var(--fg)); }
.eco-core { background: linear-gradient(135deg, var(--fg), color-mix(in srgb, var(--red) 30%, var(--fg))); box-shadow: var(--shadow-2); }
.eco-lines line { stroke-width: 2; stroke-dasharray: 5 5; }
@media (max-width: 860px) { .eco-node[style*="--c"]:not(.eco-core) { border-left: 1px solid color-mix(in srgb, var(--c) 30%, var(--rule)); } }

/* CTA email box */
.cta-form { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.cta-form input { flex: 1 1 240px; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--bg-raised); color: var(--fg); font: inherit; }
.cta-form input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
@media (max-width: 760px) { .cta-form .btn { flex: 1 1 100%; } }

/* Two-line statement headings: one phrase per line */
.h2-lines { font-size: clamp(1.55rem, 1.05rem + 1.5vw, 2.35rem); }
.h2-lines span { display: block; }
.cta-band { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- v04 (Kofi's notes, 2026-11-14) ---------- */
/* Nine questions as a connected flow beneath the heading */
.q-flow { list-style: none; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: var(--space-3); position: relative; margin-top: calc(-1 * var(--space-3)); }
.q-flow::before {
  content: ""; position: absolute; left: 5.5%; right: 5.5%; top: 52px; height: 4px; border-radius: 2px; z-index: 0;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--purple), var(--orange), var(--teal), var(--red), var(--indigo), var(--gold), var(--magenta));
  opacity: .55;
}
.q-flow li { position: relative; z-index: 1; display: grid; justify-items: center; align-content: start; text-align: center; gap: 6px; min-width: 0; }
.qf-n { font-family: var(--font-mono); font-size: 0.72rem; color: var(--c); letter-spacing: 0.06em; height: 18px; }
.qf-ico {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: var(--bg-raised);
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px color-mix(in srgb, var(--c) 35%, transparent), var(--shadow-2);
  transition: transform .18s ease;
}
.q-flow li:hover .qf-ico { transform: scale(1.08); }
.qf-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.q-flow b { margin-top: 8px; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 650; color: var(--c); line-height: 1.2; }
.qf-t { font-size: var(--fs-sm); color: var(--fg-2); line-height: 1.4; }
@media (max-width: 1100px) {
  .q-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-6); margin-top: 0; }
  .q-flow::before { display: none; }
}
@media (max-width: 600px) {
  .q-flow { grid-template-columns: 1fr; row-gap: var(--space-4); }
  .q-flow::before { display: block; left: 29px; right: auto; top: 30px; bottom: 30px; width: 4px; height: auto; background: linear-gradient(180deg, var(--blue), var(--green), var(--purple), var(--orange), var(--teal), var(--red), var(--indigo), var(--gold), var(--magenta)); }
  .q-flow li { grid-template-columns: 60px minmax(0, 1fr); grid-template-rows: auto auto; justify-items: start; text-align: left; column-gap: var(--space-4); row-gap: 2px; align-items: center; }
  .qf-n { display: none; }
  .qf-ico { grid-row: 1 / span 2; }
  .q-flow b { margin-top: 0; align-self: end; }
  .qf-t { align-self: start; }
}

/* Ecosystem as a honeycomb: core in the middle, modules around it */
.hexes { container-type: inline-size; position: relative; width: 100%; max-width: 640px; margin-inline: auto; aspect-ratio: 100 / 95.7; }
.hex {
  --w: 31.5cqi; --h: calc(var(--w) * 1.1547); --dx: 0cqi; --dy: 0cqi;
  position: absolute; width: var(--w); height: var(--h);
  left: calc(50cqi + var(--dx) - var(--w) / 2); top: calc(47.85cqi + var(--dy) - var(--h) / 2);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--c);
  transition: transform .2s ease, filter .2s ease;
}
.hex:not(.hex--ghost):hover { transform: scale(1.04); filter: drop-shadow(0 8px 16px rgba(0,0,0,.18)); z-index: 2; }
.hex-in {
  position: absolute; inset: 4px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: color-mix(in srgb, var(--c) 12%, var(--bg-raised));
  display: grid; align-content: center; justify-items: center; text-align: center; gap: 0.6cqi;
  padding: 0 14%;
}
.hex-k { font-family: var(--font-mono); font-size: clamp(9px, 1.7cqi, 11px); letter-spacing: .08em; text-transform: uppercase; color: var(--c); font-weight: 500; }
.hex h3 { font-size: clamp(12px, 2.5cqi, 15.5px); line-height: 1.2; color: color-mix(in srgb, var(--c) 55%, var(--fg)); }
.hex p { font-size: clamp(10px, 1.95cqi, 12.5px); line-height: 1.35; color: var(--fg-2); }
.hex--c .hex-in { background: linear-gradient(150deg, var(--fg), color-mix(in srgb, var(--red) 35%, var(--fg))); }
.hex--c h3 { color: var(--bg); font-size: clamp(12px, 2.45cqi, 15.5px); }
.hex--c p { color: color-mix(in srgb, var(--bg) 75%, var(--fg)); }
.hex--c .hex-k { color: color-mix(in srgb, var(--red) 70%, var(--bg)); }
.hex--r  { --dx: 34.25cqi; }
.hex--l  { --dx: -34.25cqi; }
.hex--ur { --dx: 17.125cqi;  --dy: -29.66cqi; }
.hex--ul { --dx: -17.125cqi; --dy: -29.66cqi; }
.hex--lr { --dx: 17.125cqi;  --dy: 29.66cqi; }
.hex--ll { --dx: -17.125cqi; --dy: 29.66cqi; }
.hex--ghost { background: var(--rule-strong); opacity: .55; }
.hex--ghost .hex-in { background: repeating-linear-gradient(135deg, var(--bg-sunk) 0 6px, var(--bg-inset) 6px 12px); }
/* Phones: the honeycomb is too small to read, so modules stack with a hexagon marker */
@media (max-width: 600px) {
  .hexes { aspect-ratio: auto; display: grid; gap: var(--space-3); max-width: none; }
  .hex { position: relative; left: auto; top: auto; width: auto; height: auto; clip-path: none; background: none; }
  .hex--ghost { display: none; }
  .hex-in { position: relative; inset: auto; clip-path: none; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--rule)); padding: var(--space-4) var(--space-4) var(--space-4) 64px; justify-items: start; text-align: left; gap: 2px; }
  .hex-in::before { content: ""; position: absolute; left: 16px; top: 50%; width: 32px; height: 37px; transform: translateY(-50%); background: var(--c); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
  .hex--c .hex-in::before { background: var(--red); }
  .hex-k { font-size: 0.68rem; } .hex h3 { font-size: var(--fs-md); } .hex--c h3 { font-size: var(--fs-md); } .hex p { font-size: var(--fs-sm); }
}
.hex--c .hex-in { padding: 0 16%; }
.hex--c p { font-size: clamp(9.5px, 1.8cqi, 12px); }
@media (max-width: 600px) { .hex--c .hex-in { padding: var(--space-4) var(--space-4) var(--space-4) 64px; } .hex--c p { font-size: var(--fs-sm); } }

/* ---------- v05: questions flow in one accent (Kofi: too colourful) ---------- */
.q-flow li { --c: var(--red); }
.q-flow::before { background: var(--rule-strong); opacity: 1; height: 2px; top: 53px; }
.qf-n { color: var(--fg-3); }
.qf-ico { background: var(--bg-raised); color: var(--red); box-shadow: 0 0 0 1.5px var(--rule-strong), 0 0 0 7px var(--bg), var(--shadow-1); }
.q-flow li:hover .qf-ico { background: var(--red); color: #fff; box-shadow: 0 0 0 1.5px var(--red), 0 0 0 7px var(--bg), var(--shadow-2); }
.q-flow b { color: var(--fg); }
@media (max-width: 600px) { .q-flow::before { background: var(--rule-strong); width: 2px; left: 30px; } }

/* ---------- v05: Ecosystem ring (Kofi's reference infographic) ---------- */
.eco-ring { container-type: inline-size; position: relative; width: 100%; max-width: 760px; margin-inline: auto; aspect-ratio: 1; }
.er-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.er-seg { fill: color-mix(in srgb, var(--c) 6%, var(--bg-raised)); stroke: var(--c); stroke-width: 7; stroke-linejoin: round; transition: fill .2s; }
.er-hub { fill: var(--bg-raised); stroke: var(--rule-strong); stroke-width: 2; stroke-dasharray: 6 7; }
.er-arrow { fill: var(--teal); }
.er-badge circle { fill: var(--c); stroke: var(--bg-sunk); stroke-width: 7; }
.er-badge text { fill: #fff; font-family: var(--font-display); font-weight: 700; font-size: 30px; text-anchor: middle; }
.er-item, .er-core {
  position: absolute; transform: translate(-50%, -50%);
  display: grid; justify-items: center; text-align: center; gap: 0.5cqi;
}
.er-item { width: 20.5cqi; }
.er-core { left: 50%; top: 50%; width: 29cqi; }
.er-ico { width: 4.4cqi; height: 4.4cqi; min-width: 22px; min-height: 22px; color: var(--c); margin-bottom: 0.4cqi; }
.er-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.er-k { font-family: var(--font-mono); font-size: clamp(9px, 1.35cqi, 11px); letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.eco-ring h3 { font-size: clamp(12px, 2.05cqi, 16px); line-height: 1.2; color: var(--fg); text-transform: uppercase; letter-spacing: .01em; }
.eco-ring p { font-size: clamp(10px, 1.55cqi, 12.5px); line-height: 1.38; color: var(--fg-2); }
.er-core { --c: var(--red); }
.er-core h3 { font-size: clamp(13px, 2.5cqi, 19px); }
.er-core .er-ico { width: 5.4cqi; height: 5.4cqi; }
@media (hover: hover) {
  .er-svg:has(.er-seg:hover) .er-seg:hover { fill: color-mix(in srgb, var(--c) 14%, var(--bg-raised)); }
}
/* Phones: the ring is too small to read, so modules stack as outlined cards */
@media (max-width: 600px) {
  .eco-ring { aspect-ratio: auto; display: grid; gap: var(--space-3); counter-reset: er; }
  .er-svg { display: none; }
  .er-item, .er-core { position: relative; left: auto !important; top: auto !important; transform: none; width: auto; justify-items: start; text-align: left; gap: 2px;
    border: 2px solid var(--c); border-radius: var(--radius); background: color-mix(in srgb, var(--c) 6%, var(--bg-raised)); padding: var(--space-4) var(--space-4) var(--space-4) 64px; }
  .er-core { order: -1; }
  .er-item { counter-increment: er; }
  .er-item::before { content: counter(er); position: absolute; left: 16px; top: var(--space-4); width: 32px; height: 32px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
  .er-item .er-ico { display: none; }
  .er-core .er-ico { position: absolute; left: 18px; top: var(--space-4); width: 28px; height: 28px; }
  .er-k { font-size: 0.68rem; } .eco-ring h3, .er-core h3 { font-size: var(--fs-md); } .eco-ring p { font-size: var(--fs-sm); }
}

/* ---------- v1.4.1: smaller ecosystem ring, descriptions as tooltips ---------- */
.eco-ring { max-width: 540px; }
.er-item { width: 21cqi; cursor: default; outline: none; }
.er-core { width: 30cqi; cursor: default; outline: none; }
.eco-ring h3 { font-size: clamp(12px, 2.7cqi, 16px); }
.er-core h3 { font-size: clamp(13px, 3.1cqi, 18px); }
.er-k { font-size: clamp(9px, 1.7cqi, 11px); }
.er-ico { width: 5.6cqi; height: 5.6cqi; }
.er-core .er-ico { width: 6.6cqi; height: 6.6cqi; }
.er-seg { cursor: default; }
.er-seg.is-hot { fill: color-mix(in srgb, var(--c) 16%, var(--bg-raised)); }
.er-tip {
  position: absolute; left: 50%; top: calc(100% + 10px); z-index: 5;
  width: max-content; max-width: 230px; padding: 10px 12px; border-radius: 8px;
  background: var(--fg); color: var(--bg) !important; font-size: 13px !important; line-height: 1.45 !important; text-align: left;
  box-shadow: var(--shadow-2); border-top: 3px solid var(--c);
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none;
}
.er-tip::before { content: ""; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); border: 6px solid transparent; border-bottom-color: var(--c); }
.er-up .er-tip { top: auto; bottom: calc(100% + 10px); border-top: 0; border-bottom: 3px solid var(--c); transform: translate(-50%, 4px); }
.er-up .er-tip::before { top: auto; bottom: -9px; border-bottom-color: transparent; border-top-color: var(--c); }
.er-item:hover .er-tip, .er-item:focus-visible .er-tip, .er-item.is-hot .er-tip,
.er-core:hover .er-tip, .er-core:focus-visible .er-tip, .er-core.is-hot .er-tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.er-item:focus-visible h3, .er-core:focus-visible h3 { text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 3px; }
/* Phones: no hover, so the description stays visible in each card */
@media (max-width: 600px) {
  .er-tip, .er-up .er-tip { position: static; opacity: 1; visibility: visible; transform: none; width: auto; max-width: none; padding: 0; background: none; color: var(--fg-2) !important; box-shadow: none; border: 0; font-size: var(--fs-sm) !important; }
  .er-tip::before { display: none; }
}
.er-item, .er-core { z-index: 1; }
.er-item:hover, .er-item:focus-visible, .er-item.is-hot, .er-core:hover, .er-core:focus-visible, .er-core.is-hot { z-index: 10; }
@media (max-width: 600px) { .er-item, .er-core { z-index: auto; } }

/* Ecosystem in one accent, like the questions flow (Kofi: less colourful) */
.eco-ring .er-seg, .eco-ring .er-badge, .eco-ring .er-item, .eco-ring .er-core { --c: var(--red) !important; }
.er-seg { fill: var(--bg-raised); stroke: var(--rule-strong); stroke-width: 4; transition: fill .2s, stroke .2s; }
.er-seg.is-hot { fill: var(--red-soft); stroke: var(--red); }
.er-arrow { fill: var(--red); }
.er-k { color: var(--fg-3); }
.er-badge circle { stroke: var(--bg-sunk); }
@media (max-width: 600px) {
  .er-item, .er-core { border: 1px solid var(--rule-strong); background: var(--bg-raised); }
}
@media (max-width: 600px) { .er-item, .er-core { width: auto; } }

/* =====================================================================
   v1.5.0: Technology page infodiagrams, one red accent on grey
   ===================================================================== */

/* ---------- Intro: models feeding one platform ---------- */
.tech-intro { align-items: center; }
.tech-intro h1 { max-width: 20ch; }
.model-hub { margin: 0; width: 100%; max-width: 560px; justify-self: end; }
.mh-svg { display: block; width: 100%; height: auto; overflow: visible; }
.mh-link { fill: none; stroke: var(--rule-strong); stroke-width: 2; stroke-dasharray: 5 6; animation: mh-flow 1.6s linear infinite; }
@keyframes mh-flow { to { stroke-dashoffset: -22; } }
@media (prefers-reduced-motion: reduce) { .mh-link { animation: none; } }
.mh-model rect { fill: var(--bg-raised); stroke: var(--rule-strong); stroke-width: 1.5; }
.mh-dot { fill: var(--red-soft); }
.mh-ico { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mh-model text { font-family: var(--font-body); font-size: 15.5px; font-weight: 500; fill: var(--fg); }
.mh-halo { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; stroke-dasharray: 3 6; }
.mh-hub { fill: var(--red); }
.mh-t { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: .04em; fill: #fff; }
.mh-s { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; fill: #fff; opacity: .92; }
@media (max-width: 1024px) { .model-hub { justify-self: start; max-width: 520px; } }

/* ---------- Ten stages as a closed loop ---------- */
.stage-loop { position: relative; }
.sl-track { position: absolute; border: 2px solid var(--rule-strong); border-radius: 52px; pointer-events: none; }
.sl-arr { position: absolute; top: 50%; width: 0; height: 0; border: 8px solid transparent; }
.sl-arr--r { right: -9px; border-top: 11px solid var(--red); border-bottom: 0; transform: translateY(-50%); }
.sl-arr--l { left: -9px; border-bottom: 11px solid var(--red); border-top: 0; transform: translateY(-50%); }
.sl-list { list-style: none; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--space-5); row-gap: var(--space-8); padding: 0 40px; margin: 0; }
.sl-list li { position: relative; grid-row: var(--r); grid-column: var(--col); display: grid; justify-items: center; align-content: start; text-align: center; gap: 6px; min-width: 0; }
.sl-n { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .06em; color: var(--fg-3); height: 18px; }
.sl-ico { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-raised); color: var(--red);
  box-shadow: 0 0 0 1.5px var(--rule-strong), 0 0 0 8px var(--bg), var(--shadow-1); transition: background .18s, color .18s, box-shadow .18s, transform .18s; }
.sl-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sl-list li:hover .sl-ico { background: var(--red); color: #fff; box-shadow: 0 0 0 1.5px var(--red), 0 0 0 8px var(--bg), var(--shadow-2); transform: scale(1.06); }
.sl-list li:last-child .sl-ico { background: var(--red); color: #fff; box-shadow: 0 0 0 1.5px var(--red), 0 0 0 8px var(--bg), var(--shadow-1); }
.sl-list h3 { margin-top: 8px; font-size: var(--fs-md); line-height: 1.2; }
.sl-list p { font-size: var(--fs-sm); color: var(--fg-2); line-height: 1.45; max-width: 24ch; }
@media (max-width: 900px) {
  .sl-track { display: none; }
  .sl-list { grid-template-columns: 1fr; row-gap: var(--space-4); padding: 0; }
  .sl-list::before { content: ""; position: absolute; left: 28px; top: 30px; bottom: 30px; width: 2px; background: var(--rule-strong); }
  .sl-list li { grid-row: auto; grid-column: auto; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--space-4); row-gap: 2px; justify-items: start; text-align: left; align-items: center; }
  .sl-n { display: none; }
  .sl-ico { grid-row: 1 / span 2; }
  .sl-list h3 { margin-top: 0; align-self: end; }
  .sl-list p { align-self: start; max-width: none; }
}

/* ---------- Analytical capabilities: tiles + shared panel ---------- */
.cap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-6); align-items: start; }
.cap-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.cap-btn { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: grid; align-content: start; gap: 4px; min-height: 112px;
  padding: var(--space-4); border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--rule); box-shadow: var(--shadow-1);
  transition: border-color .15s, background .15s, transform .15s; }
.cap-btn:hover { border-color: var(--rule-strong); transform: translateY(-1px); }
.cap-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.cap-n { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .06em; color: var(--fg-3); }
.cap-t { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-md); line-height: 1.2; color: var(--fg); }
.cap-s { font-size: var(--fs-xs); color: var(--fg-3); line-height: 1.35; }
.cap-btn.is-on { border-color: var(--red); background: var(--red-soft); box-shadow: inset 4px 0 0 var(--red), var(--shadow-1); }
.cap-btn.is-on .cap-n { color: var(--red); }
.cap-panel { position: sticky; top: calc(var(--header-h) + var(--space-5)); background: var(--bg-raised); border: 1px solid var(--rule); border-top: 4px solid var(--red);
  border-radius: var(--radius); box-shadow: var(--shadow-2); padding: var(--space-6); min-height: 100%; }
.cap-panel:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.cap-in { display: grid; gap: var(--space-2); animation: cap-in .22s ease; }
@keyframes cap-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cap-in { animation: none; } }
.cap-k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.cap-panel h3 { font-size: var(--fs-xl); }
.cap-sub { color: var(--red-ink); font-weight: 500; }
.cap-dl { display: grid; gap: var(--space-4); margin: var(--space-3) 0 0; }
.cap-dl dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px; }
.cap-dl dd { margin: 0; color: var(--fg-2); line-height: 1.55; }
.cap-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cap-chips li { font-size: var(--fs-xs); padding: 3px 10px; border-radius: 999px; background: var(--bg-inset); color: var(--fg-2); border: 1px solid var(--rule); }
@media (max-width: 1100px) { .cap-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .cap { grid-template-columns: 1fr; }
  .cap-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cap-panel { position: static; scroll-margin-top: calc(var(--header-h) + 12px); }
}
@media (max-width: 640px) {
  .cap-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .cap-btn { min-height: 0; padding: var(--space-3); }
  .cap-s { display: none; }
  .cap-panel { padding: var(--space-5); }
}

/* ---------- Scenario → simulation → optimization chevrons ---------- */
.ss-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--space-2); }
.ss-step { display: grid; grid-template-rows: auto 1fr; gap: var(--space-4); min-width: 0; }
.ss-chev { --notch: 30px; position: relative; display: grid; align-content: center; gap: 4px; min-height: 168px;
  padding: var(--space-5) calc(var(--notch) + var(--space-5)) var(--space-5) calc(var(--notch) + var(--space-5));
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%, var(--notch) 50%);
  background: var(--bg-raised); color: var(--fg); }
.ss-step:first-child .ss-chev { clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%); padding-left: var(--space-5); border-radius: var(--radius) 0 0 var(--radius); }
.ss-step:nth-child(2) .ss-chev { background: var(--red-soft); }
.ss-step:nth-child(3) .ss-chev { background: var(--red); color: var(--bg); }
.ss-n { position: absolute; top: var(--space-3); right: calc(var(--notch) + var(--space-3)); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .06em; opacity: .6; }
.ss-k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--red-ink); }
.ss-step:nth-child(3) .ss-k { color: inherit; opacity: .85; }
.ss-chev h3 { font-size: var(--fs-xl); color: inherit; }
.ss-g svg { display: block; width: 96px; height: 20px; margin-top: 8px; }
.ss-g circle, .ss-g rect { fill: none; stroke: var(--fg-3); stroke-width: 1.6; }
.ss-step:nth-child(2) .ss-g rect { fill: var(--red); stroke: none; opacity: .75; }
.ss-step:nth-child(3) .ss-g circle { fill: var(--bg); stroke: none; opacity: .55; }
.ss-step:nth-child(3) .ss-g circle.pick { opacity: 1; }
.ss-g .tick { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ss-gt { font-size: var(--fs-xs); opacity: .75; }
.ss-step p { color: var(--fg-2); padding-inline: var(--space-2) var(--space-5); }
.ss-step:first-child p { padding-left: 0; }
@media (max-width: 900px) {
  .ss-flow { grid-template-columns: 1fr; gap: var(--space-5); }
  .ss-chev, .ss-step:first-child .ss-chev { --notch: 22px; min-height: 0; border-radius: var(--radius) var(--radius) 0 0;
    padding: var(--space-5) var(--space-5) calc(var(--notch) + var(--space-4));
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--notch)), 50% 100%, 0 calc(100% - var(--notch))); }
  .ss-n { right: var(--space-4); }
  .ss-step p, .ss-step:first-child p { padding: 0; }
}

/* ---------- Evidence labels around a result ---------- */
.ev-hint { font-size: var(--fs-sm); color: var(--fg-3); }
.ev-wheel { container-type: inline-size; position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; justify-self: center; }
.ew-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ew-ring { fill: none; stroke: var(--rule-strong); stroke-width: .35; stroke-dasharray: 1 1.6; }
.ew-spoke { stroke: var(--rule-strong); stroke-width: .35; }
.ew-hub { fill: var(--bg-raised); stroke: var(--red); stroke-width: .7; }
.ew-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 38cqi; display: grid; justify-items: center; text-align: center; gap: .4cqi; }
.ew-k { font-family: var(--font-mono); font-size: clamp(9px, 2cqi, 11px); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.ew-core b { font-family: var(--font-display); font-size: clamp(12px, 3.2cqi, 17px); line-height: 1.15; }
.ew-plus { color: var(--red); font-weight: 700; font-size: clamp(12px, 3cqi, 16px); line-height: 1; }
.ew-conf { display: flex; gap: 3px; margin-top: .8cqi; }
.ew-conf i { font-style: normal; font-size: clamp(8.5px, 1.8cqi, 10.5px); padding: 2px 6px; border-radius: 999px; border: 1px solid var(--red); color: var(--red-ink); }
.ew-conf i[data-l="3"] { background: var(--red); color: #fff; }
.ew-conf i[data-l="2"] { background: var(--red-soft); }
.ew-node { position: absolute; transform: translate(-50%, -50%); z-index: 1; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: default; outline: none;
  padding: .9cqi 2.4cqi .9cqi 1cqi; border-radius: 999px; background: var(--bg-raised); border: 1.5px solid var(--rule-strong); box-shadow: var(--shadow-1); transition: border-color .15s, background .15s; }
.ew-n { display: grid; place-items: center; width: clamp(20px, 5.4cqi, 28px); height: clamp(20px, 5.4cqi, 28px); border-radius: 50%; background: var(--red-soft); color: var(--red);
  font-family: var(--font-mono); font-size: clamp(9px, 2cqi, 11px); }
.ew-node b { font-family: var(--font-display); font-size: clamp(12px, 3cqi, 16px); font-weight: 650; }
.ew-node:hover, .ew-node:focus-visible { z-index: 10; border-color: var(--red); background: var(--red-soft); }
.ew-node:hover .ew-n, .ew-node:focus-visible .ew-n { background: var(--red); color: #fff; }
.ew-tip { position: absolute; left: 50%; top: calc(100% + 10px); width: max-content; max-width: 220px; white-space: normal; padding: 10px 12px; border-radius: 8px;
  background: var(--fg); color: var(--bg); font-size: 13px; line-height: 1.45; text-align: left; box-shadow: var(--shadow-2); border-top: 3px solid var(--red);
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.ew-up .ew-tip { top: auto; bottom: calc(100% + 10px); border-top: 0; border-bottom: 3px solid var(--red); transform: translate(-50%, 4px); }
.ew-l .ew-tip { left: 0; transform: translate(0, -4px); }
.ew-r .ew-tip { left: auto; right: 0; transform: translate(0, -4px); }
.ew-node:hover .ew-tip, .ew-node:focus-visible .ew-tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.ew-l:hover .ew-tip, .ew-l:focus-visible .ew-tip, .ew-r:hover .ew-tip, .ew-r:focus-visible .ew-tip { transform: none; }
@media (max-width: 600px) {
  .ev-hint { display: none; }
  .ev-wheel { aspect-ratio: auto; container-type: normal; display: grid; gap: var(--space-2); max-width: none; }
  .ew-svg { display: none; }
  .ew-core { position: static; transform: none; width: auto; order: -1; padding: var(--space-4); border: 1px solid var(--red); border-radius: var(--radius); background: var(--bg-raised); margin-bottom: var(--space-2);
    grid-auto-flow: column; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
  .ew-core .ew-k, .ew-conf { display: none; }
  .ew-node { position: static; transform: none; display: grid; grid-template-columns: 28px 1fr; column-gap: var(--space-3); row-gap: 2px; white-space: normal; border-radius: var(--radius); padding: var(--space-3); }
  .ew-n { grid-row: 1 / span 2; width: 28px; height: 28px; }
  .ew-tip, .ew-up .ew-tip, .ew-l .ew-tip, .ew-r .ew-tip { position: static; opacity: 1; visibility: visible; transform: none; width: auto; max-width: none; padding: 0; background: none; color: var(--fg-2); box-shadow: none; border: 0; font-size: var(--fs-sm); }
  .ew-node:hover .ew-tip, .ew-node:focus-visible .ew-tip { transform: none; }
}

/* ---------- Core modules as a layered architecture ---------- */
.mstack { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-3) var(--space-4); }
.ms-spine { grid-row: 1 / span 4; grid-column: 1; position: relative; display: grid; place-items: center; }
.ms-spine::before { content: ""; position: absolute; left: 50%; top: 12px; bottom: 0; width: 2px; transform: translateX(-50%); background: var(--rule-strong); }
.ms-spine::after { content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%); border: 8px solid transparent; border-bottom: 13px solid var(--red); border-top: 0; }
.ms-spine span { position: relative; writing-mode: vertical-rl; transform: rotate(180deg); background: var(--bg); padding: 10px 0; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; }
.ms-layer { grid-column: 2; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--space-4); align-items: stretch; padding: var(--space-3); border-radius: var(--radius-lg); background: var(--bg-sunk); border: 1px solid var(--rule); }
.ms-lab { display: grid; align-content: center; gap: 2px; padding-left: var(--space-2); }
.ms-lab b { font-family: var(--font-display); font-size: var(--fs-lg); }
.ms-lab span { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.ms-row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--space-3); }
.ms-mod { display: grid; align-content: start; gap: 4px; padding: var(--space-4) var(--space-5); border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--rule-strong); box-shadow: var(--shadow-1); }
.ms-k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.ms-mod h3 { font-size: var(--fs-md); }
.ms-mod p { font-size: var(--fs-sm); color: var(--fg-2); max-width: none; }
.ms-mod .ms-items { font-size: var(--fs-xs); color: var(--fg-3); line-height: 1.5; margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--rule-strong); }
.ms-items i { font-style: normal; color: var(--red); }
.ms-layer--core { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 40%, var(--rule)); }
.ms-layer--core .ms-mod { border-color: var(--red); }
.ms-layer--core .ms-mod h3 { font-size: var(--fs-lg); }
@media (max-width: 900px) {
  .ms-row { grid-template-columns: 1fr; }
  .ms-layer { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .mstack { grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-3) var(--space-2); }
  .ms-spine span { display: none; }
  .ms-layer { grid-template-columns: 1fr; gap: var(--space-2); padding: var(--space-2); }
  .ms-lab { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: var(--space-2); padding: var(--space-1) var(--space-2) 0; }
  .ms-mod { padding: var(--space-4); }
}

/* v1.5.1: modules section moved to the grey background */
.section--sunk .ms-layer { background: var(--bg-inset); }
.section--sunk .ms-layer--core { background: var(--red-soft); }
.section--sunk .ms-spine span { background: var(--bg-sunk); }

/* v1.5.2: Methods section removed; scenario chevrons now sit on white */
.section:not(.section--sunk) .ss-step:first-child .ss-chev { background: var(--bg-inset); }

/* v1.5.3: module capability lists become tooltips (Kofi) */
.ms-mod { position: relative; cursor: default; outline: none; }
.ms-mod:hover, .ms-mod:focus-visible { z-index: 10; border-color: var(--red); }
.ms-mod:focus-visible h3 { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.ms-more { justify-self: start; margin-top: 6px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); border-bottom: 1px dashed var(--rule-strong); }
.ms-tip { position: absolute; left: var(--space-4); top: calc(100% - 6px); z-index: 5; width: max-content; max-width: min(380px, calc(100% - 2 * var(--space-4)));
  padding: 10px 12px; border-radius: 8px; background: var(--fg); color: var(--bg); font-size: 13px; line-height: 1.5; text-align: left;
  box-shadow: var(--shadow-2); border-top: 3px solid var(--red); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.ms-tip i { font-style: normal; color: var(--red); }
.ms-mod:hover .ms-tip, .ms-mod:focus-visible .ms-tip { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 600px) {
  .ms-more { display: none; }
  .ms-tip { position: static; opacity: 1; visibility: visible; transform: none; width: auto; max-width: none; margin-top: 4px; padding: 8px 0 0; background: none; color: var(--fg-3); box-shadow: none; border: 0; border-top: 1px dashed var(--rule-strong); border-radius: 0; font-size: var(--fs-xs); }
}

/* v1.5.4: page intro keeps the base background; the first section below it is grey (Kofi) */
.section--sunk .sl-ico { box-shadow: 0 0 0 1.5px var(--rule-strong), 0 0 0 8px var(--bg-sunk), var(--shadow-1); }
.section--sunk .sl-list li:hover .sl-ico { box-shadow: 0 0 0 1.5px var(--red), 0 0 0 8px var(--bg-sunk), var(--shadow-2); }
.section--sunk .sl-list li:last-child .sl-ico { box-shadow: 0 0 0 1.5px var(--red), 0 0 0 8px var(--bg-sunk), var(--shadow-1); }

/* =====================================================================
   v1.6.0: page images and colourful infodiagrams (Kofi's v1.5.6 notes)
   ===================================================================== */
:root { --on-c: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --on-c: #12141a; } }
:root[data-theme="dark"] { --on-c: #12141a; }
.idg-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Intro images ---------- */
.intro-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
.intro-mark { margin: 0; width: 100%; max-width: 440px; justify-self: end; }
.intro-mark--about { max-width: 340px; }
@media (max-width: 1024px) { .intro-mark { justify-self: start; max-width: 400px; } .intro-mark--about { max-width: 260px; } }
@media (max-width: 600px) { .intro-mark { max-width: 340px; } .intro-mark--about { max-width: 200px; } }
.im-svg { display: block; width: 100%; height: auto; overflow: visible; }
.im-svg svg { overflow: visible; }
.im-panel { fill: var(--bg-raised); stroke: var(--rule); stroke-width: 1.5; }
.im-card { fill: var(--bg); stroke: var(--rule-strong); stroke-width: 1.2; }
.im-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; fill: var(--fg-3); }
.im-k--c, .im-l--c { text-anchor: middle; }
.im-k--now { text-anchor: middle; fill: var(--red); font-weight: 600; }
.im-l { font-family: var(--font-body); font-size: 13px; fill: var(--fg-2); }
.im-b { font-family: var(--font-body); font-size: 16px; font-weight: 600; fill: var(--fg); }
.im-axis { stroke: var(--rule-strong); stroke-width: 1.5; }
.im-cap { stroke: var(--fg-3); stroke-width: 1.2; stroke-dasharray: 3 5; }
.im-badge { fill: var(--red-soft); }
.im-bico, .im-pico, .im-nico, .im-facico, .im-gico { fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.im-bico { stroke: var(--red); }
.im-area { fill: var(--red-soft); }
.im-actual { fill: none; stroke: var(--fg-2); stroke-width: 3; stroke-linecap: round; }
.im-possible { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 8 7; stroke-linecap: round; }
.im-arrow { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.im-q { fill: var(--red); }
.im-qt { fill: #fff; font-family: var(--font-display); font-weight: 700; font-size: 26px; text-anchor: middle; }
.im-live { fill: var(--green); animation: im-pulse 1.6s ease-in-out infinite; }
@keyframes im-pulse { 50% { opacity: .35; } }
.im-window { fill: var(--orange-soft); }
.im-livecurve { fill: none; stroke: var(--blue); stroke-width: 3.2; stroke-linecap: round; }
.im-forecast { fill: none; stroke: var(--purple); stroke-width: 3; stroke-dasharray: 7 6; stroke-linecap: round; }
.im-now { stroke: var(--red); stroke-width: 2; }
.im-person { fill: var(--blue-soft); }
.im-pico { stroke: var(--blue); }
.im-approve { fill: var(--green); }
.im-tick { fill: none; stroke: var(--on-c); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.im-at { fill: var(--on-c); font-family: var(--font-body); font-weight: 600; font-size: 14px; }
.im-flow { stroke: var(--rule-strong); stroke-width: 3; stroke-dasharray: 4 5; animation: mh-flow 1.6s linear infinite; }
.im-head { fill: none; stroke: var(--rule-strong); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.im-n { stroke-width: 2; }
.im-n--blue { fill: var(--blue-soft); stroke: var(--blue); }
.im-n--green { fill: var(--green-soft); stroke: var(--green); }
.im-nico--blue { stroke: var(--blue); }
.im-nico--green { stroke: var(--green); }
.im-halo { fill: none; stroke: var(--red); stroke-opacity: .4; stroke-width: 1.5; stroke-dasharray: 3 6; }
.im-hub, .im-gridpill, .im-logo, .im-env { fill: var(--red); }
.im-flex { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; }
.im-flexarr { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.im-bus { stroke: var(--fg-3); stroke-width: 3; stroke-linecap: round; }
.im-gico { stroke: #fff; }
.im-gt { fill: #fff; font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .14em; }
.im-wire { stroke: var(--rule-strong); stroke-width: 2; stroke-dasharray: 4 5; animation: mh-flow 1.6s linear infinite; }
.im-joint { fill: var(--fg-3); }
.im-fac { fill: color-mix(in srgb, var(--c) 14%, var(--bg-raised)); stroke: var(--c); stroke-width: 2.5; }
.im-facico { stroke: var(--c); }
.im-net { fill: none; stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.im-netn { fill: #fff; }
.im-logot { fill: #fff; font-family: var(--font-display); font-weight: 800; font-size: 58px; letter-spacing: .03em; text-anchor: middle; }
.im-logorule { stroke: #fff; stroke-opacity: .65; stroke-width: 1.5; }
.im-logos { fill: #fff; font-family: var(--font-mono); font-size: 20px; letter-spacing: .5em; text-anchor: middle; }
.im-chip { fill: color-mix(in srgb, var(--c) 14%, var(--bg-raised)); stroke: var(--c); stroke-width: 1.5; }
.im-chipt { font-family: var(--font-body); font-size: 13.5px; font-weight: 500; fill: var(--fg); text-anchor: middle; }
.im-flap { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.im-ring { fill: none; stroke: var(--bg-raised); stroke-width: 52; }
.im-ringseg { fill: none; stroke: var(--red); stroke-width: 52; stroke-dasharray: 56.55 56.55; }
.im-ringline { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; }
.im-bubble { fill: var(--bg-raised); stroke: var(--rule-strong); stroke-width: 1.5; }
.im-bq { fill: var(--red); font-family: var(--font-display); font-weight: 800; font-size: 66px; text-anchor: middle; }
.im-chev { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.im-bar { fill: var(--rule); }
@media (prefers-reduced-motion: reduce) { .im-live, .im-flow, .im-wire { animation: none; } }

/* ---------- How It Works: colourful step rail + one panel ---------- */
.hiw-rail { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-bottom: var(--space-6); }
.hiw-rail::before { content: ""; position: absolute; top: 27px; left: 6.25%; right: 6.25%; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--indigo), var(--orange), var(--purple), var(--magenta), var(--gold), var(--green)); opacity: .55; }
.hr-btn { position: relative; appearance: none; background: none; border: 0; padding: 0 4px 6px; margin: 0; font: inherit; color: var(--fg); cursor: pointer;
  display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; }
.hr-dot { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, var(--bg-sunk)); border: 2px solid var(--c); transition: transform .2s, background .2s, box-shadow .2s; }
.hr-dot .idg-ico { width: 26px; height: 26px; }
.hr-n { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; color: var(--fg-3); }
.hr-t { font-weight: 600; font-size: var(--fs-sm); line-height: 1.2; }
.hr-q { font-size: .78rem; line-height: 1.35; color: var(--fg-3); max-width: 16ch; }
.hr-btn:hover .hr-dot { transform: translateY(-2px); }
.hr-btn[aria-selected="true"] .hr-dot { background: var(--c); color: var(--on-c); transform: scale(1.1); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 22%, transparent); }
.hr-btn[aria-selected="true"] .hr-t { color: var(--c); }
.hr-btn:focus-visible { outline: none; }
.hr-btn:focus-visible .hr-dot { outline: 2px solid var(--fg); outline-offset: 5px; }
.hiw-stage { display: grid; }
.hiw-stage > .hiw-step { grid-area: 1 / 1; }
.hiw-stage > .hiw-step[hidden] { display: grid; visibility: hidden; }
.hiw-stage .hiw-step, .hiw-stage .hiw-step:last-child { border: 1px solid var(--rule); border-top: 5px solid var(--c); border-radius: var(--radius); background: var(--bg-raised);
  padding: var(--space-6); grid-template-columns: 96px minmax(0, 1.15fr) minmax(0, 1fr); }
.hiw-stage .hiw-n { color: var(--c); }
@media (max-width: 960px) { .hiw-stage .hiw-step, .hiw-stage .hiw-step:last-child { grid-template-columns: 1fr; padding: var(--space-5); } }
@media (max-width: 1100px) { .hr-q { display: none; } }
@media (max-width: 760px) {
  .hiw-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--space-4); }
  .hiw-rail::before { display: none; }
  .hr-dot { width: 48px; height: 48px; }
  .hr-dot .idg-ico { width: 22px; height: 22px; }
  .hr-t { font-size: .8rem; }
}

/* ---------- Applications: domain tiles ---------- */
.dmap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); }
.dm-tile { background: var(--bg-raised); border: 1px solid var(--rule); border-top: 4px solid var(--c); border-radius: var(--radius);
  padding: var(--space-5) var(--space-4); display: grid; gap: 10px; align-content: start; transition: transform .2s, box-shadow .2s; }
.dm-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--c) 70%, transparent); }
.dm-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, var(--bg-raised)); }
.dm-ico .idg-ico { width: 26px; height: 26px; }
.dm-tile h3 { font-size: var(--fs-md); line-height: 1.25; }
.dm-tile dl { margin: 0; display: grid; gap: 10px; }
.dm-tile dt { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.dm-tile dt::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.dm-c dt::before { background: transparent; border: 2px solid var(--c); width: 6px; height: 6px; }
.dm-tile dd { margin: 3px 0 0; font-size: .84rem; line-height: 1.45; color: var(--fg-2); }
@media (max-width: 1180px) { .dmap { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
@media (max-width: 600px) {
  .dmap { grid-template-columns: 1fr; }
  .dm-tile { grid-template-columns: 48px minmax(0, 1fr); column-gap: var(--space-4); }
  .dm-ico { grid-row: span 2; }
}

/* ---------- Applications: one assessment, four readers ---------- */
.rquad { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rq-item { display: grid; gap: 8px; align-content: start; padding: var(--space-5); border-radius: 10px;
  background: color-mix(in srgb, var(--c) 9%, var(--bg-raised)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.rq-item--1 { border-top-left-radius: 40px; padding-right: 76px; padding-bottom: 72px; }
.rq-item--2 { border-top-right-radius: 40px; padding-left: 76px; padding-bottom: 72px; }
.rq-item--3 { border-bottom-left-radius: 40px; padding-right: 76px; padding-top: 72px; }
.rq-item--4 { border-bottom-right-radius: 40px; padding-left: 76px; padding-top: 72px; }
.rq-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--on-c); }
.rq-item h3 { font-size: var(--fs-md); line-height: 1.25; }
.rq-item p { font-size: var(--fs-sm); color: var(--fg-2); }
.rq-hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 156px; height: 156px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-content: center; justify-items: center; text-align: center; gap: 2px; box-shadow: 0 0 0 10px var(--bg); }
.rq-hub .idg-ico { width: 26px; height: 26px; margin-bottom: 4px; }
.rq-hub b { font-family: var(--font-display); font-size: 1rem; line-height: 1.15; max-width: 9ch; margin-bottom: 4px; }
.rq-hub span { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
@media (max-width: 600px) {
  .rquad { grid-template-columns: 1fr; }
  .rq-item { border-radius: 10px !important; padding: var(--space-5) !important; }
  .rq-hub { position: static; transform: none; order: -1; justify-self: center; box-shadow: none; }
}

/* ---------- Applications: benefits from plant to grid ---------- */
.bf-axis { display: flex; align-items: center; gap: 14px; margin-bottom: var(--space-5); font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.bf-axis span { display: inline-flex; align-items: center; gap: 8px; }
.bf-axis i { position: relative; flex: 1; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--teal), var(--gold), var(--purple)); }
.bf-axis i::after { content: ""; position: absolute; right: -4px; top: 50%; transform: translateY(-50%); border: 7px solid transparent; border-left: 11px solid var(--purple); border-right: 0; }
.bf-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.bf-col { background: var(--bg-raised); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.bf-head { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 16px 30px 16px 16px;
  background: var(--c); color: var(--on-c); clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%); }
.bf-ico { grid-row: span 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--on-c) 18%, transparent); }
.bf-n { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; opacity: .85; }
.bf-head h3 { color: inherit; font-size: var(--fs-md); line-height: 1.2; }
.bf-list { list-style: none; margin: 0; padding: var(--space-4) var(--space-4) var(--space-5); display: grid; gap: 9px; }
.bf-list li { position: relative; padding-left: 18px; font-size: var(--fs-sm); line-height: 1.4; color: var(--fg-2); }
.bf-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
@media (max-width: 1024px) { .bf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .bf-cols { grid-template-columns: 1fr; } }

/* ---------- About: principles as pillars under one roof ---------- */
.phouse { max-width: 1120px; }
.ph-roof { height: 116px; margin: 0 -10px; background: var(--red); color: #fff; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  display: grid; place-content: end center; justify-items: center; padding-bottom: 14px; text-align: center; }
.ph-roof span { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: .06em; line-height: 1; }
.ph-roof small { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; opacity: .92; margin-top: 4px; }
.ph-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); padding: var(--space-4) var(--space-4); }
.ph-col { display: grid; justify-items: center; align-content: start; gap: 10px; text-align: center; padding: var(--space-5) var(--space-4) var(--space-6);
  background: var(--bg-raised); border: 1px solid var(--rule); border-top: 5px solid var(--c); border-radius: 4px 4px 0 0; }
.ph-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--on-c); }
.ph-ico .idg-ico { width: 26px; height: 26px; }
.ph-n { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--fg-3); }
.ph-col h3 { font-size: var(--fs-lg); line-height: 1.2; }
.ph-col p { font-size: var(--fs-sm); color: var(--fg-2); }
.ph-base { padding: 14px var(--space-4); border-radius: 6px; background: var(--fg); color: var(--bg); text-align: center; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 1024px) { .ph-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ph-roof { height: 84px; } .ph-roof small { display: none; } .ph-cols { grid-template-columns: 1fr; padding-inline: 0; } }

/* ---------- Footer disclaimer ---------- */
.footer-legal { margin-bottom: var(--space-4); padding-bottom: var(--space-4); border-bottom: 1px solid var(--rule); color: var(--fg-3); font-size: .78rem; line-height: 1.55; max-width: none; }
.footer-legal b { color: var(--fg-2); font-weight: 600; }
.page-intro h1.h2-lines { max-width: none; font-size: clamp(1.9rem, 1.2rem + 2vw, 2.6rem); }
@media (max-width: 1024px) { .intro-split { grid-template-columns: 1fr; gap: var(--space-6); } }

/* v1.7.0: Terms and conditions page, link in the footer disclaimer */
.footer-legal a { color: var(--fg-2); font-weight: 600; white-space: nowrap; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--fg); }
.terms-date { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); letter-spacing: .04em; }
.terms { list-style: none; margin: 0; padding: 0; counter-reset: t; display: grid; gap: var(--space-5); }
.terms li { counter-increment: t; position: relative; padding: 0 0 var(--space-5) 56px; border-bottom: 1px solid var(--rule); }
.terms li:last-child { border-bottom: 0; padding-bottom: 0; }
.terms li::before { content: counter(t, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--red); }
.terms h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2); }

/* v1.7.2: How It Works in the homepage style, one red accent on grey (Kofi) */
.hiw { --c: var(--red); }
.hiw .hr-btn, .hiw .hiw-step { --c: var(--red) !important; }
.hiw-rail::before { background: var(--rule-strong); opacity: 1; height: 2px; top: 28px; }
.hiw .hr-dot { background: var(--bg-raised); border: 1.5px solid var(--rule-strong); color: var(--red); }
.section--sunk .hiw .hr-dot { box-shadow: 0 0 0 6px var(--bg-sunk); }
.hiw .hr-btn:hover .hr-dot { border-color: var(--red); }
.hiw .hr-btn[aria-selected="true"] .hr-dot { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 6px var(--red-soft); }
.hiw .hr-btn[aria-selected="true"] .hr-t { color: var(--fg); }
.hiw .hr-btn[aria-selected="true"] .hr-n { color: var(--red); }
.hiw-stage .hiw-step, .hiw-stage .hiw-step:last-child { border-top: 3px solid var(--red); }
.intro-mark--how .im-n { fill: var(--bg-raised); stroke: var(--rule-strong); stroke-width: 1.5; }
.intro-mark--how .im-nico { stroke: var(--fg-2); }
.intro-mark--how .im-dot { fill: var(--rule-strong) !important; }

/* v1.7.2: Applications in the homepage style, one red accent on grey (Kofi) */
.dmap .dm-tile, .rquad .rq-item, .bflow .bf-col { --c: var(--red) !important; }
.dmap .dm-tile { border-top: 1px solid var(--rule); }
.dmap .dm-tile:hover { box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .35); }
.dmap .dm-ico { background: var(--red-soft); color: var(--red); }
.dmap .dm-tile dt::before { background: var(--fg-3); }
.dmap .dm-c dt::before { background: transparent; border-color: var(--fg-3); }
.rquad .rq-item { background: var(--bg-raised); border: 1px solid var(--rule); }
.rquad .rq-ico { background: var(--red-soft); color: var(--red); }
.bflow .bf-axis i { background: var(--rule-strong); height: 2px; }
.bflow .bf-axis i::after { border-left-color: var(--red); }
.bflow .bf-head { background: var(--bg-inset); color: var(--fg); }
.bflow .bf-ico { background: var(--red-soft); color: var(--red); }
.bflow .bf-n { color: var(--fg-3); opacity: 1; }
.bflow .bf-list li::before { background: var(--fg-3); width: 6px; height: 6px; top: .55em; }
.intro-mark--apps .im-fac { fill: var(--bg-raised); stroke: var(--rule-strong); stroke-width: 1.5; }
.intro-mark--apps .im-facico { stroke: var(--fg-2); }

/* v1.7.3: CEDIS Lab logo on About */
.im-lab { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: .08em; fill: var(--fg); text-anchor: middle; }

/* v1.7.4: About and Contact in the homepage style, one red accent on grey (Kofi) */
.phouse .ph-col { --c: var(--red) !important; border-top: 1px solid var(--rule); border-radius: var(--radius); }
.phouse .ph-ico { background: var(--red-soft); color: var(--red); }
.intro-mark--contact .im-chip { fill: var(--bg-raised); stroke: var(--rule-strong); stroke-width: 1.2; }

/* v1.7.5: benefit boxes start at the bottom edge of the arrow header (Kofi) */
.bflow .bf-col { background: none; border: 0; border-radius: 0; overflow: visible; display: flex; flex-direction: column; }
.bflow .bf-head { border-radius: var(--radius) 0 0 0; }
.bflow .bf-list { flex: 1; align-content: start; background: var(--bg-raised); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); margin-right: 20px; }

/* v1.7.6: About logo is the CEDIS Lab mark alone, a little bigger, no red tile, with a shadow (Kofi) */
.im-cedis { fill: var(--fg); }
.intro-mark--about .im-svg { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .28)) drop-shadow(0 2px 3px rgba(0, 0, 0, .18)); }

/* v1.7.7: background order (Kofi). Intro on the base colour, then sections alternate grey and base,
   and the footer continues the sequence: base after a grey section, grey after a base one. */
main:has(> section:last-of-type.section--sunk) ~ .site-footer { background: var(--bg); border-top: 0; }

/* v1.7.7: About mark much bigger and grey (Kofi) */
.im-cedis { fill: var(--fg-3); }
.intro-mark--about { max-width: 300px; }
@media (max-width: 1024px) { .intro-mark--about { max-width: 240px; } }
@media (max-width: 600px) { .intro-mark--about { max-width: 190px; } }
/* v1.7.7: About principle base bar in grey instead of black (Kofi) */
.ph-base { background: color-mix(in srgb, var(--fg-3) 88%, var(--fg)); color: var(--bg); }

/* v1.8.0: Disclaimer and legal notice page (Kofi's text) */
.legal-text { display: grid; gap: var(--space-4); }
.legal-text p { max-width: 68ch; color: var(--fg-2); }
.legal-text a, .terms-date a { color: var(--fg); text-underline-offset: 3px; }
.fl-sep { color: var(--fg-3); }
