/* JTforME final public contrast and type-safety layer.
   Loaded last on every page. Keep dark surfaces light, paper surfaces dark,
   and never let a parent section force the wrong color into nested cards. */
:root{
  --jt-ink:#102a43;
  --jt-copy:#334155;
  --jt-muted:#465a70;
  --jt-link:#075b9a;
  --jt-paper:#fffdf8;
  --jt-paper-soft:#fbf5ea;
  --jt-dark:#07192d;
  --jt-dark-2:#102a43;
  --jt-on-dark:#ffffff;
  --jt-on-dark-copy:#e5eef9;
  --jt-cyan:#bcecff;
  --jt-gold:#ffda66;
  --jt-red:#8d1f2d;
}

html{font-size:16px!important;-webkit-text-size-adjust:100%;text-size-adjust:100%;}
body{font-size:clamp(16px,.96rem + .12vw,18px);line-height:1.66;color:var(--jt-ink);}
p,li,dd,dt,td,th,summary{font-size:clamp(1rem,.97rem + .1vw,1.1rem);line-height:1.66;}
small,.small,.meta,.kicker,.eyebrow,.tag,.badge,.chip,.pill,.label,.caption,figcaption,
.accountability-brief-updated,.proof-route-kicker,.formal-kicker,.research-lane-kicker,
.lane-tags span,.source-type,.card-meta,.timeline-meta,.source-label,.matrix-kicker,
.hero-side-card .meta,.hero-kpi-card .meta,.hero-kpi-card .detail{
  font-size:clamp(.875rem,.84rem + .1vw,.98rem)!important;
  line-height:1.45!important;
}
button,.btn,input,select,textarea{font-size:max(1rem,16px)!important;}
a{text-underline-offset:.18em;text-decoration-thickness:max(1px,.08em);}

/* General paper/card surfaces. */
html body :is([class*="-card"],[class*="-panel"],.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card,aside){
  color:var(--jt-ink)!important;
}
html body :is([class*="-card"],[class*="-panel"],.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card,aside)
:is(h1,h2,h3,h4,h5,h6,strong,em,.big,.label){
  color:var(--jt-ink)!important;
  text-shadow:none!important;
}
html body :is([class*="-card"],[class*="-panel"],.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card,aside)
:is(p,li,dd,dt,span,small,.meta,.detail,.caption,figcaption){
  color:var(--jt-copy)!important;
  text-shadow:none!important;
}
html body :is([class*="-card"],[class*="-panel"],.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card,aside)
a:not(.btn){color:var(--jt-link)!important;}

/* Dark public surfaces. Do not include light visitor briefs or paper cards here. */
:is(.hero,.page-hero,.jumbotron,header.jumbotron,.dark-hero,.section-dark,.proof-hero,
.evidence-route-bridge,.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,
.home-accountability-funnel,.accountability-reader-map-section,.accountability-hero,.record-hero,
.privacy-no-intake-ribbon,.site-boundary-ribbon,.site-intent-strip,.footer,.evidence-bridge,.initiative-bridge){
  color:var(--jt-on-dark)!important;
}
:is(.hero,.page-hero,.jumbotron,header.jumbotron,.dark-hero,.section-dark,.proof-hero,
.evidence-route-bridge,.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,
.home-accountability-funnel,.accountability-reader-map-section,.accountability-hero,.record-hero,
.privacy-no-intake-ribbon,.site-boundary-ribbon,.site-intent-strip,.footer,.evidence-bridge,.initiative-bridge)
:is(h1,h2,h3,h4,h5,h6,strong,em){
  color:var(--jt-on-dark)!important;
  text-shadow:none!important;
}
:is(.hero,.page-hero,.jumbotron,header.jumbotron,.dark-hero,.section-dark,.proof-hero,
.evidence-route-bridge,.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,
.home-accountability-funnel,.accountability-reader-map-section,.accountability-hero,.record-hero,
.privacy-no-intake-ribbon,.site-boundary-ribbon,.site-intent-strip,.footer,.evidence-bridge,.initiative-bridge)
:is(p,li,dd,dt,small,.meta,.kicker,.eyebrow,.caption,figcaption){
  color:var(--jt-on-dark-copy)!important;
  text-shadow:none!important;
}
:is(.hero,.page-hero,.jumbotron,header.jumbotron,.dark-hero,.section-dark,.proof-hero,
.evidence-route-bridge,.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,
.home-accountability-funnel,.accountability-reader-map-section,.accountability-hero,.record-hero,
.privacy-no-intake-ribbon,.site-boundary-ribbon,.site-intent-strip,.footer,.evidence-bridge,.initiative-bridge)
a:not(.btn){color:var(--jt-cyan)!important;}

/* Light surfaces nested inside dark sections must stay dark-on-light. */
html body :is(.hero,.page-hero,.jumbotron,.dark-hero,.section-dark,.proof-hero,.evidence-route-bridge,
.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,.home-accountability-funnel,
.accountability-reader-map-section,.accountability-hero,.record-hero)
:is([class*="-card"],[class*="-panel"],aside,.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card){
  color:var(--jt-ink)!important;
}
html body :is(.hero,.page-hero,.jumbotron,.dark-hero,.section-dark,.proof-hero,.evidence-route-bridge,
.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,.home-accountability-funnel,
.accountability-reader-map-section,.accountability-hero,.record-hero)
:is([class*="-card"],[class*="-panel"],aside,.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card)
:is(h1,h2,h3,h4,h5,h6,strong,em,.big,.label){color:var(--jt-ink)!important;}
html body :is(.hero,.page-hero,.jumbotron,.dark-hero,.section-dark,.proof-hero,.evidence-route-bridge,
.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,.home-accountability-funnel,
.accountability-reader-map-section,.accountability-hero,.record-hero)
:is([class*="-card"],[class*="-panel"],aside,.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card)
:is(p,li,dd,dt,span,small,.meta,.detail,.caption,figcaption){color:var(--jt-copy)!important;}
html body :is(.hero,.page-hero,.jumbotron,.dark-hero,.section-dark,.proof-hero,.evidence-route-bridge,
.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,.home-accountability-funnel,
.accountability-reader-map-section,.accountability-hero,.record-hero)
:is([class*="-card"],[class*="-panel"],aside,.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card)
a:not(.btn){color:var(--jt-link)!important;}

/* Visitor briefs are paper sections, not dark heroes. */
html body .accountability-visitor-brief{
  color:var(--jt-ink)!important;
  background:linear-gradient(180deg,#f8fbff 0%,#edf6ff 100%)!important;
}
html body .accountability-visitor-brief :is(h1,h2,h3,h4,h5,h6,strong,em){color:var(--jt-ink)!important;}
html body .accountability-visitor-brief :is(p,li,span,small,.meta,.kicker){color:var(--jt-copy)!important;}
html body .accountability-visitor-brief a:not(.btn){color:var(--jt-link)!important;}

/* Dark translucent cards that intentionally remain on dark backgrounds. */
html body :is(.accountability-reader-map-section,.home-accountability-funnel,.evidence-route-bridge)
:is(.accountability-proof-step,.reader-map-card,.home-accountability-standard,.home-accountability-card,.home-proof-card,.evidence-route-mini > *){
  background-color:rgba(255,255,255,.075)!important;
  background-image:none!important;
  border-color:rgba(216,235,255,.28)!important;
  color:var(--jt-on-dark)!important;
}
html body :is(.accountability-reader-map-section,.home-accountability-funnel,.evidence-route-bridge)
:is(.accountability-proof-step,.reader-map-card,.home-accountability-standard,.home-accountability-card,.home-proof-card,.evidence-route-mini > *)
:is(h1,h2,h3,h4,h5,h6,strong,em,.big,.label){color:var(--jt-on-dark)!important;}
html body :is(.accountability-reader-map-section,.home-accountability-funnel,.evidence-route-bridge)
:is(.accountability-proof-step,.reader-map-card,.home-accountability-standard,.home-accountability-card,.home-proof-card,.evidence-route-mini > *)
:is(p,li,span,small,.meta,.detail){color:var(--jt-on-dark-copy)!important;}
html body :is(.accountability-reader-map-section,.home-accountability-funnel,.evidence-route-bridge)
:is(.accountability-proof-step,.reader-map-card,.home-accountability-standard,.home-accountability-card,.home-proof-card,.evidence-route-mini > *) a:not(.btn){color:var(--jt-cyan)!important;}

/* Footer cards are dark translucent, despite the global civic paper-card rule. */
html body .footer .footer-nav-card{
  background:rgba(255,255,255,.055)!important;
  border-color:rgba(255,255,255,.14)!important;
  color:var(--jt-on-dark)!important;
  box-shadow:none!important;
}
html body .footer .footer-nav-card :is(h1,h2,h3,h4,strong,em){color:var(--jt-on-dark)!important;}
html body .footer .footer-nav-card :is(p,li,span,small,.meta){color:var(--jt-on-dark-copy)!important;}
html body .footer .footer-nav-card a{color:var(--jt-cyan)!important;}
html body .footer :is(p,li,span,small,.meta,strong,h2,h3,h4){color:var(--jt-on-dark-copy)!important;}
html body .footer :is(h2,h3,h4,strong){color:var(--jt-on-dark)!important;}
html body .footer a{color:var(--jt-cyan)!important;}

/* Safety and boundary ribbons. */
html body .privacy-no-intake-ribbon :is(p,li,span,strong),
html body .site-boundary-ribbon :is(p,li,span,strong){color:var(--jt-on-dark-copy)!important;}
html body .privacy-no-intake-ribbon strong,
html body .site-boundary-ribbon strong{color:var(--jt-on-dark)!important;}
html body .privacy-no-intake-ribbon a,
html body .site-boundary-ribbon a{color:var(--jt-cyan)!important;}

/* Navigation and horizontal route strips. */
html body .navbar .navbar-brand,
html body .navbar .navbar-nav>li>a{color:var(--jt-ink)!important;background:transparent!important;}
html body .navbar .navbar-nav>li>a:hover,
html body .navbar .navbar-nav>li>a:focus{color:var(--jt-red)!important;background:#fff8f0!important;}
html body .navbar .navbar-nav>li>a.nav-current,
html body .navbar .navbar-nav>li>a.nav-highlight,
html body .navbar .navbar-nav>li>a.nav-priority-link{
  color:#741c29!important;
  background:#fff4ef!important;
  border-color:rgba(141,31,45,.28)!important;
}
html body .platform-rail{background:#f7f1e7!important;color:var(--jt-ink)!important;}
html body .platform-rail .rail-label{color:#36506a!important;}
html body .platform-rail a,
html body .page-jump-nav a,
html body .hero .sources-nav a,
html body .page-hero .sources-nav a,
html body .hero-utility-row a,
html body .site-intent-strip.site-intent-strip a{
  color:var(--jt-ink)!important;
  background:#fffdf8!important;
  border:1px solid rgba(16,42,67,.22)!important;
  text-shadow:none!important;
  font-weight:800!important;
  min-height:42px;
}
html body .platform-rail a:hover,
html body .platform-rail a:focus,
html body .page-jump-nav a:hover,
html body .page-jump-nav a:focus,
html body .hero .sources-nav a:hover,
html body .page-hero .sources-nav a:hover,
html body .hero-utility-row a:hover,
html body .site-intent-strip.site-intent-strip a:hover{
  color:#071526!important;background:#dff5ff!important;border-color:#0b6b9c!important;
}
html body .platform-rail a.rail-priority,
html body .site-intent-strip.site-intent-strip a.intent-urgent{
  color:#741c29!important;background:#fff1ee!important;border-color:rgba(141,31,45,.34)!important;
}
html body .platform-rail a.rail-current,
html body .page-jump-nav a[aria-current="location"]{
  color:#071526!important;background:#cdefff!important;border-color:#0b6b9c!important;
}
html body .site-intent-strip :is(.intent-label,span){color:var(--jt-on-dark-copy)!important;}

/* Buttons: use only combinations with strong contrast. */
html body .btn-primary,
html body .hero-actions-condensed .btn-primary,
html body .proof-route-actions a.primary,
html body .matrix-actions a.primary{
  color:#071526!important;background:#ffda66!important;border-color:#d29f12!important;
}
html body .btn-accent{color:#071526!important;background:#75dcf3!important;border-color:#2394ae!important;}
html body .btn-default,
html body .btn-outline-primary{
  color:var(--jt-ink)!important;background:#fffdf8!important;border-color:rgba(16,42,67,.28)!important;
}
html body .btn-primary:hover,html body .btn-primary:focus{color:#071526!important;background:#ffe58f!important;}
html body .btn-default:hover,html body .btn-default:focus{color:#071526!important;background:#e8f6ff!important;}

/* Pills/tags on paper surfaces. */
html body :is(.lane-tags span,.tag,.badge,.chip,.pill,.source-label,.source-type,
.formal-citation-ribbon a,.formal-citation-ribbon span,.accountability-status-strip span,
.matrix-actions a,.evidence-row-actions a,.source-quality,.timeline-tag,
.accountability-verification-actions a,.public-record-links a,.floating-actions a){
  color:var(--jt-ink)!important;
  background:#fffdf8!important;
  border-color:rgba(16,42,67,.24)!important;
  text-shadow:none!important;
  font-weight:800!important;
}

/* Numeric callouts and KPI labels on paper cards. */
html body :is([class*="-card"],[class*="-panel"],.proof-card,.metric-card)
:is(.big,.score-number,.stat-number,.pillar-number,.child-standard-number,.step-number,.record-anchor-stat){
  color:var(--jt-ink)!important;text-shadow:none!important;
}
html body .hero-kpi-card .big{
  color:var(--jt-ink)!important;font-size:clamp(2rem,3vw,2.75rem)!important;line-height:1!important;
}
html body .hero-kpi-card .label{
  color:var(--jt-ink)!important;background:transparent!important;border:0!important;padding:0!important;
  font-size:1rem!important;line-height:1.35!important;display:block!important;
}
html body .hero-kpi-card .detail{
  color:var(--jt-copy)!important;font-size:.95rem!important;line-height:1.5!important;
}
html body .hero-side-card .meta{font-size:.9rem!important;color:#36506a!important;}
html body .hero-side-card h3{font-size:clamp(1.35rem,1.8vw,1.75rem)!important;}
html body .hero-route-list strong{font-size:1rem!important;}
html body .hero-route-list span{font-size:.95rem!important;}
html body .site-intent-strip .intent-label{font-size:.875rem!important;}

/* Minimum readable size for recurring dense UI. */
html body :is(.sources-nav a,.page-jump-nav a,.platform-rail a,.site-intent-strip a,.hero-utility-row a,
.card-link-list a,.lane-companion-link,.accountability-verification-actions a,.formal-citation-ribbon a,
.public-record-links a,.floating-actions a,.proof-route-actions a){
  font-size:clamp(.9rem,.86rem + .1vw,1rem)!important;
  line-height:1.35!important;
}
html body .accountability-page :is(p,li,.evidence-row-summary,.evidence-cell p,.evidence-cell li,
.citation-spine-card p,.formal-page-card p,.proof-route-card p,.timeline-card p,.timeline-card li,
.standard-card p,.packet-card p,.packet-card li,.resource-card p,.resource-card li){
  font-size:max(1rem,16px)!important;line-height:1.65!important;
}
html body .accountability-page :is(.evidence-cell h4,.record-hero-badge,.conduct-anchor-card .anchor-date,
.matrix-kicker,.proof-route-kicker,.lane-tags span,.source-quality span,.matrix-subnav a,.matrix-print-note){
  font-size:max(.875rem,14px)!important;line-height:1.45!important;
}

/* Specificity corrections found in rendered full-site review. */
html body .page-hero .hero-utility-row.hero-utility-row a,
html body .hero .hero-utility-row.hero-utility-row a,
html body .accountability-hero .hero-utility-row.hero-utility-row a{
  color:var(--jt-ink)!important;
  background:var(--jt-paper)!important;
  border-color:rgba(16,42,67,.24)!important;
  text-shadow:none!important;
}
html body .page-hero .hero-utility-row.hero-utility-row a:hover,
html body .page-hero .hero-utility-row.hero-utility-row a:focus,
html body .hero .hero-utility-row.hero-utility-row a:hover,
html body .hero .hero-utility-row.hero-utility-row a:focus{
  color:#071526!important;
  background:#dff5ff!important;
  border-color:#0b6b9c!important;
}

/* Light-section eyebrow/kicker text must be dark enough on cream and white. */
html body :is(.section,.section-alt,.accountability-visitor-brief,.accountability-verification-standard,
.accountability-evidence-section,.accountability-source-section,.accountability-record-section,
.page-identity-band,.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card,
[class*="-card"],[class*="-panel"])
:is(.kicker,.eyebrow,.formal-kicker,.proof-route-kicker,.research-lane-kicker,.matrix-kicker,.source-label,.source-type){
  color:#714400!important;
  text-shadow:none!important;
}

/* Restore gold orientation labels on actual dark sections. */
html body :is(.hero,.page-hero,.jumbotron,header.jumbotron,.dark-hero,.section-dark,.proof-hero,
.evidence-route-bridge,.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,
.home-accountability-funnel,.accountability-reader-map-section,.accountability-hero,.record-hero,
.footer,.evidence-bridge,.initiative-bridge)
:is(.kicker,.eyebrow,.formal-kicker,.proof-route-kicker,.research-lane-kicker,.matrix-kicker,.source-label,.source-type){
  color:var(--jt-gold)!important;
  text-shadow:none!important;
}

/* A light paper card inside a dark section still needs dark orientation labels. */
html body :is(.hero,.page-hero,.jumbotron,.dark-hero,.section-dark,.proof-hero,.evidence-route-bridge,
.matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero,.home-accountability-funnel,
.accountability-reader-map-section,.accountability-hero,.record-hero)
:is([class*="-card"],[class*="-panel"],aside,.reader-card,.reader-top,.reader-body,.bill-prose,.notice-strip,.meta-card)
:is(.kicker,.eyebrow,.formal-kicker,.proof-route-kicker,.research-lane-kicker,.matrix-kicker,.source-label,.source-type){
  color:#714400!important;
}

html body .footer a:not(.btn){color:#d9f4ff!important;text-decoration-color:rgba(217,244,255,.7)!important;}

@media(max-width:720px){
  body{font-size:17px;}
  p,li,dd,dt,td,th,summary{font-size:1rem;}
  h1{font-size:clamp(2rem,1.35rem + 6vw,3.1rem)!important;}
  h2{font-size:clamp(1.55rem,1.15rem + 4vw,2.35rem)!important;}
  .page-hero,.jumbotron,.dark-hero,.section-dark,.proof-hero,.evidence-route-bridge,
  .matrix-hero,.library-hero,.accountability-timeline-hero,.timeline-hero{padding-top:2.5rem!important;padding-bottom:2.5rem!important;}
}
