/* ============================================================
   PHASE 4: ADVANCED INTERACTIONS
   Micro-animations, keyboard shortcuts panel, contextual help,
   progressive disclosure, drag-and-drop feedback
   ============================================================ */

/* ---- 1. MICRO-ANIMATIONS ON STATE CHANGES ---- */

/* Number counter animation for scores/stats */
@keyframes countUp {
  from { opacity: 0.4; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.score-animate {
  animation: countUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Score change indicator (up/down arrow flash) */
@keyframes scoreFlash {
  0% { opacity: 0; transform: scale(0.5) translateY(4px); }
  40% { opacity: 1; transform: scale(1.1) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.score-change-indicator {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  animation: scoreFlash 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.score-change-indicator.positive { color: var(--color-success, #16a34a); }
.score-change-indicator.negative { color: var(--color-danger, #c44b4b); }

/* Button click ripple */
@keyframes btnRipple {
  0% { transform: scale(0); opacity: 0.35; }
  100% { transform: scale(2.5); opacity: 0; }
}
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.btn-ripple .ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  margin-left: -20px;
  pointer-events: none;
  animation: btnRipple 0.5s ease-out forwards;
}

/* Toggle switch smooth state change */
.toggle-switch {
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.toggle-switch .toggle-knob,
.toggle-switch::after {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.2s ease;
}
.toggle-switch.on {
  box-shadow: 0 0 0 2px rgba(44, 74, 124, 0.15);
}

/* Progress bar animated fill */
@keyframes progressFill {
  from { width: 0; }
}
.progress-bar-animated .progress-fill,
.progress-bar-animated [class*="fill"] {
  animation: progressFill 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Checkbox check animation */
@keyframes checkMark {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.check-animated {
  animation: checkMark 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Card state change flash (subtle highlight when data updates) */
@keyframes cardUpdateFlash {
  0% { box-shadow: 0 0 0 0 rgba(44, 74, 124, 0.2); }
  50% { box-shadow: 0 0 0 3px rgba(44, 74, 124, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(44, 74, 124, 0); }
}
.card-updated {
  animation: cardUpdateFlash 0.6s ease-out;
}

/* Notification badge pop-in */
@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.badge-animate {
  animation: badgePop 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Sidebar nav item hover feedback */
.sidebar-link {
  transition: background-color 0.2s ease,
              color 0.2s ease,
              padding-left 0.2s ease,
              transform 0.15s ease;
}
.sidebar-link:active {
  transform: scale(0.97);
}

/* Smooth section reveal on page load */
@keyframes sectionReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.section-reveal {
  animation: sectionReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.section-reveal:nth-child(1) { animation-delay: 0s; }
.section-reveal:nth-child(2) { animation-delay: 0.08s; }
.section-reveal:nth-child(3) { animation-delay: 0.16s; }
.section-reveal:nth-child(4) { animation-delay: 0.24s; }
.section-reveal:nth-child(5) { animation-delay: 0.32s; }


/* ---- 2. KEYBOARD SHORTCUTS PANEL ---- */

.shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 24, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.shortcuts-overlay.active {
  opacity: 1;
  visibility: visible;
}

.shortcuts-panel {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e5eb);
  border-radius: 16px;
  padding: 28px 32px 24px;
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
  transform: scale(0.95) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.shortcuts-overlay.active .shortcuts-panel {
  transform: scale(1) translateY(0);
}

.shortcuts-panel h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #1a2b42);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.shortcuts-panel .shortcuts-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted, #8494a7);
  margin-bottom: 20px;
}

.shortcut-group {
  margin-bottom: 16px;
}
.shortcut-group-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #8494a7);
  margin-bottom: 8px;
}
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light, #f0f1f4);
}
.shortcut-row:last-child { border-bottom: none; }

.shortcut-label {
  font-size: 0.85rem;
  color: var(--text-primary, #1a2b42);
}
.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 4px;
}
.key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'General Sans', system-ui, sans-serif;
  color: var(--text-secondary, #475569);
  background: var(--bg-muted, #f3f5f8);
  border: 1px solid var(--border-color, #e2e5eb);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.key-separator {
  font-size: 0.7rem;
  color: var(--text-muted, #8494a7);
}

.shortcuts-close-hint {
  text-align: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light, #f0f1f4);
  font-size: 0.75rem;
  color: var(--text-muted, #8494a7);
}


/* ---- 3. CONTEXTUAL HELP TOOLTIPS ---- */

/* Enhanced floating tooltip */
.help-tooltip {
  position: absolute;
  z-index: 9000;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e5eb);
  border-radius: 10px;
  padding: 12px 14px;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}
.help-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.help-tooltip.above {
  transform: translateY(-4px);
}
.help-tooltip.above.visible {
  transform: translateY(0);
}

/* Tooltip arrow */
.help-tooltip::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e5eb);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  bottom: -6px;
  left: 50%;
  margin-left: -5px;
}
.help-tooltip.above::before {
  top: -6px;
  bottom: auto;
  border: 1px solid var(--border-color, #e2e5eb);
  border-bottom: none;
  border-right: none;
  transform: rotate(45deg);
}

.help-tooltip-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, #1a2b42);
  margin-bottom: 4px;
}
.help-tooltip-body {
  font-size: 0.75rem;
  color: var(--text-secondary, #475569);
  line-height: 1.5;
}
.help-tooltip-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-primary, #2c4a7c);
  cursor: pointer;
}
.help-tooltip-action:hover {
  text-decoration: underline;
}

/* Help icon trigger (?) */
.help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted, #8494a7);
  background: var(--bg-muted, #f3f5f8);
  border: 1px solid var(--border-light, #e2e5eb);
  cursor: help;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
}
.help-trigger:hover {
  color: var(--color-primary, #2c4a7c);
  background: rgba(44, 74, 124, 0.08);
  border-color: var(--color-primary, #2c4a7c);
}

/* KPI card hover info */
.kpi-card-interactive {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.kpi-card-interactive:active {
  transform: translateY(0);
}


/* ---- 4. PROGRESSIVE DISCLOSURE ---- */

/* Expandable section */
.disclosure-section {
  border: 1px solid var(--border-color, #e2e5eb);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.disclosure-section + .disclosure-section {
  margin-top: 8px;
}
.disclosure-section:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.disclosure-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #1a2b42);
  transition: background-color 0.2s ease;
  gap: 12px;
}
.disclosure-header:hover {
  background: var(--bg-muted, #f3f5f8);
}
.disclosure-header:focus-visible {
  outline: 2px solid var(--color-primary, #2c4a7c);
  outline-offset: -2px;
  border-radius: 10px;
}

.disclosure-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted, #8494a7);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.disclosure-section.open .disclosure-chevron {
  transform: rotate(180deg);
}

.disclosure-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.25s ease;
  padding: 0 16px;
}
.disclosure-section.open .disclosure-body {
  max-height: 600px;
  padding: 0 16px 16px;
}

/* Read-more pattern */
.read-more-container {
  position: relative;
}
.read-more-content {
  max-height: 80px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.read-more-content.expanded {
  max-height: 800px;
}
.read-more-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg-surface, #ffffff));
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.read-more-content.expanded + .read-more-fade {
  opacity: 0;
}
.read-more-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary, #2c4a7c);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.read-more-toggle:hover {
  opacity: 0.8;
}

/* Staged form — step indicator */
.form-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
}
.form-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  border: 2px solid var(--border-color, #e2e5eb);
  color: var(--text-muted, #8494a7);
  background: var(--bg-surface, #ffffff);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 1;
}
.form-step-dot.active {
  border-color: var(--color-primary, #2c4a7c);
  color: #fff;
  background: var(--color-primary, #2c4a7c);
  box-shadow: 0 0 0 3px rgba(44, 74, 124, 0.15);
}
.form-step-dot.completed {
  border-color: var(--color-success, #16a34a);
  color: #fff;
  background: var(--color-success, #16a34a);
}
.form-step-line {
  flex: 1;
  height: 2px;
  background: var(--border-color, #e2e5eb);
  transition: background-color 0.3s ease;
}
.form-step-line.completed {
  background: var(--color-success, #16a34a);
}


/* ---- 5. DRAG & DROP FEEDBACK ---- */

/* Drop zone states */
.drop-zone {
  border: 2px dashed var(--border-color, #e2e5eb);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.2s ease,
              background-color 0.2s ease,
              transform 0.2s ease;
}
.drop-zone:hover {
  border-color: var(--color-primary, #2c4a7c);
  background: rgba(44, 74, 124, 0.03);
}

/* Active drag-over state */
.drop-zone.drag-over {
  border-color: var(--color-primary, #2c4a7c);
  background: rgba(44, 74, 124, 0.06);
  transform: scale(1.01);
  box-shadow: 0 0 0 3px rgba(44, 74, 124, 0.1);
}
.drop-zone.drag-over .drop-zone-icon {
  transform: scale(1.1);
  color: var(--color-primary, #2c4a7c);
}

.drop-zone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--bg-muted, #f3f5f8);
  color: var(--text-muted, #8494a7);
  transition: transform 0.25s ease, color 0.2s ease, background 0.2s ease;
}
.drop-zone.drag-over .drop-zone-icon {
  background: rgba(44, 74, 124, 0.1);
}

.drop-zone-text {
  font-size: 0.85rem;
  color: var(--text-secondary, #475569);
}
.drop-zone-text strong {
  color: var(--color-primary, #2c4a7c);
  cursor: pointer;
}
.drop-zone-hint {
  font-size: 0.72rem;
  color: var(--text-muted, #8494a7);
  margin-top: 4px;
}

/* Draggable item states */
.draggable-item {
  transition: transform 0.2s ease,
              box-shadow 0.2s ease,
              opacity 0.2s ease;
  cursor: grab;
}
.draggable-item:active {
  cursor: grabbing;
}
.draggable-item.dragging {
  opacity: 0.5;
  transform: scale(0.98);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.draggable-item.drag-target {
  border-top: 2px solid var(--color-primary, #2c4a7c);
}

/* Drag handle */
.drag-handle {
  display: flex;
  align-items: center;
  padding: 4px;
  color: var(--text-muted, #8494a7);
  cursor: grab;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}
.drag-handle:hover {
  color: var(--text-primary, #1a2b42);
  background: var(--bg-muted, #f3f5f8);
}
.drag-handle:active {
  cursor: grabbing;
}

/* Upload progress micro-animation */
@keyframes uploadPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.upload-progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-muted, #f3f5f8);
  border-radius: 8px;
  margin-top: 8px;
  animation: sectionReveal 0.3s ease backwards;
}
.upload-progress-item .upload-icon {
  animation: uploadPulse 1.5s ease-in-out infinite;
  color: var(--color-primary, #2c4a7c);
}
.upload-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border-light, #e2e5eb);
  border-radius: 2px;
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  background: var(--color-primary, #2c4a7c);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.upload-file-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary, #1a2b42);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-file-size {
  font-size: 0.7rem;
  color: var(--text-muted, #8494a7);
  white-space: nowrap;
}


/* ---- 6. TOAST NOTIFICATIONS ---- */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e5eb);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  min-width: 260px;
  max-width: 380px;
  pointer-events: auto;
  animation: toastSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.toast.removing {
  animation: toastSlideOut 0.25s ease forwards;
}
.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.toast-icon.success { color: var(--color-success, #16a34a); }
.toast-icon.info { color: var(--color-primary, #2c4a7c); }
.toast-icon.warning { color: #e5a100; }
.toast-icon.error { color: var(--color-danger, #c44b4b); }

.toast-content {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #1a2b42);
}
.toast-message {
  font-size: 0.75rem;
  color: var(--text-secondary, #475569);
  margin-top: 1px;
}
.toast-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted, #8494a7);
  border-radius: 4px;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.toast-close:hover {
  background: var(--bg-muted, #f3f5f8);
}

/* Toast auto-dismiss progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--color-primary, #2c4a7c);
  border-radius: 0 0 10px 10px;
  transition: width linear;
}


/* ---- 7. FOCUS RING & INTERACTION STATES ---- */

/* Consistent focus ring across all interactive elements */
.focus-ring:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-primary, #2c4a7c);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Input field interactions */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  transition: border-color 0.2s ease,
              box-shadow 0.2s ease,
              background-color 0.2s ease;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary, #2c4a7c);
  box-shadow: 0 0 0 3px rgba(44, 74, 124, 0.1);
}

/* Subtle pulse for elements that need attention */
@keyframes attentionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(44, 74, 124, 0); }
  50% { box-shadow: 0 0 0 4px rgba(44, 74, 124, 0.1); }
}
.needs-attention {
  animation: attentionPulse 2s ease-in-out 3;
}


/* ---- 8. SCROLL TO TOP BUTTON ---- */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 88px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e5eb);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #475569);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease,
              background-color 0.2s ease;
  z-index: 100;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: var(--color-primary, #2c4a7c);
  color: #fff;
  border-color: var(--color-primary, #2c4a7c);
}

/* ---- 9. DARK MODE OVERRIDES ---- */
[data-theme="dark"] .shortcuts-overlay {
  background: rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .shortcuts-panel {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .key-badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .help-tooltip {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .help-tooltip::before {
  background: var(--bg-surface, #161a22);
}
[data-theme="dark"] .drop-zone:hover {
  background: rgba(107, 159, 212, 0.04);
}
[data-theme="dark"] .drop-zone.drag-over {
  background: rgba(107, 159, 212, 0.08);
  border-color: var(--color-primary, #6b9fd4);
  box-shadow: 0 0 0 3px rgba(107, 159, 212, 0.12);
}
[data-theme="dark"] .toast {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .scroll-top-btn {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .read-more-fade {
  background: linear-gradient(transparent, var(--bg-surface, #161a22));
}

/* ---- 10. REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  .score-animate,
  .score-change-indicator,
  .badge-animate,
  .section-reveal,
  .check-animated,
  .card-updated,
  .toast,
  .toast.removing {
    animation: none;
  }
  .disclosure-body,
  .read-more-content,
  .toggle-switch,
  .toggle-switch .toggle-knob,
  .toggle-switch::after,
  .shortcuts-panel,
  .help-tooltip,
  .drop-zone,
  .draggable-item,
  .scroll-top-btn {
    transition: none;
  }
}

/* ---- 11. MOBILE ADJUSTMENTS ---- */
@media (max-width: 768px) {
  .shortcuts-panel {
    width: 95vw;
    padding: 20px 16px 16px;
    border-radius: 12px;
  }
  .toast-container {
    bottom: 80px;
    right: 12px;
    left: 12px;
  }
  .toast {
    min-width: unset;
    max-width: 100%;
  }
  .scroll-top-btn {
    right: 16px;
    bottom: 80px;
  }
}
