/* NTXAI Resources — shared styles for the 5 governance pages.
   Mirrors the homepage palette/typography. Nav block matches index.html. */

:root {
  --bg:        #ffffff;
  --surface:   #f7f5f0;
  --ink:       #14181f;
  --ink-soft:  #3a3f48;
  --muted:     #6b7280;
  --rule:      #e6e2d8;
  --accent:    #1a2c4e;
  --accent-2:  #8a1c2e;
  --focus:     #1a2c4e;
  --amber:     #b8731a;
  --rose:      #8a1c2e;
  --teal:      #196b5a;
  --serif:     'Newsreader', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; transition: color 120ms; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
ul { list-style: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }

.h1, .h2, .h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.h1 { font-size: clamp(40px, 6vw, 60px); line-height: 1.08; }
.h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; margin-bottom: 20px; }
.h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.lede { font-family: var(--serif); font-size: clamp(19px, 2vw, 22px); line-height: 1.55; color: var(--ink-soft); font-weight: 400; }
.eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}

/* ── Top bar (matches homepage) ──────────────── */
#topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
#topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
#brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--ink); }
#brand img { width: 26px; height: 26px; display: block; }
nav#nav ul { display: flex; gap: 28px; list-style: none; align-items: center; }
nav#nav a { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
nav#nav a:hover { color: var(--accent); text-decoration: none; }
nav#nav .cta {
  padding: 9px 18px; border: 1px solid var(--accent); border-radius: 2px;
  background: var(--accent); color: #fff; transition: background 120ms, color 120ms;
}
nav#nav .cta:hover { background: #0f1d36; color: #fff; text-decoration: none; }
nav#nav .social { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); padding: 4px; }
nav#nav .social:hover { color: var(--accent); }
nav#nav .social svg { width: 16px; height: 16px; display: block; }

/* Resources dropdown */
nav#nav .dropdown { position: relative; }
nav#nav .dropdown > button {
  color: var(--ink-soft); font-size: 14px; font-weight: 500; padding: 0;
  display: inline-flex; align-items: center; gap: 4px;
}
nav#nav .dropdown > button:hover { color: var(--accent); }
nav#nav .dropdown > button .caret { display: inline-block; transition: transform 160ms; }
nav#nav .dropdown[open] > button .caret { transform: rotate(180deg); }
nav#nav .dropdown ul.menu {
  position: absolute; top: calc(100% + 10px); left: -16px;
  min-width: 220px; padding: 8px;
  background: #fff; border: 1px solid var(--rule); border-radius: 4px;
  box-shadow: 0 8px 24px rgba(20,24,31,0.08);
  display: none; flex-direction: column; gap: 0;
}
nav#nav .dropdown[open] ul.menu { display: flex; }
nav#nav .dropdown ul.menu li { width: 100%; }
nav#nav .dropdown ul.menu a {
  display: block; padding: 10px 12px; border-radius: 3px;
  font-size: 14px; color: var(--ink-soft);
}
nav#nav .dropdown ul.menu a:hover { background: var(--surface); color: var(--accent); text-decoration: none; }
nav#nav .dropdown ul.menu a.current { color: var(--accent); font-weight: 600; }

/* Hamburger — hidden on desktop, shown ≤820px */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--rule); border-radius: 4px;
  background: #fff; flex-direction: column; gap: 5px;
}
.nav-toggle .bar { width: 18px; height: 2px; background: var(--ink); border-radius: 1px; transition: transform 220ms, opacity 140ms; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.nav-locked { overflow: hidden; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  nav#nav {
    position: fixed; top: 64px; left: 0; right: 0;
    max-height: calc(100vh - 64px); overflow-y: auto;
    background: #fff; border-top: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    display: none; padding: 8px 0 24px;
  }
  nav#nav[data-open="true"] { display: block; }
  nav#nav ul {
    display: flex; flex-flow: row wrap; gap: 0;
    padding: 0 20px; align-items: stretch;
  }
  nav#nav ul > li { width: auto; }
  nav#nav ul > li:not(.social-li):not(.cta-li) {
    flex: 0 0 100%;
    border-bottom: 1px solid var(--rule);
  }
  nav#nav ul > li:not(.social-li):not(.cta-li):not(.dropdown) > a {
    display: block; padding: 14px 4px; font-size: 16px;
  }
  /* Resources dropdown — inline-expand on mobile */
  nav#nav .dropdown > button {
    display: flex; width: 100%; justify-content: space-between; align-items: center;
    padding: 14px 4px; font-size: 16px;
  }
  nav#nav .dropdown ul.menu {
    position: static; box-shadow: none; border: none; min-width: 0;
    padding: 4px 0 8px 14px;
    background: var(--surface);
    display: none;
  }
  nav#nav .dropdown[open] ul.menu { display: flex; }
  nav#nav .dropdown ul.menu a { padding: 12px 8px; border-radius: 0; font-size: 15px; }
  /* Social icons — side-by-side row */
  nav#nav ul > li.social-li {
    flex: 0 0 auto; padding: 14px 4px 8px 0;
    border-bottom: none;
  }
  nav#nav ul > li.social-li:first-of-type { padding-left: 0; }
  nav#nav ul > li.social-li a { padding: 8px; }
  nav#nav ul > li.social-li a svg { width: 20px; height: 20px; }
  /* CTA — full-width row below socials */
  nav#nav ul > li.cta-li {
    flex: 0 0 100%; margin-top: 8px; padding-top: 4px;
  }
  nav#nav ul > li.cta-li .cta {
    display: block; text-align: center; padding: 14px 18px;
  }
}

/* ── Page header ─────────────────────────────── */
.page-head { padding: 64px 0 28px; }
.page-head .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.page-head .crumbs a { color: var(--muted); }
.page-head .crumbs a:hover { color: var(--accent); }
.page-head h1 { font-family: var(--serif); font-size: clamp(34px, 4.6vw, 52px); line-height: 1.1; font-weight: 500; letter-spacing: -0.01em; }
.page-head .lede { margin-top: 18px; max-width: 70ch; }
.page-head .phase-tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
  padding: 4px 10px; border: 1px solid var(--rule); border-radius: 2px;
  background: var(--surface);
}

/* ── Content blocks ──────────────────────────── */
.content { padding: 16px 0 80px; }
.content h2 { margin-top: 48px; }
.content h2:first-child { margin-top: 0; }
.content p { color: var(--ink-soft); margin-bottom: 16px; max-width: 72ch; }
.content p.lead { font-family: var(--serif); font-size: 20px; line-height: 1.5; margin-bottom: 28px; }

.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  margin: 24px 0 32px;
}
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.two-col .col { padding: 24px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); }
.two-col .col h4 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.two-col .col ul li { padding: 6px 0; color: var(--ink-soft); border-bottom: 1px solid var(--rule); }
.two-col .col ul li:last-child { border-bottom: none; }

.check-list { margin: 24px 0; }
.check-list li {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--rule);
  align-items: start;
}
.check-list .ck {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.check-list strong { display: block; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.check-list span { color: var(--ink-soft); font-size: 15px; }

.note, .policy-block {
  margin: 28px 0; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: 2px;
  display: grid; gap: 4px;
}
.note { grid-template-columns: 28px 1fr; gap: 14px; }
.note-icon {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.note h4, .policy-block h4 {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.note p, .policy-block p { color: var(--ink-soft); margin: 0; }

/* ── Risk table ──────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.data-table th, .data-table td { padding: 14px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.data-table thead th {
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.risk-name { font-weight: 600; color: var(--ink); }
.risk-note { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.pill-high { background: rgba(138,28,46,0.10); color: var(--rose); border: 1px solid rgba(138,28,46,0.25); }
.pill-med  { background: rgba(184,115,26,0.10); color: var(--amber); border: 1px solid rgba(184,115,26,0.25); }
.pill-low  { background: rgba(25,107,90,0.10); color: var(--teal); border: 1px solid rgba(25,107,90,0.25); }

/* ── Org chart (committee) ──────────────────── */
.org-wrap { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 32px 0; }
.org-box {
  padding: 18px 22px; border: 1px solid var(--rule); border-radius: 3px;
  background: #fff; text-align: center; min-width: 220px;
}
.org-box.chair { background: var(--accent); color: #fff; border-color: var(--accent); }
.org-box.chair .org-sub { color: rgba(255,255,255,0.7); }
.org-box .org-title { font-family: var(--serif); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.org-box .org-sub { font-size: 12px; color: var(--muted); }
.org-connector { width: 1px; height: 32px; background: var(--rule); }
.org-bottom-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; width: 100%; }
@media (max-width: 880px) { .org-bottom-row { grid-template-columns: repeat(2, 1fr); } }

/* ── Manual blocks (policy) ──────────────────── */
.manual-block { margin: 28px 0; border: 1px solid var(--rule); border-radius: 4px; background: #fff; }
.manual-block .manual-title {
  padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--rule);
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  display: flex; justify-content: space-between; align-items: center;
}
.manual-block .manual-title span { font-weight: 500; color: var(--muted); letter-spacing: 0.06em; }
.rule-item {
  display: grid; grid-template-columns: 36px 1fr; gap: 16px;
  padding: 18px; border-bottom: 1px solid var(--rule); align-items: start;
}
.rule-item:last-child { border-bottom: none; }
.rule-n {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.rule-item h4 { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.rule-item p { font-size: 15px; color: var(--ink-soft); margin: 0; max-width: 80ch; }

/* ── Timeline ───────────────────────────────── */
.milestone-bar { margin: 24px 0 40px; }
.milestones { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.milestone { text-align: center; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.milestone-top { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.milestone.done .milestone-top { color: var(--accent); }
.milestone.active .milestone-top { color: var(--accent-2); }
.milestone-bottom { font-size: 12px; color: var(--ink-soft); line-height: 1.3; padding: 0 4px; }
.milestone-bottom small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.bar-track { height: 4px; background: var(--rule); border-radius: 2px; margin: 12px 0 8px; position: relative; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px; }

.phase-summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 32px 0; }
@media (max-width: 880px) { .phase-summary { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .phase-summary { grid-template-columns: repeat(2, 1fr); } }
.phase-card { padding: 16px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; }
.phase-card .phase-num { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.phase-card .phase-name { font-family: var(--serif); font-size: 16px; font-weight: 600; margin: 6px 0 4px; color: var(--ink); }
.phase-card .phase-time { font-size: 12px; color: var(--muted); }

/* Phase nav (cross-link between resources pages) */
.phase-nav { margin: 56px 0 0; padding: 28px 0 0; border-top: 1px solid var(--rule); }
.phase-nav .label { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.phase-nav .links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media (max-width: 880px) { .phase-nav .links { grid-template-columns: repeat(2, 1fr); } }
.phase-nav .links a {
  display: block; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 3px;
  font-size: 14px; color: var(--ink-soft); background: #fff;
}
.phase-nav .links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.phase-nav .links a.current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* CTA card at bottom of each resource page */
.cta-card {
  margin: 56px 0 0; padding: 32px;
  background: linear-gradient(135deg, var(--accent) 0%, #0f1d36 100%);
  color: #fff; border-radius: 4px;
}
.cta-card h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin-bottom: 8px; color: #fff; }
.cta-card p { color: rgba(255,255,255,0.82); margin-bottom: 18px; max-width: 60ch; }
.cta-card .btn {
  display: inline-block; padding: 11px 22px;
  background: #fff; color: var(--accent); border-radius: 2px;
  font-weight: 600; font-size: 14px;
}
.cta-card .btn:hover { background: rgba(255,255,255,0.92); text-decoration: none; }

/* ── Footer ─────────────────────────────────── */
footer.site { padding: 48px 0 64px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
footer.site .wrap { display: flex; flex-direction: column; gap: 28px; }
footer.site .row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
footer.site .brand-mark { display: flex; align-items: center; gap: 14px; }
footer.site .brand-mark img { height: 40px; width: auto; display: block; }
footer.site .links { display: flex; gap: 24px; flex-wrap: wrap; }
footer.site .links a { color: var(--muted); }
footer.site .links a:hover { color: var(--ink); text-decoration: none; }
footer.site .social-row { display: flex; gap: 16px; align-items: center; }
footer.site .social-row a { color: var(--muted); display: inline-flex; align-items: center; }
footer.site .social-row a:hover { color: var(--accent); }
footer.site .social-row svg { width: 18px; height: 18px; display: block; }
