/* comply.automate48.ai — Product styles */

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

:root {
  --navy:    #0f172a;
  --navy-2:  #1e293b;
  --navy-3:  #334155;
  --blue:    #1d4ed8;
  --blue-2:  #2563eb;
  --blue-light: #eff6ff;
  --slate:   #64748b;
  --slate-2: #94a3b8;
  --line:    #e2e8f0;
  --bg:      #f8fafc;
  --white:   #ffffff;
  --radius:  6px;
  --shadow:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);

  /* Maturity level colors */
  --l1: #ef4444;
  --l2: #f97316;
  --l3: #eab308;
  --l4: #22c55e;
  --l5: #3b82f6;
}

body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--navy-2); line-height: 1.5; }

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

/* ── Layout ─────────────────────────────────────────────────────────────── */

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 56px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.app-header {
  grid-column: 1 / -1;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  border-bottom: 1px solid var(--navy-3);
}

.app-header .logo { font-weight: 700; font-size: 15px; white-space: nowrap; }
.app-header .logo span { color: var(--blue-2); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user { font-size: 13px; color: var(--slate-2); }

.settings-wrap    { position: relative; }
.settings-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 180px; z-index: 200;
  display: flex; flex-direction: column; padding: 4px 0;
}
.settings-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 16px; font-size: 13px; font-weight: 400;
  background: none; border: none; cursor: pointer; color: var(--navy-2);
  font-family: inherit;
}
.settings-item:hover { background: var(--bg); }
.tier-pill {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; background: var(--blue); color: #fff; text-transform: uppercase; letter-spacing: .05em;
}

/* ── Sidebar navigation ──────────────────────────────────────────────────── */

.app-sidebar {
  background: var(--navy-2);
  color: var(--white);
  overflow-y: auto;
  padding: 12px 0;
  border-right: 1px solid var(--navy-3);
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  padding: 0 8px 8px;
  gap: 2px;
  border-bottom: 1px solid var(--navy-3);
  margin-bottom: 8px;
}

.sidebar-link {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--slate-2);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar-link:hover { background: var(--navy-3); color: var(--white); }

.nav-group { margin-bottom: 4px; }

.nav-domain {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--slate);
  padding: 8px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--slate-2);
  cursor: pointer;
  border-radius: 4px;
  margin: 0 4px;
  transition: background .12s, color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-item:hover  { background: var(--navy-3); color: var(--white); }
.nav-item.active { background: var(--blue); color: var(--white); }

.nav-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px; font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  background: var(--slate);
  color: #fff;
}
.nav-badge.level-1 { background: var(--l1); }
.nav-badge.level-2 { background: var(--l2); }
.nav-badge.level-3 { background: var(--l3); color: var(--navy); }
.nav-badge.level-4 { background: var(--l4); color: var(--navy); }
.nav-badge.level-5 { background: var(--l5); }

/* ── Main content ────────────────────────────────────────────────────────── */

#main-content {
  overflow-y: auto;
  padding: 28px 32px;
}

.loading { color: var(--slate); padding: 40px 0; text-align: center; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */

.dashboard-header { margin-bottom: 24px; }
.dashboard-header h1 { font-size: 22px; font-weight: 700; color: var(--navy); }
.company-name { color: var(--slate); font-size: 14px; margin-top: 4px; }

.stat-row { display: flex; gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px;
  flex: 1; box-shadow: var(--shadow);
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--navy); }
.stat-label { font-size: 13px; color: var(--slate); margin-top: 4px; }

.domain-section { margin-bottom: 36px; }
.domain-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.domain-desc  { font-size: 13px; color: var(--slate); margin-bottom: 14px; }

.control-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

.control-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.control-card:hover { border-color: var(--blue-2); box-shadow: 0 2px 8px rgba(29,78,216,.12); }

.control-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.control-id { font-size: 11px; font-weight: 700; color: var(--blue-2); letter-spacing: .05em; }
.control-name { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.control-desc { font-size: 12px; color: var(--slate); line-height: 1.4; margin-bottom: 12px; }
.control-card-footer { display: flex; align-items: center; justify-content: space-between; }
.owner-tag { font-size: 11px; color: var(--slate-2); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; }

.maturity-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; white-space: nowrap;
}
.maturity-badge.level-0        { background: #f1f5f9; color: var(--slate); }
.maturity-badge.level-progress { background: #ede9fe; color: #6d28d9; }
.maturity-badge.level-1 { background: #fee2e2; color: #b91c1c; }
.maturity-badge.level-2 { background: #ffedd5; color: #c2410c; }
.maturity-badge.level-3 { background: #fef9c3; color: #a16207; }
.maturity-badge.level-4 { background: #dcfce7; color: #15803d; }
.maturity-badge.level-5 { background: #dbeafe; color: #1d4ed8; }

.onboarding-banner {
  margin-top: 24px;
  background: var(--blue-light); border: 1px solid #bfdbfe;
  border-radius: var(--radius); padding: 16px 20px;
  font-size: 14px; color: var(--navy-2);
  display: flex; align-items: center; gap: 16px;
}

/* ── Control view ────────────────────────────────────────────────────────── */

.control-view { display: flex; flex-direction: column; height: 100%; }

.control-view-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px; gap: 20px;
}
.control-id-large {
  font-size: 11px; font-weight: 700; color: var(--blue-2);
  letter-spacing: .08em; text-transform: uppercase;
  display: block; margin-bottom: 4px;
}
.control-view-header h1 { font-size: 20px; font-weight: 700; color: var(--navy); }
.control-meta { font-size: 13px; color: var(--slate); margin-top: 6px; }

.control-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.maturity-select-wrap { position: relative; display: flex; align-items: center; gap: 6px; }
.maturity-select-label { font-size: 12px; color: var(--slate); display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.maturity-select-label select { font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }

.maturity-info-btn {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--slate); background: var(--white);
  color: var(--slate); font-size: 11px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1; padding: 0; font-family: inherit;
}
.maturity-info-btn:hover { background: var(--bg); color: var(--navy-2); border-color: var(--navy-2); }

.maturity-popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 100;
  width: 300px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 14px; font-size: 13px;
}
.maturity-popover-title { font-weight: 700; color: var(--navy); margin-bottom: 6px; font-size: 13px; }
.maturity-popover-intro { font-size: 12px; color: var(--slate); line-height: 1.5; margin-bottom: 12px; }
.maturity-popover-level { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; font-size: 12px; color: var(--navy-3); line-height: 1.4; }
.maturity-popover-level:last-child { margin-bottom: 0; }
.maturity-popover-badge {
  font-size: 10px; font-weight: 700; padding: 2px 5px;
  border-radius: 4px; flex-shrink: 0; margin-top: 1px;
}

/* ── Maturity recommendation banner ─────────────────────────────────────── */

.maturity-rec-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: var(--radius); padding: 10px 14px; margin-top: 8px;
}
.maturity-rec-content { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.maturity-rec-label { font-size: 11px; font-weight: 700; color: #1e40af; text-transform: uppercase; letter-spacing: 0.4px; }
.maturity-rec-level { font-size: 13px; font-weight: 700; }
.maturity-rec-desc { font-size: 12px; color: var(--slate); }
.btn-apply-maturity {
  font-size: 12px; font-weight: 600; padding: 5px 14px;
  border-radius: 4px; border: 1px solid #1e40af;
  background: #1e40af; color: #fff; cursor: pointer; font-family: inherit;
  white-space: nowrap; flex-shrink: 0;
}
.btn-apply-maturity:hover { background: #1d4ed8; }
.maturity-rec-applied { font-size: 13px; font-weight: 600; color: #16a34a; }
.btn-step-recommend { border-color: #7c3aed; color: #7c3aed; }
.btn-step-recommend:hover { background: #f5f3ff; }

.control-desc-full { font-size: 14px; color: var(--navy-3); margin-bottom: 20px; line-height: 1.6; }

/* ── Control body grid ───────────────────────────────────────────────────── */

.control-body-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  flex: 1;
  min-height: 0;
  align-items: start;
}

/* ── Artifact panel ──────────────────────────────────────────────────────── */

.artifact-panel {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
  overflow-y: auto; align-self: start;
}
.artifact-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--navy-2);
  text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--bg); border-radius: var(--radius) var(--radius) 0 0;
  position: sticky; top: 0;
}
.artifact-count {
  font-size: 11px; font-weight: 600; color: var(--slate);
  background: var(--line); padding: 2px 7px; border-radius: 10px;
}
.artifact-step {
  display: flex; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.artifact-step:last-child { border-bottom: none; }
.step-icon {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.step-not-started .step-icon  { background: var(--line); color: var(--slate); }
.step-available .step-icon    { background: #dbeafe; color: #1e40af; }
.step-complete .step-icon     { background: #dcfce7; color: #16a34a; }
.step-locked .step-icon       { background: var(--line); color: var(--slate); opacity: 0.5; }
.step-body { flex: 1; min-width: 0; }
.step-label {
  font-size: 13px; font-weight: 600; color: var(--navy-2); margin-bottom: 2px;
}
.step-complete .step-label { color: #16a34a; }
.step-locked .step-label   { color: var(--slate); }
.step-desc {
  font-size: 11px; color: var(--slate); line-height: 1.4; margin-bottom: 6px;
}
.step-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-step-action {
  font-size: 11px; padding: 3px 10px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--white);
  color: var(--navy-2); cursor: pointer; font-family: inherit;
  font-weight: 500;
}
.btn-step-action:hover { background: var(--bg); }
.btn-step-generate { border-color: #1e40af; color: #1e40af; }
.btn-step-generate:hover { background: #eff6ff; }
.btn-step-download { border-color: #16a34a; color: #16a34a; }
.btn-step-download:hover { background: #f0fdf4; }
.btn-step-regen { font-size: 10px; color: var(--slate); }

/* ── Chat panel ──────────────────────────────────────────────────────────── */

.chat-panel {
  flex: 1; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
  overflow: hidden; min-height: 0;
}

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--navy-2);
  background: var(--bg);
}

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}

.chat-empty { color: var(--slate); font-size: 14px; }
.chat-empty p { margin-bottom: 8px; }

.msg { max-width: 88%; }
.msg-user      { align-self: flex-end; }
.msg-assistant { align-self: flex-start; }

.msg-label { font-size: 11px; font-weight: 600; color: var(--slate); margin-bottom: 4px; }
.msg-user .msg-label { text-align: right; }

.msg-body {
  font-size: 14px; line-height: 1.6;
  border-radius: var(--radius); padding: 12px 14px;
}
.msg-user .msg-body      { background: var(--blue); color: #fff; }
.msg-assistant .msg-body { background: var(--bg); border: 1px solid var(--line); color: var(--navy-2); }

.msg-body.streaming::after {
  content: '▌'; animation: blink .8s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.msg-body h1, .msg-body h2, .msg-body h3, .msg-body h4 { margin: 12px 0 6px; font-size: 14px; font-weight: 700; }
.msg-body p  { margin-bottom: 8px; }
.msg-body ul { padding-left: 20px; margin-bottom: 8px; }
.msg-body li { margin-bottom: 4px; }
.msg-body pre { background: var(--navy); color: #e2e8f0; padding: 12px; border-radius: var(--radius); overflow-x: auto; font-size: 12px; margin: 8px 0; }
.msg-body code { font-family: 'Fira Code', 'Courier New', monospace; font-size: 12px; }
.msg-body > p:last-child { margin-bottom: 0; }
.msg-body ol { padding-left: 20px; margin-bottom: 8px; }

.md-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; margin: 10px 0; overflow-x: auto; display: block;
}
.md-table th {
  background: var(--bg); font-weight: 600; color: var(--navy-2);
  padding: 7px 10px; text-align: left; border: 1px solid var(--line);
  white-space: nowrap;
}
.md-table td {
  padding: 6px 10px; border: 1px solid var(--line);
  color: var(--navy-3); vertical-align: top; line-height: 1.4;
}
.md-table tr:nth-child(even) td { background: var(--bg); }

.msg-actions {
  display: flex; gap: 6px; margin-top: 6px;
}
.msg-action-btn {
  font-size: 11px; padding: 3px 10px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--white);
  color: var(--slate); cursor: pointer; font-family: inherit;
}
.msg-action-btn:hover { background: var(--bg); color: var(--navy-2); }

.chat-input-area {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  background: var(--bg);
}
.chat-input-area textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  resize: none; outline: none; background: var(--white);
  transition: border-color .15s;
}
.chat-input-area textarea:focus { border-color: var(--blue-2); }
.chat-input-actions { display: flex; align-items: center; justify-content: flex-end; margin-top: 8px; gap: 10px; }
.session-hint { font-size: 12px; color: var(--slate-2); }

.upgrade-banner {
  background: #fef9c3; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: 20px 24px;
  font-size: 14px; color: var(--navy-2);
  display: flex; align-items: center; gap: 16px;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

.form-panel {
  max-width: 560px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 32px;
  box-shadow: var(--shadow);
}
.form-panel h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.form-panel > p { font-size: 13px; color: var(--slate); margin-bottom: 24px; line-height: 1.5; }

form label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 13px; font-weight: 500; }
form input, form select, form textarea {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .15s;
}
form input:focus, form select:focus, form textarea:focus { border-color: var(--blue-2); }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn-primary, .btn-secondary, .btn-ghost, .btn-open, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none; transition: opacity .15s, background .15s;
  white-space: nowrap;
}
.btn-primary   { background: var(--blue-2); color: #fff; }
.btn-primary:hover { background: var(--blue); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-secondary { background: var(--bg); color: var(--navy-2); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--line); }
.btn-ghost     { background: transparent; color: var(--slate); font-weight: 400; padding: 4px 8px; }
.btn-ghost:hover { color: var(--navy); }
.btn-open      { background: var(--blue-light); color: var(--blue-2); padding: 5px 12px; font-size: 12px; }
.btn-open:hover { background: #dbeafe; }
.btn-danger    { background: #fee2e2; color: #b91c1c; }

/* ── Auth pages ──────────────────────────────────────────────────────────── */

.auth-shell {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: var(--bg);
  padding: 20px;
}

.auth-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px 40px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow);
}
.auth-card .logo { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.auth-card .logo span { color: var(--blue-2); }
.auth-card h1 { font-size: 22px; font-weight: 700; margin-bottom: 24px; }

.error-msg {
  display: none; background: #fee2e2; color: #b91c1c;
  border: 1px solid #fecaca; border-radius: var(--radius);
  padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
.success-msg {
  display: none; background: #dcfce7; color: #15803d;
  border: 1px solid #bbf7d0; border-radius: var(--radius);
  padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}

.auth-footer { margin-top: 20px; font-size: 13px; color: var(--slate); text-align: center; }
.tab-bar { display: flex; border-bottom: 2px solid var(--line); margin-bottom: 24px; }
.tab { padding: 10px 20px; font-size: 14px; font-weight: 500; color: var(--slate); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--blue-2); border-bottom-color: var(--blue-2); }

/* ── Landing page ────────────────────────────────────────────────────────── */

.landing { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.site-header {
  display: flex; align-items: center; padding: 18px 0;
  border-bottom: 1px solid var(--line); margin-bottom: 0;
}
.site-header .logo { font-size: 15px; font-weight: 700; }
.site-header .logo span { color: var(--blue-2); }
.site-header nav { margin-left: auto; display: flex; gap: 24px; align-items: center; }
.site-header nav a { font-size: 14px; color: var(--navy-2); }

.hero {
  text-align: center; padding: 72px 0 60px;
  max-width: 720px; margin: 0 auto;
}
.hero-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-2); background: var(--blue-light);
  border: 1px solid #bfdbfe; border-radius: 20px; padding: 4px 14px; margin-bottom: 20px;
}
.hero h1 { font-size: 42px; font-weight: 800; line-height: 1.15; color: var(--navy); margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--blue-2); }
.hero p { font-size: 18px; color: var(--slate); line-height: 1.6; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.section { padding: 60px 0; }
.section-title { font-size: 28px; font-weight: 700; color: var(--navy); margin-bottom: 8px; text-align: center; }
.section-sub { font-size: 16px; color: var(--slate); text-align: center; margin-bottom: 48px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.feature-icon { font-size: 24px; margin-bottom: 12px; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 13px; color: var(--slate); line-height: 1.5; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
.pricing-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow);
}
.pricing-card.featured { border-color: var(--blue-2); box-shadow: 0 4px 20px rgba(29,78,216,.15); }
.pricing-card .tier-name { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-2); margin-bottom: 8px; }
.pricing-card .price { font-size: 32px; font-weight: 800; color: var(--navy); }
.pricing-card .price sup { font-size: 18px; font-weight: 600; }
.pricing-card .price-period { font-size: 13px; color: var(--slate); }
.pricing-card ul { list-style: none; margin: 20px 0 24px; }
.pricing-card ul li { font-size: 13px; color: var(--navy-2); padding: 5px 0; border-bottom: 1px solid var(--bg); }
.pricing-card ul li::before { content: '✓ '; color: var(--blue-2); font-weight: 700; }

.site-footer {
  border-top: 1px solid var(--line); padding: 28px 0;
  font-size: 12px; color: var(--slate); text-align: center;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */

.text-center { text-align: center; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }

/* ── Dashboard action bar ─────────────────────────────────────────────────── */

.dashboard-actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px;
}

/* ── Program summary view ─────────────────────────────────────────────────── */

.program-summary-view {
  max-width: 900px; padding: 0 4px;
}
.program-summary-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.program-summary-header h1 { font-size: 22px; font-weight: 700; color: var(--navy); }
.program-summary-header .company-name { font-size: 14px; color: var(--slate); margin-top: 4px; }
.program-summary-body {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 32px;
  box-shadow: var(--shadow); font-size: 14px; line-height: 1.6;
}
.program-summary-body h1,
.program-summary-body h2 { font-size: 16px; font-weight: 700; color: var(--navy); margin: 20px 0 8px; }
.program-summary-body h3 { font-size: 14px; font-weight: 700; color: var(--navy-2); margin: 16px 0 6px; }
.program-summary-body > *:first-child { margin-top: 0; }
.program-summary-body p { margin-bottom: 10px; }

/* ── Crosswalk button + panel ─────────────────────────────────────────────── */

.btn-crosswalk {
  font-size: 11px; font-weight: 600; font-family: inherit;
  padding: 3px 10px; border-radius: 4px; cursor: pointer;
  background: var(--bg); color: var(--slate);
  border: 1px solid var(--line); transition: background .15s;
}
.btn-crosswalk:hover { background: var(--line); color: var(--navy-2); }

.crosswalk-section {
  margin-top: 16px; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 13px;
}
.crosswalk-header {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--slate); margin-bottom: 10px;
}
.crosswalk-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.crosswalk-table th {
  text-align: left; padding: 5px 8px;
  background: var(--white); border: 1px solid var(--line);
  font-weight: 600; color: var(--navy-2);
}
.crosswalk-table td {
  padding: 5px 8px; border: 1px solid var(--line);
  color: var(--navy-3); vertical-align: top;
}

/* ── Loading state ────────────────────────────────────────────────────────── */

.loading {
  padding: 48px; text-align: center; color: var(--slate);
  font-size: 14px;
}

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; grid-template-rows: 56px auto 1fr; }
  .app-sidebar { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  #main-content { padding: 16px; }
}

/* ── Training — Catalog ─────────────────────────────────────────────────── */

.training-catalog { max-width: 900px; margin: 0 auto; }
.training-catalog-header { margin-bottom: 32px; }
.training-catalog-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.training-catalog-header p  { color: var(--slate); font-size: 14px; margin-bottom: 16px; }
.training-progress-tracks   { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.training-progress-row      { display: grid; grid-template-columns: 1fr 180px 48px; align-items: center; gap: 12px; }
.tpr-label                  { font-size: 13px; font-weight: 600; color: var(--navy-2); white-space: nowrap; }
.tpr-audience               { font-weight: 400; color: var(--slate); }
.tpr-count                  { font-size: 12px; color: var(--slate-2); text-align: right; white-space: nowrap; }
.training-progress-bar-wrap { height: 6px; background: var(--line); border-radius: 99px; }
.training-progress-bar      { height: 6px; background: var(--blue-2); border-radius: 99px; transition: width .4s; }
.tpb-practitioner           { background: #7c3aed; }

.training-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 20px; }
.training-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.training-card-domain { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; margin-bottom: 10px; }
.tc-g  { background: #dbeafe; color: #1d4ed8; }
.tc-m  { background: #dcfce7; color: #15803d; }
.tc-me { background: #fef3c7; color: #b45309; }
.tc-ma { background: #fce7f3; color: #9d174d; }

.training-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.training-card-sub   { font-size: 13px; color: var(--slate); margin-bottom: 16px; }
.training-card-tracks { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.training-track-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.training-track-label { flex: 1; font-weight: 500; }
.training-track-dur   { color: var(--slate-2); font-size: 12px; }
.training-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.tb-done  { background: #dcfce7; color: #15803d; }
.tb-start { background: var(--blue-light); color: var(--blue-2); }

.training-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-training-start { font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: var(--radius); border: none; cursor: pointer; background: var(--blue-2); color: var(--white); }
.btn-training-start:hover { background: var(--blue); }
.btn-training-prac { background: var(--white); color: var(--blue-2); border: 1px solid var(--blue-2); }
.btn-training-prac:hover { background: var(--blue-light); }

/* ── Training — Course overview ─────────────────────────────────────────── */

.training-course-view { max-width: 720px; margin: 0 auto; }
.training-course-header { margin: 16px 0 24px; }
.training-course-header h2 { font-size: 20px; font-weight: 700; margin: 8px 0 4px; }
.training-course-header p  { font-size: 13px; color: var(--slate); }

.training-module-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.training-module-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .15s; }
.training-module-row:hover { border-color: var(--blue-2); }
.training-module-row.tmr-done { background: #f0fdf4; border-color: #bbf7d0; }
.tmr-num   { font-size: 11px; font-weight: 700; color: var(--slate-2); width: 24px; }
.tmr-info  { flex: 1; }
.tmr-title { display: block; font-size: 14px; font-weight: 500; }
.tmr-dur   { font-size: 12px; color: var(--slate-2); }
.tmr-status { font-size: 16px; color: var(--slate-2); }
.tmr-done .tmr-status { color: #16a34a; }

.btn-training-assess { font-size: 14px; font-weight: 600; padding: 10px 24px; border-radius: var(--radius); border: none; cursor: pointer; background: var(--blue-2); color: var(--white); }
.btn-training-assess:hover { background: var(--blue); }
.training-complete-banner { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius); padding: 12px 16px; font-size: 14px; color: #15803d; display: flex; align-items: center; gap: 12px; }
.btn-view-cert { font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: var(--radius); border: none; cursor: pointer; background: #15803d; color: var(--white); }

/* ── Training — Module view ──────────────────────────────────────────────── */

.training-module-view { max-width: 720px; margin: 0 auto; }
.training-module-header { margin: 16px 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tmh-num  { font-size: 12px; color: var(--slate-2); display: block; margin-bottom: 4px; }
.training-module-header h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.tmh-dur  { font-size: 13px; color: var(--slate); }

.training-module-content { line-height: 1.75; }
.tm-para    { margin-bottom: 16px; font-size: 15px; }
.tm-heading { font-size: 15px; font-weight: 700; margin: 24px 0 8px; color: var(--navy); }
.tm-bullets { padding-left: 20px; margin-bottom: 16px; }
.tm-bullets li { margin-bottom: 6px; font-size: 14px; }
.tm-callout { background: var(--blue-light); border-left: 3px solid var(--blue-2); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 20px 0; font-size: 14px; font-weight: 500; color: var(--blue); }
.tm-scenario { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 14px 16px; margin: 20px 0; font-size: 14px; line-height: 1.7; }
.tm-scenario strong { color: #92400e; }

.tm-keypoints { margin-top: 32px; padding: 20px; background: var(--navy); border-radius: var(--radius); }
.tm-keypoints h4 { font-size: 13px; font-weight: 700; color: var(--slate-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.tm-keypoints ul { padding-left: 18px; }
.tm-keypoints li { font-size: 14px; color: #e2e8f0; margin-bottom: 6px; }

.training-module-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.btn-training-prev     { font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--line); cursor: pointer; background: var(--white); }
.btn-training-complete { font-size: 14px; font-weight: 600; padding: 10px 24px; border-radius: var(--radius); border: none; cursor: pointer; background: var(--blue-2); color: var(--white); }
.btn-training-complete:hover { background: var(--blue); }

.btn-training-back { font-size: 13px; color: var(--slate); background: none; border: none; cursor: pointer; padding: 0; margin-bottom: 16px; display: inline-flex; align-items: center; gap: 6px; }
.btn-training-back:hover { color: var(--navy); }

/* ── Training — Assessment ──────────────────────────────────────────────── */

.training-assessment-view { max-width: 720px; margin: 0 auto; }
.training-assessment-header { margin: 16px 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.training-assessment-header h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.training-assessment-header p  { font-size: 13px; color: var(--slate); }

.ta-question { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.ta-q-text   { font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.ta-options  { display: flex; flex-direction: column; gap: 8px; }
.ta-option   { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; padding: 8px 10px; border-radius: var(--radius); border: 1px solid transparent; margin-bottom: 0; }
.ta-option:hover { border-color: var(--blue-2); background: var(--blue-light); }
.ta-option input[type="radio"] { margin-top: 2px; flex-shrink: 0; }

.btn-training-submit { font-size: 14px; font-weight: 600; padding: 12px 32px; border-radius: var(--radius); border: none; cursor: pointer; background: var(--blue-2); color: var(--white); margin-top: 8px; }
.btn-training-submit:hover { background: var(--blue); }

.training-result-view { max-width: 720px; margin: 0 auto; }
.ta-result { padding: 24px; border-radius: var(--radius); text-align: center; margin-bottom: 24px; }
.tr-pass { background: #f0fdf4; border: 1px solid #bbf7d0; }
.tr-fail { background: #fef2f2; border: 1px solid #fecaca; }
.ta-result h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.tr-score { font-size: 15px; color: var(--slate); margin-bottom: 16px; }

.ta-feedback-list { display: flex; flex-direction: column; gap: 12px; }
.ta-feedback { padding: 16px; border-radius: var(--radius); font-size: 13px; border: 1px solid var(--line); }
.tf-correct  { background: #f0fdf4; border-color: #bbf7d0; }
.tf-wrong    { background: #fef2f2; border-color: #fecaca; }
.tf-correct-ans { font-weight: 600; margin: 6px 0; color: #15803d; }
.tf-explain  { color: var(--slate); margin-top: 6px; line-height: 1.6; }

.btn-training-retry { font-size: 13px; font-weight: 600; padding: 8px 20px; border-radius: var(--radius); border: none; cursor: pointer; background: var(--blue-2); color: var(--white); }

/* ── Training — Certificate ─────────────────────────────────────────────── */

.training-cert-view { max-width: 760px; margin: 0 auto; }
.training-cert { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px; margin: 16px 0 24px; box-shadow: var(--shadow); }
.cert-header { text-align: center; margin-bottom: 40px; border-bottom: 2px solid var(--line); padding-bottom: 24px; }
.cert-logo   { font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.cert-logo span { color: var(--blue-2); }
.cert-title  { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--slate); margin-top: 8px; }
.cert-body   { text-align: center; }
.cert-presented { font-size: 14px; color: var(--slate); margin-bottom: 12px; }
.cert-learner { font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 20px; word-break: break-all; }
.cert-course { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.cert-track  { font-size: 15px; font-weight: 500; color: var(--blue-2); margin-bottom: 6px; }
.cert-framework { font-size: 13px; color: var(--slate); margin-bottom: 32px; }
.cert-meta   { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.cert-meta div { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cert-meta span { color: var(--slate); }
.cert-meta strong { font-weight: 700; color: var(--navy); font-size: 14px; }
.cert-footer { margin-top: 40px; text-align: center; }
.cert-issuer { font-size: 13px; color: var(--slate); }
.cert-actions { display: flex; gap: 12px; }
.btn-cert-print { font-size: 14px; font-weight: 600; padding: 10px 24px; border-radius: var(--radius); border: 1px solid var(--line); cursor: pointer; background: var(--white); }
.btn-cert-print:hover { background: var(--bg); }

/* ── Control Library ────────────────────────────────────────────────────── */

.control-library { max-width: 900px; margin: 0 auto; }
.library-header { margin-bottom: 24px; }
.library-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.library-header p  { font-size: 14px; color: var(--slate); margin-bottom: 12px; }
.btn-upgrade-lib { display: inline-block; font-size: 13px; font-weight: 600; padding: 8px 18px; border-radius: var(--radius); background: var(--blue-2); color: var(--white); text-decoration: none; }
.btn-upgrade-lib:hover { background: var(--blue); }

.library-col-headers { display: grid; grid-template-columns: 64px 1fr 140px 72px 32px; gap: 8px; padding: 8px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-2); }
.library-domain { margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.library-domain-header { display: flex; align-items: center; gap: 12px; padding: 10px 12px; font-size: 13px; }
.ld-g  { background: #dbeafe; }
.ld-m  { background: #dcfce7; }
.ld-me { background: #fef3c7; }
.ld-ma { background: #fce7f3; }
.library-domain-code { font-weight: 800; font-size: 12px; width: 32px; }
.library-domain-name { font-weight: 700; }
.library-domain-desc { font-size: 12px; color: var(--slate); }

.library-row { display: grid; grid-template-columns: 64px 1fr 140px 72px 32px; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--white); align-items: center; font-size: 13px; }
.library-ctrl-id   { font-weight: 700; font-size: 12px; color: var(--blue-2); }
.library-ctrl-info { display: flex; flex-direction: column; gap: 2px; }
.library-ctrl-name { font-weight: 500; }
.library-ctrl-desc { font-size: 12px; color: var(--slate); }
.library-ctrl-owner { font-size: 12px; color: var(--slate); }
.library-ctrl-effort { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; text-align: center; }
.effort-low    { background: #dcfce7; color: #15803d; }
.effort-medium { background: #fef3c7; color: #b45309; }
.effort-high   { background: #fee2e2; color: #b91c1c; }
.library-lock  { font-size: 14px; text-align: center; }

/* ── Sidebar link active state ─────────────────────────────────────────── */

.sidebar-link { cursor: pointer; padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--slate); border-radius: var(--radius); transition: background .15s, color .15s; }
.sidebar-link:hover { background: var(--blue-light); color: var(--blue-2); }
.sidebar-link.active { background: var(--blue-light); color: var(--blue-2); font-weight: 600; }

@media print {
  @page { margin: 0; }

  /* Hide everything except the certificate */
  body > * { display: none !important; }
  .app-shell { display: block !important; }
  .app-header, .app-sidebar, .btn-training-back, .cert-actions,
  .training-cert-view > .btn-training-back { display: none !important; }

  /* Certificate fills the page */
  .app-shell, #main-content, .training-cert-view { display: block !important; }
  .training-cert {
    box-shadow: none;
    border: none;
    margin: 0;
    padding: 48px;
    width: 100%;
  }
}
