:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-soft: #eef3f2;
  --ink: #17211f;
  --muted: #61706c;
  --line: #d9e0de;
  --line-strong: #bdc8c5;
  --accent: #146c63;
  --accent-dark: #0d4943;
  --blue: #2f6f9f;
  --gold: #a66c10;
  --red: #a84758;
  --shadow: 0 2px 8px rgba(23, 33, 31, 0.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 64px;
  padding: 10px 20px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 7px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--accent-dark);
}

.page {
  min-height: 60vh;
}

.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  background:
    linear-gradient(90deg, rgba(12, 22, 20, 0.92), rgba(12, 22, 20, 0.74) 48%, rgba(12, 22, 20, 0.36)),
    radial-gradient(circle at 82% 18%, rgba(58, 140, 129, 0.55), transparent 28%),
    radial-gradient(circle at 74% 82%, rgba(166, 108, 16, 0.38), transparent 24%),
    linear-gradient(135deg, #10201d, #203b38 45%, #18211f);
  color: white;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  max-width: 1180px;
  min-height: 540px;
  margin: 0 auto;
  padding: 62px 20px;
}

.home-hero .eyebrow {
  color: #9fd8cf;
}

.home-hero .lead {
  color: rgba(255, 255, 255, 0.82);
}

.home-hero .button.secondary {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.home-hero .button.secondary:hover {
  border-color: white;
  color: white;
}

.section,
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding-right: 20px;
  padding-left: 20px;
}

.editorial-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 82px;
  display: grid;
  gap: 14px;
}

.rail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rail-card h2 {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfb;
  font-size: 0.92rem;
}

.rail-links {
  display: grid;
  gap: 2px;
  padding: 8px;
}

.rail-links a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.rail-marker {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #f9fbfb;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 850;
}

.rail-links a:hover,
.rail-links a[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--accent-dark);
}

.rail-disclosure {
  padding: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.main-column {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.16;
  letter-spacing: 0;
}

h1 {
  max-width: 800px;
  font-size: clamp(2rem, 4.4vw, 3.65rem);
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0;
}

.lead {
  max-width: 760px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-disclosure {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-panel {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfb;
  font-weight: 800;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fff;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
}

.mini-table {
  display: grid;
  margin: 0 16px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  font-size: 0.9rem;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.mini-row:last-child {
  border-bottom: 0;
}

.mini-row span {
  color: var(--muted);
}

.mini-row strong {
  font-size: 0.92rem;
  line-height: 1.35;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 750;
}

.section {
  padding-top: 42px;
  padding-bottom: 42px;
}

.main-column .section {
  padding: 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-header p {
  max-width: 700px;
  margin-top: 8px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.six {
  grid-template-columns: repeat(6, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.category-card {
  display: grid;
  gap: 10px;
  min-height: 154px;
  padding: 16px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.category-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.category-dot {
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.category-card:nth-child(2) .category-dot {
  background: var(--blue);
}

.category-card:nth-child(3) .category-dot {
  background: var(--gold);
}

.category-card:nth-child(4) .category-dot {
  background: var(--red);
}

.panel {
  padding: 18px;
}

.empty-state {
  display: grid;
  gap: 8px;
  min-height: 142px;
  align-content: center;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.empty-state strong {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.button:hover {
  background: var(--accent-dark);
  color: white;
}

.button.secondary {
  border-color: var(--line-strong);
  background: white;
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.page-hero .section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.content {
  max-width: 840px;
}

.content h2 {
  margin-top: 30px;
  font-size: 1.45rem;
}

.content p,
.content li {
  color: var(--muted);
}

.content p {
  margin-top: 10px;
}

.content ul {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.article-body {
  max-width: 920px;
}

.article-body h2 {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.article-body h3 {
  margin-top: 22px;
}

.article-body p,
.article-body li {
  color: var(--muted);
}

.article-body p {
  margin-top: 10px;
}

.article-body ul {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.article-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.92rem;
}

.article-table th,
.article-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-table th {
  background: #f9fbfb;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.article-table td {
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.database-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.database-head,
.database-row {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 1.25fr 0.85fr 0.9fr;
  gap: 12px;
  padding: 13px 16px;
}

.database-head {
  border-bottom: 1px solid var(--line);
  background: #f9fbfb;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
  text-transform: uppercase;
}

.database-row {
  color: var(--muted);
}

.database-row.empty {
  display: block;
  padding: 22px 16px;
}

.database-row.empty strong {
  color: var(--ink);
}

.article-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-left: 5px solid var(--accent);
}

.article-featured {
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  align-items: stretch;
  padding: 0;
  border-left: 0;
  overflow: hidden;
}

.article-card-body {
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 20px;
}

.visual-fallback {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 26%, rgba(255, 255, 255, 0.88), transparent 12%),
    radial-gradient(circle at 72% 34%, rgba(47, 111, 159, 0.72), transparent 18%),
    radial-gradient(circle at 58% 78%, rgba(166, 108, 16, 0.52), transparent 20%),
    linear-gradient(135deg, #12342f, #1c5f56 48%, #0d4943);
}

.visual-fallback::before,
.visual-fallback::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  transform: rotate(-12deg);
}

.visual-fallback::before {
  inset: 34px 42px auto auto;
  width: 116px;
  height: 78px;
}

.visual-fallback::after {
  left: 34px;
  bottom: 34px;
  width: 138px;
  height: 92px;
}

.visual-kicker {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 1;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.article-card p {
  color: var(--muted);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-table a,
.database-row a {
  color: var(--accent-dark);
  font-weight: 750;
}

.article-hero-visual {
  position: relative;
  min-height: 280px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 255, 255, 0.92), transparent 11%),
    radial-gradient(circle at 65% 28%, rgba(47, 111, 159, 0.62), transparent 17%),
    radial-gradient(circle at 78% 76%, rgba(168, 71, 88, 0.46), transparent 18%),
    linear-gradient(135deg, #0d4943, #223d4c 52%, #111816);
}

.article-hero-visual::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
}

.article-hero-visual::after {
  content: "";
  position: absolute;
  right: 42px;
  bottom: 42px;
  width: 180px;
  height: 108px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 16px;
  transform: rotate(-8deg);
}

.callout-note {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #f9fbfb;
  color: var(--muted);
}

.method-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-top: 4px solid var(--accent);
}

.method-card:nth-child(2) {
  border-top-color: var(--blue);
}

.method-card:nth-child(3) {
  border-top-color: var(--gold);
}

.method-card:nth-child(4) {
  border-top-color: var(--red);
}

.method-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer {
  border-top: 1px solid var(--line);
  background: #121816;
  color: white;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding-top: 34px;
  padding-bottom: 34px;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.72);
}

.footer nav {
  display: grid;
  gap: 8px;
}

.footer h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.disclosure {
  margin-top: 12px;
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .editorial-layout,
  .hero-inner,
  .grid.six,
  .grid.four,
  .grid.three,
  .grid.two,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .home-hero-inner {
    min-height: 470px;
  }

  .sidebar {
    position: static;
  }

  .rail-links {
    display: flex;
    overflow-x: auto;
  }

  .rail-links a {
    flex: 0 0 auto;
  }

  .grid.six {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-links a {
    padding-right: 10px;
    padding-left: 10px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .home-hero,
  .home-hero-inner {
    min-height: 430px;
  }

  .home-hero-inner {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .article-featured {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .database-head {
    display: none;
  }

  .database-row {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    flex: 1 1 180px;
  }

  .article-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .grid.six {
    grid-template-columns: 1fr;
  }

  .editorial-layout,
  .hero-inner,
  .section,
  .footer-inner {
    padding-right: 16px;
    padding-left: 16px;
  }
}
