/* ================================================================
   KnapFlux — Clear Light Theme (simplified, single-file CSS)
   Keeps your existing class names. Removes redundancy, unifies tokens.
   ================================================================= */

/* --------------------------- Tokens --------------------------- */
:root{
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;

  --border: #e5e7eb;
  --border-soft: #eef2f7;

  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;

  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eaf1ff;

  --good: #16a34a;
  --danger: #b91c1c;

  --r-lg: 16px;
  --r-md: 12px;
  --r-pill: 999px;

  --shadow-1: 0 10px 22px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 16px 34px rgba(15, 23, 42, 0.08);

  --container: 1240px;

  --focus: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

/* --------------------------- Reset --------------------------- */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a{color:inherit;text-decoration:none}
button,input,textarea{font:inherit}
:focus-visible{outline:none;box-shadow: var(--focus);border-radius: 10px}

/* --------------------------- Layout wrappers --------------------------- */
.page{min-height:100vh;display:flex;flex-direction:column}
.startup-main{
  flex:1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
}

/* ================================================================
   HEADER / NAV (startup-*)
   ================================================================= */
.startup-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.startup-nav{
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.nav-left, .nav-right{display:flex;align-items:center;gap:10px}

.nav-logo{display:flex;align-items:center;gap:10px}
.logo-mark{
  width: 32px;height: 32px;border-radius: 11px;
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:800;font-size:15px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  box-shadow: 0 10px 22px rgba(37,99,235,0.22);
}
.logo-text{display:flex;flex-direction:column;line-height:1.15}
.logo-text strong{font-size:14px;letter-spacing:0.02em}
.logo-text small{font-size:11px;color: var(--muted-2)}

.nav-center{display:flex;gap:14px;font-size:13px}
.nav-link{
  padding: 6px 10px;
  border-radius: var(--r-pill);
  color: var(--muted);
}
.nav-link:hover{background: var(--accent-soft);color: var(--accent-strong)}
.nav-link-active{
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.nav-pill{
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--muted-2);
}

/* ================================================================
   Buttons (shared)
   ================================================================= */
.btn-small, .btn-primary, .btn-secondary,
.btn-google, .kf-topbar-logout, .project-tab-link{
  border-radius: var(--r-pill);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  padding: 8px 14px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.04);
  transition: transform .08s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.btn-small:hover, .btn-primary:hover, .btn-secondary:hover,
.btn-google:hover, .kf-topbar-logout:hover, .project-tab-link:hover{
  box-shadow: var(--shadow-1);
}
.btn-small:active, .btn-primary:active, .btn-secondary:active,
.btn-google:active, .kf-topbar-logout:active, .project-tab-link:active{
  transform: translateY(1px);
}

.btn-small{
  padding: 7px 12px;
  background: var(--accent);
  border-color: rgba(37,99,235,0.35);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37,99,235,0.22);
}
.btn-small:hover{background: var(--accent-strong)}

.btn-primary{
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color:#fff;
  border-color: rgba(37,99,235,0.35);
  font-weight: 600;
  box-shadow: 0 12px 26px rgba(37,99,235,0.24);
}
.btn-secondary{
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover{background: var(--surface-2);border-color:#dbe2ea}

.btn-secondary-small{font-size:11px;padding:6px 10px}

/* Google button (kept) */
.btn-google{
  border-color: var(--border);
  background: var(--surface);
  color: #111827;
}
.btn-google-icon{
  width:18px;height:18px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-strong);
}

/* ================================================================
   Sidebar / Content (startup-*)
   ================================================================= */
.startup-sidebar{
  background: var(--surface-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  padding: 14px 12px;
  display:flex;
  flex-direction:column;
  gap: 14px;
}
.sidebar-section-title{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.sidebar-link{
  display:flex;align-items:center;gap:8px;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: var(--r-pill);
  color: var(--muted);
}
.sidebar-link:hover{background: var(--accent-soft);color: var(--accent-strong)}
.sidebar-link-active{
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}
.sidebar-tag{
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: #e5e7eb;
  color: var(--muted);
}

.startup-content{
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  padding: 18px 20px;
}

/* ================================================================
   Hero / Sections / Cards (startup-*)
   ================================================================= */
.hero-badge{
  display:inline-flex;align-items:center;gap:8px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(37,99,235,0.25);
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 10px;
}
.hero-title{font-size: 26px;font-weight: 750;margin-bottom: 8px}
.hero-title span.highlight{color: var(--accent)}
.hero-subtitle{
  font-size: 14px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 16px;
}
.hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.hero-note{font-size: 11px;color: var(--muted-2);max-width: 580px}

.section{margin-top: 22px}
.section-header{margin-bottom: 10px}
.section-kicker{
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted-2);
  margin-bottom: 2px;
}
.section-title{font-size: 18px;font-weight: 700;margin-bottom: 4px}
.section-subtitle{font-size: 13px;color: var(--muted);max-width: 600px}

.grid-3{display:grid;grid-template-columns: repeat(3, minmax(0,1fr));gap: 12px}
.card, .project-card{
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  padding: 12px 12px 14px;
  box-shadow: var(--shadow-1);
  font-size: 13px;
}
.card-title{font-weight: 700;margin-bottom: 6px}
.card-body p{font-size:13px;color: var(--text);margin-bottom:6px}
.card-list{list-style:none;font-size:12px;color: var(--muted)}
.card-list li{display:flex;gap:6px;margin-bottom: 4px}
.card-list li span.bullet{font-size: 10px;margin-top: 3px;color: var(--muted-2)}

/* Home deep-dive page */
.home-deep-hero{
  border:1px solid rgba(37,99,235,0.24);
  background:linear-gradient(160deg,#ffffff 0%,#eef5ff 58%,#eaf8f2 100%);
  border-radius:16px;
  padding:16px;
}
.home-step-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.home-step-card{
  border:1px solid var(--border);
  border-radius:12px;
  background:#ffffff;
  padding:11px 12px;
  box-shadow:0 8px 18px rgba(15,23,42,0.05);
}
.home-step-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid rgba(37,99,235,0.24);
  background:#eff6ff;
  color:#1d4ed8;
  padding:2px 9px;
  font-size:11px;
  font-weight:700;
  margin-bottom:7px;
}
.home-step-title{
  font-size:14px;
  font-weight:700;
  color:#111827;
  margin-bottom:3px;
}
.home-step-text{
  font-size:12px;
  color:#475569;
}
.home-upsell-lane{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.home-upsell-card{
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
  padding:11px 12px;
}
.home-upsell-card h3{
  font-size:13px;
  color:#1e3a8a;
  margin-bottom:4px;
}
.home-upsell-card p{
  font-size:12px;
  color:#475569;
}
.home-deliverables-wrap{
  border:1px solid var(--border);
  border-radius:12px;
  overflow:auto;
  background:#ffffff;
}
.home-deliverables-table{
  width:100%;
  min-width:820px;
  border-collapse:separate;
  border-spacing:0;
}
.home-deliverables-table th{
  background:#f8fafc;
  color:#334155;
  font-size:12px;
  font-weight:700;
  padding:10px 12px;
  text-align:left;
  border-bottom:1px solid var(--border);
}
.home-deliverables-table td{
  font-size:12px;
  color:#1f2937;
  padding:10px 12px;
  border-bottom:1px solid #eef2f7;
  vertical-align:top;
}
.home-deliverables-table tbody tr:last-child td{
  border-bottom:none;
}
.home-proof-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.home-proof-card{
  border:1px solid var(--border);
  border-radius:12px;
  background:#ffffff;
  padding:11px 12px;
}
.home-proof-card h3{
  font-size:13px;
  color:#0f172a;
  margin-bottom:4px;
}
.home-proof-card p{
  font-size:12px;
  color:#475569;
}
.home-boundaries-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.home-boundary-card{
  border:1px solid var(--border);
  border-radius:12px;
  background:#ffffff;
  padding:11px 12px;
}
.home-boundary-card h3{
  font-size:13px;
  color:#111827;
  margin-bottom:4px;
}
.home-faq-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.home-faq-card{
  border:1px solid var(--border);
  border-radius:12px;
  background:#ffffff;
  padding:11px 12px;
}
.home-faq-card h3{
  font-size:13px;
  color:#111827;
  margin-bottom:4px;
}
.home-faq-card p{
  font-size:12px;
  color:#475569;
}
.home-final-cta{
  border:1px solid rgba(37,99,235,0.3);
  border-radius:14px;
  background:#f8fbff;
  padding:16px;
  text-align:center;
}
.home-final-cta h2{
  font-size:22px;
  margin-bottom:6px;
  color:#0f172a;
}
.home-final-cta p{
  font-size:13px;
  color:#475569;
  max-width:760px;
  margin:0 auto 10px;
}
.home-final-note{
  font-size:11px;
  color:#64748b;
  margin-top:4px;
}

/* My account tables */
.my-account-table-wrap{
  margin-top:10px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:auto;
  background:#fff;
}
.my-account-table{
  width:100%;
  min-width:980px;
  border-collapse:separate;
  border-spacing:0;
}
.my-account-table th{
  background:#f8fafc;
  color:#374151;
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
  padding:11px 14px;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
}
.my-account-table td{
  font-size:12px;
  color:#111827;
  padding:11px 14px;
  border-bottom:1px solid var(--border-soft);
  vertical-align:top;
}
.my-account-table tbody tr:hover{
  background:#f8fbff;
}
.my-account-table tbody tr:last-child td{
  border-bottom:none;
}
.my-account-table-log{
  min-width:1100px;
}
.my-account-affiliation-meta{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:12px;
  color:#111827;
}
.my-account-affiliation-link{
  color:#1d4ed8;
  font-weight:700;
}
.my-account-affiliation-link:hover{
  text-decoration:underline;
}
.my-account-affiliation-link-disabled{
  color:#6b7280;
  font-weight:700;
}
.my-account-affiliation-lock-note{
  margin-left:6px;
  color:#6b7280;
}

/* Messaging */
.messages-head{
  margin-bottom:12px;
}
.messages-guide-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:12px;
}
.messages-rules{
  margin:0;
  padding-left:18px;
  font-size:12px;
  color:#475569;
  display:grid;
  gap:4px;
}
.messages-layout{
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:12px;
  margin-bottom:12px;
}
.messages-threads-card,
.messages-thread-card,
.messages-compose-card{
  min-width:0;
}
.messages-section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.messages-filter-links{
  display:flex;
  gap:8px;
}
.messages-filter-links a{
  font-size:12px;
  color:#475569;
  padding:4px 8px;
  border:1px solid #dbe2ea;
  border-radius:999px;
  background:#f8fafc;
}
.messages-filter-links a.active{
  background:#eaf1ff;
  border-color:#93c5fd;
  color:#1d4ed8;
  font-weight:700;
}
.messages-thread-list{
  display:grid;
  gap:8px;
  max-height:620px;
  overflow:auto;
}
.messages-thread-item{
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#ffffff;
  padding:8px 10px;
  display:grid;
  gap:3px;
}
.messages-thread-item:hover{
  background:#f8fbff;
}
.messages-thread-item-active{
  border-color:#93c5fd;
  background:#eff6ff;
}
.messages-thread-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.messages-thread-topic{
  font-size:11px;
  color:#334155;
  font-weight:700;
}
.messages-unread-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  font-weight:700;
}
.messages-thread-subject{
  font-size:13px;
  color:#111827;
  font-weight:700;
  line-height:1.35;
}
.messages-thread-meta{
  font-size:11px;
  color:#64748b;
}
.messages-thread-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.messages-stream{
  margin-top:10px;
  max-height:420px;
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:8px;
  background:#f8fafc;
  display:grid;
  gap:8px;
}
.messages-msg{
  border:1px solid #dbe2ea;
  border-radius:10px;
  padding:8px 10px;
  background:#fff;
}
.messages-msg-knapflux{
  border-color:#bfdbfe;
  background:#eff6ff;
}
.messages-msg-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size:11px;
  color:#475569;
  margin-bottom:6px;
}
.messages-msg-body{
  font-size:13px;
  color:#111827;
  line-height:1.45;
}
.messages-msg-body p{
  margin:0 0 6px;
}
.messages-msg-body p:last-child{
  margin-bottom:0;
}
.messages-msg-meta{
  margin-top:8px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  font-size:11px;
  color:#475569;
}
.messages-msg-meta a{
  color:#1d4ed8;
}
.messages-msg-meta a:hover{
  text-decoration:underline;
}
.messages-reply-form{
  margin-top:10px;
  border-top:1px solid #e5e7eb;
  padding-top:10px;
}
.messages-compose-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.messages-copy-candidates{
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:8px;
  background:#f8fafc;
  display:grid;
  gap:6px;
}
.messages-copy-row{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:#1f2937;
}
.messages-copy-row input[type="checkbox"]{
  width:16px;
  height:16px;
  accent-color:#2563eb;
}
.messages-empty{
  border:1px dashed #d1d5db;
  border-radius:10px;
  padding:10px;
  font-size:12px;
  color:#64748b;
  background:#fff;
}
.mail-editor{
  border:1px solid #dbe2ea;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}
.mail-editor-toolbar{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px;
  border-bottom:1px solid #e5e7eb;
  background:#f8fafc;
}
.mail-editor-toolbar button{
  border:1px solid #d1d5db;
  background:#fff;
  border-radius:8px;
  padding:4px 8px;
  font-size:12px;
  cursor:pointer;
}
.mail-editor-toolbar button:hover{
  background:#f1f5f9;
}
.mail-editor-toolbar button:focus{
  outline:none;
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(37,99,235,0.15);
}
.mail-editor-toolbar input[type="color"]{
  width:30px;
  height:26px;
  border:none;
  background:transparent;
  padding:0;
}
.mail-editor-surface{
  min-height:110px;
  padding:10px;
  font-size:13px;
  line-height:1.45;
}
.mail-editor-surface:focus{
  outline:none;
}
.messages-compose-form .field label,
.messages-reply-form .field label{
  display:block;
  font-size:12px;
  font-weight:600;
  color:#334155;
  margin-bottom:4px;
}
.messages-compose-form input[type="text"],
.messages-compose-form input[type="file"],
.messages-compose-form select,
.messages-compose-form textarea,
.messages-reply-form input[type="file"],
.messages-reply-form textarea{
  width:100%;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:#fff;
  color:#111827;
  font-size:13px;
  padding:9px 10px;
}
.messages-compose-form select{
  appearance:none;
  background-image:linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:calc(100% - 18px) calc(50% - 1px), calc(100% - 12px) calc(50% - 1px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right:34px;
}
.messages-compose-form input[type="text"]:focus,
.messages-compose-form select:focus,
.messages-compose-form textarea:focus,
.messages-reply-form textarea:focus,
.messages-reply-form input[type="file"]:focus{
  outline:none;
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(37,99,235,0.12);
}
.messages-urls-field textarea{
  width:100%;
}

/* 2FA setup UX */
.kf-2fa-box{
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:12px;
  background:#ffffff;
}
.kf-2fa-head{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-bottom:10px;
}
.kf-2fa-app-icon{
  width:34px;
  height:34px;
  flex-shrink:0;
}
.kf-2fa-title{
  font-size:13px;
  font-weight:700;
  color:#1f2937;
  margin-bottom:2px;
}
.kf-2fa-text{
  font-size:11px;
  color:#6b7280;
  line-height:1.45;
}
.kf-2fa-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:12px;
  align-items:start;
}
.kf-2fa-steps{
  display:grid;
  gap:6px;
  font-size:12px;
  color:#374151;
}
.kf-2fa-qr-wrap{
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
  padding:8px;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:220px;
}
.kf-2fa-qr{
  width:204px;
  height:204px;
  border-radius:8px;
  background:#fff;
}
.kf-2fa-qr-fallback{
  font-size:12px;
  color:#64748b;
}
.kf-2fa-manual{
  margin-top:10px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
}
.kf-2fa-manual summary{
  cursor:pointer;
  list-style:none;
  padding:8px 10px;
  font-size:12px;
  color:#334155;
  font-weight:600;
}
.kf-2fa-manual summary::-webkit-details-marker{
  display:none;
}
.kf-2fa-manual-content{
  padding:0 10px 10px;
}
.kf-2fa-manual-label{
  font-size:11px;
  color:#64748b;
  margin-top:8px;
  margin-bottom:4px;
  font-weight:600;
}
.kf-2fa-code{
  display:block;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#ffffff;
  padding:8px;
  word-break:break-all;
  font-size:11px;
  color:#0f172a;
}
.kf-2fa-code-important{
  color:#b91c1c;
  font-weight:800;
  border-color:#fecaca;
  background:#fff1f2;
}
.kf-2fa-code-scroll{
  max-height:80px;
  overflow:auto;
}

/* ================================================================
   Projects (startup-*)
   ================================================================= */
.projects-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  margin-bottom: 12px;
}
.projects-title{font-size:18px;font-weight:700}
.projects-subtitle{font-size:12px;color: var(--muted)}

.projects-tabs{display:flex;gap:10px;margin-bottom:10px;font-size:13px}
.projects-tab{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  cursor:pointer;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  text-decoration:none;
}
.projects-tab:hover{background: var(--surface-3)}
.projects-tab[disabled]{
  opacity:0.55;
  cursor:default;
}
.projects-tab-active{
  border-color: rgba(37,99,235,0.35);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.projects-grid{display:grid;grid-template-columns: repeat(2, minmax(0,1fr));gap:10px}
.project-card-header{display:flex;justify-content:space-between;align-items:baseline;margin-bottom: 6px}
.project-name{font-weight:700}
.project-headline{
  font-weight:700;
  color: var(--accent-strong);
}
.project-meta{font-size:11px;color: var(--muted-2)}
.project-tags{margin-top:6px;font-size:11px;color: var(--muted)}
.project-tags-line{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
  line-height:1.45;
}
.project-actions{margin-top:10px}
.project-actions-inline{display:flex;gap:8px;flex-wrap:wrap}

.project-mini-timeline{
  margin-top:10px;
  border:1px solid var(--border-soft);
  border-radius:10px;
  padding:8px;
  background:var(--surface-2);
}
.project-mini-timeline-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}
.project-mini-column{
  display:grid;
  gap:6px;
}
.project-mini-timeline-item{
  width:100%;
  border-radius:8px;
  border:1px solid var(--border);
  padding:5px 7px;
  font-size:11px;
  display:flex;
  justify-content:space-between;
  gap:8px;
}
.project-mini-label{color:var(--muted);font-weight:600}
.project-mini-value{color:#1f2937}
.project-mini-timeline-done{
  border-color:rgba(34,197,94,0.35);
  background:rgba(34,197,94,0.08);
}
.project-mini-timeline-progress{
  border-color:rgba(37,99,235,0.35);
  background:rgba(37,99,235,0.08);
}
.project-mini-timeline-todo{
  border-color:var(--border);
  background:#fff;
}
.project-delete-btn{
  border-color:rgba(185,28,28,0.3);
  color:#991b1b;
}
.project-delete-btn:hover{
  background:rgba(185,28,28,0.08);
}

/* Footer */
.startup-footer{
  padding: 10px 18px 16px;
  font-size: 11px;
  color: var(--muted-2);
  text-align:center;
}

/* ================================================================
   Project layout (project-*)
   ================================================================= */
.project-layout{
  display:grid;
  grid-template-columns: 240px minmax(0,1fr);
  gap: 16px;
  align-items:flex-start;
}
.project-sidebar{
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px;
  font-size: 13px;
  box-shadow: var(--shadow-1);
}
.project-sidebar-section-title{
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.project-sidebar-nav{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.project-sidebar-link{
  display:block;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  font-size: 13px;
  color: #374151;
}
.project-sidebar-link:hover{background: var(--surface-3)}
.project-sidebar-link-active{background: var(--accent);color:#fff}
.project-sidebar-link-disabled{opacity:.6}
.project-sidebar-status{font-size:12px;color: var(--muted);display:flex;flex-direction:column;gap:2px}
.project-main{min-height:300px}

/* Project tabs */
.project-tabs{display:flex;flex-wrap:wrap;gap:6px;margin: 6px 0 12px}
.project-tab-link{
  border-color: var(--border);
  background: var(--surface-2);
  color: #374151;
  padding: 6px 12px;
  font-size: 12px;
  box-shadow: none;
}
.project-tab-link:hover{background: var(--surface-3)}
.project-tab-link-active{
  background: var(--accent);
  border-color: var(--accent);
  color:#fff;
}
.project-tabs-workflow{
  margin-top: 0;
  margin-bottom: 12px;
}
.project-tabs-workflow .project-tab-link{
  border-color: var(--accent);
}

/* Run launch (black-box) */
.run-panel{
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:12px;
  margin-bottom:12px;
  background:#fff;
}
.run-panel-subtitle{
  margin-top:0;
  margin-bottom:10px;
}
.run-review-table-wrap{
  width:100%;
  overflow-x:auto;
  border:1px solid #dbeafe;
  border-radius:10px;
  background:#f8fbff;
}
.run-review-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  min-width:560px;
}
.run-review-table th{
  text-align:left;
  font-weight:700;
  color:#1e40af;
  background:#eff6ff;
  border-bottom:1px solid #bfdbfe;
  padding:10px 11px;
  white-space:nowrap;
}
.run-review-table td{
  padding:10px 11px;
  border-bottom:1px solid #e2e8f0;
  color:#334155;
  vertical-align:top;
}
.run-review-table tbody tr:last-child td{
  border-bottom:0;
}

.table-wrap{
  width:100%;
  overflow-x:auto;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
}
.data-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  min-width:620px;
}
.data-table th{
  text-align:left;
  font-weight:700;
  color:#1f2937;
  background:#f8fafc;
  border-bottom:1px solid #e5e7eb;
  padding:10px 11px;
  white-space:nowrap;
}
.data-table td{
  padding:10px 11px;
  border-bottom:1px solid #eef2f7;
  color:#334155;
  vertical-align:top;
}
.data-table tbody tr:last-child td{
  border-bottom:0;
}
.run-review-state{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  border:1px solid transparent;
  padding:2px 9px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.01em;
}
.run-review-state-rich{
  color:#166534;
  background:#dcfce7;
  border-color:#86efac;
}
.run-review-state-good{
  color:#1d4ed8;
  background:#dbeafe;
  border-color:#93c5fd;
}
.run-review-state-basic{
  color:#92400e;
  background:#fef3c7;
  border-color:#fcd34d;
}
.run-review-state-missing{
  color:#991b1b;
  background:#fee2e2;
  border-color:#fca5a5;
}
.run-qbank-questions{
  display:grid;
  gap:10px;
}
.run-qbank-question-card{
  border:1px solid #dbeafe;
  border-radius:10px;
  background:#f8fbff;
  padding:10px 11px;
  display:grid;
  gap:8px;
}
.run-qbank-priority{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  border-radius:999px;
  padding:2px 8px;
  font-size:10px;
  font-weight:700;
  letter-spacing:.03em;
  color:#1d4ed8;
  background:#dbeafe;
}
.run-qbank-question-text{
  font-size:13px;
  font-weight:600;
  color:#0f172a;
  line-height:1.5;
}
.run-qbank-context-card{
  border:1px solid #bfdbfe;
  border-radius:8px;
  background:#eff6ff;
  padding:8px 10px;
  display:grid;
  gap:6px;
}
.run-qbank-context-title{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#1d4ed8;
}
.run-qbank-context-line{
  font-size:12px;
  color:#1f2937;
  line-height:1.45;
}
.run-qbank-context-details summary{
  cursor:pointer;
  font-size:11px;
  font-weight:600;
  color:#1d4ed8;
}
.run-qbank-context-grid{
  margin-top:6px;
  display:grid;
  gap:8px;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
}
.run-qbank-context-kicker{
  font-size:11px;
  font-weight:600;
  color:#334155;
  margin-bottom:4px;
}
.run-qbank-context-list{
  margin:0;
  padding-left:16px;
  display:grid;
  gap:3px;
  color:#1f2937;
  font-size:12px;
}
.run-qbank-context-empty{
  font-size:12px;
  color:#64748b;
}
.run-qbank-context-meta{
  margin-top:6px;
  font-size:11px;
  color:#64748b;
}
.run-qbank-answer{
  margin-top:0;
}
.run-qbank-actions{
  margin-top:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.run-qbank-file-block{
  display:grid;
  gap:6px;
}
.run-qbank-label{
  font-size:12px;
  font-weight:600;
  color:#334155;
}
.run-qbank-select{
  width:100%;
  border:1px solid #bfdbfe;
  border-radius:8px;
  background:#fff;
  color:#1f2937;
  padding:8px 10px;
  font-size:12px;
  line-height:1.4;
  appearance:none;
}
.run-qbank-select:focus{
  outline:none;
  border-color:#60a5fa;
  box-shadow:0 0 0 2px rgba(59,130,246,0.16);
}
.run-qbank-upload-link{
  font-size:11px;
  color:#1d4ed8;
  font-weight:600;
}
.run-qbank-upload-link:hover{
  text-decoration:underline;
}
.run-qbank-cant-reason{
  margin-top:8px;
  display:grid;
  gap:6px;
}
.run-launch-actions{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.run-geo-reminder-panel{
  margin:10px 0 12px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
  padding:11px 12px;
  display:grid;
  gap:8px;
}
.run-geo-reminder-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.run-geo-reminder-title{
  font-size:13px;
  font-weight:700;
  color:#1e3a8a;
}
.run-geo-reminder-state{
  font-size:11px;
  line-height:1.4;
  border-radius:999px;
  padding:3px 9px;
  font-weight:700;
  border:1px solid transparent;
}
.run-geo-reminder-text{
  margin:0;
  font-size:12px;
  color:#334155;
  line-height:1.55;
}
.run-geo-reminder-media{
  display:flex;
  justify-content:center;
}
.run-geo-reminder-image{
  width:100%;
  max-width:680px;
  border-radius:10px;
  border:1px solid #cbd5e1;
  background:#fff;
}
.run-geo-reminder-fallback{
  width:100%;
  border:1px dashed #94a3b8;
  border-radius:10px;
  background:#f8fafc;
  color:#334155;
  font-size:12px;
  line-height:1.55;
  padding:10px 12px;
}
.run-geo-launch-confirm{
  border:1px solid #fcd34d;
  background:#fffbeb;
  border-radius:10px;
  padding:10px;
  display:grid;
  gap:8px;
}
.run-geo-launch-confirm-text{
  margin:0;
  font-size:12px;
  color:#78350f;
  line-height:1.55;
}
.run-geo-launch-confirm-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.run-geo-reminder-missing .run-geo-reminder-state{
  color:#92400e;
  background:#fef3c7;
  border-color:#fcd34d;
}
.run-geo-reminder-ready .run-geo-reminder-state{
  color:#166534;
  background:#dcfce7;
  border-color:#86efac;
}
.run-geo-chip-focus{
  box-shadow:0 0 0 2px rgba(37,99,235,0.25);
  transition:box-shadow .2s ease;
}
.run-state-line{
  margin-top:8px;
  margin-bottom:0;
}
.run-processing-card{
  background:linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
  border-color:#cfe2ff;
}
.run-network-shell{
  width:100%;
  display:flex;
  justify-content:center;
  margin:10px 0 8px;
}
.run-network-canvas-wrap{
  width:min(100%, 760px);
  aspect-ratio:4/3;
  border-radius:12px;
  border:1px solid #bfdbfe;
  background:#eef5ff;
  overflow:hidden;
}
.run-network-canvas{
  width:100%;
  height:100%;
  display:block;
}
.run-processing-status{
  margin:0;
}
.run-owner-workflow-phases{
  display:grid;
  gap:10px;
}
.run-owner-phase{
  border:1px solid #dbeafe;
  border-radius:10px;
  background:#f8fbff;
  padding:10px;
}
.run-owner-phase-head{
  display:flex;
  gap:8px;
  justify-content:space-between;
  align-items:flex-start;
  flex-wrap:wrap;
}
.run-owner-phase-title{
  font-size:13px;
  font-weight:700;
  color:#1e3a8a;
  display:flex;
  align-items:center;
  gap:6px;
}
.run-owner-phase-stats{
  font-size:11px;
  color:#475569;
}
.run-owner-phase-progress{
  margin-top:8px;
  width:100%;
  height:8px;
  border-radius:999px;
  background:#dbeafe;
  overflow:hidden;
}
.run-owner-phase-progress>span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb 0%,#38bdf8 100%);
}
.run-owner-reconcile-sections{
  margin-top:10px;
  display:grid;
  gap:10px;
}
.run-owner-reconcile-section{
  border:1px solid #dbeafe;
  background:#ffffff;
  border-radius:8px;
  padding:8px;
}
.run-owner-reconcile-title{
  font-size:12px;
  font-weight:700;
  color:#1e3a8a;
  margin:0 0 6px;
}
.run-owner-reconcile-table{
  margin:0;
}
.run-owner-phase-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:2px 7px;
  font-size:10px;
  font-weight:700;
  border:1px solid transparent;
}
.run-owner-phase-badge-done{color:#166534;background:#dcfce7;border-color:#86efac;}
.run-owner-phase-badge-running{color:#1d4ed8;background:#dbeafe;border-color:#93c5fd;}
.run-owner-phase-badge-failed{color:#991b1b;background:#fee2e2;border-color:#fca5a5;}
.run-owner-phase-badge-pending{color:#475569;background:#f1f5f9;border-color:#cbd5e1;}
.run-owner-phase-steps{
  margin-top:8px;
  display:grid;
  gap:6px;
}
.run-owner-steps-table{
  width:100%;
  border-collapse:collapse;
  font-size:11px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:8px;
  overflow:hidden;
}
.run-owner-steps-table th,
.run-owner-steps-table td{
  border-bottom:1px solid #e2e8f0;
  padding:7px 8px;
  text-align:left;
  vertical-align:top;
}
.run-owner-steps-table th{
  color:#1e3a8a;
  background:#eff6ff;
  font-weight:700;
}
.run-owner-steps-table tbody tr:last-child td{
  border-bottom:0;
}
.run-owner-step-body{
  border-top:1px solid #eef2ff;
  padding:9px 10px;
  background:#fff;
}
.run-owner-step-timing{
  font-size:11px;
  color:#475569;
  margin-bottom:8px;
}
.run-owner-inline-flag{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:1px 6px;
  border-radius:999px;
  border:1px solid #fca5a5;
  background:#fee2e2;
  color:#991b1b;
  font-size:10px;
  font-weight:700;
}
.run-owner-step-details{
  min-width:180px;
}
.run-owner-step-details > summary{
  cursor:pointer;
  list-style:none;
  color:#1d4ed8;
  font-weight:600;
}
.run-owner-step-details > summary::-webkit-details-marker{display:none;}
.run-owner-pre{
  margin:6px 0 0;
  white-space:pre-wrap;
  word-break:break-word;
  font-size:11px;
  line-height:1.45;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
  padding:8px;
  color:#0f172a;
}
.run-owner-llm-call{
  margin-top:8px;
  border:1px solid #dbeafe;
  border-radius:8px;
  background:#f8fbff;
  padding:8px;
}
.run-owner-llm-call>summary{
  cursor:pointer;
  list-style:none;
  font-size:11px;
  color:#1e3a8a;
  font-weight:600;
}
.run-owner-llm-call>summary::-webkit-details-marker{display:none;}
.run-owner-llm-meta{
  margin-top:7px;
  display:grid;
  gap:4px;
  font-size:11px;
  color:#334155;
}
.run-owner-llm-grid{
  margin-top:8px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:8px;
}
.run-owner-mini-kicker{
  font-size:10px;
  font-weight:700;
  color:#1e3a8a;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.run-owner-runs-wrap{
  margin-top:10px;
  border-top:1px dashed #bfdbfe;
  padding-top:10px;
}
.run-owner-runs-table{
  width:100%;
  border-collapse:collapse;
  font-size:11px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:8px;
  overflow:hidden;
}
.run-owner-runs-table th,
.run-owner-runs-table td{
  border-bottom:1px solid #e2e8f0;
  padding:7px 8px;
  text-align:left;
}
.run-owner-runs-table th{
  color:#1e3a8a;
  background:#eff6ff;
  font-weight:700;
}
.run-owner-runs-table tbody tr:last-child td{
  border-bottom:0;
}
.run-owner-delete-btn{
  white-space:nowrap;
}

/* Project modals */
.project-modal{
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}
.project-modal-open{
  display:block;
}
.project-modal-overlay{
  position:absolute;
  inset:0;
  background: rgba(15, 23, 42, 0.42);
}
.project-modal-dialog{
  position: relative;
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow:auto;
  border-radius: 14px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
  padding: 16px;
}
.project-modal-close{
  position:absolute;
  top:10px;
  right:10px;
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:#475569;
  cursor:pointer;
}
.project-modal-title{
  margin: 0 34px 4px 0;
  font-size:18px;
  font-weight:700;
  color:#111827;
}
.project-modal-subtitle{
  margin:0 0 12px;
  font-size:12px;
  color:#4b5563;
}
.project-modal-grid{
  display:grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap:12px;
}
.project-modal-card{
  border:1px solid var(--border);
  border-radius:12px;
  background: var(--surface-2);
  padding:10px 12px;
}
.project-modal-card-title{
  margin:0 0 8px;
  font-size:13px;
  font-weight:700;
  color:#111827;
}
.project-modal-metrics{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  font-size:12px;
  color:#1f2937;
  margin-bottom:10px;
}
.project-modal-table-wrap{
  margin-top:8px;
}
.project-modal-table-title{
  font-size:11px;
  font-weight:700;
  color:#64748b;
  margin-bottom:4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.project-modal-table{
  width:100%;
  border-collapse: collapse;
  font-size:12px;
}
.project-modal-table th{
  text-align:left;
  background:#eff6ff;
  color:#1e40af;
  border-bottom:1px solid #bfdbfe;
  padding:7px 8px;
  font-weight:700;
}
.project-modal-table td{
  border-bottom:1px solid #e2e8f0;
  color:#334155;
  padding:7px 8px;
}
.project-modal-form{
  display:grid;
  gap:8px;
}
.project-modal-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.project-modal-provider-note{
  margin:4px 0 2px;
  font-size:11px;
  color:#475569;
}
.project-modal-copy-row{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:8px;
}
.project-collaborator-list{
  display:grid;
  gap:8px;
}
.project-collaborator-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
  padding:7px 8px;
}
.project-collaborator-text{
  font-size:12px;
  color:#334155;
  line-height:1.45;
}
.project-modal-body-lock{
  overflow:hidden;
}
.project-upload-progress-dialog{
  width:min(620px, calc(100vw - 28px));
  max-height:none;
}
.project-upload-progress-wrap{
  margin-top:8px;
  padding:10px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#eff6ff;
}
.project-upload-progress-bar{
  height:10px;
  border-radius:999px;
  background:#dbeafe;
  overflow:hidden;
}
.project-upload-progress-fill{
  height:100%;
  width:0;
  border-radius:999px;
  background:linear-gradient(90deg, #2563eb, #1d4ed8);
  transition:width .18s ease-out;
}
.project-upload-progress-meta{
  margin-top:8px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size:12px;
  color:#1e3a8a;
}
.project-upload-progress-state{
  margin:8px 0 0;
  font-size:12px;
  color:#475569;
}
.project-upload-progress-indeterminate .project-upload-progress-fill{
  width:40%;
  animation:kf-upload-progress-indeterminate 1.2s ease-in-out infinite;
}
@keyframes kf-upload-progress-indeterminate{
  0%{transform:translateX(-120%)}
  100%{transform:translateX(250%)}
}

/* ================================================================
   KnapFlux shell (kf-*) — simplified + consistent with tokens
   ================================================================= */
.kf-body{
  margin: 0;
  background: var(--bg);
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}
.kf-app{min-height:100vh}

.kf-topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  padding: 10px 24px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.kf-topbar-left{display:flex;align-items:center;gap:18px}
.kf-brand-link{display:flex;align-items:center;gap:10px;color:inherit}
.kf-logo{
  width: 52px;height: 32px;border-radius: 10px;
  background: var(--accent);
  color:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow: 0 10px 22px rgba(37,99,235,0.20);
}
.kf-logo-math{
  font-family: "Times New Roman", "STIX Two Math", serif;
  font-style: italic;
  font-size: 15px;
}
.kf-brand-text{display:flex;flex-direction:column;line-height:1.15}
.kf-brand-name{font-size:14px;font-weight:700;color: var(--accent)}
.kf-brand-subtitle{font-size:11px;color: var(--muted)}

.kf-topbar-nav{display:flex;align-items:center;gap:10px;font-size:13px}
.kf-topbar-nav-link{
  color:#374151;
  padding: 6px 10px;
  border-radius: var(--r-pill);
}
.kf-topbar-nav-link:hover{background: var(--surface-3)}
.kf-topbar-nav-link-muted{color: var(--muted-2)}
.kf-admin-kpis{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.kf-admin-kpi{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:3px 7px;
  border-radius:999px;
  border:1px solid #f59e0b;
  background:#fef3c7;
  color:#7c2d12;
  text-decoration:none;
  line-height:1;
}
.kf-admin-kpi:hover{
  background:#fde68a;
}
.kf-admin-kpi-icon{
  font-size:12px;
}
.kf-admin-kpi-value{
  min-width:18px;
  text-align:center;
  font-size:11px;
  font-weight:700;
  color:#b91c1c;
  background:#fff7ed;
  border:1px solid #fca5a5;
  border-radius:999px;
  padding:1px 5px;
}
.kf-admin-kpi-tip{
  position:absolute;
  left:50%;
  top:calc(100% + 8px);
  transform:translateX(-50%);
  z-index:30;
  min-width:220px;
  max-width:280px;
  padding:7px 9px;
  border-radius:8px;
  border:1px solid #cbd5e1;
  background:#111827;
  color:#f8fafc;
  font-size:11px;
  line-height:1.35;
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease;
  box-shadow:0 8px 18px rgba(0,0,0,.20);
}
.kf-admin-kpi:hover .kf-admin-kpi-tip,
.kf-admin-kpi:focus .kf-admin-kpi-tip,
.kf-admin-kpi:focus-visible .kf-admin-kpi-tip{
  opacity:1;
}

.kf-topbar-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap: 2px;
  font-size: 11px;
  color: #4b5563;
}
.kf-topbar-account-main{display:flex;align-items:center;gap:6px}
.kf-dot-online{width:7px;height:7px;border-radius: var(--r-pill);background: #22c55e}
.kf-topbar-account-meta{display:flex;flex-wrap:wrap;gap:6px;color: var(--muted)}
.kf-topbar-sep{color:#d1d5db}
.kf-topbar-account-main-row{display:flex;align-items:center;gap:10px}

.kf-topbar-logout{
  font-size: 11px;
  padding: 6px 10px;
  border-color: var(--border);
  background: var(--surface-2);
  color: #4b5563;
  box-shadow: none;
}
.kf-topbar-logout:hover{background: var(--surface-3)}

.kf-main-layout{
  display:grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items:flex-start;
  padding: 16px 24px 24px;
}
.kf-main-layout-upload-focus{
  grid-template-columns: minmax(0, 1fr);
}
.kf-sidebar, .kf-main-content{min-width:0}

/* Sidebar cards (kf-*) */
.kf-sidebar-card{
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-1);
}
.kf-sidebar-card-project{
  border-color:#bfdbfe;
  background:#f8fbff;
}
.kf-sidebar-kicker{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted-2);
  margin-bottom: 2px;
}
.kf-sidebar-title{font-size: 14px;font-weight: 700;color: #111827}
.kf-sidebar-subtitle{font-size: 11px;color: var(--muted);margin-bottom: 6px}
.kf-sidebar-meta{font-size: 11px;color: #4b5563;display:flex;flex-direction:column;gap:2px;margin-top:4px}
.kf-sidebar-list{list-style:none;margin:6px 0 0;display:flex;flex-direction:column;gap:3px;font-size:12px}
.kf-sidebar-list a:hover{text-decoration: underline}
.kf-sidebar-footer{margin-top: 8px}
.kf-sidebar-link-logout{font-size:11px;color: var(--danger)}
.kf-sidebar-link-logout:hover{text-decoration: underline}
.kf-sidebar-account-link{
  color: var(--accent);
  font-weight: 600;
}
.kf-sidebar-account-link:hover{
  color: var(--accent-strong);
  text-decoration: underline;
}
.kf-sidebar-message-link{
  color:#1d4ed8;
  font-weight:600;
}
.kf-sidebar-message-link:hover{
  text-decoration:underline;
}
.kf-badge-muted{
  display:inline-flex;align-items:center;
  border-radius: var(--r-pill);
  padding: 2px 7px;
  background: #e5e7eb;
  color: var(--muted);
  font-size: 10px;
}
.kf-sidebar-link-small{font-size:11px;color: var(--accent)}
.kf-sidebar-link-small:hover{text-decoration: underline}

/* ================================================================
   Workflow (project-workflow)
   ================================================================= */
.project-workflow{
  display:flex;
  gap: 8px;
  padding: 10px 0 4px;
  overflow-x: auto;
}
.project-workflow-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  overflow: visible;
}
.workflow-step{
  min-width: 130px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  flex-shrink: 0;
}
.workflow-step-label{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#111827;margin-bottom:6px}
.workflow-step-bar{
  height: 4px;
  border-radius: var(--r-pill);
  background: #e5e7eb;
  overflow:hidden;
  margin-bottom: 6px;
}
.workflow-step-bar-fill{height:100%;background: var(--accent);width:10%;transition: width .2s ease-out}
.workflow-step-status{font-size:11px;color: var(--muted)}

.workflow-step-todo .workflow-step-bar-fill{background:#e5e7eb}
.workflow-step-current .workflow-step-bar-fill{background: var(--accent)}
.workflow-step-done .workflow-step-bar-fill{background: var(--good)}

.project-progress-title{
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}
.project-progress-divider{
  margin: 10px 0 12px;
  height: 1px;
  background: linear-gradient(90deg, rgba(37,99,235,0.22), rgba(226,232,240,0.9));
}
.project-section-heading{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:wrap;
}
.project-section-heading-inline{
  display:inline-flex;
  width:auto;
  max-width:100%;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:nowrap;
}
.project-section-heading-inline .project-section-help-btn{
  margin-left:0;
}
.project-section-help-btn{
  border:1px solid #fde68a;
  background:#fefce8;
  color:#92400e;
  border-radius:999px;
  padding:2px 9px;
  font-size:11px;
  cursor:pointer;
}
.project-section-help{
  margin-top:8px;
  margin-bottom:8px;
  border:1px solid #fde68a;
  background:#fffbeb;
  border-radius:10px;
  padding:8px 10px;
}
.project-nav-title-link{
  display:inline-flex;
  align-items:center;
  font-size:18px;
  font-weight:700;
  color: var(--accent);
  margin-bottom:6px;
}
.project-nav-workflow-label{
  font-size:12px;
  color:#4b5563;
  margin-bottom:6px;
  font-weight:600;
}

/* ================================================================
   Project meta quick edit
   ================================================================= */
.project-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
.project-dashboard-static-title{
  color: var(--accent);
  font-size:18px;
  font-weight:700;
}
.project-meta-chip{
  display:inline-flex;
  align-items:center;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1e3a8a;
  border-radius:999px;
  padding:2px 10px;
  font-size:11px;
}
.project-meta-chip-startup{
  font-size:20px;
  font-weight:700;
  padding:6px 14px;
  line-height:1.1;
}
.project-meta-editable{
  cursor:pointer;
  transition:all .12s ease;
}
.project-meta-editable:hover{
  border-color:#93c5fd;
  background:#dbeafe;
}
.project-meta-readonly{
  cursor:default;
  opacity:0.85;
}
.project-meta-help-btn{
  border:1px solid #fde68a;
  background:#fefce8;
  color:#92400e;
  border-radius:999px;
  padding:2px 9px;
  font-size:11px;
  cursor:pointer;
}
.project-meta-help{
  margin-top:8px;
  border:1px solid #fde68a;
  background:#fffbeb;
  border-radius:10px;
  padding:8px 10px;
}
.project-meta-notice{
  margin-top:8px;
  border:1px solid #bbf7d0;
  background:#ecfdf5;
  border-radius:8px;
  padding:6px 8px;
  font-size:11px;
}
.project-meta-hint{
  margin-top:6px;
  font-size:11px;
  color: var(--muted);
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* ================================================================
   Project header V2 (compact + circular journey)
   ================================================================= */
.project-top-v2{
  display:grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr) auto;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}
.project-top-v2-upload-focus{
  grid-template-columns: minmax(246px, 300px) minmax(0, 1fr) auto;
  align-items:stretch;
}
.project-upload-focus-head-main{
  min-width:0;
  display:grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap:12px;
  align-items:stretch;
}
.project-top-v2-meta{
  min-width:0;
}
.project-upload-focus-build-card{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:8px;
  border:1px solid #bfdbfe;
  border-radius:14px;
  background:#f8fbff;
  padding:12px;
  min-height:132px;
  box-shadow:0 8px 18px rgba(15,23,42,0.05);
}
.project-upload-focus-build-title{
  font-size:16px;
  font-weight:700;
  color:#111827;
  line-height:1.25;
}
.project-upload-focus-build-subtitle{
  margin:0;
  font-size:12px;
  color:#4b5563;
  line-height:1.4;
}
.project-upload-focus-build-metric{
  margin-top:auto;
  font-size:12px;
  font-weight:600;
  color:#111827;
  line-height:1.35;
}
.project-upload-focus-build-footer{
  margin-top:4px;
  font-size:12px;
  font-weight:700;
  color:#1f2937;
  display:flex;
  align-items:center;
  gap:6px;
}
.project-meta-v2-lines{
  display:grid;
  gap:6px;
}
.project-meta-v2-line{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}
.project-meta-v2-line-startup{
  gap:8px;
}

.project-journey{
  min-width:0;
}
.project-top-v2-upload-focus .project-journey{
  padding-left:0;
  height:100%;
}
.project-journey-track{
  display:grid;
  grid-template-columns: repeat(9, minmax(86px, 1fr));
  gap:10px;
  align-items:flex-start;
}
.project-top-v2-upload-focus .project-journey-track{
  align-items:stretch;
  min-height:132px;
}
.journey-node{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  text-decoration:none;
  color:inherit;
  border:1px solid transparent;
  border-radius:14px;
  padding:6px 6px 8px;
  min-height:132px;
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.journey-node::before{
  content:'';
  position:absolute;
  left:calc(100% - 2px);
  top:66px;
  width:12px;
  border-top:2px dashed rgba(37, 99, 235, 0.55);
  pointer-events:none;
}
.journey-node:last-child::before{
  display:none;
}
.journey-node:hover{
  border-color: rgba(37, 99, 235, 0.30);
  background: rgba(37, 99, 235, 0.04);
}
.journey-node-active{
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}
.journey-node-title{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  min-height:28px;
  font-size:11px;
  line-height:1.15;
  font-weight:700;
  color:#1e3a8a;
  text-align:center;
}
.journey-node-circle-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
}
.journey-node-circle{
  width:50px;
  height:50px;
  border-radius:999px;
  border:2px solid #93c5fd;
  background:#eff6ff;
  color:#1d4ed8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.85);
}
.journey-node-icon{
  position:relative;
  z-index:2;
  line-height:1;
}
.journey-node-circle-ring{
  border:none;
  background: conic-gradient(var(--journey-ring-color) calc(var(--journey-ring-pct) * 1%), #dbeafe 0);
  position:relative;
}
.journey-node-circle-ring::after{
  content:'';
  position:absolute;
  inset:4px;
  border-radius:999px;
  border:1px solid rgba(37, 99, 235, 0.18);
  background:#eff6ff;
  z-index:1;
}
.journey-node-done .journey-node-circle{
  border-color:#6ee7b7;
  background:#ecfdf5;
  color:#047857;
}
.journey-node-done .journey-node-circle-ring::after{
  border-color: rgba(16, 185, 129, 0.30);
  background:#ecfdf5;
}
.journey-node-meta{
  min-height:30px;
  font-size:10px;
  line-height:1.25;
  color:#475569;
  text-align:center;
}

.project-top-v2-back-wrap{
  display:flex;
  align-items:flex-start;
}
.project-back-vertical{
  display:inline-flex;
  flex-direction:column;
  align-items:flex-end;
  gap:1px;
  min-width:96px;
  text-decoration:none;
}
.project-back-line{
  display:block;
  font-weight:600;
  line-height:1.1;
}
.project-back-line-mid{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.project-back-arrow{
  font-size:15px;
  line-height:1;
}
.kf-tooltip-host{
  position:relative;
}
.kf-tooltip-host[data-kf-tooltip]:hover::after,
.kf-tooltip-host[data-kf-tooltip]:focus-visible::after{
  content: attr(data-kf-tooltip);
  position:absolute;
  left:50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index:35;
  min-width:220px;
  max-width:320px;
  padding:7px 9px;
  border-radius:8px;
  border:1px solid #cbd5e1;
  background:#111827;
  color:#f8fafc;
  font-size:11px;
  line-height:1.35;
  box-shadow:0 8px 18px rgba(0,0,0,.20);
  pointer-events:none;
  white-space:normal;
}
.project-inline-notice{
  margin: 6px 0 12px;
  border:1px solid #bbf7d0;
  background:#ecfdf5;
  border-radius:8px;
  padding:8px 10px;
  font-size:12px;
  color:#065f46;
}
.project-inline-notice-error{
  border-color:#fecaca;
  background:#fef2f2;
  color:#b91c1c;
}
.project-inline-notice-success{
  border-color:#bbf7d0;
  background:#ecfdf5;
  color:#065f46;
}

.checkout-vat-help{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.checkout-vat-help-trigger{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:999px;
  padding:4px 9px;
  font-size:11px;
  line-height:1.2;
  font-weight:600;
  cursor:pointer;
}
.checkout-vat-help-trigger:focus-visible{
  outline:2px solid #93c5fd;
  outline-offset:2px;
}
.checkout-vat-help-popover{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:60;
  width:min(420px, calc(100vw - 28px));
  border:1px solid #cbd5e1;
  background:#ffffff;
  color:#0f172a;
  border-radius:10px;
  padding:11px 12px;
  font-size:12px;
  line-height:1.42;
  box-shadow:0 12px 28px rgba(15,23,42,0.18);
  display:none;
}
.checkout-vat-help-popover strong{
  font-weight:700;
}
.checkout-vat-help.is-open .checkout-vat-help-popover{
  display:block;
}
@media (max-width: 720px){
  .checkout-vat-help{
    width:100%;
    justify-content:flex-start;
  }
  .checkout-vat-help-popover{
    left:0;
    right:auto;
    width:min(420px, calc(100vw - 36px));
  }
}

/* ================================================================
   Prep items (prep-*)
   ================================================================= */
.prep-items{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.prep-item{
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.04);
  overflow: hidden;
}
.prep-item-done{background:#ecfdf5;border-color:#bbf7d0}
.prep-item-accordion{display:block}
.prep-item-summary{
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  cursor:pointer;
  padding:12px;
  position:relative;
}
.prep-item-summary::-webkit-details-marker{display:none}
.prep-item-summary::marker{display:none;content:""}
.prep-item-summary::after{
  content:"+";
  font-size:16px;
  font-weight:700;
  color:#64748b;
  margin-left:auto;
  line-height:1;
}
.prep-item-accordion[open] .prep-item-summary::after{
  content:"−";
}
.prep-item-summary:hover{
  background: rgba(15, 23, 42, 0.02);
}
.prep-item-summary:focus,
.prep-item-summary:focus-visible{
  outline:none;
  box-shadow: inset 0 0 0 2px rgba(37,99,235,0.35);
  border-radius:10px;
}
.prep-item-summary-main{
  min-width:0;
  display:grid;
  gap:4px;
}
.prep-item-title{font-size:12px;font-weight:700;color:#111827}
.prep-item-baseline{font-size:12px;color:#4b5563;line-height:1.5}
.prep-item-badge{font-size:10px;padding:2px 7px;border-radius: var(--r-pill);background: var(--good);color:#fff}
.prep-item-body{
  border-top:1px solid #e5e7eb;
  padding:10px 12px 12px;
  display:grid;
  gap:8px;
}
.prep-item-done .prep-item-body{
  border-top-color:#bbf7d0;
}
.prep-item-paragraph{margin:0;font-size:12px;color:#4b5563;line-height:1.6}
.prep-item-bullets{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:5px;
  color:#334155;
}
.prep-item-bullets li{
  font-size:12px;
  line-height:1.5;
}
.prep-item-closing{
  margin:0;
  font-size:12px;
  color:#111827;
  line-height:1.6;
}
.prep-item-form{margin-top:2px}
.prep-item-note{font-size:11px;color: var(--muted)}
.prep-item-note p{
  margin:0 0 6px;
  line-height:1.5;
}
.prep-item-note p:last-child{margin-bottom:0}

/* ================================================================
   Training V1 (training-*)
   ================================================================= */
.training-hero-card{
  border-color:#bfdbfe;
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.training-hero-note{
  margin-top:6px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  border-radius:10px;
  padding:9px 10px;
  color:#1e3a8a;
  font-size:12px;
  font-weight:700;
}
.training-progress-overview{
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) minmax(0, 1fr);
  gap:12px;
  margin-top:10px;
}
.training-progress-main{
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#ffffff;
  padding:10px;
  display:grid;
  gap:8px;
}
.training-progress-title{
  font-size:13px;
  font-weight:700;
  color:#111827;
}
.training-progress-metric{
  font-size:12px;
  color:#334155;
}
.training-soft-advisory{
  margin:0;
  font-size:11px;
  color:#1f2937;
  line-height:1.5;
}
.training-progress-parts{
  display:grid;
  gap:8px;
}
.training-part-progress{
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#ffffff;
  padding:8px 9px;
  display:grid;
  gap:6px;
}
.training-part-progress-completed{
  border-color:#86efac;
  background:#ecfdf5;
}
.training-part-progress-in_progress{
  border-color:#93c5fd;
  background:#eff6ff;
}
.training-part-progress-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  font-size:11px;
  color:#1f2937;
  line-height:1.45;
}
.training-part-progress-bar{
  height:6px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}
.training-part-progress-bar > span{
  display:block;
  height:100%;
  background:#2563eb;
}
.training-module-items{gap:10px}
.training-module-card{
  border-color:#dbe3ef;
  background:#ffffff;
}
.training-module-in_progress{
  border-color:#93c5fd;
  box-shadow:0 0 0 2px rgba(37,99,235,0.10);
}
.training-module-meta{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  gap:6px;
  max-width:58%;
}
.training-module-badge{
  border-radius:999px;
  border:1px solid #cbd5e1;
  background:#f8fafc;
  font-size:10px;
  font-weight:700;
  color:#334155;
  padding:2px 7px;
  white-space:nowrap;
}
.training-module-status-completed{
  border-color:#86efac;
  background:#ecfdf5;
  color:#166534;
}
.training-module-status-in_progress{
  border-color:#93c5fd;
  background:#eff6ff;
  color:#1e3a8a;
}
.training-module-status-not_started{
  border-color:#cbd5e1;
  background:#f8fafc;
  color:#334155;
}
.training-module-body{
  gap:10px;
}
.training-subsections-shell,
.training-relevant-areas,
.training-glossary-slot{
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
  padding:8px 9px;
}
.training-block-title{
  font-size:11px;
  font-weight:700;
  color:#1f2937;
  margin-bottom:6px;
}
.training-subsections-list{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:4px;
  color:#334155;
}
.training-subsections-list li{
  font-size:11px;
  line-height:1.45;
}
.training-rich-module{
  display:grid;
  gap:8px;
}
.training-rich-section{
  border:1px solid #dbe3ef;
  border-radius:10px;
  background:#ffffff;
  padding:9px 10px;
}
.training-rich-intro{
  border-color:#bfdbfe;
  background:#eff6ff;
}
.training-rich-closing{
  border-color:#fcd34d;
  background:#fffbeb;
}
.training-rich-title{
  margin:0 0 6px;
  font-size:12px;
  font-weight:700;
  color:#0f172a;
}
.training-rich-paragraph{
  margin:0 0 7px;
  font-size:12px;
  line-height:1.58;
  color:#334155;
}
.training-rich-paragraph:last-child{
  margin-bottom:0;
}
.training-rich-list{
  margin:0 0 8px;
  padding-left:18px;
  display:grid;
  gap:4px;
  color:#334155;
}
.training-rich-list li{
  font-size:12px;
  line-height:1.5;
}
.training-placeholder-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}
.training-placeholder-card{
  border:1px solid #dbe3ef;
  border-radius:10px;
  background:#ffffff;
  padding:8px 9px;
  display:grid;
  gap:4px;
}
.training-placeholder-card h4{
  margin:0;
  font-size:11px;
  color:#0f172a;
}
.training-placeholder-card p{
  margin:0;
  font-size:11px;
  line-height:1.45;
  color:#475569;
}
.training-area-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.training-area-chip{
  border-radius:999px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:10px;
  font-weight:700;
  padding:2px 8px;
}
.training-glossary-slot p{
  margin:0;
  font-size:11px;
  color:#475569;
  line-height:1.5;
}
.training-final-state{
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#ffffff;
  padding:12px;
}
.training-final-state h3{
  margin:0;
  font-size:16px;
  color:#111827;
}
.training-final-state p{
  margin:6px 0 0;
  font-size:12px;
  line-height:1.5;
  color:#4b5563;
}
.training-final-state-complete{
  border-color:#86efac;
  background:#ecfdf5;
}

/* ================================================================
   Manifesto (manifesto-*)
   ================================================================= */
.manifesto-lead{font-size:13px;color:#111827;line-height:1.55;margin-bottom:10px}
.manifesto-section-title{font-size:14px;font-weight:700;margin:10px 0 4px;color:#111827}
.manifesto-paragraph{font-size:12px;color:#4b5563;margin:4px 0 6px}
.manifesto-quote{
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 12px;
  color: #111827;
}
.manifesto-highlight{font-size:12px;color:#111827;margin:6px 0 8px}
.manifesto-list{margin-top:4px}

/* ================================================================
   Upload (upload-*) — simplified but keeps all your selectors
   ================================================================= */
.upload-summary{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}
.upload-summary-main{flex:1}
.upload-summary-title{font-size:12px;font-weight:700;margin-bottom:4px;color:#111827}

.upload-summary-bar,
.upload-card-bar{
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: var(--r-pill);
  background: #e5e7eb;
  overflow:hidden;
}
.upload-summary-bar-fill,
.upload-card-bar-fill{
  height:100%;
  background: var(--accent);
  transition: width .2s ease-out;
}
.upload-summary-meta,
.upload-card-meta{
  font-size:11px;
  color:#4b5563;
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:4px;
}
.upload-summary-sep{color:#d1d5db}
.upload-summary-hints{font-size:11px;color: var(--muted);display:flex;flex-direction:column;gap:2px}

.upload-focus-section{
  margin-top: 6px;
}
.upload-focus-shell{
  display:grid;
  grid-template-columns: minmax(246px, 300px) minmax(0, 1fr);
  gap:16px;
  align-items:flex-start;
}
.upload-focus-rail{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}
.upload-focus-empty{
  font-size:12px;
  color:var(--muted);
  border:1px dashed var(--border);
  border-radius:12px;
  background:#f8fafc;
  padding:12px;
}
.upload-focus-card-vocabulary{
  border-color:#93c5fd;
  background:linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  box-shadow:inset 3px 0 0 #2563eb, 0 8px 16px rgba(15,23,42,0.06);
}
.upload-vocabulary-card{
  margin-top:0 !important;
}
.upload-vocabulary-search-shell{
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:#f8fbff;
  padding:12px;
}
.upload-vocabulary-search-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.upload-vocabulary-search-label{
  display:block;
  font-size:12px;
  font-weight:700;
  color:#1e3a8a;
}
.upload-vocabulary-search-count{
  font-size:11px;
  font-weight:700;
  color:#475569;
}
.upload-vocabulary-search-input{
  width:100%;
  margin-top:7px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  font-size:13px;
  padding:10px 11px;
  color:#0f172a;
  background:#ffffff;
}
.upload-vocabulary-search-input:focus{
  outline:none;
  border-color:#2563eb;
  box-shadow:0 0 0 2px rgba(37,99,235,0.16);
}
.upload-vocabulary-live{
  margin-top:8px;
  border:1px solid #bfdbfe;
  border-radius:10px;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:12px;
  line-height:1.55;
  padding:9px 10px;
}
.upload-vocabulary-results{
  display:grid;
  gap:6px;
  margin-top:8px;
}
.upload-glossary-result{
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#ffffff;
  text-align:left;
  padding:8px 10px;
  display:grid;
  gap:3px;
  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.upload-glossary-result:hover{
  border-color:#93c5fd;
  box-shadow:0 0 0 2px rgba(37,99,235,0.1);
}
.upload-glossary-result strong{
  font-size:12px;
  color:#0f172a;
  line-height:1.35;
}
.upload-glossary-result span{
  font-size:11px;
  color:#64748b;
  line-height:1.35;
}
.upload-glossary-result-primary{
  border-color:#60a5fa;
  background:#f8fbff;
}
.upload-vocabulary-empty{
  margin-top:10px;
  font-size:12px;
  color:#64748b;
}
.upload-vocabulary-chapters{
  margin-top:10px;
  display:grid;
  gap:10px;
}
.upload-glossary-chapter{
  border:1px solid #dbe3ef;
  border-radius:12px;
  background:#ffffff;
}
.upload-glossary-chapter + .upload-glossary-chapter{
  margin-top:0;
}
.upload-glossary-chapter > summary,
.upload-glossary-subchapter > summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.upload-glossary-chapter > summary{
  padding:9px 11px;
  font-size:12px;
  font-weight:700;
  color:#1f2937;
}
.upload-glossary-subchapter > summary{
  padding:8px 10px;
  font-size:11px;
  font-weight:700;
  color:#334155;
}
.upload-glossary-count{
  font-size:11px;
  color:#64748b;
  font-weight:600;
  white-space:nowrap;
}
.upload-glossary-chapter-body{
  padding:0 10px 10px;
  display:grid;
  gap:8px;
}
.upload-vocabulary-chapter-body{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items:start;
}
.upload-glossary-subchapter{
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#f8fafc;
}
.upload-glossary-term-list{
  margin:0;
  padding:0 10px 10px;
  list-style:none;
  display:grid;
  gap:8px;
}
.upload-vocabulary-term-list{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.upload-glossary-term{
  border:1px solid #e2e8f0;
  border-radius:9px;
  background:#ffffff;
  padding:8px 9px;
  display:grid;
  gap:3px;
}
.upload-glossary-term strong{
  font-size:12px;
  color:#0f172a;
  line-height:1.35;
}
.upload-glossary-term span{
  font-size:11px;
  color:#475569;
  line-height:1.45;
}
.upload-glossary-term-hit{
  border-color:#60a5fa;
  box-shadow:0 0 0 2px rgba(37,99,235,0.12);
}
.upload-focus-card{
  display:block;
  text-decoration:none;
  border-radius:14px;
  border:1px solid #cbd5e1;
  background:#ffffff;
  padding:10px 12px;
  color:#0f172a;
  box-shadow:0 8px 16px rgba(15,23,42,0.06);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.upload-focus-card:hover{
  border-color:#93c5fd;
  box-shadow:0 10px 20px rgba(30,64,175,0.12);
  transform:translateY(-1px);
}
.upload-focus-card-active{
  border:2px solid #1e3a8a;
  box-shadow:0 0 0 2px rgba(30,58,138,0.18), 0 12px 24px rgba(30,64,175,0.12);
}
.upload-focus-card-missing{
  background:#f8fafc;
}
.upload-focus-card-basic{
  background:#eff6ff;
  border-color:#bfdbfe;
}
.upload-focus-card-good{
  background:#ecfdf5;
  border-color:#86efac;
}
.upload-focus-card-rich{
  background:#dcfce7;
  border-color:#22c55e;
}
.upload-focus-card-line{
  line-height:1.35;
}
.upload-focus-card-line + .upload-focus-card-line{
  margin-top:3px;
}
.upload-focus-card-line-kicker{
  font-size:11px;
  font-weight:700;
  color:#334155;
}
.upload-focus-card-line-title{
  font-size:13px;
  font-weight:700;
  color:#0f172a;
}
.upload-focus-card-line-meta{
  font-size:11px;
  color:#475569;
}
.upload-focus-workspace{
  min-width:0;
}
.upload-focus-snapshot-card{
  margin-top:0 !important;
}
.upload-focus-snapshot-title{
  font-size:12px;
  font-weight:700;
  color:#111827;
  margin:2px 0 8px;
}
.upload-focus-snapshot-table-wrap{
  margin-top:2px;
}
.upload-focus-snapshot-table .upload-focus-snapshot-metric{
  font-weight:700;
  color:#1f2937;
}
.upload-focus-snapshot-cta{
  margin-top:10px;
  margin-bottom:0;
}
.upload-focus-workspace > .card{
  margin-top:0 !important;
}
.upload-focus-workspace .upload-section-bottom > .upload-story-subtitle{
  display:none;
}

.upload-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.upload-card{
  display:flex;
  flex-direction:column;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 10px 12px;
  min-height: 190px;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.04);
}
.upload-card-basic{background:#eff6ff;border-color:#bfdbfe}
.upload-card-good{background:#ecfdf5;border-color:#bbf7d0}
.upload-card-rich{background:#ecfdf5;border-color:#22c55e}
.upload-card-kicker{font-size:11px;font-weight:700;color:var(--muted);margin-bottom:3px}
.upload-card-title{font-size:13px;font-weight:700;color:#111827;line-height:1.25;margin-bottom:4px}
.upload-card-desc{margin:0 0 8px;font-size:11px;color:#4b5563;line-height:1.4}
.upload-card-fill-summary{font-size:11px;font-weight:600;color:#1f2937;margin-top:2px}
.upload-card-actions{margin-top:auto;padding-top:8px}

.upload-story-layout{
  display:grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-top: 6px;
}
.upload-story-col{font-size:12px;color:#4b5563}
.upload-story-subtitle{font-size:13px;font-weight:700;color:#111827;margin:0 0 4px}
.upload-story-block{
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.upload-story-block-title{font-size:12px;font-weight:700;margin-bottom:6px;color:#111827}
.upload-story-empty{font-size:11px;color: var(--muted-2);margin:0}
.upload-text-preview-note{
  display:inline-block;
  margin-top:4px;
  font-size:11px;
  color:#64748b;
}
.upload-story-list{list-style:none;margin:0;font-size:11px}
.upload-story-list li{margin-bottom:4px}
.upload-story-meta{color: var(--muted-2);margin-left:4px}
.upload-story-label{font-size:11px;font-weight:600;display:block;margin-bottom:6px}

.upload-story-input{
  display:block;
  width:100%;
  font-size:11px;
  cursor:pointer;
  color:#111827;
}
.upload-story-input::file-selector-button,
.upload-story-input::-webkit-file-upload-button{
  font-size: 11px;
  border: none;
  margin-right: 8px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.upload-story-input:hover::file-selector-button,
.upload-story-input:hover::-webkit-file-upload-button{
  background: var(--accent-strong);
}

.upload-story-textarea{
  width:100%;
  font-size:11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 12px;
  resize: vertical;
}
.upload-section-layout{display:flex;flex-direction:column;gap:12px}
.upload-section-top{
  display:grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
  gap: 16px;
}
.upload-section-bottom{
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 4px;
}
.upload-compact-single-line{
  font-size:13px;
  font-weight:700;
  color:#0f172a;
  line-height:1.45;
  margin-bottom:8px;
}
.upload-compact-tip-line{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.upload-compact-tip-line-sep{
  font-size:11px;
  color:#94a3b8;
}
.upload-compact-tip-inline{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.upload-compact-tip-inline-label{
  font-size:12px;
  font-weight:700;
  color:#334155;
}
.upload-compact-title-line{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
}
.upload-compact-card-number{
  font-size:12px;
  font-weight:700;
  color:#1e40af;
}
.upload-compact-title-text{
  font-size:13px;
  font-weight:700;
  color:#111827;
}
.upload-compact-resume-line{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:6px;
  margin-bottom:8px;
  font-size:12px;
}
.upload-compact-resume-label{
  font-weight:700;
  color:#334155;
}
.upload-compact-resume-text{
  color:#475569;
  flex:1;
}
.upload-compact-tip-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  margin:6px 0;
}
.upload-compact-tip-label{
  font-size:12px;
  font-weight:700;
  color:#334155;
}
.upload-compact-tip-btn,
.upload-provided-toggle-btn{
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1e40af;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  padding:4px 10px;
  cursor:pointer;
}
.upload-compact-tip-btn:hover,
.upload-provided-toggle-btn:hover{
  background:#dbeafe;
}
.upload-compact-tip-panel,
.upload-compact-provided-panel{
  margin:6px 0 10px;
  padding:10px 12px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
}
.upload-compact-provided-metrics{
  font-size:12px;
  color:#334155;
  font-weight:700;
  margin:4px 0 8px;
}
.upload-compact-provided-line{
  font-size:12px;
  color:#334155;
  font-weight:700;
  line-height:1.4;
  margin-bottom:6px;
}
.upload-compact-text-note{
  font-size:11px;
  font-weight:400;
  font-style:italic;
  color:#64748b;
  margin-left:6px;
}

/* ================================================================
   Responsive
   ================================================================= */
@media (max-width: 980px){
  .startup-main{grid-template-columns: 1fr}
  .startup-sidebar{order:2}
  .project-layout{grid-template-columns: 1fr}
  .project-top-v2{grid-template-columns:1fr}
  .project-top-v2-back-wrap{justify-content:flex-end}
  .project-journey-track{
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap:10px 8px;
  }
  .journey-node{
    min-height:126px;
    padding:5px 5px 7px;
  }
  .journey-node::before{display:none}
  .kf-main-layout{grid-template-columns: 1fr}
  .kf-admin-kpi-tip{left:0;transform:none}
  .messages-layout{grid-template-columns:1fr}
  .messages-thread-list{max-height:320px}
  .project-workflow-grid{grid-template-columns: repeat(2, minmax(0, 1fr))}
  .project-modal-grid{grid-template-columns:1fr}
  .run-launch-actions{flex-direction:column;align-items:stretch}
  .run-geo-launch-confirm-actions{flex-direction:column;align-items:stretch}
  .run-qbank-actions{flex-direction:column;align-items:stretch}
  .run-owner-llm-grid{grid-template-columns:1fr}
  .project-upload-progress-meta{flex-direction:column;align-items:flex-start}
  .training-progress-overview{grid-template-columns:1fr}
  .training-module-meta{
    max-width:none;
    justify-content:flex-start;
  }
}
@media (max-width: 900px){
  .project-top-v2-upload-focus{
    grid-template-columns:1fr;
  }
  .project-upload-focus-head-main{
    grid-template-columns:1fr;
  }
  .upload-focus-shell{grid-template-columns:1fr}
  .upload-focus-rail{
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:8px;
  }
  .upload-vocabulary-chapter-body{grid-template-columns:1fr}
  .upload-vocabulary-term-list{grid-template-columns:1fr}
  .upload-story-layout{grid-template-columns: 1fr}
  .upload-section-top{grid-template-columns: 1fr}
  .training-placeholder-grid{grid-template-columns:1fr}
  .home-proof-grid{grid-template-columns:1fr}
  .home-boundaries-grid{grid-template-columns:1fr}
  .home-faq-grid{grid-template-columns:1fr}
  .messages-guide-grid{grid-template-columns:1fr}
  .messages-compose-grid{grid-template-columns:1fr}
}
@media (max-width: 720px){
  .upload-focus-rail{grid-template-columns:1fr}
  .upload-compact-tip-line{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
  }
  .startup-nav{flex-wrap:wrap;gap:8px}
  .nav-center{display:none}
  .kf-topbar-nav{width:100%}
  .kf-admin-kpis{width:100%;justify-content:flex-start}
  .project-journey-track{
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap:8px 6px;
  }
  .journey-node{
    min-height:120px;
    border-radius:10px;
    padding:4px 4px 6px;
  }
  .journey-node-title{font-size:10px}
  .journey-node-circle{
    width:44px;
    height:44px;
    font-size:18px;
  }
  .journey-node-meta{
    font-size:9px;
    min-height:26px;
  }
  .project-back-vertical{
    min-width:86px;
    font-size:11px;
  }
  .grid-3{grid-template-columns: 1fr}
  .projects-grid{grid-template-columns: 1fr}
  .project-mini-timeline-grid{grid-template-columns: 1fr}
  .home-step-grid{grid-template-columns:1fr}
  .home-upsell-lane{grid-template-columns:1fr}
  .home-deep-hero{padding:12px}
  .home-final-cta h2{font-size:18px}
  .project-workflow-grid{grid-template-columns: 1fr}
  .run-review-table{min-width:0}
  .run-review-table th,.run-review-table td{padding:9px}
  .run-geo-reminder-panel{padding:10px}
  .run-geo-reminder-title{font-size:12px}
  .run-geo-reminder-text{font-size:11px}
  .run-geo-reminder-state{font-size:10px;padding:2px 8px}
  .run-network-canvas-wrap{width:100%}
  .run-qbank-question-card{padding:10px}
  .run-qbank-question-text{font-size:12px}
  .run-owner-phase-head{flex-direction:column;align-items:flex-start}
  .run-owner-steps-table{display:block;overflow-x:auto}
  .run-owner-runs-table{display:block;overflow-x:auto}
  .project-modal-copy-row{flex-direction:column;align-items:stretch}
  .project-collaborator-row{flex-direction:column}
  .project-meta-chip-startup{font-size:17px;padding:5px 10px}
  .prep-item-summary{padding:14px}
  .prep-item-title{font-size:13px}
  .prep-item-baseline{font-size:12px;line-height:1.55}
  .prep-item-body{padding:12px 14px}
  .training-progress-main,
  .training-part-progress,
  .training-final-state{padding:10px}
  .training-progress-metric{font-size:11px}
  .training-module-accordion .prep-item-summary{flex-wrap:wrap}
  .training-module-meta{
    width:100%;
    margin-top:2px;
  }
  .training-placeholder-card h4,
  .training-placeholder-card p,
  .training-subsections-list li,
  .training-rich-title,
  .training-rich-paragraph,
  .training-rich-list li{font-size:12px}
  .prep-item-paragraph,
  .prep-item-bullets li,
  .prep-item-closing{line-height:1.65}
}


/* ================================================================
   LOG IN
   ================================================================= */

.auth-card {
  max-width: 420px;
  margin: 0 auto;
}

.auth-form {
  margin-top: 8px;
}

.auth-field {
  margin-bottom: 8px;
}

.auth-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 3px;
}

.auth-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  font-size: 12px;
  color: #111827;
  background-color: #ffffff;
}

.auth-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.auth-error {
  font-size: 11px;
  color: #b91c1c;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 8px;
}

.auth-switch {
  font-size: 11px;
  color: #6b7280;
  margin-top: 8px;
}

/* Login / Auth inputs – robust */
.auth-form input[type="email"],
.auth-form input[type="password"]{
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  font-size: 13px;
  color: #111827;
  background: #ffffff;
}

.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus{
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}


/* ================================================================
   UPLOAD 
   ================================================================= */

.upload-doc-metaform{
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-story-text{
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  font-size: 12px;
  color: #111827;
  background: #ffffff;
}
.upload-story-text:focus{
  outline:none;
  border-color:#2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
}
select.upload-story-text{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.upload-doc-item{
  padding: 8px 0;
  border-top: 1px solid #eef2f7;
}
.upload-doc-item:first-child{ border-top: none; padding-top: 0; }

.upload-doc-title{
  font-size: 12px;
  font-weight: 600;
  color:#111827;
}
.upload-doc-desc{
  font-size: 11px;
  color:#4b5563;
  margin-top: 2px;
  line-height: 1.35;
}
.upload-doc-meta{
  font-size: 10px;
  color:#9ca3af;
  margin-top: 3px;
}

/* erreur 
--------------------------- */

.alert-error{
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.25);
  color: #b91c1c;
  font-size: 12px;
}

.alert-success{
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.25);
  color: #166534;
  font-size: 12px;
}

/* char counter */

.char-counter{
  margin-top: 4px;
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
}

/* affiliation */
.affiliation-subtabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.affiliation-subtab{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  color:#4b5563;
  font-size:12px;
  font-weight:600;
}
.affiliation-subtab-active{
  border-color:#bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
}
.affiliation-code-row{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.affiliation-track-cell{
  min-width: 260px;
}
.affiliation-track-input{
  min-width: 260px;
}
@media (max-width: 720px){
  .affiliation-code-row{
    flex-direction:column;
    align-items:stretch;
  }
  .affiliation-track-cell,
  .affiliation-track-input{
    min-width: 0;
    width: 100%;
  }
}
