:root {
  color-scheme: light;
  --ink: #17211e;
  --muted: #57635f;
  --line: #ccd5d1;
  --paper: #ffffff;
  --soft: #f2f5f3;
  --green: #0b6b4b;
  --green-dark: #16352d;
  --blue: #165f9c;
  --red: #bd3038;
  --focus: #f1b928;
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--blue); }
a:hover { color: var(--green); }
a:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

img { display: block; max-width: 100%; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { overflow-wrap: anywhere; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--green-dark);
  color: #fff;
}

.header-inner {
  width: min(calc(100% - 40px), var(--max));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 19px;
  font-weight: 750;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand img { border: 2px solid rgba(255, 255, 255, 0.8); }

.site-header nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 6px;
}
.site-header nav a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  border-bottom: 3px solid transparent;
  color: #e9f1ee;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.site-header nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.site-header nav a[aria-current="page"] { border-bottom-color: #38be87; color: #fff; }

.hero {
  min-height: 540px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.hero-inner {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(0, 680px);
  align-items: center;
  gap: clamp(42px, 8vw, 110px);
}
.hero-logo {
  width: min(100%, 300px);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  box-shadow: 18px 18px 0 var(--green), -12px -12px 0 var(--red);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.hero h1, .page-header h1, .not-found h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1;
  font-weight: 780;
}
.lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: #3d4a46;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.45;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border: 1px solid var(--green-dark);
  border-radius: 4px;
  font-weight: 750;
  text-decoration: none;
}
.button.primary { background: var(--green-dark); color: #fff; }
.button.primary:hover { background: var(--green); color: #fff; }
.button.secondary { background: transparent; color: var(--green-dark); }
.button.secondary:hover { background: #e4ece8; color: var(--green-dark); }

.section-inner {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}
.release-band, .workflow-band, .database-band { padding: 82px 0; }
.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: baseline;
  margin-bottom: 44px;
}
.section-heading h2, .workflow-grid h2, .database-summary h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}
.release-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.release-grid article { min-width: 0; padding: 30px 36px 34px 0; }
.release-grid article + article { padding-left: 36px; border-left: 1px solid var(--line); }
.release-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; }
.release-meta span { color: var(--ink); font-weight: 750; }
.release-grid h3 { margin: 20px 0 12px; color: var(--green); font-size: 36px; line-height: 1; }
.release-notes { min-height: 88px; color: var(--muted); }
.release-notes h2, .release-notes h3 { margin: 12px 0 4px; color: var(--ink); font-size: 16px; }
.release-notes p { margin: 0 0 8px; }
.release-notes ul { margin: 4px 0 12px; padding-left: 20px; }
.text-link, .quiet-link { display: block; width: fit-content; margin-top: 18px; font-weight: 750; }
.quiet-link { margin-top: 8px; color: var(--muted); font-weight: 600; }

.workflow-band { background: var(--green-dark); color: #fff; }
.workflow-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr); align-items: center; gap: 80px; }
.workflow-grid .eyebrow { color: #59d7a2; }
.workflow-grid p:not(.eyebrow) { color: #c9d8d3; }
.workflow-grid code { color: #fff; }
.terminal { border: 1px solid #70857e; background: #101b18; box-shadow: 10px 10px 0 var(--blue); }
.terminal-title { padding: 8px 14px; border-bottom: 1px solid #4b5e58; color: #a9bbb5; font-size: 12px; }
.terminal pre { margin: 0; padding: 24px; overflow-x: auto; color: #f4f7f6; font-size: 15px; line-height: 1.8; }
.terminal pre span { color: #59d7a2; }

.database-band { border-bottom: 8px solid var(--red); }
.database-summary { display: grid; grid-template-columns: 1fr 2fr; gap: 80px; align-items: center; }
.big-number { margin: 0; color: var(--blue); font-size: clamp(72px, 12vw, 150px); font-weight: 800; line-height: 0.9; }
.database-summary > div:first-child p:last-child { max-width: 320px; color: var(--muted); }

.page-header {
  padding: 74px 0 68px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.page-header > div { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.page-header h1 { font-size: clamp(40px, 6vw, 68px); }
.page-header .button { margin-top: 28px; }
.database-header { border-bottom: 6px solid var(--blue); }

.content-band { padding: 64px 0 100px; }
.content-grid, .article-layout {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 210px minmax(0, 760px);
  gap: 70px;
}
.toc { position: sticky; top: 100px; align-self: start; border-top: 1px solid var(--ink); }
.toc a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--green); }
.prose { min-width: 0; }
.prose h2 { margin: 58px 0 14px; font-size: 30px; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 36px 0 10px; font-size: 22px; }
.prose p, .prose li { color: #35413d; }
.prose pre {
  max-width: 100%;
  padding: 20px;
  overflow-x: auto;
  border-left: 4px solid var(--green);
  background: #15201d;
  color: #f4f7f6;
  line-height: 1.65;
}
.prose img { height: auto; }
.command-list { border-top: 1px solid var(--ink); }
.command-list > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.command-list span { font-weight: 750; }
.command-list code { color: var(--green-dark); }
.download-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.download-row:last-of-type { border-bottom: 1px solid var(--line); }
.download-row strong, .download-row span { display: block; }
.download-row span { color: var(--muted); font-size: 14px; }
.asset-row { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0 8px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }

.link-sections {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.link-sections article { padding: 28px 36px 24px 0; }
.link-sections article + article { padding-left: 36px; border-left: 1px solid var(--line); }
.link-sections h2 { margin: 6px 0 12px; font-size: 25px; }
.link-sections p:not(.section-index) { color: var(--muted); }
.section-index { margin: 0; color: var(--red); font-family: monospace; font-weight: 750; }

.table-band { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 54px 0 100px; }
.table-tools { display: grid; grid-template-columns: auto minmax(250px, 500px) 1fr; align-items: center; gap: 16px; margin-bottom: 24px; }
.table-tools label { font-weight: 750; }
.table-tools input { width: 100%; height: 44px; padding: 8px 12px; border: 1px solid #8c9994; border-radius: 3px; font: inherit; }
.table-tools p { justify-self: end; margin: 0; color: var(--muted); font-size: 14px; }
.table-scroll { overflow-x: auto; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
table { width: 100%; min-width: 820px; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-size: 13px; }
td { font-size: 14px; }
tbody tr:hover { background: #f5faf7; }
td code { color: var(--green); font-weight: 750; }
.no-results { padding: 30px; border-bottom: 1px solid var(--line); text-align: center; }

.article-layout { grid-template-columns: 230px minmax(0, 760px); }
.source-note { position: sticky; top: 100px; align-self: start; padding: 18px 0; border-top: 2px solid var(--green); border-bottom: 1px solid var(--line); }
.source-note p { color: var(--muted); }
.rendered-markdown h1 { display: none; }
.rendered-markdown table { min-width: 650px; }

.not-found { width: min(calc(100% - 40px), 760px); min-height: 65vh; margin: 0 auto; padding: 110px 0; }
.not-found p:not(.eyebrow) { max-width: 620px; color: var(--muted); font-size: 20px; }

.site-footer { padding: 34px max(20px, calc((100% - var(--max)) / 2)); background: #101916; color: #d3ddd9; }
.site-footer > div { display: flex; justify-content: space-between; gap: 30px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: #d3ddd9; }
.site-footer small { display: block; margin-top: 18px; color: #899a94; }

@media (max-width: 820px) {
  .header-inner { width: 100%; min-height: auto; padding: 10px 16px 0; flex-wrap: wrap; gap: 4px; }
  .brand { padding-bottom: 8px; }
  .site-header nav { width: 100%; height: 42px; overflow-x: auto; }
  .site-header nav a { flex: 0 0 auto; padding: 0 10px; }
  .hero { min-height: 590px; padding: 62px 0; }
  .hero-inner { grid-template-columns: 120px minmax(0, 1fr); gap: 42px; }
  .hero-logo { box-shadow: 10px 10px 0 var(--green), -7px -7px 0 var(--red); }
  .section-heading, .database-summary { grid-template-columns: 1fr; gap: 20px; }
  .workflow-grid { grid-template-columns: 1fr; gap: 44px; }
  .release-grid, .link-sections { grid-template-columns: 1fr; }
  .release-grid article, .release-grid article + article, .link-sections article, .link-sections article + article { padding: 28px 0; border-left: 0; }
  .release-grid article + article, .link-sections article + article { border-top: 1px solid var(--line); }
  .content-grid, .article-layout { grid-template-columns: 1fr; gap: 34px; }
  .toc, .source-note { position: static; }
  .toc { display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .toc a { border-bottom: 0; }
  .table-tools { grid-template-columns: 1fr; }
  .table-tools p { justify-self: start; }
}

@media (max-width: 560px) {
  .site-header nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: auto; overflow: visible; }
  .site-header nav a { min-height: 44px; justify-content: center; padding: 5px 3px; font-size: 12px; line-height: 1.2; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo { width: 120px; }
  .hero h1 { font-size: 46px; }
  .release-band, .workflow-band, .database-band { padding: 58px 0; }
  .page-header { padding: 54px 0; }
  .page-header h1 { font-size: 42px; overflow-wrap: anywhere; }
  .lead { font-size: 18px; }
  .terminal { box-shadow: 6px 6px 0 var(--blue); }
  .terminal pre { padding: 16px; font-size: 13px; }
  .command-list > div { grid-template-columns: 1fr; gap: 4px; }
  .download-row { align-items: stretch; flex-direction: column; }
  .site-footer > div { flex-direction: column; }
}

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