:root {
  --accent: #245c63;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --text: #1d2426;
  --muted: #657074;
  --border: #dfe3e2;
  --max-width: 72rem;
  --content-width: 48rem;
  --radius: 0.8rem;
  --shadow: 0 0.3rem 1.2rem rgb(0 0 0 / 0.05);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 0.12em; }

img, svg { max-width: 100%; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--text);
  color: #fff;
  border-radius: 0.4rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-inner { min-height: 4.5rem; }

.site-brand {
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.main-nav ul,
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--text); }

.site-main { min-height: calc(100vh - 9rem); }

.content-shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.hero { padding-block: clamp(4rem, 10vw, 8rem) 2.5rem; }

.hero h1,
.page-header h1,
.error-page h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.3rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.76rem;
}

.lead {
  max-width: 42rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.3vw, 1.3rem);
}

.prose { margin-top: 2rem; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3 { line-height: 1.2; margin-top: 2.2em; }
.prose code { padding: 0.12em 0.35em; background: #ecefed; border-radius: 0.25rem; }

.link-section { padding-block: 1rem 5rem; }
.link-section h2 { font-size: 1rem; color: var(--muted); }

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.link-card {
  position: relative;
  display: grid;
  gap: 0.4rem;
  min-height: 9rem;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 130ms ease, border-color 130ms ease;
}

.link-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent), white 45%); }
.link-card__title { font-weight: 700; }
.link-card__text { color: var(--muted); font-size: 0.93rem; }
.link-card__arrow { align-self: end; color: var(--accent); font-size: 1.4rem; }

.page-content { padding-block: clamp(3rem, 8vw, 6rem); }
.page-header { padding-top: clamp(3rem, 8vw, 6rem); }
.page-content .page-header { padding-top: 0; }

.button-link {
  display: inline-block;
  padding: 0.65rem 0.95rem;
  border-radius: 0.45rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.chart-page { padding-bottom: 3rem; }
.chart-shell {
  width: min(calc(100% - 2rem), 100rem);
  margin: 2rem auto 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.chart-container { width: 100%; min-height: 68vh; }
.chart-error { padding: 2rem; color: #8a2626; }

.org-node {
  height: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d7dcda;
  border-top: 0.28rem solid var(--accent);
  border-radius: 0.65rem;
  background: #fff;
  box-shadow: 0 0.25rem 0.8rem rgb(0 0 0 / 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.org-node__name { font-weight: 750; color: #1d2426; }
.org-node__role { margin-top: 0.25rem; color: #657074; font-size: 0.86rem; }

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner { min-height: 4.5rem; }
.site-footer a { color: inherit; }

.error-page { padding-block: 7rem; }

@media (max-width: 46rem) {
  .header-inner,
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 1rem; }
  .link-grid { grid-template-columns: 1fr; }
  .main-nav ul { gap: 0.75rem; }
  .hero h1, .page-header h1, .error-page h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
