:root {
  color-scheme: dark;

  /* ReframeEngine Theme.swift exact tokens */
  --bg: #0c0e11;
  --surface: #121418;
  --panel: #1a1a1c;
  --panel-2: #242427;
  --hairline: #2b2b2e;
  --hairline-strong: #3a3a40;
  --clip-fill: #303a46;

  --text: #f5f5f7;
  --text-secondary: #a0a0a8;
  --text-muted: #8b8d97;

  --accent: #0a84ff;
  --accent-hover: #2d95ff;
  --playhead: #ff453a;
  --warning: #f6a823;
  --green: #30d158;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container: 78rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-block-size: 100svh;
  background: var(--bg);
  accent-color: var(--accent);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--panel-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -4rem;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 200;
}

.skip-link:focus {
  inset-block-start: 1rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 60;
  background: rgba(12, 14, 17, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-block-end: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  font-size: 0.98rem;
}

.brand-mark {
  display: inline-flex;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.site-nav a {
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

@media (min-width: 48rem) {
  .site-nav {
    display: flex;
  }
}

/* Site Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-block-size: 2.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 580;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm {
  min-block-size: 2.1rem;
  padding: 0.35rem 0.95rem;
  font-size: 0.84rem;
}

.btn-lg {
  min-block-size: 2.9rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.96rem;
}

.btn-primary {
  background: #0071e3;
  color: #ffffff;
}

.btn-primary:hover {
  background: #0a84ff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--hairline-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--text-muted);
}

/* Typography */
.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 640;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 1.5rem + 4.4vw, 5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.65rem, 1.2rem + 1.8vw, 2.55rem);
  font-weight: 650;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

p {
  text-wrap: pretty;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 5.75rem) clamp(2.5rem, 5vw, 4rem);
  border-block-end: 1px solid var(--hairline);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58rem 26rem at 50% -4rem, rgba(10, 132, 255, 0.2), transparent 72%),
    radial-gradient(36rem 18rem at 80% 15%, rgba(255, 69, 58, 0.07), transparent 70%);
}

.hero-inner {
  position: relative;
  text-align: center;
  max-inline-size: 50rem;
}

.hero-lead {
  margin: 1.25rem auto 0;
  max-inline-size: 54ch;
  font-size: clamp(1.02rem, 0.94rem + 0.45vw, 1.22rem);
  color: var(--text-secondary);
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-block-start: 1.9rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 1.4rem;
  margin-block-start: 1.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-trust span::before {
  content: "";
  inline-size: 4px;
  block-size: 4px;
  border-radius: 50%;
  background: var(--hairline-strong);
}

/* =========================================================
   FULL-PAGE CINEMATIC SCROLL SHOWCASE
   ========================================================= */
.workflow-section {
  position: relative;
  min-block-size: 620svh;
  border-block-end: 1px solid var(--hairline);
}

.cinema-stage {
  position: sticky;
  inset-block-start: 0;
  block-size: 100svh;
  inline-size: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(64rem 34rem at 50% 48%, rgba(10, 132, 255, 0.13), transparent 66%),
    radial-gradient(40rem 24rem at 24% 78%, rgba(255, 69, 58, 0.05), transparent 64%),
    radial-gradient(50rem 20rem at 50% 94%, rgba(10, 132, 255, 0.07), transparent 70%),
    #06070a;
}

.stage-chrome-bar {
  position: absolute;
  inset-block-start: 4.35rem;
  inset-inline: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding-inline: 1rem;
  pointer-events: none;
}

.stage-chapter-pills {
  pointer-events: auto;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(14, 16, 21, 0.74);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.chap-pill {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 560;
  min-block-size: 1.85rem;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chap-pill:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.chap-pill.is-active {
  background: rgba(10, 132, 255, 0.22);
  border-color: rgba(10, 132, 255, 0.68);
  color: #ffffff;
}

/* Camera Viewport & GPU Transform Rig */
.camera-viewport {
  inline-size: 100%;
  block-size: 100%;
  position: relative;
  overflow: hidden;
}

.camera-rig {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  inline-size: 1040px;
  block-size: 640px;
  transform-origin: 0 0;
  will-change: transform;
}

.camera-vignette {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: radial-gradient(
    circle 42rem at var(--spot-x, 50%) var(--spot-y, 50%),
    transparent 32%,
    rgba(4, 5, 8, 0.24) 76%,
    rgba(4, 5, 8, 0.48) 100%
  );
}

/* Floating Cinema Caption (Bottom-Left) */
.cinema-caption {
  position: absolute;
  inset-inline-start: 1.5rem;
  inset-block-end: 1.5rem;
  z-index: 30;
  max-inline-size: min(23.5rem, calc(100% - 3rem));
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: rgba(14, 16, 22, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.58);
  pointer-events: none;
}

.caption-step {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.caption-title {
  margin: 0;
  font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.32rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--text);
}

.caption-sub {
  margin: 0.34rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

@media (max-width: 48rem) {
  .stage-chrome-bar {
    inset-block-start: 4rem;
  }

  .cinema-caption {
    inset-inline-start: 0.9rem;
    inset-block-end: 5.4rem;
    max-inline-size: calc(100% - 1.8rem);
    padding: 0.75rem 0.95rem;
  }
}

/* =========================================================
   LINEAR-STYLE DARK MINIMAL STUDIO FINALE (#finale-stage)
   ========================================================= */
.finale-stage {
  position: absolute;
  inset: 0;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  background: #08090c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.finale-studio-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(52rem 28rem at 50% 6%, rgba(255, 255, 255, 0.085), transparent 68%),
    radial-gradient(64rem 34rem at 50% 42%, rgba(10, 132, 255, 0.09), transparent 68%);
}

.finale-floor {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 27%;
  pointer-events: none;
  background:
    radial-gradient(62rem 12rem at 50% 0%, rgba(190, 200, 220, 0.14), transparent 74%),
    linear-gradient(180deg, #1b1d23 0%, #0d0f13 52%, #07080a 100%);
  border-block-start: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.finale-floor::before {
  content: "";
  position: absolute;
  inset-block-start: -1px;
  inset-inline: 12%;
  block-size: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24) 50%, transparent);
}

.finale-content {
  position: relative;
  z-index: 2;
  inline-size: min(100% - 2rem, 72rem);
  padding-block-start: 4.5rem;
  padding-block-end: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.35rem, 3svh, 2.35rem);
}

.finale-header {
  text-align: center;
}

.finale-title {
  margin: 0;
  font-size: clamp(1.65rem, 1.15rem + 2vw, 2.55rem);
  font-weight: 660;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #f5f5f7;
}

.finale-sub {
  margin: 0.55rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.finale-trio {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.9rem, 2.6vw, 2.35rem);
}

.finale-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.finale-frame {
  position: relative;
  padding: 5px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.88),
    0 12px 32px rgba(10, 132, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.finale-item.is-hero .finale-frame {
  border-color: rgba(10, 132, 255, 0.36);
  box-shadow:
    0 34px 76px rgba(0, 0, 0, 0.92),
    0 14px 40px rgba(10, 132, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.finale-frame canvas {
  display: block;
  width: auto;
  border-radius: 8px;
  background: #000;
}

.finale-item-45 .finale-frame canvas {
  height: clamp(12.5rem, 35svh, 21rem);
  aspect-ratio: 4 / 5;
}

.finale-item-916 .finale-frame canvas {
  height: clamp(15rem, 42svh, 25rem);
  aspect-ratio: 9 / 16;
}

.finale-item-11 .finale-frame canvas {
  height: clamp(11.5rem, 31svh, 18.5rem);
  aspect-ratio: 1 / 1;
}

.finale-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

@media (max-width: 48rem) {
  .finale-trio {
    gap: 0.65rem;
  }

  .finale-item-45 .finale-frame canvas {
    height: 11.5rem;
  }

  .finale-item-916 .finale-frame canvas {
    height: 13.5rem;
  }

  .finale-item-11 .finale-frame canvas {
    height: 9.5rem;
  }

  .finale-tag {
    font-size: 0.62rem;
  }
}

/* =========================================================
   PIXEL-FAITHFUL macOS REFRAMEENGINE WINDOW (1040 × 640)
   ========================================================= */
.mac-window {
  position: relative;
  inline-size: 1040px;
  block-size: 640px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  overflow: hidden;
  pointer-events: none;
  box-shadow:
    0 42px 110px rgba(0, 0, 0, 0.86),
    0 20px 52px rgba(10, 132, 255, 0.13),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  user-select: none;
}

/* Specular top-edge glass bevel */
.mac-window::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 46;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

/* Studio Glass Sheen Overlay driven by --refl-x / --refl-y */
.window-reflection {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 45;
  background:
    radial-gradient(
      42rem 24rem at var(--refl-x, 35%) var(--refl-y, 15%),
      rgba(255, 255, 255, 0.085),
      transparent 62%
    ),
    linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.055) 0%,
      rgba(255, 255, 255, 0.015) 26%,
      transparent 48%,
      rgba(10, 132, 255, 0.025) 78%,
      rgba(255, 255, 255, 0.035) 100%
    );
}

/* Synthetic macOS Cursor + Click Ripple + Drag Badge */
.sim-cursor {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 50;
  pointer-events: none;
  will-change: transform;
}

.sim-cursor-arrow {
  display: block;
  transform: translate(-2.5px, -1.8px);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.65));
}

.sim-click-ring {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  inline-size: 28px;
  block-size: 28px;
  margin-inline-start: -14px;
  margin-block-start: -14px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(10, 132, 255, 0.16);
  opacity: 0;
  transform: scale(0.35);
  pointer-events: none;
}

.sim-drag-badge {
  position: absolute;
  inset-inline-start: 18px;
  inset-block-start: 18px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(18, 20, 26, 0.94);
  border: 1px solid rgba(10, 132, 255, 0.72);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: #e2efff;
  white-space: nowrap;
}

.sim-drag-badge.is-flip-x {
  inset-inline-start: auto;
  inset-inline-end: 14px;
}

.sim-drag-badge.is-flip-y {
  inset-block-start: auto;
  inset-block-end: 14px;
}

.sim-drag-badge[hidden] {
  display: none;
}

/* 44pt Native macOS TopBar (TopBar.swift) */
.re-topbar {
  block-size: 44px;
  flex-shrink: 0;
  padding: 0 12px;
  background: var(--panel);
  border-block-end: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.re-topbar-left,
.re-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-inline-size: 0;
}

.re-topbar-right {
  justify-content: flex-end;
}

.mac-traffic {
  display: inline-flex;
  gap: 6px;
  margin-inline-end: 4px;
  flex-shrink: 0;
}

.mac-traffic span {
  inline-size: 11px;
  block-size: 11px;
  border-radius: 50%;
}

.tl-red { background: #ff5f56; }
.tl-yellow { background: #ffbd2e; }
.tl-green { background: #27c93f; }

.re-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 4px 4px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

.re-back-btn:hover {
  color: var(--text);
}

.re-sep {
  inline-size: 1px;
  block-size: 14px;
  background: var(--hairline);
  flex-shrink: 0;
}

.re-project-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Center Ratios Summary Chip (RatioChipMenu.swift) */
.re-ratio-chip-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--panel-2);
  border: 1px solid var(--hairline);
}

.re-ratio-label {
  font-size: 11px;
  font-weight: 540;
  color: var(--text-secondary);
  margin-inline-end: 2px;
}

.re-ratio-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 1px 5px;
}

.re-ratio-chevron {
  font-size: 10px;
  color: var(--text-secondary);
  margin-inline-start: 1px;
}

/* Right TopBar Controls */
.re-tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--panel-2);
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 540;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.re-tb-btn:hover {
  background: #2e2e33;
}

.re-tb-btn.is-active {
  background: rgba(10, 132, 255, 0.16);
  border-color: rgba(10, 132, 255, 0.65);
}

.re-clip-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(10, 132, 255, 0.22);
  color: #6ab6ff;
}

/* Export Queue Pill (ExportQueueView.swift) */
.re-queue-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 540;
  cursor: pointer;
}

.re-queue-pill[hidden] {
  display: none;
}

.re-queue-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
}

.re-export-btn {
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 4px 11px;
  color: #fff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.re-export-btn:hover {
  background: var(--accent-hover);
}

/* Main Window Body */
.re-body {
  position: relative;
  flex: 1;
  min-block-size: 0;
  block-size: 596px;
  overflow: hidden;
  background: var(--bg);
}

/* VIEW A: DashboardView Empty State (DashboardView.swift) */
.re-dashboard {
  position: relative;
  block-size: 100%;
  padding: 28px 32px;
  background: #141518;
  display: flex;
  align-items: center;
  justify-content: center;
}

.re-dashboard[hidden] {
  display: none;
}

.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-inline-size: 360px;
}

.dash-empty-icon {
  inline-size: 56px;
  block-size: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  margin-block-end: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.dash-empty-title {
  margin: 0;
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -0.02em;
  color: var(--text);
}

.dash-empty-sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.dash-empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-block-start: 16px;
}

/* DashboardView dropTargetOverlay */
.dash-drop-overlay {
  position: absolute;
  inset: 12px;
  border-radius: 14px;
  background: rgba(10, 132, 255, 0.09);
  border: 2.5px dashed var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block-end: 130px;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
}

.dash-drop-overlay.is-active {
  opacity: 1;
}

.dash-drop-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(26, 26, 30, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 560;
  color: var(--text);
}

.dropped-file-chip {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid rgba(10, 132, 255, 0.7);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  font-family: var(--font-mono);
  font-size: 11.5px;
  will-change: transform;
}

.file-ext {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
}

/* VIEW B: EditorView */
.re-editor {
  block-size: 100%;
}

.re-editor[hidden] {
  display: none;
}

.re-workspace-row {
  display: flex;
  block-size: 100%;
  min-block-size: 0;
}

.re-main-col {
  flex: 1;
  min-inline-size: 0;
  block-size: 100%;
  display: flex;
  flex-direction: column;
}

/* Split Preview */
.re-viewer-split {
  flex: 1;
  min-block-size: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.92fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 1px;
  background: var(--hairline);
}

.re-source-pane,
.re-result-pane {
  background: var(--bg);
  position: relative;
  min-block-size: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.re-source-pane {
  container-type: size;
}

.re-source-canvas-wrap {
  position: relative;
  inline-size: min(calc(100cqw - 24px), calc((100cqh - 24px) * 16 / 9));
  block-size: auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.re-source-canvas-wrap video,
.re-source-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.re-source-canvas-wrap video {
  object-fit: contain;
}

.re-source-canvas-wrap canvas {
  cursor: grab;
  touch-action: none;
}

.re-source-canvas-wrap canvas:active {
  cursor: grabbing;
}

/* Contextual Source Viewer Tool Pill */
.re-viewer-pill {
  position: absolute;
  inset-inline-start: 10px;
  inset-block-start: 10px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(20, 20, 23, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.re-pill-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 540;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 3px 7px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.re-pill-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.re-pill-btn.is-active {
  background: rgba(10, 132, 255, 0.24);
  border-color: rgba(10, 132, 255, 0.55);
  color: #fff;
}

.re-pill-btn.is-warn {
  background: rgba(246, 168, 35, 0.2);
  border-color: rgba(246, 168, 35, 0.6);
  color: var(--warning);
}

.re-pill-btn[hidden] {
  display: none;
}

.re-drag-toast {
  position: absolute;
  inset-inline-end: 10px;
  inset-block-start: 10px;
  z-index: 6;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(246, 168, 35, 0.22);
  border: 1px solid rgba(246, 168, 35, 0.7);
  color: var(--warning);
}

/* Result Preview Pane */
.re-result-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-block-end: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.re-result-ratio-picker {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline-strong);
}

.re-result-ratio-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 620;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 2px 7px;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.re-result-ratio-pill.is-focused {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.35);
}

.re-result-frame {
  flex: 1;
  inline-size: 100%;
  height: 100%;
  min-block-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.re-result-frame canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 5px;
  border: 1px solid var(--hairline-strong);
  background: #000;
}

/* 36pt Docked Transport Bar (TransportBar.swift) */
.re-transport {
  position: relative;
  block-size: 36px;
  flex-shrink: 0;
  padding: 0 12px;
  background: var(--panel);
  border-block-start: 1px solid var(--hairline);
  border-block-end: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* 2pt Top-Edge Progress Strip (RE-120) */
.re-progress-strip {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  block-size: 2px;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.re-progress-strip.is-visible {
  opacity: 1;
}

.re-progress-fill {
  inline-size: 100%;
  block-size: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
}

.re-transport-left,
.re-transport-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.re-tr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 5px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.re-tr-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.re-tr-btn.is-play {
  color: var(--text);
}

.re-timecode {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.re-clip-readout {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.re-analysis-label {
  font-size: 11px;
  color: #6ab6ff;
  margin-inline-start: 6px;
}

.re-kbd-hint {
  display: inline-flex;
  gap: 3px;
}

.re-kbd-hint kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel-2);
  border: 1px solid var(--hairline-strong);
  color: var(--text-secondary);
}

/* MiniTimeline (MiniTimeline.swift) */
.re-timeline-wrap {
  position: relative;
  flex-shrink: 0;
  padding: 7px 10px;
  background: #141416;
}

.re-timeline-bar {
  position: relative;
  block-size: 32px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--hairline);
}

.re-tl-attention {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  inline-size: 100%;
  block-size: 3px;
  z-index: 3;
  pointer-events: none;
  display: block;
}

.re-timeline-segments {
  display: flex;
  inline-size: 100%;
  block-size: 100%;
  gap: 1.5px;
  background: #090a0d;
}

.re-timeline-segments.is-uncut {
  gap: 0;
}

.re-tl-seg {
  position: relative;
  block-size: 100%;
  background-color: var(--clip-fill);
  background-image: url("media/nike-strip.jpg");
  background-size: 1800% 100%;
  background-repeat: no-repeat;
  opacity: 0.72;
  transition: opacity 0.12s ease;
}

.re-tl-seg.is-uncut {
  opacity: 0.85;
  box-shadow: none !important;
  border: 0;
}

.re-tl-seg.is-current {
  opacity: 1;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85) inset;
}

.re-timeline-needle {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: 2px;
  background: var(--playhead);
  box-shadow: 0 0 8px rgba(255, 69, 58, 0.75);
  pointer-events: none;
  z-index: 4;
  will-change: transform;
}

.re-timeline-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
}

/* Bottom Clip Drawer Bar & Collapsible Clip Cards Strip */
.re-clip-drawer-bar {
  block-size: 24px;
  flex-shrink: 0;
  background: #141416;
  border-block-start: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
}

.re-clips-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline-strong);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 10px;
  font-weight: 560;
}

.re-clips-tab.is-open {
  background: rgba(10, 132, 255, 0.18);
  border-color: rgba(10, 132, 255, 0.55);
  color: var(--text);
}

.re-clips-tab.is-open .re-clips-chevron {
  transform: rotate(180deg);
}

.re-clip-strip {
  block-size: 112px;
  flex-shrink: 0;
  background: #111215;
  border-block-start: 1px solid var(--hairline);
  padding: 8px 10px;
  overflow-x: auto;
  overflow-y: hidden;
}

.re-clip-strip-track {
  display: flex;
  align-items: stretch;
  gap: 8px;
  block-size: 100%;
  inline-size: max-content;
}

.re-clip-card {
  inline-size: 98px;
  flex-shrink: 0;
  border-radius: 7px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.re-clip-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.48);
}

.re-clip-thumb {
  position: relative;
  flex: 1;
  background-color: var(--clip-fill);
  background-image: url("media/nike-strip.jpg");
  background-size: 1800% 100%;
  background-repeat: no-repeat;
}

.re-clip-attn-bar {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  block-size: 3px;
  z-index: 2;
  pointer-events: none;
}

.re-needs-review-badge {
  position: absolute;
  inset-block-start: 5px;
  inset-inline-end: 5px;
  inline-size: 14px;
  block-size: 14px;
  border-radius: 50%;
  background: #f6a823;
  color: #121214;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  z-index: 3;
}

.re-clip-meta {
  block-size: 26px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: #1a1b1f;
  border-block-start: 1px solid var(--hairline);
}

.re-clip-num {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.re-clip-card.is-selected .re-clip-num {
  color: var(--text);
}

.re-card-curves-btn {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(10, 132, 255, 0.65);
  background: rgba(10, 132, 255, 0.22);
  color: #e2efff;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 600;
}

/* Spline Curve Editor Drawer (KeyframeEditorView.swift) */
.re-spline-drawer {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  background: #131417;
  border-block-start: 1px solid var(--hairline-strong);
}

.re-spline-drawer[hidden] {
  display: none;
}

.re-spline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: var(--panel);
  border-block-end: 1px solid var(--hairline);
}

.re-spline-head-left,
.re-spline-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.re-spline-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
}

.re-channel-pills {
  display: inline-flex;
  gap: 3px;
  padding: 2px;
  border-radius: 6px;
  background: var(--panel-2);
}

.re-chan-pill {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 560;
  padding: 2px 7px;
  border-radius: 4px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.re-chan-pill.is-active {
  background: var(--accent);
  color: #fff;
}

.re-chan-pill[data-chan="x"].is-active {
  background: #ff6b61;
  color: #0b0c0f;
}

.re-chan-pill[data-chan="y"].is-active {
  background: #40d68c;
  color: #0b0c0f;
}

.re-chan-pill[data-chan="z"].is-active {
  background: #52c7ff;
  color: #0b0c0f;
}

.re-spline-readout {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 560;
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
}

.re-spline-close {
  padding: 3px 6px;
  line-height: 1;
}

.re-spline-canvas-wrap {
  padding: 6px 10px 8px;
}

.re-spline-canvas-wrap canvas {
  width: 100%;
  height: 134px;
  display: block;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  cursor: crosshair;
  touch-action: none;
}

/* Right Camera Inspector Sidebar (FeelPanel.swift — 264pt) */
.re-inspector {
  inline-size: 256px;
  flex-shrink: 0;
  background: var(--panel);
  border-inline-start: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.re-inspector[hidden] {
  display: none;
}

.re-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-block-end: 1px solid var(--hairline);
  background: var(--panel);
  flex-shrink: 0;
}

.re-inspector-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.re-inspector-title {
  font-size: 12.5px;
  font-weight: 620;
  color: var(--text);
}

.re-inspector-clip-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(10, 132, 255, 0.22);
  color: #6ab6ff;
}

.re-inspector-close {
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 2px 4px;
}

.re-inspector-scroll {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.re-switch-card {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.re-switch-card.is-dimmed {
  opacity: 0.36;
  pointer-events: none;
}

.re-switch-card.is-on {
  background: rgba(10, 132, 255, 0.14);
  border-color: rgba(10, 132, 255, 0.45);
}

.re-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.re-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 540;
  color: var(--text);
}

.re-zero-smooth {
  font-size: 10.5px;
  font-weight: 560;
  color: #6ab6ff;
}

.re-cam-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: opacity 0.15s ease;
}

.re-cam-group.is-dimmed,
.re-cam-slider.is-dimmed {
  opacity: 0.36;
  pointer-events: none;
}

.re-cam-group-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.re-cam-slider {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.re-cam-slider-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
}

.re-cam-slider-head label {
  color: var(--text);
  font-weight: 500;
}

.re-cam-slider-head span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
}

.re-cam-slider input[type="range"] {
  width: 100%;
  margin: 0;
  cursor: pointer;
}

.re-divider {
  block-size: 1px;
  background: var(--hairline);
}

.re-reset-clip-btn {
  width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--hairline-strong);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 540;
  cursor: pointer;
}

.re-reset-clip-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* RatioSelectorModal (RatioSelectorModal.swift — 600px Two-Panel Modal) */
.re-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 24;
  background: rgba(6, 8, 11, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.re-ratio-modal {
  inline-size: min(100%, 600px);
  background: #1a1a1c;
  border: 1px solid #3a3a40;
  border-radius: 12px;
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.78);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rm-head {
  padding: 14px 18px;
  border-block-end: 1px solid var(--hairline);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rm-title {
  margin: 0;
  font-size: 14px;
  font-weight: 640;
  color: var(--text);
}

.rm-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.rm-source-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--hairline-strong);
  color: var(--text-secondary);
  white-space: nowrap;
}

.rm-body {
  block-size: 310px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.rm-list {
  padding: 12px;
  border-inline-end: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #16171a;
}

.rm-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  color: var(--text);
  font-family: inherit;
  text-align: start;
}

.rm-card.is-selected {
  background: rgba(10, 132, 255, 0.14);
  border-color: rgba(10, 132, 255, 0.72);
}

.rm-check {
  inline-size: 16px;
  block-size: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--hairline-strong);
  background: rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
}

.rm-card.is-selected .rm-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.rm-ratio-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
  min-inline-size: 34px;
}

.rm-ratio-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.rm-preview-pane {
  background: #111215;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.rm-source-ref {
  position: relative;
  inline-size: 288px;
  block-size: 162px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-source-ref-tag {
  position: absolute;
  inset-block-start: -18px;
  inset-inline-start: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.rm-morph-frame {
  inline-size: 91px;
  block-size: 162px;
  border-radius: 6px;
  border: 2px solid var(--accent);
  background: rgba(10, 132, 255, 0.16);
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .rm-morph-frame {
    transition: inline-size 0.35s cubic-bezier(0.22, 1, 0.36, 1), block-size 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

.rm-morph-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.rm-morph-dims {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #bfe0ff;
}

.rm-foot {
  padding: 11px 18px;
  border-block-start: 1px solid var(--hairline);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rm-cuts-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 540;
  color: var(--text);
}

.rm-foot-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Export Sheet Modal (ExportSheet.swift — 480pt) */
.re-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: rgba(6, 8, 11, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.re-sheet-backdrop[hidden] {
  display: none;
}

.re-export-sheet {
  width: min(100%, 460px);
  min-height: 360px;
  background: #1f1f23;
  border: 1px solid #3c3d45;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.re-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.re-sheet-head h3 {
  font-size: 14px;
  font-weight: 620;
}

.re-sheet-close {
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
}

.re-sheet-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.re-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.re-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 2px;
  border-radius: 7px;
  background: #141417;
  border: 1px solid var(--hairline);
}

.re-seg-btn {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 540;
  padding: 5px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.re-seg-btn.is-active {
  background: #35363d;
  color: #fff;
}

.re-select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  background: #141417;
  border: 1px solid var(--hairline-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
}

.re-export-ratios {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #141417;
  border: 1px solid var(--hairline);
}

.re-export-ratio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  cursor: pointer;
}

.er-ratio {
  font-family: var(--font-mono);
  font-weight: 600;
  min-inline-size: 34px;
}

.er-file {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.re-sheet-foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block-start: 6px;
  border-block-start: 1px solid var(--hairline);
}

.re-dest-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.re-sheet-btns {
  display: flex;
  gap: 8px;
}

/* Export Queue Popover (ExportQueueView.swift) */
.re-queue-popover {
  position: absolute;
  inset-inline-end: 14px;
  inset-block-start: 8px;
  z-index: 30;
  width: min(calc(100% - 28px), 340px);
  background: #1f1f23;
  border: 1px solid #3c3d45;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}

.re-queue-popover[hidden] {
  display: none;
}

.re-qp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  border-block-end: 1px solid var(--hairline);
}

.re-qp-clear {
  background: transparent;
  border: 0;
  color: var(--accent-hover);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.re-qp-list {
  display: flex;
  flex-direction: column;
}

.re-qp-item {
  padding: 10px 12px;
  border-block-end: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.re-qp-item:last-child {
  border-block-end: 0;
}

.re-qp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}

.re-qp-name {
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.re-qp-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.re-qp-status.is-done {
  color: var(--green);
}

.re-qp-bar {
  block-size: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.re-qp-bar-fill {
  block-size: 100%;
  background: var(--green);
  transform-origin: left center;
  transition: transform 0.1s linear;
}

/* =========================================================
   LOWER SECTIONS (ENGINE PROOF, SPECS, DOWNLOAD CTA)
   ========================================================= */
.section {
  padding-block: clamp(3.5rem, 6.5vw, 5.75rem);
}

.section-specs {
  border-block-start: 1px solid var(--hairline);
  background: var(--surface);
}

.section-header {
  max-inline-size: 44rem;
  margin-block-end: clamp(2rem, 4vw, 3rem);
}

.section-lead {
  margin: 0.85rem 0 0;
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-inline-size: 56ch;
}

.proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 52rem) {
  .proof-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.proof-card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.proof-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-hover);
  margin-block-end: 0.55rem;
}

.proof-card p {
  margin: 0.55rem 0 0;
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.specs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 56rem) {
  .specs-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 3rem;
  }
}

.spec-list {
  margin: 0;
  border-block-start: 1px solid var(--hairline);
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(8rem, 11.5rem) minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.9rem;
  border-block-end: 1px solid var(--hairline);
}

.spec-row dt {
  font-size: 0.88rem;
  font-weight: 560;
  color: var(--text-secondary);
}

.spec-row dd {
  margin: 0;
  font-size: 0.92rem;
}

.cta-banner {
  margin-block-start: clamp(3rem, 5vw, 4.5rem);
  padding: clamp(1.85rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(10, 132, 255, 0.2), transparent 72%),
    var(--panel);
  border: 1px solid var(--hairline-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-banner-copy p {
  margin: 0.55rem 0 0;
  color: var(--text-secondary);
  max-inline-size: 48ch;
}

.cta-banner-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

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

.site-footer {
  border-block-start: 1px solid var(--hairline);
  padding-block: 1.75rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-brand {
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-note {
  margin: 0;
}

/* =========================================================
   FLOATING AUTO-SCROLL CONTROL PILL (WCAG 2.2.2)
   ========================================================= */
.autoscroll-bar {
  position: fixed;
  inset-inline-end: 1.25rem;
  inset-block-end: 1.25rem;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.42rem 0.8rem 0.42rem 0.45rem;
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.58);
}

.autoscroll-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-block-size: 2.15rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 132, 255, 0.58);
  background: rgba(10, 132, 255, 0.22);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.autoscroll-toggle:hover {
  background: rgba(10, 132, 255, 0.34);
  border-color: var(--accent);
}

.autoscroll-toggle[data-paused="true"] {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--hairline-strong);
}

.autoscroll-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-inline-size: 8.75rem;
}

.autoscroll-progress {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
}

.autoscroll-beat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
}

.autoscroll-hint {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.autoscroll-track {
  inline-size: 100%;
  block-size: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.autoscroll-track-fill {
  inline-size: 100%;
  block-size: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(var(--scroll-progress, 0.05));
}

@media (max-width: 48rem) {
  .autoscroll-bar {
    inset-inline-end: 0.9rem;
    inset-block-end: 0.9rem;
  }

  .autoscroll-hint {
    display: none;
  }

  .autoscroll-meta {
    min-inline-size: 5.5rem;
  }
}

/* Fallback for browsers without accent-color */
@supports not (accent-color: #0a84ff) {
  .re-cam-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
  }

  .re-cam-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(
      to right,
      var(--accent) var(--progress, 50%),
      var(--hairline-strong) var(--progress, 50%)
    );
  }

  .re-cam-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: -4.5px;
  }
}

@media (forced-colors: active) {
  .mac-window,
  .re-ratio-modal,
  .finale-frame,
  .cinema-caption,
  .stage-chapter-pills,
  .chap-pill,
  .autoscroll-bar,
  .autoscroll-toggle,
  .proof-card,
  .cta-banner,
  .btn,
  .re-tb-btn,
  .re-export-btn {
    border: 1px solid CanvasText;
  }

  .chap-pill.is-active,
  .rm-card.is-selected,
  .re-clip-card.is-selected {
    border-color: Highlight;
  }
}
