/* The Hypervisory Board: modern infrastructure aesthetic, light + dark */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #0b0d12;
  --prose: #1f2430;
  --muted: #5a6172;
  --faint: #8a91a1;
  --line: #e4e7ec;
  --line-hover: #d5d9e1;
  --hover: #eef0f4;
  --header-bg: rgba(255, 255, 255, 0.82);
  --night: #0b0d12;
  --footer-bg: #0b0d12;
  --line-dark: rgba(255, 255, 255, 0.1);
  --accent: #3b5bfd;
  --accent-hover: #2f4ef0;
  --accent-2: #8b5cf6;
  --accent-3: #22d3ee;
  --brass-text: #3346e0;
  --link: #3b5bfd;
  --pill-bg: #eef1ff;
  --quote-bg: linear-gradient(135deg, #eef1ff, #f4efff);
  --quote-border: #dfe4ff;
  --chip-on-bg: #0b0d12;
  --chip-on-fg: #ffffff;
  --destructive: #c2262e;
  --radius-control: 10px;
  --radius-lg: 16px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --shadow: 0 1px 2px rgba(11, 13, 18, 0.04), 0 8px 24px rgba(11, 13, 18, 0.06);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1117;
  --surface: #151922;
  --text: #edeff5;
  --prose: #d3d8e3;
  --muted: #a0a7b8;
  --faint: #6f7789;
  --line: #242a37;
  --line-hover: #343c4d;
  --hover: #1c212c;
  --header-bg: rgba(14, 17, 23, 0.78);
  --night: #08090d;
  --footer-bg: #08090d;
  --brass-text: #8ea0ff;
  --link: #8ea0ff;
  --pill-bg: rgba(59, 91, 253, 0.16);
  --quote-bg: linear-gradient(135deg, rgba(59, 91, 253, 0.14), rgba(139, 92, 246, 0.12));
  --quote-border: rgba(142, 160, 255, 0.25);
  --chip-on-bg: #edeff5;
  --chip-on-fg: #0b0d12;
  --destructive: #ff6b72;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1117;
    --surface: #151922;
    --text: #edeff5;
    --prose: #d3d8e3;
    --muted: #a0a7b8;
    --faint: #6f7789;
    --line: #242a37;
    --line-hover: #343c4d;
    --hover: #1c212c;
    --header-bg: rgba(14, 17, 23, 0.78);
    --night: #08090d;
    --footer-bg: #08090d;
    --brass-text: #8ea0ff;
    --link: #8ea0ff;
    --pill-bg: rgba(59, 91, 253, 0.16);
    --quote-bg: linear-gradient(135deg, rgba(59, 91, 253, 0.14), rgba(139, 92, 246, 0.12));
    --quote-border: rgba(142, 160, 255, 0.25);
    --chip-on-bg: #edeff5;
    --chip-on-fg: #0b0d12;
    --destructive: #ff6b72;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 30; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Masthead */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 14px var(--gutter); flex-wrap: wrap;
}
.masthead-inner .nav { margin-left: auto; }
.wordmark { text-decoration: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wordmark::before {
  content: ""; width: 30px; height: 30px; border-radius: 9px; flex: none;
  background:
    linear-gradient(#fff, #fff) 7px 8px / 16px 3px no-repeat,
    linear-gradient(rgba(255,255,255,.75), rgba(255,255,255,.75)) 7px 14px / 12px 3px no-repeat,
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)) 7px 20px / 8px 3px no-repeat,
    linear-gradient(135deg, var(--accent), var(--accent-2));
}
.wordmark-name { font-family: var(--sans); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.wordmark-name em { font-style: normal; color: var(--link); }
.wordmark-sub { color: var(--faint); font-size: 11px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a {
  text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--hover); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
  margin-left: 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-hover); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--night); color: #f5f7fb; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 30%, transparent 80%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; right: -160px; top: -260px;
  background: radial-gradient(circle, rgba(59,91,253,0.45), rgba(139,92,246,0.18) 45%, transparent 70%);
  filter: blur(20px);
}
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px);
  padding: clamp(64px, 9vw, 128px) var(--gutter) clamp(64px, 8vw, 112px); align-items: center;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 24px; color: #c7cdfb;
  padding: 6px 12px; border: 1px solid var(--line-dark); border-radius: 999px; background: rgba(255,255,255,0.04);
}
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); }
.hero h1 {
  font-family: var(--sans); font-weight: 600; font-size: clamp(42px, 6.2vw, 84px);
  line-height: 1.02; letter-spacing: -0.045em; margin: 0 0 24px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #7c93ff, var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: clamp(17px, 1.5vw, 20px); color: #a9b1c2; max-width: 36em; margin: 0 0 36px; line-height: 1.6; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 15px; font-weight: 500;
  text-decoration: none; padding: 12px 20px; border-radius: var(--radius-control);
  border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer;
  box-shadow: 0 6px 20px rgba(59, 91, 253, 0.35); transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: var(--hover); border-color: var(--line-hover); }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }

/* Committees panel */
.committees {
  background: rgba(255,255,255,0.04); border: 1px solid var(--line-dark); border-radius: 20px;
  padding: 8px 24px 12px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.committees-title { color: #8a91a1; margin: 16px 0 4px; }
.committee {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line-dark); text-decoration: none;
}
.committee:last-child { border-bottom: 0; }
.committee:hover .committee-name { color: #9fb0ff; }
.committee-no { color: var(--accent-3); }
.committee-name { font-family: var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; display: block; transition: color 0.15s; }
.committee-desc { color: #98a1b3; font-size: 14px; line-height: 1.5; display: block; margin-top: 4px; }
.committee-count { color: #8a91a1; white-space: nowrap; }

/* Sections */
.section { padding: clamp(56px, 7vw, 96px) var(--gutter); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { font-family: var(--sans); font-weight: 600; font-size: clamp(28px, 3.2vw, 40px); margin: 0; letter-spacing: -0.035em; }
.text-link { font-size: 15px; font-weight: 500; color: var(--link); text-decoration: none; }
.text-link::after { content: " \2192"; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }
.card {
  text-decoration: none; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-hover); }
.card-cover { aspect-ratio: 16 / 9; background: var(--hover); overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-cover img { transform: scale(1.03); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.card-meta { color: var(--brass-text); display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; }
.card-meta span[aria-hidden] { color: var(--faint); }
.card-title { font-family: var(--sans); font-weight: 600; font-size: 21px; line-height: 1.25; margin: 0; letter-spacing: -0.025em; }
.card-excerpt { color: var(--muted); margin: 0; font-size: 15.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.grid.lead-first > .card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; }
.grid.lead-first > .card:first-child .card-cover { aspect-ratio: auto; min-height: 320px; }
.grid.lead-first > .card:first-child .card-body { padding: clamp(24px, 3vw, 48px); justify-content: center; gap: 14px; }
.grid.lead-first > .card:first-child .card-title { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.035em; }
.grid.lead-first > .card:first-child .card-excerpt { font-size: 17px; -webkit-line-clamp: 4; }
.status { color: var(--muted); }
.status.error { color: var(--destructive); }
.more-wrap { margin-top: 40px; text-align: center; }

/* Chair strip */
.chair { padding: 0 var(--gutter) clamp(56px, 7vw, 96px); }
.chair-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 72px);
  padding: clamp(32px, 5vw, 56px); background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
}
.chair h2 { font-family: var(--sans); font-weight: 600; font-size: clamp(26px, 2.8vw, 36px); margin: 8px 0 0; letter-spacing: -0.035em; }
.chair p { margin: 0 0 18px; max-width: 40em; color: var(--muted); }

/* Feed page */
.page-head { padding: clamp(48px, 6vw, 88px) var(--gutter) 0; }
.page-head h1 { font-family: var(--sans); font-weight: 600; font-size: clamp(38px, 5.2vw, 64px); line-height: 1.05; margin: 10px 0 14px; letter-spacing: -0.045em; }
.page-head .lede { color: var(--muted); max-width: 40em; margin: 0; font-size: 18px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.chip {
  font-family: var(--sans); font-size: 14px; font-weight: 500; padding: 7px 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; cursor: pointer; text-decoration: none; transition: all 0.15s;
}
.chip:hover { border-color: var(--line-hover); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); border-color: var(--chip-on-bg); }

/* Post page */
.post-head { padding: clamp(48px, 6vw, 88px) var(--gutter) 32px; max-width: 1040px; margin: 0 auto; text-align: center; }
.post-head #post-cats { display: inline-flex; gap: 8px; }
.post-head #post-cats a { color: var(--brass-text); padding: 5px 12px; border-radius: 999px; background: var(--pill-bg); }
.post-head h1 { font-family: var(--sans); font-weight: 600; font-size: clamp(34px, 4.8vw, 60px); line-height: 1.08; letter-spacing: -0.045em; margin: 20px 0 22px; }
.post-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); align-items: center; justify-content: center; }
.byline { display: flex; align-items: center; gap: 10px; color: var(--text); }
.byline img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.post-cover { padding: 0 var(--gutter); max-width: 1200px; margin: 0 auto; }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 20px; border: 1px solid var(--line); }
.post-layout { max-width: 720px; margin: 0 auto; padding: 48px 20px 24px; }
.prose { font-size: 18.5px; line-height: 1.75; color: var(--prose); }
.prose h2, .prose h3 { font-family: var(--sans); font-weight: 600; line-height: 1.25; letter-spacing: -0.03em; margin: 2em 0 0.6em; color: var(--text); }
.prose h2 { font-size: 28px; }
.prose h3 { font-size: 22px; }
.prose p { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.prose li { margin-bottom: 0.6em; padding-left: 0.2em; }
.prose li p { margin: 0; }
.prose li::marker { color: var(--link); font-weight: 600; }
.prose ol li::marker { font-family: var(--mono); font-size: 0.85em; }
.prose blockquote {
  margin: 2em 0; padding: 24px 28px; border-radius: 16px; position: relative;
  background: var(--quote-bg); border: 1px solid var(--quote-border);
  font-size: 22px; line-height: 1.45; font-weight: 500; letter-spacing: -0.02em; color: var(--text);
}
.prose blockquote p { margin: 0; }
.prose a { color: var(--link); text-underline-offset: 3px; }
.prose a.btn { color: #fff; text-decoration: none; }
.prose strong { color: var(--text); font-weight: 600; }
.post-foot { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags .chip::before { content: "#"; color: var(--faint); margin-right: 2px; }
.like { display: inline-flex; gap: 8px; align-items: center; }
.like::before { content: "\2661"; font-size: 16px; line-height: 1; }
.like[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.like[aria-pressed="true"]::before { content: "\2665"; }
.disclaimer { color: var(--faint); font-size: 14px; margin-top: 24px; }
.notfound { padding: 96px var(--gutter); text-align: center; }
.notfound h1 { font-family: var(--sans); font-weight: 600; font-size: 44px; letter-spacing: -0.04em; margin: 0 0 12px; }
#related-wrap { border-top: 1px solid var(--line); }

/* About */
.about-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 6vw, 88px); padding: clamp(48px, 6vw, 88px) var(--gutter); align-items: start; }
.about-layout > div:first-child { position: sticky; top: 96px; }
.about-layout h1 { font-family: var(--sans); font-weight: 600; font-size: clamp(38px, 4.8vw, 60px); line-height: 1.05; margin: 10px 0 0; letter-spacing: -0.045em; }
.record { list-style: none; padding: 8px 20px; margin: 28px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.record li { display: grid; grid-template-columns: 116px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.record li:last-child { border-bottom: 0; }
.record .mono { color: var(--brass-text); padding-top: 3px; font-size: 11px; }

/* Footer */
.footer { background: var(--footer-bg); color: #98a1b3; border-top: 1px solid var(--line); }
.footer-inner { padding: 48px var(--gutter); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.footer .wordmark-name { color: #fff; font-size: 18px; }
.footer .wordmark-name em { color: #8ea0ff; }
.footer p { margin: 8px 0 0; font-size: 14px; max-width: 36em; }
.footer a { color: #8ea0ff; }

@media (max-width: 860px) {
  .wordmark-sub { display: none; }
  .masthead-inner { gap: 10px; padding-top: 12px; padding-bottom: 8px; }
  .theme-toggle { order: 1; margin-left: auto; width: 34px; height: 34px; }
  .masthead-inner .nav { order: 2; flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 16px); margin: 0 -8px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .hero-inner, .chair-inner, .about-layout { grid-template-columns: 1fr; }
  .about-layout > div:first-child { position: static; }
  .grid.lead-first > .card:first-child { grid-template-columns: 1fr; }
  .grid.lead-first > .card:first-child .card-cover { min-height: 0; aspect-ratio: 16 / 9; }
  .post-cover img { max-height: 240px; border-radius: 14px; }
  .prose { font-size: 17px; }
  .prose blockquote { font-size: 19px; padding: 20px; }
  .record li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
/* Author photo */
.portrait { width: 100%; max-width: 380px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 0; height: auto; border-radius: 20px; border: 1px solid var(--line); margin: 0 0 28px; background: #111; }
.chair-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; object-position: 50% 50%; border: 1px solid var(--line); margin: 0 0 18px; background: #111; }
@media (max-width: 860px) {
  .portrait { max-width: 100%; aspect-ratio: 1 / 1; object-position: 50% 6%; }
  .chair-photo { width: 96px; height: 96px; }
}
/* Disclaimers */
.footer .footer-disclaimer { font-size: 12.5px; line-height: 1.55; color: #7d8597; max-width: 44em; margin-top: 10px; }
.disclaimer { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); line-height: 1.55; }
.disclaimer strong { color: var(--text); font-weight: 600; }
