
:root {
  color-scheme: dark;
  --page: #0d0f0e;
  --surface: #131614;
  --surface-raised: #181d19;
  --border: #29312b;
  --text: #f0f2ec;
  --muted: #a0aaa0;
  --quiet: #737e74;
  --accent: #c6f36a;
  --accent-ink: #17200b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--page);
  background-size: 48px 48px;
  letter-spacing: -.015em;
  line-height: 1.65;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  padding: .5rem .75rem;
  transform: translateY(-160%);
  border-radius: .375rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 1;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(13,15,14,.94);
  backdrop-filter: blur(14px);
}

.site-nav {
  display: flex;
  width: min(100% - 2rem, 1160px);
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 auto;
}

.site-logo {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
}

.site-logo img {
  display: block;
  width: auto;
  height: 26px;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
}

.site-nav-links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: .375rem .75rem;
  border-radius: 5px;
  color: #aeb7ad;
  font-size: .82rem;
  font-weight: 550;
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}

.site-nav-links a:hover,
.site-nav-links a[aria-current="page"] {
  color: var(--accent);
  background: rgba(198,243,106,.08);
}

.page-shell {
  width: min(100% - 2rem, 1160px);
  margin: 0 auto;
}

.hero {
  max-width: 760px;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 2.75rem;
}

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 680;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.hero-copy,
.section-copy {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.library-section {
  padding: 1.5rem 0 5rem;
}

.section-heading {
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  margin-bottom: .35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -.025em;
  line-height: 1.25;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .92rem;
}

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
}

.architecture-card {
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: linear-gradient(160deg, var(--surface-raised), var(--surface) 72%);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.architecture-card:hover {
  transform: translateY(-2px);
  border-color: #536247;
}

.card-topline {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.4rem;
}

.card-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: none;
  place-items: center;
  border: 1px solid rgba(198,243,106,.27);
  border-radius: .75rem;
  background: rgba(198,243,106,.07);
  color: var(--accent);
}

.card-icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.category {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: .2rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.2;
}

.architecture-card h3 {
  margin-bottom: .5rem;
  font-size: 1.2rem;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.architecture-card p {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: .9rem;
}

.card-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding: .55rem .85rem;
  border: 1px solid #3a443b;
  border-radius: 5px;
  color: var(--text);
  font-size: .85rem;
  font-weight: 650;
  text-decoration: none;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.card-link:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.card-link svg {
  width: 1rem;
  height: 1rem;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--quiet);
  font-size: .82rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.notice {
  margin: 1.5rem 0 5rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: .5rem;
  background: rgba(255,255,255,.02);
  color: var(--muted);
}

.notice strong {
  color: var(--text);
}

.notice a {
  color: var(--accent);
}

.docs-header {
  position: sticky;
  z-index: 5;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(13,15,14,.96);
  backdrop-filter: blur(12px);
}

.docs-header-inner {
  display: flex;
  width: min(100% - 2rem, 1440px);
  min-height: 3.75rem;
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
}

.docs-brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  text-decoration: none;
}

.docs-brand img {
  display: block;
  width: auto;
  height: 23px;
}

.docs-breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .55rem;
  color: var(--quiet);
  font-size: .79rem;
}

.docs-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

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

.docs-breadcrumb span:last-child {
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-layout {
  display: grid;
  width: min(100% - 2rem, 1440px);
  grid-template-columns: 196px minmax(0, 1fr) 190px;
  align-items: start;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  margin: 0 auto;
}

.docs-sidebar {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 5.75rem);
  overflow-y: auto;
  padding: 1.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.toc-details > summary {
  display: none;
}

.toc-label,
.rail-heading {
  margin: 0 0 .65rem;
  color: var(--quiet);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.docs-toc {
  display: grid;
  gap: .12rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.docs-toc a {
  display: block;
  padding: .38rem .55rem;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color .14s ease, background .14s ease, border-color .14s ease;
}

.docs-toc a:hover {
  color: var(--text);
  background: rgba(255,255,255,.035);
}

.docs-toc a[aria-current="location"] {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(198,243,106,.055);
}

.docs-main {
  min-width: 0;
  padding: 1.75rem 0 5rem;
}

.docs-title-block {
  padding: .2rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.35rem;
}

.docs-title-block .eyebrow {
  margin-bottom: .45rem;
  font-size: .66rem;
}

.docs-title-block h1 {
  margin-bottom: .5rem;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  letter-spacing: -.035em;
  line-height: 1.16;
}

.docs-title-block p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: .92rem;
}

.docs-section {
  padding: 2.15rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 5.25rem;
}

.docs-section:first-of-type {
  padding-top: 0;
}

.docs-section:last-child {
  border-bottom: 0;
}

.docs-section h2 {
  margin: 0 0 .8rem;
  color: var(--text);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.3;
}

.docs-section h3 {
  margin: 1.5rem 0 .5rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.4;
}

.docs-section h4 {
  margin: 1rem 0 .3rem;
  color: var(--text);
  font-size: .86rem;
  font-weight: 650;
}

.docs-section p,
.docs-section li {
  color: #c1c8c0;
  font-size: .88rem;
  line-height: 1.75;
}

.docs-section p {
  margin-bottom: .85rem;
}

.docs-section ul,
.docs-section ol {
  padding-left: 1.2rem;
  margin: .5rem 0 1rem;
}

.docs-section li + li {
  margin-top: .25rem;
}

.docs-section strong,
.right-rail strong {
  color: var(--text);
  font-weight: 650;
}

.docs-section a,
.right-rail a {
  color: var(--accent);
  text-decoration-color: rgba(198,243,106,.45);
  text-underline-offset: 3px;
}

.docs-section a:hover,
.right-rail a:hover {
  text-decoration-color: currentColor;
}

.docs-section code,
.right-rail code {
  padding: .08rem .3rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255,255,255,.035);
  color: #d7edaf;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .83em;
}

.docs-section pre {
  overflow-x: auto;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin: .75rem 0 1rem;
  background: #090b09;
  color: #dce5d8;
  font-size: .8rem;
  line-height: 1.65;
  tab-size: 2;
}

.section-kicker {
  margin-bottom: .35rem !important;
  color: var(--accent) !important;
  font-size: .67rem !important;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.diagram-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 1.1rem 0 .55rem;
  background: #0c0f0d;
}

.diagram-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.diagram-scroll:focus-visible,
.docs-table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.architecture-diagram {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
  font-family: inherit;
}

.architecture-diagram .zone {
  fill: #101411;
  stroke: #303a32;
  stroke-width: 1.2;
}

.architecture-diagram .zone-label {
  fill: #98a598;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.architecture-diagram .node rect,
.architecture-diagram .node path.node-shape {
  fill: #171d18;
  stroke: #465345;
  stroke-width: 1.4;
}

.architecture-diagram .node text {
  fill: #e5e9e1;
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
}

.architecture-diagram .node .subtext {
  fill: #a0aaa0;
  font-size: 11px;
  font-weight: 450;
}

.architecture-diagram .node {
  cursor: pointer;
  outline: none;
}

.architecture-diagram .node:hover rect,
.architecture-diagram .node:focus rect,
.architecture-diagram .node.is-selected rect,
.architecture-diagram .node.is-related rect {
  stroke: var(--accent);
}

.architecture-diagram .node.is-selected rect {
  fill: #202a1d;
  stroke-width: 2.2;
}

.architecture-diagram .flow {
  fill: none;
  stroke: #a1b394;
  stroke-width: 1.7;
}

.architecture-diagram .flow.wal {
  stroke: #e5bd78;
}

.architecture-diagram .flow-label {
  fill: #b6c1b2;
  font-size: 11px;
  text-anchor: middle;
}

.diagram-caption,
.diagram-help {
  color: var(--quiet) !important;
  font-size: .73rem !important;
}

.diagram-help {
  margin: .35rem 0 .5rem;
}

.diagram-detail {
  min-height: 2.75rem;
  padding: .6rem .75rem;
  border-left: 2px solid var(--accent);
  margin: .75rem 0;
  background: rgba(198,243,106,.045);
  color: var(--muted);
  font-size: .78rem;
}

.diagram-detail a {
  margin-left: .35rem;
}

.explanation-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin: 1rem 0;
  background: rgba(255,255,255,.018);
}

.explanation-toolbar span {
  margin-right: auto;
  color: var(--muted);
  font-size: .76rem;
}

.explanation-toolbar button {
  min-height: 2.1rem;
  padding: .35rem .65rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}

.explanation-toolbar button:hover {
  color: var(--text);
}

.explanation-toolbar button[aria-pressed="true"] {
  border-color: #465345;
  background: var(--surface-raised);
  color: var(--accent);
}

.view-hint {
  margin: -.45rem 0 1rem;
  color: var(--muted);
  font-size: .78rem;
}

.explanation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin: .75rem 0 1rem;
}

.explanation {
  padding: .75rem .85rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(255,255,255,.018);
}

.explanation h4 {
  margin: 0 0 .35rem;
  color: var(--accent);
  font-size: .68rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.explanation p {
  margin: 0;
  color: #c1c8c0;
  font-size: .81rem;
}

html[data-explanation-mode="plain"] .explanation[data-kind="technical"],
html[data-explanation-mode="technical"] .explanation[data-kind="plain"] {
  display: none;
}

.component-list {
  display: grid;
  gap: .45rem;
  margin-top: 1rem;
}

.component-details {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(255,255,255,.015);
}

.component-details > summary {
  display: flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem .8rem;
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.component-details > summary::after {
  color: var(--quiet);
  content: "+";
  font-size: 1rem;
}

.component-details[open] > summary::after {
  content: "−";
}

.component-details[open] > summary {
  border-bottom: 1px solid var(--border);
}

.component-details-body {
  padding: .15rem .8rem .75rem;
}

.component-details-body p:last-child {
  margin-bottom: 0;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem .8rem;
  padding: .75rem 0;
  margin: 0;
}

.spec-grid div {
  min-width: 0;
}

.spec-grid dt {
  color: var(--quiet);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.spec-grid dd {
  margin: .15rem 0 0;
  color: #c1c8c0;
  font-size: .77rem;
  line-height: 1.55;
}

.docs-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin: 1rem 0;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
  text-align: left;
}

.docs-table th,
.docs-table td {
  min-width: 7rem;
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.docs-table th {
  background: #151a16;
  color: var(--text);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.docs-table td {
  color: #c1c8c0;
}

.docs-table tr:last-child td {
  border-bottom: 0;
}

.note,
.caution {
  padding: .75rem .85rem;
  border-left: 2px solid var(--accent);
  margin: 1rem 0;
  background: rgba(198,243,106,.045);
  color: #c1c8c0;
  font-size: .82rem;
}

.caution {
  border-left-color: #d9ad68;
  background: rgba(217,173,104,.045);
}

.right-rail {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 5.75rem);
  overflow-y: auto;
  padding: 1.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.rail-block {
  padding: .85rem 0 1rem;
  border-bottom: 1px solid var(--border);
}

.rail-block:first-child {
  padding-top: 0;
}

.rail-block:last-child {
  border-bottom: 0;
}

.rail-list {
  display: grid;
  gap: .48rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rail-list li,
.rail-list a {
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.5;
}

.rail-list a {
  text-decoration: none;
}

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

.rail-related {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.rail-related a {
  display: inline-flex;
  padding: .25rem .45rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-size: .68rem;
  text-decoration: none;
}

.rail-related a:hover {
  border-color: #536247;
  color: var(--accent);
}

.source-note {
  padding-top: .8rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
  color: var(--quiet) !important;
  font-size: .73rem !important;
}

.glossary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem 1rem;
  padding: 0;
  margin: .75rem 0 1.25rem;
}

.glossary div {
  padding: .55rem .65rem;
  border-left: 1px solid #465345;
  background: rgba(255,255,255,.015);
}

.glossary dt {
  color: var(--text);
  font-size: .78rem;
  font-weight: 650;
}

.glossary dd {
  margin: .15rem 0 0;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.55;
}

.docs-footer {
  width: min(100% - 2rem, 1440px);
  padding: 0 0 2.5rem;
  margin: 0 auto;
}

.docs-footer .editorial-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.docs-footer .editorial-footer__item:last-child {
  text-align: right;
}

.docs-footer .editorial-footer__label {
  display: block;
  margin-bottom: .35rem;
  color: var(--quiet);
  font-size: .64rem;
  font-weight: 650;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.docs-footer .editorial-footer__link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: .4rem;
  color: var(--text);
  font-size: .9rem;
  font-weight: 550;
  line-height: 1.5;
  text-decoration: none;
  transition: color .16s ease;
}

.docs-footer .editorial-footer__arrow {
  flex: none;
  color: var(--accent);
  transition: transform .16s ease;
}

.docs-footer .editorial-footer__item:first-child .editorial-footer__link:hover .editorial-footer__arrow,
.docs-footer .editorial-footer__item:first-child .editorial-footer__link:focus-visible .editorial-footer__arrow {
  transform: translateX(-3px);
}

.docs-footer .editorial-footer__item:last-child .editorial-footer__link:hover .editorial-footer__arrow,
.docs-footer .editorial-footer__item:last-child .editorial-footer__link:focus-visible .editorial-footer__arrow {
  transform: translate(2px, -2px);
}

.docs-footer .editorial-footer__link:hover,
.docs-footer .editorial-footer__link:focus-visible {
  color: var(--accent);
}

@media (max-width: 640px) {
  .site-nav {
    width: min(100% - 1.25rem, 1160px);
    min-height: 4rem;
    gap: .5rem;
  }

  .site-logo img {
    height: 23px;
  }

  .site-nav-links {
    justify-content: flex-end;
    gap: 0;
  }

  .site-nav-links a {
    min-height: 2.5rem;
    padding: .3rem .45rem;
    font-size: .74rem;
  }

  .page-shell {
    width: min(100% - 1.5rem, 1160px);
  }
}

@media (max-width: 1180px) {
  .docs-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 760px) {
  .docs-header-inner,
  .docs-layout,
  .docs-footer {
    width: min(100% - 1.25rem, 760px);
  }

  .docs-header-inner {
    min-height: 3.45rem;
    gap: .65rem;
  }

  .docs-brand img {
    height: 20px;
  }

  .docs-breadcrumb {
    gap: .35rem;
    font-size: .72rem;
  }

  .docs-layout {
    display: block;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding: .65rem 0 0;
  }

  .toc-details {
    position: relative;
    z-index: 3;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #101310;
  }

  .toc-details > summary {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .75rem;
    color: var(--text);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }

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

  .toc-details > summary::after {
    color: var(--muted);
    content: "Show";
    font-size: .72rem;
    font-weight: 500;
  }

  .toc-details[open] > summary::after {
    content: "Hide";
  }

  .toc-label {
    display: none;
  }

  .docs-toc {
    max-height: 55vh;
    overflow-y: auto;
    padding: 0 .45rem .5rem;
  }

  .docs-toc a {
    padding: .45rem .6rem;
  }

  .docs-main {
    padding-top: 1rem;
  }

  .docs-section {
    padding: 1.65rem 0;
    scroll-margin-top: 4.2rem;
  }

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

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

  .architecture-diagram {
    min-width: 720px;
  }
}

@media (max-width: 440px) {
  .docs-breadcrumb > a:first-child,
  .docs-breadcrumb > span:first-of-type {
    display: none;
  }

  .docs-breadcrumb > span:last-child {
    font-size: 0;
  }

  .docs-breadcrumb > span:last-child::after {
    font-size: .72rem;
    content: "PostgreSQL 18";
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}


/* Final UX pass: clearer hierarchy, resilient navigation, and comfortable reading. */
:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.site-header { z-index: 20; }
.docs-header { z-index: 20; }
.page-shell { padding-bottom: clamp(3rem, 7vw, 6rem); }
.hero { max-width: 820px; }
.hero-copy { max-width: 70ch; }
.architecture-card {
  min-width: 0;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.architecture-card:hover { transform: translateY(-2px); }
.docs-main { min-width: 0; }
.docs-section { scroll-margin-top: 5.5rem; }
.docs-section p, .docs-section li { max-width: 78ch; }
.docs-section :where(pre, .code-block) { max-width: 100%; overflow-x: auto; }
.docs-toc a { line-height: 1.45; }
@media (max-width: 760px) {
  .site-nav { flex-wrap: wrap; padding: .45rem 0; }
  .site-nav-links { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .2rem; }
  .site-nav-links a { flex: 0 0 auto; }
  .docs-header-inner { flex-wrap: wrap; padding: .55rem 0; }
  .docs-breadcrumb { min-width: 0; overflow-x: auto; white-space: nowrap; }
  .docs-main { overflow-wrap: anywhere; }
  .docs-section { scroll-margin-top: 1rem; }
}
@media (hover: none) {
  .architecture-card:hover { transform: none; }
}
