/* ARENOMICS INSTITUTE — founding site stylesheet
   One typeface family (Archivo) across widths and weights, self-hosted.
   Field: cool stone. Panel: deep petrol. Signal: viridian. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --field: #EDEFEC;
  --field-2: #E2E6E2;
  --panel: #0F1A21;
  --panel-2: #172630;
  --ink: #13181B;
  --ink-2: #4E585D;
  --line: #C3CAC6;
  --line-strong: #8F9A96;
  --line-dark: #2B3A44;
  --signal: #0E5E55;
  --signal-ink: #0A4A43;
  --signal-soft: #D5E4DF;
  --on-panel: #E7ECE9;
  --on-panel-2: #9DAAA6;
  --frame: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 100, "wght" 400;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--signal-ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
button { font: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }
h4 { font-size: 1.05rem; line-height: 1.3; }
p { margin: 0 0 1rem; max-width: 66ch; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: .35rem; }
strong { font-variation-settings: "wdth" 100, "wght" 600; font-weight: 600; }
.lede { font-size: 1.2rem; line-height: 1.5; max-width: 60ch; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.wide { font-variation-settings: "wdth" 112, "wght" 600; font-weight: 600; }

.frame { width: min(var(--frame), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: var(--field);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 24px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
  font-variation-settings: "wdth" 112, "wght" 600; font-weight: 600;
  font-size: .95rem; letter-spacing: .06em;
}
.wordmark .mark { width: 22px; height: 22px; flex: none; }
.nav { display: flex; gap: clamp(14px, 2vw, 28px); }
.nav a {
  color: var(--ink); text-decoration: none; font-size: .92rem;
  font-variation-settings: "wdth" 100, "wght" 500; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--line-strong); }
.nav a[aria-current="page"] { border-bottom-color: var(--signal); }

/* Disclosure toggle — mobile only; controls the single .nav */
.menu { display: none; }
.menu > summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: .85rem; font-variation-settings: "wdth" 100, "wght" 600; font-weight: 600;
  padding: 8px 0 8px 12px; color: var(--ink);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::marker { content: ""; }
.menu > summary::after { content: "Menu"; }
.menu[open] > summary::after { content: "Close"; }

@media (max-width: 860px) {
  .menu { display: block; }
  .nav { display: none; }
  .menu[open] ~ .nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--panel); border-top: 1px solid var(--line-dark);
    padding: 8px var(--gutter) 20px;
  }
  .menu[open] ~ .nav a {
    color: var(--on-panel); font-size: 1.15rem; padding: 12px 0;
    border-bottom: 1px solid var(--line-dark);
  }
  .menu[open] ~ .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--line-dark); }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 112px) 0 clamp(36px, 5vw, 64px); }
.hero__name {
  font-size: clamp(2.4rem, 8.4vw, 7rem);
  line-height: .95; letter-spacing: -0.02em;
  font-variation-settings: "wdth" 118, "wght" 640; font-weight: 600;
  text-transform: uppercase;
}
.hero__name span { display: block; }
.hero__sub {
  margin: 18px 0 0; font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  color: var(--ink-2); font-variation-settings: "wdth" 100, "wght" 450;
}
.hero__thesis {
  margin-top: clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 72px); align-items: end;
}
.hero__thesis h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.9rem); letter-spacing: -0.02em;
  font-variation-settings: "wdth" 100, "wght" 560; font-weight: 600;
  max-width: 18ch;
}
.hero__thesis p { font-size: 1.1rem; margin-bottom: 1.2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 20px;
  border: 1px solid var(--ink); color: var(--ink); text-decoration: none;
  font-size: .95rem; font-variation-settings: "wdth" 100, "wght" 560; font-weight: 600;
}
.btn:hover { background: var(--ink); color: var(--field); }
.btn--solid { background: var(--ink); color: var(--field); }
.btn--solid:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.on-panel .btn { border-color: var(--on-panel); color: var(--on-panel); }
.on-panel .btn:hover { background: var(--on-panel); color: var(--panel); }
@media (max-width: 760px) { .hero__thesis { grid-template-columns: 1fr; } }

/* ---------- Record strip ---------- */
.record {
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.record__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 28px;
}
.record dt { font-size: .8rem; color: var(--ink-2); margin-bottom: 4px; }
.record dd { margin: 0; font-size: .98rem; font-variation-settings: "wdth" 100, "wght" 560; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 760px) { .record__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 104px) 0; border-bottom: 1px solid var(--line); }
.section--alt { background: var(--field-2); }
.section__head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 20px clamp(24px, 4vw, 72px); margin-bottom: clamp(28px, 4vw, 48px); }
.section__head .lede { margin-bottom: 0; }
.section__head .prose .lede { margin-bottom: 1rem; }
.pagehead .status .tag + .tag { margin-left: 6px; }
@media (max-width: 520px) { .pagehead .status .tag { display: inline-block; margin: 0 6px 6px 0; } .pagehead .status .tag + .tag { margin-left: 0; } }
.section__head--single { grid-template-columns: 1fr; }
@media (max-width: 760px) { .section__head { grid-template-columns: 1fr; } }

.panel { background: var(--panel); color: var(--on-panel); border-bottom: 1px solid var(--line-dark); }
.panel h2, .panel h3, .panel h4 { color: #fff; }
.panel p { color: var(--on-panel); }
.panel .muted { color: var(--on-panel-2); }
.panel a { color: #C6DAD5; }
.panel a:hover { color: #fff; }
.panel .rule { border-color: var(--line-dark); }
.statement {
  font-size: clamp(1.6rem, 4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em;
  font-variation-settings: "wdth" 106, "wght" 560; font-weight: 600; max-width: 22ch;
}
.panel__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 80px); align-items: start; }
@media (max-width: 760px) { .panel__grid { grid-template-columns: 1fr; } }

/* ---------- Authority verbs ---------- */
.verbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line-strong); }
.verbs div { padding: 18px 14px; border-right: 1px solid var(--line-strong); }
.verbs div:last-child { border-right: 0; }
.verbs strong { display: block; font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: 4px; }
.verbs span { font-size: .85rem; color: var(--ink-2); display: block; }
@media (max-width: 900px) { .verbs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .verbs div:nth-child(3) { border-right: 0; } .verbs div:nth-child(-n+3) { border-bottom: 1px solid var(--line-strong); } }
@media (max-width: 520px) { .verbs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .verbs div { border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); } .verbs div:nth-child(even) { border-right: 0; } .verbs div:nth-last-child(-n+2) { border-bottom: 0; } }

/* ---------- Bounded blocks (schools, programmes, standards) ---------- */
.bounds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.bounds--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bound { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); position: relative; }
.bounds .bound:nth-child(2n) { padding-left: 28px; border-left: 1px solid var(--line); }
.bounds--3 .bound:nth-child(2n) { padding-left: 0; border-left: 0; }
.bounds--3 .bound:nth-child(3n+2), .bounds--3 .bound:nth-child(3n+3) { padding-left: 28px; border-left: 1px solid var(--line); }
.bound h3 { margin-bottom: 10px; }
.bound h3 a { color: inherit; text-decoration: none; }
.bound h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bound p { font-size: .98rem; }
.bound ul { font-size: .95rem; color: var(--ink-2); columns: 1; }
.bound .tag { margin-top: 12px; }
@media (max-width: 760px) {
  .bounds, .bounds--3 { grid-template-columns: 1fr; }
  .bounds .bound, .bounds--3 .bound { padding-left: 0 !important; padding-right: 0; border-left: 0 !important; }
}

.tag {
  display: inline-block; font-size: .78rem; padding: 4px 9px;
  border: 1px solid var(--line-strong); color: var(--ink-2); white-space: normal;
}
.tag--signal { border-color: var(--signal); color: var(--signal-ink); background: var(--signal-soft); }
.tag--dark { border-color: var(--line-dark); color: var(--on-panel-2); }

/* ---------- Levels (a true sequence) ---------- */
.levels { border-top: 1px solid var(--ink); counter-reset: lvl; }
.level { display: grid; grid-template-columns: 96px minmax(0, 3fr) minmax(0, 6fr); gap: 16px 32px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start; }
.level__n { font-size: 2.2rem; line-height: 1; font-variation-settings: "wdth" 112, "wght" 600; font-weight: 600; color: var(--signal); }
.level h3 { margin-bottom: 4px; }
.level .muted { font-size: .92rem; }
.level p { margin-bottom: 0; }
@media (max-width: 760px) { .level { grid-template-columns: 56px minmax(0, 1fr); } .level > p { grid-column: 2; } .level__n { font-size: 1.6rem; } }

/* ---------- Definition ledger ---------- */
.ledger { border-top: 1px solid var(--ink); }
.ledger__row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 8px 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ledger__row dt { font-variation-settings: "wdth" 100, "wght" 600; font-weight: 600; }
.ledger__row dd { margin: 0; }
.ledger__row dd p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .ledger__row { grid-template-columns: 1fr; } }

/* ---------- Professions ---------- */
.roles { border-top: 1px solid var(--ink); }
.role { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 10px 28px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: start; }
.role h3 { font-size: 1.15rem; }
.role p { font-size: .96rem; margin-bottom: .5rem; }
.role p:last-child { margin-bottom: 0; }
.role .who { font-size: .88rem; color: var(--ink-2); }
.horizon { display: inline-block; font-size: .8rem; padding: 4px 9px; border: 1px solid var(--line-strong); }
.horizon--now { background: var(--ink); color: var(--field); border-color: var(--ink); }
.horizon--near { background: var(--signal-soft); border-color: var(--signal); color: var(--signal-ink); }
.horizon--mid { background: transparent; }
.horizon--spec { border-style: dashed; color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 28px; font-size: .9rem; color: var(--ink-2); align-items: center; }
@media (max-width: 760px) { .role { grid-template-columns: 1fr; } }

/* ---------- Prose blocks ---------- */
.prose { max-width: 70ch; }
.prose h3 { margin: 2rem 0 .6rem; }
.prose h3:first-child { margin-top: 0; }
.prose blockquote { margin: 1.4rem 0; padding-left: 20px; border-left: 3px solid var(--signal); font-size: 1.15rem; line-height: 1.45; }
.prose blockquote p { margin-bottom: .4rem; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.note { border-left: 3px solid var(--line-strong); padding: 12px 18px; background: var(--field-2); font-size: .95rem; max-width: 70ch; }
.section--alt .note { background: var(--field); }
.note p:last-child { margin-bottom: 0; }

/* ---------- Ecosystem ---------- */
.eco { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-dark); }
.eco > div { padding: 24px 22px 28px; border-right: 1px solid var(--line-dark); }
.eco > div:last-child { border-right: 0; }
.eco h3 { font-size: 1.15rem; margin-bottom: 4px; }
.eco .muted { font-size: .85rem; margin-bottom: 14px; display: block; }
.eco p { font-size: .95rem; }
.eco--light { border-color: var(--line-strong); }
.eco--light > div { border-color: var(--line-strong); }
@media (max-width: 760px) { .eco { grid-template-columns: 1fr; } .eco > div { border-right: 0; border-bottom: 1px solid var(--line-dark); } .eco > div:last-child { border-bottom: 0; } .eco--light > div { border-color: var(--line-strong); } }

/* ---------- Page header ---------- */
.pagehead { padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.pagehead h1 { font-size: clamp(2.1rem, 5vw, 4rem); letter-spacing: -0.02em; font-variation-settings: "wdth" 110, "wght" 600; }
.pagehead .lede { margin-top: 18px; margin-bottom: 0; }
.pagehead .status { margin-top: 22px; }

/* ---------- Footer ---------- */
.footer { background: var(--panel); color: var(--on-panel-2); padding: 48px 0 28px; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 28px 32px; }
.footer h4 { color: #fff; font-size: .9rem; margin-bottom: 10px; }
.footer p { color: var(--on-panel-2); font-size: .92rem; max-width: 40ch; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; font-size: .92rem; }
.footer a { color: var(--on-panel); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .wordmark { color: #fff; margin-bottom: 14px; }
.footer .mark rect + rect { stroke: var(--panel); }
.footer .mark rect + rect + rect { fill: var(--panel); }
.colophon { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .84rem; color: var(--on-panel-2); }
.colophon span { max-width: 70ch; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer__grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Utilities ---------- */
.rule { border: 0; border-top: 1px solid var(--line); margin: clamp(28px, 4vw, 48px) 0; }
.mt { margin-top: 24px; }
.mt-lg { margin-top: 40px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- v1.2: featured programme, on-page nav, balanced panels ---------- */
.featured {
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--signal);
  padding: 28px 28px 32px 28px; margin-bottom: 8px;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px clamp(24px, 4vw, 64px); align-items: start;
  background: var(--field-2);
}
.section--alt .featured { background: var(--field); }
.featured h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin-bottom: 10px; }
.featured h3 a { color: inherit; text-decoration: none; }
.featured h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.featured .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.featured p { margin-bottom: .8rem; }
.featured .actions { margin-top: 6px; }
.featured aside { font-size: .95rem; color: var(--ink-2); border-left: 1px solid var(--line-strong); padding-left: 20px; }
.featured aside p { margin-bottom: .6rem; }
@media (max-width: 860px) { .featured { grid-template-columns: 1fr; padding: 22px 18px 24px; } .featured aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; } }

.onpage { border-bottom: 1px solid var(--line); background: var(--field-2); }
.onpage__inner { display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 12px 0; align-items: center; }
.onpage__label { font-size: .8rem; color: var(--ink-2); margin-right: 6px; }
.onpage a { font-size: .9rem; color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; font-variation-settings: "wdth" 100, "wght" 500; font-weight: 500; }
.onpage a:hover { border-bottom-color: var(--signal); color: var(--signal-ink); }

.statement--md { font-size: clamp(1.45rem, 2.6vw, 2.15rem); max-width: 26ch; }
.panel--tight { padding: clamp(40px, 5vw, 72px) 0; }
.panel__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.panel__cols > div > .statement { margin-bottom: 22px; }
.panel__cols h3 { margin: 22px 0 8px; font-size: 1.15rem; }
.panel__cols h3:first-child { margin-top: 0; }
.panel .ledger { border-top-color: var(--on-panel-2); }
.panel .ledger__row { border-bottom-color: var(--line-dark); padding: 12px 0; }
.panel .ledger--compact .ledger__row { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4px 20px; font-size: .95rem; }
@media (max-width: 760px) {
  .panel__cols { display: flex; flex-direction: column; gap: 0; }
  .panel__cols > div { display: contents; }
  .pb-1 { order: 1; } .pb-2 { order: 2; } .pb-3 { order: 3; } .pb-4 { order: 4; }
  .pb-2 { margin-bottom: 22px; }
  .pb-3, .pb-4 { padding-top: 18px; border-top: 1px solid var(--line-dark); margin-bottom: 18px; }
  .panel__cols h3 { margin-top: 0; }
}

.btn--arrow::after { content: " \2192"; }
:target { scroll-margin-top: 80px; }
