:root {
  --tblr-font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cdx-serif: Georgia, "Times New Roman", serif;
  --cdx-ink: #1a1d21;
  --cdx-muted: #59616b;
  --cdx-line: rgba(26, 29, 33, .14);
  --cdx-line-soft: rgba(26, 29, 33, .08);
  --cdx-paper: #fbfaf7;
  --cdx-card: #ffffff;
  --cdx-radius: 10px;
  --cdx-gutter: 1.25rem;
}
html { scroll-behavior: smooth; }
body {
  background: var(--cdx-paper);
  color: var(--cdx-ink);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0;
  min-width: 320px;
}
a { color: var(--cdx-accent); text-underline-offset: 2px; }
a:hover { color: var(--cdx-accent-strong); }
h1, h2, h3 { color: var(--cdx-ink); letter-spacing: 0; }
h1 { font-size: clamp(1.85rem, 1.3rem + 1.9vw, 2.9rem); line-height: 1.12; margin-bottom: .6rem; }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); line-height: 1.25; }
h3 { font-size: 1.08rem; }
.cdx-lede { font-size: clamp(1.02rem, .95rem + .35vw, 1.19rem); color: var(--cdx-muted); max-width: 62ch; }
.cdx-muted { color: var(--cdx-muted); }
.cdx-prose { max-width: 70ch; }
.cdx-prose p { margin-bottom: .9rem; }
.cdx-prose p:last-child { margin-bottom: 0; }

/* Utility strip ------------------------------------------------------- */
.cdx-utility {
  background: var(--cdx-ink);
  color: rgba(255, 255, 255, .85);
  font-size: .8125rem;
}
.cdx-utility .container-xl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 2.25rem;
  flex-wrap: wrap;
  padding-top: .3rem;
  padding-bottom: .3rem;
}
.cdx-utility a { color: #fff; text-decoration: none; }
.cdx-utility a:hover { text-decoration: underline; color: #fff; }
.cdx-utility-links { display: flex; align-items: center; gap: .9rem; }

/* Header --------------------------------------------------------------- */
.cdx-header {
  background: #fff;
  border-bottom: 1px solid var(--cdx-line);
}
.cdx-header .navbar { min-height: 4.5rem; box-shadow: none; }
.cdx-header .container-xl { gap: 1rem; }
.cdx-lockup {
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  padding: .55rem 0;
  margin-right: .5rem;
}
.cdx-lockup img { display: block; height: 42px; width: auto; }
.cdx-lockup-sub {
  border-left: 1px solid var(--cdx-line);
  padding-left: .85rem;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--cdx-muted);
  white-space: nowrap;
  line-height: 1.3;
  max-width: 9.5rem;
}
.navbar .nav-link {
  font-weight: 550;
  color: var(--cdx-ink);
  border-radius: 6px;
  padding: .45rem .7rem;
}
.navbar .nav-link:hover { background: var(--cdx-line-soft); }
.navbar .nav-link.active {
  background: color-mix(in srgb, var(--cdx-accent) 10%, transparent);
  color: var(--cdx-accent-strong);
}
.navbar-toggler { border: 1px solid var(--cdx-line); padding: .45rem .6rem; }
.cdx-header .btn-primary {
  background: var(--cdx-accent);
  border-color: var(--cdx-accent);
}
.cdx-header .btn-primary:hover { background: var(--cdx-accent-strong); border-color: var(--cdx-accent-strong); }

/* Page head ------------------------------------------------------------ */
.cdx-pagehead { padding: clamp(2rem, 4.5vw, 3.75rem) 0 clamp(1.1rem, 2.5vw, 1.9rem); }
.cdx-pagehead .cdx-kicker { margin-bottom: .65rem; }
.cdx-kicker {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--cdx-accent-strong);
}
.cdx-pagehead-rule {
  border: 0;
  border-top: 2px solid var(--cdx-ink);
  opacity: 1;
  margin: clamp(1.1rem, 2.5vw, 1.9rem) 0 0;
}

/* Sections ------------------------------------------------------------- */
.cdx-section { margin: clamp(2.2rem, 5vw, 3.5rem) 0; }
.cdx-section-head { margin-bottom: 1.15rem; }
.cdx-section-head .cdx-kicker { margin-bottom: .35rem; }
.cdx-section-head h2 { margin-bottom: 0; }
.cdx-sectionbody p { max-width: 72ch; }
.cdx-sectionbody .cdx-verdict p, .cdx-sectionbody figcaption { max-width: none; }

/* Buttons carry the site accent everywhere, not Tabler's default blue. */
.btn-primary {
  background: var(--cdx-accent);
  border-color: var(--cdx-accent);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--cdx-accent-strong);
  border-color: var(--cdx-accent-strong);
}
.btn-outline-primary { color: var(--cdx-accent-strong); border-color: var(--cdx-accent); }
.btn-outline-primary:hover { background: var(--cdx-accent); border-color: var(--cdx-accent); }

/* Cards and grids -------------------------------------------------------- */
.cdx-card {
  background: var(--cdx-card);
  border: 1px solid var(--cdx-line);
  border-radius: var(--cdx-radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  height: 100%;
}
.cdx-card .card-body { padding: 1.5rem; }
.cdx-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  border-radius: 10px;
  font-size: 1.15rem;
  color: var(--cdx-accent-strong);
  background: color-mix(in srgb, var(--cdx-accent) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--cdx-accent) 22%, transparent);
  margin-bottom: 1rem;
}
.cdx-grid { display: grid; gap: var(--cdx-gutter); }
@media (min-width: 768px) { .cdx-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .cdx-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Tables ---------------------------------------------------------------- */
.cdx-table {
  background: var(--cdx-card);
  border: 1px solid var(--cdx-line);
  border-radius: var(--cdx-radius);
}
.cdx-table table { margin: 0; min-width: 640px; }
.cdx-table thead th {
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cdx-muted);
  border-bottom-width: 2px;
  padding: .8rem 1rem;
  background: color-mix(in srgb, var(--cdx-accent) 4%, #fff);
}
.cdx-table td, .cdx-table tbody th { padding: .8rem 1rem; vertical-align: top; }
.cdx-table tbody th { font-weight: 600; }
.cdx-chip {
  display: inline-block;
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .12rem .5rem;
  margin-left: .4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cdx-accent) 12%, #fff);
  color: var(--cdx-accent-strong);
  border: 1px solid color-mix(in srgb, var(--cdx-accent) 25%, transparent);
  vertical-align: middle;
  white-space: nowrap;
}

/* Record lists (dl) ------------------------------------------------------ */
.cdx-record { margin: 0; }
.cdx-record-row {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: .5rem 1.5rem;
  padding: .65rem 0;
  border-bottom: 1px dotted var(--cdx-line);
}
.cdx-record-row:last-child { border-bottom: 0; }
.cdx-record dt { font-weight: 600; color: var(--cdx-muted); font-size: .92rem; }
.cdx-record dd { margin: 0; overflow-wrap: break-word; }
@media (max-width: 575.98px) {
  .cdx-record-row { grid-template-columns: 1fr; gap: .15rem; padding: .6rem 0; }
}

/* Details / questions ---------------------------------------------------- */
.cdx-details {
  border: 1px solid var(--cdx-line);
  border-radius: var(--cdx-radius);
  background: var(--cdx-card);
  margin-bottom: .65rem;
}
.cdx-details summary {
  cursor: pointer;
  font-weight: 600;
  padding: .9rem 1.15rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.cdx-details summary::-webkit-details-marker { display: none; }
.cdx-details summary::after { content: "+"; font-weight: 500; color: var(--cdx-muted); font-size: 1.2rem; line-height: 1; }
.cdx-details[open] summary::after { content: "\2212"; }
.cdx-details-body { padding: 0 1.15rem .95rem; color: var(--cdx-ink); max-width: 70ch; }
.cdx-details-body p { margin: 0; }

/* Footer ----------------------------------------------------------------- */
.cdx-footer {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--cdx-line);
  background: #fff;
  padding: 2.5rem 0 1.75rem;
  font-size: .92rem;
}
.cdx-footer h4 {
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cdx-muted);
  margin-bottom: .8rem;
}
.cdx-footer ul { list-style: none; margin: 0; padding: 0; }
.cdx-footer li { margin-bottom: .45rem; }
.cdx-footer a { color: var(--cdx-ink); text-decoration: none; }
.cdx-footer a:hover { color: var(--cdx-accent-strong); text-decoration: underline; }
.cdx-footer-logo img { display: block; height: 34px; width: auto; margin-bottom: .9rem; }
.cdx-footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .cdx-footer-grid { grid-template-columns: 1fr 1fr; } .cdx-footer-grid > div:first-child { grid-column: 1 / -1; } }
@media (min-width: 992px) { .cdx-footer-grid { grid-template-columns: 5fr 3fr 4fr; } .cdx-footer-grid > div:first-child { grid-column: auto; } }
.cdx-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  border-top: 1px solid var(--cdx-line-soft);
  margin-top: 2rem;
  padding-top: 1.1rem;
  color: var(--cdx-muted);
  font-size: .85rem;
}
.cdx-footer-bottom a { color: var(--cdx-muted); }

/* Focus + a11y ------------------------------------------------------------ */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--cdx-accent);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Search ------------------------------------------------------------------ */
.cdx-search-input { max-width: 34rem; }
.cdx-search-hit { display: block; text-decoration: none; color: inherit; margin-bottom: .65rem; }
.cdx-search-hit .cdx-card .card-body { padding: 1rem 1.25rem; }
.cdx-search-hit:hover .cdx-card { border-color: var(--cdx-accent); }

/* Grid.js enhancement ------------------------------------------------------ */
.gridjs-wrapper { border-radius: var(--cdx-radius); box-shadow: none; border: 1px solid var(--cdx-line); }
.gridjs-container { color: inherit; }
[data-enhanced="true"] .cdx-table-fallback { display: none; }

/* Print ------------------------------------------------------------------- */
@media print {
  .cdx-utility, .cdx-header, .cdx-footer, .navbar-toggler { display: none !important; }
  body { background: #fff; }
}

@media (max-width: 767.98px) {
  .cdx-lockup img { height: 32px; }
  .cdx-lockup { gap: .6rem; min-width: 0; flex: 1 1 auto; margin-right: 0; }
  .cdx-lockup-sub { padding-left: .6rem; font-size: .64rem; max-width: 8.5rem; white-space: normal; }
  .cdx-header .container-xl { gap: .5rem; }
  .cdx-card .card-body { padding: 1.15rem; }
  .cdx-utility .container-xl { justify-content: center; text-align: center; }
}
.cdx-markimg { max-width: 100%; height: auto; max-height: 96px; width: auto; }

/* Registry: printed-register look. Serif record heads, teal rules. */
body[data-theme="registry"] {
  --cdx-accent: #0b6b6f;
  --cdx-accent-strong: #084d50;
  --cdx-paper: #fbfaf6;
}
body[data-theme="registry"] h1,
body[data-theme="registry"] h2,
body[data-theme="registry"] .cdx-record-name {
  font-family: var(--cdx-serif);
  font-weight: 600;
}
body[data-theme="registry"] .cdx-pagehead {
  border-bottom: 1px solid var(--cdx-line);
  background:
    linear-gradient(180deg, #fff, rgba(255, 255, 255, 0)),
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(11, 107, 111, .05) 6px 7px);
}
.cdx-record-card {
  background: var(--cdx-card);
  border: 1px solid var(--cdx-line);
  border-top: 3px solid var(--cdx-accent);
  border-radius: var(--cdx-radius);
  padding: 1.6rem 1.75rem;
  height: 100%;
}
.cdx-record-card .cdx-record-name { font-size: 1.35rem; margin-bottom: .1rem; }
.cdx-record-card .cdx-record-role { color: var(--cdx-muted); margin-bottom: 1rem; max-width: 58ch; }
.cdx-status {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #116329;
  background: #e7f4ea;
  border: 1px solid rgba(17, 99, 41, .25);
  border-radius: 999px;
  padding: .14rem .6rem;
}
@media (max-width: 767.98px) {
  .cdx-record-card { padding: 1.2rem 1.15rem; }
}
