/* ─── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #faf8f5;
  --surface:     #f0ede8;
  --border:      #e2ddd6;
  --text:        #1c1a17;
  --text-muted:  #6b6560;
  --accent:      #2a6b6b;
  --accent-light:#e6f0f0;
  --link:        #1f5c5c;
  --link-hover:  #0f3d3d;
  --nav-width:   260px;
  --content-max: 760px;
  font-size: 17px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar nav ──────────────────────────────────────────────── */
.sidebar {
  width: var(--nav-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 2rem 1.25rem;
}

.sidebar .site-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: block;
}

.sidebar nav h2 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav ul li a {
  display: block;
  padding: 0.3rem 0.5rem;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  background: var(--accent-light);
  color: var(--link);
}

/* ─── Main content ─────────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 3rem 2.5rem 6rem;
  max-width: calc(var(--content-max) + 5rem);
}

.content {
  max-width: var(--content-max);
}

/* ─── Typography ───────────────────────────────────────────────── */
h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  padding-top: 0.5rem;
  border-top: 2px solid var(--border);
  color: var(--text);
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

p { margin-bottom: 1rem; }

ul, ol {
  margin: 0.5rem 0 1rem 1.4rem;
}

li { margin-bottom: 0.35rem; }

strong { font-weight: 700; }

em { font-style: italic; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--accent-light);
  color: var(--text);
  font-style: italic;
  border-radius: 0 6px 6px 0;
}

blockquote p { margin-bottom: 0; }

/* ─── Tables ───────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0 1.5rem;
}

th {
  background: var(--surface);
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  vertical-align: top;
}

tr:nth-child(even) td { background: var(--surface); }

/* ─── Links ────────────────────────────────────────────────────── */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--link-hover); }

/* ─── Deep-dive link pill ──────────────────────────────────────── */
a.deepdive {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 0.15rem 0.65rem;
  text-decoration: none;
  margin-left: 0.3rem;
  vertical-align: middle;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

a.deepdive:hover {
  background: var(--accent);
  color: #fff;
}

/* ─── Header banner ────────────────────────────────────────────── */
.page-header {
  background: var(--accent);
  color: #fff;
  padding: 2rem 2.5rem 1.75rem;
  margin: -3rem -2.5rem 2.5rem;
}

.page-header h1 { color: #fff; font-size: 1.6rem; margin-bottom: 0.25rem; }
.page-header .subtitle { color: rgba(255,255,255,0.75); margin-bottom: 0; }

/* ─── Proposal cover block ─────────────────────────────────────── */
.cover {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
  background: var(--surface);
}

.cover h1 { font-size: 1.8rem; margin-bottom: 0.25rem; }
.cover .tagline { font-size: 1rem; color: var(--text-muted); margin-bottom: 1rem; }
.cover .meta { font-size: 0.85rem; color: var(--text-muted); }
.cover .funding { font-size: 1rem; font-weight: 700; color: var(--accent); margin-top: 0.5rem; }

/* ─── Draft notice ─────────────────────────────────────────────── */
.draft-notice {
  background: #fff8e6;
  border: 1px solid #e8c84a;
  border-radius: 6px;
  padding: 0.9rem 1.25rem;
  font-size: 0.88rem;
  color: #5a4a00;
  margin-bottom: 2.5rem;
}

/* ─── Persona cards ────────────────────────────────────────────── */
.persona-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: #fff;
}

.persona-card .persona-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.persona-card .persona-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ─── Section anchor offset (for sticky nav) ───────────────────── */
section[id] {
  scroll-margin-top: 1.5rem;
}

/* ─── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body { flex-direction: column; }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem;
  }

  .sidebar nav { display: none; } /* collapsed on mobile — could be toggled with JS */

  .main { padding: 1.5rem 1.25rem 4rem; }

  .page-header { margin: -1.5rem -1.25rem 2rem; padding: 1.5rem 1.25rem; }
}
