:root{
  --bg: #ffffff;
  --band: #f0f0ee;
  --text: #111111;
  --muted: #3f3f3f;
  --label: #4a4a4a;
  --rule: rgba(0,0,0,.10);

  --maxw: 760px;
  --hero-maxw: 795px;
  --gutter: clamp(20px, 6vw, 88px);
  --hero: clamp(420px, 58vh, 720px);

  --toc-width-desktop: 228px;
  --toc-gap-desktop: 56px;
  --toc-width-mobile: 126px;
  --toc-gap-mobile: 18px;
}

*{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{
  color: inherit;
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Header */
header{
  background: var(--bg);
  padding: 22px var(--gutter);
  position: relative;
  z-index: 20;
}

.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.brand{
  display: inline-flex;
  align-items: center;
  min-height: 52px;
}

.brand img{
  height: 60px;
  width: auto;
  display: block;
}

.menu-toggle{
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  margin: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span{
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

nav{
  display: flex;
  gap: clamp(14px, 2vw, 26px);
  align-items: center;
  justify-content: flex-end;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
  flex-wrap: wrap;
}

nav a{
  padding: 8px 0;
}

/* Shared layout */
.container{
  max-width: var(--maxw);
  margin: 0 var(--gutter);
}

.band{
  background: var(--band);
  min-height: var(--hero);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
}

.band > .container{
  width: 100%;
  max-width: var(--hero-maxw);
}

.headline{
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(34px, 4.3vw, 52px);
  line-height: 1.18;
  margin: 0;
}

.subline{
  margin: 22px 0 0 0;
  font-size: 18px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Main content */
main{
  padding: 96px var(--gutter) 110px;
  background: var(--bg);
}

.section{
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}

.section:first-child{
  border-top: 0;
  padding-top: 0;
}

.section-label{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
  margin: 0 0 18px 0;
}

.content p{
  margin: 0 0 18px 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
}

.content p:last-child{
  margin-bottom: 0;
}

.content ul{
  margin: 0 0 18px 0;
  padding-left: 20px;
}

.content li{
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 6px;
}

/* Homepage */
.mission p{
  margin: 0 0 18px 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
}

.mission p:last-child{
  margin-bottom: 0;
}

.pathways{
  margin-top: 96px;
  padding-top: 38px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.card{
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}

.card h3{
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 10px 0;
}

.card p{
  margin: 0 0 12px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  flex-grow: 1;
}

.card a{
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* Reusable hero with TOC */
.hero-with-toc{
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--toc-width-desktop);
  gap: var(--toc-gap-desktop);
  align-items: center;
}

.hero-copy{
  min-width: 0;
}

.toc{
  min-width: 0;
  width: 100%;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
  justify-self: end;
}

.toc-label{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
  margin: 0 0 14px 0;
}

.toc a{
  display: block;
  font-size: 15px;
  color: var(--muted);
  padding: 7px 0;
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Research-specific */
.phase h3{
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 18px;
  margin: 18px 0 10px 0;
}

.phase-status{
  margin-top: 30px;
  color: var(--muted);
}

.docrow{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  margin-top: 18px;
}

.docrow .name{
  font-size: 16px;
  color: var(--text);
}

.docrow .action{
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
}

.doc-note{
  margin-top: 18px;
}

/* Narrative Governance */
.operation{
  margin: 0 0 18px 0;
}

.operation strong{
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Publications */
.paper{
  margin: 42px 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.paper:first-of-type{
  border-top: none;
  padding-top: 0;
}

.paper-title{
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 18px;
  margin-bottom: 10px;
}

.status{
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

.expanded-status{
  margin-bottom: 18px;
}

/* Contact form */
form{
  margin-top: 14px;
}

.grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field{
  display: flex;
  flex-direction: column;
  gap: 7px;
}

label{
  font-size: 14px;
  color: var(--label);
}

input, select, textarea{
  font: inherit;
  font-size: 16px;
  padding: 12px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(0,0,0,.25);
}

textarea{
  min-height: 180px;
  resize: vertical;
}

.full{
  grid-column: 1 / -1;
}

.help{
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  max-width: 70ch;
}

.form-status{
  margin: 0;
}

.form-fallback{
  margin-top: 16px;
}

.actions{
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.check{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 70ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.check input{
  width: 18px;
  height: 18px;
  margin-top: 2px;
  padding: 0;
}

button{
  font: inherit;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

button:hover{
  border-color: rgba(0,0,0,.28);
}

.hp{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer */
footer{
  padding: 46px var(--gutter) 56px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--rule);
}

/* Mobile nav */
@media (max-width: 1040px){
  .menu-toggle{
    display: inline-flex;
    margin-left: auto;
  }

  nav{
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(200px, calc(100vw - (2 * var(--gutter))));
    background: var(--bg);
    border-top: 1px solid var(--rule);
    z-index: 50;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
  }

  nav.open{
    display: flex;
  }

  nav a{
    display: block;
    width: 100%;
    padding: 16px 0 16px 16px;
    border-top: 1px solid var(--rule);
    font-size: 16px;
    color: var(--muted);
  }

  nav a:first-child{
    border-top: 0;
  }
}

/* Responsive */
@media (max-width: 860px){
  :root{
    --hero: clamp(320px, 42vh, 520px);
  }

  header{
    padding: 22px 20px;
  }

  .band{
    padding: 0;
  }

  .band .container{
    margin: 0 30px;
  }

  .container{
    margin: 0;
  }

  .brand img{
    height: 50px;
  }

  main{
    padding: 70px var(--gutter) 84px;
  }

  .content p,
  .content li,
  .mission p{
    font-size: 17px;
    line-height: 1.65;
  }

  .pathways{
    grid-template-columns: 1fr;
  }

  .hero-with-toc{
    grid-template-columns: minmax(0, 1fr) var(--toc-width-mobile);
    gap: var(--toc-gap-mobile);
    align-items: center;
  }

  .toc{
    padding-left: 12px;
  }

  .toc-label{
    margin-bottom: 10px;
  }

  .toc a{
    font-size: 13px;
    line-height: 1.3;
    padding: 6px 0;
  }

  .grid{
    grid-template-columns: 1fr;
  }

  .actions{
    align-items: stretch;
  }
}
