:root {
  color-scheme: light dark;
  --bg: #f6f5f2;
  --bg-soft: #fbfaf8;
  --surface: #ffffff;
  --surface-soft: #f2f4f7;
  --surface-tint: #eef3f8;
  --text: #243142;
  --text-soft: #3c4a5d;
  --text-muted: #6e7a8b;
  --accent: #1f4f82;
  --marker: #8a7550;
  --accent-soft: #dfeaf6;
  --rule: rgba(59, 74, 93, 0.18);
  --rule-strong: rgba(59, 74, 93, 0.28);
  --shadow: 0 10px 35px rgba(17, 24, 39, 0.05);
  --page-width: 1140px;
  --sidebar-width: 312px;
  --header-height: 64px;
  --radius: 14px;
  --transition: 160ms ease;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121822;
    --bg-soft: #18202c;
    --surface: #1a2230;
    --surface-soft: #202b3b;
    --surface-tint: #1e2d3f;
    --text: #e5ecf4;
    --text-soft: #ced7e3;
    --text-muted: #99a8ba;
    --accent: #8ab8ea;
    --marker: #c9b28a;
    --accent-soft: rgba(138, 184, 234, 0.12);
    --rule: rgba(153, 168, 186, 0.2);
    --rule-strong: rgba(153, 168, 186, 0.34);
    --shadow: 0 14px 38px rgba(2, 6, 23, 0.34);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(31, 79, 130, 0.06) 0, rgba(31, 79, 130, 0) 14rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.64;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), opacity var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 20;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  display: none;
}

.nav-shell {
  width: min(100% - 2rem, var(--page-width));
  margin: 0 auto;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.nav-toggle-bars {
  display: inline-grid;
  gap: 0.2rem;
}

.nav-toggle-bars span {
  display: block;
  width: 1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

.site-nav {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0.7rem;
  right: 0.7rem;
  padding: 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.site-nav-list,
.rail-links,
.meta-list,
.news-list,
.pub-list,
.ledger,
.awards-list,
.mini-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  color: var(--text-soft);
  font-size: 0.98rem;
  font-weight: 600;
}

.nav-link {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active,
.nav-link[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.site-shell,
.footer-shell {
  width: min(100% - 3rem, var(--page-width));
  margin: 0 auto;
}

.site-shell {
  display: grid;
  grid-template-columns: minmax(240px, var(--sidebar-width)) minmax(0, 1fr);
  gap: 3.1rem;
  padding: 2.65rem 0 4.8rem;
}

.left-rail {
  position: sticky;
  top: 2rem;
  align-self: start;
}

.rail-stack {
  padding-bottom: 1.1rem;
}

.rail-photo {
  width: 168px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}

.rail-name {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.rail-role {
  margin: 0.72rem 0 0;
  color: var(--text-soft);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.48;
}

.rail-summary {
  margin: 0.8rem 0 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.62;
}

.rail-section {
  margin-top: 1.28rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--rule);
}

.rail-label,
.section-kicker,
.subsection-label {
  margin: 0 0 0.48rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.meta-list {
  display: grid;
  gap: 0.42rem;
}

.meta-list-inline {
  display: grid;
  gap: 0.42rem;
}

.meta-list li,
.rail-keywords {
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.rail-keywords {
  line-height: 1.55;
}

.rail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem 0.9rem;
}

.rail-links a,
.mini-links a,
.inline-links a,
.pub-links a,
.trend-links a {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  border-bottom: 1px solid transparent;
}

.rail-links a:hover,
.mini-links a:hover,
.inline-links a:hover,
.pub-links a:hover,
.trend-links a:hover,
.rail-links a:focus-visible,
.mini-links a:focus-visible,
.inline-links a:focus-visible,
.pub-links a:focus-visible,
.trend-links a:focus-visible {
  border-bottom-color: currentColor;
}

.main-column {
  min-width: 0;
}

.content-section {
  padding-top: 1.18rem;
  margin-top: 1.72rem;
  border-top: 1px solid var(--rule);
}

.content-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.84rem;
}

.section-heading > div {
  display: grid;
  gap: 0.14rem;
}

.section-heading h2,
.page-title {
  margin: 0;
  color: var(--text);
  font-size: 1.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.16;
}

.section-heading p,
.page-description,
.content-note,
.helper-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.content-note {
  font-size: 0.9rem;
  line-height: 1.45;
}

.intro-copy p {
  margin: 0.82rem 0 0;
  color: var(--text-soft);
  font-size: 1.01rem;
  line-height: 1.72;
}

.section-body > p:first-child,
.intro-copy p:first-child {
  margin-top: 0;
}

.section-body > p:last-child,
.intro-copy p:last-child {
  margin-bottom: 0;
}

.overview-grid {
  display: grid;
  gap: 0.62rem;
  margin-top: 1.15rem;
}

.overview-row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1.15rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.overview-row dt {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.overview-row dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.inline-links,
.pub-links,
.trend-links,
.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem 0.95rem;
  align-items: center;
}

.news-list {
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.news-item {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.68rem 0 0.72rem;
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.news-item:first-child {
  border-top: 0;
}

.news-date,
.pub-year,
.ledger-date,
.award-year,
.trend-year {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.news-copy {
  min-width: 0;
}

.news-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.62;
}

.news-copy .inline-links {
  margin-top: 0.28rem;
}

.news-archive {
  margin-top: 0.42rem;
  padding-top: 0.38rem;
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.news-archive > summary {
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.news-archive > summary::-webkit-details-marker {
  display: none;
}

.news-archive > summary::after {
  content: " +";
}

.news-archive[open] > summary::after {
  content: " -";
}

.subsection {
  margin-top: 0.96rem;
}

.subsection-title {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 700;
}

.pub-list {
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.pub-row {
  display: grid;
  grid-template-columns: 6.1rem minmax(0, 1fr);
  gap: 1.05rem;
  padding: 0.76rem 0 0.8rem;
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.pub-row:first-child {
  border-top: 0;
}

.pub-side {
  display: grid;
  align-content: start;
  gap: 0.26rem;
}

.pub-type {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pub-body {
  min-width: 0;
}

.pub-accent {
  margin: 0 0 0.34rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pub-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.34;
}

.pub-title-highlight {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.36rem;
}

.pub-title-marker {
  color: var(--marker);
  font-size: 0.64em;
  line-height: 1;
  opacity: 0.68;
}

.pub-title-link,
.pub-title-text {
  min-width: 0;
}

.pub-title a,
.pub-title-link,
.pub-title-text {
  color: var(--text);
}

.pub-title a:hover,
.pub-title a:focus-visible,
.pub-title-link:hover,
.pub-title-link:focus-visible {
  color: var(--accent);
}

.pub-authors,
.pub-meta {
  margin: 0.28rem 0 0;
}

.pub-authors {
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.52;
}

.pub-authors strong {
  font-weight: 700;
}

.pub-authors strong u {
  text-underline-offset: 0.14em;
}

.pub-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pub-links {
  margin-top: 0.38rem;
}

.ledger {
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.ledger-row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.72rem 0 0.76rem;
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.ledger-date {
  white-space: nowrap;
}

.ledger-row:first-child {
  border-top: 0;
}

.ledger-body {
  min-width: 0;
}

.ledger-title {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.3;
}

.ledger-org,
.ledger-meta,
.ledger-note {
  margin: 0.22rem 0 0;
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.5;
}

.ledger-meta,
.ledger-note {
  color: var(--text-muted);
}

.awards-list {
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.award-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.62rem 0;
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.award-row:first-child {
  border-top: 0;
}

.award-name {
  color: var(--text-soft);
  font-size: 0.98rem;
  font-weight: 600;
}

.award-org {
  color: var(--text-muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 0.88rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat-cell {
  padding: 0.95rem 0.85rem 0.86rem;
  border-left: 1px solid var(--rule);
}

.stat-cell:first-child {
  border-left: 0;
  padding-left: 0;
}

.stat-cell:last-child {
  padding-right: 0;
}

.stat-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.stat-value {
  margin: 0.34rem 0 0;
  color: var(--text);
  font-size: 1.76rem;
  font-weight: 700;
  line-height: 1.05;
}

.stat-note {
  margin: 0.22rem 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.48;
}

.framed-block {
  margin-top: 0.9rem;
  padding: 0.98rem 1rem 0.94rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg-soft);
}

.status-message {
  margin: 0.8rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.status-message.error {
  color: #b22e2e;
}

@media (prefers-color-scheme: dark) {
  .status-message.error {
    color: #ffb7b7;
  }
}

.charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1rem;
}

.chart-panel h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.32;
}

.chart-panel p {
  margin: 0.28rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.52;
}

.chart-canvas-wrap {
  position: relative;
  min-height: 320px;
  margin-top: 0.82rem;
}

.chart-canvas-wrap canvas {
  width: 100% !important;
  height: 320px !important;
}

.trend-list {
  border-top: 1px solid rgba(59, 74, 93, 0.1);
  margin-top: 0.82rem;
}

.trend-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 0.78rem 0 0.84rem;
  border-top: 1px solid rgba(59, 74, 93, 0.1);
}

.trend-row:first-child {
  border-top: 0;
}

.trend-main {
  min-width: 0;
}

.trend-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.34;
}

.trend-title a {
  color: var(--text);
}

.trend-meta {
  margin: 0.22rem 0 0;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.48;
}

.trend-links {
  justify-content: flex-end;
}

.mobile-only {
  display: none;
}

.site-footer {
  border-top: 1px solid var(--rule);
  background: transparent;
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.2rem 0 1.75rem;
}

.footer-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-note {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.05rem;
}

.footer-links a {
  color: var(--text-soft);
  font-size: 0.96rem;
  font-weight: 600;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
}

@media (max-width: 960px) {
  .site-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--rule);
    background: var(--bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .site-shell {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-top: 1.45rem;
  }

  .left-rail {
    position: static;
  }

  .rail-photo {
    width: 144px;
  }

  .mobile-only {
    display: flex;
  }

  .footer-shell {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .site-shell,
  .footer-shell {
    width: min(100% - 2.5rem, var(--page-width));
  }

  .site-shell {
    gap: 1.55rem;
    padding-bottom: 3.8rem;
  }

  .content-section {
    margin-top: 1.58rem;
    padding-top: 1.06rem;
  }

  .overview-row,
  .news-item,
  .pub-row,
  .ledger-row,
  .trend-row,
  .award-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .stat-cell {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .stat-cell:nth-child(-n + 2) {
    border-top: 0;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .trend-links {
    justify-content: flex-start;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0.82rem;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 1.6rem;
  }

  .rail-name {
    font-size: 2.34rem;
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

  .stat-cell {
    border-top: 1px solid var(--rule);
  }

  .stat-cell:first-child {
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
