/* ═══════════════════════════════════════════════════════════════════════
   Due Diligence HQ — Design System
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────────────────── */
:root {
  /* Primary — institutional navy */
  --c-primary:        #1B3A5C;
  --c-primary-dark:   #122A44;
  --c-primary-darker: #0C1D30;
  --c-primary-light:  #EEF3F8;
  --c-primary-ring:   rgba(27,58,92,.14);
  --c-primary-glow:   rgba(27,58,92,.08);

  /* Brand accent */
  --c-secondary:      #2E6B9E;
  --c-accent-teal:    #0D7C66;
  --c-accent-teal-light: #E8F5F1;
  --c-gold:           #A17225;
  --c-gold-light:     #FDF6EC;

  /* Ink — text hierarchy */
  --c-text:           #111827;
  --c-text-2:         #374151;
  --c-text-muted:     #6B7280;
  --c-text-subtle:    #9CA3AF;

  /* Surface */
  --c-bg:             #F9FAFB;
  --c-surface:        #FFFFFF;
  --c-surface-raised: #FFFFFF;
  --c-surface-inset:  #F3F4F6;

  /* Borders */
  --c-border:         #E5E7EB;
  --c-border-strong:  #D1D5DB;
  --c-border-subtle:  #F3F4F6;

  /* Semantic */
  --c-success:        #067647;
  --c-success-bg:     #ECFDF3;
  --c-success-text:   #054F31;
  --c-success-border: #ABEFC6;
  --c-warning:        #B54708;
  --c-warning-bg:     #FFFAEB;
  --c-warning-text:   #7A2E0E;
  --c-warning-border: #FEDF89;
  --c-danger:         #B42318;
  --c-danger-bg:      #FEF3F2;
  --c-danger-text:    #7A271A;
  --c-danger-border:  #FECDCA;
  --c-info:           #175CD3;
  --c-info-bg:        #EFF8FF;
  --c-info-text:      #1849A9;
  --c-info-border:    #B2DDFF;

  /* Sidebar */
  --sb-bg:            #101828;
  --sb-bg-2:          #1D2939;
  --sb-text:          #94A3B8;
  --sb-text-active:   #F0F4F8;
  --sb-active-bg:     rgba(255,255,255,.08);
  --sb-active-border: var(--c-primary);
  --sb-border:        rgba(255,255,255,.06);
  --sb-hover:         rgba(255,255,255,.04);
  --sb-w:             244px;
  --topbar-h:         48px;

  /* Radius — tight, precise */
  --r-xs:   3px;
  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   8px;
  --r-xl:   10px;
  --r-2xl:  12px;
  --r-full: 9999px;

  /* Shadows */
  --sh-xs:  0 1px 2px 0 rgba(0,0,0,.04);
  --sh-sm:  0 1px 3px 0 rgba(0,0,0,.06), 0 1px 2px -1px rgba(0,0,0,.04);
  --sh-md:  0 4px 8px -2px rgba(0,0,0,.06), 0 2px 4px -2px rgba(0,0,0,.04);
  --sh-lg:  0 12px 24px -4px rgba(0,0,0,.08), 0 4px 8px -4px rgba(0,0,0,.04);
  --sh-xl:  0 20px 32px -8px rgba(0,0,0,.1), 0 8px 16px -8px rgba(0,0,0,.05);
  --sh-card-hover: 0 4px 12px -2px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.04);
  --sh-btn-primary: 0 2px 6px 0 rgba(27,58,92,.3);

  /* Transitions */
  --ease-out: cubic-bezier(.2, 0, 0, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 120ms;
  --dur-normal: 180ms;
  --dur-slow: 280ms;
}


/* ─── Reset / Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: .875rem;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  margin: 0;
}

::selection {
  background: var(--c-primary);
  color: #fff;
}

p { color: var(--c-text-2); margin-bottom: 1rem; }
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }
hr { border-color: var(--c-border); opacity: 1; }


/* ─── App Shell ──────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}


/* ─── Sidebar ────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sb-w);
  min-height: 100vh;
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  transition: transform var(--dur-slow) var(--ease-out);
  border-right: 1px solid var(--sb-border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--sb-border);
  text-decoration: none;
  transition: opacity var(--dur-fast);
}

.sidebar-brand:hover { opacity: .85; }

.sidebar-logo-img {
  height: 22px;
  width: auto;
  max-width: 160px;
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.06) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.06); border-radius: 3px; }

.sidebar-section-label {
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #475569;
  padding: 18px 10px 6px;
}

.sidebar-section-label:first-child { padding-top: 4px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  color: var(--sb-text);
  text-decoration: none;
  font-size: .8125rem;
  font-weight: 450;
  transition: all var(--dur-fast) var(--ease-out);
  margin-bottom: 1px;
  position: relative;
}

.sidebar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .6;
  transition: opacity var(--dur-fast);
}

.sidebar-link:hover {
  background: rgba(255,255,255,.06);
  color: var(--sb-text-active);
}

.sidebar-link:hover svg { opacity: .9; }

.sidebar-link.active {
  background: rgba(13,124,102,.12);
  color: #fff;
  font-weight: 550;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 0 1px 1px 0;
  background: var(--c-accent-teal);
}

.sidebar-link.active svg { opacity: 1; }

.sidebar-count-pill {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-full);
  background: #B42318;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--sb-border);
}

.sidebar-org {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--sb-border);
  transition: background var(--dur-fast);
}

.sidebar-org:hover { background: rgba(255,255,255,.05); }

.sidebar-org-avatar {
  width: 26px;
  height: 26px;
  border-radius: var(--r-xs);
  background: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .625rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-org-name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--sb-text-active);
  line-height: 1.2;
}

.sidebar-org-role {
  font-size: .625rem;
  color: var(--sb-text);
  margin-top: 1px;
}


/* ─── App Main / Topbar ──────────────────────────────────────────────── */
.app-main {
  margin-left: var(--sb-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  height: var(--topbar-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 2px 0 rgba(0,0,0,.03);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--c-text);
}

.topbar-breadcrumb a {
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color var(--dur-fast);
}
.topbar-breadcrumb a:hover { color: var(--c-text); }
.topbar-breadcrumb-sep { color: var(--c-border-strong); font-size: .6875rem; }
.topbar-breadcrumb-current { color: var(--c-text); font-weight: 600; }

.topbar-spacer { flex: 1; }

.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--c-text);
  border-radius: var(--r-xs);
  transition: background var(--dur-fast);
}

.topbar-menu-btn:hover { background: var(--c-bg); }
.topbar-menu-btn svg { width: 18px; height: 18px; }

.topbar-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  text-decoration: none;
  transition: all var(--dur-fast);
}

.topbar-icon-btn:hover {
  color: var(--c-text);
  border-color: var(--c-border-strong);
}

.topbar-icon-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--r-full);
  background: #B42318;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--c-surface);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 10px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  text-decoration: none;
  transition: border-color var(--dur-fast);
}

.topbar-user:hover {
  border-color: var(--c-border-strong);
}

.topbar-user-email {
  font-size: .75rem;
  color: var(--c-text-2);
  font-weight: 500;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--r-xs);
  background: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .5625rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.app-content {
  flex: 1;
  padding: 24px;
  max-width: 1280px;
}


/* ─── Panels (Cards) ─────────────────────────────────────────────────── */
.dd-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition: border-color var(--dur-normal), box-shadow var(--dur-normal);
}
.dd-card:hover {
  border-color: var(--c-border-strong);
  box-shadow: var(--sh-card-hover);
}

.dd-card-body { padding: 16px 20px; }

.dd-card-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--c-border-subtle);
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dd-card-title {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
  letter-spacing: -.01em;
}

/* Bootstrap .card override */
.card {
  border: 1px solid var(--c-border) !important;
  border-radius: var(--r-md) !important;
  box-shadow: none !important;
}


/* ─── Stat Cards ─────────────────────────────────────────────────────── */
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 2px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  transition: border-color var(--dur-normal), box-shadow var(--dur-normal);
}

.stat-card:hover {
  border-color: var(--c-border-strong);
  border-top-color: var(--c-accent-teal);
  box-shadow: var(--sh-card-hover);
}

.stat-card-label {
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.03em;
  line-height: 1;
}

.stat-card-sub {
  font-size: .75rem;
  color: var(--c-text-muted);
  margin-top: 4px;
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-icon svg { width: 18px; height: 18px; }


/* ─── Stat Card Mini (compact, for project detail) ──────────────────── */
.stat-card-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.stat-card-mini:hover {
  border-color: var(--c-border-strong);
  box-shadow: var(--sh-xs);
}

.stat-card-mini-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-mini-icon svg { width: 16px; height: 16px; }

.stat-card-mini-value {
  font-size: .875rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.1;
}

.stat-card-mini-label {
  font-size: .625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  margin-top: 1px;
}


/* ─── Detail List (for workstreams/evidence) ────────────────────────── */
.detail-list {
  display: grid;
  gap: 0;
}

.detail-list-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border-subtle);
}

.detail-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-list-item:first-child {
  padding-top: 0;
}


/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: .8125rem;
  border-radius: var(--r-sm);
  padding: 6px 12px;
  transition: all var(--dur-fast) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: -.005em;
  cursor: pointer;
  position: relative;
  border: 1px solid transparent;
  line-height: 1.4;
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff !important;
  transition: background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.btn-primary:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  color: #fff;
  box-shadow: var(--sh-btn-primary);
}

.btn-primary:active {
  background: var(--c-primary-darker);
  box-shadow: none;
}

.btn-outline-secondary {
  border-color: var(--c-border-strong);
  color: var(--c-text-2);
  background: var(--c-surface);
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}

.btn-outline-secondary:hover {
  background: var(--c-bg);
  border-color: var(--c-primary-ring);
  color: var(--c-text);
  box-shadow: var(--sh-xs);
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--c-text-muted);
}

.btn-ghost:hover {
  background: var(--c-bg);
  color: var(--c-text);
}

.btn-sm {
  font-size: .75rem;
  padding: 4px 8px;
}

.btn-lg {
  font-size: .875rem;
  padding: 8px 16px;
  border-radius: var(--r-md);
}


/* ─── Badges / Status ────────────────────────────────────────────────── */
.dd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .6875rem;
  font-weight: 550;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  letter-spacing: .01em;
}

.dd-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dd-badge-success        { background: var(--c-success-bg);  color: var(--c-success-text); }
.dd-badge-success::before { background: var(--c-success); }
.dd-badge-warning        { background: var(--c-warning-bg);  color: var(--c-warning-text); }
.dd-badge-warning::before { background: var(--c-warning); }
.dd-badge-danger         { background: var(--c-danger-bg);   color: var(--c-danger-text); }
.dd-badge-danger::before  { background: var(--c-danger); }
.dd-badge-info           { background: var(--c-info-bg);     color: var(--c-info-text); }
.dd-badge-info::before    { background: var(--c-info); }
.dd-badge-neutral        { background: var(--c-surface-inset); color: var(--c-text-muted); border: 1px solid var(--c-border); }
.dd-badge-neutral::before { background: var(--c-text-subtle); }


/* ─── Forms ──────────────────────────────────────────────────────────── */
label, .form-label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--c-text);
  display: block;
  margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
textarea,
select,
.form-control {
  display: block;
  width: 100%;
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-family: 'Inter', sans-serif;
  font-size: .8125rem;
  color: var(--c-text);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  appearance: none;
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
  border-color: var(--c-accent-teal);
  box-shadow: 0 0 0 3px rgba(13,124,102,.12);
  outline: none;
}

input::placeholder, textarea::placeholder { color: var(--c-text-subtle); }

.form-text {
  font-size: .6875rem;
  color: var(--c-text-muted);
  margin-top: 3px;
}

.form-error {
  font-size: .6875rem;
  color: var(--c-danger);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
}

select.form-control,
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239ca3af'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  padding-right: 30px;
}

.form-check-input { accent-color: var(--c-primary); }

.form-error-icon { width: 12px; height: 12px; flex-shrink: 0; }


/* ─── Toggle Switch ─────────────────────────────────────────────────── */
.dd-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  transition: border-color var(--dur-fast), background var(--dur-fast);
  margin: 0;
  font-size: .8125rem;
  font-weight: 500;
}

.dd-toggle:hover {
  border-color: var(--c-border-strong);
  background: var(--c-bg);
}

.dd-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.dd-toggle-switch {
  width: 34px;
  height: 20px;
  border-radius: var(--r-full);
  background: var(--c-border-strong);
  flex-shrink: 0;
  position: relative;
  transition: background var(--dur-normal) var(--ease-out);
}

.dd-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform var(--dur-normal) var(--ease-spring);
}

.dd-toggle input:checked + .dd-toggle-switch {
  background: var(--c-accent-teal);
}

.dd-toggle input:checked + .dd-toggle-switch::after {
  transform: translateX(14px);
}

.dd-toggle input:focus-visible + .dd-toggle-switch {
  box-shadow: 0 0 0 3px rgba(13,124,102,.15);
}

.dd-toggle-text {
  color: var(--c-text);
  line-height: 1.3;
}


/* ─── Checkbox Group ────────────────────────────────────────────────── */
.dd-checkbox-group {
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  max-height: 200px;
  overflow-y: auto;
  display: grid;
  gap: 2px;
  background: var(--c-surface);
}

.dd-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--r-xs);
  transition: background var(--dur-fast);
  font-size: .8125rem;
  font-weight: 450;
  color: var(--c-text);
  margin: 0;
}

.dd-checkbox:hover {
  background: var(--c-bg);
}

.dd-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dd-checkbox-mark {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast), border-color var(--dur-fast);
  background: var(--c-surface);
}

.dd-checkbox-mark::after {
  content: '';
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath fill-rule='evenodd' d='M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.dd-checkbox input:checked + .dd-checkbox-mark {
  background: var(--c-accent-teal);
  border-color: var(--c-accent-teal);
}

.dd-checkbox input:checked + .dd-checkbox-mark::after {
  opacity: 1;
}

.dd-checkbox input:focus-visible + .dd-checkbox-mark {
  box-shadow: 0 0 0 3px rgba(13,124,102,.15);
}

.dd-checkbox-text {
  line-height: 1.3;
}


/* ─── Legacy consent checkboxes — remap to new styling ──────────────── */
.legal-consent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  color: var(--c-text-2);
  cursor: pointer;
  padding: 5px 6px;
  border-radius: var(--r-xs);
  transition: background var(--dur-fast);
}

.legal-consent-item:hover { background: var(--c-bg); }

.legal-consent-item input[type="checkbox"],
.legal-consent-item input[type="radio"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--c-accent-teal);
  cursor: pointer;
}


/* ─── Bootstrap .form-check override ────────────────────────────────── */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 0;
  min-height: auto;
}

.form-check-input[type="checkbox"],
.form-check-input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--c-accent-teal);
  margin: 0;
  float: none;
  flex-shrink: 0;
  cursor: pointer;
}

.form-check-input[type="checkbox"] {
  border-radius: 3px;
}

.form-check-label {
  font-size: .8125rem;
  color: var(--c-text);
  cursor: pointer;
  margin-left: 0;
}


/* ─── Tables ─────────────────────────────────────────────────────────── */
.dd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8125rem;
}

.dd-table thead th {
  padding: 8px 14px;
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  white-space: nowrap;
  background: var(--c-bg);
}

.dd-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border-subtle);
  color: var(--c-text-2);
  vertical-align: middle;
}

.dd-table tbody tr:last-child td { border-bottom: none; }

.dd-table tbody tr {
  transition: background var(--dur-fast);
}

.dd-table tbody tr:hover td { background: var(--c-bg); }

/* Bootstrap table override */
.table { font-size: .8125rem; }
.table > :not(caption) > * > * { padding: 10px 14px; }
.table thead th {
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-text-muted);
  border-bottom-color: var(--c-border);
}


/* ─── Alerts / Messages ──────────────────────────────────────────────── */
.dd-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: .8125rem;
  font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 8px;
  animation: alertSlideIn var(--dur-normal) var(--ease-out);
}

@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dd-alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

.dd-alert-success { background: var(--c-success-bg); color: var(--c-success-text); border-color: var(--c-success-border); }
.dd-alert-warning { background: var(--c-warning-bg); color: var(--c-warning-text); border-color: var(--c-warning-border); }
.dd-alert-error,
.dd-alert-danger  { background: var(--c-danger-bg);  color: var(--c-danger-text);  border-color: var(--c-danger-border); }
.dd-alert-info    { background: var(--c-info-bg);    color: var(--c-info-text);    border-color: var(--c-info-border); }

/* Bootstrap alert override */
.alert {
  border-radius: var(--r-sm) !important;
  font-size: .8125rem !important;
  font-weight: 500;
}


/* ─── Page Header ────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.page-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.02em;
  margin: 0;
  line-height: 1.3;
}

.page-header-subtitle {
  font-size: .8125rem;
  color: var(--c-text-muted);
  margin: 3px 0 0;
}


/* ─── Empty State ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--c-surface);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-md);
}

.empty-state-icon {
  width: 44px;
  height: 44px;
  background: var(--c-primary-light);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.empty-state-icon svg { width: 20px; height: 20px; color: var(--c-primary); }

.empty-state-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 4px;
}

.empty-state-body {
  font-size: .8125rem;
  color: var(--c-text-muted);
  margin-bottom: 16px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}


/* ─── Chat ───────────────────────────────────────────────────────────── */
.chat-messages {
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.chat-bubble-user {
  align-self: flex-end;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-md) var(--r-md) var(--r-xs) var(--r-md);
  padding: 10px 14px;
  max-width: 72%;
  font-size: .8125rem;
  line-height: 1.55;
}

.chat-bubble-assistant {
  align-self: flex-start;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  border-radius: var(--r-md) var(--r-md) var(--r-md) var(--r-xs);
  padding: 10px 14px;
  max-width: 78%;
  font-size: .8125rem;
  line-height: 1.55;
}

.chat-msg-meta {
  font-size: .6875rem;
  color: var(--c-text-muted);
  margin-bottom: 3px;
  font-weight: 500;
}


/* ─── Progress ───────────────────────────────────────────────────────── */
.dd-progress {
  height: 3px;
  background: var(--c-border);
  border-radius: var(--r-full);
  overflow: hidden;
}

.dd-progress-fill {
  height: 100%;
  background: var(--c-primary);
  border-radius: var(--r-full);
  transition: width .4s var(--ease-out);
}


/* ─── Auth Layout ────────────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  position: relative;
}

.auth-shell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45vh;
  background: linear-gradient(165deg, #E8F0F8 0%, #EFF5F3 40%, var(--c-bg) 100%);
  z-index: 0;
}

.auth-header {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid rgba(13,124,102,.1);
}

.auth-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.auth-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 40px;
  position: relative;
  z-index: 1;
}

.auth-main-inner {
  width: min(100%, 520px);
  display: grid;
  gap: 12px;
}

.auth-main-inner > .auth-card {
  margin: 0 auto;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 2px solid var(--c-primary);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 32px 28px;
}

.auth-card-wide { max-width: 520px; }
.auth-card-narrow { max-width: 360px; }
.auth-card-center { text-align: center; }

.auth-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.02em;
  margin-bottom: 4px;
}

.auth-card-sub {
  font-size: .8125rem;
  color: var(--c-text-muted);
  margin-bottom: 24px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-text-muted);
  font-size: .6875rem;
  font-weight: 500;
  margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

.auth-footer {
  padding: 16px 28px;
  text-align: center;
  font-size: .6875rem;
  color: var(--c-text-muted);
  position: relative;
  z-index: 1;
}

.auth-link-text {
  text-align: center;
  font-size: .8125rem;
  color: var(--c-text-muted);
  margin-bottom: 0;
}

.auth-link-text a { font-weight: 600; }

.auth-terms-text {
  text-align: center;
  font-size: .6875rem;
  color: var(--c-text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.auth-terms-text a { font-weight: 500; }

.auth-btn {
  font-size: .8125rem;
  padding: 8px;
}

.auth-social-btn {
  font-size: .8125rem;
  padding: 8px;
}


/* ─── Scroll Reveal System ───────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Hero children reveal sequentially */
[data-reveal="hero"] { opacity: 1; transform: none; }
[data-reveal="hero"] > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
[data-reveal="hero"].is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0ms; }
[data-reveal="hero"].is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 120ms; }
[data-reveal="hero"].is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 220ms; }
[data-reveal="hero"].is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 320ms; }
[data-reveal="hero"].is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 400ms; }
[data-reveal="hero"].is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 480ms; }
[data-reveal="hero"].is-visible > *:nth-child(7) { opacity: 1; transform: none; transition-delay: 560ms; }

/* Stagger children */
[data-reveal="stagger"] { opacity: 1; transform: none; }
[data-reveal="stagger"] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
[data-reveal="stagger"].is-visible > * { opacity: 1; transform: none; }
[data-reveal="stagger"].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal="stagger"].is-visible > *:nth-child(2) { transition-delay: 70ms; }
[data-reveal="stagger"].is-visible > *:nth-child(3) { transition-delay: 140ms; }
[data-reveal="stagger"].is-visible > *:nth-child(4) { transition-delay: 210ms; }
[data-reveal="stagger"].is-visible > *:nth-child(5) { transition-delay: 280ms; }
[data-reveal="stagger"].is-visible > *:nth-child(6) { transition-delay: 350ms; }
[data-reveal="stagger"].is-visible > *:nth-child(7) { transition-delay: 400ms; }
[data-reveal="stagger"].is-visible > *:nth-child(8) { transition-delay: 450ms; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal] > *,
  [data-reveal="hero"] > *,
  [data-reveal="stagger"] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ─── Marketing Shell ────────────────────────────────────────────────── */
.mkt-shell {
  background: #fff;
  color: var(--c-text);
}

/* Serif headings for editorial gravitas */
.mkt-shell h1,
.mkt-shell h2,
.mkt-shell h3 {
  font-family: Georgia, 'Times New Roman', serif;
}


/* ─── Marketing Nav ──────────────────────────────────────────────────── */
.mkt-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.04);
  padding: 0 40px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.mkt-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

.mkt-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.mkt-nav-link {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--c-text-2);
  text-decoration: none;
  transition: color var(--dur-fast);
  padding: 4px 2px;
  position: relative;
}

.mkt-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-accent-teal);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform var(--dur-normal) var(--ease-out);
}

.mkt-nav-link:hover { color: var(--c-text); }
.mkt-nav-link:hover::after { transform: scaleX(1); }

.mkt-nav-user-email {
  font-size: .75rem;
  font-weight: 500;
  color: var(--c-text-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ─── Marketing Hero ─────────────────────────────────────────────────── */
.mkt-hero {
  padding: 96px 40px 56px;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}
.mkt-hero-inner { width: 100%; }

.mkt-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--c-primary);
  background: var(--c-primary-light);
  padding: 6px 16px 6px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--c-primary-ring);
  margin-bottom: 28px;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.85); }
}
.mkt-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-accent-teal);
  animation: badgePulse 2.4s ease-in-out infinite;
}

.mkt-hero-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.04em;
  color: var(--c-text);
  margin: 0 0 22px;
}

.mkt-hero-accent {
  position: relative;
  display: inline-block;
}
.mkt-hero-accent::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--c-accent-teal);
  opacity: .35;
  border-radius: 2px;
}

.mkt-hero-subtitle {
  font-size: 1.0625rem;
  color: var(--c-text-2);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.mkt-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mkt-hero-actions .btn-primary {
  font-size: .9375rem;
  padding: 12px 24px;
  border-radius: var(--r-md);
}

.mkt-hero-actions .btn-ghost {
  font-size: .875rem;
  padding: 10px 18px;
  color: var(--c-text-2);
}
.mkt-hero-actions .btn-ghost:hover { color: var(--c-text); }


/* ─── Marketing Trust Strip ──────────────────────────────────────────── */
.mkt-trust {
  padding: 32px 40px;
  max-width: 920px;
  margin: 0 auto;
}

.mkt-trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.mkt-trust-label {
  font-family: 'Inter', sans-serif;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-text-muted);
}

.mkt-trust-tag {
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  font-weight: 500;
  color: var(--c-text-2);
  padding: 5px 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  position: relative;
  cursor: default;
}
.mkt-trust-tag + .mkt-trust-tag::before {
  content: '\00b7';
  position: absolute;
  left: -4px;
  color: var(--c-text-muted);
  font-weight: 700;
}


/* ─── Marketing Metrics Strip ────────────────────────────────────────── */
.mkt-metrics {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 0 40px;
  max-width: 840px;
  margin: 0 auto 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.mkt-metric {
  flex: 1;
  text-align: center;
  padding: 28px 16px 24px;
  border-top: 2px solid transparent;
  transition: border-color var(--dur-normal);
  position: relative;
}

.mkt-metric:hover {
  border-top-color: var(--c-accent-teal);
}

.mkt-metric + .mkt-metric {
  border-left: 1px solid var(--c-border);
}

.mkt-metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: -.03em;
  line-height: 1;
}

.mkt-metric-label {
  font-family: 'Inter', sans-serif;
  font-size: .6875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 6px;
}


/* ─── Marketing Sections ─────────────────────────────────────────────── */
.mkt-section {
  padding: 80px 40px;
  max-width: 1060px;
  margin: 0 auto;
}

.mkt-section-alt {
  background: #F5F7FA;
}

.mkt-section-alt .mkt-section {
  padding: 80px 40px;
}

.mkt-section-header {
  margin-bottom: 48px;
}

.mkt-section-label {
  font-family: 'Inter', sans-serif;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-accent-teal);
  margin-bottom: 12px;
}

.mkt-section-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.625rem, 2.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--c-text);
  margin: 0 0 14px;
  line-height: 1.15;
}

.mkt-section-subtitle {
  font-size: .9375rem;
  color: var(--c-text-2);
  max-width: 540px;
  line-height: 1.7;
  margin: 0;
}


/* ─── Marketing Pain Points ──────────────────────────────────────────── */
.mkt-pain-points {
  display: grid;
  gap: 12px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 40px;
}

.mkt-pain-point {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 28px;
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-danger);
  border-radius: var(--r-md);
  background: var(--c-surface);
  transition: border-color var(--dur-fast);
}
.mkt-pain-point:hover {
  border-color: var(--c-border-strong);
  border-left-color: var(--c-danger);
  box-shadow: var(--sh-card-hover);
}

.mkt-pain-number {
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  color: var(--c-danger);
  letter-spacing: .02em;
  padding-top: 2px;
  flex-shrink: 0;
}

.mkt-pain-content { flex: 1; min-width: 0; }

.mkt-pain-title {
  font-family: 'Inter', sans-serif;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 4px;
  letter-spacing: -.01em;
}

.mkt-pain-desc {
  font-size: .8125rem;
  color: var(--c-text-2);
  line-height: 1.6;
  margin: 0;
}


/* ─── Marketing Bento Grid ───────────────────────────────────────────── */
.mkt-bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.mkt-bento-item {
  padding: 32px 28px;
  background: var(--c-surface);
  border-left: 3px solid transparent;
  transition: background var(--dur-normal), border-color var(--dur-normal);
}
.mkt-bento-item:hover {
  background: #FAFBFC;
  border-left-color: var(--c-accent-teal);
}

.mkt-bento-wide {
  grid-column: span 2;
}

.mkt-bento-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.mkt-bento-icon svg { width: 20px; height: 20px; }

.mkt-bento-title {
  font-family: 'Inter', sans-serif;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 8px;
  letter-spacing: -.01em;
}

.mkt-bento-desc {
  font-size: .8125rem;
  color: var(--c-text-2);
  line-height: 1.65;
  margin: 0;
  max-width: 480px;
}

.mkt-bento-wide .mkt-bento-desc {
  max-width: 580px;
}


/* ─── Marketing Timeline ─────────────────────────────────────────────── */
.mkt-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  padding-top: 40px;
}

.mkt-timeline-line {
  position: absolute;
  top: 56px;
  left: 60px;
  right: 60px;
  height: 1px;
  background: var(--c-border-strong);
  /* Exclude from stagger — line fades in flat, not translateY */
  transform: none !important;
}

.mkt-timeline-step {
  text-align: center;
  padding: 0 16px;
  position: relative;
}

.mkt-timeline-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--c-primary);
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  position: relative;
  z-index: 1;
  transition: background var(--dur-normal), border-color var(--dur-normal);
}
.mkt-timeline-step:hover .mkt-timeline-marker {
  background: var(--c-primary);
}

.mkt-timeline-marker span {
  font-family: 'Inter', sans-serif;
  font-size: .6875rem;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: .02em;
  transition: color var(--dur-normal);
}
.mkt-timeline-step:hover .mkt-timeline-marker span {
  color: #fff;
}

.mkt-timeline-title {
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 6px;
  letter-spacing: -.01em;
}

.mkt-timeline-desc {
  font-size: .8125rem;
  color: var(--c-text-2);
  line-height: 1.6;
  margin: 0;
}


/* ─── Marketing Differentiator ───────────────────────────────────────── */
.mkt-differ-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-top: 40px;
}

.mkt-differ-item {
  padding: 28px;
  background: var(--c-surface);
  border-left: 3px solid transparent;
  transition: background var(--dur-normal), border-color var(--dur-normal);
}
.mkt-differ-item:hover {
  background: #FAFBFC;
  border-left-color: var(--c-accent-teal);
}

.mkt-differ-label {
  font-family: 'Inter', sans-serif;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-accent-teal);
  margin-bottom: 10px;
}

.mkt-differ-title {
  font-family: 'Inter', sans-serif;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 8px;
}

.mkt-differ-desc {
  font-size: .8125rem;
  color: var(--c-text-2);
  line-height: 1.6;
  margin: 0;
}


/* ─── Transformation Comparison ────────────────────────────────────── */
.mkt-transform-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.mkt-transform-col {
  padding: 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
}

.mkt-transform-classical {
  border-top: 3px solid var(--c-text-muted);
}

.mkt-transform-ai {
  border-top: 3px solid var(--c-accent-teal);
}

.mkt-transform-heading {
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 20px;
}

.mkt-transform-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mkt-transform-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mkt-transform-marker {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.mkt-transform-marker svg {
  width: 12px;
  height: 12px;
}

.mkt-transform-marker-warn {
  background: #FEF2F2;
  color: #DC2626;
}

.mkt-transform-marker-ok {
  background: #ECFDF5;
  color: var(--c-accent-teal);
}

.mkt-transform-list li strong {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
}

.mkt-transform-list li span {
  font-size: .75rem;
  color: var(--c-text-2);
  line-height: 1.4;
}

.mkt-transform-verdict {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  font-size: .8rem;
  color: var(--c-text-2);
  text-align: center;
}
.mkt-transform-verdict em {
  font-style: italic;
}


/* ─── Marketing Security ─────────────────────────────────────────────── */
.mkt-security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-top: 40px;
}

.mkt-security-item {
  padding: 24px;
  background: var(--c-surface);
  border-left: 3px solid transparent;
  transition: background var(--dur-normal), border-color var(--dur-normal);
}
.mkt-security-item:hover {
  background: #FAFBFC;
  border-left-color: var(--c-primary);
}

.mkt-security-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--c-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.mkt-security-icon svg { width: 14px; height: 14px; color: var(--c-primary); }

.mkt-security-title {
  font-family: 'Inter', sans-serif;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 4px;
}

.mkt-security-desc {
  font-size: .75rem;
  color: var(--c-text-muted);
  line-height: 1.55;
  margin: 0;
}


/* ─── Marketing FAQ ──────────────────────────────────────────────────── */
.mkt-faq-list {
  margin-top: 32px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.mkt-faq-item {
  border-bottom: 1px solid var(--c-border);
}

.mkt-faq-item:last-child { border-bottom: none; }

.mkt-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
  transition: background var(--dur-fast);
  font-family: 'Inter', sans-serif;
}

.mkt-faq-item summary:hover { background: #F5F7FA; color: var(--c-primary); }

.mkt-faq-item summary::-webkit-details-marker { display: none; }

.mkt-faq-item summary::after {
  content: '+';
  font-size: 1rem;
  font-weight: 400;
  color: var(--c-text-muted);
  flex-shrink: 0;
  transition: transform var(--dur-normal);
}

.mkt-faq-item[open] summary::after {
  content: '\2212';
}

.mkt-faq-answer {
  padding: 0 20px 16px;
  font-size: .8125rem;
  color: var(--c-text-2);
  line-height: 1.65;
  overflow: hidden;
  transition: height .25s var(--ease-out), opacity .25s var(--ease-out);
}

.mkt-faq-answer p:last-child { margin-bottom: 0; }


/* ─── Marketing CTA ──────────────────────────────────────────────────── */
.mkt-cta {
  margin: 0 40px 64px;
  background: linear-gradient(135deg, #101828 0%, #1B3A5C 100%);
  border-radius: var(--r-lg);
  padding: 72px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.mkt-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(13,124,102,.15) 0%, transparent 70%);
  pointer-events: none;
}

.mkt-cta-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.625rem, 2.8vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 0 0 12px;
  color: #fff;
}

.mkt-cta-sub {
  font-size: .9375rem;
  color: rgba(255,255,255,.95);
  margin: 0 auto 32px;
  max-width: 440px;
  line-height: 1.6;
}

.mkt-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mkt-cta .btn-white,
.btn-white {
  background: #fff;
  color: var(--sb-bg);
  font-size: .9375rem;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-weight: 600;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--dur-fast), color var(--dur-fast);
  cursor: pointer;
}

.mkt-cta .btn-white:hover,
.btn-white:hover {
  background: #F0F4F8;
}

.btn-white-outline {
  color: rgba(255,255,255,.85);
  font-size: .875rem;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color var(--dur-fast), color var(--dur-fast);
  cursor: pointer;
}
.btn-white-outline:hover {
  border-color: rgba(255,255,255,.5);
  color: #fff;
}


/* ─── Marketing Footer ───────────────────────────────────────────────── */
.mkt-footer {
  padding: 24px 40px;
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .75rem;
  color: var(--c-text-muted);
}

.mkt-footer-link {
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.mkt-footer-link:hover { color: var(--c-text); }


/* ─── Legacy Marketing Classes (backward compat) ────────────────────── */
.hero-section { padding: 80px 40px 64px; max-width: 900px; margin: 0 auto; text-align: center; }
.hero-badge { display: inline-block; font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--c-primary); margin-bottom: 20px; }
.hero-title { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.25rem, 4.5vw, 3.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -.035em; color: var(--c-text); margin: 0 0 18px; }
.hero-title-accent { color: var(--c-primary); }
.hero-subtitle { font-size: 1.0625rem; color: var(--c-text-2); max-width: 540px; margin: 0 auto 32px; line-height: 1.65; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-cta .btn-primary { font-size: .875rem; padding: 10px 20px; border-radius: var(--r-md); }
.hero-cta .btn-outline-secondary { font-size: .875rem; padding: 10px 20px; border-radius: var(--r-md); }
.hero-social-proof { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.hero-stat-item { flex: 1; text-align: center; padding: 24px 16px; border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.hero-stat-item + .hero-stat-item { border-left: 1px solid var(--c-border); }
.hero-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--c-text); letter-spacing: -.03em; }
.hero-stat-label { font-size: .6875rem; font-weight: 500; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.hero-stat-divider { display: none; }

.section-label { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--c-primary); margin-bottom: 10px; }
.section-title { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 700; letter-spacing: -.03em; color: var(--c-text); margin-bottom: 12px; }
.section-subtitle { font-size: .9375rem; color: var(--c-text-2); max-width: 520px; line-height: 1.65; }

.features-section { padding: 72px 40px; max-width: 1060px; margin: 0 auto; }
.feature-card { padding: 24px; border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-surface); height: 100%; transition: border-color var(--dur-fast); }
.feature-card:hover { border-color: var(--c-border-strong); }
.feature-icon { width: 36px; height: 36px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature-icon svg { width: 18px; height: 18px; }
.feature-icon-indigo { background: var(--c-primary-light); color: var(--c-primary); }
.feature-icon-sky    { background: #EFF8FF; color: var(--c-info); }
.feature-icon-violet { background: #F0FDF4; color: var(--c-success); }
.feature-icon-green  { background: #FFFAEB; color: var(--c-warning); }
.feature-icon-amber  { background: #EFF8FF; color: var(--c-info); }
.feature-icon-rose   { background: var(--c-primary-light); color: var(--c-primary); }
.feature-title { font-family: 'Inter', sans-serif; font-size: .875rem; font-weight: 600; color: var(--c-text); margin-bottom: 6px; letter-spacing: -.01em; }
.feature-desc { font-size: .8125rem; color: var(--c-text-muted); line-height: 1.6; margin: 0; }

.how-it-works-section { background: var(--c-bg); padding: 72px 40px; }
.how-it-works-inner { max-width: 1060px; margin: 0 auto; }
.how-step { padding: 0 16px; position: relative; }
.how-step-number { font-size: .6875rem; font-weight: 700; color: var(--c-primary); margin-bottom: 10px; width: auto; height: auto; border-radius: 0; background: none; box-shadow: none; display: block; }
.how-step-title { font-family: 'Inter', sans-serif; font-size: .875rem; font-weight: 600; color: var(--c-text); margin-bottom: 6px; letter-spacing: -.01em; }
.how-step-desc { font-size: .8125rem; color: var(--c-text-muted); line-height: 1.55; margin: 0; }

.cta-section { margin: 0 40px 64px; background: var(--sb-bg); border-radius: var(--r-lg); padding: 56px 40px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.cta-section::before { display: none; }
.cta-section-title { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.5rem, 2.5vw, 1.875rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: 10px; position: relative; color: #fff; }
.cta-section-sub { font-size: .875rem; opacity: .7; margin-bottom: 28px; max-width: 400px; margin-left: auto; margin-right: auto; position: relative; }
.btn-white { background: #fff; color: var(--sb-bg); font-size: .875rem; padding: 10px 20px; border-radius: var(--r-md); font-weight: 600; border: none; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: all var(--dur-fast); cursor: pointer; }
.btn-white:hover { background: #F0F4F8; }


/* ─── Legal Pages ────────────────────────────────────────────────────── */
.legal-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.legal-header { margin-bottom: 20px; }

.legal-kicker {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 8px;
}

.legal-title {
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--c-text);
  margin: 0 0 6px;
}

.legal-summary {
  font-size: .875rem;
  color: var(--c-text-2);
  margin: 0 0 6px;
}

.legal-meta {
  font-size: .75rem;
  color: var(--c-text-muted);
}

.legal-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.legal-body { padding: 20px 24px; }

.legal-body h2 {
  font-size: .9375rem;
  font-weight: 700;
  margin: 16px 0 6px;
  color: var(--c-text);
}

.legal-body p,
.legal-body-text {
  font-size: .8125rem;
  color: var(--c-text-2);
  line-height: 1.65;
}


/* ─── Consent Helpers ────────────────────────────────────────────────── */
.legal-consent-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 16px;
}

.legal-consent-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .8125rem;
  color: var(--c-text-2);
}

.legal-consent-item input { margin-top: 2px; }

.legal-consent-block {
  padding: 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  margin-bottom: 8px;
}

.security-steps { display: grid; gap: 10px; }

.security-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.security-step-number {
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.totp-setup-grid {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.totp-qr-panel,
.totp-secret-panel {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg);
  padding: 16px;
}

.totp-qr-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.totp-qr-image {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
}

.totp-secret-value {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.recovery-code-list {
  min-height: 200px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.project-checkbox-grid {
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 8px;
  max-height: 160px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
}


/* ─── Wizard Stepper ─────────────────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  flex: 1;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  width: 100%;
  height: 1px;
  background: var(--c-border);
  transition: background var(--dur-normal);
}

.wizard-step.done::after { background: var(--c-accent-teal); }

.wizard-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6875rem;
  font-weight: 700;
  z-index: 1;
  color: var(--c-text-muted);
  transition: all var(--dur-normal) var(--ease-out);
}

.wizard-step.active .wizard-step-dot {
  background: var(--c-accent-teal);
  border-color: var(--c-accent-teal);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(13,124,102,.15);
}

.wizard-step.done .wizard-step-dot {
  background: var(--c-accent-teal);
  border-color: var(--c-accent-teal);
  color: #fff;
}

.wizard-step-label {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--c-text-muted);
}

.wizard-step.active .wizard-step-label { color: var(--c-accent-teal); font-weight: 600; }
.wizard-step.done .wizard-step-label   { color: var(--c-text-2); }


/* ─── File List ──────────────────────────────────────────────────────── */
.file-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border-subtle);
  font-size: .8125rem;
  transition: background var(--dur-fast);
}

.file-row:last-child { border-bottom: none; }
.file-row:hover { background: var(--c-bg); }

.file-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
  background: var(--c-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-icon svg { width: 14px; height: 14px; color: var(--c-primary); }


/* ─── Upload Zone ────────────────────────────────────────────────────── */
.upload-zone {
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-md);
  padding: 32px 20px;
  text-align: center;
  transition: all var(--dur-fast);
  cursor: pointer;
  position: relative;
}

.upload-zone:hover {
  border-color: var(--c-primary);
  background: var(--c-primary-light);
}

.upload-zone.drag-active,
.upload-zone.has-selection {
  border-color: var(--c-primary);
  background: var(--c-primary-light);
}

.upload-zone-icon {
  width: 40px;
  height: 40px;
  background: var(--c-bg);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  transition: background var(--dur-fast);
}

.upload-zone:hover .upload-zone-icon {
  background: rgba(27,58,92,.08);
}

.upload-zone-icon svg { width: 18px; height: 18px; color: var(--c-text-muted); }
.upload-zone:hover .upload-zone-icon svg { color: var(--c-primary); }

.upload-zone-title {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 3px;
}

.upload-zone-desc {
  font-size: .6875rem;
  color: var(--c-text-muted);
}

.upload-zone-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.upload-selection {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg);
  padding: 14px;
}

.upload-selection-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.upload-selection-title {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
}

.upload-selection-meta {
  font-size: .6875rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}

.upload-selection-list { display: grid; gap: 6px; }

.upload-selection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  background: var(--c-surface);
}

.upload-selection-path {
  font-size: .6875rem;
  color: var(--c-text);
  word-break: break-word;
}

.upload-selection-item-meta,
.upload-selection-overflow {
  font-size: .6875rem;
  color: var(--c-text-muted);
  flex-shrink: 0;
}


/* ─── Pagination ─────────────────────────────────────────────────────── */
.dd-pagination {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: center;
  margin-top: 20px;
}

.dd-pagination a,
.dd-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  font-size: .75rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: all var(--dur-fast);
}

.dd-pagination a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.dd-pagination .active span { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.dd-pagination .disabled span { opacity: .4; cursor: not-allowed; }


/* ─── Project Detail Tabs ────────────────────────────────────────────── */
.project-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 4px;
}

.project-tabs::-webkit-scrollbar { display: none; }

.project-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  border-bottom: none;
  border-radius: var(--r-sm);
  transition: all var(--dur-fast);
  white-space: nowrap;
}

.project-tab svg { width: 14px; height: 14px; }
.project-tab:hover { color: var(--c-text); background: var(--c-bg); }

.project-tab.active {
  color: var(--c-primary);
  background: var(--c-primary-light);
  font-weight: 600;
}

.project-tab.active svg { color: var(--c-primary); }


/* ─── Quick Action Cards ─────────────────────────────────────────────── */
.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  text-decoration: none;
  transition: border-color var(--dur-normal), box-shadow var(--dur-normal), background var(--dur-normal);
  background: var(--c-surface);
}

.quick-action:hover {
  border-color: var(--c-primary-ring);
  box-shadow: var(--sh-card-hover);
  background: #FAFBFC;
}

.quick-action-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-action-title {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
}

.quick-action-desc {
  font-size: .75rem;
  color: var(--c-text-muted);
  margin-top: 1px;
}


/* ─── Project Card ───────────────────────────────────────────────────── */
.project-card {
  border-left: 3px solid var(--c-border);
  transition: border-color var(--dur-normal), box-shadow var(--dur-normal), border-left-color var(--dur-normal);
}

.project-card:hover {
  border-color: var(--c-border-strong);
  border-left-color: var(--c-accent-teal);
  box-shadow: var(--sh-card-hover);
}

.project-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6875rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: .02em;
}

.project-card-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--c-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card-footer svg {
  transition: transform var(--dur-fast) var(--ease-out);
}

.project-card:hover .project-card-footer svg {
  transform: translateX(3px);
}

.project-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .6875rem;
  font-weight: 500;
  color: var(--c-text-muted);
}

.project-card-meta-item svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}


/* ─── Detail Grid ────────────────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
}

.detail-grid > div {
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-border-subtle);
  transition: background var(--dur-fast);
}

.detail-grid > div:hover {
  background: var(--c-bg);
}

.detail-grid > div:nth-child(odd) {
  border-right: 1px solid var(--c-border-subtle);
}

.detail-grid > div:nth-last-child(-n+2) {
  border-bottom: none;
}

.detail-grid dt {
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-text-muted);
  margin-bottom: 3px;
}

.detail-grid dd {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
}


/* ─── Analysis Components ────────────────────────────────────────────── */
.analysis-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.analysis-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-2);
  font-size: .75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur-fast);
}

.analysis-nav-link:hover {
  background: var(--c-bg);
  color: var(--c-text);
}

.analysis-eyebrow {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 4px;
}

.analysis-section { scroll-margin-top: 80px; }

.analysis-section-title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 0;
}

.analysis-snapshot { display: grid; gap: 14px; }

.analysis-snapshot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.analysis-snapshot-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 0 0 4px;
}

.analysis-kv-grid,
.run-history-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.analysis-kv,
.run-history-stat {
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  background: var(--c-bg);
}

.analysis-kv-label {
  display: block;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 4px;
}

.analysis-kv-value {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  overflow-wrap: anywhere;
}

.analysis-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: .8125rem;
  color: var(--c-text-2);
}

.analysis-inline-list span { overflow-wrap: anywhere; }

.analysis-inline-list span::before {
  content: '\00B7';
  color: var(--c-text-muted);
  margin-right: 6px;
}

.analysis-inline-list span:first-child::before { display: none; }

.analysis-snapshot-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}


/* ─── Workstream / Evidence Cards ────────────────────────────────────── */
.workstream-list { display: grid; gap: 10px; }

.workstream-card {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  padding: 14px;
}

.workstream-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.workstream-card-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.workstream-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.workstream-card-questions { margin-top: 10px; }

.review-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.review-bulk-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.review-card-list { display: grid; gap: 10px; }

.review-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 12px;
}

.review-card {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  padding: 14px;
  overflow: hidden;
}

.review-card-hidden { background: var(--c-bg); }

.review-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.review-card-main { min-width: 0; flex: 1; }

.review-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.review-card-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.review-card-aside {
  min-width: 120px;
  max-width: 200px;
  flex-shrink: 0;
}

.review-card-aside-label {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 3px;
}

.review-card-aside-label + .text-sm { margin-bottom: 8px; }

.review-card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .6875rem;
  color: var(--c-text-muted);
  margin-top: 10px;
}

.review-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: flex-start;
}

.review-card-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--c-border);
}

.review-card-details summary {
  cursor: pointer;
  font-size: .6875rem;
  font-weight: 600;
  color: var(--c-text-muted);
}

.review-card-type {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  font-size: .6875rem;
  font-weight: 550;
  background: var(--c-bg);
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
  overflow-wrap: anywhere;
}

.review-card-text { overflow-wrap: anywhere; word-break: break-word; }

.review-source-list { display: grid; gap: 8px; margin-top: 10px; }

.review-source-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  background: var(--c-bg);
  overflow-wrap: anywhere;
}

.review-bucket {
  margin-top: 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  overflow: hidden;
}

.review-bucket summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  background: var(--c-bg);
}

.review-bucket summary::-webkit-details-marker { display: none; }

.review-bucket-title {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
}

.review-bucket-body {
  padding: 14px;
  border-top: 1px solid var(--c-border);
}


/* ─── Run History ────────────────────────────────────────────────────── */
.run-history-list { display: grid; gap: 10px; }

.run-history-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  overflow: hidden;
}

.run-history-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.run-history-summary::-webkit-details-marker { display: none; }

.run-history-summary-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.run-history-summary-copy { min-width: 0; }

.run-history-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.run-history-summary-meta {
  font-size: .75rem;
  color: var(--c-text-muted);
  overflow-wrap: anywhere;
}

.run-history-summary-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.run-history-body { padding: 0 16px 16px; }

.analysis-pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.severity-info     { background: var(--c-info-bg); color: var(--c-info-text); }
.severity-low      { background: var(--c-success-bg); color: var(--c-success-text); }
.severity-medium   { background: var(--c-warning-bg); color: var(--c-warning-text); }
.severity-high     { background: var(--c-danger-bg); color: var(--c-danger-text); }
.severity-critical { background: #7F1D1D; color: #fff; }


/* ─── Step Log ───────────────────────────────────────────────────────── */
.step-log-container {
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.step-log-header {
  padding: 6px 10px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.status-dot-success { background: var(--c-success); }
.status-dot-danger  { background: var(--c-danger); }
.status-dot-warning { background: var(--c-warning); }

.run-id-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6875rem;
  font-weight: 700;
  color: var(--c-text-muted);
  flex-shrink: 0;
}


/* ─── Inbox / Thread Components ──────────────────────────────────────── */
.split-panel {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
}

.thread-list,
.inbox-thread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thread-link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color var(--dur-fast);
}

.thread-link:hover {
  border-color: var(--c-border-strong);
}

.thread-link.active {
  border-color: var(--c-primary);
  background: var(--c-primary-light);
}

.thread-link-unread {
  border-color: var(--c-border-strong);
}

.thread-link-topline,
.thread-link-subject-row,
.thread-link-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.thread-link-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.thread-link-sender,
.thread-link-time {
  font-size: 11px;
  color: var(--c-text-muted);
}

.thread-link-sender { font-weight: 600; }

.thread-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  background: var(--c-danger);
  flex-shrink: 0;
}

.thread-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--c-text-muted);
  margin-top: 8px;
}

.thread-subject {
  font-weight: 600;
  color: var(--c-text);
  min-width: 0;
}

.thread-link-unread .thread-subject,
.thread-link-unread .thread-body-preview {
  font-weight: 600;
  color: var(--c-text);
}

.thread-body-preview {
  color: var(--c-text-2);
  font-size: .8125rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thread-link-attachment-count {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--c-text-muted);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  padding: 1px 6px;
}

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-bubble {
  max-width: 720px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: #fff;
}

.message-bubble-fresh {
  border-color: var(--c-info-border);
}

.message-bubble-admin {
  align-self: flex-start;
  background: var(--c-primary-light);
  border-color: var(--c-border);
}

.message-bubble-user {
  align-self: flex-end;
  background: #FFF7ED;
  border-color: #FEDF89;
}

.message-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}

.message-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.message-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: rgba(255,255,255,.7);
  color: var(--c-text);
  text-decoration: none;
  font-size: 12px;
  transition: border-color var(--dur-fast);
}

.message-attachment:hover { border-color: var(--c-border-strong); }

.message-compose {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border-subtle);
}

.inbox-resolved-state { padding: 0; }


/* ─── Sidebar Overlay (mobile) ───────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 39;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}


/* ─── Animations ─────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.app-content > * {
  animation: fadeInUp var(--dur-slow) var(--ease-out) both;
}
.app-content > *:nth-child(1) { animation-delay: 0ms; }
.app-content > *:nth-child(2) { animation-delay: 60ms; }
.app-content > *:nth-child(3) { animation-delay: 120ms; }
.app-content > *:nth-child(4) { animation-delay: 180ms; }
.app-content > *:nth-child(5) { animation-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .app-content > * { animation: none; }
}


/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--sh-xl); }
  .app-main { margin-left: 0; }
  .app-content { padding: 16px 14px; }
  .app-topbar { padding: 0 14px; }
  .topbar-menu-btn { display: flex; }
  .topbar-user-email { display: none; }

  .mkt-hero { padding: 56px 20px 40px; }
  .mkt-section { padding: 56px 20px; }
  .mkt-section-alt .mkt-section { padding: 56px 20px; }
  .mkt-section-header { margin-bottom: 32px; }
  .mkt-cta { margin: 0 16px 40px; padding: 48px 20px; }
  .mkt-nav { padding: 0 16px; gap: 14px; }
  .mkt-footer { padding: 20px 16px; }
  .mkt-trust { padding: 24px 20px; }
  .mkt-metrics { padding: 0 16px; flex-wrap: wrap; border-radius: var(--r-md); }
  .mkt-metric { min-width: 0; }
  .mkt-pain-points { padding: 0 20px; }
  .mkt-bento { grid-template-columns: 1fr; }
  .mkt-bento-wide { grid-column: span 1; }
  .mkt-bento-item { border-left: 2px solid transparent; }
  .mkt-timeline { grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 0; }
  .mkt-timeline-line { display: none; }
  .mkt-differ-grid { grid-template-columns: 1fr; }
  .mkt-security-grid { grid-template-columns: 1fr; }
  .mkt-transform-columns { grid-template-columns: 1fr; }

  /* Legacy marketing classes */
  .hero-section { padding: 48px 20px 40px; }
  .features-section { padding: 48px 20px; }
  .cta-section { margin: 0 16px 40px; padding: 40px 20px; }
  .how-it-works-section { padding: 48px 20px; }
  .hero-social-proof { flex-wrap: wrap; }
  .hero-stat-item { min-width: 0; }

  .auth-card { padding: 24px 20px; }
  .detail-grid { grid-template-columns: 1fr; }
  .chat-bubble-user { max-width: 85%; }
  .chat-bubble-assistant { max-width: 90%; }
  .project-tab { padding: 8px 10px; font-size: .75rem; }
}

@media (max-width: 640px) {
  .mkt-nav-link { display: none; }
  .page-header { flex-direction: column; }
  .page-header > *:last-child { align-self: flex-start; }
  .mkt-hero-title { font-size: 2rem; }
  .mkt-timeline { grid-template-columns: 1fr; }
  .mkt-trust-inner { gap: 8px; }
  .mkt-metrics { flex-direction: column; }
  .mkt-metric + .mkt-metric { border-left: none; border-top: 1px solid var(--c-border); }

  /* Legacy */
  .hero-title { font-size: 1.875rem; }

  .upload-selection-header,
  .review-card-header,
  .analysis-snapshot-header,
  .review-section-header,
  .run-history-summary,
  .run-history-summary-main,
  .workstream-card-header { flex-direction: column; }

  .review-card-aside { min-width: 0; max-width: none; }
  .run-history-summary-side { align-items: flex-start; }
}

@media (max-width: 992px) {
  .split-panel { grid-template-columns: 1fr; }
  .totp-setup-grid { grid-template-columns: 1fr; }
  .thread-link-topline,
  .thread-link-subject-row,
  .thread-link-preview-row,
  .thread-meta,
  .message-bubble-meta { flex-direction: column; align-items: flex-start; }
}


/* ─── Utility Classes ────────────────────────────────────────────────── */

/* Text */
.text-muted { color: var(--c-text-muted) !important; }
.text-2 { color: var(--c-text-2) !important; }
.text-primary { color: var(--c-primary) !important; }
.text-body { color: var(--c-text) !important; }
.text-secondary { color: var(--c-text-2) !important; }
.text-danger { color: var(--c-danger) !important; }

/* Text sizes */
.text-xs   { font-size: .6875rem !important; }
.text-sm   { font-size: .75rem !important; }
.text-base { font-size: .8125rem !important; }
.text-md   { font-size: .875rem !important; }
.text-lg   { font-size: .9375rem !important; }
.text-xl   { font-size: 1rem !important; }
.text-2xl  { font-size: 1.125rem !important; }

/* Font weights */
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Layout */
.max-w-sm  { max-width: 380px; }
.max-w-md  { max-width: 540px; }
.max-w-lg  { max-width: 620px; }
.max-w-xl  { max-width: 680px; }
.mx-auto   { margin-left: auto; margin-right: auto; }
.truncate  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* Icons */
.icon-xs  { width: 12px; height: 12px; }
.icon-sm  { width: 14px; height: 14px; }
.icon-md  { width: 16px; height: 16px; }
.icon-lg  { width: 18px; height: 18px; }
.icon-xl  { width: 20px; height: 20px; }
.icon-2xl { width: 24px; height: 24px; }
.icon-3xl { width: 26px; height: 26px; }
.icon-4xl { width: 32px; height: 32px; }

/* Icon containers */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--r-sm);
}

.icon-box-sm  { width: 24px; height: 24px; }
.icon-box-md  { width: 32px; height: 32px; }
.icon-box-lg  { width: 36px; height: 36px; }
.icon-box-xl  { width: 40px; height: 40px; }
.icon-box-2xl { width: 44px; height: 44px; }
.icon-box-3xl { width: 48px; height: 48px; }

.icon-box-indigo  { background: #EEF2FF; color: #4338CA; }
.icon-box-sky     { background: #EFF8FF; color: #1570CD; }
.icon-box-violet  { background: #F0FDF4; color: #0D7C66; }
.icon-box-green   { background: #ECFDF3; color: #067647; }
.icon-box-amber   { background: #FFF7ED; color: #C4620A; }
.icon-box-rose    { background: #FFF1F2; color: #BE123C; }
.icon-box-danger  { background: var(--c-danger-bg); color: var(--c-danger); }
.icon-box-warning { background: var(--c-warning-bg); color: var(--c-warning); }
.icon-box-primary-solid {
  background: var(--c-primary);
  color: #fff;
}

/* Org avatar */
.org-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* Report version icon */
.report-version-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--r-xs);
  background: var(--c-success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card info text */
.card-info-text {
  font-size: .8125rem;
  color: var(--c-text-muted);
  margin-bottom: 14px;
}

/* List item hover */
.list-item-hover { transition: background var(--dur-fast); }
.list-item-hover:hover { background: var(--c-bg); }

/* Empty inline */
.empty-inline {
  text-align: center;
  color: var(--c-text-muted);
  padding: 24px 0;
}

.empty-inline-icon {
  width: 28px;
  height: 28px;
  opacity: .35;
  margin: 0 auto 8px;
  display: block;
}

/* Knowledge pre (legacy) */
.knowledge-pre {
  font-size: .8125rem;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Knowledge content — rendered markdown */
.knowledge-content {
  font-size: .8125rem;
  color: var(--c-text-2);
  line-height: 1.65;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.knowledge-content h1,
.knowledge-content h2,
.knowledge-content h3,
.knowledge-content h4,
.knowledge-content h5,
.knowledge-content h6 {
  font-family: 'Inter', sans-serif;
  color: var(--c-text);
  margin: 16px 0 6px;
  line-height: 1.3;
}

.knowledge-content h1:first-child,
.knowledge-content h2:first-child,
.knowledge-content h3:first-child { margin-top: 0; }

.knowledge-content h1 { font-size: 1rem; font-weight: 700; }
.knowledge-content h2 { font-size: .9375rem; font-weight: 700; }
.knowledge-content h3 { font-size: .875rem; font-weight: 600; }
.knowledge-content h4 { font-size: .8125rem; font-weight: 600; }

.knowledge-content p {
  margin: 0 0 10px;
}

.knowledge-content p:last-child { margin-bottom: 0; }

.knowledge-content ul,
.knowledge-content ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.knowledge-content li {
  margin-bottom: 3px;
}

.knowledge-content strong { color: var(--c-text); font-weight: 600; }
.knowledge-content em { font-style: italic; }

.knowledge-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .75rem;
  background: var(--c-surface-inset);
  padding: 1px 5px;
  border-radius: var(--r-xs);
  border: 1px solid var(--c-border);
}

.knowledge-content pre {
  background: var(--c-surface-inset);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin: 0 0 10px;
  overflow-x: auto;
}

.knowledge-content pre code {
  background: none;
  border: none;
  padding: 0;
}

.knowledge-content a {
  color: var(--c-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Form helpers */
.form-required { color: var(--c-danger); margin-left: 2px; }

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border-subtle);
}
.form-error-icon { width: 12px; height: 12px; display: inline; vertical-align: middle; margin-right: 2px; }
.sr-only-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-muted); }

/* Bootstrap overrides */
.list-group-item {
  border-color: var(--c-border) !important;
  padding: 12px 16px;
}

code {
  font-size: .8125em;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xs);
  padding: 1px 4px;
  color: var(--c-primary-dark);
}

pre {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: .8125rem;
  overflow: auto;
  line-height: 1.55;
}
