/* ════════════════════════════════════════════════════════════════════════
   RHP.Law ADA — PRIDE THEME (hidden mode)
   Drop-in extension to the existing mode-* console taxonomy.
   Activates on body.mode-pride. Adds NOTHING to default state.
   Accessible by construction: text color/contrast is never altered —
   only accents (borders, focus glow, link underlines, the access mark)
   take the flag. Animation gated behind motion preference.
   Palette: Progress Pride (6-stripe + trans + marginalized).
   ════════════════════════════════════════════════════════════════════════ */

:root{
  --pride-red:#e40303;  --pride-orange:#ff8c00; --pride-yellow:#ffed00;
  --pride-green:#008026; --pride-blue:#004dff;  --pride-violet:#750787;
  --pride-trans-blue:#5bcefa; --pride-trans-pink:#f5a9b8;
  --pride-brown:#613915; --pride-black:#000000;
  --pride-flag:linear-gradient(90deg,
    var(--pride-red) 0%, var(--pride-red) 16.6%,
    var(--pride-orange) 16.6%, var(--pride-orange) 33.3%,
    var(--pride-yellow) 33.3%, var(--pride-yellow) 50%,
    var(--pride-green) 50%, var(--pride-green) 66.6%,
    var(--pride-blue) 66.6%, var(--pride-blue) 83.3%,
    var(--pride-violet) 83.3%, var(--pride-violet) 100%);
  --pride-flag-soft:linear-gradient(90deg,
    var(--pride-red), var(--pride-orange), var(--pride-yellow),
    var(--pride-green), var(--pride-blue), var(--pride-violet));
}

/* Fixed flag hairline at the very top of the viewport */
body.mode-pride::before{
  content:"";
  position:fixed; top:0; left:0; right:0; height:5px;
  background:var(--pride-flag);
  z-index:9999; pointer-events:none;
}

/* Access button wears the flag as a gradient frame + rainbow mark */
body.mode-pride .a11y-console-toggle{
  position:relative;
  border-color:transparent;
  background:
    linear-gradient(var(--panel,#111a2b),var(--panel,#111a2b)) padding-box,
    var(--pride-flag-soft) border-box;
  border:2px solid transparent;
}
body.mode-pride .a11y-console-mark{
  background:var(--pride-flag-soft);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  font-weight:700;
}

/* Progress/scroll bar flies the flag */
body.mode-pride .a11y-progress-bar{
  background:var(--pride-flag-soft) !important;
}

/* Links: keep their color/contrast, gain a flag underline */
body.mode-pride main a:not(.hero-cta):not(.nav-cta){
  text-decoration:none;
  background-image:var(--pride-flag-soft);
  background-position:0 100%; background-repeat:no-repeat;
  background-size:100% 2px;
  padding-bottom:1px;
}

/* Focus: solid high-contrast ring (keeps 3:1) + a rainbow glow halo */
body.mode-pride *:focus-visible{
  outline:2px solid #ffffff !important;
  outline-offset:2px !important;
  box-shadow:0 0 0 4px rgba(0,0,0,.55), 0 0 14px 3px var(--pride-blue) !important;
}

/* Console section markers get a small flag pip */
body.mode-pride .a11y-section > summary::after{
  content:""; display:inline-block; width:34px; height:6px;
  margin-left:8px; vertical-align:middle; border-radius:3px;
  background:var(--pride-flag-soft);
}

/* The active-state pill nods to the flag when pride is on */
body.mode-pride .a11y-console-state{
  background:var(--pride-flag-soft);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
}

/* ──────────────────────────────────────────────────────────────────
   THE PRIDE BANNER  (single coherent implementation)
   A slim Progress-Pride ribbon fixed across the very top of the
   viewport — above the fixed nav — carrying a dignified statement
   in the site's own gold/navy type. Injected by ada-pride.js whenever
   body.mode-pride is on; removed when pride is off. Dismissible per
   session via the × (hides the banner, leaves the theme on).
   ────────────────────────────────────────────────────────────────── */
:root{ --pride-banner-h:40px; }

#rhp-pride-banner{
  position:fixed; top:0; left:0; right:0;
  z-index:300;                 /* above .site-nav (z-index:200) */
  height:var(--pride-banner-h);
  display:flex; align-items:center; justify-content:center;
  gap:.6rem;
  padding:0 2.75rem 0 1rem;    /* room for the close × on the right */
  box-sizing:border-box;
  /* slim Progress-Pride ribbon as the bar's own background */
  background:var(--pride-flag-soft);
  border-bottom:1px solid rgba(0,0,0,.35);
  font-family:'Space Mono',ui-monospace,SFMono-Regular,monospace;
}

/* The statement: real text, site gold on a quiet navy lozenge so it
   stays legible over the ribbon and reads as type, not decoration. */
#rhp-pride-banner .pride-banner-text{
  display:inline-flex; align-items:center;
  max-width:100%;
  padding:.18rem .7rem; border-radius:6px;
  background:rgba(3,13,24,0.88);
  color:var(--gold-light,#e8c97a);
  font-size:.74rem; font-weight:700; letter-spacing:.04em;
  line-height:1.1; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis;
}

/* Close × — keyboard focusable, hides just the banner */
#rhp-pride-banner .pride-banner-close{
  position:absolute; right:.55rem; top:50%; transform:translateY(-50%);
  width:24px; height:24px; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid rgba(3,13,24,0.5); border-radius:5px;
  background:rgba(3,13,24,0.88); color:var(--gold-light,#e8c97a);
  font-size:15px; line-height:1; cursor:pointer;
}
#rhp-pride-banner .pride-banner-close:hover{
  background:rgba(3,13,24,1); color:#fff;
}
#rhp-pride-banner .pride-banner-close:focus-visible{
  outline:2px solid #fff; outline-offset:2px;
}

/* When the banner is present, push the fixed nav AND the page content
   down by exactly the banner height so nothing is covered. */
body.pride-banner-on .site-nav{ top:var(--pride-banner-h); }
body.pride-banner-on{ padding-top:calc(72px + var(--pride-banner-h)); }

/* The flag hairline ::before is redundant while the full ribbon shows */
body.pride-banner-on::before{ display:none; }

/* Print: never put the ribbon on paper */
@media print{
  #rhp-pride-banner{ display:none !important; }
  body.pride-banner-on .site-nav{ top:0; }
  body.pride-banner-on{ padding-top:72px; }
}

/* Motion: a gentle one-time shimmer ONLY when motion is welcome */
@media (prefers-reduced-motion: no-preference){
  body.mode-pride:not(.mode-reduced-motion) .a11y-console-mark{
    background-size:200% 100%;
    animation:pride-shimmer 6s linear infinite;
  }
  @keyframes pride-shimmer{
    0%{background-position:0% 50%}
    100%{background-position:200% 50%}
  }
}
/* Hard stop if the user asked for reduced motion either way */
body.mode-pride.mode-reduced-motion .a11y-console-mark{ animation:none !important; }
@media (prefers-reduced-motion: reduce){
  body.mode-pride .a11y-console-mark{ animation:none !important; }
}

/* Print: never bleed flag ink onto paper */
@media print{
  body.mode-pride::before{ display:none !important; }
  body.mode-pride main a{ background-image:none !important; }
}
