/* JTforME public readability hardening — final release
   Purpose: prevent low-contrast text, too-small labels, and dark-on-dark hero copy across live public pages. */
:root {
  --jt-readable-ink: #102033;
  --jt-readable-muted: #38506a;
  --jt-readable-dark: #f8fbff;
  --jt-readable-dark-muted: #e4eefc;
  --jt-readable-link: #0b5cad;
  --jt-dark-surface: #10243a;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  color: var(--jt-readable-ink);
  font-size: clamp(16px, 0.96rem + 0.16vw, 18px);
  line-height: 1.65;
}
p, li, dd, dt, blockquote, td, th {
  font-size: clamp(1rem, 0.98rem + 0.12vw, 1.125rem);
  line-height: 1.68;
}
h1, h2, h3 { line-height: 1.12; }
h4, h5, h6 { line-height: 1.22; }
a { text-underline-offset: 0.18em; text-decoration-thickness: max(1px, 0.08em); }
small, .small, .meta, .kicker, .eyebrow, .tag, .badge, .chip, .pill, .label, .caption, figcaption,
.update-note, .source-note, .read-order-note, .accountability-brief-updated, .proof-route-kicker,
.formal-kicker, .research-lane-kicker, .lane-tags, .source-type, .card-meta, .timeline-meta {
  font-size: clamp(0.875rem, 0.84rem + 0.14vw, 0.98rem) !important;
  line-height: 1.45 !important;
  letter-spacing: 0.045em;
}
button, .btn, input, select, textarea { font-size: max(1rem, 16px); }

/* Dark hero / proof-route safety net. These sections were the source of dark-on-dark text on live pages. */
.page-hero, header.jumbotron, .jumbotron, .evidence-route-bridge, .matrix-hero, .library-hero,
.accountability-timeline-hero, .timeline-hero, .dark-hero, .section-dark, .proof-hero {
  background-color: var(--jt-dark-surface);
  color: var(--jt-readable-dark) !important;
}
.page-hero :is(h1,h2,h3,h4,p,li,span,div,strong,em),
.jumbotron :is(h1,h2,h3,h4,p,li,span,div,strong,em),
.evidence-route-bridge :is(h1,h2,h3,h4,p,li,span,div,strong,em),
.matrix-hero :is(h1,h2,h3,h4,p,li,span,div,strong,em),
.library-hero :is(h1,h2,h3,h4,p,li,span,div,strong,em),
.accountability-timeline-hero :is(h1,h2,h3,h4,p,li,span,div,strong,em),
.timeline-hero :is(h1,h2,h3,h4,p,li,span,div,strong,em),
.dark-hero :is(h1,h2,h3,h4,p,li,span,div,strong,em),
.section-dark :is(h1,h2,h3,h4,p,li,span,div,strong,em),
.proof-hero :is(h1,h2,h3,h4,p,li,span,div,strong,em) {
  color: var(--jt-readable-dark) !important;
}
.page-hero :is(p,li,.meta,.kicker,.read-order-note),
.jumbotron :is(p,li,.meta,.kicker,.read-order-note),
.evidence-route-bridge :is(p,li,.meta,.kicker,.read-order-note),
.matrix-hero :is(p,li,.meta,.kicker,.read-order-note),
.library-hero :is(p,li,.meta,.kicker,.read-order-note) {
  color: var(--jt-readable-dark-muted) !important;
}
.page-hero a:not(.btn), .jumbotron a:not(.btn), .evidence-route-bridge a:not(.btn),
.matrix-hero a:not(.btn), .library-hero a:not(.btn) {
  color: #d9f0ff !important;
}
.evidence-route-bridge .proof-route-actions a,
.page-hero .hero-actions-condensed a,
.jumbotron .hero-actions-condensed a {
  min-height: 44px;
  padding: 0.78rem 1rem;
  font-size: clamp(0.95rem, 0.9rem + 0.14vw, 1.04rem) !important;
  line-height: 1.25 !important;
}
.evidence-route-bridge .proof-route-actions a:first-child,
.page-hero .btn-primary,
.jumbotron .btn-primary {
  color: #071526 !important;
}
.evidence-route-mini > *, .evidence-route-mini li, .evidence-route-mini div {
  color: #f8fbff !important;
  background: rgba(255,255,255,0.085) !important;
  border-color: rgba(216,235,255,0.32) !important;
}

/* Card and light-section contrast. */
.card, .panel, article, .identity-card, .evidence-card, .lane-companion-card, .route-sequence-card,
.accountability-brief-grid > *, .accountability-proof-grid > *, .research-proof-grid > *, .timeline-card,
.public-packet-card, .resource-card, .source-card {
  color: var(--jt-readable-ink);
}
.card p, .panel p, article p, .identity-card p, .evidence-card p, .lane-companion-card p,
.route-sequence-card p, .source-card p, .resource-card p {
  color: var(--jt-readable-muted);
}
.card a, article a, .source-card a, .resource-card a { font-weight: 700; }

/* Avoid tiny crowded nav/link groups on mobile and desktop. */
.sources-nav a, .page-jump-nav a, .card-link-list a, .lane-companion-link, .accountability-verification-actions a,
.formal-citation-ribbon a, .public-record-links a {
  font-size: clamp(0.94rem, 0.9rem + 0.14vw, 1.04rem) !important;
  line-height: 1.35 !important;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  h1 { font-size: clamp(2rem, 1.45rem + 5vw, 3.1rem) !important; }
  h2 { font-size: clamp(1.55rem, 1.2rem + 3vw, 2.2rem) !important; }
  p, li, dd, dt { font-size: 1rem; }
  .container { max-width: 100%; }
  .page-hero, .jumbotron, .evidence-route-bridge, .matrix-hero, .library-hero { padding-top: 2.75rem; padding-bottom: 2.75rem; }
}
