/* =========================================================================
 * PyOptimize — Code Quality Scorer (v2: vibrant + formal)
 *
 * Accessibility rules honoured (per accessibility-lead handoff v2):
 *   • Reduced motion: shimmer, counter, fade-in, transform-lift all disabled.
 *   • Gradients: text contrast verified against both endpoints and midpoint.
 *   • Severity borders: solid outer stroke in severity colour (3:1 vs panel).
 *   • Focus ring: two-layer (inner white/navy + outer accent).
 *   • Score counter: container aria-hidden="true"; status region announces once.
 *   • Glass header: 90% opaque base + backdrop-filter with fallback.
 *   • Grade gradient badge: text + glyph + aria-label preserved.
 *   • Forced-colors + prefers-reduced-transparency media queries present.
 *   • No background-clip:text on informational copy.
 * ========================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,600;0,9..144,700;1,9..144,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* --- Root tokens --- */
:root {
  color-scheme: light dark;

  /* Light mode */
  --bg: #eff2fa;
  --bg-2: #e4eaf7;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --surface-raised: #ffffff;
  --border: #c7cfe0;
  --border-strong: #7886a8;
  --text: #0f1631;
  --text-muted: #475069;
  --text-inverse: #ffffff;

  --link: #1d3aa2;
  --link-hover: #0a1e6b;
  --accent: #1d3aa2;
  --accent-strong: #341d9e;

  /* Primary gradient stops — verified ≥4.5:1 with white text */
  --grad-1: #1e2a8a; /* deep indigo */
  --grad-2: #4a1fb0; /* violet */
  --grad-3: #7a1fa2; /* fuchsia-ish */

  /* Secondary accents */
  --teal: #0d6e68;
  --amber: #b45309;

  /* Severity */
  --sev-low: #1d5a2b;
  --sev-medium: #8a4b00;
  --sev-high: #a1001b;
  --sev-low-bg: #e6f4e9;
  --sev-medium-bg: #fbefd9;
  --sev-high-bg: #fbe3e7;

  /* Grade palettes — darker ends ensure white text passes 4.5:1 */
  --grade-a-1: #166534;
  --grade-a-2: #15803d;
  --grade-b-1: #1e40af;
  --grade-b-2: #1d4ed8;
  --grade-c-1: #92400e;
  --grade-c-2: #b45309;
  --grade-d-1: #9a3412;
  --grade-d-2: #c2410c;
  --grade-f-1: #991b1b;
  --grade-f-2: #b91c1c;

  --focus-outer: #1d3aa2;
  --focus-inner: #ffffff;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(18, 24, 56, 0.08);
  --shadow-md: 0 8px 20px -10px rgba(18, 24, 56, 0.25),
    0 2px 6px rgba(18, 24, 56, 0.08);
  --shadow-lg: 0 24px 48px -24px rgba(24, 20, 80, 0.35),
    0 4px 12px rgba(18, 24, 56, 0.1);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;

  --serif: "Fraunces", "Source Serif Pro", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
}

[data-theme="dark"] {
  --bg: #070c1d;
  --bg-2: #0c132a;
  --surface: #121a35;
  --surface-2: #0e1530;
  --surface-raised: #17204a;
  --border: #2a3766;
  --border-strong: #6c7aa6;
  --text: #f1f5ff;
  --text-muted: #bfc9e2;
  --text-inverse: #070c1d;

  --link: #a9b8ff;
  --link-hover: #d0daff;
  --accent: #a9b8ff;
  --accent-strong: #c4b5fd;

  --grad-1: #3b2dae;
  --grad-2: #6d28d9;
  --grad-3: #a21caf;

  --teal: #2dd4bf;
  --amber: #fcd34d;

  --sev-low: #7fe29a;
  --sev-medium: #ffce7a;
  --sev-high: #ff8a9a;
  --sev-low-bg: #163326;
  --sev-medium-bg: #3b2a10;
  --sev-high-bg: #3a1620;

  --grade-a-1: #166534;
  --grade-a-2: #22a357;
  --grade-b-1: #2042b8;
  --grade-b-2: #3f6ef0;
  --grade-c-1: #8a4b00;
  --grade-c-2: #c97a16;
  --grade-d-1: #9a3412;
  --grade-d-2: #d4551a;
  --grade-f-1: #991b1b;
  --grade-f-2: #d32f2f;

  --focus-outer: #a9b8ff;
  --focus-inner: #070c1d;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Soft editorial backdrop — static in reduced motion */
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(122, 31, 162, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(30, 42, 138, 0.09), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(162, 28, 175, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(59, 45, 174, 0.25), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

::selection {
  background: var(--grad-2);
  color: #fff;
}

a {
  color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover,
a:focus-visible {
  color: var(--link-hover);
}

/* --- Visually-hidden (sr-only) --- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-3);
  background: var(--accent);
  color: var(--text-inverse);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus-visible {
  top: var(--space-3);
}

/* --- Two-layer focus ring (WCAG 2.4.7 + 1.4.11) --- */
:focus-visible {
  outline: 2px solid var(--focus-outer);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-inner), 0 0 0 6px var(--focus-outer);
  border-radius: 4px;
}

/* --- Header with glass effect --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}
[data-theme="dark"] .site-header {
  background: rgba(8, 12, 30, 0.92);
}
/* Respect user preference for reduced transparency */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: space-between;
  flex-wrap: wrap;
}
.site-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}
.site-title__mark {
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2), var(--grad-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Decorative only — full title text is in normal colour via fallback word. */
}
/* Forced-colors mode: gradient text is invisible — use solid system colour. */
@media (forced-colors: active) {
  .site-title__mark {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }
}

/* --- Theme toggle --- */
.theme-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
}
.theme-toggle[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  color: #fff;
  border-color: transparent;
}

/* --- Hero section --- */
.hero {
  position: relative;
  padding: var(--space-8) var(--space-5) var(--space-6);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(
    135deg,
    var(--grad-1) 0%,
    var(--grad-2) 55%,
    var(--grad-3) 100%
  );
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 0, transparent 35%),
    radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.12) 0, transparent 40%);
  pointer-events: none;
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: -50% -10%;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.12) 55%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
  transform: translateX(-30%);
}
.hero__inner {
  max-width: 1100px;
  margin: 0 auto;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: var(--space-4);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  max-width: 820px;
}
.hero__lede {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.93);
}

/* Animations ONLY under no-preference */
@media (prefers-reduced-motion: no-preference) {
  .hero::after {
    animation: hero-shimmer 14s linear infinite;
  }
  @keyframes hero-shimmer {
    0%   { transform: translateX(-30%); }
    100% { transform: translateX(30%); }
  }
}

/* --- Main layout --- */
.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
  width: 100%;
  flex: 1;
}
.site-main:focus {
  outline: none;
}

/* --- Panels (cards) --- */
.panel {
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-md);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--grad-1), var(--grad-2), var(--grad-3));
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  opacity: 0.85;
}
.panel:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.panel h2 {
  margin-top: 0;
  margin-bottom: var(--space-3);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.lede {
  margin-top: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- Upload --- */
.upload-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.upload-label {
  font-weight: 600;
  color: var(--text);
}
.upload-input {
  font: inherit;
  padding: var(--space-3);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  max-width: 100%;
  min-height: 48px;
  transition: border-color 150ms ease, background 150ms ease;
}
.upload-input:hover {
  border-color: var(--accent);
}
.upload-input::file-selector-button {
  font: inherit;
  font-weight: 600;
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  color: #fff;
  border: 0;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  margin-right: var(--space-3);
  cursor: pointer;
}
.upload-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  min-height: 44px;
  align-self: flex-start;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease,
    filter 150ms ease;
}
.button--primary {
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  color: #fff;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}
.button--primary:hover {
  filter: brightness(1.08);
}
.button--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.button--ghost:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

/* --- Live regions --- */
.status {
  min-height: 1.5em;
  font-weight: 500;
  color: var(--text-muted);
  padding: var(--space-2) 0;
}
.status[data-state="analysing"] {
  color: var(--accent-strong);
}
.alert {
  background: var(--sev-high-bg);
  border: 2px solid var(--sev-high);
  color: var(--sev-high);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* --- Score card --- */
.score-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.score-card__ring {
  position: relative;
  width: 128px;
  height: 128px;
  flex-shrink: 0;
}
.score-card__ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.score-card__ring .ring-bg {
  stroke: var(--border);
}
.score-card__ring .ring-fg {
  stroke: url(#scoreGradient);
  stroke-linecap: round;
  transition: stroke-dashoffset 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .score-card__ring .ring-fg {
    transition: none;
  }
}
.score-card__ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
}
.score-card__number {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.score-card__out-of {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--sans);
  font-weight: 500;
}
.score-card__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.score-card__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}
.score-card__title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}

/* --- Grade badge (gradient fill, text + glyph) --- */
.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  color: #fff; /* white text — verified ≥4.5:1 on all grade gradients */
  background: linear-gradient(135deg, var(--g1, #334155), var(--g2, #475569));
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.12);
  min-height: 56px;
}
.grade-badge[data-grade="A"] { --g1: var(--grade-a-1); --g2: var(--grade-a-2); }
.grade-badge[data-grade="B"] { --g1: var(--grade-b-1); --g2: var(--grade-b-2); }
.grade-badge[data-grade="C"] { --g1: var(--grade-c-1); --g2: var(--grade-c-2); }
.grade-badge[data-grade="D"] { --g1: var(--grade-d-1); --g2: var(--grade-d-2); }
.grade-badge[data-grade="F"] { --g1: var(--grade-f-1); --g2: var(--grade-f-2); }
.grade-badge[data-grade="pending"] {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
}
.grade-badge__glyph {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: #fff;
}
.grade-badge[data-grade="pending"] .grade-badge__glyph {
  color: var(--text-muted);
}
.grade-badge__letter {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 700;
}
.grade-badge__word {
  font-weight: 600;
  font-size: 0.95rem;
}
.score-summary {
  margin-top: var(--space-4);
  color: var(--text-muted);
  grid-column: 1 / -1;
  font-size: 1rem;
}

/* --- Findings list --- */
.findings-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}
.finding {
  position: relative;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}
.finding::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--sev-color, var(--sev-medium));
}
.finding[data-severity="low"] { --sev-color: var(--sev-low); }
.finding[data-severity="medium"] { --sev-color: var(--sev-medium); }
.finding[data-severity="high"] { --sev-color: var(--sev-high); }

.finding:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.finding__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.finding__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.severity-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
}
.severity-tag[data-severity="low"] { color: var(--sev-low); background: var(--sev-low-bg); }
.severity-tag[data-severity="medium"] { color: var(--sev-medium); background: var(--sev-medium-bg); }
.severity-tag[data-severity="high"] { color: var(--sev-high); background: var(--sev-high-bg); }

.finding__rule {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 2px 8px;
  background: var(--bg-2);
  border-radius: 4px;
}
.finding__desc {
  margin: 0 0 var(--space-2);
  color: var(--text);
}
.finding__locations {
  margin: 0;
  padding-left: var(--space-5);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.finding__locations a {
  color: var(--link);
  font-weight: 500;
}

/* --- Code display with inline flags --- */
.code-hint {
  color: var(--text-muted);
  margin-top: 0;
}
.code-display {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  overflow-x: auto;
  max-height: 70vh;
  margin: 0;
  box-shadow: var(--shadow-sm);
}
.code-display code {
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre;
  display: block;
  color: var(--text);
}

/* Flagged inline highlights — severity encoded by colour + border-style. */
.flag {
  background: var(--sev-medium-bg);
  color: var(--text);
  padding: 1px 3px;
  border-radius: 2px;
  border-bottom: 2px solid var(--sev-medium);
  cursor: pointer;
  text-decoration: none;
}
.flag[data-severity="low"] {
  background: var(--sev-low-bg);
  border-bottom: 2px solid var(--sev-low);
}
.flag[data-severity="medium"] {
  background: var(--sev-medium-bg);
  border-bottom: 2px dashed var(--sev-medium);
}
.flag[data-severity="high"] {
  background: var(--sev-high-bg);
  border-bottom: 2px double var(--sev-high);
}
.flag:focus-visible {
  outline: 2px solid var(--focus-outer);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-inner), 0 0 0 6px var(--focus-outer);
}

.findings-empty {
  margin: 0;
  color: var(--text-muted);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  background: var(--surface);
}
.site-footer__link {
  font-weight: 600;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero::after {
    display: none;
  }
}

/* --- Reflow (1.4.10) --- */
@media (max-width: 720px) {
  .score-card {
    grid-template-columns: auto 1fr;
  }
  .score-card__meta {
    grid-column: 2 / 3;
  }
  .grade-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .hero {
    padding: var(--space-6) var(--space-5) var(--space-5);
  }
}
@media (max-width: 480px) {
  .score-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .score-card__ring {
    width: 104px;
    height: 104px;
  }
  .score-card__number {
    font-size: 2rem;
  }
  .panel {
    padding: var(--space-5) var(--space-4);
  }
}

/* --- Forced-colors mode (Windows High Contrast) --- */
@media (forced-colors: active) {
  .panel,
  .finding,
  .score-card,
  .grade-badge,
  .code-display,
  .alert,
  .theme-toggle,
  .button,
  .upload-input {
    border: 1px solid CanvasText !important;
  }
  :focus-visible {
    outline: 2px solid Highlight !important;
    box-shadow: none !important;
  }
  .panel::before,
  .hero::before,
  .hero::after {
    display: none;
  }
  .hero,
  .button--primary,
  .theme-toggle[aria-pressed="true"] {
    background: ButtonFace !important;
    color: ButtonText !important;
  }
  .site-title__mark {
    color: CanvasText !important;
    -webkit-text-fill-color: CanvasText !important;
    background: none !important;
  }
}
