/* ============================================================
   Prevo AI — Design System
   Matches prevo-website (Prevoyance IT Solutions) visual language
   Primary: #1e5fa8  ·  Accent: #2d8cdd  ·  Base: white / slate
   ============================================================ */

/* ---- Google Fonts -------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- Variables ----------------------------------------------------------- */
:root {
  /* Brand */
  --primary:       #1e5fa8;
  --primary-h:     #1a5292;
  --accent:        #2d8cdd;
  --blue-50:       #eff6ff;
  --blue-100:      #dbeafe;
  --blue-200:      #bfdbfe;
  --blue-400:      #60a5fa;
  --blue-500:      #3b82f6;
  --blue-700:      #1d4ed8;

  /* Slate */
  --slate-50:      #f8fafc;
  --slate-100:     #f1f5f9;
  --slate-200:     #e2e8f0;
  --slate-300:     #cbd5e1;
  --slate-400:     #94a3b8;
  --slate-500:     #64748b;
  --slate-600:     #475569;
  --slate-700:     #334155;
  --slate-800:     #1e293b;
  --slate-900:     #0f172a;

  /* Semantic */
  --bg:            #ffffff;
  --bg-subtle:     #f8fafc;
  --surface:       #ffffff;
  --text:          #0f172a;
  --body:          #475569;
  --muted:         #64748b;
  --subtle:        #94a3b8;
  --border:        #e2e8f0;
  --border-h:      #cbd5e1;
  --success:       #16a34a;
  --danger:        #dc2626;

  /* Radii */
  --radius-sm:     6px;
  --radius:        8px;
  --radius-lg:     12px;
  --radius-xl:     16px;
  --radius-full:   9999px;

  /* Shadows (very subtle, white-on-white style) */
  --shadow-sm:     0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.06);
  --shadow:        0 2px 4px rgba(15,23,42,0.04), 0 4px 8px rgba(15,23,42,0.06);
  --shadow-lg:     0 4px 6px rgba(15,23,42,0.05), 0 10px 20px rgba(15,23,42,0.08);
  --shadow-xl:     0 8px 10px rgba(15,23,42,0.05), 0 20px 40px rgba(15,23,42,0.10);
  --shadow-blue:   0 4px 14px rgba(30,95,168,0.18);
}

/* ---- Reset & Base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 0.95rem; font-weight: 600; }
p  { margin: 0; }

/* ============================================================
   Header — white / blur (matches prevo-website Navbar)
   ============================================================ */
.brand-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}

.brand-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-logo:hover { opacity: 0.85; text-decoration: none; }

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

.brand-logo__frame img {
  height: 40px;
  width: auto;
  display: block;
}

.brand-titles { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }

.brand-product {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-800);
  letter-spacing: 0.01em;
}

.brand-tagline {
  font-size: 0.68rem;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-nav a {
  color: var(--slate-600);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand-nav a:hover { color: var(--slate-900); background: var(--slate-100); text-decoration: none; }

.brand-nav a.nav-logout {
  color: var(--primary);
  border: 1px solid var(--blue-200);
  background: var(--blue-50);
}

.brand-nav a.nav-logout:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================================
   Main area
   ============================================================ */
.brand-main {
  flex: 1;
  width: 100%;
}

/* Constrained container for app pages (login, home, workspace) */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 40px 64px;
}

/* ============================================================
   Footer — slate-900 dark (matches prevo-website Footer)
   ============================================================ */
.brand-footer {
  background: var(--slate-900);
  border-top: 1px solid var(--slate-800);
  padding: 40px 0 24px;
}

.brand-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.brand-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.brand-footer__brand { display: flex; flex-direction: column; gap: 14px; }

.brand-footer__logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.brand-footer__mark {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  display: block;
}

.brand-footer__company {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-footer__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.brand-footer__subtitle {
  font-size: 0.72rem;
  color: var(--slate-400);
}

.brand-footer__desc {
  font-size: 0.875rem;
  color: var(--slate-400);
  line-height: 1.65;
}

.brand-footer__col-title {
  font-size: 0.7rem;
  color: var(--blue-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 14px;
}

.brand-footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-footer__links li {
  font-size: 0.875rem;
  color: var(--slate-400);
  transition: color 0.15s;
  cursor: default;
}

.brand-footer__links li:hover { color: var(--slate-200); }

.brand-footer__contact-row { margin-bottom: 14px; }
.brand-footer__contact-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  margin-bottom: 3px;
}
.brand-footer__contact-row a {
  font-size: 0.875rem;
  color: var(--slate-300);
  text-decoration: none;
  transition: color 0.15s;
}
.brand-footer__contact-row a:hover { color: #fff; }

.brand-footer__bottom {
  border-top: 1px solid var(--slate-800);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-footer__copy {
  font-size: 0.875rem;
  color: var(--slate-500);
}

.brand-footer__label {
  font-size: 0.7rem;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Legacy footer for pages that use the simple footer */
.brand-footer__text {
  font-size: 0.8rem;
  color: var(--slate-500);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.card__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card__head h2 { margin: 0; }

.card__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card__icon--upload  { background: var(--blue-50);  color: var(--primary); border: 1px solid var(--blue-200); }
.card__icon--library { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.card__icon--recent  { background: var(--slate-50); color: var(--muted);   border: 1px solid var(--border); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.2s, transform 0.1s;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-blue);
}
.btn:hover {
  background: var(--primary-h);
  box-shadow: 0 6px 20px rgba(30,95,168,0.25);
  text-decoration: none;
  color: #fff;
}

.btn--lg {
  height: 48px;
  padding: 0 28px;
  font-size: 0.9375rem;
  border-radius: var(--radius);
}

.btn--sm {
  padding: 5px 13px;
  font-size: 0.8rem;
  box-shadow: none;
}

.btn--icon { padding: 6px 13px; font-size: 0.8rem; gap: 5px; box-shadow: none; }

.btn--full {
  width: 100%;
  padding: 11px;
  font-size: 0.9375rem;
}

.btn--ghost {
  background: transparent;
  color: var(--slate-600);
  border-color: var(--slate-200);
  box-shadow: none;
}
.btn--ghost:hover {
  background: var(--slate-100);
  color: var(--slate-800);
  border-color: var(--slate-300);
  box-shadow: none;
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: none;
}
.btn--outline:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

/* ============================================================
   Forms & Inputs
   ============================================================ */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.9375rem;
  background: #fff;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,95,168,0.1);
}
input::placeholder { color: var(--slate-400); }

/* ============================================================
   Utility
   ============================================================ */
.muted   { color: var(--muted);   font-size: 0.875rem; }
.subtle  { color: var(--subtle);  font-size: 0.8rem; }
.err     { color: var(--danger); }
.section-gap { margin-top: 20px; }
.empty-state { padding: 32px 0; text-align: center; color: var(--muted); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   Landing page  (matches Hero + feature section)
   ============================================================ */
.landing-hero {
  position: relative;
  background: #fff;
  overflow: hidden;
  padding: 72px 0 56px;
}

/* Subtle slate grid — exact match to prevo-website */
.landing-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(203,213,225,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203,213,225,0.6) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}

/* Radial glows */
.landing-hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 700px; height: 600px;
  background: radial-gradient(ellipse at top right, rgba(219,234,254,0.7), transparent 65%);
  pointer-events: none;
}

.landing-hero__glow-bl {
  position: absolute;
  bottom: 0; left: 0;
  width: 500px; height: 400px;
  background: radial-gradient(ellipse at bottom left, rgba(239,246,255,0.8), transparent 70%);
  pointer-events: none;
}

.landing-hero__inner {
  position: relative;
  z-index: 1;
}

/* Hero badge — pill with pulse dot */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--blue-200);
  background: var(--blue-50);
  padding: 6px 16px;
  font-size: 0.7rem;
  color: var(--blue-700);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue-500);
  flex-shrink: 0;
  animation: hero-pulse 2s infinite;
}

@keyframes hero-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.82); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: center;
}

.hero-headline {
  font-size: 3rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-headline__gradient {
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--slate-600);
  line-height: 1.7;
  font-weight: 300;
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* Stats panel — white card, rounded-2xl, shadow-xl (matches prevo-website) */
.hero-stats-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 32px;
}

.hero-stats-eyebrow {
  font-size: 0.68rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-stat-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--slate-100);
}
.hero-stat-row:last-child { border-bottom: none; }

.hero-stat-number {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  width: 72px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.hero-stat-detail { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-label  { font-size: 0.875rem; color: var(--slate-800); font-weight: 500; line-height: 1.3; }
.hero-stat-sub    { font-size: 0.75rem;  color: var(--slate-400); }

/* Scroll cue */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 64px;
}
.scroll-cue__text { font-size: 0.68rem; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.12em; }
.scroll-cue__line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--slate-300), transparent); }

/* Feature section */
.feature-section {
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  padding: 56px 0;
}

.feature-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.feature-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-lg);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

.feature-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.feature-card__body {
  font-size: 0.875rem;
  color: var(--slate-500);
  line-height: 1.65;
}

.landing-cta-section {
  background: #fff;
  border-top: 1px solid var(--slate-200);
  padding: 56px 0;
}

.landing-cta-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 0 40px;
}

.landing-cta-card h2 { font-size: 1.5rem; margin-bottom: 10px; }

/* ============================================================
   Login page
   ============================================================ */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 40px 16px;
}

.login-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.login-card__header {
  background: linear-gradient(135deg, var(--slate-900) 0%, #1a3254 100%);
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.login-card__logo {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.login-card__logo img { height: 46px; width: 46px; object-fit: contain; }

.login-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: -0.01em;
  margin: 0;
}

.login-card__sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

.login-card__body { padding: 28px 32px; }

.login-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.68rem;
  color: var(--blue-700);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-full);
  padding: 4px 13px;
  background: var(--blue-50);
  margin-bottom: 20px;
  font-weight: 500;
}

.login-card__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  display: inline-block;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.skill-field { display: flex; flex-direction: column; gap: 5px; }

.skill-field > span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate-700);
  letter-spacing: 0.01em;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.login-card__footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--subtle);
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Home — document chooser (/home)
   ============================================================ */
.chooser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  border: 2px dashed var(--blue-200);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  background: var(--slate-50);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--muted);
}
.dropzone:hover { border-color: var(--primary); background: var(--blue-50); }
.dropzone--over { border-color: var(--accent) !important; background: var(--blue-100) !important; }
.dropzone input[type="file"] { display: none; }
.dropzone__icon { color: var(--primary); margin-bottom: 4px; }
.dropzone strong { font-size: 0.9rem; font-weight: 600; color: var(--slate-800); }

.sample-list { list-style: none; }
.sample-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--slate-100);
}
.sample-item:last-child { border-bottom: none; }
.sample-item__info { min-width: 0; flex: 1; }

.sample-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.sample-link:hover { color: var(--primary-h); text-decoration: underline; }
.sample-meta { font-size: 0.75rem; color: var(--subtle); margin-top: 2px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  text-align: left;
  padding: 9px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--slate-100); color: var(--body); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--slate-50); }

/* ============================================================
   Upload progress bar
   ============================================================ */
.upload-prog {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}
.upload-prog__top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.upload-prog__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-lg);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.upload-prog__meta { flex: 1; min-width: 0; }
.upload-prog__name { font-size: 0.875rem; font-weight: 600; color: var(--slate-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-prog__status { font-size: 0.8rem; color: var(--muted); }
.upload-prog__pct { font-size: 1.25rem; font-weight: 700; color: var(--primary); min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.upload-prog__track { height: 6px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.upload-prog__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 999px;
  transition: width 0.22s ease;
  position: relative; overflow: hidden;
}
.upload-prog__bar::after {
  content: '';
  position: absolute; top: 0; left: -60px;
  width: 60px; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: prog-shimmer 1.4s infinite;
}
@keyframes prog-shimmer {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 60px)); }
}
.upload-prog__bar--done { background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%); transition: background 0.5s, width 0.22s; }
.upload-prog__bar--done::after { display: none; }

/* ============================================================
   Workspace (/doc/{id})
   ============================================================ */
.ws-top { margin-bottom: 18px; }

.ws-pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ws-pane__head h2 { margin: 0; }
.ws-top__left { display: flex; flex-direction: column; gap: 3px; }
.ws-filename { font-size: 0.8rem; color: var(--muted); }
.ws-meta     { font-size: 0.75rem; color: var(--subtle); }

.lens-toggle { display: flex; align-items: center; gap: 6px; }
.lens-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-500);
  border-radius: var(--radius);
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.lens-btn:hover:not(.lens-btn--active) { background: var(--slate-200); color: var(--slate-700); }
.lens-btn--active { background: var(--primary); color: #fff; border-color: var(--primary); }

.summary-box {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--slate-700);
  min-height: 48px;
  padding: 4px 0;
}

.workspace {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}

.pdf-frame {
  width: 100%;
  height: 76vh;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  margin-top: 12px;
  background: #fff;
  display: block;
}

.tools-hint  { font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; }
.tools-loading { font-size: 0.875rem; color: var(--muted); padding: 12px 0; }

.tool {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 13px 15px;
  margin-bottom: 10px;
  background: var(--slate-50);
  transition: border-color 0.15s, background 0.15s;
}
.tool--on { border-color: var(--blue-200); background: var(--blue-50); }
.tool--off { opacity: 0.55; }
.tool__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tool__head strong { font-size: 0.875rem; color: var(--slate-800); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--slate-300); flex-shrink: 0; display: inline-block; }
.tool--on .dot { background: var(--success); box-shadow: 0 0 0 3px rgba(22,163,74,0.18); }
.tool__note    { font-size: 0.775rem; color: var(--muted);   margin: 3px 0; }
.tool__inputs  { font-size: 0.775rem; color: var(--body);    margin: 6px 0; line-height: 1.55; }
.tool__inputs .src { color: var(--subtle); }
.tool__missing { font-size: 0.775rem; color: var(--danger);  margin-top: 4px; }

.chat {
  max-height: 34vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 8px;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: var(--slate-200) transparent;
}
.msg { padding: 10px 14px; border-radius: 12px; font-size: 0.875rem; line-height: 1.55; max-width: 90%; }
.msg--user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 3px; }
.msg--bot  { align-self: flex-start; background: var(--slate-100); color: var(--slate-700); border: 1px solid var(--slate-200); border-bottom-left-radius: 3px; }

.ask-form { display: flex; gap: 8px; margin-top: 4px; }
.ask-form input { flex: 1; }

.save-status { font-size: 0.775rem; color: var(--muted); margin-top: 6px; min-height: 18px; }

.ws-output { margin-top: 20px; }

.output-card {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.output-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--slate-100);
}
.output-head strong { font-size: 0.875rem; color: var(--slate-800); font-weight: 600; }
.output-inputs { font-size: 0.775rem; color: var(--muted); margin-bottom: 10px; }
.output-body { font-size: 0.875rem; color: var(--body); }

.grid-table { width: 100%; border-collapse: collapse; font-size: 0.825rem; margin-top: 6px; }
.grid-table th {
  padding: 8px 11px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate-400);
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}
.grid-table td { padding: 9px 11px; border-bottom: 1px solid var(--slate-100); color: var(--body); font-variant-numeric: tabular-nums; }
.grid-table tbody tr:last-child td { border-bottom: none; }
.grid-table tbody tr:nth-child(odd) td { background: var(--slate-50); }
.grid-table tbody tr:hover td { background: var(--blue-50); }

.explain {
  margin-top: 10px; font-size: 0.8rem; color: var(--muted);
  line-height: 1.65; padding: 10px 12px;
  background: var(--slate-50); border-radius: var(--radius); border: 1px solid var(--slate-200);
}

.modal {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}
.modal[hidden] { display: none; }
.modal__card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 28px 30px;
  width: min(500px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
}
.modal__close {
  background: none; border: none;
  font-size: 1.3rem; cursor: pointer;
  color: var(--slate-400); line-height: 1;
  padding: 4px 7px; border-radius: var(--radius-sm);
  font-family: inherit;
}
.modal__close:hover { background: var(--slate-100); color: var(--slate-700); }

.skill-form { display: flex; flex-direction: column; gap: 13px; margin-top: 16px; }

pre {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 0.8rem;
  overflow-x: auto;
  color: var(--body);
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .brand-header__inner { padding: 0 24px; }
  .brand-main          { padding: 28px 24px 48px; }
  .hero-grid           { grid-template-columns: 1fr; gap: 36px; }
  .hero-headline       { font-size: 2.2rem; }
  .feature-grid        { grid-template-columns: 1fr 1fr; padding: 0 24px; }
  .chooser-grid        { grid-template-columns: 1fr; }
  .workspace           { grid-template-columns: 1fr; }
  .brand-footer__cols  { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 600px) {
  .brand-main          { padding: 20px 16px 40px; }
  .hero-headline       { font-size: 1.75rem; }
  .feature-grid        { grid-template-columns: 1fr; padding: 0 16px; }
  .hero-actions        { flex-direction: column; width: 100%; }
  .hero-actions .btn   { width: 100%; }
  .brand-footer__inner { padding: 0 24px; }
}

/* ============================================================
   Landing narrative sections — added for full-page story
   ============================================================ */

/* Section wrappers */
.section-wrap {
  padding: 88px 0;
}
.section-wrap--slate {
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Section header (centered) */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-header--left { text-align: left; }

/* Eyebrow label */
.eyebrow {
  font-size: 0.7rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 14px;
}

/* Large section title */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.03em;
  line-height: 1.07;
  margin-bottom: 16px;
}
.section-title--lg {
  font-size: 3rem;
}

/* Section body copy */
.section-body {
  font-size: 1.0625rem;
  color: var(--slate-500);
  line-height: 1.72;
  font-weight: 300;
  max-width: 580px;
  margin: 0 auto;
}
.section-body--left {
  margin: 0;
  max-width: 500px;
}

/* ---- Problem cards -------------------------------------------------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 12px;
}

.problem-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.problem-card__stat {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.problem-card__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 8px;
  line-height: 1.3;
}

.problem-card__body {
  font-size: 0.875rem;
  color: var(--slate-500);
  line-height: 1.65;
}

/* ---- Phase badge ---------------------------------------------------- */
.phase-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  border: 1px solid var(--blue-200);
  background: var(--blue-50);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---- Tag pills -------------------------------------------------------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.tag-pill {
  font-size: 0.72rem;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--blue-100);
  color: var(--primary);
  background: var(--blue-50);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---- Timeline layout (LO Journey) ------------------------------------ */
.timeline {
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--slate-200) 10%, var(--slate-200) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-step {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
}
.timeline-step:last-child { margin-bottom: 0; }

.timeline-step__content {
  space-y: 4px;
}

.timeline-step__content--right {
  text-align: left;
}

.timeline-step__content--left {
  text-align: right;
}

.timeline-step__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 8px 0 8px;
  letter-spacing: -0.02em;
}

.timeline-step__body {
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.68;
}

.timeline-node {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--blue-200);
  background: #fff;
  box-shadow: 0 2px 8px rgba(30,95,168,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.tags--right { justify-content: flex-end; }

/* ---- Product pillars -------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-lg);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.product-card__eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.product-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.02em;
  margin: 4px 0 8px;
}

.product-card__body {
  font-size: 0.875rem;
  color: var(--slate-500);
  line-height: 1.68;
}

.product-card__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}

.product-card__items li {
  font-size: 0.8125rem;
  color: var(--slate-600);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.product-card__items li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 6px;
}

/* ---- AI split section ------------------------------------------------- */
.ai-split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
  align-items: start;
}

.ai-sticky { position: sticky; top: 100px; }

.ai-caps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-cap {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.ai-cap__icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-lg);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.ai-cap__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.ai-cap__body {
  font-size: 0.8125rem;
  color: var(--slate-500);
  line-height: 1.68;
}

.ai-cta-box {
  border-top: 1px solid var(--slate-200);
  padding-top: 24px;
  margin-top: 24px;
}

/* ---- Research section ------------------------------------------------- */
.research-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.border-callout {
  border-left: 2px solid var(--primary);
  padding-left: 16px;
  margin-bottom: 20px;
}
.border-callout:last-child { margin-bottom: 0; }

.border-callout__label {
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.border-callout__text {
  font-size: 0.875rem;
  color: var(--slate-600);
  line-height: 1.68;
}

.research-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 40px;
}

.research-card__institution {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--slate-100);
}

.research-card__logo {
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.research-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.01em;
}

.research-card__sub {
  font-size: 0.8rem;
  color: var(--slate-500);
  margin-top: 2px;
}

.research-card__tag {
  font-size: 0.68rem;
  color: var(--slate-400);
  margin-top: 1px;
}

.research-stat {
  padding: 16px 0;
  border-bottom: 1px solid var(--slate-100);
}
.research-stat:last-child { border-bottom: none; }

.research-stat__label {
  font-size: 0.7rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  margin-bottom: 4px;
}

.research-stat__value {
  font-size: 0.875rem;
  color: var(--slate-700);
  line-height: 1.55;
}

/* ---- CTA section ------------------------------------------------------ */
.cta-section {
  background: linear-gradient(135deg, var(--slate-900) 0%, #1a3254 100%);
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(203,213,225,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203,213,225,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
}

.cta-section__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.cta-section__eyebrow {
  font-size: 0.7rem;
  color: var(--blue-400);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin-bottom: 16px;
}

.cta-section__title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.cta-section__body {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.68;
  font-weight: 300;
  margin-bottom: 32px;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn--white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  box-shadow: none;
}
.btn--white:hover {
  background: var(--blue-50);
  color: var(--primary-h);
  box-shadow: none;
}

.btn--outline-white {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: none;
}
.btn--outline-white:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
  box-shadow: none;
}

/* Responsive additions */
@media (max-width: 960px) {
  .timeline::before { display: none; }
  .timeline-step {
    grid-template-columns: 32px 1fr;
    gap: 20px;
  }
  .timeline-step__content--left {
    display: none;
  }
  .timeline-step:nth-child(even) .timeline-step__content--left { display: none; }
  .timeline-step:nth-child(even) .timeline-step__content--right { grid-column: 2; }
  .timeline-node { width: 32px; height: 32px; font-size: 0.72rem; }
  .tags--right { justify-content: flex-start; }
  .ai-split { grid-template-columns: 1fr; gap: 40px; }
  .ai-sticky { position: static; }
  .research-split { grid-template-columns: 1fr; gap: 40px; }
  .problem-grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 1.875rem; }
  .section-inner { padding: 0 24px; }
  .cta-section { padding: 64px 24px; }
  .cta-section__title { font-size: 1.75rem; }
}

@media (max-width: 640px) {
  .problem-grid { grid-template-columns: 1fr; }
  .section-wrap { padding: 56px 0; }
  .section-title { font-size: 1.625rem; }
}
