/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --paper:       #f4f2ed;
  --paper-dark:  #e8e5de;
  --ink:         #1a1917;
  --ink-mid:     #3d3c39;
  --slate:       #5e5c57;
  --muted:       #9b9890;
  --rule:        #d4d0c8;
  --rule-light:  #e8e5de;
  --surface:     #ffffff;
  --surface-warm:#faf9f6;

  --red:         #b91c1c;
  --red-light:   #fdf2f2;
  --amber:       #b45309;
  --amber-light: #fefce8;
  --green:       #15803d;
  --green-light: #f0fdf4;
  --blue:        #1d4ed8;
  --blue-light:  #eff6ff;
  --gray:        #6b7280;
  --gray-light:  #f9fafb;
  --orange:      #c2410c;
  --orange-light:#fff7ed;
  --purple:      #7c3aed;
  --purple-light:#f5f3ff;
  --cyan:        #0e7490;
  --cyan-light:  #ecfeff;

  --font-serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;

  --shadow-xs:   0 1px 2px rgba(26,25,23,.06);
  --shadow-sm:   0 1px 4px rgba(26,25,23,.08), 0 1px 2px rgba(26,25,23,.05);
  --shadow-md:   0 4px 12px rgba(26,25,23,.08), 0 2px 4px rgba(26,25,23,.05);

  --radius-sm:   3px;
  --radius:      4px;
  --radius-lg:   6px;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: .9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink-mid); text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-serif);
}

/* ── Navbar ─────────────────────────────────────────────────── */
.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: .875rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.site-nav .navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: 0;
  text-decoration: none;
}

.site-nav .brand-mark {
  width: 26px;
  height: 26px;
  background: var(--ink);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  flex-shrink: 0;
  color: #fff;
}

.site-nav .nav-link {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .375rem .75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: color .15s, border-color .15s, background .15s;
  text-decoration: none;
}

.site-nav .nav-link:hover {
  color: var(--ink);
  border-color: var(--rule);
  text-decoration: none;
}

.site-nav .nav-link.active {
  color: var(--surface);
  background: var(--ink);
  border-color: var(--ink);
}

.site-nav .search-wrap {
  position: relative;
}

.site-nav .search-wrap .bi-search {
  position: absolute;
  left: .625rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .75rem;
  pointer-events: none;
}

.site-nav .search-input {
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  padding: .375rem .75rem .375rem 1.875rem;
  width: 190px;
  transition: border-color .2s, width .3s;
  outline: none;
}

.site-nav .search-input::placeholder { color: var(--muted); }

.site-nav .search-input:focus {
  border-color: var(--ink);
  width: 240px;
  box-shadow: none;
}

/* ── Page header (list pages) ───────────────────────────────── */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 2rem 0 1.75rem;
  margin-bottom: 2.5rem;
}

.page-header .breadcrumb {
  margin: 0 0 .625rem;
  padding: 0;
  font-size: .75rem;
}

.page-header .breadcrumb-item { color: var(--muted); }
.page-header .breadcrumb-item a { color: var(--slate); text-decoration: none; }
.page-header .breadcrumb-item a:hover { color: var(--ink); }
.page-header .breadcrumb-item.active { color: var(--ink); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: var(--rule); }

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}

.page-header .page-meta {
  color: var(--muted);
  font-size: .8125rem;
  margin-top: .375rem;
  font-weight: 500;
  letter-spacing: .02em;
}

/* ── Record header (politician detail) ──────────────────────── */
.record-header {
  background: var(--surface);
  padding: 2.5rem 0 2rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 2.5rem;
}

.record-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .375rem;
}

.record-name {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--ink);
  line-height: 1.05;
  margin: 0;
}

.record-subtitle {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .625rem;
}

.record-id {
  font-size: .6875rem;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  letter-spacing: .04em;
  white-space: nowrap;
  padding-top: .25rem;
}

/* ── Archive label ──────────────────────────────────────────── */
.archive-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .875rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule-light);
  display: block;
}

/* ── Record card ────────────────────────────────────────────── */
.record-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.record-photo-wrap {
  position: relative;
  margin-bottom: .625rem;
}

.record-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%);
  display: block;
}

.record-photo-caption {
  font-size: .6875rem;
  color: var(--muted);
  font-style: italic;
  margin-top: .375rem;
  line-height: 1.4;
}

.record-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--paper-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 3rem;
  font-family: var(--font-serif);
  font-weight: 700;
}

.current-activity {
  border-top: 1px solid var(--rule-light);
  padding-top: .875rem;
  margin-top: .875rem;
}

/* ── Trayectoria / Positions ────────────────────────────────── */
.trayectoria-item {
  margin-bottom: 1.125rem;
}

.trayectoria-item:last-child {
  margin-bottom: 0;
}

.pos-title {
  font-weight: 700;
  font-size: .9375rem;
  color: var(--ink);
  line-height: 1.3;
}

.pos-meta {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .1875rem;
}

/* ── Hemeroteca / Sources ───────────────────────────────────── */
.hemeroteca-section {
  margin-bottom: 4rem;
}

.hemeroteca-header {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0;
  display: block;
}

.hemeroteca-item {
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--rule-light);
}

.hemeroteca-pub {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .375rem;
}

.hemeroteca-pub .pub-sep {
  margin: 0 .5rem;
  color: var(--rule);
}

.hemeroteca-headline {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: .625rem;
  text-decoration: none;
  display: block;
}

.hemeroteca-headline:hover {
  color: var(--red);
  text-decoration: none;
}

.hemeroteca-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.hemeroteca-link {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  transition: color .15s, border-color .15s;
}

.hemeroteca-link:hover {
  color: var(--red);
  border-color: var(--red);
  text-decoration: none;
}

.hemeroteca-link-archive {
  font-size: .6875rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--rule);
  padding-bottom: 1px;
}

.hemeroteca-link-archive:hover { color: var(--slate); text-decoration: none; }

/* ── Section titles ─────────────────────────────────────────── */
.section-title {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule-light);
}

/* ── Cards (generic) ────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.card-hover {
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}

.card-hover:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* ── Politician list card ───────────────────────────────────── */
.politician-card .avatar {
  width: 52px;
  height: 52px;
  border-radius: 2px;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%);
  flex-shrink: 0;
}

.politician-card .avatar-initials {
  width: 52px;
  height: 52px;
  border-radius: 2px;
  background: var(--paper-dark);
  color: var(--slate);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .01em;
}

.politician-card .name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -.01em;
}

.politician-card .party-tag {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .25rem;
}

/* ── Tab filter ─────────────────────────────────────────────── */
.tab-filter {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.tab-filter-label {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: .25rem;
  white-space: nowrap;
}

.tab-btn {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .3125rem .875rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--slate);
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  display: inline-block;
}

.tab-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.tab-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ── Filter bar (cases / search) ────────────────────────────── */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: .875rem 1.125rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar .form-select,
.filter-bar .form-control {
  font-size: .8125rem;
  border-color: var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background-color: var(--paper);
  padding: .375rem 2.25rem .375rem .75rem;
  flex-shrink: 0;
}

.filter-bar .form-select:focus,
.filter-bar .form-control:focus {
  border-color: var(--ink);
  box-shadow: none;
}

/* ── Status pills ───────────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: .175rem .5rem;
  border-radius: 2px;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge-convicted        { background: var(--red);    color: #fff; }
.status-badge-on_trial         { background: var(--amber);  color: #fff; }
.status-badge-charged          { background: var(--orange); color: #fff; }
.status-badge-under_investigation { background: var(--blue); color: #fff; }
.status-badge-acquitted        { background: var(--green);  color: #fff; }
.status-badge-dismissed        { background: var(--gray);   color: #fff; }
.status-badge-investigated     { background: var(--blue);   color: #fff; }
.status-badge-witness          { background: var(--purple); color: #fff; }

/* ── Metadata list (sidebar) ────────────────────────────────── */
.meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: .625rem 0;
  border-bottom: 1px solid var(--rule-light);
  font-size: .875rem;
}

.meta-list li:last-child { border-bottom: none; }

.meta-list .meta-key {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: .125rem;
}

.meta-list .meta-val {
  text-align: right;
  font-weight: 600;
  color: var(--ink);
  font-size: .875rem;
}

/* ── Tables ─────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.data-table thead th {
  background: var(--paper-dark);
  color: var(--muted);
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: .875rem 1.125rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
  border-top: none;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--rule-light);
  transition: background .1s;
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-warm); }

.data-table tbody td {
  padding: .875rem 1.125rem;
  vertical-align: middle;
  font-size: .875rem;
  border: none;
  border-bottom: 1px solid var(--rule-light);
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .cell-primary { font-weight: 600; color: var(--ink); }
.data-table .cell-sub { font-size: .75rem; color: var(--muted); margin-top: .125rem; }
.data-table .amount { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── Person inline row ──────────────────────────────────────── */
.person-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule-light);
  transition: background .1s;
  text-decoration: none;
  color: inherit;
}

.person-row:last-child { border-bottom: none; }
.person-row:hover { background: var(--surface-warm); text-decoration: none; }

.person-row .avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 2px;
  background: var(--paper-dark);
  color: var(--slate);
  font-family: var(--font-serif);
  font-size: .875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  object-fit: cover;
  object-position: top;
  filter: grayscale(100%);
}

/* ── Stats bar (home) ───────────────────────────────────────── */
.stats-bar {
  display: flex;
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
  padding-top: 2rem;
  gap: 0;
}

.stats-bar .stat {
  flex: 1;
  padding: 0 2.5rem 0 0;
  border-right: 1px solid var(--rule);
  margin-right: 2.5rem;
}

.stats-bar .stat:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.stats-bar .stat-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--ink);
}

.stats-bar .stat-num.red   { color: var(--red); }
.stats-bar .stat-num.amber { color: var(--amber); }

.stats-bar .stat-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-top: .375rem;
}

/* ── Case card (home) ───────────────────────────────────────── */
.case-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 1.375rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow .2s;
  text-decoration: none;
  color: inherit;
}

.case-card:hover {
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}

.case-card .case-name {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  margin: .5rem 0 .375rem;
  line-height: 1.3;
}

.case-card .case-desc {
  font-size: .8125rem;
  color: var(--slate);
  line-height: 1.55;
  flex: 1;
}

.case-card .case-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--rule-light);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Party card ─────────────────────────────────────────────── */
.party-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow .2s;
  text-decoration: none;
  color: inherit;
}

.party-card:hover {
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}

.party-card .party-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.party-card .party-acronym-box {
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .625rem;
  font-weight: 800;
  letter-spacing: .02em;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.1;
  padding: 2px;
}

.party-card .party-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.25;
}

.party-card .party-meta {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .25rem;
}

/* ── Source list ────────────────────────────────────────────── */
.source-item {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--rule-light);
  font-size: .875rem;
}

.source-item:last-child { border-bottom: none; }

.source-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8125rem;
  flex-shrink: 0;
}

/* ── Position timeline ──────────────────────────────────────── */
.position-item {
  display: flex;
  gap: .875rem;
  padding: .875rem 0;
  border-bottom: 1px solid var(--rule-light);
}

.position-item:last-child { border-bottom: none; }

.position-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule);
  margin-top: .45rem;
  flex-shrink: 0;
  border: 2px solid var(--ink);
}

.position-title { font-weight: 600; font-size: .9375rem; color: var(--ink); }
.position-meta { font-size: .75rem; color: var(--muted); margin-top: .125rem; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.empty-state .bi { font-size: 2rem; opacity: .25; display: block; margin-bottom: .75rem; }
.empty-state p { font-size: .9375rem; margin: 0; }

/* ── Badges count ───────────────────────────────────────────── */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 .375rem;
  border-radius: 2px;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: var(--red);
  color: #fff;
  line-height: 1;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 2.5rem 0;
  margin-top: 5rem;
}

.site-footer .footer-brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .375rem;
}

.site-footer .footer-brand .brand-mark {
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,.15);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .55rem;
}

.site-footer p {
  color: rgba(255,255,255,.3);
  font-size: .8125rem;
  margin: 0;
}

.site-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.site-footer .footer-links a {
  color: rgba(255,255,255,.4);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .15s;
}

.site-footer .footer-links a:hover { color: rgba(255,255,255,.8); }

/* ── Pagination ─────────────────────────────────────────────── */
.archive-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.pagination-btn {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--slate);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: .375rem .875rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}

.pagination-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.pagination-btn.disabled {
  opacity: .35;
  pointer-events: none;
  cursor: default;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.pagination-page {
  min-width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8125rem;
  font-weight: 600;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--slate);
  background: var(--surface);
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
  padding: 0 .375rem;
}

.pagination-page:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.pagination-page.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  cursor: default;
}

.pagination-ellipsis {
  min-width: 1.5rem;
  text-align: center;
  font-size: .875rem;
  color: var(--muted);
  user-select: none;
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-mono { font-variant-numeric: tabular-nums; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-serif { font-family: var(--font-serif); }

@media (max-width: 767px) {
  .stats-bar { flex-direction: column; gap: 1.5rem; }
  .stats-bar .stat { border-right: none; border-bottom: 1px solid var(--rule); padding: 0 0 1.5rem; margin: 0; }
  .stats-bar .stat:last-child { border-bottom: none; padding-bottom: 0; }
  .record-name { font-size: 2rem; }
  .tab-filter { gap: .375rem; }
  .record-card { padding: 1.25rem; }
  .data-table { font-size: .8125rem; }
  .data-table thead th, .data-table tbody td { padding: .625rem .875rem; }
}
