/* ============================================================================
   Domain Security Check — visual system
   "The Security Report": editorial-technical. Serif display (Fraunces),
   monospaced technical readouts (JetBrains Mono), clean grotesque body
   (Hanken Grotesk). Warm-paper light theme, deep observatory dark theme.
   Self-hosted fonts only (CSP font-src 'self').
   ============================================================================ */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('/fonts/fraunces-var.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/hanken-var.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('/fonts/jbmono-var.woff2') format('woff2'); }

@property --pct { syntax: '<number>'; inherits: false; initial-value: 0; }

:root {
  /* Light — warm paper */
  --bg: #f3efe6;
  --bg-elev: #fffdf8;
  --bg-sunk: #efeadd;
  --text: #1d1b16;
  --text-muted: #6c6555;
  --border: #e5dfd0;
  --border-strong: #d7cfba;

  --brand: #0e7c86;       /* petrol/teal — distinct from status hues */
  --brand-dark: #0a5d65;
  --brand-soft: #d6ebec;

  --pass: #157a45;
  --pass-bg: #e4f3e9;
  --warn: #8a5a0f;
  --warn-bg: #f8efdb;
  --fail: #cf3535;
  --fail-bg: #f9e7e6;
  --info: #6c7587;
  --info-bg: #ecebe3;

  --ring-track: #e3ddcd;

  --shadow: 0 1px 2px rgba(40, 33, 16, 0.05), 0 10px 30px -12px rgba(40, 33, 16, 0.18);
  --shadow-lift: 0 2px 4px rgba(40, 33, 16, 0.06), 0 18px 44px -16px rgba(40, 33, 16, 0.28);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1080px;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --grain: .04;

  font-family: var(--font-body);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark — deep observatory */
    --bg: #0e1110;
    --bg-elev: #171b1a;
    --bg-sunk: #0a0d0c;
    --text: #e9e7df;
    --text-muted: #969d96;
    --border: #272d2b;
    --border-strong: #36403d;

    --brand: #38d3c6;
    --brand-dark: #5fe0d5;
    --brand-soft: #11302f;

    --pass: #3ed68c;
    --pass-bg: #0f2a1d;
    --warn: #f0b740;
    --warn-bg: #2c2210;
    --fail: #ff6b6b;
    --fail-bg: #2e1517;
    --info: #8b94a4;
    --info-bg: #1b211f;

    --ring-track: #2a302e;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 34px -14px rgba(0, 0, 0, 0.7);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.55), 0 22px 50px -16px rgba(0, 0, 0, 0.8);
    --grain: .05;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Atmosphere: a soft brand glow up top + a faint film grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 460px at 50% -8%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 62%),
    radial-gradient(600px 400px at 88% 6%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: var(--grain);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.5) blur(10px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand strong { color: var(--brand); font-weight: 700; }
.brand-logo { width: 30px; height: 30px; color: var(--brand); }
.top-nav {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  font-weight: 500;
}
.top-nav a { color: var(--text-muted); }
.top-nav a:hover { color: var(--brand); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 72px 0 34px;
}
.hero-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.lead {
  font-size: clamp(1.02rem, 2.1vw, 1.22rem);
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 32px;
}
.lead strong { color: var(--text); font-weight: 600; }

.scan-form {
  display: flex;
  gap: 10px;
  max-width: 580px;
  margin: 0 auto;
}
.field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.field-icon {
  position: absolute;
  left: 16px;
  font-size: 1rem;
  opacity: 0.55;
  pointer-events: none;
}
#domain-input {
  width: 100%;
  padding: 16px 16px 16px 42px;
  font-family: var(--font-mono);
  font-size: 1.02rem;
  color: var(--text);
  background: var(--bg-elev);
  border: 1.5px solid var(--border-strong);
  border-radius: 13px;
  box-shadow: var(--shadow);
  transition: border-color 0.18s, box-shadow 0.18s;
}
#domain-input::placeholder { color: var(--text-muted); opacity: 0.6; }
#domain-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}
#scan-button {
  padding: 0 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 13px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 22px -10px var(--brand);
  transition: background 0.18s, transform 0.06s, box-shadow 0.18s;
}
#scan-button:hover { background: var(--brand-dark); box-shadow: 0 12px 28px -10px var(--brand); }
#scan-button:active { transform: translateY(1px); }
#scan-button:disabled { opacity: 0.6; cursor: progress; box-shadow: none; }
@media (prefers-color-scheme: dark) {
  #scan-button { color: #06201f; }
}
.form-error {
  color: var(--fail);
  margin: 16px 0 0;
  font-weight: 500;
}
.hint {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-top: 18px;
}

/* ---------- Results ---------- */
.results { margin: 12px 0 8px; }
.results:empty { margin: 0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Overview ---------- */
.overview {
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  flex-wrap: wrap;
  animation: rise 0.5s both;
}
.overall-grade {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: conic-gradient(var(--gc, var(--info)) calc(var(--pct, 0) * 1%), var(--ring-track) 0);
  transition: --pct 0.5s ease-out;
}
.overall-grade::before {
  content: '';
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}
.overall-grade .grade-letter {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.7rem;
  line-height: 1;
  color: var(--gc, var(--text));
}
.overall-grade .grade-pct {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}
.overview-text { flex: 1; min-width: 260px; }
.overview-text h2 {
  margin: 0 0 5px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  word-break: break-all;
}
.overview-text .scan-meta {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0 0 16px;
}
.cat-bars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
}
.cat-bar { font-size: 0.8rem; }
.cat-bar .cat-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--text-muted);
}
.cat-bar .cat-label span:last-child { font-family: var(--font-mono); }
.cat-bar .bar {
  height: 8px;
  border-radius: 5px;
  background: var(--bg-sunk);
  overflow: hidden;
}
.cat-bar .bar > span {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--gc, var(--info));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Overview bars are links that jump to their module card below */
a.cat-bar {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
a.cat-bar:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
a.cat-bar:hover .cat-label { color: var(--text); }
a.cat-bar:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Brief highlight after jumping to a module card from the overview */
@keyframes jump-flash {
  0% { box-shadow: 0 0 0 3px var(--brand); }
  100% { box-shadow: 0 0 0 3px transparent; }
}
.module.jump-flash { animation: jump-flash 1.4s ease-out; }

/* Errored / ungradeable module: muted hatched bar with "!" label */
.cat-bar-error .cat-label span:last-child { font-weight: 700; }
.cat-bar .bar > span.bar-error {
  background: repeating-linear-gradient(
    -45deg,
    var(--border-strong) 0 5px,
    var(--bg-sunk) 5px 10px
  );
}

/* Provisional overall grade: some modules could not be graded */
.overall-grade.is-provisional { opacity: 0.78; }
.overall-grade.is-provisional::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed var(--border-strong);
}
.provisional-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -8px 0 14px;
}

/* ---------- Module cards ---------- */
.module {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  scroll-margin-top: 16px;
  overflow: hidden;
  animation: rise 0.5s both;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.module:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lift);
}
.results .module:nth-child(2) { animation-delay: 0.04s; }
.results .module:nth-child(3) { animation-delay: 0.08s; }
.results .module:nth-child(4) { animation-delay: 0.12s; }
.results .module:nth-child(5) { animation-delay: 0.16s; }
.results .module:nth-child(6) { animation-delay: 0.20s; }
.results .module:nth-child(7) { animation-delay: 0.24s; }
.module > summary {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 22px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.module > summary::-webkit-details-marker { display: none; }
.module > summary:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.grade-chip {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: #fff;
  flex-shrink: 0;
  background: var(--gc, var(--info));
  box-shadow: 0 4px 12px -4px var(--gc, var(--info));
}
@media (prefers-color-scheme: dark) {
  .grade-chip { color: #08120f; }
}
.mod-headtext { flex: 1; min-width: 0; }
.mod-title {
  font-weight: 600;
  font-size: 1.04rem;
}
.mod-summary {
  color: var(--text-muted);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mod-counts {
  display: flex;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}
.mod-counts span { display: inline-flex; align-items: center; gap: 3px; }
.count-pass { color: var(--pass); }
.count-warn { color: var(--warn); }
.count-fail { color: var(--fail); }
.chevron {
  flex-shrink: 0;
  transition: transform 0.25s;
  color: var(--text-muted);
}
.module[open] .chevron { transform: rotate(180deg); }

/* ---------- Findings ---------- */
.findings {
  border-top: 1px solid var(--border);
  padding: 4px 22px 16px;
}
.finding {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.finding:last-child { border-bottom: none; }
.finding-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.status-dot {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
@media (prefers-color-scheme: dark) { .status-dot { color: #08120f; } }
.s-pass .status-dot { background: var(--pass); }
.s-warn .status-dot { background: var(--warn); }
.s-fail .status-dot { background: var(--fail); }
.s-info .status-dot,
.s-skip .status-dot { background: var(--info); }
.finding-label { flex: 1; font-weight: 500; }
.finding-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 7px;
  max-width: 48%;
  overflow-wrap: anywhere;
  text-align: right;
}
.finding-detail {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 7px 0 0 30px;
}
.finding-rec {
  font-size: 0.9rem;
  margin: 9px 0 0 30px;
  padding: 10px 13px;
  background: var(--warn-bg);
  border-left: 3px solid var(--warn);
  border-radius: 9px;
}
.finding-rec strong { color: var(--warn); }

/* "Learn more" link on each finding */
.finding-doc {
  display: inline-block;
  margin: 9px 0 0 30px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--brand);
}

/* ---------- Module states ---------- */
.module.is-loading { animation: rise 0.5s both; }
.module.is-loading .grade-chip {
  background: var(--info);
  box-shadow: none;
  animation: pulse 1.2s ease-in-out infinite;
}
.module.is-error .grade-chip { background: var(--fail); box-shadow: none; }
@keyframes pulse { 50% { opacity: 0.4; } }
.skeleton {
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-sunk), var(--border), var(--bg-sunk));
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Grade colors (set --gc; consumed by ring, chip, bars) ---------- */
/* Light-theme B/D darkened for WCAG contrast of white chip text. */
.g-Aplus, .g-A { --gc: var(--pass); }
.g-Aminus { --gc: #34a86a; }
.g-B { --gc: #4d7f2b; }
.g-C { --gc: var(--warn); }
.g-D { --gc: #b05f16; }
.g-E, .g-F, .g-T, .g-M { --gc: var(--fail); }
@media (prefers-color-scheme: dark) {
  /* Dark theme already passed with the lighter hues (dark chip text). */
  .g-B { --gc: #6aab3f; }
  .g-D { --gc: #dd7a2c; }
}

/* ---------- Cap note ---------- */
.cap-note {
  margin: 12px 0 4px;
  padding: 10px 13px;
  background: var(--fail-bg);
  border-left: 3px solid var(--fail);
  border-radius: 9px;
  font-size: 0.9rem;
  color: var(--text);
}
.cap-note strong { color: var(--fail); }

/* ---------- Client compatibility table ---------- */
.client-sim {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-strong);
}
.client-sim-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 9px;
}
.client-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 5px 0;
  font-size: 0.9rem;
}
.client-row .cs-dot {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
@media (prefers-color-scheme: dark) { .client-row .cs-dot { color: #08120f; } }
.cs-ok .cs-dot { background: var(--pass); }
.cs-fail .cs-dot { background: var(--info); }
.client-row .cs-name { flex: 1; }
.client-row .cs-res {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ---------- Info sections (home) ---------- */
.info-section { margin: 56px 0; }
.info-section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 16px;
}
.info-grid article {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.info-grid article:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.info-grid h3 { margin: 0 0 9px; font-size: 1.05rem; }
.info-grid p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }

/* Screen-reader-only content (e.g. the scan live-status announcer) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 34px 0;
  margin-top: 56px;
}
.site-footer p { margin: 0 0 8px; max-width: 820px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .scan-form { flex-direction: column; }
  .top-nav { gap: 13px; font-size: 0.8rem; }
  .finding-head { flex-wrap: wrap; }
  .finding-value { max-width: 100%; text-align: left; }
  .overall-grade { margin: 0 auto; }
  .mod-summary { display: none; }
  .hero { padding: 48px 0 28px; }
}

/* ---------- Info / documentation page ---------- */
.info-page { padding-bottom: 48px; }
.info-page h1 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 34px 0 12px;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  letter-spacing: -0.015em;
}
.doc-toc {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.9rem;
  line-height: 2;
  margin: 20px 0 8px;
}
.doc-group { margin: 40px 0; scroll-margin-top: 80px; }
.doc-group > h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.7rem);
  padding-bottom: 9px;
  border-bottom: 2px solid var(--border-strong);
}
.doc-method ul { padding-left: 18px; }
.doc-method li { margin: 5px 0; }
.doc-method h3 { margin: 22px 0 9px; font-size: 1.1rem; }
.doc-method .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
.doc-method .dot.s-pass { background: var(--pass); }
.doc-method .dot.s-warn { background: var(--warn); }
.doc-method .dot.s-fail { background: var(--fail); }
.doc-method .dot.s-info { background: var(--info); }
.doc-entry {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 14px 0;
  scroll-margin-top: 80px;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.doc-entry h3 { margin: 0 0 9px; font-size: 1.12rem; }
.doc-anchor {
  font-family: var(--font-mono);
  color: var(--text-muted);
  opacity: 0;
  font-weight: 400;
  transition: opacity 0.15s;
}
.doc-entry:hover .doc-anchor { opacity: 0.6; }
.doc-anchor:focus-visible { opacity: 1; }
.doc-entry > p { margin: 0 0 10px; color: var(--text); }
.doc-row {
  display: flex;
  gap: 11px;
  margin: 9px 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.doc-tag {
  flex-shrink: 0;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.doc-tag-score { background: var(--info-bg); color: var(--text-muted); }
.doc-tag-fix { background: var(--pass-bg); color: var(--pass); }
.doc-entry code,
.doc-method code {
  font-family: var(--font-mono);
  font-size: 0.83em;
  background: var(--bg-sunk);
  padding: 1px 5px;
  border-radius: 5px;
}
.doc-refs { margin-top: 11px; font-size: 0.85rem; color: var(--text-muted); }
.doc-highlight {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand);
}

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