/* ===========================================================
   Levrly SOP Library — site chrome styles
   Brand bar, footer, nav, inline search, homepage, industry.
   SOP body content has its own embedded styles from preview HTML.
   =========================================================== */

/* ── Reset & base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  color: #1A1A2E;
  background: #F7F7F9;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Brand bar (sticky top nav) ────────────────────────── */
.brand-bar {
  background: #1A1A2E;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo-img {
  height: 22px;
  width: auto;
  display: block;
}
.brand-tag {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.42);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  border-left: 1px solid rgba(255,255,255,.15);
  padding-left: 12px;
  white-space: nowrap;
}
.brand-nav {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  padding: 6px 12px;
  border-radius: 7px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: rgba(140,95,243,.15); color: #C4B5FD; }

/* Industries dropdown in nav */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-dropdown.active > .nav-dropdown-trigger {
  background: rgba(140,95,243,.15);
  color: #C4B5FD;
}
.nav-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #E5E5E7;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(10,10,20,.2), 0 4px 12px rgba(10,10,20,.06);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 120;
  max-height: 70vh;
  overflow-y: auto;
}
.nav-dropdown:hover .nav-dd-menu,
.nav-dropdown:focus-within .nav-dd-menu,
.nav-dropdown.open .nav-dd-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-dd-item {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #1A1A2E;
  border-radius: 6px;
  text-decoration: none;
  transition: background .1s;
}
.nav-dd-item:hover { background: #F5F3FF; color: #6D28D9; }
.nav-dd-item.active { background: #EDE9FB; color: #6D28D9; }

/* ── Search trigger (pill button in brand bar) ─────────── */
.brand-search-trigger {
  margin-left: auto;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.65);
  padding: 7px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.brand-search-trigger:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}
.brand-search-trigger:active {
  transform: scale(.98);
}
.brand-search-trigger kbd {
  font-family: inherit;
  font-size: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: rgba(255,255,255,.6);
}

/* ── Search modal (smooth fade + scale animation) ──────── */
.search-modal {
  display: none;                         /* JS toggles this to 'block' on open */
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 200;
  padding: 10vh 20px 20px;
  opacity: 0;
  transition: opacity .22s ease, backdrop-filter .22s ease, background .22s ease;
}
.search-modal.open {
  opacity: 1;
  background: rgba(10, 10, 20, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.search-panel {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(10, 10, 20, .4), 0 4px 16px rgba(10, 10, 20, .08);
  transform: translateY(-16px) scale(.97);
  opacity: 0;
  transition: transform .26s cubic-bezier(.2, .8, .2, 1), opacity .22s ease;
  will-change: transform, opacity;
}
.search-modal.open .search-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #E5E5E7;
  color: #6B7280;
}
.search-input-wrap input {
  flex: 1;
  border: none;
  font: inherit;
  font-size: 16px;
  outline: none;
  color: #1A1A2E;
  background: transparent;
}
.search-close {
  background: #F4F4F6;
  border: 1px solid #E5E5E7;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.search-close:hover { background: #EDE9FB; color: #6D28D9; }
.search-results {
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px 0;
}
.search-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
  transition: background .12s, border-left-color .12s, padding-left .12s;
}
.search-result:hover, .search-result.focused {
  background: #F5F3FF;
  border-left-color: #8C5FF3;
  padding-left: 15px;
}
.search-result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #EDE9FB;
  color: #8C5FF3;
  flex-shrink: 0;
  margin-top: 1px;
}
.search-result-main { flex: 1; min-width: 0; }
.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A2E;
  margin-bottom: 2px;
  line-height: 1.35;
}
.search-result-title mark,
.search-result-snippet mark {
  background: #EDE9FB;
  color: #6D28D9;
  padding: 0 1px;
  border-radius: 2px;
}
.search-result-meta {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 4px;
}
.search-result-badge {
  color: #6D28D9;
  font-weight: 600;
}
.search-result-snippet {
  font-size: 12px;
  color: #4B5563;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-empty {
  padding: 32px 20px;
  text-align: center;
  color: #9CA3AF;
  font-size: 13px;
}

/* ── Category background icon (shared across cards) ────── */
.card-bg-icon {
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%) rotate(-8deg);
  width: 130px;
  height: 130px;
  color: #8C5FF3;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  transition: opacity .2s, transform .2s;
}

/* ── SOP ID (bottom-right corner of cards — plain grey text) ── */
.card-id-pill {
  position: absolute;
  bottom: 10px;
  right: 14px;
  z-index: 2;
  font-size: 10px;
  font-weight: 500;
  color: #9CA3AF;
  font-family: 'SF Mono', 'Menlo', ui-monospace, monospace;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  transition: color .15s;
}

/* ── Hero (homepage + category views) ──────────────────── */
.home-hero {
  background: #1A1A2E;
  color: #fff;
  padding: 80px 24px 96px;
  position: relative;
  overflow: hidden;
}
/* Compact variant — used on industry + collections pages */
.home-hero-compact { padding: 52px 24px 60px; }
.home-hero-compact .home-hero-title { font-size: clamp(26px, 4vw, 36px); margin-bottom: 12px; }
.home-hero-compact .home-hero-sub { font-size: 14px; margin-bottom: 24px; }
.home-hero-compact .home-hero-search { padding: 11px 20px; font-size: 13px; }
.home-hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(140,95,243,.25) 0%, transparent 60%);
  pointer-events: none;
}
.home-hero::after {
  content: '';
  position: absolute;
  bottom: -200px; left: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(242,86,122,.12) 0%, transparent 60%);
  pointer-events: none;
}
.home-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}
.home-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #C4B5FD;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 20px;
}
.home-hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.home-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,.7);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.home-hero-search {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  padding: 14px 24px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.home-hero-search:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
}
.home-hero-search kbd {
  font-family: inherit;
  font-size: 11px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  padding: 2px 7px;
  border-radius: 4px;
  color: rgba(255,255,255,.7);
}

/* ── Homepage sections ──────────────────────────────────── */
.home-section {
  max-width: 1040px;
  margin: 56px auto 0;
  padding: 0 24px;
}
.home-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-bottom: 0;
}
.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.home-section-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #9CA3AF;
}
.industry-filter-summary { white-space: nowrap; }
.industry-filter-clear {
  background: none;
  border: none;
  color: #8C5FF3;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
}
.industry-filter-clear:hover { background: #F5F3FF; }
.industry-filter-clear[hidden] { display: none; }

/* ── Compact industry filter grid ──────────────────────── */
.industry-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.industry-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid #E5E5E7;
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: border-color .15s, transform .08s, box-shadow .15s, background .15s;
}
.industry-chip:hover {
  border-color: #C4B5FD;
  transform: translateY(-1px);
}
.industry-chip:active { transform: translateY(0) scale(.98); }
.industry-chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #F4F4F6;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.industry-chip-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #1A1A2E;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.industry-chip-count {
  font-size: 11px;
  font-weight: 700;
  color: #9CA3AF;
  background: #F4F4F6;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}

/* Empty (no SOPs yet) — muted but still clickable */
.industry-chip-empty {
  background: #FAFAFB;
  border-style: dashed;
  border-color: #E0E0E3;
  cursor: not-allowed;
}
.industry-chip-empty .industry-chip-label { color: #9CA3AF; }
.industry-chip-empty .industry-chip-icon { color: #9CA3AF; }
.industry-chip-empty:hover {
  transform: none;
  border-color: #E0E0E3;
}

/* Selected / pressed — glows purple */
.industry-chip[aria-pressed="true"] {
  border-color: #8C5FF3;
  background: linear-gradient(135deg, rgba(242,86,122,.06) 0%, rgba(140,95,243,.10) 100%);
  box-shadow:
    0 0 0 3px rgba(140,95,243,.18),
    0 4px 16px rgba(140,95,243,.18);
}
.industry-chip[aria-pressed="true"] .industry-chip-icon {
  background: #8C5FF3;
  color: #fff;
}
.industry-chip[aria-pressed="true"] .industry-chip-count {
  background: rgba(140,95,243,.15);
  color: #6D28D9;
}
.industry-chip[aria-pressed="true"] .industry-chip-label {
  color: #1A1A2E;
}

/* Pulse animation on select */
@keyframes chipGlow {
  0%   { box-shadow: 0 0 0 0 rgba(140,95,243,.35), 0 4px 16px rgba(140,95,243,.18); }
  100% { box-shadow: 0 0 0 8px rgba(140,95,243,0),   0 4px 16px rgba(140,95,243,.18); }
}
.industry-chip[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 11px;
  pointer-events: none;
  animation: chipGlow .6s ease-out;
}

/* Hide recent items that aren't in default top-8 (shown only when filtered) */
.recent-item[data-default-visible="0"] { display: none; }
.recent-list.filtered .recent-item[data-default-visible="0"] { display: flex; }
.recent-list.filtered .recent-item[data-filter-hidden="true"] { display: none; }
.recent-list .recent-item[data-filter-hidden="true"] { display: none; }

.home-empty-filtered {
  background: #fff;
  border: 1.5px dashed #E5E5E7;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: #6B7280;
  font-size: 13px;
  margin-top: 8px;
}

/* Responsive: fewer columns on narrower screens */
@media (max-width: 700px) {
  .industry-filter-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .industry-chip { padding: 9px 11px; gap: 8px; }
  .industry-chip-label { font-size: 12.5px; }
}

/* Industry cards */
.home-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.home-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1.5px solid #E5E5E7;
  border-radius: 14px;
  padding: 24px 26px;
  overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.home-card:hover {
  border-color: #C4B5FD;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(140,95,243,.1);
}
.home-card:hover .card-bg-icon {
  opacity: 0.11;
  transform: rotate(-5deg) scale(1.05);
}
/* Empty-state industry cards (no SOPs yet) — subdued */
.home-card-empty {
  background: #FAFAFB;
  border-style: dashed;
  border-color: #E0E0E3;
}
.home-card-empty .home-card-title { color: #6B7280; }
.home-card-empty .home-card-eyebrow { color: #9CA3AF; }
.home-card-empty .card-bg-icon { opacity: 0.04; color: #6B7280; }
.home-card-empty:hover {
  border-color: #C4B5FD;
  border-style: solid;
  background: #fff;
}
.home-card-empty:hover .home-card-title { color: #1A1A2E; }
.home-card-empty:hover .home-card-eyebrow { color: #8C5FF3; }
.home-card-content { position: relative; z-index: 1; }
.home-card-eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: #8C5FF3;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-bottom: 8px;
}
.home-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}
.home-card-meta {
  font-size: 12px;
  color: #6B7280;
}

/* Recent list (homepage) */
.recent-list {
  display: grid;
  gap: 2px;
  background: #E5E5E7;
  border: 1px solid #E5E5E7;
  border-radius: 14px;
  overflow: hidden;
}
.recent-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #fff;
  padding: 18px 22px;
  overflow: hidden;
  transition: background .15s;
}
.recent-item::before {
  /* subtle left bar accent on hover */
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background .15s;
}
.recent-item:hover { background: #F9F7FF; }
.recent-item:hover::before { background: #8C5FF3; }
.recent-item:hover .card-bg-icon { opacity: 0.1; }
.recent-item:hover .card-id-pill { color: #6B7280; }
.recent-item .card-bg-icon {
  /* Override — positioned to avoid the bottom-right ID pill */
  width: 110px;
  height: 110px;
  top: 50%;
  right: -6px;
  transform: translateY(-58%) rotate(-8deg);
}
.recent-item {
  /* Extra bottom padding so ID pill doesn’t overlap description */
  padding-bottom: 38px;
}
.recent-item-content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}
.recent-title {
  font-size: 15px;
  font-weight: 600;
  color: #1A1A2E;
  margin-bottom: 4px;
  letter-spacing: -0.1px;
}
.recent-cat {
  font-size: 11.5px;
  color: #8C5FF3;
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.recent-desc {
  font-size: 12.5px;
  color: #4B5563;
  line-height: 1.55;
  max-width: 620px;
}

/* ── Industry page ─────────────────────────────────────── */
.industry-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.industry-header {
  background: #1A1A2E;
  color: #fff;
  border-radius: 14px;
  padding: 36px 44px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.industry-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(140,95,243,.18) 0%, transparent 70%);
}
.industry-eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: #8C5FF3;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.industry-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.industry-meta {
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

.category-section {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px 24px;
  margin-bottom: 16px;
  border: 1px solid #E5E5E7;
}
.category-section-title {
  font-size: 16px;
  font-weight: 800;
  color: #1A1A2E;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #EDE9FB;
}
.category-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 8px;
}
.category-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  overflow: hidden;
  transition: background .15s, border-color .15s;
}
.category-item:hover {
  background: #F9F7FF;
  border-color: #DDD6FE;
}
.category-item:hover .card-bg-icon { opacity: 0.1; }
.category-item:hover .card-id-pill { color: #6B7280; }
.category-item .card-bg-icon {
  width: 100px;
  height: 100px;
  top: 50%;
  right: -8px;
  transform: translateY(-55%) rotate(-8deg);
}
.category-item {
  /* Extra bottom padding so ID pill doesn’t overlap description */
  padding-bottom: 34px;
}
.category-item-content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}
.category-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1A1A2E;
  margin-bottom: 4px;
  line-height: 1.4;
}
.category-item-desc {
  font-size: 12px;
  color: #4B5563;
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.category-item-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #6D28D9;
  background: #EDE9FB;
  padding: 2px 7px;
  border-radius: 10px;
  margin-top: 2px;
}

.empty-state {
  background: #fff;
  border: 1.5px dashed #E5E5E7;
  border-radius: 12px;
  padding: 56px 32px;
  text-align: center;
  color: #6B7280;
}
.empty-state p { max-width: 480px; margin: 0 auto 10px; font-size: 14px; line-height: 1.6; }
.empty-state p:last-child { margin-bottom: 0; }
.empty-state p strong { color: #1A1A2E; font-size: 15px; }
.empty-state a { color: #8C5FF3; border-bottom: 1px solid rgba(140,95,243,.3); }
.empty-state a:hover { border-bottom-color: #8C5FF3; }
.empty-state-cta { margin-top: 18px; font-size: 13px; }

.no-match-state {
  background: #fff;
  border: 1.5px dashed #E5E5E7;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: #6B7280;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ── Tag chips (on cards) ──────────────────────────────── */
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.2px;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag-chips-sm .tag-chip { font-size: 10px; padding: 2px 8px; }
/* Tag type color coding */
.tag-chip.tag-audience {
  background: #EDE9FB;
  color: #6D28D9;
  border-color: #DDD6FE;
}
.tag-chip.tag-function {
  background: #F1F5F9;
  color: #475569;
  border-color: #E2E8F0;
}
.tag-chip.tag-frequency {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FDE68A;
}

/* ── Tag filter bar (industry pages) ───────────────────── */
.tag-filter-bar {
  background: #fff;
  border: 1px solid #E5E5E7;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px 24px;
  align-items: start;
  position: relative;
}
.tag-filter-group { min-width: 0; }
.tag-filter-label {
  font-size: 10px;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 8px;
}
.tag-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px 4px 12px;
  border-radius: 20px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid;
  transition: background .12s, color .12s, border-color .12s, transform .08s;
}
.tag-filter-chip:active { transform: scale(.97); }
.tag-filter-chip .tag-filter-count {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(0,0,0,.05);
  min-width: 18px;
  text-align: center;
}
/* Idle state — subtle, unselected */
.tag-filter-chip.tag-audience {
  background: #fff;
  color: #6D28D9;
  border-color: #DDD6FE;
}
.tag-filter-chip.tag-function {
  background: #fff;
  color: #475569;
  border-color: #E2E8F0;
}
.tag-filter-chip.tag-frequency {
  background: #fff;
  color: #92400E;
  border-color: #FDE68A;
}
.tag-filter-chip:hover {
  transform: translateY(-1px);
}
.tag-filter-chip.tag-audience:hover { background: #F5F3FF; }
.tag-filter-chip.tag-function:hover { background: #F8FAFC; }
.tag-filter-chip.tag-frequency:hover { background: #FFFBEB; }
/* Active state — filled */
.tag-filter-chip[aria-pressed="true"].tag-audience {
  background: #8C5FF3;
  color: #fff;
  border-color: #8C5FF3;
}
.tag-filter-chip[aria-pressed="true"].tag-function {
  background: #475569;
  color: #fff;
  border-color: #475569;
}
.tag-filter-chip[aria-pressed="true"].tag-frequency {
  background: #D97706;
  color: #fff;
  border-color: #D97706;
}
.tag-filter-chip[aria-pressed="true"] .tag-filter-count {
  background: rgba(255,255,255,.2);
  color: #fff;
}
.tag-filter-clear {
  grid-column: 1 / -1;
  justify-self: end;
  background: none;
  border: none;
  color: #8C5FF3;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
}
.tag-filter-clear:hover { background: #F5F3FF; }
.tag-filter-clear[hidden] { display: none; }

/* Category sections hide when they contain no visible items after filtering */
.category-section[data-empty="true"] { display: none; }
.category-item[data-hidden="true"] { display: none; }

/* ── Collection badges (on SOP cards) ──────────────────── */
.collection-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.collection-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 3px 9px;
  border-radius: 20px;
  line-height: 1.4;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, #F2567A 0%, #8C5FF3 100%);
  border: 1px solid rgba(140,95,243,.4);
  text-transform: uppercase;
  transition: transform .1s, box-shadow .15s;
}
.collection-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(140,95,243,.28);
}

/* ── Collections index page ────────────────────────────── */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.collection-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 26px;
  background: #fff;
  border: 1.5px solid #E5E5E7;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.collection-card:hover {
  border-color: #C4B5FD;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(140,95,243,.12);
}
.collection-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(242,86,122,.12) 0%, rgba(140,95,243,.18) 100%);
  color: #8C5FF3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.collection-card-content { min-width: 0; flex: 1; }
.collection-card-short {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #8C5FF3;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.collection-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.collection-card-desc {
  font-size: 13px;
  color: #4B5563;
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.collection-card-meta {
  font-size: 11.5px;
  color: #6B7280;
}

/* ── Collection landing page hero ──────────────────────── */
.collection-hero {
  background:
    radial-gradient(ellipse at top right, rgba(140,95,243,.22) 0%, transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(242,86,122,.14) 0%, transparent 55%),
    #1A1A2E;
  color: #fff;
  padding: 64px 24px 72px;
  position: relative;
  overflow: hidden;
}
.collection-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}
.collection-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #F2567A 0%, #8C5FF3 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 12px 32px rgba(140,95,243,.35);
}
.collection-hero-short {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #C4B5FD;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.collection-hero-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.collection-hero-desc {
  font-size: 15px;
  color: rgba(255,255,255,.72);
  max-width: 640px;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.collection-hero-meta {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.collection-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: linear-gradient(135deg, #F2567A 0%, #8C5FF3 100%);
  color: #fff;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 6px 20px rgba(140,95,243,.35);
}
.collection-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(140,95,243,.5);
}
.collection-cta-placeholder {
  display: inline-block;
  padding: 10px 20px;
  font-size: 12.5px;
  color: rgba(255,255,255,.55);
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 30px;
}

/* ── Role page header ──────────────────────────────────── */
.role-page-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #E5E5E7;
  border-radius: 14px;
  margin-bottom: 20px;
}
.role-page-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(242,86,122,.12) 0%, rgba(140,95,243,.18) 100%);
  color: #8C5FF3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.role-page-title {
  font-size: 22px;
  font-weight: 700;
  color: #1A1A2E;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}
.role-page-desc {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.5;
}

/* ── Role badge (on cards) ─────────────────────────────── */
.role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: #EDE9FB;
  color: #6D28D9;
  letter-spacing: 0.2px;
}
.role-executive-assistant       { background: #e8f0fe; color: #1a56db; }
.role-operations-assistant      { background: #f0fdf4; color: #16a34a; }
.role-social-media-manager      { background: #fdf2f8; color: #c026d3; }
.role-seo-specialist            { background: #fff7ed; color: #ea580c; }
.role-email-marketing-manager   { background: #f0f9ff; color: #0284c7; }
.role-appointment-setter        { background: #fefce8; color: #ca8a04; }
.role-marketing-manager         { background: #fdf4ff; color: #9333ea; }
.role-content-writer-copywriter { background: #f0fdfa; color: #0d9488; }
.role-paid-ads-manager          { background: #fff1f2; color: #e11d48; }
.role-sales-development-rep     { background: #eff6ff; color: #2563eb; }
.role-client-success-manager    { background: #f0fdf4; color: #059669; }
.role-customer-service-va       { background: #f5f3ff; color: #7c3aed; }
.role-video-editor-youtube-manager { background: #fff1f2; color: #be123c; }
.role-podcast-manager           { background: #fdf2f8; color: #a21caf; }
.role-bookkeeper-va             { background: #ecfeff; color: #0e7490; }
.role-hr-recruiting-va          { background: #fdf4ff; color: #86198f; }
.role-dispatcher-va             { background: #fef3c7; color: #92400e; }
.role-crm-admin-va              { background: #f1f5f9; color: #475569; }
.role-research-analyst-va       { background: #ecfccb; color: #4d7c0f; }

/* ── SOP page chrome ───────────────────────────────────── */
/* Preview HTML uses its own .sop-wrap (860px max), so our outer wrapper
   uses .sop-page + .sop-page-inner to avoid class collision. */
.sop-page-inner { max-width: 860px; margin: 0 auto; padding: 20px 24px 0; }
.sop-page-inner + .sop-article { margin-top: 0; }

.sop-breadcrumb {
  font-size: 11.5px;
  color: #6B7280;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.sop-breadcrumb a {
  color: #6B7280;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.sop-breadcrumb a:hover {
  color: #8C5FF3;
  border-bottom-color: #C4B5FD;
}
.sop-breadcrumb .sep { color: #CBD5E0; }
.sop-breadcrumb span:last-child {
  color: #1A1A2E;
  font-weight: 600;
}

.sop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 14px;
}
.sop-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #4B5563;
  background: #fff;
  border: 1px solid #E5E5E7;
  border-radius: 8px;
  transition: border-color .15s, color .15s;
  cursor: pointer;
}
.sop-action-btn:hover {
  border-color: #C4B5FD;
  color: #6D28D9;
}

.variant-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #EDE9FB;
  border-radius: 12px;
  margin-bottom: 18px;
  width: fit-content;
}
.variant-tab {
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: #6B7280;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.variant-tab:hover { color: #1A1A2E; }
.variant-tab.active {
  background: #fff;
  color: #6D28D9;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.variant-panel[hidden] { display: none; }

/* ── Footer (app-level, wraps around preview content) ──── */
.sop-footer {
  margin-top: 48px;
  padding: 24px 32px;
  background: #1A1A2E;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.sop-footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sop-footer-logo {
  height: 20px;
  width: auto;
  opacity: .9;
  flex-shrink: 0;
}
.sop-footer-copy {
  font-size: 11.5px;
  color: rgba(255,255,255,.45);
  line-height: 1.5;
}
.sop-footer-id {
  font-size: 11px;
  font-weight: 700;
  color: #8C5FF3;
  background: rgba(140,95,243,.12);
  border: 1px solid rgba(140,95,243,.25);
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Role badges (on cards — specialist roles only) ────── */
.role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  line-height: 1.5;
  white-space: nowrap;
  margin-top: 4px;
  border: 1px solid transparent;
}
.role-badge.role-executive-assistant {
  background: #EDE9FB;
  color: #6D28D9;
  border-color: #DDD6FE;
}
.role-badge.role-bookkeeper {
  background: #D1FAE5;
  color: #065F46;
  border-color: #A7F3D0;
}
.role-badge.role-project-manager {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FDE68A;
}
.role-badge.role-content-manager {
  background: #FFE4E6;
  color: #9F1239;
  border-color: #FECDD3;
}

/* ── Role filter chips (homepage row + industry tag bar) ── */
.role-filter-section {
  max-width: 1040px;
  margin: 20px auto 0;
  padding: 0 24px;
}
.role-filter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.role-filter-label {
  font-size: 10px;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  flex-shrink: 0;
}
.role-filter-clear {
  background: none;
  border: none;
  color: #8C5FF3;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
}
.role-filter-clear:hover { background: #F5F3FF; }
.role-filter-clear[hidden] { display: none; }
.role-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.role-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid;
  background: #fff;
  transition: background .12s, color .12s, border-color .12s, transform .08s, box-shadow .12s;
}
.role-filter-chip:active { transform: scale(.97); }
.role-chip-count {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(0,0,0,.05);
  min-width: 18px;
  text-align: center;
}
/* Idle colours */
.role-filter-chip.role-general-va    { color: #64748B; border-color: #E2E8F0; }
.role-filter-chip.role-executive-assistant { color: #6D28D9; border-color: #DDD6FE; }
.role-filter-chip.role-bookkeeper    { color: #065F46; border-color: #A7F3D0; }
.role-filter-chip.role-project-manager { color: #92400E; border-color: #FDE68A; }
.role-filter-chip.role-content-manager { color: #9F1239; border-color: #FECDD3; }
/* Hover */
.role-filter-chip.role-general-va:hover         { background: #F8FAFC; }
.role-filter-chip.role-executive-assistant:hover { background: #F5F3FF; }
.role-filter-chip.role-bookkeeper:hover          { background: #ECFDF5; }
.role-filter-chip.role-project-manager:hover     { background: #FFFBEB; }
.role-filter-chip.role-content-manager:hover     { background: #FFF1F2; }
/* Active/pressed */
.role-filter-chip[aria-pressed="true"].role-general-va {
  background: #475569; color: #fff; border-color: #475569;
  box-shadow: 0 0 0 3px rgba(71,85,105,.15);
}
.role-filter-chip[aria-pressed="true"].role-executive-assistant {
  background: #8C5FF3; color: #fff; border-color: #8C5FF3;
  box-shadow: 0 0 0 3px rgba(140,95,243,.18);
}
.role-filter-chip[aria-pressed="true"].role-bookkeeper {
  background: #059669; color: #fff; border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5,150,105,.18);
}
.role-filter-chip[aria-pressed="true"].role-project-manager {
  background: #D97706; color: #fff; border-color: #D97706;
  box-shadow: 0 0 0 3px rgba(217,119,6,.18);
}
.role-filter-chip[aria-pressed="true"].role-content-manager {
  background: #E11D48; color: #fff; border-color: #E11D48;
  box-shadow: 0 0 0 3px rgba(225,29,72,.18);
}
.role-filter-chip[aria-pressed="true"] .role-chip-count {
  background: rgba(255,255,255,.2);
  color: #fff;
}

/* Role filter on industry pages — reuses tag-filter-chip + own colour */
.tag-filter-chip.tag-role {
  color: #6D28D9;
  border-color: #DDD6FE;
}
.tag-filter-chip.tag-role:hover { background: #F5F3FF; }
.tag-filter-chip[aria-pressed="true"].tag-role {
  background: #8C5FF3;
  color: #fff;
  border-color: #8C5FF3;
}

/* Hide recent items role-filtered on homepage */
.recent-item[data-role-hidden="true"] { display: none !important; }

/* ── Print ─────────────────────────────────────────────── */
@media print {
  .brand-bar, .sop-breadcrumb, .sop-actions, .variant-tabs, .sop-footer, .home-hero-search, .search-modal { display: none !important; }
  .variant-panel[hidden] { display: block !important; break-before: right; page-break-before: right; }
  body { background: #fff; }
  .sop-page-inner { max-width: 100%; padding: 0; }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .brand-tag { display: none; }
}
@media (max-width: 700px) {
  .brand-bar { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .brand-nav { order: 3; width: 100%; justify-content: space-around; margin-top: 4px; }
  .brand-search-trigger { order: 2; }
  .home-hero { padding: 56px 20px 72px; }
  .home-section { margin-top: 40px; padding: 0 16px; }
  .industry-wrap { padding: 24px 16px 48px; }
  .industry-header { padding: 28px 24px; }
  .sop-page-inner { padding: 16px 12px 0; }
  .sop-footer { flex-direction: column; align-items: flex-start; padding: 20px 22px; }
}
