/* ============================================================
   NEXO Coverage Assistant
   Warm editorial fintech aesthetic
   Display: Fraunces  /  UI: Geist
   ============================================================ */

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

:root {
  /* Brand accent (refined azure to indigo) */
  --accent: #2D6BFF;
  --accent-deep: #1B4FE0;
  --accent-indigo: #4F5BFF;
  --accent-grad: linear-gradient(135deg, #2D6BFF 0%, #4F5BFF 100%);
  --accent-glow: rgba(45,107,255,0.40);
  --accent-soft: rgba(45,107,255,0.07);
  --accent-soft-2: rgba(45,107,255,0.12);
  --accent-border: rgba(45,107,255,0.22);

  /* Warm paper neutrals (light theme) */
  --paper: #F4F2EC;
  --surface: #FFFFFF;
  --surface-2: #FAF8F3;
  --line: #E6E2D8;
  --line-soft: rgba(26,22,16,0.06);

  /* Warm ink scale */
  --ink: #1B1813;
  --ink-2: #45403A;
  --ink-3: #6E685E;
  --ink-4: #A09A8E;

  /* Semantics */
  --emerald: #0E9F6E;
  --emerald-soft: rgba(14,159,110,0.08);
  --emerald-border: rgba(14,159,110,0.24);
  --amber: #B4710C;
  --amber-soft: rgba(180,113,12,0.09);
  --amber-border: rgba(180,113,12,0.24);

  /* Night (hero) */
  --night: #07080E;

  /* Shadows (warm, layered) */
  --sh-xs: 0 1px 2px rgba(26,22,16,0.05);
  --sh-sm: 0 1px 2px rgba(26,22,16,0.05), 0 2px 8px rgba(26,22,16,0.04);
  --sh-md: 0 6px 18px rgba(26,22,16,0.07), 0 2px 6px rgba(26,22,16,0.05);
  --sh-lg: 0 24px 60px rgba(26,22,16,0.14);

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft-2); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.serif { font-family: 'Fraunces', Georgia, serif; }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh; min-height: 100svh;
  position: relative; display: flex; flex-direction: column;
  overflow: hidden; background: var(--night);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0.42; filter: saturate(0.9) contrast(1.05);
  transform: scale(1.06); animation: heroPan 26s ease-in-out infinite alternate;
}
@keyframes heroPan { from { transform: scale(1.06) translateY(0); } to { transform: scale(1.12) translateY(-2%); } }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(7,8,14,0.10) 0%, rgba(7,8,14,0.55) 55%, rgba(7,8,14,0.92) 100%),
    linear-gradient(180deg, rgba(7,8,14,0.45) 0%, rgba(7,8,14,0.20) 38%, rgba(7,8,14,0.85) 100%);
}
/* aurora glows */
.hero-aura { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-aura span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.hero-aura .a1 { width: 460px; height: 460px; left: -80px; top: 8%; background: radial-gradient(circle, var(--accent-glow), transparent 70%); animation: drift 18s ease-in-out infinite alternate; }
.hero-aura .a2 { width: 520px; height: 520px; right: -120px; bottom: -6%; background: radial-gradient(circle, rgba(79,91,255,0.32), transparent 70%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(40px,-30px); } }
.hero-grain { position: absolute; inset: 0; z-index: 1; background-image: var(--grain); background-size: 200px; opacity: 0.05; mix-blend-mode: overlay; pointer-events: none; }

.hero-nav {
  position: relative; z-index: 3; display: flex; align-items: center;
  justify-content: space-between; padding: 22px 40px;
}
.hero-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 21px; font-weight: 800; color: #fff;
  letter-spacing: -0.04em;
}
.hero-logo .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent-grad);
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
  color: #fff; box-shadow: 0 4px 16px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.3);
}
.hero-links { display: flex; align-items: center; gap: 26px; }
.hero-links a { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.66); text-decoration: none; transition: color 0.2s; }
.hero-links a:hover { color: #fff; }
.hero-nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-btn { font-family: 'Geist', sans-serif; font-size: 13px; font-weight: 600; border-radius: 11px; padding: 10px 20px; cursor: pointer; transition: all 0.2s; border: none; }
.nav-btn.outline { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: #fff; backdrop-filter: blur(10px); }
.nav-btn.outline:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }
.nav-btn.primary { background: #fff; color: var(--ink); }
.nav-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }

.hero-content {
  position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 0 24px 90px; text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px;
  padding: 7px 14px 7px 8px; border-radius: 100px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px); font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.86); letter-spacing: 0.01em;
  animation: rise 0.7s 0.05s both;
}
.hero-eyebrow .pill { background: var(--accent-grad); color: #fff; font-weight: 700; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 100px; }
.hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(42px, 6vw, 78px); font-weight: 400; line-height: 1.02;
  letter-spacing: -0.025em; color: #fff; margin-bottom: 20px; max-width: 760px;
  animation: rise 0.8s 0.12s both;
}
.hero-title b { font-weight: 600; font-style: normal; }
.hero-title .accent {
  background: linear-gradient(120deg, #8FB3FF, #C9CFFF); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6; color: rgba(255,255,255,0.72);
  max-width: 540px; margin-bottom: 38px; font-weight: 400;
  animation: rise 0.8s 0.2s both;
}

.hero-glass {
  width: 100%; max-width: 640px; position: relative;
  background: rgba(255,255,255,0.07); backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.16); border-radius: var(--r-lg);
  padding: 8px; box-shadow: 0 30px 80px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.18);
  animation: rise 0.8s 0.28s both;
}
.hero-glass::before {
  content: ''; position: absolute; inset: -1px; border-radius: var(--r-lg); padding: 1px;
  background: linear-gradient(140deg, rgba(143,179,255,0.6), transparent 40%, transparent 60%, rgba(79,91,255,0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: 0.7;
}
.glass-input-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; }
.glass-spark { flex-shrink: 0; color: rgba(255,255,255,0.55); display: grid; place-items: center; }
.glass-spark svg { width: 18px; height: 18px; }
.hero-input-field { flex: 1; font-size: 15.5px; color: #fff; line-height: 1.5; text-align: left; min-height: 22px; }
.hero-placeholder { color: rgba(255,255,255,0.42); }
.cursor-pulse { display: none; width: 2px; height: 19px; background: #8FB3FF; margin-left: 1px; vertical-align: middle; border-radius: 2px; animation: cpulse 0.9s step-end infinite; }
@keyframes cpulse { 0%,100%{opacity:1} 50%{opacity:0} }
.hero-send {
  width: 42px; height: 42px; border: none; background: var(--accent-grad); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  opacity: 0.3; pointer-events: none; transition: opacity 0.25s, transform 0.18s, box-shadow 0.25s;
}
.hero-send.ready { opacity: 1; pointer-events: auto; box-shadow: 0 8px 24px var(--accent-glow); }
.hero-send.ready:hover { transform: scale(1.06); }
.hero-send svg { width: 18px; height: 18px; fill: white; }

.hero-trust { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 26px; flex-wrap: wrap; animation: rise 0.8s 0.36s both; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: rgba(255,255,255,0.6); font-weight: 500; }
.hero-trust .dot { width: 5px; height: 5px; border-radius: 50%; background: #8FB3FF; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   CHAT SCREEN
   ============================================================ */
#chat-screen { display: none; height: 100vh; height: 100svh; flex-direction: column; background: var(--paper); overflow: hidden; }
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--line);
  flex-shrink: 0; z-index: 30;
}
.header-left { display: flex; align-items: center; gap: 11px; }
.logo-mark {
  width: 36px; height: 36px; background: var(--accent-grad); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
  color: white; flex-shrink: 0; box-shadow: 0 4px 12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.3);
}
.header-info h3 { font-size: 14.5px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.header-info p { font-size: 11px; color: var(--emerald); display: flex; align-items: center; gap: 6px; margin-top: 1px; font-weight: 500; }
.h-dot { width: 6px; height: 6px; background: var(--emerald); border-radius: 50%; position: relative; }
.h-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid var(--emerald); opacity: 0.5; animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.6; } 100% { transform: scale(1.6); opacity: 0; } }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-tag { font-size: 11.5px; color: var(--ink-3); font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px; padding: 6px 14px; }
.sidebar-toggle { display: none; align-items: center; gap: 6px; font-family: 'Geist', sans-serif; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px; padding: 7px 13px; cursor: pointer; }
.sidebar-toggle svg { width: 14px; height: 14px; }

.chat-layout { flex: 1; display: flex; overflow: hidden; min-height: 0; position: relative; }

/* ============================================================
   SIDEBAR  (live AI extraction tracker)
   ============================================================ */
.sidebar { width: 328px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.sidebar-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.sidebar-title { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.sidebar-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.sidebar-sub .live { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 600; }
.sidebar-sub .live .b { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.25} }

.sidebar-progress { padding: 16px 20px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: url(#ringgrad); stroke-linecap: round; transition: stroke-dashoffset 0.6s cubic-bezier(0.4,0,0.2,1); }
.ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.sp-meta { flex: 1; }
.sp-meta .label { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.sp-meta .count { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; margin-top: 2px; }
.sp-meta .count b { color: var(--accent); }
.sp-meta .count span { font-size: 14px; color: var(--ink-4); font-weight: 600; }

.sidebar-body { flex: 1; overflow-y: auto; padding: 12px 0 20px; }
.sidebar-body::-webkit-scrollbar { width: 8px; }
.sidebar-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--surface); }
.progress-group { padding: 0 20px; margin-bottom: 14px; }
.progress-group-title { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 6px; padding-top: 8px; }

.progress-item { display: flex; gap: 12px; padding: 9px 0; position: relative; }
/* connector line */
.progress-item::before { content: ''; position: absolute; left: 11px; top: 28px; bottom: -9px; width: 1.5px; background: var(--line); }
.progress-group .progress-item:last-child::before { display: none; }
.progress-item.done::before { background: var(--emerald-border); }

.pi-icon {
  width: 23px; height: 23px; border-radius: 50%; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; font-size: 10px; font-weight: 800;
  border: 1.5px solid var(--line); color: var(--ink-4); background: var(--surface);
  transition: all 0.35s ease; margin-top: 1px; position: relative; z-index: 1;
}
.progress-item.done .pi-icon { background: var(--emerald); border-color: var(--emerald); color: #fff; box-shadow: 0 2px 8px rgba(14,159,110,0.3); }
.progress-item.active .pi-icon { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.progress-item.active .pi-icon::after { content: ''; position: absolute; inset: -1.5px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0.4; animation: ping 1.6s ease-out infinite; }

.pi-content { flex: 1; min-width: 0; }
.pi-label { font-size: 12.5px; font-weight: 600; color: var(--ink-4); transition: color 0.3s; }
.progress-item.done .pi-label { color: var(--ink-2); }
.progress-item.active .pi-label { color: var(--accent); }
.pi-value { font-size: 12px; font-weight: 600; color: var(--ink); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; opacity: 0; max-height: 0; transition: opacity 0.35s, max-height 0.35s; }
.progress-item.done .pi-value { opacity: 1; max-height: 24px; }
.pi-note { font-size: 10.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.5; display: none; padding: 7px 9px; background: var(--surface-2); border: 1px solid var(--line); border-left: 2px solid var(--amber-border); border-radius: 7px; }
.progress-item.done .pi-note { display: block; animation: rise 0.4s both; }
.pi-note .flag { font-weight: 700; color: var(--amber); }
.pi-note::before { content: 'AI NOTE'; display: block; font-size: 8.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--amber); margin-bottom: 2px; opacity: 0.85; }

/* ============================================================
   MAIN COLUMN + TABS
   ============================================================ */
.main-column { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.central-tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--line); flex-shrink: 0; padding: 0 8px; }
.central-tab { position: relative; flex: 1; padding: 14px 16px; font-family: 'Geist', sans-serif; font-size: 13.5px; font-weight: 600; color: var(--ink-3); background: none; border: none; cursor: pointer; transition: color 0.2s; text-align: center; }
.central-tab::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2.5px; border-radius: 3px; background: var(--accent-grad); transform: scaleX(0); transition: transform 0.25s cubic-bezier(0.4,0,0.2,1); }
.central-tab.active { color: var(--accent); }
.central-tab.active::after { transform: scaleX(1); }
.central-tab:hover:not(.active) { color: var(--ink); }
.tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 19px; border-radius: 10px; font-size: 10px; font-weight: 800; margin-left: 7px; padding: 0 6px; background: var(--emerald-soft); color: var(--emerald); border: 1px solid var(--emerald-border); }

.tab-panel { display: none; flex: 1; flex-direction: column; overflow: hidden; min-height: 0; }
.tab-panel.active { display: flex; }

/* progress bar */
.progress-bar { padding: 11px 22px 9px; background: var(--surface); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.progress-inner { max-width: 720px; margin: 0 auto; }
.progress-lbl { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.progress-lbl .spark { width: 13px; height: 13px; color: var(--accent); }
.p-track { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.p-fill { height: 100%; background: var(--accent-grad); border-radius: 4px; transition: width 0.7s cubic-bezier(0.4,0,0.2,1); width: 0%; }

/* hint */
.hint-banner { max-width: 720px; margin: 14px auto 0; padding: 11px 15px; display: flex; align-items: center; gap: 11px; background: var(--amber-soft); border: 1px solid var(--amber-border); border-radius: var(--r-md); animation: fadeSlideIn 0.5s 0.8s both; }
.hint-banner.hidden { display: none; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hint-icon { flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(180,113,12,0.12); color: var(--amber); }
.hint-icon svg { width: 15px; height: 15px; }
.hint-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.hint-text strong { font-weight: 700; color: var(--ink); }
.hint-dismiss { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--ink-3); padding: 4px; line-height: 0; border-radius: 6px; transition: background 0.2s; }
.hint-dismiss:hover { background: rgba(180,113,12,0.12); }
.hint-dismiss svg { width: 15px; height: 15px; }

/* ============================================================
   MESSAGES
   ============================================================ */
.chat-body { flex: 1; overflow-y: auto; padding: 0 18px 8px; min-height: 0; }
.chat-body::-webkit-scrollbar { width: 9px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; border: 2px solid var(--paper); }
.chat-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.msg-row { display: flex; gap: 10px; align-items: flex-end; opacity: 0; transform: translateY(8px); transition: opacity 0.3s ease, transform 0.3s ease; }
.msg-row.visible { opacity: 1; transform: translateY(0); }
.msg-row.u { flex-direction: row-reverse; }
.av { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.av.bot { background: var(--accent-grad); color: white; box-shadow: 0 3px 10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.3); }
.av.usr { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); overflow: hidden; }
.av.usr img { width: 100%; height: 100%; object-fit: cover; }
.bcol { display: flex; flex-direction: column; max-width: 78%; }
.msg-row.u .bcol { align-items: flex-end; }
.sndr { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 5px; color: var(--ink-4); }
.msg-row.u .sndr { color: rgba(45,107,255,0.6); }
.bbl { padding: 11px 15px; border-radius: 16px; font-size: 14px; line-height: 1.65; }
.bbl.bot { background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 5px; box-shadow: var(--sh-xs); }
.bbl.ub { background: var(--accent-grad); color: white; border-bottom-right-radius: 5px; box-shadow: 0 4px 14px var(--accent-glow); }

.typing-row { display: flex; gap: 10px; align-items: flex-end; }
.typing-bbl { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 5px; padding: 12px 16px; display: flex; gap: 9px; align-items: center; box-shadow: var(--sh-xs); }
.typing-dots { display: flex; gap: 4px; align-items: center; }
.td { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: tda 1.2s ease-in-out infinite; opacity: 0.4; }
.td:nth-child(2) { animation-delay: 0.18s; }
.td:nth-child(3) { animation-delay: 0.36s; }
@keyframes tda { 0%,80%,100%{opacity:0.3;transform:scale(0.8)} 40%{opacity:1;transform:scale(1)} }
.thinking-text { font-size: 12px; font-weight: 500; color: var(--ink-3); animation: thinkFade 2.4s ease-in-out infinite; }
@keyframes thinkFade { 0%,100%{opacity:0.55} 50%{opacity:1} }

.extracted-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--emerald-soft); border: 1px solid var(--emerald-border); border-radius: 7px; padding: 4px 9px; margin-bottom: 5px; font-size: 11px; font-weight: 600; color: var(--emerald); animation: badgeFadeIn 0.4s ease both; }
.extracted-badge svg { width: 12px; height: 12px; }
@keyframes badgeFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* package card */
.pkg-card { background: var(--surface-2); border: 1.5px solid var(--accent-border); border-radius: var(--r-md); padding: 18px; margin-top: 12px; position: relative; overflow: hidden; }
.pkg-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent-grad); }
.pkg-tier { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.pkg-name { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 500; color: var(--ink); margin-bottom: 16px; letter-spacing: -0.01em; }
.pkg-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.pkg-list li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); }
.ck { width: 18px; height: 18px; flex-shrink: 0; background: var(--emerald-soft); border: 1px solid var(--emerald-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--emerald); }
.ck svg { width: 10px; height: 10px; }
.pkg-foot { margin-top: 14px; font-size: 12px; color: var(--ink-3); padding-top: 13px; border-top: 1px solid var(--line); line-height: 1.6; }

/* success card */
.success-card { background: var(--emerald-soft); border: 1px solid var(--emerald-border); border-radius: var(--r-md); padding: 18px; margin-top: 12px; }
.s-icon { width: 38px; height: 38px; background: var(--emerald); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 11px; color: #fff; box-shadow: 0 4px 14px rgba(14,159,110,0.35); }
.s-icon svg { width: 19px; height: 19px; }
.s-title { font-size: 14.5px; font-weight: 700; color: var(--emerald); margin-bottom: 8px; }
.s-body { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.s-body strong { color: var(--ink); font-weight: 700; }

/* chat input */
.chat-input-bar { padding: 14px 18px 16px; background: var(--surface); border-top: 1px solid var(--line); flex-shrink: 0; }
.input-bar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 11px 13px; transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s, background 0.2s; }
.input-bar-inner.multiline { align-items: flex-end; }
.input-bar-inner.ready-to-send, .input-bar-inner.typing-active { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-bar-inner.sending { opacity: 0.5; }
#chat-input { flex: 1; font-family: 'Geist', sans-serif; font-size: 14px; color: var(--ink); background: transparent; border: none; outline: none; line-height: 1.55; resize: none; overflow-y: auto; min-height: 22px; max-height: 120px; height: 22px; }
#chat-input::placeholder { color: var(--ink-4); }
.chat-send-btn { width: 36px; height: 36px; flex-shrink: 0; background: var(--accent-grad); border: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; opacity: 0.25; transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s; cursor: default; }
.chat-send-btn.live { opacity: 1; cursor: pointer; box-shadow: 0 4px 12px var(--accent-glow); }
.chat-send-btn.live:hover { transform: scale(1.06); }
.chat-send-btn svg { width: 15px; height: 15px; fill: white; }

.restart-btn { display: none; margin: 12px auto 22px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); border-radius: 10px; padding: 10px 22px; font-family: 'Geist', sans-serif; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.restart-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ============================================================
   FORM PANEL
   ============================================================ */
.form-panel-body { flex: 1; overflow-y: auto; padding: 26px 18px; }
.form-panel-body::-webkit-scrollbar { width: 9px; }
.form-panel-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; border: 2px solid var(--paper); }
.form-panel-inner { max-width: 640px; margin: 0 auto; }
.form-section-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; margin-top: 30px; display: flex; align-items: center; gap: 9px; }
.form-section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.form-section-title:first-child { margin-top: 0; }
.fp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fp-field { display: flex; flex-direction: column; gap: 6px; }
.fp-field.full { grid-column: 1 / -1; }
.fp-label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.fp-input { font-family: 'Geist', sans-serif; font-size: 14px; font-weight: 500; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; outline: none; transition: border-color 0.18s, box-shadow 0.18s, background 0.18s; width: 100%; }
.fp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
.fp-input:disabled { opacity: 0.45; cursor: not-allowed; }
.fp-input::placeholder { color: var(--ink-4); font-weight: 400; }
.fp-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; margin-top: 1px; }
.fp-status svg { width: 12px; height: 12px; }
.fp-status.gathered { color: var(--emerald); }
.fp-status.pending { color: var(--ink-4); }

.form-footer { padding: 18px; border-top: 1px solid var(--line); background: var(--surface); flex-shrink: 0; }
.form-footer-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.save-btn { background: var(--accent-grad); color: white; border: none; border-radius: var(--r-sm); padding: 11px 24px; font-family: 'Geist', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s; box-shadow: 0 4px 12px var(--accent-glow); }
.save-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--accent-glow); }
.save-note { font-size: 12px; color: var(--ink-3); }

.review-banner { padding: 16px 18px; background: var(--emerald-soft); border: 1px solid var(--emerald-border); border-radius: var(--r-md); margin-bottom: 22px; display: none; }
.review-banner.visible { display: block; animation: fadeSlideIn 0.4s ease both; }
.rb-title { font-size: 14.5px; font-weight: 700; color: var(--emerald); margin-bottom: 5px; display: flex; align-items: center; gap: 7px; }
.rb-title svg { width: 16px; height: 16px; }
.rb-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-links { display: none; }
  .hero-nav { padding: 18px 22px; }
  .sidebar-toggle { display: inline-flex; }
  .sidebar {
    position: absolute; top: 0; bottom: 0; left: 0; z-index: 25;
    transform: translateX(-100%); transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    box-shadow: var(--sh-lg); width: 300px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: absolute; inset: 0; z-index: 20; background: rgba(7,8,14,0.32); opacity: 0; pointer-events: none; transition: opacity 0.3s; backdrop-filter: blur(2px); }
  .sidebar-scrim.show { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  .hero-nav-actions .outline { display: none; }
  .hero-content { padding: 0 18px 70px; }
  .fp-grid { grid-template-columns: 1fr; }
  .header-tag { display: none; }
  .hero-trust { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.05s !important; }
  .hero-bg img { animation: none; transform: scale(1.06); }
}
