/* ══════════════════════════════════════════════════════════════
   Tesseract OCR Studio — style.css
   Aesthetic: Minimal modern dark — restrained, typographic, precise
   Fonts: Syne (display) · Space Mono (labels) · DM Sans (body)
══════════════════════════════════════════════════════════════ */

/* ─── Variables ───────────────────────────────────────────── */
:root {
  --bg:            #080809;
  --bg-panel:      #0f0f12;
  --bg-card:       #141418;
  --bg-hover:      #1a1a20;
  --border:        #222228;
  --border-mid:    #2e2e38;
  --border-bright: #3a3a48;
  --text:          #dddde8;
  --text-muted:    #6e6e88;
  --text-dim:      #3a3a50;
  --accent:        #c8f04a;        /* muted lime — less punchy than before */
  --accent-dim:    rgba(200,240,74,0.08);
  --accent2:       #4af0c8;
  --accent2-dim:   rgba(74,240,200,0.08);
  --red:           #e05555;
  --font-display:  'Syne', sans-serif;
  --font-mono:     'Space Mono', monospace;
  --font-body:     'DM Sans', sans-serif;
  --radius:        6px;
  --radius-lg:     12px;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --t:             0.3s var(--ease);
}

/* ─── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.hl { color: var(--accent); }


/* ══════════════════════════════════════════════════════════════
   VIDEO BACKGROUND
══════════════════════════════════════════════════════════════ */

.video-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Normal appearance — video is already subtle particles */
  transition: opacity 1.2s ease;
}

.video-bg.video-fading {
  opacity: 0;
}

/* Dark gradient overlay — lighter since video is already subtle */
.video-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(8,8,9,0.2) 0%, rgba(8,8,9,0.55) 100%),
    linear-gradient(180deg, rgba(8,8,9,0.35) 0%, rgba(8,8,9,0.1) 40%, rgba(8,8,9,0.45) 100%);
}


/* ══════════════════════════════════════════════════════════════
   PRESENTATION WRAPPER
══════════════════════════════════════════════════════════════ */

.presentation-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}


/* ══════════════════════════════════════════════════════════════
   SLIDE BASE
══════════════════════════════════════════════════════════════ */

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 7rem 6rem;
  /* Default hidden state */
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transform: translateX(60px) scale(0.97);
  filter: blur(0px);
  transition:
    opacity 1.1s var(--ease),
    transform 1.1s var(--ease),
    filter 1.1s var(--ease);
}

.slide.active {
  opacity: 1;
  pointer-events: all;
  transform: none;
  filter: blur(0px);
  z-index: 2;
}

/* ── EXIT variants — driven by data-transition on the wrapper ── */

/* Default / slide-blur exit */
.slide.exit {
  opacity: 0;
  transform: translateX(-80px) scale(0.95);
  filter: blur(6px);
  transition:
    opacity 1.0s var(--ease),
    transform 1.0s var(--ease),
    filter 1.0s var(--ease);
}

/* Fade+scale transition */
[data-transition="fade"] .slide.exit {
  transform: scale(1.04);
  filter: blur(4px);
  opacity: 0;
}
[data-transition="fade"] .slide.active {
  animation: fadeScaleIn 1.2s var(--ease) both;
}
@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.92); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0px); }
}

/* Rise + rotate transition */
[data-transition="rise"] .slide.exit {
  transform: translateY(60px) rotateX(4deg);
  filter: blur(5px);
  opacity: 0;
}
[data-transition="rise"] .slide.active {
  animation: riseRotateIn 1.2s var(--ease) both;
}
@keyframes riseRotateIn {
  from { opacity: 0; transform: translateY(50px) rotateX(4deg); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0px); }
}

/* Zoom transition */
[data-transition="zoom"] .slide.exit {
  transform: scale(0.85);
  filter: blur(8px);
  opacity: 0;
}
[data-transition="zoom"] .slide.active {
  animation: zoomIn 1.2s var(--ease) both;
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(1.15); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0px); }
}

/* Backward direction */
[data-direction="backward"] .slide.active {
  animation: slideFromLeft 1.1s var(--ease) both;
}
[data-direction="backward"] .slide.exit {
  transform: translateX(80px) scale(0.95);
  filter: blur(6px);
}
@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-60px) scale(0.97); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0px); }
}

/* ── Staggered element entry on active slides ── */
.slide.entering .slide-tag,
.slide.entering .slide-heading,
.slide.entering .slide-body,
.slide.entering .slide-sub-p,
.slide.entering .title-eyebrow,
.slide.entering .title-main,
.slide.entering .title-sub,
.slide.entering .title-cta,
.slide.entering .slide-footnote,
.slide.entering .launch-btn {
  opacity: 0;
  transform: translateY(25px);
  animation: staggerFadeUp 0.8s var(--ease) both;
}
.slide.entering .slide-tag,
.slide.entering .title-eyebrow      { animation-delay: 0.15s; }
.slide.entering .slide-heading,
.slide.entering .title-main          { animation-delay: 0.35s; }
.slide.entering .slide-body,
.slide.entering .title-sub            { animation-delay: 0.55s; }
.slide.entering .slide-footnote,
.slide.entering .title-cta,
.slide.entering .slide-sub-p          { animation-delay: 0.7s; }
.slide.entering .launch-btn           { animation-delay: 0.85s; }

@keyframes staggerFadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Staggered pop for cards ── */
.slide.entering .stat-card,
.slide.entering .pipeline-step,
.slide.entering .diag-step {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  animation: cardPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.slide.entering .stat-card:nth-child(1),
.slide.entering .pipeline-step:nth-child(1),
.slide.entering .diag-step:nth-child(1) { animation-delay: 0.6s; }
.slide.entering .stat-card:nth-child(2),
.slide.entering .pipeline-step:nth-child(3) { animation-delay: 0.75s; }
.slide.entering .stat-card:nth-child(3),
.slide.entering .pipeline-step:nth-child(5) { animation-delay: 0.9s; }
.slide.entering .pipeline-step:nth-child(7) { animation-delay: 1.05s; }
.slide.entering .diag-step:nth-child(3) { animation-delay: 0.75s; }
.slide.entering .diag-step:nth-child(5) { animation-delay: 0.9s; }

/* Connectors and arrows fade in */
.slide.entering .pipeline-connector,
.slide.entering .diag-arrow {
  opacity: 0;
  animation: staggerFadeUp 0.5s var(--ease) both;
  animation-delay: 0.7s;
}

@keyframes cardPop {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  70%  { transform: translateY(-4px) scale(1.03); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ══════════════════════════════════════════════════════════════
   SLIDE CONTENT — minimal modern typography
══════════════════════════════════════════════════════════════ */

.slide-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.slide-corner-label {
  position: absolute;
  bottom: 5rem;
  right: 7rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.2em;
  z-index: 2;
}

/* ─── Slide tag ───────────────────────────────────────────── */
.slide-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  opacity: 0.9;
}

/* ─── Slide 1 — Title ─────────────────────────────────────── */
.title-slide { max-width: 800px; }

.title-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.eyebrow-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: blinkDot 2.5s ease-in-out infinite;
}
@keyframes blinkDot {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.2; }
}

.title-main {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  color: #fff;
}

.title-main em {
  font-style: normal;
  color: var(--accent);
}

.title-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
  max-width: 380px;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.title-cta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.08em;
}
.title-cta kbd {
  display: inline-block;
  padding: 0.1em 0.4em;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
}

/* ─── Content slides — heading ────────────────────────────── */
.slide-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  color: #fff;
}

/* ─── Slide 2 — Two-col ───────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.col-text p {
  color: rgba(255,255,255,0.6);
  font-size: 0.93rem;
  line-height: 1.75;
  margin-bottom: 0.9rem;
  font-weight: 300;
}
.ocr-diagram {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.2rem;
  backdrop-filter: blur(8px);
}
.diag-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
}
.diag-icon { width: 32px; height: 32px; color: var(--accent); }
.diag-icon svg { width: 100%; height: 100%; }
.diag-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
  letter-spacing: 0.06em;
}
.diag-arrow { color: var(--accent); font-size: 1rem; opacity: 0.7; flex-shrink: 0; }

/* ─── Slide 3 — Stats ─────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}
.stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.2rem;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.stat-unit { font-size: 1.8rem; font-weight: 700; }
.stat-desc { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.5; }
.slide-footnote {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.28);
  font-style: italic;
  font-weight: 300;
}

/* ─── Slide 4 — Pipeline ──────────────────────────────────── */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.pipeline-step {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.2rem;
  backdrop-filter: blur(8px);
}
.pipeline-connector {
  width: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pipeline-connector::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), var(--accent), rgba(255,255,255,0.08));
}
.ps-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}
.ps-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #fff;
}
.ps-desc { font-size: 0.78rem; color: rgba(255,255,255,0.5); line-height: 1.5; }

/* ─── Slide 5 — Launch ────────────────────────────────────── */
.center-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 640px;
}
.launch-heading {
  font-size: clamp(2rem, 5vw, 4rem) !important;
  margin-bottom: 1.2rem;
}
.slide-sub-p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  font-weight: 300;
}
.launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  cursor: pointer;
  transition: var(--t);
  letter-spacing: 0.01em;
}
.launch-btn:hover { background: #d8ff50; transform: translateX(4px); }
.launch-btn svg { width: 16px; height: 16px; }


/* ─── Slide Navigation ────────────────────────────────────── */
.slide-nav {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(8,8,9,0.6);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  z-index: 100;
}
.slide-nav-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: var(--t);
}
.slide-nav-btn:hover { color: var(--accent); }
.slide-nav-btn svg { width: 16px; height: 16px; }
.slide-dots { display: flex; gap: 0.45rem; }
.slide-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: var(--t);
}
.slide-dot.active {
  background: var(--accent);
  transform: scale(1.5);
}


/* ══════════════════════════════════════════════════════════════
   TOOL INTERFACE
══════════════════════════════════════════════════════════════ */

.tool-interface {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: toolFadeIn 0.5s var(--ease) both;
  position: relative;
  overflow: hidden;
}
@keyframes toolFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Dashboard video background */
.dashboard-video-bg-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.dashboard-video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.dashboard-video-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(8,8,9,0.2) 0%, rgba(8,8,9,0.55) 100%),
    linear-gradient(180deg, rgba(8,8,9,0.35) 0%, rgba(8,8,9,0.1) 40%, rgba(8,8,9,0.45) 100%);
}

/* ─── Header ──────────────────────────────────────────────── */
.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  position: sticky;
  top: 0;
  z-index: 50;
}
.tool-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo-icon { width: 28px; height: 28px; color: var(--text-muted); }
.tool-header-actions { display: flex; align-items: center; gap: 1.25rem; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: var(--t);
}
.btn-ghost:hover { border-color: var(--border-mid); color: var(--text); }

.api-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background 0.4s;
  flex-shrink: 0;
}
.status-dot.active { background: var(--accent2); box-shadow: 0 0 5px var(--accent2); }
.status-dot.error  { background: var(--red); }

/* ─── Layout ──────────────────────────────────────────────── */
.tool-main {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 52px);
}
.panel { padding: 1.75rem; }
.panel-left {
  border-right: 1px solid var(--border);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}
.panel-right { background: transparent; overflow-y: auto; position: relative; z-index: 1; }

.panel-section {
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.panel-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}

/* ─── Engine Status Card ──────────────────────────────────── */
.key-status-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.3s;
}
.key-status-card--ready {
  border-color: rgba(74,240,200,0.25);
  background: var(--accent2-dim);
}
.key-status-card--error {
  border-color: rgba(224,85,85,0.25);
  background: rgba(224,85,85,0.05);
}
.ks-spinner {
  width: 12px; height: 12px; flex-shrink: 0;
  border: 1.5px solid var(--border-mid);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.ks-text { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.key-status-card--ready .ks-text { color: var(--accent2); }
.key-status-card--error .ks-text { color: var(--red); }

/* ─── Drop Zone ───────────────────────────────────────────── */
.drop-zone {
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--t);
  background: var(--bg-card);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.drop-zone-inner { pointer-events: none; }
.drop-icon { width: 40px; height: 40px; margin: 0 auto 0.85rem; color: var(--text-dim); display: block; }
.drop-zone:hover .drop-icon, .drop-zone.drag-over .drop-icon { color: var(--accent); }
.drop-primary { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.2rem; }
.drop-secondary { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.drop-link { color: var(--accent); text-decoration: underline; cursor: pointer; }
.drop-limit { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-dim); letter-spacing: 0.06em; }

/* ─── File Info ───────────────────────────────────────────── */
.file-info {
  display: flex; align-items: center; gap: 0.65rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 0.9rem; margin-top: 0.85rem;
}
.file-info-icon { font-size: 1.3rem; flex-shrink: 0; }
.file-info-text { flex: 1; min-width: 0; }
.file-name { font-size: 0.82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); margin-top: 0.1rem; }
.file-remove {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 4px; width: 22px; height: 22px; cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: var(--t);
}
.file-remove:hover { border-color: var(--red); color: var(--red); }

/* ─── Batch Plan ──────────────────────────────────────────── */
.batch-info {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.batch-row { display: flex; align-items: center; justify-content: space-between; }
.batch-key-label {
  display: flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted);
}
.batch-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.batch-dot--1 { background: var(--accent); }
.batch-dot--2 { background: var(--accent2); }
.batch-pages { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text); }
.batch-note {
  font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-dim);
  padding-top: 0.4rem; border-top: 1px solid var(--border); letter-spacing: 0.04em;
}

/* ─── Primary Button ──────────────────────────────────────── */
.btn-primary {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 0.65rem; background: var(--accent); color: #0a0a0a;
  border: none; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 700; font-size: 0.88rem;
  padding: 0.8rem 1.25rem; cursor: pointer; transition: var(--t);
}
.btn-primary:hover:not(:disabled) { background: #d8ff50; }
.btn-primary:disabled { opacity: 0.25; cursor: not-allowed; }
.btn-primary svg { width: 16px; height: 16px; }


/* ══════════════════════════════════════════════════════════════
   RIGHT PANEL — STATES
══════════════════════════════════════════════════════════════ */

.state-panel {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  animation: panelIn 0.35s var(--ease) both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Idle ────────────────────────────────────────────────── */
#stateIdle {
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem;
}
.idle-illustration { margin-bottom: 1.75rem; }
.idle-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 6px;
  width: 100px;
  margin: 0 auto;
}
.ig-cell {
  width: 28px; height: 28px; border-radius: 5px;
  background: var(--bg-card); border: 1px solid var(--border);
  animation: cellGlow 2.8s ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes cellGlow {
  0%,100% { background: var(--bg-card); border-color: var(--border); }
  50%      { background: var(--accent-dim); border-color: rgba(200,240,74,0.3); }
}
.idle-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 0.4rem; }
.idle-desc { color: var(--text-muted); font-size: 0.85rem; max-width: 280px; }

/* ─── Processing — Dominant Center Animation ─────────────── */
#stateProcessing {
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.proc-visual {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 2rem;
}

/* Outer rotating ring */
.proc-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-right-color: var(--accent2);
  border-radius: 50%;
  animation: procSpin 3s linear infinite;
}
.proc-ring-inner {
  position: absolute;
  inset: 20px;
  border: 1.5px dashed var(--border-mid);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: procSpin 5s linear infinite reverse;
}
.proc-ring-core {
  position: absolute;
  inset: 45px;
  border: 1px solid var(--border);
  border-bottom-color: var(--accent);
  border-radius: 50%;
  animation: procSpin 2s linear infinite;
}

@keyframes procSpin { to { transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Orbiting particles */
.proc-particle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  top: 50%; left: 50%;
}
.proc-particle:nth-child(1) {
  background: var(--accent);
  animation: orbit1 2.5s linear infinite;
  box-shadow: 0 0 12px var(--accent);
}
.proc-particle:nth-child(2) {
  background: var(--accent2);
  animation: orbit2 3.2s linear infinite;
  box-shadow: 0 0 12px var(--accent2);
  width: 6px; height: 6px;
}
.proc-particle:nth-child(3) {
  background: var(--accent);
  animation: orbit3 4s linear infinite;
  box-shadow: 0 0 10px var(--accent);
  width: 5px; height: 5px;
  opacity: 0.7;
}

@keyframes orbit1 {
  0%   { transform: translate(-50%,-50%) rotate(0deg)   translateX(80px) scale(1); }
  50%  { transform: translate(-50%,-50%) rotate(180deg) translateX(80px) scale(1.4); }
  100% { transform: translate(-50%,-50%) rotate(360deg) translateX(80px) scale(1); }
}
@keyframes orbit2 {
  0%   { transform: translate(-50%,-50%) rotate(120deg)  translateX(60px) scale(1); }
  50%  { transform: translate(-50%,-50%) rotate(300deg)  translateX(60px) scale(1.3); }
  100% { transform: translate(-50%,-50%) rotate(480deg)  translateX(60px) scale(1); }
}
@keyframes orbit3 {
  0%   { transform: translate(-50%,-50%) rotate(240deg)  translateX(100px) scale(1); }
  50%  { transform: translate(-50%,-50%) rotate(420deg)  translateX(100px) scale(0.6); }
  100% { transform: translate(-50%,-50%) rotate(600deg)  translateX(100px) scale(1); }
}

/* Center glow */
.proc-center-glow {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse {
  0%,100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
  50%     { opacity: 1; transform: translate(-50%,-50%) scale(1.5); }
}

/* Phase text under animation */
.proc-phase-text {
  text-align: center;
  margin-bottom: 2rem;
}
.proc-phase {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.proc-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Progress bar — prominent */
.progress-section {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.progress-bar-wrap {
  height: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  transition: width 0.5s var(--ease);
  box-shadow: 0 0 12px rgba(200,240,74,0.3);
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.progress-pct {
  color: var(--accent);
  font-weight: 700;
}

/* ─── Results ─────────────────────────────────────────────── */
.results-header {
  display: flex; align-items: center; gap: 1rem;
  padding-bottom: 1.4rem; border-bottom: 1px solid var(--border);
}
.results-badge {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent2-dim); border: 1px solid rgba(74,240,200,0.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--accent2);
}
.results-badge svg { width: 18px; height: 18px; }
.results-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.15rem; }
.results-meta { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); }

.results-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.btn-action {
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); font-family: var(--font-body); font-size: 0.8rem;
  padding: 0.65rem 0.9rem; cursor: pointer; transition: var(--t); white-space: nowrap;
}
.btn-action svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-action:hover { border-color: var(--border-bright); background: var(--bg-hover); }
.btn-action--accent { background: var(--accent-dim); border-color: rgba(200,240,74,0.25); color: var(--accent); }
.btn-action--accent:hover { background: rgba(200,240,74,0.14); }

/* Preview */
.preview-section { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.preview-label {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-dim); padding: 0.65rem 1rem;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
}
.preview-scroll {
  max-height: 300px; overflow-y: auto; padding: 1.1rem;
  font-family: var(--font-mono); font-size: 0.74rem;
  line-height: 1.8; color: #d0d0e0; white-space: pre-wrap; background: #060608;
}

/* Summary */
.summary-section {
  border: 1px solid rgba(200,240,74,0.2);
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--accent-dim);
}
.summary-label {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); padding: 0.65rem 1rem;
  background: rgba(200,240,74,0.05); border-bottom: 1px solid rgba(200,240,74,0.12);
  display: flex; align-items: center; gap: 0.65rem;
}
.summary-spinner {
  width: 12px; height: 12px;
  border: 1.5px solid rgba(200,240,74,0.2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.summary-content {
  padding: 1.1rem; font-size: 0.85rem; line-height: 1.75;
  color: #e0e0f0;
  background: rgba(10,10,14,0.6);
  max-height: 300px; overflow-y: auto;
}
.summary-content p { margin-bottom: 0.8rem; }
.summary-content p:last-child { margin-bottom: 0; }
.summary-content ul, .summary-content ol { margin-left: 1.5rem; margin-bottom: 0.8rem; }
.summary-content li { margin-bottom: 0.3rem; }
.summary-content strong { color: #fff; font-weight: 700; }
.summary-content code {
  background: rgba(255,255,255,0.1);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}
.results-footer { padding-top: 0.4rem; border-top: 1px solid var(--border); }

/* ─── Aurora Glow — Processing State ─────────────────────── */
.aurora-glow {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
  background:
    radial-gradient(ellipse 45% 30% at 0% 0%,    rgba(80, 140, 255, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 45% 30% at 100% 0%,   rgba(120, 80, 255, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 45% 30% at 100% 100%,  rgba(60, 180, 255, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 45% 30% at 0% 100%,    rgba(100, 100, 255, 0.20) 0%, transparent 65%);
  animation: auroraPulse 4s ease-in-out infinite;
  /* Only visible when .active is added by JS */
}

.aurora-glow.active {
  opacity: 1;
}

@keyframes auroraPulse {
  0%, 100% {
    background:
      radial-gradient(ellipse 45% 30% at 0% 0%,    rgba(80,  140, 255, 0.22) 0%, transparent 65%),
      radial-gradient(ellipse 45% 30% at 100% 0%,   rgba(120, 80,  255, 0.18) 0%, transparent 65%),
      radial-gradient(ellipse 45% 30% at 100% 100%,  rgba(60,  180, 255, 0.18) 0%, transparent 65%),
      radial-gradient(ellipse 45% 30% at 0% 100%,    rgba(100, 100, 255, 0.20) 0%, transparent 65%);
  }
  33% {
    background:
      radial-gradient(ellipse 55% 38% at 0% 0%,    rgba(100, 160, 255, 0.28) 0%, transparent 65%),
      radial-gradient(ellipse 40% 25% at 100% 0%,   rgba(140, 60,  255, 0.15) 0%, transparent 65%),
      radial-gradient(ellipse 50% 34% at 100% 100%,  rgba(80,  200, 255, 0.22) 0%, transparent 65%),
      radial-gradient(ellipse 55% 36% at 0% 100%,    rgba(80,  80,  255, 0.25) 0%, transparent 65%);
  }
  66% {
    background:
      radial-gradient(ellipse 40% 25% at 0% 0%,    rgba(60,  120, 255, 0.16) 0%, transparent 65%),
      radial-gradient(ellipse 55% 38% at 100% 0%,   rgba(150, 100, 255, 0.25) 0%, transparent 65%),
      radial-gradient(ellipse 55% 38% at 100% 100%,  rgba(40,  160, 255, 0.22) 0%, transparent 65%),
      radial-gradient(ellipse 40% 25% at 0% 100%,    rgba(120, 120, 255, 0.15) 0%, transparent 65%);
  }
}


.error-log {
  position: fixed; bottom: 1.25rem; right: 1.25rem; max-width: 420px;
  background: #160909; border: 1px solid rgba(224,85,85,0.4);
  border-radius: var(--radius); padding: 0.75rem 1rem; z-index: 999;
  animation: panelIn 0.3s var(--ease) both;
}
.error-log-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--red); letter-spacing: 0.12em; margin-bottom: 0.3rem; text-transform: uppercase; }
.error-log-msg { font-family: var(--font-mono); font-size: 0.74rem; color: #e8a0a0; line-height: 1.5; word-break: break-word; }

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 999px; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .tool-main { grid-template-columns: 1fr; }
  .panel-left { border-right: none; border-bottom: 1px solid var(--border); }
  .slide { padding: 3rem 2.5rem 5rem; }
  .two-col { grid-template-columns: 1fr; gap: 1.75rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .pipeline { flex-direction: column; }
  .pipeline-connector { width: 1px; height: 1.2rem; align-self: center; }
  .pipeline-connector::after { width: 1px; height: 100%; background: linear-gradient(180deg, rgba(255,255,255,0.08), var(--accent), rgba(255,255,255,0.08)); }
  .results-actions { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .slide { padding: 2rem 1.5rem 5rem; }
  .title-main { font-size: clamp(2rem, 10vw, 3.5rem); }
}
