:root{
  --ink:#0b1220;
  --muted:#5b6475;
  --line: rgba(15,23,42,.10);

  --blue:#2563eb;
  --blue2:#60a5fa;
  --cyan:#22d3ee;

  --card: rgba(255,255,255,.90);
  --soft: rgba(248,250,252,.85);

  --shadow: 0 24px 80px rgba(2, 6, 23, .10);
  --shadow2: 0 18px 50px rgba(2, 6, 23, .12);
  --r: 22px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--ink);
  background: #fff;
  overflow-x:hidden;
}

/* ---------------- Background ---------------- */
.bg{ position:fixed; inset:0; pointer-events:none; z-index:-1; }
.orb{
  position:absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(40px);
  opacity:.18;
}
.orb-a{ left:-160px; top:-180px; background: radial-gradient(circle at 30% 30%, var(--blue2), transparent 60%); }
.orb-b{ right:-190px; top:40px; background: radial-gradient(circle at 30% 30%, var(--cyan), transparent 60%); }
.grid{
  position:absolute; inset:-2px;
  background-image:
    linear-gradient(to right, rgba(2,6,23,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(2,6,23,.06) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 0%, rgba(0,0,0,.75), transparent 65%);
  opacity:.25;
}

/* ---------------- Topbar (Fix Option A) ---------------- */
.topbar{
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 18px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height: 72px;
}

.brand{
  display:flex;
  align-items:center;
}

.logo{
  width:225px;   /* Increase size now that text is gone */
  height:auto;
}

.logo img{
  width:100%;
  height:auto;
  object-fit:contain;
  display:block;
}

.logo img:hover{
  transform: scale(1.05);
  opacity: .92;
}

.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-name{ font-weight: 900; letter-spacing: -.2px; font-size: 18px; }
.brand-sub{ font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------------- Buttons ---------------- */
.actions{ display:flex; gap:10px; align-items:center; }
.btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.8);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover{ box-shadow: 0 14px 30px rgba(2,6,23,.08); }
.btn:active{ transform: scale(.98); }

.btn.ghost:hover{
  background: rgba(248,250,252,.95);
  border-color: rgba(37,99,235,.22);
}

.btn.primary{
  border: 1px solid rgba(37,99,235,.32);
  background: linear-gradient(180deg, rgba(37,99,235,.95), rgba(37,99,235,.86));
  color: #fff;
}
.btn.primary:hover{ box-shadow: 0 18px 42px rgba(37,99,235,.20); }

.btn.danger{
  border: 1px solid rgba(239,68,68,.25);
  background: rgba(239,68,68,.12);
  color: rgba(127,29,29,.98);
}

.btn:disabled{ opacity:.45; cursor:not-allowed; box-shadow:none !important; }

/* ---------------- Main panel ---------------- */
.wrap{
  max-width:1120px;
  margin: 0 auto;
  padding: 24px 18px 70px;
}

.panel{
  border-radius: var(--r);
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: var(--shadow);
  overflow:hidden;
}

/* ---------------- Hero ---------------- */
.hero{ padding: 28px 26px 8px; }

.badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,.18);
  background: rgba(37,99,235,.06);
  color: rgba(2,6,23,.80);
  font-size: 12.5px;
}

.pulse{
  width:8px; height:8px; border-radius:999px;
  background: rgba(37,99,235,.95);
  box-shadow: 0 0 0 0 rgba(37,99,235,.35);
  animation: pulse 1.6s ease infinite;
}

@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(37,99,235,.35); }
  70%{ box-shadow: 0 0 0 10px rgba(37,99,235,0); }
  100%{ box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

.hero h1{
  margin: 14px 0 0;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -1px;
}
.hero p{
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 780px;
}

kbd{
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 7px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  box-shadow: 0 1px 0 rgba(2,6,23,.06);
}

/* ---------------- Cards ---------------- */
.single{ padding: 14px 14px 18px; }

.card{
  border-radius: 20px;
  background: var(--card);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: var(--shadow2);
  overflow:hidden;
}

.card-right{ position:relative; }

.card-head{
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}

.card-title{ font-weight: 900; letter-spacing: -.2px; }
.card-mini{ font-size: 12.5px; color: var(--muted); }

.tag{
  font-size:12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.90);
}

.head-actions{ display:flex; gap:10px; align-items:center; }

/* ---------------- Dropzone ---------------- */
.dropzone{
  margin: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(37,99,235,.35);
  background:
    radial-gradient(900px 240px at 20% 0%, rgba(96,165,250,.18), transparent 60%),
    radial-gradient(900px 260px at 100% 30%, rgba(34,211,238,.12), transparent 55%),
    #fff;
  min-height: 250px;
  outline:none;
  cursor:text;
  position:relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dropzone:hover{
  box-shadow: 0 18px 40px rgba(37,99,235,.12);
  transform: translateY(-1px);
}
.dropzone:focus{
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12), 0 18px 40px rgba(37,99,235,.12);
}
.dropzone.dragover{
  border-color: rgba(34,211,238,.65);
  box-shadow: 0 0 0 4px rgba(34,211,238,.14), 0 18px 40px rgba(34,211,238,.10);
}

.dz-inner{ display:flex; gap:14px; align-items:flex-start; padding: 18px; }
.dz-icon{
  width: 52px; height: 52px;
  border-radius: 18px;
  display:flex; align-items:center; justify-content:center;
  border: 1px solid rgba(37,99,235,.20);
  background: rgba(37,99,235,.07);
  color: var(--blue);
}
.dz-icon svg{ width: 24px; height: 24px; }
.dz-title{ font-weight: 950; }
.dz-sub{
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13.5px;
  max-width: 520px;
}
.dz-chips{ margin-top: 12px; display:flex; flex-wrap:wrap; gap:8px; }

.chip{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.90);
}
.chip.soft{
  background: rgba(248,250,252,.9);
  color: rgba(2,6,23,.75);
}

/* hidden paste catcher */
.paste-catcher{
  position:absolute;
  inset:0;
  opacity:0;
  width:100%;
  height:100%;
  border:0;
  resize:none;
  outline:none;
  background:transparent;
  color:transparent;
  caret-color:transparent;
}

/* hints */
.hint-row{
  padding: 0 16px 16px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.hint-item{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--muted);
  font-size: 12.8px;
  background: rgba(248,250,252,.75);
  border: 1px solid rgba(15,23,42,.08);
  padding: 10px 12px;
  border-radius: 14px;
}
.hint-item .dot{
  width:8px; height:8px; border-radius:999px;
  background: rgba(37,99,235,.65);
}

/* ---------------- Workflow ---------------- */
.workflow{ padding: 18px 16px 16px; }

.big-status{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding: 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(37,99,235,.16);
  background: radial-gradient(900px 180px at 20% 0%, rgba(96,165,250,.18), transparent 60%), rgba(255,255,255,.92);
  box-shadow: 0 14px 40px rgba(37,99,235,.10);
}

.live-dot{
  margin-top: 8px;
  width: 12px; height: 12px; border-radius: 999px;
  background: rgba(37,99,235,.95);
  box-shadow: 0 0 0 0 rgba(37,99,235,.35);
  animation: pulse 1.4s ease infinite;
}

.big-title{
  font-weight: 1000;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.4px;
}

.big-sub{
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* Big progress */
.big-progress{ margin-top: 14px; }
.big-bar-track{
  height: 18px;
  border-radius: 999px;
  background: rgba(15,23,42,.10);
  position:relative;
  overflow:hidden;
}
.big-bar{
  position:absolute; inset:0 auto 0 0;
  width:0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37,99,235,.95), rgba(34,211,238,.90));
  transition: width .30s ease;
}
.big-bar-glow{
  position:absolute;
  top:-70px;
  width: 220px; height: 150px;
  filter: blur(26px);
  opacity:.38;
  background: radial-gradient(circle at 50% 50%, rgba(96,165,250,.95) 0%, rgba(96,165,250,0) 60%);
  transform: translateX(-240px);
  transition: transform .30s ease;
  pointer-events:none;
}

.big-meta{
  margin-top: 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.pct{
  font-size: 24px;
  font-weight: 1000;
  letter-spacing: -.5px;
}
.meta-right{ display:flex; align-items:center; gap:10px; }
.pill{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
}
.eta{ color: var(--muted); font-size: 13.5px; }

/* Attention cards */
.attention{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width:980px){ .attention{ grid-template-columns: 1fr; } }

.flash-card{
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.92);
  padding: 14px 14px;
  box-shadow: 0 14px 40px rgba(2,6,23,.06);
  transform: translateY(0);
  animation: floaty 2.4s ease-in-out infinite;
}
#flashB{ animation-delay: .35s; }
#flashC{ animation-delay: .7s; }

@keyframes floaty{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-4px); }
}

.flash-h{ font-size: 12.5px; color: var(--muted); font-weight: 800; }
.flash-v{
  margin-top: 8px;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.2px;
}

/* Live feed */
.feed-wrap{ margin-top: 14px; }
.feed-title{ font-weight: 900; font-size: 13px; color: rgba(2,6,23,.78); margin-bottom: 10px; }
.feed{
  max-height: 220px;
  overflow:auto;
  display:grid;
  gap: 10px;
  padding-right: 2px;
}
.feed-item{
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.92);
  animation: slideIn .25s ease both;
}
@keyframes slideIn{
  from{opacity:0; transform: translateY(-6px);}
  to{opacity:1; transform: translateY(0);}
}
.feed-main{ font-weight: 950; font-size: 15.5px; }
.feed-sub{ margin-top: 3px; color: var(--muted); font-size: 12.8px; line-height: 1.4; }
.feed time{ display:block; margin-top: 6px; color: rgba(2,6,23,.55); font-size: 12px; }

/* Preview */
.preview-wrap{ margin-top: 12px; color: var(--muted); }
.preview-wrap summary{ cursor:pointer; user-select:none; font-size: 13px; }
.preview{
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.45;
  max-height: 180px;
  overflow:auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------------- Takeover logic ---------------- */
.hidden{ display:none !important; }
body.takeover #pasteOnly{ display:none !important; }
body.takeover #flowOnly{ display:block !important; }
body.takeover .hero h1{ font-size: 46px; }

/* ---------------- Footer ---------------- */
.footer{
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 12.5px;
}

/* confetti canvas (safe even if unused) */
.confetti{
  position:absolute;
  inset: 0;
  pointer-events:none;
  border-radius: 20px;
}