/* Vestige engine primitives — minimal cross-layout styles.
 * Per-subject layouts are expected to provide all their own aesthetic CSS.
 * This file only provides structural essentials for the message/modal system.
 */

/* ==== GLOBAL SCROLL LOCK ====
 * Lock the page. No page-level scrolling. Only the messages container scrolls.
 * The chat-engine JS finds the messages container at runtime and makes it
 * (or its immediate parent) the sole scrolling region. */
html, body {
  height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
}
body { position: relative; }

/* Make the engine-generated scrollable region behave predictably.
 * Added at runtime as a class on the scroll container. */
.v-scroll-host {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  scrollbar-width: thin;
}
.v-scroll-host::-webkit-scrollbar { width: 6px; }
.v-scroll-host::-webkit-scrollbar-thumb { background: rgba(180,140,70,0.35); border-radius: 3px; }
.v-scroll-host::-webkit-scrollbar-thumb:hover { background: rgba(180,140,70,0.55); }

/* Ribbon / nav bars must always be clickable — raise above any layout chrome. */
.ribbon, [class*="ribbon"], .nav-ribbon, [data-vestige="nav"] {
  z-index: 9999 !important;
}
.ribbon a, .ribbon button,
[class*="ribbon"] a, [class*="ribbon"] button {
  pointer-events: auto !important;
  position: relative;
  z-index: 10000 !important;
}

/* Portrait fallback — subtle skeleton so empty portraits don't look broken */
[data-vestige="portrait"]:not(.v-portrait-loaded) {
  background-size: cover !important;
  background-position: center !important;
}
.v-portrait-fallback {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-image: none !important;
}
.v-portrait-fallback .v-portrait-initials {
  font-family: 'Cinzel', 'Libre Caslon Text', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: currentColor;
  opacity: 0.55;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* Suggestion refresh button — tiny icon that sits near suggestions */
.v-suggestion-refresh {
  display: inline-block;
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  opacity: 0.45;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 10px;
  cursor: pointer;
  margin: 8px auto 0;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}
.v-suggestion-refresh:hover { opacity: 1; }
.v-suggestion-refresh.loading { opacity: 0.3; pointer-events: none; }

/* Auto-listen toggle — more prominent when active */
[data-vestige="tts-toggle"].v-auto-on {
  background: rgba(212, 160, 70, 0.25) !important;
  box-shadow: 0 0 12px rgba(212, 160, 70, 0.4);
}

/* Typing indicator */
.v-typing { display: inline-block; font-style: italic; opacity: 0.7; }
.v-typing::after { content: ''; animation: v-dots 1.5s steps(4, end) infinite; }
@keyframes v-dots { 0%, 20% { content: ''; } 40% { content: '.'; } 60% { content: '..'; } 80%, 100% { content: '...'; } }

/* Source modal — universal overlay */
.v-source-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.v-source-modal.open { display: flex; animation: v-fadeIn 0.2s ease; }
@keyframes v-fadeIn { from { opacity: 0; } to { opacity: 1; } }
.v-source-modal-content {
  background: #141210;
  border: 1px solid #2a2418;
  border-radius: 8px;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
  font-family: 'Lora', Georgia, serif;
  color: #d8c8a8;
}
.v-source-modal-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid #2a2418;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.v-source-modal-title {
  color: #c4a56e;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.v-source-modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.7rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.v-source-modal-close:hover { color: #c4a56e; }
.v-source-modal-meta {
  padding: 8px 24px;
  color: #888;
  font-size: 0.82rem;
  font-style: italic;
}
.v-source-modal-body {
  padding: 16px 24px;
  font-size: 0.95rem;
  line-height: 1.8;
  overflow-y: auto;
  white-space: pre-wrap;
  flex: 1;
}
.v-source-modal-footer {
  padding: 12px 24px 20px;
  border-top: 1px solid #2a2418;
}
.v-source-modal-footer a {
  color: #c4a56e;
  text-decoration: none;
  font-size: 0.85rem;
}
.v-source-modal-footer a:hover { text-decoration: underline; }

/* Message base classes — extremely minimal, layouts handle the rest */
.v-message { position: relative; animation: v-msgIn 0.3s ease; }
@keyframes v-msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.v-message-body p { margin-bottom: 0.6em; }
.v-message-body p:last-child { margin-bottom: 0; }

/* Speak button — inline in speaker line */
.v-speak-btn {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  margin-left: 8px;
  vertical-align: middle;
  transition: opacity 0.15s;
}
.v-speak-btn:hover { opacity: 1; }

/* Error message */
.v-message-error {
  background: #2a1515;
  border: 1px solid #5a2020;
  color: #d4a0a0;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============ TIMELINE BAR ============ */
/* A fixed banner pinned to the top of the viewport. Its visual theme is intentionally
   neutral and dark so it reads against every per-subject layout; layouts may override
   .v-timeline-bar and inner selectors to blend with their palette. */

.v-timeline-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10002;
  background: linear-gradient(180deg, rgba(10,12,16,0.96), rgba(14,16,20,0.94));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184,152,72,0.22);
  box-shadow: 0 6px 32px rgba(0,0,0,0.4);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #d8dce2;
  user-select: none;
}
.v-has-timeline { padding-top: 68px; }

.v-timeline-inner {
  display: grid;
  grid-template-columns: minmax(130px, 220px) 1fr minmax(120px, 170px) auto;
  gap: 20px;
  align-items: center;
  padding: 10px 22px 12px;
  max-width: 1400px;
  margin: 0 auto;
}
.v-timeline-lead { min-width: 0; }

.v-timeline-lead { line-height: 1.1; }
.v-timeline-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7a8290;
  margin-bottom: 3px;
  font-weight: 500;
}
.v-timeline-subject-name {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 1.08rem;
  font-weight: 600;
  color: #e6e8ec;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.v-timeline-slider-col { min-width: 0; }
.v-timeline-track-wrap {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
}
.v-timeline-track {
  position: relative;
  height: 3px;
  background: rgba(255,255,255,0.14);
  border-radius: 2px;
  width: 100%;
}
.v-timeline-track-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #b89848, #d4b55f);
  border-radius: 2px;
  transition: width 0.15s ease;
}

.v-timeline-event {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v-timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c8a655;
  box-shadow: 0 0 0 2px rgba(10,12,16,1), 0 0 6px rgba(184,152,72,0.5);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.v-timeline-event:hover .v-timeline-dot,
.v-timeline-event.v-timeline-event-near .v-timeline-dot {
  transform: scale(1.5);
  background: #f4e4b0;
  box-shadow: 0 0 0 2px rgba(10,12,16,1), 0 0 14px rgba(244,228,176,0.9);
}
.v-timeline-event-label {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,18,24,0.98);
  color: #e8d9a8;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid rgba(184,152,72,0.35);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}
.v-timeline-event:hover .v-timeline-event-label { opacity: 1; }

.v-timeline-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: grab;
  z-index: 5;
}
.v-timeline-range:active { cursor: grabbing; }
.v-timeline-range::-webkit-slider-runnable-track { background: transparent; height: 22px; }
.v-timeline-range::-moz-range-track { background: transparent; height: 22px; }
.v-timeline-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f4e4b0;
  border: 2px solid #2a2418;
  box-shadow: 0 0 0 3px rgba(184,152,72,0.3), 0 2px 8px rgba(0,0,0,0.5);
  cursor: grab;
  margin-top: 1px;
}
.v-timeline-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f4e4b0;
  border: 2px solid #2a2418;
  box-shadow: 0 0 0 3px rgba(184,152,72,0.3), 0 2px 8px rgba(0,0,0,0.5);
  cursor: grab;
}

.v-timeline-bounds {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.65rem;
  color: #6a7280;
  letter-spacing: 0.05em;
}

.v-timeline-scrub-hint {
  position: absolute;
  bottom: calc(100% + 10px);
  background: rgba(15,18,24,0.98);
  color: #f4e4b0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.015em;
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid rgba(184,152,72,0.4);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.18s, transform 0.18s;
  z-index: 20;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v-timeline-scrub-hint.v-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.v-timeline-scrub-hint::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(184,152,72,0.4);
}

.v-timeline-readout {
  text-align: right;
  line-height: 1.15;
}
.v-timeline-date {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  color: #e6d9b5;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.v-timeline-age {
  font-size: 0.68rem;
  color: #8a9099;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.v-timeline-expand {
  background: transparent;
  border: 1px solid rgba(184,152,72,0.3);
  color: #b89848;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: all 0.15s;
  padding: 0;
}
.v-timeline-expand:hover {
  background: rgba(184,152,72,0.15);
  transform: translateY(1px);
}

.v-timeline-events-panel {
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding: 14px 22px 20px;
  background: linear-gradient(180deg, rgba(10,12,16,0.98), rgba(8,10,14,0.96));
  border-top: 1px solid rgba(184,152,72,0.15);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  max-width: 1400px;
  margin: 0 auto;
}
.v-timeline-events-panel[hidden] { display: none; }
.v-timeline-event-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  font: inherit;
  color: inherit;
}
.v-timeline-event-item:hover {
  background: rgba(184,152,72,0.08);
  border-color: rgba(184,152,72,0.3);
  transform: translateY(-1px);
}
.v-timeline-event-item.v-event-future { opacity: 0.42; }
.v-event-year {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #b89848;
  letter-spacing: 0.02em;
  align-self: start;
}
.v-event-body { min-width: 0; }
.v-event-title {
  font-weight: 600;
  font-size: 0.82rem;
  color: #e0e3e8;
  margin-bottom: 3px;
  letter-spacing: 0.01em;
}
.v-event-desc {
  font-size: 0.72rem;
  color: #8a9099;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .v-timeline-inner {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 8px 12px;
  }
  .v-timeline-lead { display: none; }
  .v-timeline-slider-col { grid-column: 1 / -1; order: 3; }
  .v-timeline-readout { text-align: left; }
  .v-timeline-event-label { display: none; }
  .v-has-timeline { padding-top: 96px; }
  .v-has-timeline .ribbon { top: 96px !important; }
}

/* ----- ISSUE #29: attributions footer ----- */
.v-attributions {
  margin: 32px auto 24px;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: rgba(150, 140, 120, 0.55);
  max-width: 700px;
  font-family: inherit;
}
.v-attributions .v-attr-label {
  opacity: 0.75;
}
.v-attributions .v-attr-source {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.v-attributions a.v-attr-source:hover {
  color: rgba(200, 170, 110, 0.9);
}
.v-attributions .v-attr-sep {
  opacity: 0.5;
}

/* ----- ISSUE #52: picture element inside the portrait box ----- */
[data-vestige="portrait"] picture {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
[data-vestige="portrait"] .v-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  /* background-image carries the visual on layouts that expect it;
     hide the <img> to avoid doubling up. Keep it in the DOM for
     accessibility/rendering semantics. */
  opacity: 0;
}
[data-vestige="portrait"]:not([style*="background-image"]) .v-portrait-img {
  opacity: 1;
}

/* ----- ISSUE #32: event share button + toast ----- */
.v-event-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}
.v-event-share:hover,
.v-event-share:focus {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}
.v-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.v-toast.v-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Pre-filled deep-link prompt — slightly muted so the user knows it's a suggestion */
[data-vestige="input"].v-prefilled {
  color: rgba(0, 0, 0, 0.55);
  font-style: italic;
}

/* ----- ISSUE #37: feedback row ----- */
.v-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.v-feedback-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  line-height: 1;
}
.v-feedback-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.04);
}
.v-feedback-btn.active {
  opacity: 1;
  background: rgba(80, 130, 200, 0.12);
  border-color: rgba(80, 130, 200, 0.4);
}
.v-feedback-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  width: 100%;
  max-width: 420px;
}
.v-feedback-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  resize: vertical;
  background: #fff;
}
.v-feedback-submit {
  align-self: flex-start;
  background: rgba(80, 130, 200, 0.15);
  border: 1px solid rgba(80, 130, 200, 0.4);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}
.v-feedback-submit:hover { background: rgba(80, 130, 200, 0.25); }
.v-feedback-thanks {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
  font-style: italic;
}

/* ----- ISSUE #47: mental-health resources ----- */
.v-mh-resources {
  margin-top: 12px;
  padding: 10px 36px 10px 14px;
  background: rgba(255, 245, 220, 0.85);
  border: 1px solid rgba(180, 140, 60, 0.35);
  border-left: 3px solid rgba(180, 140, 60, 0.85);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(60, 40, 10, 0.92);
  position: relative;
}
.v-mh-body { padding-right: 4px; }
.v-mh-dismiss {
  position: absolute;
  top: 4px;
  right: 6px;
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  color: inherit;
  opacity: 0.6;
}
.v-mh-dismiss:hover { opacity: 1; }
.v-mh-footer-link {
  display: block;
  text-align: center;
  margin: 24px auto 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.v-mh-footer-link:hover { color: rgba(0, 0, 0, 0.8); }
.v-mh-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.v-mh-modal.open { display: flex; }
.v-mh-modal-content {
  background: #fff;
  border-radius: 10px;
  max-width: 480px;
  width: 100%;
  padding: 20px 22px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.v-mh-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.v-mh-modal-title {
  font-size: 16px;
  font-weight: 600;
}
.v-mh-modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  color: rgba(0, 0, 0, 0.55);
}
.v-mh-modal-close:hover { color: rgba(0, 0, 0, 0.9); }
.v-mh-modal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.v-mh-modal-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}
.v-mh-modal-label {
  font-weight: 600;
  color: rgba(0, 0, 0, 0.78);
}
.v-mh-modal-row a {
  color: #2a5db0;
  text-decoration: none;
}
.v-mh-modal-row a:hover { text-decoration: underline; }

/* ----- ISSUE #46: content warning banner -----
   Sits directly under .v-timeline-bar (which is position:fixed, top:0).
   We make this fixed too, immediately below the bar, so it stays visible
   while the user scrolls — same convention as the timeline bar itself.
   Body padding-top is set to the timeline bar height by the engine; this
   banner pushes content down further only via document flow when it
   appears, but because it's fixed we add its own padding to body via JS?
   No — to keep the engine simple, the banner sits in normal flow at the
   top of body, BELOW the fixed bar, so the bar's padding-top reservation
   is enough for the bar; the banner displaces real content downward.
   That's what the spec wants: "between timeline bar and main content". */
.v-content-warning {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 auto;
  padding: 10px 14px 10px 14px;
  max-width: 1400px;
  background: rgba(48, 36, 18, 0.92);
  border-bottom: 1px solid rgba(184, 152, 72, 0.28);
  border-left: 3px solid rgba(184, 152, 72, 0.65);
  color: #d8c9a4;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  z-index: 10001; /* just below timeline bar (10002) */
}
.v-cw-icon {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1.4;
  color: #d8b870;
  opacity: 0.9;
}
.v-cw-body {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 28px;
}
.v-cw-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  color: #d8c9a4;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.v-cw-dismiss:hover { opacity: 1; }

/* ==========================================================================
 * ISSUE #51 — Accessibility baseline
 * Shared-engine WCAG-AA primitives applied across all 122 layouts:
 *   - visually-hidden utility for SR-only content (live regions etc.)
 *   - consolidated :focus-visible ring on every engine-owned control
 *   - prefers-reduced-motion support (kills anim/transition, instant scroll)
 * Per-layout contrast fixes are out of scope for this pass — see a11y-report.json
 * for the axe-core baseline.
 * ========================================================================== */

/* Screen-reader-only content (WCAG visually-hidden recipe). */
.v-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Unified focus-visible ring on every engine-owned interactive element.
 * 2px solid gold (#c4a56e) with 2px offset — intentionally visible against
 * the diverse layout backgrounds. !important guards against per-layout
 * `outline: none` resets that would otherwise swallow this. */
.v-timeline-event:focus-visible,
.v-timeline-expand:focus-visible,
.v-timeline-range:focus-visible,
.v-timeline-event-item:focus-visible,
.v-suggestion:focus-visible,
.v-suggestion-refresh:focus-visible,
.v-speak-btn:focus-visible,
.v-feedback-btn:focus-visible,
.v-feedback-submit:focus-visible,
.v-attributions .v-attr-source:focus-visible,
.v-content-warning button:focus-visible,
.v-cw-dismiss:focus-visible,
.v-mh-dismiss:focus-visible,
.v-mh-footer-link:focus-visible,
.v-mh-modal-close:focus-visible,
.v-source-modal-close:focus-visible,
.v-source-card:focus-visible,
.v-event-share:focus-visible {
  outline: 2px solid #c4a56e !important;
  outline-offset: 2px !important;
  border-radius: 3px;
}

/* Range-slider thumb focus: outline on the input itself is often clipped;
 * also style the native thumb focus ring via WebKit/Gecko pseudo-elements. */
.v-timeline-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 2px #c4a56e;
}
.v-timeline-range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 2px #c4a56e;
}

/* Prefers-reduced-motion: collapse anim/transition durations to near-zero,
 * disable timeline dot scale on hover, and force instant scroll. */
@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;
  }
  .v-timeline-event:hover .v-timeline-dot,
  .v-timeline-event:focus-visible .v-timeline-dot {
    transform: none !important;
  }
  .v-scroll-host {
    scroll-behavior: auto !important;
  }
}
