/* ==========================================================================
   IMPEL Project Page — Modern Robotics Flagship Theme
   Accent: IMPEL Teal (#239A9B) + Warm Coral Contrast (#D96965)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-subtle: #f7f9fb;
  --bg-card: #ffffff;
  --bg-code: #0f172a;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --teal: #239a9b;
  --teal-dark: #197677;
  --teal-soft: #eaf6f6;
  --teal-border: #bfe3e3;
  --coral: #d96965;
  --coral-soft: #fdf0ef;
  --amber: #e09f3e;
  --purple: #7c6bb8;
  --blue: #3b82c4;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 22px 50px -15px rgba(15, 23, 42, 0.14);
  --container: 1140px;
  --container-narrow: 880px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--teal);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Sticky Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

/* ---------- Hero ---------- */
.hero {
  padding: 58px 0 44px;
  background: radial-gradient(1200px 460px at 50% -80px, rgba(35, 154, 155, 0.09), transparent 70%);
}

.hero-header {
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.1vw, 3.05rem);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-acronym {
  color: var(--teal);
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-size: 1.06rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 auto 12px;
  max-width: 820px;
}

.authors sup {
  color: var(--teal-dark);
  font-weight: 700;
  margin-left: 1px;
}

.affiliations {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 8px;
}

.corresponding {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 26px;
}

.corresponding code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
  color: var(--teal-dark);
}

.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
}

.btn-muted {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-color: var(--border);
  cursor: default;
}

.btn-muted:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- KPI Metrics Strip ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.kpi-card:hover {
  border-color: var(--teal-border);
  transform: translateY(-2px);
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--teal);
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-delta {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.38;
}

/* ---------- Figure Cards ---------- */
.figure-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.figure-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
}

.figure-caption {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.figure-caption strong {
  color: var(--text);
}

/* ---------- Sections ---------- */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 30px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--teal-dark);
}

/* ---------- Abstract ---------- */
.abstract-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-md);
  padding: 26px 30px;
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  color: #1e293b;
  line-height: 1.75;
}

.abstract-box p {
  margin: 0;
}

/* ---------- Narrated Overview Video ---------- */
.video-stage {
  margin-top: 32px;
  background: #0b1220;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(15, 23, 42, 0.14);
}

.video-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.86rem;
  flex-wrap: wrap;
}

.video-stage-bar strong {
  color: #ffffff;
}

/* ---------- Filter Tabs ---------- */
.tab-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.tab-btn:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.tab-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(35, 154, 155, 0.25);
}

.tab-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tab-grid-4 .tab-btn {
  width: 100%;
  padding: 9px 10px;
  font-size: 0.84rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Video Gallery Grid ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-border);
}

.video-card.hidden {
  display: none;
}

.video-thumb {
  position: relative;
  background: #0f172a;
  overflow: hidden;
  cursor: pointer;
}

.video-thumb.aspect-4-3 {
  aspect-ratio: 4 / 3;
}

.video-thumb.aspect-16-9 {
  aspect-ratio: 16 / 9;
}

.video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.video-speed {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(35, 154, 155, 0.9);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
}

.video-expand-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.video-card:hover .video-expand-hint {
  opacity: 1;
}

.video-meta {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: space-between;
}

.video-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.38;
}

.video-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.stat-sub {
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- Method 3-Step Cards & Body-Part Chips ---------- */
.parts-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 28px;
}

.part-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.part-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.method-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.method-card h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 700;
}

.method-card p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--text-secondary);
  line-height: 1.58;
}

/* ---------- Quantitative Tables ---------- */
.table-card {
  margin-top: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.table-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.table-card-head h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
}

.table-note {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 9px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  font-size: 0.8rem;
}

.data-table th.group-head {
  background: #eef2f6;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
}

.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
  padding-left: 14px;
  font-weight: 600;
}

.data-table tr.row-ours td {
  background: var(--teal-soft);
  color: var(--text);
  font-weight: 600;
  border-top: 1.5px solid var(--teal-border);
  border-bottom: 1.5px solid var(--teal-border);
}

.data-table tr.row-ours td:first-child {
  color: var(--teal-dark);
  font-weight: 800;
}

.data-table .best {
  font-weight: 800;
  color: var(--text);
}

.data-table tr.row-ours .best {
  color: var(--teal-dark);
}

.data-table .sd {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 400;
  margin-left: 2px;
}

.data-table .divider-left {
  border-left: 1.5px solid var(--border);
}

/* ---------- Two-Column Grids for Ablations & Analysis ---------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.ablation-bottom {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 20px;
  align-items: stretch;
}

.takeaway-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.takeaway-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.takeaway-item h4 {
  margin: 0 0 5px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--teal-dark);
}

.takeaway-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ---------- BibTeX ---------- */
.bibtex-wrap {
  position: relative;
  background: var(--bg-code);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
}

.bibtex-wrap pre {
  margin: 0;
  overflow-x: auto;
  color: #e2e8f0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.65;
}

.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.copy-btn:hover {
  background: var(--teal);
  border-color: var(--teal);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 36px 0 46px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.site-footer p {
  margin: 4px 0;
}

/* ---------- Lightbox Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  position: relative;
  width: min(1060px, 95vw);
  max-height: 92vh;
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  gap: 12px;
}

.modal-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.speed-toggle {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.speed-toggle.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: #f1f5f9;
}

.modal-body {
  padding: 16px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}

.modal-body.image-mode {
  background: #ffffff;
}

.modal-body img {
  max-height: 78vh;
  width: auto;
  object-fit: contain;
}

.modal-body video {
  max-height: 76vh;
  width: 100%;
  border-radius: 8px;
  background: #000;
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .method-grid,
  .two-col,
  .ablation-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .hero {
    padding: 36px 0 32px;
  }
  .section {
    padding: 46px 0;
  }
  .kpi-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }
  .abstract-box {
    padding: 20px;
  }
  .table-card {
    padding: 16px;
  }
}

/* ---------- Dynamic Synchronized Readout Studio ---------- */
.readout-studio {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 20px;
  align-items: stretch;
}

.readout-video-pane,
.readout-chart-pane {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.readout-video-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--teal-border);
}

.readout-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.readout-time-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.readout-controls {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ctrl-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  min-width: 68px;
  transition: background 0.15s ease;
}

.ctrl-btn:hover {
  background: var(--teal-dark);
}

.ctrl-speeds {
  display: inline-flex;
  gap: 5px;
}

.readout-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.readout-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.readout-chart-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

.readout-chart-hint {
  font-size: 0.78rem;
  color: var(--teal-dark);
  font-weight: 600;
  background: var(--teal-soft);
  padding: 2px 9px;
  border-radius: 999px;
}

.readout-canvas-wrap {
  flex: 1;
  min-height: 315px;
  position: relative;
}

#readout-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: ew-resize;
  touch-action: none;
}

@media (max-width: 980px) {
  .tab-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .readout-studio {
    grid-template-columns: 1fr;
  }
  .readout-desc {
    margin-left: 0;
  }
  .readout-canvas-wrap {
    min-height: 300px;
  }
}
