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

/* ─── Design Tokens ────────────────────────────────────────────────────── */
:root {
  --black: #000;
  --white: #fff;
  --pink: #FF4266;
  --green-sat: #29F699;
  --green-mint: #3EFFC2;
  --grey-mid: #777;
  --card-dark: #262626;
  --line: rgba(0,0,0,0.10);
  --line-inv: rgba(255,255,255,0.10);
  --kp-neg: #FFF0F3;
  --kp-pos: #C9FFE8;
  --kp-neu: rgba(0,0,0,0.05);
  --sidebar-w: 248px;
}

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

body {
  font-family: 'SuisseIntl', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  color: #000;
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a, a:link, a:visited { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

/* ─── Layout shell ─────────────────────────────────────────────────────── */
#app {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ──────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: #0a0a0a;
  color: #fff;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  padding: 24px 12px 20px;
  overflow-y: auto;
  border-right: 1px solid #181818;
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 100;
  /* Hide scrollbar but keep functionality */
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sb-logo {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fff;
  display: block;
  padding: 4px 10px 16px;
}

.dot { color: var(--pink); }

.sb-group {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3a3a3a;
  padding: 10px 10px 4px;
  margin-top: 2px;
}

.sb-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #666;
  padding: 7px 10px;
  border-radius: 7px;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
  line-height: 1.3;
}

.sb-btn:hover { background: rgba(255,255,255,0.06); color: #ccc; }
.sb-btn.active { background: rgba(255,255,255,0.09); color: #fff; }

.sb-btn .sb-lk {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #333;
}

.sb-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #181818;
}

.sb-user-info {
  font-size: 12px;
  color: #555;
  padding: 4px 10px 8px;
  line-height: 18px;
}

.sb-user-email {
  display: block;
  color: #888;
  font-size: 12px;
  padding: 4px 10px;
  word-break: break-all;
}

.sb-signin {
  display: block;
  font-size: 13px;
  color: #555;
  padding: 8px 10px;
  border-radius: 8px;
  transition: color 0.12s;
}

.sb-signin:hover { color: #fff; }

/* ─── Mobile header ────────────────────────────────────────────────────── */
.mob-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #000;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 200;
  border-bottom: 1px solid #1a1a1a;
}

.mob-logo {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.mob-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}

.mob-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: 0.2s;
}

/* ─── Main content area ────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  background: #fff;
}

/* ─── Page wrapper ─────────────────────────────────────────────────────── */
.page { background: #fff; }

section { padding: 80px 64px; }
section.dark { background: #000; color: #fff; }
section.grey { background: #F7F7F7; }

/* Prevent section padding on login wrapper */
.login-wrap section { padding: 0; }

/* ─── Typography ───────────────────────────────────────────────────────── */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 22px;
}

.dark .eyebrow { color: #555; }

h1 {
  font-size: 72px;
  line-height: 76px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 46px;
  line-height: 50px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.dark h2 { color: #fff; }

h3 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.lede {
  font-size: 18px;
  line-height: 28px;
  font-weight: 300;
  color: #444;
  max-width: 780px;
  margin-top: 18px;
}

.dark .lede { color: #bbb; }

.hl { color: var(--pink); font-weight: 500; }
.hlg { color: #0E9D63; font-weight: 500; }
.dark .hlg { color: var(--green-mint); }

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.12s;
}

.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary,
.btn-primary:link,
.btn-primary:visited { background: #000; color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: #000; }
.btn-pink { background: var(--pink); color: #fff; }

.dark .btn-ghost { border-color: rgba(255,255,255,0.18); color: #fff; }

/* ─── Cards ────────────────────────────────────────────────────────────── */
.pcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}

.pcard:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.pcard-id {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 10px;
}

.pcard-prompt {
  font-size: 15px;
  line-height: 22px;
  flex: 1;
}

.pcard-prompt .token { color: var(--pink); font-weight: 500; }

.pcard-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  align-items: center;
}

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 20px;
  background: var(--kp-neu);
  color: #666;
}

.badge.l1 { background: #F0FFF7; color: #0E9D63; }
.badge.l2 { background: #FFF8F0; color: #C87400; }
.badge.l3 { background: #FFF0F3; color: var(--pink); }
.badge.l4, .badge.l5 { background: #F0F0FF; color: #4040C0; }

.pcard-action {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.copy-btn {
  font-size: 12px;
  font-weight: 500;
  color: #666;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
}

.copy-btn:hover { background: #000; color: #fff; border-color: #000; }
.copy-btn.copied { background: #0E9D63; color: #fff; border-color: #0E9D63; }

.expand-btn {
  font-size: 12px;
  color: #aaa;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.12s;
}

.expand-btn:hover { color: #000; }

/* ─── Cover / Hero ─────────────────────────────────────────────────────── */
.cover {
  background: #000;
  color: #fff;
  padding: 72px 64px 64px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #111;
}

.cover-mid { margin-top: auto; }
.cover .tag { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #555; margin-bottom: 20px; }
.cover h1 { color: #fff; }
.cover h1 .v { color: var(--pink); font-weight: 300; }
.cover .sub { font-size: 18px; font-weight: 300; color: #999; margin-top: 22px; max-width: 600px; line-height: 28px; }

/* ─── Steps ────────────────────────────────────────────────────────────── */
.steps { counter-reset: step; margin-top: 40px; }

.step {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.dark .step { border-color: rgba(255,255,255,0.08); }

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: 13px;
  font-weight: 500;
  color: #aaa;
  flex-shrink: 0;
  padding-top: 2px;
  width: 28px;
}

.step-body { flex: 1; }
.step-title { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.step-desc { font-size: 14px; line-height: 22px; color: #666; }
.dark .step-desc { color: #888; }

/* ─── Habit cards ──────────────────────────────────────────────────────── */
.habits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }

.habit {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 22px 22px 20px;
}

.habit-num { font-size: 36px; font-weight: 300; color: #e0e0e0; line-height: 1; margin-bottom: 10px; }
.habit-title { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.habit-desc { font-size: 14px; line-height: 21px; color: #666; }

/* ─── Pillar pills ─────────────────────────────────────────────────────── */
.pillar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.pillar-pill:hover, .pillar-pill.active { background: #000; color: #fff; border-color: #000; }

.depth-tab {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s;
  color: #666;
}

.depth-tab:hover { background: rgba(0,0,0,0.05); }
.depth-tab.active { background: #000; color: #fff; }

/* ─── Academy Paths ────────────────────────────────────────────────────── */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }

.path-card {
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}

.path-card.locked { opacity: 0.50; }
.path-card:not(.locked) { cursor: pointer; }
.path-card:not(.locked):hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.path-num { font-size: 11px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: #aaa; margin-bottom: 14px; }
.path-card h3 { font-size: 20px; margin-bottom: 8px; }
.path-desc { font-size: 14px; line-height: 21px; color: #666; margin-bottom: 20px; }

.path-status { font-size: 12px; font-weight: 500; color: #aaa; display: flex; align-items: center; gap: 6px; }
.path-status.done { color: #0E9D63; }
.path-status.active { color: var(--pink); }

/* ─── Module / Unit list ───────────────────────────────────────────────── */
.module-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 16px; }

.module-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: #FAFAFA;
  cursor: pointer;
}

.module-header:hover { background: #F4F4F4; }
.module-num { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #aaa; width: 36px; }
.module-title { font-size: 15px; font-weight: 500; flex: 1; }
.module-status { font-size: 12px; color: #aaa; }
.module-status.done { color: #0E9D63; }

.unit-list { padding: 0 22px 16px; }

.unit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.unit:last-child { border-bottom: 0; }

.unit-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.unit-icon.done { background: #0E9D63; border-color: #0E9D63; color: #fff; }
.unit-icon.active { border-color: var(--pink); color: var(--pink); }

.unit-title { flex: 1; }
.unit-type { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── Certificate card ─────────────────────────────────────────────────── */
.cert-card {
  background: linear-gradient(150deg, #0c0c0c, #1a1416);
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  padding: 46px 44px;
  color: #fff;
  max-width: 620px;
}

.cert-issuer { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #555; margin-bottom: 30px; }
.cert-name { font-size: 32px; font-weight: 300; margin-bottom: 6px; letter-spacing: -0.01em; }
.cert-brand { font-size: 12px; font-weight: 500; letter-spacing: 0.10em; text-transform: uppercase; color: #666; margin-bottom: 28px; }

.cert-title-badge {
  font-size: 16px;
  font-weight: 400;
  color: var(--pink);
  border: 1px solid rgba(255,66,102,0.3);
  border-radius: 6px;
  padding: 10px 16px;
  display: inline-block;
  margin-bottom: 30px;
}

.cert-id { font-size: 12px; color: #555; display: flex; align-items: center; gap: 8px; }
.cert-id .check { color: var(--green-mint); }

/* ─── Verify page ──────────────────────────────────────────────────────── */
.verify-wrap { max-width: 640px; margin: 0 auto; padding: 80px 64px; text-align: center; }

.verify-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 30px;
  margin-bottom: 32px;
}

.verify-status.valid { background: #C9FFE8; color: #0E5C35; }
.verify-status.invalid { background: var(--kp-neg); color: #8B0020; }

/* ─── Prompt Library ───────────────────────────────────────────────────── */
.lib-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  align-items: center;
}

.personalise-bar {
  background: #F6F6F6;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.personalise-bar label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 6px;
}

.brand-select, .filter-select {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #000;
  cursor: pointer;
}

.pillar-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.depth-tabs { display: flex; gap: 4px; background: #F0F0F0; border-radius: 30px; padding: 3px; }

.prompts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ─── Admin Panel ──────────────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.admin-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777;
  font-weight: 500;
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--line);
}

.admin-table td { padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,0.05); vertical-align: top; }
.admin-table tr:hover td { background: #FAFAFA; }

.action-btns { display: flex; gap: 8px; }

.action-btn {
  font-size: 12px;
  color: #666;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: 0.12s;
}

.action-btn:hover { background: #000; color: #fff; border-color: #000; }
.action-btn.del:hover { background: var(--pink); border-color: var(--pink); }

/* ─── Modal ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
}

.modal {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h3 { margin-bottom: 20px; }

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #000;
  transition: border-color 0.12s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: #000; }
.form-textarea { min-height: 80px; resize: vertical; }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ─── Login page ───────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.login-box { max-width: 400px; width: 100%; }
.login-box h2 { font-size: 32px; line-height: 36px; margin-bottom: 10px; }
.login-box .lede { font-size: 15px; margin-top: 0; margin-bottom: 28px; }

.login-sent {
  background: #F0FFF7;
  border: 1px solid #A8EFC6;
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 14px;
  line-height: 21px;
  color: #0E5C35;
  margin-top: 20px;
}

/* ─── Status page ──────────────────────────────────────────────────────── */
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 10px; }
.status-dot.ok { background: var(--green-sat); }
.status-dot.warn { background: #F5A623; }
.status-dot.down { background: var(--pink); }

.freshness-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.freshness-table td { padding: 12px 0; border-bottom: 1px solid var(--line); }
.freshness-table td:last-child { text-align: right; color: #777; }

/* ─── Help FAQ ─────────────────────────────────────────────────────────── */
.faq { margin-top: 32px; }
.faq-item { border-top: 1px solid var(--line); padding: 22px 0; }
.faq-q { font-size: 16px; font-weight: 500; margin-bottom: 0; cursor: pointer; }
.faq-a { font-size: 15px; line-height: 24px; color: #555; margin-top: 10px; }

/* ─── Upload zone ──────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  color: #aaa;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s;
  margin-bottom: 20px;
}

.upload-zone:hover, .upload-zone.drag { border-color: #000; color: #000; }

/* ─── Toast ────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: #000;
  color: #fff;
  font-size: 14px;
  padding: 14px 20px;
  border-radius: 10px;
  z-index: 400;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ─── Spinner ──────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-page { display: flex; align-items: center; justify-content: center; min-height: 50vh; }

/* ─── Copy button animation ────────────────────────────────────────────── */
.copy-btn { transition: background 0.18s, color 0.18s, border-color 0.18s; }

/* ─── Unit active state ────────────────────────────────────────────────── */
.unit.unit-active:hover { background: #FAFAFA; border-radius: 8px; }

/* ─── Pillar pills wrapping fix ────────────────────────────────────────── */
.pillar-pills { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── Depth tabs fix ───────────────────────────────────────────────────── */
.depth-tabs { display: flex; gap: 3px; background: #F0F0F0; border-radius: 30px; padding: 3px; }

/* ─── WCAG: dark section lede contrast bump ────────────────────────────── */
.dark .lede { color: #cfcfcf; }

/* ─── details/summary style for worked examples ────────────────────────── */
details summary::-webkit-details-marker { display: none; }
details[open] summary span:first-child { transform: rotate(90deg); display: inline-block; }

/* ─── Admin multi-tab ──────────────────────────────────────────────────── */
.admin-tabbar {
  border-bottom: 1px solid var(--line);
  padding: 0 64px;
  display: flex;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-tab {
  font-size: 13px;
  font-weight: 500;
  color: #777;
  padding: 16px 22px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
  background: none;
}

.admin-tab:hover { color: #000; }
.admin-tab.active { color: #000; border-bottom-color: #000; }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-filter-input { max-width: 260px; flex: 1; }
.admin-filter-select { max-width: 200px; }

.admin-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 28px 24px;
}

.admin-card h3 { font-size: 18px; margin-bottom: 8px; }

.domain-list { display: flex; flex-direction: column; gap: 8px; margin-top: 32px; }

.domain-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: 'SFMono-Regular', 'Menlo', monospace;
  background: #FAFAFA;
}

.domain-chip-dlg { background: #F0FFF7; border-color: #A8EFC6; }

.domain-chip-name { flex: 1; }
.domain-chip-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0E9D63;
  font-family: inherit;
}

.domain-remove {
  font-size: 18px;
  line-height: 1;
  color: #ccc;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.12s;
  background: none;
  border: none;
  flex-shrink: 0;
}

.domain-remove:hover { color: var(--pink); }

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .admin-tabbar { padding: 0 20px; overflow-x: auto; }
  .admin-cards { grid-template-columns: 1fr; }
  .admin-filter-input { max-width: unset; }
  .sidebar { transform: translateX(-100%); transition: transform 0.25s; }
  .sidebar.open { transform: translateX(0); }
  .mob-header { display: flex; }

  /* ── Core layout ── */
  .main-content { margin-left: 0; padding-top: 56px; overflow-x: hidden; }
  .page { overflow-x: hidden; max-width: 100vw; }

  /* ── All sections: collapse horizontal padding ── */
  section, .cover { padding: 48px 20px !important; }
  h1 { font-size: 44px; line-height: 48px; }
  h2 { font-size: 28px; line-height: 34px; }

  /* ── Common grids → single column ── */
  .prompts-grid { grid-template-columns: 1fr; }
  .paths { grid-template-columns: 1fr; }
  .habits { grid-template-columns: 1fr; }
  .cover { min-height: 360px; }

  /* ── Library hero inline-style div ── */
  .lib-hero { padding: 40px 20px 32px !important; }
  .lib-personalise { flex-direction: column !important; gap: 14px !important; }
  .lib-personalise select { min-width: unset !important; width: 100% !important; }

  /* ── Fluency: sticky nav + legend bar ── */
  #fluency-nav { padding: 4px 12px !important; }
  .fluency-legend { padding: 12px 16px !important; flex-wrap: wrap !important; gap: 10px !important; }
  .fluency-domain-section { padding: 48px 20px !important; }
  .fluency-info-grid { grid-template-columns: 1fr !important; }

  /* ── Welcome page inline divs ── */
  .welcome-hero { padding: 48px 20px 40px !important; }
  .welcome-usp { padding: 40px 20px !important; }
  .welcome-usp-grid { grid-template-columns: 1fr !important; }
  .welcome-links { padding: 40px 20px !important; }
  .welcome-links-grid { grid-template-columns: 1fr !important; }
  .welcome-formula { padding: 40px 20px !important; }
  .welcome-formula-grid { grid-template-columns: 1fr !important; }

  /* ── Skills page ── */
  .skills-hero { padding: 48px 20px 40px !important; }
  .skills-filter { padding: 16px 16px !important; }
  .skills-grid-section { padding: 28px 16px !important; }
  .skills-grid { grid-template-columns: 1fr !important; }
  .skill-install-cmd { flex-direction: column !important; gap: 6px !important; }
  .skill-install-cmd code { font-size: 10px !important; white-space: normal !important; word-break: break-all !important; }

  /* ── Start page ── */
  .start-assistant-pills { flex-wrap: wrap !important; gap: 6px !important; }
  .start-assistant-pills span { font-size: 10px !important; }

  /* ── Status page ── */
  .status-freshness td { font-size: 12px; }

  /* ── Academy path pages ── */
  .path-screen > div { padding-left: 20px !important; padding-right: 20px !important; }
  div[style*="position:sticky"][style*="padding:14px 64px"] { padding: 10px 14px !important; }

  /* ── Cert card ── */
  .cert-card { padding: 28px 22px; }

  /* ── Prevent text overflow ── */
  p, .lede, h1, h2, h3 { overflow-wrap: break-word; word-break: break-word; }
}

@media (max-width: 480px) {
  section, .cover { padding: 36px 16px !important; }
  h1 { font-size: 34px; line-height: 40px; }
  h2 { font-size: 24px; line-height: 30px; }
  .cert-card { padding: 22px 18px; }
  .pillar-pills { gap: 5px; }
  .pillar-pill { font-size: 10px; padding: 4px 9px; }
}

/* ─── SaaS hub additions ───────────────────────────────────────────────── */

/* Brand switcher dropdown (replaces static sb-logo) */
.sb-switch { position: relative; padding: 4px 10px 16px; }
.sb-switch-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  font-size: 13px; font-weight: 500; letter-spacing: -0.01em; color: #fff;
  padding: 6px 8px; border-radius: 8px; transition: background 0.12s;
}
.sb-switch-btn:hover { background: rgba(255,255,255,0.06); }
.sb-switch-btn .chev { margin-left: auto; font-size: 9px; color: #666; transition: transform 0.15s; }
.sb-switch.open .chev { transform: rotate(180deg); }
.sb-switch-menu {
  display: none; position: absolute; left: 10px; right: 10px; top: 100%;
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 10px;
  padding: 6px; z-index: 120; box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.sb-switch.open .sb-switch-menu { display: block; }
.sb-switch-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 10px; border-radius: 7px; transition: background 0.12s;
}
.sb-switch-item:hover { background: rgba(255,255,255,0.07); }
.sb-switch-item .si-name { font-size: 13px; font-weight: 500; color: #fff; }
.sb-switch-item .si-desc { font-size: 11px; color: #777; line-height: 1.35; }
.sb-switch-item.current { background: rgba(255,66,102,0.10); }
.sb-switch-item.current .si-name { color: var(--pink); }

/* Module grid (Modules landing) */
.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.mod-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 24px 24px 20px;
  display: flex; flex-direction: column; transition: box-shadow 0.15s; cursor: pointer;
}
.mod-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.mod-card .mod-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: #aaa; margin-bottom: 12px;
}
.mod-card h3 { font-size: 20px; margin-bottom: 8px; }
.mod-card p { font-size: 14px; line-height: 21px; color: #666; flex: 1; }
.mod-card .mod-go { font-size: 13px; font-weight: 500; color: var(--pink); margin-top: 16px; }

/* Screenshot figure */
.shot {
  margin-top: 36px; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; background: #FAFAFA;
}
.shot img { display: block; width: 100%; height: auto; }
.shot-cap {
  font-size: 12px; color: #888; padding: 12px 18px; border-top: 1px solid var(--line);
  background: #fff;
}

/* Value bullets */
.vlist { margin-top: 30px; display: flex; flex-direction: column; gap: 0; }
.vrow { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.vrow:last-child { border-bottom: 0; }
.vrow .vk {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: #aaa; width: 150px; flex-shrink: 0; padding-top: 2px;
}
.vrow .vv { font-size: 15px; line-height: 23px; color: #333; flex: 1; }
.vrow .vv strong { font-weight: 500; }

/* Submodule chips */
.subchips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.subchip {
  font-size: 12px; font-weight: 500; color: #444;
  border: 1px solid var(--line); border-radius: 30px; padding: 6px 14px;
}

/* Section intro spacing for module pages */
.mod-back {
  font-size: 13px; color: #999; margin-bottom: 24px; display: inline-flex; gap: 6px;
}
.mod-back:hover { color: #000; }

@media (max-width: 860px) {
  .mod-grid { grid-template-columns: 1fr !important; }
  .vrow { flex-direction: column; gap: 4px; }
  .vrow .vk { width: auto; }
}

/* ─── v2: media placeholders, LDI components ───────────────────────────── */

/* Media block at top of pages: hero picture + where-to-find / how gifs */
.media-hero {
  margin-top: 36px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: #fff;
}
.media-frame img { display: block; width: 100%; max-height: 440px; object-fit: cover; object-position: top; }
.media-cap { font-size: 12px; color: #888; padding: 12px 18px; border-top: 1px solid var(--line); background: #fff; }

.media-gifs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

.ph {
  border-radius: 16px; border: 1.5px dashed #d9d9d9;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255,66,102,0.06), transparent 60%),
    linear-gradient(180deg, #fcfcfc, #f5f5f5);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px; color: #999;
}
.ph-hero { margin-top: 36px; aspect-ratio: 16 / 7; }
.ph-gif { aspect-ratio: 16 / 10; }
.ph-chip {
  font-size: 10px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--pink); background: #FFF0F3; border-radius: 20px; padding: 4px 11px; margin-bottom: 12px;
}
.ph-label { font-size: 15px; font-weight: 500; color: #555; max-width: 360px; line-height: 1.4; }
.ph-sub { font-size: 12px; color: #aaa; margin-top: 6px; }

/* Feature value list (bold term + description) */
.feat-list { margin-top: 34px; display: flex; flex-direction: column; }
.feat {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.feat:last-child { border-bottom: 0; }
.feat-k { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; color: #000; }
.feat-v { font-size: 15px; line-height: 24px; color: #555; }

/* Lead line under a hero/in a section */
.lead-line { font-size: 24px; line-height: 32px; font-weight: 400; letter-spacing: -0.01em; color: #000; max-width: 760px; }
.dark .lead-line { color: #fff; }

/* Discipline callout */
.callout {
  margin-top: 36px; border-left: 2px solid var(--pink); padding: 6px 0 6px 24px;
}
.callout .ct { font-size: 26px; line-height: 34px; font-weight: 400; letter-spacing: -0.01em; }
.callout .cm { font-size: 14px; color: #777; margin-top: 12px; }

/* Audience cards (who is it for) */
.aud-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.aud-card { border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px; }
.aud-card h3 { font-size: 19px; margin-bottom: 10px; }
.aud-card p { font-size: 14px; line-height: 22px; color: #555; }

/* Module breakdown boxes (welcome) */
.mbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.mbox { border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; display: flex; flex-direction: column; }
.mbox-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mbox-head h3 { font-size: 19px; margin: 0; }
.mbox-head .mbox-open { font-size: 12px; font-weight: 500; color: var(--pink); white-space: nowrap; }
.mbox p { font-size: 14px; line-height: 21px; color: #666; margin: 10px 0 16px; }
.mbox-subs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.mbox-sub {
  font-size: 12px; font-weight: 500; color: #555; border: 1px solid var(--line);
  border-radius: 30px; padding: 5px 12px; transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.mbox-sub:hover { background: #000; color: #fff; border-color: #000; }

/* Question list */
.qlist { margin-top: 28px; display: flex; flex-direction: column; gap: 0; max-width: 760px; }
.qlist .q { font-size: 17px; line-height: 26px; color: #222; padding: 14px 0; border-bottom: 1px solid var(--line); }
.qlist .q::before { content: "›"; color: var(--pink); font-weight: 600; margin-right: 12px; }

@media (max-width: 860px) {
  .media-gifs { grid-template-columns: 1fr; }
  .feat { grid-template-columns: 1fr; gap: 6px; }
  .aud-grid, .mbox-grid { grid-template-columns: 1fr !important; }
  .lead-line { font-size: 20px; line-height: 28px; }
  .callout .ct { font-size: 22px; line-height: 30px; }
}

/* ─── v3: match Connect components + clearer brand switcher ─────────────── */

/* Brand switcher: bold, left-aligned, clearly a control */
.sb-switch { position: relative; padding: 4px 8px 14px; }
.sb-switch-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 11px 12px; border-radius: 9px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; transition: background 0.12s, border-color 0.12s;
}
.sb-switch-btn:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); }
.sb-brand { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.sb-switch-btn .chev { margin-left: auto; font-size: 11px; color: var(--pink); transition: transform 0.15s; }
.sb-switch.open .chev { transform: rotate(180deg); }
.sb-switch-menu {
  display: none; position: absolute; left: 8px; right: 8px; top: 100%; margin-top: 4px;
  background: #1c1c1c; border: 1px solid #303030; border-radius: 11px;
  padding: 8px; z-index: 120; box-shadow: 0 12px 36px rgba(0,0,0,0.55);
}
.sb-switch.open .sb-switch-menu { display: block; }
.sb-switch-head {
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: #666; padding: 6px 10px 8px;
}
.sb-switch-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; transition: background 0.12s; }
.sb-switch-item:hover { background: rgba(255,255,255,0.08); }
.sb-switch-item .si-body { flex: 1; }
.sb-switch-item .si-name { font-size: 13px; font-weight: 600; color: #fff; }
.sb-switch-item .si-desc { font-size: 11px; color: #888; line-height: 1.35; margin-top: 1px; }
.sb-switch-item .si-cue { font-size: 13px; color: var(--pink); font-weight: 600; }
.sb-switch-item.current { background: rgba(255,66,102,0.12); }
.sb-switch-item.current .si-name { color: var(--pink); }
.sb-switch-item.current .si-cue { color: var(--green-mint); }

/* Card hovers (match Connect welcome) */
.usp-card { transition: box-shadow 0.15s; }
.usp-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.journey-card { transition: box-shadow 0.15s; }
.journey-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

/* Responsive for inline-styled page sections */
@media (max-width: 860px) {
  .pg-hero { padding: 48px 20px 40px !important; }
  .pg-hero h1 { font-size: 34px !important; line-height: 40px !important; }
  .pg-sec { padding: 40px 20px !important; }
  .card-grid { grid-template-columns: 1fr !important; }
  .journey-group { padding: 28px 20px !important; }
  .journey-group > div { grid-template-columns: 1fr !important; gap: 16px !important; }
  .journey-cards { grid-template-columns: 1fr !important; }
}

/* ─── v4: tighter, aligned brand switcher with clearer dropdown ────────── */
.sb-switch { position: relative; padding: 0 4px 14px; }
.sb-switch-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 8px; border-radius: 8px;
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.10);
  color: #fff; transition: background 0.12s, border-color 0.12s;
}
.sb-switch-btn:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.22); }
.sb-brand { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.sb-switch-btn .chev {
  margin-left: auto; font-size: 14px; line-height: 1; color: #9a9a9a;
  width: 18px; height: 18px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.07); transition: transform 0.15s, background 0.12s, color 0.12s;
}
.sb-switch-btn:hover .chev { color: #fff; background: rgba(255,255,255,0.14); }
.sb-switch.open .chev { transform: rotate(180deg); }

/* ─── v5: brand name without box, chevron beside the name ──────────────── */
.sb-switch { position: relative; padding: 2px 4px 14px; }
.sb-switch-btn {
  background: none; border: 0; width: 100%;
  display: flex; align-items: center; gap: 7px;
  padding: 6px 6px; border-radius: 6px; color: #fff;
  transition: background 0.12s;
}
.sb-switch-btn:hover { background: rgba(255,255,255,0.06); }
.sb-brand { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.sb-switch-btn .chev {
  margin-left: 0; width: auto; height: auto; background: none;
  font-size: 11px; color: var(--pink); transition: transform 0.15s;
}
.sb-switch-btn:hover .chev { color: var(--pink); background: none; }
.sb-switch.open .chev { transform: rotate(180deg); }

/* Prompt-habit + formula grids responsive */
@media (max-width: 860px) {
  .habit-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .formula-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ─── v6: media frames show full (no crop) so gifs/screens aren't cut off ─ */
.media-frame img { max-height: none !important; height: auto !important; object-fit: contain !important; }
.ph-hero { aspect-ratio: 16 / 8; }

/* ─── v7: brighter sidebar group labels on dark nav ────────────────────── */
.sb-group { color: #8a8a8a; }

/* ─── v8: real nav icons, welcome laptop mockup, plain brand logo ───────── */
.journey-card svg, .jcard-icon svg { width: 20px; height: 20px; display: block; }

/* Plain brand logo (dropdown removed) */
.sb-brandwrap { padding: 6px 10px 14px; }
.sb-brandwrap .sb-brand { display: block; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: #fff; }

/* Welcome hero: two columns with laptop mockup */
.wh-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.wh-mac { display: flex; justify-content: center; }
.mac { width: 100%; max-width: 540px; }
.mac-screen {
  background: #000; border: 12px solid #111; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28); position: relative;
}
.mac-screen img { display: block; width: 100%; height: auto; }
.mac-cam { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: #2a2a2a; z-index: 2; }
.mac-hinge {
  height: 14px; width: 118%; margin-left: -9%;
  background: linear-gradient(#d8dade, #b6b9bd); border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 18px rgba(0,0,0,0.12); position: relative;
}
.mac-hinge::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 90px; height: 6px; background: #a6a9ad; border-radius: 0 0 8px 8px; }

@media (max-width: 900px) {
  .wh-grid { grid-template-columns: 1fr; gap: 36px; }
  .wh-mac { order: -1; }
  .mac { max-width: 460px; }
}

/* ─── v9: Quick Guide nav icons red-on-dark to match SaaS ──────────────── */
.jcard-icon { width: 22px; height: 22px; color: #111; }
.jcard-icon-svg { width: 30px; height: 30px; background: #111; border-radius: 8px; }
.jcard-icon-svg svg { width: 20px; height: 20px; color: #FF4266; }

/* ─── v10: platform videos in media frames ─────────────────────────────── */
.media-frame video { display: block; width: 100%; height: auto; }

/* ─── v11: DLG brand sign-off in sidebar footer (remove block to revert) ─ */
.sb-dlg { margin-top: 18px; padding-top: 16px; border-top: 1px solid #181818; padding-left: 10px; }
.sb-dlg img { display: block; width: 58px; height: auto; opacity: 1; }

/* ─── v12: DLG vertical wordmark in hero right-side space (remove block to revert) ─ */
.pg-hero.has-logo { position: relative; }
.pg-hero .hero-logo {
  position: absolute; right: 64px; top: 50%; transform: translateY(-50%);
  height: 150px; width: auto; opacity: 0.9; pointer-events: none;
}
@media (max-width: 1100px) { .pg-hero .hero-logo { display: none; } }

/* ─── v13: Welcome dark-hero background test (set T=false in welcome() + remove this block to revert) ─ */
.welcome-hero.dark .mac-screen { border-color: #3a3d42; box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 30px 70px rgba(0,0,0,0.55); }
.welcome-hero.dark .btn-primary { background: #fff; color: #000; }
