.ai-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
}
.ai-actions .small-note {
  margin: 0;
}

/* Progress bar for local deep analysis */
.progress {
  position: relative;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0 16px;
}
.progress-bar {
  height: 8px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 6px;
  transition: width 0.25s ease;
}
.progress-label {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}
/*!
 * Copyright (c) 2025 Privify Inc.
 * Licensed under the MIT License.
 */
:root {
  --bg: #0b0d12;
  --card: #131921;
  --muted: #8892a0;
  --text: #f4f7fa;
  --accent: #ff4d4d;
  --accent-alt: #ff6d6d;
  --ring: rgba(255,77,77,0.35);
}
html { background: var(--bg); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; padding: 32px 0; line-height: 1.55; color: var(--text); background: linear-gradient(120deg, #10151d 0%, #0b0d12 60%), radial-gradient(900px 500px at 15% 0%, rgba(255,77,77,0.08), transparent 70%) no-repeat, var(--bg); overflow-x: hidden }
h1 { font-size: 24px; margin: 0; letter-spacing:.3px; font-weight:600 }
.headerbar { display:flex; align-items:center; justify-content:center; flex-direction: column; gap:2px; margin: 0 0 18px 0; padding-top: 8px; text-align:center }
.headerbar h1 { text-align:center }
.headerbar .privacy-note { text-align:center; margin: 0 }
.full-bleed { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw }
/* legacy privify-bar no longer used after header adoption */
.brand { display:flex; align-items:center; gap:10px }
.privify-logo { height:28px; width:auto; display:block }
.privify-name { font-size:18px; font-weight:800; letter-spacing:.08em; color:#111; font-family: inherit }
.privacy-note { flex:1; text-align:center; font-size:13px; color: var(--muted); font-weight:500 }
.muted-title { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 2rem }
.wrap { padding-top: 96px }
.panel { border: 1px solid rgba(255,77,77,0.25); padding: 20px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,77,77,0.06), rgba(255,77,77,0.02)); box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05); backdrop-filter: blur(6px) }
.main-layout { display:grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: start }
.image-area { display:flex; flex-direction: column; align-items: center }
.image-area.centered { justify-content: center; min-height: 360px }
.image-area.align-bottom { justify-content: flex-end; min-height: 360px }
.center-note { text-align:center }
.prominent { margin-top: 10px; width: fit-content }
.visually-hidden { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,1px,1px); white-space:nowrap; border:0 }
.hidden { display:none !important }
.top-actions { display:flex; gap:8px; align-items:center; margin-bottom:12px; flex-wrap:wrap }
.row { display: flex; gap: 16px; align-items: start; flex-wrap: wrap }
.left { min-width: 240px; max-width: 340px }
img.preview { max-width: 340px; max-height: 340px; display:block; border-radius:10px; margin-top:8px; box-shadow: 0 6px 18px rgba(0,0,0,0.35) }
pre { background: rgba(255,255,255,0.06); padding: 12px; border-radius:10px; overflow:auto; max-height:420px; border:1px solid rgba(255,255,255,0.06) }
button { padding: 9px 12px; border-radius:10px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); color: var(--text); cursor:pointer; transition: .15s ease; backdrop-filter: blur(4px) }
button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.35) }
.btn-primary { background: linear-gradient(180deg, var(--accent), var(--accent-alt)); color: #1a1e24; border-color: var(--accent-alt); font-weight: 600; padding: 12px 18px; font-size:14px }
.btn-primary:hover { box-shadow: 0 10px 22px rgba(255,77,77,0.45) }
.muted { color: var(--muted); font-size:13px }
.small-note { font-size: 12px; margin-top: 6px }
.flex { display:flex; gap:8px; align-items:center; flex-wrap:wrap }
a.link { color: var(--accent); text-decoration:none; font-weight:500 }
.field { margin:8px 0 }
input[type="file"] { display:block }
.actions { margin-top:12px }
.dropzone { margin-top:14px; padding:16px; border:1px solid rgba(255,77,77,0.45); border-radius:16px; background: linear-gradient(180deg, rgba(255,77,77,0.12), rgba(255,77,77,0.05)); transition: .15s ease; font-weight:500 }
.dropzone.active { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring) }
.story { margin-top: 8px; padding: 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,77,77,0.12), rgba(255,77,77,0.05)); border: 1px solid rgba(255,77,77,0.45) }
.right-area { display:flex; flex-direction: column; align-items: stretch }
.main-layout { display:grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: start }
.v-sep { width:1px; background: rgba(255,77,77,0.35); height:100%; margin-top:14px; margin-left:18px; margin-right:18px }
.h-sep { height:1px; background: rgba(255,77,77,0.35); margin: 16px 0; border: 0 }
.zip-section { margin-top: 16px; display:flex; flex-direction: column; align-items: center }
.zip-section .field { text-align: center }
.zip-section .dropzone { max-width: 340px; width: 100%; text-align: center }
.cta-row { display:flex; justify-content:center; margin-top: 32px; margin-bottom:12px }
.badge { font-size: 12px; color: var(--muted); background: rgba(255,77,77,0.10); border:1px solid rgba(255,77,77,0.30); padding: 4px 8px; border-radius: 999px }
/* analysis lines inside story */
.analysis-lines { white-space: pre-wrap; font-size: 13px; color: var(--muted); margin-top: 8px }
.important-inline { margin-top: 8px; color: var(--muted); font-size: 13px }
.meta-row { display:grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; align-items:start }
.bottom-cta-row { display:flex; justify-content:center; margin-top: 16px }
.meta-panel { min-width: 0 }
.meta-panel .meta-header { display:flex; align-items:center; justify-content: space-between; gap: 10px }
.meta-panel .meta-header .field { margin: 8px 0 }
.toggle-btn { line-height: 1; width: 28px; height: 28px; display:inline-flex; align-items:center; justify-content:center; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: var(--text); font-weight: 700; font-size: 16px; padding: 0 }
.toggle-btn:hover { background: rgba(255,255,255,0.12) }
.toggle-btn:focus { outline: 2px solid var(--ring); outline-offset: 2px }
.bottom-actions { margin-top: 10px }
.site-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 0 8px }
@media (max-width: 800px) {
  body { padding: 20px }
  h1 { font-size: 21px }
  .main-layout { grid-template-columns: 1fr }
  .main-layout { align-items: start }
  .v-sep { display:none }
  .image-area { align-items: stretch }
  .image-area.centered, .image-area.align-bottom { min-height: 240px }
  img.preview { max-width: 100%; height: auto; margin-left:auto; margin-right:auto }
  .meta-row { grid-template-columns: 1fr }
  .bottom-cta-row { margin-top: 12px }
  .left-card, .main-layout .story { min-height: 0; height: auto }
}

/* --- Header (match index2 top white bar) --- */
.header { position: fixed; top: 0; left: 0; right: 0; padding: 1.5rem 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 1000; transition: all 0.3s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif }
.header.scrolled { padding: 1rem 0; background: rgba(255, 255, 255, 0.98); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 2 }
nav { display: flex; justify-content: space-between; align-items: center }
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: #000; font-weight: 700; font-size: 1.5rem; margin-left: 1.5rem }
.logo img { height: 36px; width: auto }
.nav-links { display: flex; align-items: center; gap: 3rem }
.nav-link { color: #4B5563; text-decoration: none; font-weight: 500; transition: color 0.2s ease }
.nav-link:hover { color: #000 }
.nav-cta { background: #000; color: #fff; padding: 0.625rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all 0.2s ease }
.nav-cta:hover { background: #111827; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) }
.mobile-menu-btn { display: none; background: none; border: none; color: #000; cursor: pointer; padding: 0.5rem }
@media (max-width: 768px) {
  .nav-links { display: none }
  .mobile-menu-btn { display: block }
}

/* --- Modal (custom popup) --- */
.modal { position: fixed; inset: 0; z-index: 2000; display: none }
.modal:not(.hidden) { display: block }
.modal .modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5) }
.modal .modal-content { position: relative; max-width: 440px; margin: 10vh auto; background: var(--card); border: 1px solid rgba(255,77,77,0.35); border-radius: 14px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,0.5) }
.modal .modal-title { margin: 0 0 8px 0; font-weight: 600 }
.modal .modal-message { color: var(--text); opacity: 0.9; margin-bottom: 12px }
.modal .modal-actions { display: flex; justify-content: flex-end }
