/* =============================================================================
   Compatibility layer.

   Bootstrap 3 was removed from the site, but 98 content bodies are raw HTML
   carried over from the old CMS and some of them still carry Bootstrap classes.
   Those classes are frozen -- content/ is not editable -- so the handful that
   actually appear are reimplemented here in the current palette.

   Selectors are deliberately unscoped: the same body text is rendered both as a
   full page (.prose) and as a listing teaser (.entry-teaser), and none of these
   class names is used by a template in layouts/.

   This file loads after styles.css, which is what lets `a.btn` beat `.prose a`.

   Only add a rule here when a real content body needs it. Everything else
   belongs in styles.css. Audited with:
     grep -rhoE 'class="[^"]*"' content/
   ========================================================================== */

/* ---- Accessibility helper (used by the skip link and icon-only links) ---- */

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}
.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  position: static !important;
  clip: auto;
  overflow: visible;
  height: auto;
  width: auto;
}

/* ---- Images: .img-responsive (35 uses), .img-thumbnail (5) --------------- */

.img-responsive { display: block; max-width: 100%; height: auto; }

.img-thumbnail {
  max-width: 100%;
  height: auto;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
}

/* ---- Callouts: .alert / .alert-info (6) / .alert-warning (10) ------------ */

.alert {
  display: block;
  margin: 26px 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  font-size: 0.94em;
  color: var(--text-dim);
}
.alert p:last-child { margin-bottom: 0; }

.alert-info {
  border-left-color: var(--live);
  background: var(--live-soft);
}
.alert-warning {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

/* Several posts wrap their callout in a bare <aside>. */
.prose aside,
.entry-teaser aside { margin: 26px 0; }
.prose aside > .alert,
.entry-teaser aside > .alert { margin: 0; }

/* ---- Buttons in content: .btn / .btn-primary / .btn-sm ------------------- */

a.btn,
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
}
a.btn:hover {
  text-decoration: none;
  box-shadow: none;
  color: var(--text);
  border-color: var(--text-faint);
}
a.btn-primary,
.btn-primary {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
a.btn-primary:hover { color: var(--accent-hover); border-color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 11px; }

/* ---- Tables: .table / .table-striped (1 post) --------------------------- */

.table { width: 100%; }
.table-striped tbody tr:nth-child(odd) { background: var(--surface); }

/* ---- Grid: one post uses .row + .col-sm-6 ------------------------------- */

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 26px 0;
}
.col-sm-6 { flex: 1 1 260px; min-width: 0; }

/* ---- Type helpers: .lead, .text-center ---------------------------------- */

.lead {
  font-size: 1.12em;
  line-height: 1.6;
  color: var(--text);
}
.text-center { text-align: center; }
.text-center img { margin-inline: auto; }

/* ---- Third-party: AddToAny share buttons -------------------------------- */

/* Stock AddToAny sprites are fully saturated brand colours and shout against
   the rest of the page; knocking them back keeps the sidebar quiet. */
.a2a_kit a { border-radius: 3px; overflow: hidden; filter: saturate(0.8); }
.a2a_kit a:hover { filter: none; }
