:root{
  --bg:#ffffff;
  --fg:#111111;
  --muted:#444444;
  --border:#e6e6e6;
  --link:#0b4aa2;
  --max: 860px;
}

html, body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.55;
}

header, footer{
  border-bottom:1px solid var(--border);
  padding: 20px 0;
}

footer{
  border-top:1px solid var(--border);
  border-bottom:none;
  margin-top: 36px;
}

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

h1{
  font-size: 28px;
  margin: 0 0 6px 0;
  letter-spacing: 0.2px;
}

h2{
  font-size: 18px;
  margin: 26px 0 10px 0;
}

p{
  margin: 10px 0;
}

small, .muted{
  color: var(--muted);
}

a{
  color: var(--link);
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
}

ul{
  margin: 8px 0 0 18px;
}

.code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

.rule{
  border-top:1px solid var(--border);
  margin: 18px 0;
}

/* Layout */
.container { max-width: 980px; margin: 0 auto; padding: 24px; }
.site-header { border-bottom: 1px solid #e6e6e6; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.brand { text-decoration: none; font-weight: 700; letter-spacing: 0.2px; }
.top-nav a { margin-left: 16px; text-decoration: none; }
.top-nav a[aria-current="page"] { text-decoration: underline; }

.hero { padding: 18px 0 6px; }
.lede { font-size: 1.05rem; line-height: 1.6; }

.card { border: 1px solid #e6e6e6; border-radius: 10px; padding: 18px; margin: 18px 0; }
.muted { color: #555; }
.small { font-size: 0.92rem; }

.stack { padding-left: 18px; line-height: 1.8; }

.bullets { padding-left: 18px; line-height: 1.8; }

.actions { margin-top: 12px; }
.button { display: inline-block; padding: 10px 12px; border: 1px solid #222; border-radius: 10px; text-decoration: none; }
.button.subtle { border-color: #bbb; color: #222; }

.notice { border-left: 4px solid #222; padding: 10px 12px; margin: 12px 0; background: #fafafa; }
.doc-header { padding: 8px 0; }

.gov-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.gov-table th, .gov-table td { border-bottom: 1px solid #e6e6e6; padding: 10px; text-align: left; vertical-align: top; }
.gov-table th { font-weight: 600; }

.doc-footer-nav { margin: 18px 0 8px; display: flex; gap: 10px; flex-wrap: wrap; }

.site-footer { padding: 20px 0 8px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.doc-subsubsection h4 {
  margin-bottom: 0.25rem;
}

.doc-subsubsection h4 + p {
  margin-top: 0;
}

/* Governance docs: remove vertical spacing introduced by numbered subsubsection wrappers */
.doc .doc-subsubsection {
  margin-top: 0;
  margin-bottom: 0;
}

/* Governance docs: eliminate the "blank line" between numbered headings (h4) and the paragraph that follows */
.doc .doc-subsubsection > h4 {
  margin: 0 !important;
}

.doc .doc-subsubsection > h4 + p {
  margin-top: 0 !important;
}

.doc .doc-subsubsection > p {
  margin-bottom: 0.75rem; /* keep readable separation between numbered items */
}

/* Governance docs: make number-only subsubsections read as a single line item */
.doc .doc-subsubsection > h4 {
  display: inline;
  margin: 0 !important;
}

.doc .doc-subsubsection > h4 + p {
  display: inline;
  margin: 0 !important;
}

/* Add separation between items (not between number and its text) */
.doc .doc-subsubsection {
  margin: 0 0 0.75rem 0 !important;
}

/* === Governance docs: tighten numbered sub-subsections (e.g., 2.3.2. + text) === */

/* 1) Force the number heading and its following paragraph onto one line */
article.doc section.doc-subsubsection > h4 {
  display: inline !important;
  margin: 0 !important;
}

article.doc section.doc-subsubsection > h4 + p {
  display: inline !important;
  margin: 0 !important;
}

/* 2) Add spacing AFTER the combined line item (not between number and text) */
article.doc section.doc-subsubsection {
  margin: 0 0 0.85rem 0 !important;
}

/* === Governance docs: hierarchical indentation === */
article.doc section.doc-subsection {
  margin-left: 1.25rem !important;
}

article.doc section.doc-subsubsection {
  margin-left: 2.5rem !important;
}

/* TOC: the link text already contains numbering; do not add list markers */
.toc__list {
  list-style: none;
  padding-left: 0;
}

.toc__list {
  padding-left: 2.5rem;
}

/* Restore numbering for ordered Contents lists */
.toc__list {
  list-style-position: outside;
  padding-left: 1.5rem; /* keep the same indentation you want */
}

.toc__list:where(ol),
.toc__list ol {
  list-style-type: decimal;
}

.toc__list:where(ol) > li,
.toc__list ol > li {
  list-style-type: decimal;
}

/* Evaluation Contract only: match TOC indentation of other governance pages */
.doc-eval-contract .toc__list {
  padding-left: 2.25rem;      /* pushes the list right */
  list-style-position: outside;
}

/* Keep decimal numbering visible */
.doc-eval-contract .toc__list {
  list-style-type: decimal;
}

/* Evaluation Contract: align TOC indent with other docs */
.doc-eval-contract .toc__list {
  padding-left: 2.25rem;       /* increase as needed */
  margin-left: 0;              /* prevents extra left shift */
  list-style-position: outside;
}

/* Evaluation Contract: numbered TOC with aligned, clickable numbers */
.doc-eval-contract .toc__list--numbered {
  list-style: none;            /* remove bullets */
  padding-left: 2.25rem;       /* matches your other TOCs; adjust if needed */
  margin-left: 0;
}

.doc-eval-contract .toc__list--numbered li a {
  display: grid;
  grid-template-columns: 3ch auto;  /* aligns 1–14 */
  column-gap: 0.75rem;
}

.doc-eval-contract .toc__list--numbered .toc-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Numbered Contents lists: consistent indent across all numbered governance docs */
.toc__list--numbered {
  padding-left: 2.25rem;   /* adjust once here */
  margin-left: 0;
  list-style-position: outside;
}

.toc__list--numbered > li {
  padding-left: 0.4rem;
}

/* Numbered Contents lists: consistent look across all docs */
.toc__list--numbered {
  list-style: none;
  padding-left: 1.5rem;   /* base indent — adjust once here */
  margin-left: 0;
}

.toc__list--numbered li a {
  display: grid;
  grid-template-columns: 3ch auto; /* aligns 1–14 */
  column-gap: 0.5rem;             /* controls space after the period */
  text-decoration: none;
}

.toc__list--numbered .toc-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Evaluation Contract: slightly tighter TOC indentation */
.doc-eval-contract .toc__list--numbered {
  padding-left: 1.5rem;
}

/* Reliance & Non-Reliance: remove stray divider under PDF link (notice block border) */
.doc-reliance-nonreliance .canonical-notice,
.doc-reliance-nonreliance .doc-notice,
.doc-reliance-nonreliance .notice {
  border-bottom: none !important;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* =========================================================
   Document previous / next navigation spacing
   ========================================================= */

.doc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem; /* controls space between Previous and Next */
}

/* Optional: ensure links don't collapse together on narrow screens */
.doc-nav a {
  white-space: nowrap;
}

/* =========================================================
   Document footer navigation spacing (Previous / Next)
   ========================================================= */

.doc-nav__inner {
  display: flex;              /* already true, but safe */
  justify-content: space-between;
  align-items: center;
  gap: 3rem;                  /* <-- controls space between links */
}

.doc-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* Normalize numbered subsection labels (e.g., 8.1, 7.2, 9.4) */
.doc-subsection > p > strong {
  font-size: 1.17em;   /* ≈ 18.7px when base is 16px */
  font-weight: 700;
}
