/* ===== Runtime Comparison – scoped styles ===== */
#runtime-comparison {
  --rc-bg: #f5f7fa;
  --rc-bg-alt: #e8ecf1;
  --rc-border: #d1d5db;
  --rc-text: #1f2937;
  --rc-muted: #6b7280;
  --rc-accent-green: #5B93D4;
  --rc-accent-orange: #7BAADE;
  --rc-bubble-right: #16a34a;
  --rc-bubble-left: #111827;
  --rc-radius-xl: 1.75rem;
  --rc-shadow-soft: 0 18px 45px rgba(0,0,0,0.12);
  width: 100%;
  margin: 0 auto;
  padding: 0;
}
/* Override global styles inside RC */
#runtime-comparison *, #runtime-comparison *::before, #runtime-comparison *::after {
  box-sizing: border-box;
}
#runtime-comparison video {
  width: 100% !important;
  height: 100% !important;
}
#runtime-comparison p {
  margin: 0; text-align: left; font-size: inherit; position: static;
}
.rc-content {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 24px;
  align-items: center;
  width: 100%;
}
@media (max-width: 768px) {
  .rc-content { grid-template-columns: 1fr; gap: 16px; }
  .rc-left-pane { flex-direction: row; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .rc-hero-video-wrapper { max-width: 180px; }
  .rc-note { max-width: 100%; font-size: 0.62rem; padding: 8px 10px; margin-top: 0; }
  .rc-video-caption { font-size: 0.7rem; }
  .rc-carousel-nav { margin-top: 4px; }
  .rc-carousel-arrow { width: 24px; height: 24px; font-size: 0.9rem; }
}
.rc-left-pane {
  display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: flex-start;
}
.rc-hero-video-wrapper {
  position: relative; width: 100%; max-width: 360px;
  aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: #fff; border: 1px solid rgba(209,213,219,0.5);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
@media (max-width: 768px) { .rc-hero-video-wrapper { max-width: 180px; } }
.rc-hero-video { width: 100%; height: 100%; display: block; object-fit: cover; }
.rc-video-caption { text-align: center; font-size: 0.8rem; color: var(--rc-muted); margin-top: 6px; font-weight: 600; }
.rc-note {
  width: 100%; max-width: 360px; padding: 10px 14px;
  background: #fff; border: 1px solid rgba(209,213,219,0.6);
  border-radius: 10px; font-size: 0.7rem; color: var(--rc-muted); line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); margin-top: 4px;
}
.rc-note strong { color: var(--rc-text); font-weight: 600; }
.rc-right-pane { display: flex; flex-direction: column; gap: 12px; justify-content: flex-start; }
.rc-phones {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px; min-height: 0;
}
@media (max-width: 600px) {
  .rc-phones { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .rc-phone-shell { border-radius: 20px; padding: 5px; }
  .rc-phone-notch { height: 8px; top: 5px; width: 35%; }
  .rc-phone-screen { border-radius: 17px; padding: 14px 6px 8px; gap: 4px; }
  .rc-status-row { font-size: 0.5rem; }
  .rc-status-dot { width: 3px; height: 3px; }
  .rc-status-bar-icon { width: 6px; height: 3px; }
  .rc-chat-header { padding: 3px 0; gap: 4px; margin-bottom: 2px; }
  .rc-chat-profile-pic { width: 16px; height: 16px; }
  .rc-chat-contact-name { font-size: 0.55rem; }
  #runtime-comparison .rc-bubble { max-width: 88%; padding: 4px 6px; font-size: 0.52rem; border-radius: 10px; line-height: 1.3; }
  #runtime-comparison .rc-bubble.rc-question { padding-bottom: 10px; }
  #runtime-comparison .rc-read-indicator { font-size: 0.42rem; bottom: 2px; right: 4px; }
  #runtime-comparison .rc-bubble.rc-thought-time { font-size: 0.46rem; padding: 1px 4px; }
  #runtime-comparison .rc-meta-label { font-size: 0.48rem; }
  #runtime-comparison .rc-typing-dot { width: 3px; height: 3px; }
  .rc-chat-window { gap: 3px; padding-right: 2px; }
  .rc-chat-window::-webkit-scrollbar { width: 2px; }
}
.rc-phone { display: flex; justify-content: center; align-items: flex-start; min-height: 0; }
.rc-phone-shell {
  position: relative; width: 100%; max-width: 280px;
  aspect-ratio: 9 / 18; border-radius: 34px; padding: 10px;
  background: linear-gradient(145deg, #2a2a2e, #1a1a1e);
  border: 1px solid rgba(60,60,68,0.7);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex; flex-direction: column;
}
@media (max-width: 500px) { .rc-phone-shell { max-width: 100%; border-radius: 18px; padding: 4px; } }
.rc-phone-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 40%; height: 12px; background: #1c1c1e;
  border-radius: 999px; box-shadow: 0 0 0 1px #0a0a0a;
  z-index: 2;
}
.rc-phone-screen {
  position: relative; width: 100%; height: 100%; border-radius: 26px;
  background: #000000; padding: 24px 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
  min-height: 0;
  flex: 1 1 0;
}
.rc-status-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.65rem; color: #8e8e93; flex-shrink: 0; }
.rc-status-left { display: flex; align-items: center; gap: 5px; }
.rc-status-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--rc-accent-green); box-shadow: 0 0 10px rgba(101,103,201,0.6); }
.rc-status-right { display: flex; align-items: center; gap: 4px; opacity: 0.8; }
.rc-status-bar-icon { width: 9px; height: 5px; border-radius: 999px; border: 1px solid #8e8e93; }
.rc-chat-header { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(56,56,60,0.6); margin-bottom: 4px; flex-shrink: 0; }
.rc-chat-profile-pic { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(56,56,60,0.6); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; background: #1c1c1e; }
.rc-chat-profile-pic img { width: 100%; height: 100%; object-fit: cover; }
.rc-chat-contact-name { font-size: 0.76rem; font-weight: 600; color: #e5e5ea; letter-spacing: 0.01em; }
.rc-chat-window {
  flex: 1 1 0; display: flex; flex-direction: column; gap: 6px;
  justify-content: flex-start; overflow-y: auto; overflow-x: hidden;
  padding-right: 4px; min-height: 0;
  max-height: 100%;
}
.rc-chat-window::-webkit-scrollbar { width: 3px; }
.rc-chat-window::-webkit-scrollbar-track { background: rgba(40,40,44,0.5); border-radius: 999px; }
.rc-chat-window::-webkit-scrollbar-thumb { background: rgba(100,100,108,0.4); border-radius: 999px; }
#runtime-comparison .rc-message-row { display: flex; width: 100%; margin-top: 4px; flex-shrink: 0; }
#runtime-comparison .rc-message-row.left { justify-content: flex-start; }
#runtime-comparison .rc-message-row.right { justify-content: flex-end; }
#runtime-comparison .rc-bubble {
  max-width: 80%; padding: 9px 11px; font-size: 0.76rem;
  border-radius: 16px; line-height: 1.4; word-wrap: break-word;
  overflow-wrap: break-word; word-break: break-word;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}
#runtime-comparison .rc-bubble.visible { opacity: 1; transform: translateY(0); }
#runtime-comparison .rc-bubble.rc-question {
  background: var(--rc-bubble-right); color: #fff;
  border-bottom-right-radius: 4px; font-weight: 500;
  box-shadow: 0 6px 14px rgba(22,163,74,0.24);
  position: relative; padding-bottom: 16px;
}
#runtime-comparison .rc-read-indicator {
  position: absolute; bottom: 3px; right: 6px; font-size: 0.58rem;
  color: rgba(255,255,255,0.85); font-weight: 600; opacity: 0;
  transition: opacity 0.3s ease-out; visibility: hidden;
}
#runtime-comparison .rc-read-indicator.visible { opacity: 1; visibility: visible; }
#runtime-comparison .rc-bubble.rc-answer {
  background: #2c2c2e; color: #e5e5ea;
  border-bottom-left-radius: 4px; border: 1px solid rgba(56,56,60,0.9);
}
#rc-phone-1 .rc-bubble.rc-answer { background: #C00000; border: 1px solid #A00000; color: #fff; }
#rc-phone-2 .rc-bubble.rc-answer { background: #6567C9; border: 1px solid #5254B3; color: #fff; }
#runtime-comparison .rc-bubble.rc-meta {
  background: #1c1c1e; color: #8e8e93;
  border-bottom-left-radius: 4px; border: 1px solid rgba(56,56,60,0.9);
  display: inline-flex; align-items: center; gap: 6px;
}
#runtime-comparison .rc-meta-label { font-size: 0.65rem; font-weight: 500; color: #8e8e93; }
#runtime-comparison .rc-bubble.rc-thought-time {
  background: transparent; border: none; color: #8e8e93;
  font-size: 0.62rem; padding: 2px 6px; font-style: italic;
}
#runtime-comparison .rc-typing {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 2px; opacity: 0; transition: opacity 0.2s ease-out;
}
#runtime-comparison .rc-typing-dot {
  width: 4px; height: 4px; border-radius: 999px;
  background: #8e8e93; opacity: 0.25;
  animation: rc-typing-bounce 1.1s infinite ease-in-out;
}
#runtime-comparison .rc-typing-dot:nth-child(2) { animation-delay: 0.15s; }
#runtime-comparison .rc-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes rc-typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.2; }
  40% { transform: translateY(-2px); opacity: 0.9; }
}
#runtime-comparison .rc-typing.active { opacity: 1; }
.rc-phone-shell.is-orange .rc-meta-label { color: #c2410c; }
.rc-phone-shell.is-orange .rc-bubble.rc-thought-time { color: #c2410c; }

/* Carousel */
.rc-carousel-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.rc-carousel-dots { display: flex; gap: 6px; align-items: center; }
.rc-carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(156,163,175,0.3); transition: all 0.3s; cursor: pointer; }
.rc-carousel-dot.active { background: var(--rc-accent-green); width: 20px; border-radius: 4px; }
.rc-carousel-dot:hover:not(.active) { background: rgba(156,163,175,0.6); }

/* Carousel arrows */
.rc-carousel-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: #fff; border: 1px solid rgba(209,213,219,0.8); border-radius: 50%;
  color: var(--rc-text); font-size: 1.1rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  line-height: 1; padding: 0;
  flex-shrink: 0;
}
.rc-carousel-arrow:hover:not(:disabled) {
  background: #f0f2f5; border-color: rgba(156,163,175,1);
  transform: scale(1.08); box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.rc-carousel-arrow:active:not(:disabled) { transform: scale(0.96); }
.rc-carousel-arrow:disabled { opacity: 0.3; cursor: not-allowed; transform: none !important; }

/* Chat progress bars (during animation) */
.rc-chat-progress {
  display: none; width: 100%; padding: 10px 14px;
  background: #fff; border: 1px solid rgba(209,213,219,0.6);
  border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  flex-shrink: 0; margin-top: 4px;
  flex-direction: column; gap: 8px;
}
.rc-chat-progress-heading {
  font-size: 0.66rem; font-weight: 700; color: var(--rc-muted);
  letter-spacing: 0.02em; text-align: left;
}
.rc-chat-progress.visible { display: flex; animation: rc-progressFadeIn 0.3s ease forwards; }
.rc-chat-progress.fade-out { animation: rc-progressFadeOut 0.35s ease forwards; }
@keyframes rc-progressFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-4px); }
}
.rc-chat-progress-row {
  display: flex; align-items: center; gap: 8px;
}
.rc-chat-progress-label {
  font-size: 0.6rem; font-weight: 700; width: 72px; text-align: right; flex-shrink: 0;
  letter-spacing: 0.01em;
}
.rc-chat-progress-label.rc-llava { color: #dc2626; }
.rc-chat-progress-label.rc-cope { color: #6567C9; }
.rc-chat-progress-track {
  flex: 1; height: 10px; background: rgba(209,213,219,0.18); border-radius: 5px; overflow: hidden;
}
.rc-chat-progress-fill {
  height: 100%; width: 0%; border-radius: 5px;
  transition: width linear;
}
.rc-chat-progress-fill.rc-llava { background: linear-gradient(90deg, #dc2626, #ef4444); }
.rc-chat-progress-fill.rc-cope { background: linear-gradient(90deg, #6567C9, #8183db); }
.rc-chat-progress-check {
  font-size: 0.72rem; width: 18px; text-align: center; opacity: 0;
  transition: opacity 0.3s ease;
}
.rc-chat-progress-check.done { opacity: 1; color: #16a34a; }

@media (max-width: 600px) {
  .rc-chat-progress { padding: 6px 8px; gap: 5px; border-radius: 8px; }
  .rc-chat-progress-label { font-size: 0.52rem; width: 58px; }
  .rc-chat-progress-track { height: 7px; }
  .rc-chat-progress-check { font-size: 0.6rem; width: 14px; }
}

/* Results panel */
.rc-progress-panel {
  display: none; width: 100%; padding: 12px 14px 10px;
  background: #fff; border: 1px solid rgba(209,213,219,0.6);
  border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  flex-shrink: 0; margin-top: 4px;
}
.rc-progress-panel.visible { display: block; animation: rc-progressFadeIn 0.4s ease forwards; }
@keyframes rc-progressFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Summary metrics */
.rc-progress-summary {
  opacity: 0; transition: opacity 0.4s ease;
}
.rc-progress-summary.visible { opacity: 1; }
.rc-summary-grid {
  display: grid; grid-template-columns: 70px 1fr 1fr 58px; gap: 4px 8px;
  font-size: 0.68rem; align-items: center;
}
.rc-summary-header { font-weight: 700; text-align: center; font-size: 0.62rem; letter-spacing: 0.02em; }
.rc-summary-header.rc-llava { color: #dc2626; }
.rc-summary-header.rc-cope { color: #6567C9; }
.rc-summary-label { font-weight: 600; color: var(--rc-muted); font-size: 0.66rem; text-align: center; }
.rc-summary-value { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; padding: 2px 0; }
.rc-summary-value.rc-llava { color: #dc2626; }
.rc-summary-value.rc-cope { color: #6567C9; }
.rc-token-section {
  grid-column: 1 / -1; margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed rgba(209,213,219,0.4);
}
.rc-token-title {
  font-size: 0.6rem; font-weight: 600; color: var(--rc-muted);
  text-align: left; margin-bottom: 2px; letter-spacing: 0.02em;
}
.rc-token-header-row {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px;
}
.rc-token-ratio {
  font-size: 0.66rem; color: #6567C9; font-weight: 700;
}
.rc-token-bar-row {
  display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}
.rc-token-bar-label {
  font-size: 0.54rem; font-weight: 600; width: 48px; text-align: right; flex-shrink: 0;
}
.rc-token-bar-label.rc-llava { color: #dc2626; }
.rc-token-bar-label.rc-cope { color: #6567C9; }
.rc-token-bar-track {
  flex: 1; height: 12px; background: rgba(209,213,219,0.12); border-radius: 6px; overflow: hidden;
}
.rc-token-bar-fill {
  height: 100%; border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.22,1,0.36,1);
}
.rc-token-bar-fill.rc-llava { background: linear-gradient(90deg, #dc2626, #ef4444); }
.rc-token-bar-fill.rc-cope { background: linear-gradient(90deg, #6567C9, #8183db); }

@media (max-width: 600px) {
  .rc-progress-panel { padding: 8px 8px 6px; border-radius: 8px; }
  .rc-summary-grid { grid-template-columns: 55px 1fr 1fr 50px; gap: 3px 5px; font-size: 0.58rem; }
  .rc-summary-header { font-size: 0.54rem; }
  .rc-summary-label { font-size: 0.56rem; }
}
