/* CJC-1295 Pharmacy — Cartesian editorial register
   Zero saturated color. Ink + cool-white + grayscale tonal hierarchy. */

:root {
  --ink:            #14161A;
  --ink-strong:     #0A0B0E;
  --ink-muted:      #5A5C62;
  --ink-dim:        #7E8089;
  --bg:             #F4F5F7;
  --surface:        #FFFFFF;
  --surface-sunken: #E8EAEE;
  --rule:           #DCDDE1;
  --rule-strong:    #C2C4CA;

  --max-width:      74rem;
  --article-width:  42rem;
  --panel-width:    62rem;
  --container-px:   clamp(1.25rem, 4vw, 2.5rem);
  --section-gap:    clamp(4rem, 8vw, 8rem);

  --font-display:   'Playfair Display', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-body:      'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:      'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ Typography ============ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 1rem 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  letter-spacing: -0.018em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  letter-spacing: -0.012em;
  line-height: 1.15;
  margin-top: 0;
}

h3 {
  font-size: 1.5rem;
  letter-spacing: -0.005em;
  line-height: 1.3;
  font-weight: 500;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

p {
  margin: 0 0 1.25rem 0;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-muted);
  transition: opacity 200ms ease-out, border-color 200ms ease-out;
}

a:hover {
  opacity: 0.8;
  border-color: var(--ink);
}

a:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 5.5px var(--surface);
}

ul, ol {
  margin: 0 0 1.25rem 0;
  padding-left: 1.5rem;
}

li {
  margin: 0 0 0.5rem 0;
}

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

small {
  font-size: 0.875rem;
  line-height: 1.55;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  font-feature-settings: 'tnum' 1;
  border-bottom: 1px solid var(--ink-muted);
  padding-bottom: 1px;
}

/* ============ Eyebrow / micro labels ============ */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

.eyebrow--dim {
  color: var(--ink-dim);
}

.eyebrow--ink {
  color: var(--ink);
}

/* ============ Layout ============ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.container--article {
  max-width: calc(var(--article-width) + (2 * var(--container-px)));
}

.container--panel {
  max-width: calc(var(--panel-width) + (2 * var(--container-px)));
}

main {
  display: block;
}

article {
  padding: clamp(2.5rem, 6vw, 5rem) 0 var(--section-gap) 0;
}

section + section {
  margin-top: var(--section-gap);
}

/* ============ Header / nav ============ */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0.75rem var(--container-px);
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 1.5rem;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: none;
  color: var(--ink);
}

.site-brand__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.012em;
  color: var(--ink);
  line-height: 1;
}

.site-brand__mark::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

.site-brand__eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-left: 1.25rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.site-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  border: none;
  position: relative;
  padding-bottom: 6px;
}

.site-nav a:hover {
  opacity: 0.8;
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--ink);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  cursor: pointer;
  padding: 0.5rem 0;
  border-bottom: 1.5px solid var(--ink);
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--ink);
    padding: 1.5rem var(--container-px);
  }
  .site-nav.is-open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-toggle {
    display: inline-block;
  }
}

/* ============ Hero ============ */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  max-width: var(--article-width);
}

.hero__headline {
  margin: 0 0 1.5rem 0;
}

.hero__dek {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.375rem, 2.75vw, 1.875rem);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0 0 1.75rem 0;
}

.hero__lede {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 60ch;
  margin: 0 0 2rem 0;
}

.hero__rule {
  height: 1px;
  background: var(--ink);
  border: 0;
  margin: 0 0 1.75rem 0;
}

/* Hero verdict-snapshot strip */
.snapshot {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 0 0 2.25rem 0;
}

@media (min-width: 768px) {
  .snapshot {
    grid-template-columns: repeat(4, 1fr);
  }
}

.snapshot__cell {
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--rule);
}

.snapshot__cell:last-child {
  border-right: 0;
}

.snapshot__cell:nth-child(2) {
  border-right: 0;
}

@media (min-width: 768px) {
  .snapshot__cell:nth-child(2) {
    border-right: 1px solid var(--rule);
  }
  .snapshot__cell:nth-child(3) {
    border-right: 1px solid var(--rule);
  }
}

.snapshot__label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.snapshot__value {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  font-feature-settings: 'tnum' 1;
}

/* ============ CTAs / buttons ============ */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  padding: 0.875rem 1.75rem;
  border-radius: 0;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: opacity 200ms ease-out;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 5.5px var(--surface);
}

.btn:hover {
  opacity: 0.8;
}

.btn:active {
  opacity: 0.7;
}

.btn--primary {
  background: var(--ink);
  color: #FFFFFF;
  border: 1.5px solid var(--ink);
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

/* ============ Section openers ============ */
.section-numeral {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1.25rem 0;
}

.section-numeral::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

.section-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0 0 1.5rem 0;
  max-width: 60ch;
}

.section-rule {
  height: 1px;
  background: var(--ink);
  border: 0;
  margin: 0 0 2rem 0;
  max-width: var(--article-width);
}

.section-rule--hair {
  background: var(--rule);
}

/* ============ Article body ============ */
.prose {
  max-width: var(--article-width);
}

.prose p {
  margin: 0 0 1.25rem 0;
}

.prose h3 {
  margin-top: 2rem;
}

.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
}

.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-muted);
}

.prose a:hover {
  border-bottom-color: var(--ink);
}

.prose sup {
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
}

.prose sup a {
  color: var(--ink-muted);
  border-bottom: 1px solid var(--ink-muted);
  padding: 0 1px;
  font-family: var(--font-body);
  font-weight: 500;
}

.prose sup a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
  opacity: 1;
}

/* Drop cap */
.has-drop-cap > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 5rem;
  line-height: 0.9;
  float: left;
  margin: 0.25rem 0.75rem 0 0;
  color: var(--ink);
}

/* ============ Cards ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  margin: 0 0 1.5rem 0;
}

.card--gray-literature {
  border: 1px dashed var(--rule-strong);
}

.card--gray-literature .card__eyebrow {
  color: var(--ink-dim);
}

.card--regulatory {
  border-top: 2px solid var(--ink);
}

.card--honest-gap {
  background: var(--surface-sunken);
  border: 1px solid var(--rule);
}

.card--honest-gap .card__eyebrow {
  color: var(--ink-dim);
}

.card__eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1rem 0;
}

.card__eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 1rem 0;
}

.card__divider {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0 0 1.25rem 0;
}

/* ============ Panel split (paired evidence) ============ */
.panel-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem auto;
  max-width: var(--panel-width);
}

@media (min-width: 768px) {
  .panel-split {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .panel-split__right {
    border-left: 1px solid var(--rule);
    padding-left: 2rem;
  }
  .panel-split__left {
    padding-right: 2rem;
  }
}

.panel-split__head {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ink);
  margin: 0 0 1.25rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.panel-split__head::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

.panel-split__right .panel-split__head {
  border-bottom: 1px dashed var(--rule-strong);
  color: var(--ink);
}

.panel-split__body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
}

.panel-split__body .mono {
  display: block;
  margin: 0.25rem 0;
}

/* ============ Callout ============ */
.callout {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--ink);
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
  max-width: var(--article-width);
}

.callout__label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.75rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.callout__label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

.callout p {
  margin: 0 0 0.75rem 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout--charter {
  background: var(--ink);
  color: #F4F5F7;
  border: none;
  border-left: 4px solid #FFFFFF;
}

.callout--charter .callout__label {
  color: #FFFFFF;
}

.callout--charter .callout__label::before {
  background: #FFFFFF;
}

.callout--honest-gap {
  background: var(--surface-sunken);
  border-left: 4px dashed var(--ink);
}

.callout--honest-gap .callout__label {
  color: var(--ink-dim);
}

.callout--regulatory {
  border-top: 2px solid var(--ink);
}

.callout--boxed-caution {
  border: 1px solid var(--ink);
  border-top: 2px solid var(--ink);
  border-left: 4px solid var(--ink);
}

/* ============ Pull quote ============ */
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.375rem, 2.75vw, 1.875rem);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 2px solid var(--ink);
  max-width: var(--article-width);
}

.pull-quote__attribution {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.pull-quote__attribution::before {
  content: "— ";
}

/* ============ Figures ============ */
figure {
  margin: 2.5rem 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 1.25rem;
  max-width: var(--panel-width);
}

figure img {
  display: block;
  width: 100%;
  height: auto;
}

figure figcaption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.fig-numeral {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.fig-numeral::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

/* ============ Tables ============ */
.editorial-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin: 1.5rem 0;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.9375rem;
}

.editorial-table thead th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
}

.editorial-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  vertical-align: top;
}

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

.editorial-table .num {
  font-family: var(--font-mono);
  font-weight: 500;
  text-align: right;
  font-feature-settings: 'tnum' 1;
}

.table-anchor {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.5rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.table-anchor::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

.table-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.table-wrap {
  max-width: var(--panel-width);
  margin: 2rem 0;
  overflow-x: auto;
}

/* ============ References list ============ */
.references-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  counter-reset: ref;
  max-width: var(--panel-width);
}

.references-list li {
  counter-increment: ref;
  padding: 1.25rem 0 1.25rem 3rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.references-list li::before {
  content: "[" counter(ref) "]";
  position: absolute;
  left: 0;
  top: 1.25rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.references-list .ref-meta {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.references-list .ref-meta a {
  color: var(--ink-muted);
  border-bottom: 1px solid var(--ink-muted);
}

/* ============ Forms ============ */
.form {
  max-width: var(--article-width);
  margin: 1.5rem 0;
}

.form__row {
  margin: 0 0 1.25rem 0;
}

.form__label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.5rem 0;
}

.form__input,
.form__textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  padding: 0.75rem 0;
  border-radius: 0;
  outline: none;
}

.form__textarea {
  min-height: 8rem;
  resize: vertical;
}

.form__input:focus,
.form__textarea:focus {
  border-bottom-color: var(--ink-strong);
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
}

/* ============ Footer ============ */
.site-footer {
  margin-top: var(--section-gap);
}

.site-footer__upper {
  background: var(--bg);
  border-top: 1px solid var(--ink);
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .site-footer__cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .site-footer__cols {
    grid-template-columns: repeat(4, 1fr);
  }
}

.site-footer__col-head {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.site-footer__col-head::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__col li {
  margin: 0 0 0.625rem 0;
}

.site-footer__col a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  border-bottom: 0;
}

.site-footer__col a:hover {
  opacity: 0.8;
  border-bottom: 1px solid var(--ink-muted);
}

.site-footer__lower {
  background: var(--ink);
  color: #F4F5F7;
  padding: 1.5rem 0;
}

.site-footer__lower-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .site-footer__lower-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.site-footer__disclaimer {
  margin: 0;
  color: #F4F5F7;
  max-width: 56ch;
  line-height: 1.55;
}

.site-footer__colophon {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  color: #C2C4CA;
  font-size: 0.875rem;
}

.site-footer__copy {
  margin: 0;
  color: #C2C4CA;
  font-size: 0.8125rem;
}

/* ============ 404 ============ */
.error-page {
  padding: var(--section-gap) 0;
  text-align: left;
}

.error-page h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.02em;
}

/* ============ Tippy theme override ============ */
.tippy-box[data-theme~='cartesian'] {
  background-color: var(--bg);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.875rem 1rem;
  max-width: 360px !important;
}

.tippy-box[data-theme~='cartesian'] .tippy-content {
  padding: 0;
}

.tippy-box[data-theme~='cartesian'] .tippy-arrow {
  color: var(--bg);
}

.tippy-box[data-theme~='cartesian'] .ref-mono {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ============ DataTables override ============ */
.dataTables_wrapper {
  font-family: var(--font-body);
}

.dataTables_wrapper .dataTables_filter input {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  background: transparent;
  padding: 0.5rem 0;
  border-radius: 0;
}

.dataTables_wrapper .dataTables_filter label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--ink-muted);
}

.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 0.25rem;
  border-radius: 0;
}

.dataTables_wrapper table.dataTable {
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.dataTables_wrapper table.dataTable thead th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.875rem 1rem;
}

.dataTables_wrapper table.dataTable tbody td {
  border-bottom: 1px solid var(--rule);
  padding: 0.875rem 1rem;
}

.dataTables_wrapper table.dataTable tbody tr:hover {
  background: var(--surface-sunken);
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 0 !important;
  background: transparent !important;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ink) !important;
  padding: 0.4rem 0.75rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  font-weight: 600;
  border-bottom: 1.5px solid var(--ink) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  color: var(--ink-dim) !important;
}

table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-muted);
}

/* ============ Skip link ============ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: #FFFFFF;
}

/* ============ Utility ============ */
.muted { color: var(--ink-muted); }
.dim   { color: var(--ink-dim); }
.center { text-align: center; }
hr.rule { height: 1px; background: var(--rule); border: 0; margin: 2rem 0; }
hr.rule--ink { height: 1px; background: var(--ink); border: 0; margin: 2rem 0; max-width: var(--article-width); }
