@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Crimson+Pro:wght@300;400;500;600;700&family=Fira+Code:wght@400;500;600&family=Nunito+Sans:wght@300;400;500;600;700&display=swap');

/* ========== Theme: Dark (default) ========== */
html,
html[data-theme="dark"] {
  --bg-start: #0a0e27;
  --bg-end: #1a1d3a;
  --text: #e4e8f0;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-muted-2: rgba(255, 255, 255, 0.6);
  --text-muted-3: rgba(255, 255, 255, 0.5);
  --text-strong: #fff;
  --surface: rgba(15, 23, 42, 0.4);
  --surface-sidebar: rgba(15, 23, 42, 0.6);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --border-muted: rgba(255, 255, 255, 0.05);
  --overlay: rgba(0, 0, 0, 0.3);
  --overlay-2: rgba(0, 0, 0, 0.4);
  --glow: rgba(16, 185, 129, 0.15);
  --glow-hover: rgba(16, 185, 129, 0.25);
  --nav-hover-bg: rgba(255, 255, 255, 0.05);
  --nav-hover-text: rgba(255, 255, 255, 0.9);
  --card-hover-shadow: rgba(16, 185, 129, 0.1);
  --feature-bg: rgba(255, 255, 255, 0.02);
  --progress-track: rgba(0, 0, 0, 0.3);
  --code-text: #e4e8f0;
}

/* ========== Theme: Light ========== */
html[data-theme="light"] {
  --bg-start: #f0f9ff;
  --bg-end: #e0f2fe;
  --text: #1e293b;
  --text-muted: #475569;
  --text-muted-2: #64748b;
  --text-muted-3: #94a3b8;
  --text-strong: #0f172a;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-sidebar: rgba(255, 255, 255, 0.9);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --border-muted: rgba(15, 23, 42, 0.04);
  --overlay: rgba(15, 23, 42, 0.04);
  --overlay-2: rgba(15, 23, 42, 0.06);
  --glow: rgba(16, 185, 129, 0.12);
  --glow-hover: rgba(16, 185, 129, 0.2);
  --nav-hover-bg: rgba(15, 23, 42, 0.05);
  --nav-hover-text: #0f172a;
  --card-hover-shadow: rgba(16, 185, 129, 0.15);
  --feature-bg: rgba(15, 23, 42, 0.03);
  --progress-track: rgba(15, 23, 42, 0.1);
  --code-text: #1e293b;
}

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

body {
  font-family: 'Crimson Pro', serif;
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.2s ease;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr;
  position: relative;
  transition: grid-template-columns 0.25s ease;
}
/* 3-column layout with promo sidebar on large screens */
@media (min-width: 1200px) {
  .app {
    grid-template-columns: 280px 1fr 300px;
  }
}
/* Auto-collapse sidebar on narrow viewports (below 1024px) */
@media (max-width: 1023px) {
  .app {
    grid-template-columns: 72px 1fr;
  }
}
/* Collapsed sidebar: narrow first column */
.app.sidebar-collapsed {
  grid-template-columns: 72px 1fr;
}
/* Expanded sidebar on narrow viewports when manually opened - sidebar overlays content */
@media (max-width: 1023px) {
  .app.sidebar-expanded {
    grid-template-columns: 72px 1fr;
  }
}
@media (min-width: 1200px) {
  .app.sidebar-collapsed {
    grid-template-columns: 72px 1fr 300px;
  }
}

/* Promo sidebar (right side) - explicit placement right of main content */
.promo-sidebar {
  display: none;
  grid-column: 3;
  grid-row: 2;
  padding: 1.5rem 1rem 1.5rem 0;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
@media (min-width: 1200px) {
  .promo-sidebar {
    display: block;
  }
}
.promo-sidebar-sticky {
  position: sticky;
  top: 1rem;
  align-self: start;
}
.promo-sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 5rem;
}

/* Promo card */
.promo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  position: relative;
}
.promo-card-badge {
  position: absolute;
  top: -0.5rem;
  right: 1rem;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
}
.promo-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.promo-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
.promo-card-features {
  margin: 0 0 1rem;
  padding-left: 1.125rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.promo-card-features li {
  margin-bottom: 0.25rem;
}
.promo-card-cta {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.promo-card-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Promo tip card (for contextual tips) */
.promo-tip {
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
}
.promo-tip-icon {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.promo-tip-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.375rem;
  color: var(--text);
}
.promo-tip-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.promo-tip-link {
  display: inline-block;
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: #10b981;
  text-decoration: none;
}
.promo-tip-link:hover {
  text-decoration: underline;
}

/* AI help panel (right sidebar) */
.promo-ai-help {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.promo-ai-help-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #10b981;
  margin-bottom: 0.5rem;
}
.promo-ai-help-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.promo-ai-help-list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.promo-ai-help-list li {
  margin-bottom: 0.375rem;
}
.promo-ai-help-list li:last-child {
  margin-bottom: 0;
}
.promo-ai-help-list strong {
  color: var(--text);
}

.app-notice-banner {
  grid-column: 1 / -1;
  grid-row: 1;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.4;
  box-shadow: 0 1px 0 var(--border-muted);
  min-height: 2.75rem;
  flex-shrink: 0;
}
.app-notice-banner[hidden] {
  display: none;
}
/* Sidebar adjusts below notice banner when visible - height matches notice exactly for flush fit */
.app:has(.app-notice-banner:not([hidden])) {
  --app-notice-height: 2.75rem;
}
.app:has(.app-notice-banner:not([hidden])) .sidebar {
  top: var(--app-notice-height);
  height: calc(100vh - var(--app-notice-height));
}
.app:has(.app-notice-banner:not([hidden])) .sidebar-collapse-toggle {
  top: calc(var(--app-notice-height) + (100vh - var(--app-notice-height)) / 2);
}
.app-notice-icon {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  color: inherit;
}
.app-notice-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.app-notice-icon:empty {
  display: none;
}
.app-notice-text {
  margin: 0;
  max-width: 60rem;
  flex: 1;
  min-width: 0;
}
.app-notice-text:empty::before {
  content: '\00a0';
}

/* Background decoration */
.app::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.2); opacity: 0.25; }
}

html[data-theme="light"] .app::before {
  opacity: 0.6;
}

/* Sidebar - fixed so it stays in view when scrolling, footer anchored to bottom of viewport */
.sidebar {
  background: var(--surface-sidebar);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 1.75rem 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  min-height: 0;
  z-index: 10;
  transition: width 0.25s ease, min-width 0.25s ease, background 0.3s ease, border-color 0.2s ease, padding 0.3s ease;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  width: 280px;
  overflow: hidden;
}
/* Auto-collapse sidebar on narrow viewports */
@media (max-width: 1023px) {
  .sidebar {
    width: 72px !important;
    min-width: 72px !important;
    padding: 1.75rem 0.5rem;
  }
  /* Allow expanding on narrow viewports when manually opened */
  .app.sidebar-expanded .sidebar {
    width: 280px !important;
    min-width: 260px !important;
    padding: 1.75rem 0;
    z-index: 50;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }
}
.sidebar .sidebar-collapse-btn {
  position: absolute;
  top: 1rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 0.375rem;
  background: var(--feature-bg);
  color: var(--text-muted-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}
.sidebar .sidebar-collapse-btn:hover {
  background: var(--nav-hover-bg);
  color: var(--text-strong);
}
.sidebar .sidebar-collapse-icon-closed {
  display: none;
}
.app.sidebar-collapsed .sidebar-collapse-icon-open {
  display: none;
}
.app.sidebar-collapsed .sidebar-collapse-icon-closed {
  display: block !important;
}
.app.sidebar-collapsed .sidebar {
  width: 72px;
  min-width: 72px;
  padding: 1.75rem 0.5rem;
}
/* Auto-hide text elements on narrow viewports */
@media (max-width: 1023px) {
  .logo h1,
  .logo p,
  .search-wrap,
  .nav-item span,
  .theme-label,
  .auth-wrap {
    display: none !important;
  }
  /* Show text when manually expanded */
  .app.sidebar-expanded .logo h1,
  .app.sidebar-expanded .logo p,
  .app.sidebar-expanded .search-wrap,
  .app.sidebar-expanded .nav-item span,
  .app.sidebar-expanded .theme-label,
  .app.sidebar-expanded .auth-wrap {
    display: block !important;
  }
  .app.sidebar-expanded .auth-wrap {
    display: flex !important;
  }
}
.app.sidebar-collapsed .logo h1,
.app.sidebar-collapsed .logo p,
.app.sidebar-collapsed .search-wrap,
.app.sidebar-collapsed .nav-item span,
.app.sidebar-collapsed .theme-label,
.app.sidebar-collapsed .auth-wrap,
.app.sidebar-collapsed .sidebar .auth-wrap {
  display: none !important;
}
/* Show B logo on narrow viewports and when sidebar collapsed */
@media (max-width: 1023px) {
  .logo {
    padding: 0 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
.app.sidebar-collapsed .logo {
  padding: 0 0.75rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Shared logo::after styles for collapsed/narrow viewports */
@media (max-width: 1023px) {
  .logo::after {
    content: 'B';
    font-family: 'Instrument Serif', serif;
    font-size: 1.25rem;
    font-weight: 400;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}
.app.sidebar-collapsed .logo::after {
  content: 'B';
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
  font-weight: 400;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* Center nav items on narrow viewports and when sidebar collapsed */
@media (max-width: 1023px) {
  .nav-section {
    padding: 0 0.75rem;
    align-items: center;
  }
  .nav-item {
    justify-content: center;
    padding: 0.625rem;
  }
}
.app.sidebar-collapsed .nav-section {
  padding: 0 0.75rem;
  align-items: center;
}
.app.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0.625rem;
}
.app.sidebar-collapsed .nav-group {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}
.app.sidebar-collapsed .theme-toggle-wrap {
  justify-content: center;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.app.sidebar-collapsed .sidebar-collapse-btn {
  right: 50%;
  transform: translateX(50%);
}
/* Sidebar tooltip (when collapsed, after short hover delay) */
.sidebar-tooltip {
  position: fixed;
  z-index: 1000;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-strong);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.sidebar-tooltip[data-visible="true"] {
  opacity: 1;
  transform: translateX(0);
}

.logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  transition: padding 0.3s ease;
  flex-shrink: 0;
}
.logo h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.625rem;
  font-weight: 400;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
  font-style: italic;
  transition: opacity 0.2s ease;
}

.logo p {
  font-size: 0.6875rem;
  color: var(--text-muted-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

/* Auth collapsed placeholder - visible when sidebar collapsed, click expands to show Sign in/Account */
.auth-collapsed-btn {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.125rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted-2);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  width: 100%;
  text-align: left;
  flex-shrink: 0;
}
.auth-collapsed-btn:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-text);
}
.app.sidebar-collapsed .auth-collapsed-btn {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
}
.app.sidebar-collapsed .auth-collapsed-btn .auth-collapsed-label {
  display: none;
}

/* Auth strip (sidebar) */
.auth-wrap {
  padding: 0 1.25rem 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s ease, height 0.3s ease;
  flex-shrink: 0;
}
.auth-guest[hidden],
.auth-user[hidden] {
  display: none !important;
}

.auth-guest {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}
.auth-guest-primary[hidden],
.auth-guest-divider[hidden] {
  display: none !important;
}
.auth-guest-primary {
  margin-bottom: 0.75rem;
}
.auth-guest .auth-google-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.auth-guest .auth-google-btn:hover {
  background: var(--nav-hover-bg);
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px var(--border-strong);
}
.auth-guest .auth-google-icon {
  flex-shrink: 0;
}
.auth-guest-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted-3);
}
.auth-guest-divider::before,
.auth-guest-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-guest-divider span {
  flex-shrink: 0;
}
.auth-guest-email {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.auth-guest-nudge {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted-2);
}
.auth-guest .auth-email-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.auth-guest .auth-email-btn:hover {
  background: var(--nav-hover-bg);
  border-color: var(--border-strong);
}
.auth-guest .auth-email-btn.secondary {
  background: transparent;
  color: var(--text-muted-2);
}
.auth-guest .auth-email-btn.secondary:hover {
  color: var(--text);
  border-color: rgba(16, 185, 129, 0.25);
}
.auth-user {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.auth-user-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  line-height: 1.4;
}
.auth-greeting {
  font-size: 0.75rem;
  color: var(--text-muted-2);
}
.auth-email {
  font-size: 0.75rem;
  color: var(--text-muted-2);
  word-break: break-all;
  line-height: 1.4;
  padding: 0.35rem 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-user .auth-btn {
  width: 100%;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted-2);
  transition: background 0.2s, color 0.2s;
}
.auth-user .auth-btn:hover {
  background: var(--nav-hover-bg);
  color: var(--text);
}

.search-wrap {
  padding: 0 1.25rem 1rem;
  flex-shrink: 0;
}

.site-search {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.site-search::placeholder {
  color: var(--text-muted-3);
}

.site-search:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}

.nav-item[hidden],
.nav-item-admin[hidden] {
  display: none !important;
}

.nav-item-link {
  text-decoration: none;
}
.nav-item-link:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-text);
}

.nav-item.nav-item-hidden {
  display: none;
}

.nav-section {
  padding: 0 1.25rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  transition: padding 0.3s ease;
}

.nav-group {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.125rem;
  border-radius: 0.5rem;
  color: var(--text-muted-2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, padding 0.3s ease, justify-content 0.3s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0.75rem;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #10b981 0%, #06b6d4 100%);
  transform: scaleY(0);
  transition: transform 0.2s;
  border-radius: 0 2px 2px 0;
}

.nav-item:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-text);
}

.nav-item.active {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}

.nav-item.active::before {
  transform: scaleY(1);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-item span {
  font-size: 0.8125rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

/* Main Content - explicit placement so it stays right of fixed sidebar */
.main-content {
  grid-column: 2;
  grid-row: 2;
  padding: 3rem;
  max-width: 1800px;
  position: relative;
  z-index: 1;
}

/* Hide main until route applied (minimize flicker) */
html.route-pending .main-content {
  visibility: hidden;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block !important;
  width: 100%;
}
#section-admin.active {
  min-width: 800px;
}
@media (max-width: 900px) {
  #section-admin.active {
    min-width: 100%;
  }
  .admin-tabs {
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .admin-tabs::-webkit-scrollbar {
    height: 6px;
  }
  .admin-tabs::-webkit-scrollbar-track {
    background: var(--border-muted);
  }
  .admin-tabs::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
  }
}

.section-header {
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: 3.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-strong) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-description {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 800px;
  font-weight: 400;
}

/* Shared tab styles */
.cross-domain-tabs,
.implementation-tools-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-muted);
}
.cross-domain-tab,
.implementation-tools-tab {
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
  border-radius: 0;
}
.cross-domain-tab:hover,
.implementation-tools-tab:hover {
  color: var(--text-strong);
}
.cross-domain-tab.active,
.implementation-tools-tab.active {
  color: #10b981;
  border-bottom-color: #10b981;
}
.cross-domain-tab-panel,
.implementation-tools-tab-panel {
  margin-top: 0;
}
.cross-domain-tab-panel[hidden],
.implementation-tools-tab-panel[hidden] {
  display: none;
}
.installation-tab-header,
.configurations-tab-header,
.snippets-tab-header,
.gtm-tab-header,
.testing-tab-header {
  margin-bottom: 1.5rem;
}
.installation-tab-header .card-title,
.configurations-tab-header .card-title,
.snippets-tab-header .card-title,
.gtm-tab-header .card-title,
.testing-tab-header .card-title {
  margin-bottom: 0.5rem;
}

.card .muted {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Cards */
.card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
  transition: all 0.3s;
}

.card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 10px 40px var(--card-hover-shadow);
}

.card-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.01em;
}

.card-title svg {
  color: #10b981;
  flex-shrink: 0;
}

/* Code Block */
.code-block {
  position: relative;
  margin: 1.5rem 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--overlay);
  border-radius: 0.75rem 0.75rem 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

.code-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.875rem;
  color: var(--text-muted-2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.code-label svg {
  flex-shrink: 0;
}

.code-actions {
  display: flex;
  gap: 0.5rem;
}

.code-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 0.5rem;
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.code-btn svg {
  width: 14px;
  height: 14px;
}

.code-btn.copied {
  background: rgba(16, 185, 129, 0.3);
}

.code-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.code-block pre {
  margin: 0;
  padding: 1.5rem;
  background: var(--overlay-2);
  border: 1px solid var(--border);
  border-radius: 0 0 0.75rem 0.75rem;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}

.code-content {
  color: var(--code-text);
}

code {
  font-family: 'Fira Code', monospace;
}

.keyword { color: #c792ea; }
.string { color: #c3e88d; }
.function { color: #82aaff; }
.comment { color: #546e7a; }
.property { color: #f07178; }
.number { color: #f78c6c; }

/* Config Selector */
.config-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.config-option {
  padding: 0.75rem 1.5rem;
  background: var(--feature-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
  color: inherit;
}

.config-option:hover {
  background: var(--nav-hover-bg);
}

.config-option.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10b981;
}

/* Alert Box */
.alert {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 0.75rem;
  margin-bottom: 2rem;
}

.alert svg {
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.alert-content {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Server-side event builder */
.serverside-event-builder-card .serverside-event-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.serverside-event-form .serverside-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.serverside-event-form .serverside-field .project-label { margin-bottom: 0; }
.mp-params-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mp-param-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mp-param-row .mp-param-key { flex: 0 0 10rem; min-width: 0; }
.mp-param-row .mp-param-value { flex: 1; min-width: 0; }
.mp-param-row .mp-param-remove {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 0.375rem;
  color: var(--text-muted-2);
}
.mp-param-row .mp-param-remove:hover { color: var(--text); background: var(--nav-hover-bg); }
.mp-add-param-btn { align-self: flex-start; }
.serverside-event-form .serverside-options { margin-top: 0.25rem; }
.mp-validate-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted-2);
  cursor: pointer;
}
.mp-validate-checkbox { flex-shrink: 0; }
.serverside-actions { margin-top: 0.5rem; }
.serverside-send-btn { font-weight: 600; }
.mp-send-result {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}
.mp-send-result[data-result="success"] {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--text);
}
.mp-send-result[data-result="error"] {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--text);
}
.mp-send-result[data-result="sending"] {
  background: var(--feature-bg);
  color: var(--text-muted-2);
}

.serverside-saved-events-wrap {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-muted);
}
.serverside-saved-events-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  color: var(--text);
}
.serverside-saved-events-hint {
  font-size: 0.8125rem;
  margin: 0 0 0.75rem 0;
}
.mp-saved-events-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mp-saved-event-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  border-left: 3px solid rgba(16, 185, 129, 0.5);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mp-saved-event-item:hover {
  border-color: var(--border-strong);
  border-left-color: rgba(16, 185, 129, 0.8);
  box-shadow: 0 1px 3px var(--border-muted);
}
.mp-saved-event-label {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.mp-saved-event-name {
  font-weight: 600;
  color: var(--text);
}
.mp-saved-event-type {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(16, 185, 129, 0.95);
  background: rgba(16, 185, 129, 0.12);
  border-radius: 0.375rem;
  letter-spacing: 0.02em;
}
.mp-saved-event-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.mp-saved-load {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  border-radius: 0.375rem;
  transition: background 0.2s, border-color 0.2s;
}
.mp-saved-load:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
}
.mp-saved-delete {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-muted-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.mp-saved-delete:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.06);
}
.mp-saved-event-empty {
  font-size: 0.8125rem;
  padding: 0.75rem 1rem;
  list-style: none;
  color: var(--text-muted-2);
  background: var(--feature-bg);
  border: 1px dashed var(--border);
  border-radius: 0.625rem;
  text-align: center;
}

/* Legacy: keep .alert-content color if defined elsewhere */
.alert-content {
  color: var(--text-muted);
}

.alert-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #d97706;
}

/* Checklist */
.checklist-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.checklist-section-progress {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted-2);
}
.checklist {
  list-style: none;
}

.checklist-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

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

.checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 0.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox:hover {
  border-color: #10b981;
}

/* Unchecked: hide the checkmark so only the empty box shows */
.checkbox svg {
  visibility: hidden;
}

.checkbox.checked {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
}

.checkbox.checked svg {
  visibility: visible;
  color: white;
}

.checklist-item > span.text {
  flex: 1 1 0%;
  min-width: 0;
  line-height: 1.6;
}

.checklist-item.checked span.text {
  color: var(--text-muted);
  text-decoration: line-through;
}

.checklist-item:not(.checked) span.text {
  color: var(--text-muted-2);
}

/* Checklist code (bespoke or inject from event creator) */
.checklist-code-wrap {
  margin-top: 0.75rem;
  width: 100%;
  flex-basis: 100%;
  flex-shrink: 0;
  order: 10;
}
.checklist-code-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
  color: var(--text-muted);
}
.checklist-code-toggle:hover {
  color: var(--accent);
}
.checklist-code-panel {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}
.checklist-code-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}
.checklist-code-source {
  display: block;
  width: 100%;
  max-width: 20rem;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.checklist-code-bespoke {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8125rem;
  resize: vertical;
  min-height: 6rem;
}
.checklist-code-preview {
  margin: 0 0 0.5rem;
  padding: 0.75rem;
  font-size: 0.8125rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 16rem;
  overflow: auto;
}
.checklist-code-copy {
  font-size: 0.8125rem;
}

/* Guide step code (bespoke or inject from event creator) */
.guide-step-code-wrap {
  margin-top: 0.75rem;
  width: 100%;
}
.guide-step-code-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
  color: var(--text-muted);
}
.guide-step-code-toggle:hover {
  color: var(--accent);
}
.guide-step-code-panel {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}
.guide-step-code-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}
.guide-step-code-source {
  display: block;
  width: 100%;
  max-width: 20rem;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.guide-step-code-bespoke {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8125rem;
  resize: vertical;
  min-height: 6rem;
}
.guide-step-code-preview {
  margin: 0 0 0.5rem;
  padding: 0.75rem;
  font-size: 0.8125rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 16rem;
  overflow: auto;
}
.guide-step-code-copy {
  font-size: 0.8125rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s;
}

.stat-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.stat-value {
  font-family: 'Instrument Serif', serif;
  font-size: 3rem;
  font-weight: 400;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* Overview page */
.overview-hero {
  text-align: center;
  margin-bottom: 3.5rem;
}
.overview-tagline {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.overview-hero .section-title {
  margin-bottom: 1rem;
}
.overview-intro {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.125rem;
  line-height: 1.75;
}
.overview-grid-wrap {
  margin-bottom: 2.5rem;
}
.overview-group-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.overview-group-title:first-child {
  margin-top: 0;
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.overview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
#overview-share-card {
  cursor: default;
}
.overview-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 24px var(--card-hover-shadow);
  transform: translateY(-2px);
}
.overview-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: #10b981;
}
.overview-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.overview-card-desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}
.overview-cta {
  margin-bottom: 2rem;
}
.overview-cta.card {
  max-width: none;
  width: 100%;
  padding: 2.5rem;
}
.get-started-carousel {
  max-width: 100%;
}
.overview-cta-content {
  margin: 0;
}
.overview-cta-content p {
  margin: 0 0 0.75rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.overview-cta-content p:last-of-type {
  margin-bottom: 0;
}
.overview-cta-link {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  text-align: center;
}
.overview-cta-link a {
  color: var(--accent);
  text-decoration: none;
}
.overview-cta-link a:hover {
  text-decoration: underline;
}
.overview-cta-link .link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: inherit;
  font-family: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s;
}
.overview-cta-link .link-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  min-width: 0;
  justify-content: center;
}
.share-btn:hover {
  border-color: var(--accent);
  background: var(--feature-bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}
.share-btn:active {
  transform: translateY(0);
}
.share-btn svg {
  flex-shrink: 0;
}
.share-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.share-btn-twitter {
  color: #1DA1F2;
}
.share-btn-twitter:hover {
  border-color: #1DA1F2;
  background: rgba(29, 161, 242, 0.1);
}
.share-btn-linkedin {
  color: #0077B5;
}
.share-btn-linkedin:hover {
  border-color: #0077B5;
  background: rgba(0, 119, 181, 0.1);
}
.share-btn-facebook {
  color: #1877F2;
}
.share-btn-facebook:hover {
  border-color: #1877F2;
  background: rgba(24, 119, 242, 0.1);
}
.share-btn-copy {
  color: var(--accent);
}
.share-btn-copy:hover {
  border-color: var(--accent);
  background: var(--feature-bg);
}
.share-btn-copy.copied {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.share-btn-copy.copied span::after {
  content: ' ✓';
}
@media (max-width: 640px) {
  .share-buttons {
    flex-direction: column;
  }
  .share-btn {
    width: 100%;
  }
}

/* Get Started Carousel */
.get-started-carousel {
  margin-top: 1rem;
}
.get-started-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  width: 100%;
}
.get-started-steps::-webkit-scrollbar {
  height: 4px;
}
.get-started-steps::-webkit-scrollbar-track {
  background: var(--border-muted);
  border-radius: 2px;
}
.get-started-steps::-webkit-scrollbar-thumb {
  background: var(--text-muted-2);
  border-radius: 2px;
}
.get-started-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  flex: 1 1 0;
  min-width: 100px;
  background: var(--feature-bg);
  border: 2px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}
.get-started-step:hover {
  background: var(--bg-strong);
  border-color: var(--border-muted);
}
.get-started-step.active {
  background: var(--accent-bg);
  border-color: #10b981;
}
.get-started-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--bg-strong);
  color: var(--text-muted-2);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.get-started-step.active .get-started-step-number {
  background: #10b981;
  color: white;
}
.get-started-step-label {
  font-size: 0.75rem;
  color: var(--text-muted-2);
  text-align: center;
  line-height: 1.2;
  transition: color 0.2s;
}
.get-started-step.active .get-started-step-label {
  color: var(--text-strong);
  font-weight: 500;
}
.get-started-carousel-content {
  position: relative;
  min-height: 200px;
  margin-bottom: 1.5rem;
}
.get-started-slide {
  animation: fadeIn 0.3s ease-in-out;
}
.get-started-slide[hidden] {
  display: none;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.get-started-slide-content {
  padding: 0.5rem 0;
}
.get-started-slide-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-strong);
}
.get-started-slide-content p {
  margin: 0 0 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.get-started-slide-content p:last-child {
  margin-bottom: 0;
}
.get-started-slide-list {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.get-started-slide-list li {
  margin-bottom: 0.5rem;
}
.get-started-slide-list li:last-child {
  margin-bottom: 0;
}
.get-started-slide-tip {
  font-size: 0.875rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--feature-bg);
  border-radius: 0.375rem;
  border-left: 3px solid #10b981;
}
.get-started-slide-tip code {
  background: var(--bg-strong);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  color: var(--accent);
}
.get-started-carousel-controls {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-muted);
}
.get-started-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted-2);
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}
.get-started-nav-btn:hover:not(:disabled) {
  background: var(--bg-strong);
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.get-started-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.get-started-nav-btn.primary {
  background: #10b981;
  color: white;
  border-color: #10b981;
  margin-left: auto;
}
.get-started-nav-btn.primary:hover:not(:disabled) {
  background: #059669;
  border-color: #059669;
}
@media (max-width: 768px) {
  .get-started-steps {
    gap: 0.375rem;
  }
  .get-started-step {
    min-width: 70px;
    padding: 0.625rem 0.75rem;
  }
  .get-started-step-label {
    font-size: 0.6875rem;
  }
  .get-started-step-number {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8125rem;
  }
  .get-started-carousel-controls {
    flex-direction: column;
  }
  .get-started-nav-btn.primary {
    margin-left: 0;
  }
}

/* Valued Resources section */
.user-guide-content {
  max-width: 64rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.user-guide-intro {
  margin-bottom: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.user-guide-intro h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text);
}
.user-guide-intro > p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.75;
}
.user-guide-intro > p:last-child {
  margin-bottom: 0;
}
.user-guide-intro blockquote {
  margin-top: 1rem;
  margin-bottom: 0;
}
.user-guide-spacer {
  height: 1rem;
}
.user-guide-section-card {
  margin-bottom: 0 !important;
  animation-delay: calc(var(--section-index, 0) * 0.1s);
}
.user-guide-section-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1.25rem;
  line-height: 1.3;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.user-guide-section-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--text);
}
.user-guide-section-card h3:first-of-type {
  margin-top: 0;
}
.user-guide-section-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.user-guide-section-card p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: var(--text);
}
.user-guide-section-card ul,
.user-guide-section-card ol {
  margin: 1rem 0 1.5rem 1.75rem;
  padding-left: 0.5rem;
  line-height: 1.75;
}
.user-guide-section-card li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
  color: var(--text);
}
.user-guide-section-card li > p {
  margin-bottom: 0.5rem;
}
.user-guide-section-card li > ul,
.user-guide-section-card li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.user-guide-section-card a {
  color: var(--accent, #10b981);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.user-guide-section-card a:hover {
  text-decoration: none;
  border-bottom-color: var(--accent, #10b981);
}
.user-guide-section-card code {
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
  background: var(--feature-bg);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  color: var(--text);
  border: 1px solid var(--border);
}
.user-guide-section-card pre {
  overflow-x: auto;
  padding: 1.25rem;
  background: var(--feature-bg);
  border-radius: 0.5rem;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  line-height: 1.6;
}
.user-guide-section-card pre code {
  padding: 0;
  background: none;
  border: none;
  font-size: 0.9em;
}
.user-guide-section-card blockquote {
  border-left: 4px solid var(--accent, #10b981);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  background: var(--feature-bg);
  padding: 1rem 1.25rem;
  border-radius: 0.25rem;
}
.user-guide-section-card blockquote p {
  margin-bottom: 0.5rem;
}
.user-guide-section-card blockquote p:last-child {
  margin-bottom: 0;
}
.user-guide-section-card strong {
  font-weight: 600;
  color: var(--text);
}
.user-guide-section-card em {
  font-style: italic;
}
.user-guide-section-card .muted {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.resources-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 900px) {
  .resources-sections {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1400px) {
  .resources-sections {
    grid-template-columns: repeat(3, 1fr);
  }
}
.resources-block {
  padding: 1.75rem 1.75rem 1.75rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.resources-block:hover {
  box-shadow: 0 4px 20px var(--card-hover-shadow);
}
.resources-block-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.resources-block-icon {
  font-size: 1.25rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.12) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.resources-block-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 1rem;
  padding-left: 0.125rem;
}
.resources-block-divider {
  margin-left: -1.5rem;
  margin-right: -1.75rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-strong);
}
.resources-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.resources-list li {
  margin-bottom: 0;
  padding: 0.75rem 0;
  font-size: 1rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: background 0.5s ease-in-out, margin 0.5s ease-in-out, padding 0.5s ease-in-out, border-radius 0.5s ease-in-out;
}
.resources-list li:last-child {
  border-bottom: none;
}
.resources-list li:hover {
  background: var(--nav-hover-bg);
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 0.5rem;
}
.resources-list a {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-strong);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}
.resources-list a:hover {
  color: var(--accent);
}
.resources-link-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  line-height: 0;
}
.resources-link-icon svg {
  width: 100%;
  height: 1.25rem;
  flex-shrink: 0;
}
.resources-link-body {
  flex: 1;
  min-width: 0;
}
.resources-link-label::after {
  content: " ↗";
  font-size: 0.65em;
  opacity: 0.6;
  font-weight: 400;
}
.resources-meta {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.2rem;
}
/* Bookmark tip: shown inline when promo sidebar is hidden (narrow viewport) */
.resources-bookmark-inline {
  margin-top: 1.5rem;
}
@media (min-width: 1200px) {
  .resources-bookmark-inline {
    display: none;
  }
}
/* Site footer: copyright and contact */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid var(--border-muted);
}
.site-footer-inner {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.site-footer-copyright {
  color: var(--text-muted-2);
}
.site-footer-sep {
  color: var(--text-muted-3);
}
.site-footer-contact {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--text-muted-2);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.site-footer-contact:hover {
  color: var(--text);
}
.site-footer-share.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--text-muted-2);
  cursor: pointer;
  text-decoration: underline !important;
  font-family: inherit;
}
.site-footer-share.link-btn:hover {
  color: var(--text);
  text-decoration: underline !important;
}
.site-footer {
  position: relative;
}
.footer-share-popover {
  position: fixed;
  min-width: 280px;
  max-width: 320px;
  padding: 1.5rem;
  margin-bottom: 0;
  z-index: 1000;
  display: none;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.2s, transform 0.2s;
}
.footer-share-popover.show {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.footer-share-popover[hidden] {
  display: none !important;
}
@media (max-width: 640px) {
  .footer-share-popover {
    left: 1rem !important;
    right: 1rem !important;
    min-width: auto;
    max-width: none;
  }
}
.footer-share-popover .card-title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}
.footer-share-popover .share-buttons {
  margin-top: 0;
}
@media (max-width: 640px) {
  .footer-share-popover {
    right: auto;
    left: 0;
    min-width: auto;
    max-width: calc(100vw - 2rem);
  }
}

.resources-footer {
  font-size: 0.875rem;
  margin-top: 0;
  max-width: 54rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  color: var(--text-muted);
}

/* Stakeholder Interviews */
.interviews-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 72rem;
}

.gtm-integration-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.gtm-integration-layout .card {
  margin-bottom: 0;
}
.gtm-import-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.gtm-import-summary {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--feature-bg);
  border-radius: 0.5rem;
  border: 1px solid var(--border-muted);
}
.gtm-summary-title {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
.gtm-summary-content p {
  margin: 0.25rem 0;
  font-size: 0.9375rem;
}
.gtm-tag-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}
.gtm-tag-list li {
  margin: 0.2rem 0;
}
.gtm-comparison {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--feature-bg);
  border-radius: 0.5rem;
  border: 1px solid var(--border-muted);
}
.gtm-comparison-content p {
  margin: 0.25rem 0;
  font-size: 0.9375rem;
}
.interviews-block {
  padding: 1.5rem 1.75rem;
}
.interviews-block-desc {
  margin-bottom: 1.25rem;
}
.interviews-question-bank {
  margin-bottom: 1rem;
}
.interviews-theme {
  margin-bottom: 2rem;
}
.interviews-theme:last-child {
  margin-bottom: 0;
}
.interviews-theme-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.interviews-question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.interviews-question-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
}
.interviews-question-card .interviews-question-text {
  margin: 0;
  font-weight: 500;
  color: var(--text-strong);
  line-height: 1.5;
  flex: 1;
}
.interviews-question-card .interviews-question-why {
  font-size: 0.8125rem;
  margin: 0;
  padding: 0.5rem 0 0;
  border-top: 1px solid var(--border-muted);
  line-height: 1.45;
}
.interviews-question-card .interviews-question-copy {
  align-self: flex-start;
  margin-top: 0.25rem;
}
.interviews-brief-check-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.interviews-brief-check {
  flex-shrink: 0;
}
.interviews-brief-label {
  user-select: none;
}
.interviews-brief-hint {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.interviews-question-actions,
.interviews-stakeholder-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.interviews-stakeholder-list {
  margin-bottom: 1rem;
}
.interviews-stakeholder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.interviews-stakeholder-table th,
.interviews-stakeholder-table td {
  padding: 0.5rem 0.5rem 0.5rem 0;
  text-align: left;
  vertical-align: middle;
}
.interviews-stakeholder-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.interviews-stakeholder-table input {
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  font-size: inherit;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--input-bg);
  color: var(--text-strong);
}
.interviews-stakeholder-table input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}
.interviews-stakeholder-takeaways-cell {
  min-width: 10rem;
  vertical-align: middle;
}
.interviews-templates {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.interviews-template-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-muted);
}
.interviews-template-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.interviews-template-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.5rem;
}
.interviews-template-content {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
  white-space: pre-wrap;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  margin-bottom: 0.75rem;
  max-height: 12rem;
  overflow-y: auto;
}
.interviews-template-copy {
  flex-shrink: 0;
}

/* Feature List (legacy / other sections) */
.overview-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.overview-list li {
  padding: 0.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid rgba(16, 185, 129, 0.4);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.overview-list li:last-child {
  margin-bottom: 0;
}

.feature-list {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--feature-bg);
  border-radius: 0.5rem;
  border: 1px solid var(--border-muted);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  color: #10b981;
}

.feature-text h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-strong);
}

.feature-text p {
  font-size: 0.8125rem;
  color: var(--text-muted-2);
  line-height: 1.5;
}

/* Subheading */
.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-strong);
}

/* Table */
.config-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.config-table th {
  padding: 1rem;
  text-align: left;
  color: #10b981;
  border-bottom: 1px solid var(--border);
}

.config-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-muted);
}

.config-table td:first-child {
  color: var(--text-strong);
  font-family: 'Fira Code', monospace;
}

.config-table td:nth-child(2),
.config-table td:nth-child(3) {
  color: var(--text-muted-2);
}

.config-table td:last-child {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Admin users table */
.admin-users-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}
.admin-users-search-wrap {
  margin-bottom: 1rem;
}
.admin-users-search {
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
}
.admin-users-search::placeholder {
  color: var(--text-muted-3);
}
.admin-users-search:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-users-table th,
.admin-users-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-muted);
}
.admin-users-table th {
  color: var(--text-muted-2);
  font-weight: 600;
}
.admin-users-table .admin-role-select {
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.8125rem;
}
.admin-users-table .admin-stripe-customer-id {
  width: 100%;
  max-width: 220px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-family: 'Fira Code', monospace;
  font-size: 0.8125rem;
  transition: border-color 0.2s, background 0.2s;
}
.admin-users-table .admin-stripe-customer-id:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
  background: var(--overlay);
}
.admin-users-table .admin-stripe-customer-id::placeholder {
  color: var(--text-muted-3);
  font-style: italic;
}
.admin-users-table .th-actions {
  width: 180px;
}
.admin-users-table .admin-actions-cell {
  padding: 0.5rem 1rem;
}
.admin-actions-buttons {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.admin-actions-buttons .code-btn-sm {
  width: 100%;
  border-radius: 0;
  margin: 0;
}
.admin-actions-buttons .code-btn-sm:first-child {
  border-radius: 0.375rem 0.375rem 0 0;
}
.admin-actions-buttons .code-btn-sm:last-child {
  border-radius: 0 0 0.375rem 0.375rem;
}
.admin-actions-buttons .code-btn-sm:not(:last-child) {
  border-bottom: none;
}
.admin-actions-buttons .code-btn-sm:only-child {
  border-radius: 0.375rem;
}

.admin-tabs,
.account-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-tab,
.account-profile-tab {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 0;
}
.admin-tab:hover,
.account-profile-tab:hover {
  color: var(--text);
}
.admin-tab.active,
.account-profile-tab.active {
  color: var(--text);
  border-bottom-color: #10b981;
}
.admin-tab-panel,
.account-profile-tab-panel {
  margin-top: 0;
}
.admin-tab-panel[hidden],
.account-profile-tab-panel[hidden] {
  display: none;
}
.admin-plans-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-plans-table th,
.admin-plans-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-muted);
}
.admin-plans-table th {
  color: var(--text-muted-2);
  font-weight: 600;
}
.admin-plans-table .admin-plan-name,
.admin-plans-table .admin-plan-limit,
.admin-plans-table .admin-plan-ai-limit,
.admin-plans-table .admin-plan-price,
.admin-plans-table .admin-plan-label,
.admin-plans-table .admin-plan-stripe-id {
  width: 100%;
  max-width: 120px;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.8125rem;
}
.admin-plans-table .admin-plan-name { max-width: 140px; }
.admin-plans-table .admin-plan-ai-limit { max-width: 100px; min-width: 4rem; }
.admin-plans-table .admin-plan-label { max-width: 100px; }
.admin-plans-table .admin-plan-stripe-id-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.admin-plans-table .admin-plan-stripe-id { max-width: 180px; }
.admin-plans-table .admin-plan-stripe-id-warning {
  font-size: 0.75rem;
  color: var(--text-muted-2);
  max-width: 180px;
}
.admin-plans-table .admin-plan-stripe-id-warning:not([hidden]) {
  color: #f59e0b;
}
.admin-plans-table .th-actions {
  width: 80px;
}

.admin-settings-card {
  max-width: 32rem;
}
.admin-settings-intro {
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.admin-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.admin-settings-row {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-muted);
}
.admin-settings-row:first-of-type {
  padding-top: 0;
}
.admin-settings-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.admin-settings-row .admin-settings-label {
  display: block;
  margin-bottom: 0.5rem;
}
.admin-settings-row .admin-settings-input {
  display: block;
  width: 100%;
  max-width: 20rem;
}
#admin-promo-tips-card .admin-settings-row .admin-settings-input {
  max-width: 100%;
}
.admin-settings-hint {
  font-size: 0.8125rem;
  margin-top: 0.375rem;
  line-height: 1.4;
  max-width: 28rem;
}
#admin-promo-tips-card .admin-settings-hint {
  max-width: 100%;
}
.admin-settings-row-checkbox .admin-settings-checkbox-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.admin-settings-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
.admin-settings-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #10b981;
  cursor: pointer;
}
.admin-settings-checkbox-label {
  user-select: none;
}
.admin-settings-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-muted);
}

/* Admin → Interviews */
#admin-interviews-card.admin-settings-card {
  max-width: 64rem;
}
#admin-analytics-insights-card.admin-settings-card,
#admin-get-started-card.admin-settings-card {
  max-width: 64rem;
}
#admin-promo-tips-card.admin-settings-card {
  max-width: 52rem;
}
#admin-user-guide-card.admin-settings-card,
#admin-tracking-card.admin-settings-card {
  max-width: 72rem;
}
.admin-interviews-section {
  margin-bottom: 2rem;
}
.admin-interviews-section:last-of-type {
  margin-bottom: 0;
}
.admin-interviews-subtitle {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.5rem;
}
.admin-interviews-hint {
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.admin-interviews-actions-top {
  margin-bottom: 1rem;
}
.admin-interviews-actions-top .code-btn {
  display: inline-flex;
}
.admin-interviews-question-bank {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.admin-interviews-theme {
  padding: 1rem;
  border: 1px solid var(--border-muted);
  border-radius: 0.75rem;
  background: var(--feature-bg);
}
.admin-interviews-theme-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.admin-interviews-theme-head .admin-interviews-theme-title {
  flex: 1 1 12rem;
  min-width: 0;
}
.admin-interviews-remove-theme {
  flex-shrink: 0;
}
.admin-interviews-questions {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}
/* Admin Get Started Slides */
.admin-get-started-slides-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.admin-get-started-slides {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.admin-get-started-slide-item {
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
  padding: 1rem;
  background: var(--feature-bg);
}
.admin-get-started-slide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-muted);
}
.admin-get-started-slide-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-bg);
  color: #10b981;
  font-weight: 600;
  font-size: 0.875rem;
}
.admin-get-started-slide-controls {
  display: flex;
  gap: 0.5rem;
}
.admin-get-started-slide-controls button {
  padding: 0.375rem;
  min-width: auto;
}
.admin-get-started-slide-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-get-started-slide-fields .admin-settings-input {
  max-width: 100%;
  width: 100%;
}

.admin-interviews-question-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-muted);
}
.admin-interviews-question-row:last-child {
  border-bottom: none;
}
.admin-interviews-question-row .admin-interviews-q {
  flex: 1 1 16rem;
  min-width: 0;
}
.admin-interviews-question-row .admin-interviews-why {
  flex: 1 1 12rem;
  min-width: 0;
}
.admin-interviews-remove-question {
  flex-shrink: 0;
}
.admin-interviews-add-question {
  margin-top: 0.25rem;
}

/* Admin → Checklist: wider card and wider inputs for item id/label */
#admin-checklist-card.admin-settings-card {
  max-width: 72rem;
}
#admin-checklist-card .admin-interviews-theme-head .admin-interviews-theme-title {
  flex: 1 1 16rem;
  min-width: 0;
}
#admin-checklist-card .admin-interviews-question-row,
#user-checklist-modal .admin-interviews-question-row {
  flex-wrap: nowrap;
}
#admin-checklist-card .admin-interviews-question-row .admin-checklist-item-id,
#user-checklist-modal .admin-interviews-question-row .admin-checklist-item-id {
  flex: 0 0 4rem;
  min-width: 0;
}
#admin-checklist-card .admin-interviews-question-row .admin-checklist-item-label,
#user-checklist-modal .admin-interviews-question-row .admin-checklist-item-label {
  flex: 1 1 0;
  min-width: 0;
}
#admin-checklist-card .admin-interviews-question-row .admin-interviews-remove-question,
#user-checklist-modal .admin-interviews-question-row .admin-interviews-remove-question {
  flex-shrink: 0;
}

/* Admin → Resources: wider card and wider inputs for URL/label/meta */
#admin-resources-card.admin-settings-card {
  max-width: 72rem;
}
#admin-resources-card .admin-interviews-theme-head .admin-resources-icon {
  flex: 0 0 2.5rem;
  max-width: 2.5rem;
  min-width: 2rem;
}
#admin-resources-card .admin-interviews-theme-head .admin-interviews-theme-title {
  flex: 1 1 16rem;
  min-width: 0;
}
#admin-resources-card .admin-resources-desc {
  width: 100%;
  max-width: none;
  margin-bottom: 0.5rem;
}
#admin-resources-card .admin-interviews-question-row .admin-resources-url {
  flex: 1 1 22rem;
  min-width: 12rem;
}
#admin-resources-card .admin-interviews-question-row .admin-resources-label {
  flex: 1 1 18rem;
  min-width: 10rem;
}
#admin-resources-card .admin-interviews-question-row .admin-resources-meta {
  flex: 1 1 12rem;
  min-width: 8rem;
}

.admin-settings-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.admin-settings-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted-2);
}
.admin-settings-input {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
  min-width: 220px;
}
.admin-email-body {
  min-width: 100%;
  max-width: 32rem;
  resize: vertical;
  font-family: inherit;
}
.admin-user-guide-editor {
  min-width: 100%;
  width: 100%;
  max-width: 72rem;
  resize: vertical;
  font-family: 'Fira Code', monospace;
  font-size: 0.875rem;
}
.admin-settings-row .admin-user-guide-editor {
  max-width: 72rem;
}
.admin-promo-editor {
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  resize: vertical;
}
#admin-promo-tips-card .admin-settings-row .admin-settings-input.admin-promo-editor {
  max-width: 100%;
  width: 100%;
}
.admin-analytics-question {
  resize: vertical;
  min-height: 3rem;
}
.admin-settings-row .admin-analytics-question {
  max-width: none;
}
.admin-analytics-output {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
}
.admin-analytics-answer {
  font-size: 0.9375rem;
  line-height: 1.6;
  white-space: pre-wrap;
}
.admin-analytics-answer p {
  margin-bottom: 0.75rem;
}
.admin-analytics-answer p:last-child {
  margin-bottom: 0;
}
.admin-analytics-loading {
  margin-top: 1rem;
  font-size: 0.9375rem;
}

/* Two-column layout: left = Q&A, right = top metrics panel */
.admin-analytics-layout .admin-analytics-main {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 300px);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .admin-analytics-layout .admin-analytics-main {
    grid-template-columns: 1fr;
  }
}
.admin-analytics-panel {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
}
.admin-analytics-panel-title {
  margin: 0 0 0.25rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
}
.admin-analytics-panel-period {
  margin: 0 0 1rem 0;
  font-size: 0.75rem;
}
.admin-analytics-metrics-loading,
.admin-analytics-metrics-error {
  font-size: 0.8125rem;
}
.admin-analytics-panel .admin-analytics-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.admin-analytics-panel .admin-analytics-kpi {
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 0.375rem;
  text-align: center;
}
.admin-analytics-panel .admin-analytics-kpi-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.admin-analytics-panel .admin-analytics-kpi-label {
  font-size: 0.6875rem;
  color: var(--text-muted-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.admin-analytics-panel .admin-analytics-events {
  margin-top: 1rem;
}
.admin-analytics-panel .admin-analytics-events-title {
  margin: 0 0 0.5rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
}
.admin-analytics-panel .admin-analytics-events-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.admin-analytics-panel .admin-analytics-event-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.admin-analytics-panel .admin-analytics-event-bar-wrap {
  flex: 1;
  min-width: 0;
  height: 0.5rem;
  background: var(--border-muted);
  border-radius: 0.25rem;
  overflow: hidden;
}
.admin-analytics-panel .admin-analytics-event-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 0.25rem;
  min-width: 2px;
}
.admin-analytics-panel .admin-analytics-event-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 10rem;
}
.admin-analytics-panel .admin-analytics-event-count {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text-muted-2);
}

/* Top metrics in right promo sidebar (Admin) */
.admin-analytics-metrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.admin-analytics-refresh-btn {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.375rem;
  color: var(--text-muted-2);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.admin-analytics-refresh-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--border);
}
.admin-analytics-refresh-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.admin-analytics-promo-metrics .admin-analytics-sidebar-title {
  margin: 0 0 0.25rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
}
.admin-analytics-promo-metrics .admin-analytics-sidebar-period {
  margin: 0 0 1rem 0;
  font-size: 0.75rem;
}
.admin-analytics-promo-loading,
.admin-analytics-promo-error {
  font-size: 0.8125rem;
  padding: 0.5rem 0;
}
.admin-analytics-promo-metrics .admin-analytics-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.admin-analytics-promo-metrics .admin-analytics-kpi {
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 0.375rem;
  text-align: center;
}
.admin-analytics-promo-metrics .admin-analytics-kpi-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.admin-analytics-promo-metrics .admin-analytics-kpi-label {
  font-size: 0.6875rem;
  color: var(--text-muted-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.admin-analytics-promo-metrics .admin-analytics-trend {
  margin-top: 1rem;
}
.admin-analytics-promo-metrics .admin-analytics-chart-wrap {
  height: 80px;
  margin-top: 0.25rem;
}
.admin-analytics-promo-metrics .admin-analytics-events {
  margin-top: 1rem;
}
.admin-analytics-promo-revenue {
  margin-top: 1rem;
}
.admin-analytics-promo-revenue .admin-analytics-sidebar-title,
.admin-analytics-promo-revenue .admin-analytics-sidebar-period {
  margin: 0 0 0.25rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
}
.admin-analytics-promo-revenue .admin-analytics-sidebar-period {
  margin: 0 0 0.75rem 0;
  font-size: 0.75rem;
  font-weight: normal;
}
.admin-analytics-promo-revenue .admin-analytics-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}
.admin-analytics-promo-revenue .admin-analytics-kpi {
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 0.375rem;
  text-align: center;
}
.admin-analytics-promo-revenue .admin-analytics-kpi-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}
.admin-analytics-promo-revenue .admin-analytics-kpi-label {
  font-size: 0.6875rem;
  color: var(--text-muted-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.admin-analytics-kpi-highlight .admin-analytics-kpi-value {
  color: var(--accent);
}
.admin-analytics-promo-metrics .admin-analytics-events-title {
  margin: 0 0 0.5rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
}
.admin-analytics-promo-metrics .admin-analytics-events-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.admin-analytics-promo-metrics .admin-analytics-event-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.admin-analytics-promo-metrics .admin-analytics-event-bar-wrap {
  flex: 1;
  min-width: 0;
  height: 0.5rem;
  background: var(--border-muted);
  border-radius: 0.25rem;
  overflow: hidden;
}
.admin-analytics-promo-metrics .admin-analytics-event-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 0.25rem;
  min-width: 2px;
}
.admin-analytics-promo-metrics .admin-analytics-event-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 10rem;
}
.admin-analytics-promo-metrics .admin-analytics-event-count {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text-muted-2);
}

.admin-analytics-suggested {
  margin-bottom: 1.25rem;
}
.admin-analytics-suggested-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted-2);
  margin-bottom: 0.375rem;
}
.admin-analytics-suggested-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted-2);
  text-align: left;
  transition: color 0.2s;
}
.admin-analytics-suggested-toggle:hover {
  color: var(--text);
}
.admin-analytics-toggle-icon {
  transition: transform 0.2s;
  flex-shrink: 0;
}
.admin-analytics-suggested-toggle[aria-expanded="false"] .admin-analytics-toggle-icon {
  transform: rotate(-90deg);
}
.admin-analytics-suggested-group {
  margin-bottom: 0.75rem;
}
.admin-analytics-suggested-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.2s ease-out, margin-bottom 0.3s ease-out;
}
.admin-analytics-suggested-group[data-collapsed="true"] .admin-analytics-suggested-chips {
  max-height: 0 !important;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.admin-analytics-chip {
  font-size: 0.8125rem;
  padding: 0.375rem 0.625rem;
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.375rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  max-width: 100%;
  text-align: left;
}
.admin-analytics-chip:hover {
  background: var(--nav-hover-bg);
  border-color: var(--border);
}

.admin-analytics-history {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-muted);
}
.admin-analytics-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.admin-analytics-history-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border-muted);
}
.admin-analytics-history-item:last-child {
  border-bottom: none;
}
.admin-analytics-history-ask {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.admin-analytics-history-ask:hover {
  color: var(--nav-hover-text);
  text-decoration: underline;
}
.admin-analytics-history-date {
  font-size: 0.75rem;
  flex-shrink: 0;
}
.admin-analytics-history-delete {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-muted-2);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.admin-analytics-history-delete:hover {
  color: var(--text);
}
.admin-email-select {
  max-width: 20rem;
}

.contact-message-input {
  resize: vertical;
  min-height: 4rem;
}

.nav-item-contact {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.125rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted-2);
  border-radius: 0.5rem;
  position: relative;
}
.nav-item-contact:hover {
  color: var(--text);
  background: var(--nav-hover-bg);
}
.nav-item-contact span {
  font-size: 0.8125rem;
  font-weight: 500;
}
.nav-item-contact svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

/* Measurement Framework – options panel */
.framework-options-card {
  border-left: 4px solid rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, var(--surface) 0%, var(--feature-bg) 100%);
}

.framework-options-header {
  margin-bottom: 1.5rem;
}

.framework-options-header .card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.framework-options-header .card-title::before {
  content: '';
  width: 4px;
  height: 1.25rem;
  background: linear-gradient(180deg, #10b981 0%, #06b6d4 100%);
  border-radius: 2px;
}

.framework-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0;
}

@media (max-width: 720px) {
  .framework-options {
    grid-template-columns: 1fr;
  }
}

.framework-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.framework-option-group:hover {
  border-color: var(--border);
  box-shadow: 0 2px 12px var(--overlay);
}

.framework-option-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.framework-option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.framework-option-buttons .framework-opt {
  margin: 0;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.framework-option-buttons .framework-opt:not(.active) {
  background: var(--feature-bg);
  border-color: var(--border-muted);
  color: var(--text-muted-2);
}

.framework-option-buttons .framework-opt.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.15) 100%);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10b981;
  font-weight: 600;
}

.framework-option-buttons .framework-opt:hover:not(.active) {
  border-color: var(--border);
  color: var(--text-strong);
}

.framework-option-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.framework-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted-2);
  cursor: pointer;
  padding: 0.5rem 0.875rem;
  border-radius: 2rem;
  border: 1px solid var(--border-muted);
  background: var(--feature-bg);
  transition: all 0.2s;
}

.framework-checkbox-label:hover {
  color: var(--text-strong);
  border-color: var(--border);
}

.framework-checkbox-label:has(.framework-checkbox:checked) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-weight: 500;
}

.framework-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #10b981;
  flex-shrink: 0;
}

.framework-grid-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.framework-grid-header .card-title {
  margin-bottom: 0;
}

.framework-grid-header .framework-save-row .framework-select,
.framework-grid-header .framework-save-row .code-btn {
  height: 39px;
  box-sizing: border-box;
}

.framework-grid-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  height: 39px;
}
.framework-grid-actions .code-btn {
  height: 39px;
  box-sizing: border-box;
}

.framework-grid-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.framework-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.framework-grid th {
  padding: 0.875rem 1rem;
  text-align: left;
  color: #10b981;
  font-weight: 600;
  background: var(--overlay);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.framework-grid th:first-child {
  border-radius: 0.75rem 0 0 0;
}

.framework-grid td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-muted);
  vertical-align: top;
}

.framework-grid tbody tr:last-child td {
  border-bottom: none;
}

.framework-grid tbody tr:hover td {
  background: var(--feature-bg);
}

.framework-grid td:first-child {
  color: var(--text-strong);
  font-weight: 500;
}

.framework-grid .priority-p0 {
  color: #10b981;
  font-weight: 600;
}

.framework-grid .priority-p1 {
  color: var(--text-muted);
}

.framework-grid .priority-p2 {
  color: var(--text-muted-3);
}

.framework-grid .events-cell,
.framework-grid .params-cell,
.framework-grid .datalayer-cell {
  font-family: 'Fira Code', monospace;
  font-size: 0.8125rem;
}

.framework-grid .status-cell {
  font-size: 0.8125rem;
}

.framework-grid .status-not_started { color: var(--text-muted-3); }
.framework-grid .status-in_progress { color: #f59e0b; }
.framework-grid .status-done { color: #10b981; }
.framework-grid .status-validated { color: #06b6d4; }

.framework-grid .th-actions {
  width: 100px;
  text-align: center;
}

.framework-grid .row-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
}

.framework-grid .row-action-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border: none;
  border-radius: 0.25rem;
  background: var(--overlay);
  color: var(--text-muted-2);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.framework-grid .row-action-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.framework-grid .row-action-btn.remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.framework-grid-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.framework-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.framework-save-label {
  font-size: 0.8125rem;
  color: var(--text-muted-2);
  font-weight: 500;
}

.framework-select {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
  min-width: 160px;
}

/* Project trigger bar */
/* Sync status (loading / error / saved) */
.sync-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted-2);
}
.sync-status[data-state="loading"] .sync-status-text::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.5rem;
  vertical-align: middle;
  border: 2px solid var(--border);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: sync-spin 0.7s linear infinite;
}
@keyframes sync-spin {
  to { transform: rotate(360deg); }
}
.sync-status[data-state="error"] .sync-status-text {
  color: #f87171;
}
.sync-status[data-state="saved"] .sync-status-text {
  color: #10b981;
}
.sync-status-retry {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  cursor: pointer;
}
.sync-status-retry:hover {
  background: var(--nav-hover-bg);
}

.checkout-result-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
}
.checkout-result-banner[data-result="success"] {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--text);
}
.checkout-result-banner[data-result="cancel"] {
  background: var(--feature-bg);
  color: var(--text-muted-2);
}
.checkout-result-dismiss {
  padding: 0 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
}
.checkout-result-dismiss:hover {
  opacity: 1;
}

.pricing-table-container {
  margin-top: 1.5rem;
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.pricing-card {
  position: relative;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 20px var(--card-hover-shadow);
}

.pricing-card-popular {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.pricing-card-popular:hover {
  box-shadow: 0 4px 24px var(--glow);
}

.pricing-card-current {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.06);
}

.pricing-card-badge {
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.625rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-card-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-muted);
}

.pricing-card-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.25rem 0;
}

.pricing-card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.pricing-card-features {
  list-style: none;
  margin: 0 0 1.25rem 0;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.pricing-card-features li {
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.pricing-card-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 600;
}

.pricing-card-action {
  margin-top: auto;
}

.pricing-btn-free {
  background: var(--feature-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.pricing-btn-free:hover {
  background: var(--nav-hover-bg);
  border-color: var(--border-strong);
}

.pricing-cta {
  color: var(--text-muted-2);
  font-size: 0.9375rem;
}

.pricing-cta-current {
  font-weight: 600;
  color: #10b981;
}

.pricing-subscribe-btn {
  width: 100%;
  white-space: nowrap;
  justify-content: center;
}

.pricing-trust {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  text-align: center;
}

/* Billing interval toggle */
.pricing-billing-toggle {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.25rem;
  background: var(--feature-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.pricing-toggle-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted-2);
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.pricing-toggle-btn:hover {
  color: var(--text);
}

.pricing-toggle-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pricing-toggle-savings {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 600;
}

.pricing-card-savings {
  position: absolute;
  top: -0.5rem;
  right: 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* Credits section */
.pricing-credits-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pricing-credits-card {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.pricing-credits-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-strong);
}

.pricing-credits-desc {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.pricing-credits-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.pricing-success-line {
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 0.375rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.auth-sync-prompt {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.project-trigger-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.project-trigger-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-trigger-label {
  font-size: 0.875rem;
}

/* Project panel (slide-out modal) */
.project-panel {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.25s ease;
}

.project-panel[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
}

.project-panel-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-2);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-panel[aria-hidden="false"] .project-panel-backdrop {
  opacity: 1;
}

.project-panel-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px var(--overlay-2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.project-panel[aria-hidden="false"] .project-panel-drawer {
  transform: translateX(0);
}

.project-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.project-panel-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-strong);
  margin: 0;
}

.project-panel-close {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--feature-bg);
  color: var(--text-muted-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.project-panel-close:hover {
  background: var(--nav-hover-bg);
  color: var(--text-strong);
}

.project-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  padding-bottom: 5rem;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.project-panel-body .project-bar-row {
  flex-direction: column;
  align-items: stretch;
}

.project-panel-body .project-name-field,
.project-panel-body .project-share-field {
  margin-left: 0;
}

.project-plan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.project-plan-label {
  font-size: 0.8125rem;
}
.project-upgrade-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}
.project-upgrade-link:hover {
  background: var(--nav-hover-bg);
  border-color: rgba(16, 185, 129, 0.3);
}
.project-at-limit-message {
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 0.5rem;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.project-signup-nudge {
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--feature-bg);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  color: var(--text-muted-2);
}
.project-signup-nudge .link-btn {
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}
.project-signup-nudge .link-btn:hover {
  color: #10b981;
}

/* Project bar (content inside panel) */
.project-bar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.project-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-name-field {
  flex: 1;
  min-width: 200px;
}

.project-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted-2);
}

.project-select,
.project-input {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
}

.project-select {
  min-width: 180px;
}

.project-buttons {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex-shrink: 0;
}

.project-btn {
  flex-shrink: 0;
}

.project-share-field {
  margin-left: auto;
}

.project-domains-wrap {
  margin-top: 1rem;
}

.project-domains {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
  font-family: 'Fira Code', monospace;
  line-height: 1.5;
  resize: vertical;
  min-height: 4rem;
}

.project-domains::placeholder {
  color: var(--text-muted-3);
}

.project-domains-hint {
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

.project-notes-wrap {
  margin-top: 1rem;
}
.project-notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.project-notes-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted-2);
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.project-notes-expand-btn:hover {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}
.project-notes-expand-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.project-notes-expand-btn:disabled:hover {
  color: var(--text-muted-2);
  border-color: var(--border-muted);
  background: var(--feature-bg);
}
.project-notes-expand-btn .btn-text {
  font-size: inherit;
}
.project-deliverable-wrap {
  margin-top: 1rem;
}

.project-notes {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
}

.project-notes:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}

.project-ids-wrap {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.project-ids-group-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted-2);
  margin: 0 0 0.5rem 0;
  grid-column: 1 / -1;
}

.project-adobe-wrap {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.project-ids-wrap .project-input {
  font-family: 'Fira Code', monospace;
  font-size: 0.875rem;
}

.project-ids-hint {
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

.project-ai-extract-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.ai-extract-usage-summary {
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 0.125rem;
}
.project-ai-extract-summary {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted-2);
  cursor: pointer;
  list-style: none;
}
.project-ai-extract-summary::-webkit-details-marker {
  display: none;
}
.project-ai-extract-summary:hover {
  color: #10b981;
}
.project-ai-extract-content {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
}
.project-ai-import-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.project-ai-import-input {
  flex: 1;
  min-width: 12rem;
}
.project-ai-extract-textarea {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 6rem;
}
.project-ai-extract-actions {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.project-ai-extract-status {
  font-size: 0.75rem;
}
.project-ai-extract-results {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--overlay);
  border-radius: 6px;
}
.project-ai-results-title {
  font-size: 0.875rem;
  margin: 0 0 0.5rem 0;
}
.project-ai-extract-results ul {
  margin: 0.25rem 0 0.5rem 1.25rem;
  padding: 0;
}
.project-ai-extract-results li {
  margin-bottom: 0.15rem;
}
.ai-extract-apply-options {
  margin-top: 0.75rem;
}
.ai-extract-apply-warning {
  font-size: 0.8125rem;
  color: var(--muted);
  background: var(--overlay);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid var(--accent, #3b82f6);
  margin: 0 0 0.5rem 0;
}
.ai-extract-apply-mode {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.ai-extract-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.ai-extract-mode-label input {
  margin: 0;
}

.ai-extract-preview-label {
  font-size: 0.8125rem;
  margin: 0 0 0.35rem 0;
  color: var(--text-muted-2);
}
.ai-extract-preview-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--overlay);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ai-extract-preview-btn:hover {
  background: var(--feature-bg);
  border-color: var(--text-muted-2);
}
.ai-extract-preview-btn svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.ai-extract-results-modal-content {
  max-width: 42rem;
  max-height: 85vh;
  overflow-y: auto;
}
.ai-extract-results-modal-content .ai-extract-apply-options {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* AI extract modal section layout */
.ai-extract-modal-sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.ai-extract-section {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.ai-extract-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.ai-extract-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted-2);
  margin: 0 0 0.5rem 0;
}
.ai-extract-project-name {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-strong);
  margin: 0;
}

/* Tags (objectives, KPIs, events) */
.ai-extract-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ai-extract-tags-events {
  gap: 0.35rem;
}
.ai-extract-tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.8125rem;
  background: var(--overlay);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}
.ai-extract-tag-event {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
}

/* Stakeholders */
.ai-extract-stakeholder-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ai-extract-stakeholder {
  padding: 0.4rem 0;
  font-size: 0.875rem;
  line-height: 1.45;
  border-bottom: 1px solid var(--border);
}
.ai-extract-stakeholder:last-child {
  border-bottom: none;
}
.ai-extract-stakeholder-role {
  font-weight: 600;
  color: var(--text-strong);
}
.ai-extract-stakeholder-name {
  color: var(--text);
}
.ai-extract-stakeholder-focus {
  color: var(--text-muted-2);
  font-size: 0.8125rem;
}

/* Notes & timeline text */
.ai-extract-text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}
.ai-extract-notes {
  white-space: pre-wrap;
}

#ai-extract-apply-btn {
  margin-top: 0.5rem;
}

.ai-extract-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
  margin-bottom: 0;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.ai-extract-framework-preview {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.ai-extract-framework-preview th,
.ai-extract-framework-preview td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.ai-extract-framework-preview tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.02);
}
.ai-extract-framework-preview tr:last-child td {
  border-bottom: none;
}
.ai-extract-framework-preview th {
  background: var(--overlay);
  font-weight: 600;
  white-space: nowrap;
}
.ai-extract-framework-preview td {
  word-break: break-word;
}
.ai-extract-cell-events,
.ai-extract-cell-params {
  max-width: 14rem;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
.ai-extract-section-framework .ai-extract-framework-preview th:first-child,
.ai-extract-section-framework .ai-extract-framework-preview td:first-child {
  min-width: 6rem;
}

.project-share-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.project-share-info-summary {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted-2);
  cursor: pointer;
  list-style: none;
}

.project-share-info-summary::-webkit-details-marker {
  display: none;
}

.project-share-info-summary:hover {
  color: #10b981;
}

.project-share-info-content {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-share-info-content p {
  margin-bottom: 0.5rem;
}

.project-share-info-content p:last-child {
  margin-bottom: 0;
}

.project-share-info-content ul {
  margin: 0.5rem 0 0.75rem 1.25rem;
}

.project-share-info-content li {
  margin-bottom: 0.25rem;
}

.project-share-info-content code {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  background: var(--overlay);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* ========== Implementation Guides ========== */
#section-guides .card:first-of-type {
  overflow: visible;
}

.guide-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.guide-new-delete-wrap {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex-shrink: 0;
}

.guide-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.guide-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted-2);
}

.guide-select {
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
}

.guide-template-dropdown-wrap {
  position: relative;
  z-index: 10000;
}

/* Position set by JS when open so dropdown is never clipped (position: fixed) */
.guide-template-dropdown {
  position: fixed;
  margin-top: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px var(--overlay-2);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  max-height: min(280px, 50vh);
  overflow-y: auto;
}

.guide-template-option {
  padding: 0.625rem 1rem;
  text-align: left;
  border: none;
  background: none;
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 0;
}

.guide-template-option:hover {
  background: var(--nav-hover-bg);
}

.guide-template-option:first-child {
  border-radius: 0.5rem 0.5rem 0 0;
}

.guide-template-option:last-child {
  border-radius: 0 0 0.5rem 0.5rem;
}

.guide-editor-card .card-title {
  margin-bottom: 1rem;
}

.guide-editor {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guide-title-input {
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
}

.guide-steps-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.guide-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-strong);
}

.code-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.guide-steps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-step-item {
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.75rem;
  padding: 1rem;
}

.guide-step-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.guide-step-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: white;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-step-title-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
}

.guide-step-remove {
  padding: 0.375rem;
  border: none;
  background: transparent;
  color: var(--text-muted-3);
  cursor: pointer;
  border-radius: 0.375rem;
  transition: color 0.2s, background 0.2s;
}

.guide-step-remove:hover {
  color: #ef4444;
  background: var(--overlay);
}

.guide-step-order-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.guide-step-move-up,
.guide-step-move-down {
  padding: 0.25rem 0.475rem;
  font-size: 0.875rem;
  line-height: 1;
}
.guide-step-move-up:disabled,
.guide-step-move-down:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.guide-step-body-wrap {
  margin-left: 2.25rem;
}

.guide-step-body-input {
  width: 100%;
  min-height: 80px;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
}

.guide-step-image-wrap {
  margin-left: 2.25rem;
  margin-top: 0.75rem;
}

.guide-step-image-preview {
  margin-bottom: 0.5rem;
}

.guide-step-image-preview img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  object-fit: contain;
}

.guide-step-image-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.guide-step-image-file {
  max-width: 200px;
  font-size: 0.8125rem;
}

.guide-step-image-url {
  flex: 1;
  min-width: 180px;
  padding: 0.375rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.8125rem;
}

.guide-step-image-url::placeholder {
  color: var(--text-muted-3);
}

.guide-callouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 720px) {
  .guide-callouts {
    grid-template-columns: 1fr;
  }
}

.guide-callout-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.guide-callout-hint {
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
}

.guide-callout-textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
}

.guide-preview-callouts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.callout {
  flex: 1;
  min-width: 260px;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border-left: 4px solid;
}

.callout-do {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: #10b981;
}

.callout-do strong,
.callout-dont strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.callout-do ul,
.callout-dont ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.callout-dont {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content-wide {
  max-width: 720px;
}

.modal-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-strong);
}

.row-edit-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.row-edit-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted-2);
}

.row-edit-input,
.row-edit-select {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
}

.row-edit-input:focus,
.row-edit-select:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Stakeholder takeaways modal */
.stakeholder-takeaways-modal-content {
  max-width: 36rem;
  width: 100%;
}
.stakeholder-takeaways-modal-subtitle {
  font-size: 0.875rem;
  margin: -0.5rem 0 0.75rem;
}
.stakeholder-takeaways-modal-textarea {
  width: 100%;
  min-height: 14rem;
  resize: vertical;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input-bg);
  color: var(--text-strong);
  margin-bottom: 0.25rem;
}
.stakeholder-takeaways-modal-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}
.interviews-stakeholder-takeaways-preview {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.interviews-stakeholder-edit-notes-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Export deliverable modal */
.deliverable-export-modal-content {
  max-width: 28rem;
}
.deliverable-export-hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.875rem;
}
.deliverable-export-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.deliverable-export-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  cursor: pointer;
}
.deliverable-export-option input {
  flex-shrink: 0;
}

/* Snippet Library */
.snippets-layout.card {
  padding: 1.5rem 1.75rem;
  max-width: 100%;
  width: 100%;
}
.snippets-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: space-between;
}
.snippets-split {
  display: grid;
  grid-template-columns: minmax(280px, 320px) 1fr;
  gap: 1.5rem;
  min-height: 420px;
  align-items: stretch;
  width: 100%;
}
@media (max-width: 900px) {
  .snippets-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}
.snippets-list {
  min-height: 4rem;
  overflow-y: auto;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.snippets-list .muted {
  padding: 1rem 0.5rem !important;
  text-align: left !important;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 !important;
}
/* Snippet card muted elements - consolidated rules */
.snippet-card .muted {
  text-align: left !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
}
.snippet-card-tags.muted {
  margin-bottom: 0.375rem !important;
}
.snippet-card-desc.muted {
  margin-bottom: 0 !important;
}
.snippets-preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
  background: var(--feature-bg);
  overflow: hidden;
  width: 100%;
  min-width: 0;
}
.snippets-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-muted);
  flex-shrink: 0;
}
.snippets-preview-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-strong);
}
.snippets-preview-title.muted {
  color: var(--text-muted);
  font-weight: 500;
}
.snippets-preview-code {
  flex: 1;
  margin: 0;
  padding: 1rem;
  overflow: auto;
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre;
  border: none;
  background: transparent;
  color: var(--text-strong);
}
.snippets-preview-code code {
  font-family: 'Fira Code', 'Consolas', monospace;
}
.snippets-preview-empty {
  padding: 1.5rem 1rem;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.snippets-preview.has-selection .snippets-preview-empty {
  display: none;
}
.snippet-card.selected {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.25);
}
.snippet-card.selected:hover {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}
.snippets-filter-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.snippets-filter {
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text-strong);
  font-size: 0.875rem;
  min-width: 10rem;
}
.snippets-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.snippet-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
  background: var(--feature-bg);
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.snippet-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--surface);
}
.snippet-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.snippet-card-main * {
  text-align: left !important;
}
.snippet-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.snippet-card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  padding: 0;
  color: var(--text-strong);
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.snippet-card-badge {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
  margin: 0;
}
.snippet-card-tags {
  font-size: 0.8125rem;
  display: block;
  margin: 0;
  margin-bottom: 0.375rem;
  padding: 0;
  color: var(--text-muted);
  line-height: 1.3;
}
.snippet-card-desc {
  font-size: 0.875rem;
  margin: 0;
  padding: 0;
  line-height: 1.4;
  color: var(--text-muted);
  width: 100%;
}
.snippet-card-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: flex-start;
  margin: 0;
  padding: 0;
}

/* Snippet edit modal */
.snippet-edit-modal-content {
  max-width: 36rem;
  width: 100%;
}
.snippet-edit-hint {
  font-size: 0.8125rem;
  margin: -0.5rem 0 1rem;
  line-height: 1.4;
}
.snippet-edit-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted-2);
  margin: 0 0 0.35rem;
}
.snippet-edit-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text-strong);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.snippet-edit-code {
  width: 100%;
  min-height: 12rem;
  resize: vertical;
  padding: 0.75rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input-bg);
  color: var(--text-strong);
  margin-bottom: 1rem;
}
.snippet-edit-code:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

/* Auth modals */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-modal[hidden] {
  display: none;
}
.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-2);
  cursor: pointer;
}
.auth-modal-content {
  position: relative;
  min-width: 320px;
  max-width: 400px;
  padding: 1.5rem;
}
.auth-modal-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-strong);
}
.auth-google-wrap {
  margin-bottom: 1rem;
}
.auth-modal .auth-google-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.auth-modal .auth-google-btn:hover {
  background: var(--nav-hover-bg);
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px var(--border-strong);
}
.auth-divider {
  font-size: 0.75rem;
  text-align: center;
  margin: 0 0 1rem;
  color: var(--text-muted-3);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted-2);
}
.auth-input {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
}
.auth-input:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}
.auth-form-footer {
  margin: -0.25rem 0 0;
}
.auth-form-footer-inline {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  white-space: nowrap;
}
.auth-link {
  background: none;
  border: none;
  color: var(--text-muted-2);
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.auth-link:hover {
  color: var(--text);
}
.auth-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}
#auth-login-modal .auth-actions {
  width: 100%;
  justify-content: space-between;
}
#auth-login-modal .auth-actions .code-btn {
  flex: 1;
  min-width: 0;
  justify-content: center;
}
.auth-message {
  font-size: 0.875rem;
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
}
.auth-message.error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
.auth-message.success {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}
.auth-google-subscribe-message {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1.25rem;
}
.auth-modal-link {
  color: #10b981;
  text-decoration: none;
  font-weight: 500;
}
.auth-modal-link:hover {
  text-decoration: underline;
}
.auth-google-subscribe-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.auth-google-subscribe-actions .code-btn {
  width: 100%;
  justify-content: center;
}
.auth-modal-footer {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-muted);
}

/* Project notes modal (expanded editing) */
.project-notes-modal-content {
  min-width: 420px;
  max-width: 560px;
}
.project-notes-modal-hint {
  font-size: 0.8125rem;
  margin: -0.5rem 0 1rem;
}
.project-notes-modal-textarea {
  width: 100%;
  min-height: 16rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 1rem;
}
.project-notes-modal-textarea:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}
#project-notes-modal .auth-actions {
  width: 100%;
  justify-content: space-between;
}
#project-notes-modal .auth-actions .code-btn {
  flex: 1;
  min-width: 0;
  justify-content: center;
}

/* Export options modal */
.export-options-modal-content {
  min-width: 360px;
  max-width: 420px;
}
.export-options-hint {
  font-size: 0.8125rem;
  margin: -0.5rem 0 1rem;
}
.export-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.export-option-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
  background: var(--feature-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.export-option-btn:hover {
  background: var(--nav-hover-bg);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--text-strong);
}
.export-option-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
.export-option-btn:hover .export-option-icon {
  background: rgba(16, 185, 129, 0.2);
}
.export-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.export-option-label {
  font-weight: 500;
}
.export-option-desc {
  font-size: 0.75rem;
  margin-bottom: 0;
}
.export-option-desc.muted,
.export-option-text .export-option-desc.muted {
  margin-bottom: 0;
}
.export-option-ready {
  flex-shrink: 0;
  min-width: 4.5rem;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted-3);
  white-space: nowrap;
}
.export-option-ready.ready {
  color: #10b981;
}
.export-options-modal-footer {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-muted);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(16, 185, 129, 0.95);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Domain validator */
.domain-validator {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.domain-validator-input {
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--overlay);
  color: var(--text);
  font-family: 'Fira Code', monospace;
  font-size: 0.875rem;
  resize: vertical;
}

.domain-validator-input:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}

.domain-validator-result {
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.domain-validator-result.valid-only {
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--text);
}

.domain-validator-result.has-errors {
  border-color: rgba(251, 191, 36, 0.3);
}

.domain-validator-result .domain-valid,
.domain-validator-result .domain-invalid {
  margin-bottom: 0.5rem;
}

.domain-validator-result .domain-invalid {
  color: #f59e0b;
}

.domain-validator-result .domain-note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted-2);
}

/* FAQ */
.faq-list {
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-strong);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--text-muted-2);
  border-bottom: 2px solid var(--text-muted-2);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.faq-item[open] .faq-question::before {
  transform: rotate(-135deg);
}

.faq-answer {
  padding: 0 1.25rem 1rem;
}

.faq-answer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.faq-answer code {
  font-size: 0.8125rem;
  background: var(--overlay);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* Trigger info box */
.trigger-info {
  background: var(--overlay);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.trigger-info p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.trigger-info p:last-child {
  margin-bottom: 0;
}

.trigger-info strong {
  color: #10b981;
}

/* Progress box */
.progress-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 3rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-header span:first-child {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
}

.progress-header span:last-child {
  font-size: 2rem;
  font-weight: 800;
  color: #10b981;
}

.progress-bar-track {
  height: 8px;
  background: var(--progress-track);
  border-radius: 1rem;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
  transition: width 0.3s ease;
  border-radius: 1rem;
}

.checklist-export-wrap {
  margin-bottom: 2rem;
}
.checklist-export-wrap .code-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Issues box */
.issues-box {
  background: var(--feature-bg);
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-top: 1rem;
  border: 1px solid var(--border-muted);
}

.issues-box h4 {
  color: #d97706;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.issues-box p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.issues-box p:last-child {
  margin-bottom: 0;
}

/* Inline code highlight */
code.highlight {
  background: rgba(251, 191, 36, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  color: #b45309;
}

/* Download Section */
.download-section {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 0.75rem;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
  transition: all 0.3s;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.download-btn svg {
  width: 20px;
  height: 20px;
}

/* Account section */
.account-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1rem;
  row-gap: 0.5rem;
  max-width: 64rem;
  align-items: stretch;
}
@media (max-width: 768px) {
  .account-actions {
    grid-template-columns: 1fr;
  }
}
.profile-form-wrap {
  max-width: 64rem;
}
.account-action-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  align-items: flex-start;
  margin-bottom: 0.7rem;
}
.account-action-row:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 24px var(--card-hover-shadow);
  transform: translateY(-2px);
}
.account-action-row > div:first-child {
  flex: 0 1 auto;
  width: 100%;
}
.account-action-row .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
  font-family: inherit;
}
.account-action-row .muted {
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
}
.account-action-row > button,
.account-action-row > div:last-child {
  margin-top: 0.5rem;
  align-self: flex-start;
}
.account-backup-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.account-backup-buttons .code-btn {
  margin: 0;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}
.account-subscription-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.account-subscription-buttons .code-btn {
  margin: 0;
  width: auto;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}
.account-subscription-buttons .download-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}
.account-subscription-buttons .download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.account-action-row .code-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}
.account-action-row .download-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}
.account-action-row .download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.account-action-row-danger {
  border-color: rgba(239, 68, 68, 0.2);
}
.account-action-row-danger:hover {
  border-color: rgba(239, 68, 68, 0.4);
}

.account-status-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.375rem;
  background: var(--feature-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.account-status-badge.paused {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: #f59e0b;
}

/* Profile form */
.profile-form-wrap {
  max-width: 32rem;
}
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-form-row {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-muted);
}
.profile-form-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.profile-form-row-checkbox {
  padding-top: 1rem;
}
.profile-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.profile-input {
  width: 100%;
  max-width: 28rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text);
  font-size: inherit;
}
.profile-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}
.profile-hint {
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}
.profile-checkbox-wrap {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.profile-checkbox {
  margin-top: 0.25rem;
}
.profile-checkbox-label {
  font-weight: 500;
}
.profile-form-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.account-delete-btn {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.account-delete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.35);
}

/* Animations */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* Sidebar footer - fixed to bottom of viewport */
.sidebar-footer {
  margin-top: auto;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: padding 0.3s ease;
}

/* Override CookieYes revisit button wrapper positioning - place above dark mode switch */
/* Target the wrapper div that contains the CookieYes "Revisit Consent" button */
/* Sidebar footer is ~4.5rem from bottom (1rem padding + theme toggle ~3.5rem) */
.cky-btn-revisit-wrapper,
.cky-revisit-bottom-left {
  position: fixed !important;
  bottom: 5rem !important; /* Above sidebar footer (~4.5rem footer height + spacing) */
  left: 1.25rem !important; /* Match sidebar padding */
  right: auto !important;
  z-index: 150 !important;
  margin: 0 !important;
}

/* When sidebar is collapsed (72px width) */
.app.sidebar-collapsed .cky-btn-revisit-wrapper,
.app.sidebar-collapsed .cky-revisit-bottom-left {
  left: 0.5rem !important; /* Match collapsed sidebar padding */
}

/* On narrow viewports (sidebar auto-collapsed) */
@media (max-width: 1023px) {
  .cky-btn-revisit-wrapper,
  .cky-revisit-bottom-left {
    left: 0.5rem !important;
  }
  
  /* When manually expanded on narrow viewport */
  .app.sidebar-expanded .cky-btn-revisit-wrapper,
  .app.sidebar-expanded .cky-revisit-bottom-left {
    left: 1.25rem !important;
  }
}
@media (max-width: 1023px) {
  .sidebar-footer {
    padding: 1rem 0.5rem 0;
    align-items: center;
  }
}
.app.sidebar-collapsed .sidebar-footer {
  padding: 1rem 0.5rem 0;
  align-items: center;
}

/* Sidebar collapse toggle - positioned outside sidebar to avoid overflow clipping */
.sidebar-collapse-toggle {
  position: fixed;
  top: 50%;
  left: 268px; /* 280px sidebar - 12px overlap */
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-sidebar);
  backdrop-filter: blur(20px);
  color: var(--text-muted-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.25s ease, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.app.sidebar-collapsed .sidebar-collapse-toggle {
  left: 60px; /* 72px sidebar - 12px overlap */
}
/* Narrow viewport: collapsed by default */
@media (max-width: 1023px) {
  .sidebar-collapse-toggle {
    left: 60px;
  }
  .app.sidebar-expanded .sidebar-collapse-toggle {
    left: 268px;
  }
}
.sidebar-collapse-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}
.sidebar-collapse-toggle:hover {
  background: var(--nav-hover-bg);
  color: var(--text-strong);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.15);
}
.app.sidebar-collapsed .sidebar-collapse-toggle svg {
  transform: rotate(180deg);
}

/* Theme toggle */
.theme-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  transition: opacity 0.2s ease;
}
.sidebar-collapsed .theme-toggle-wrap {
  flex-direction: column;
  gap: 0.5rem;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--feature-bg);
  color: var(--text-muted-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  background: var(--nav-hover-bg);
  color: var(--text-strong);
  border-color: rgba(16, 185, 129, 0.25);
}

.theme-icon {
  display: none;
}

.theme-icon svg {
  width: 16px;
  height: 16px;
}

html[data-theme="dark"] .theme-icon-moon {
  display: block;
}

html[data-theme="light"] .theme-icon-sun {
  display: block;
}

.theme-label {
  font-size: 0.75rem;
  color: var(--text-muted-3);
  font-weight: 500;
  transition: opacity 0.2s ease;
}
.app.sidebar-collapsed .theme-label {
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Sidebar tooltip (for collapsed state) */
.sidebar-tooltip {
  position: fixed;
  left: 82px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sidebar-tooltip[hidden] {
  display: none;
}
.sidebar-tooltip.show {
  opacity: 1;
  transform: translateX(0);
}

/* ========== Appearance: Airbnb (Nunito Sans, rounded, single accent) ========== */
[data-appearance="airbnb"] {
  --font-sans: 'Nunito Sans', sans-serif;
}
[data-appearance="airbnb"] body {
  font-family: var(--font-sans);
}
[data-appearance="airbnb"] .logo h1 {
  font-family: var(--font-sans);
  font-style: normal;
}
[data-appearance="airbnb"] .card {
  border-radius: 0.75rem;
}
[data-appearance="airbnb"] .card-title {
  font-family: var(--font-sans);
}
[data-appearance="airbnb"] .section-title {
  font-family: var(--font-sans);
}
[data-appearance="airbnb"] .overview-card-title {
  font-family: var(--font-sans);
}
[data-appearance="airbnb"] .nav-item {
  border-radius: 0.5rem;
}
[data-appearance="airbnb"] .nav-item span {
  font-family: var(--font-sans);
}
[data-appearance="airbnb"] .site-search,
[data-appearance="airbnb"] .admin-settings-input,
[data-appearance="airbnb"] input[type="text"],
[data-appearance="airbnb"] input[type="email"],
[data-appearance="airbnb"] input[type="search"],
[data-appearance="airbnb"] input[type="number"],
[data-appearance="airbnb"] textarea,
[data-appearance="airbnb"] select {
  border-radius: 0.375rem;
  font-family: var(--font-sans);
}
[data-appearance="airbnb"] button,
[data-appearance="airbnb"] .code-btn,
[data-appearance="airbnb"] .download-btn,
[data-appearance="airbnb"] .account-delete-btn {
  border-radius: 0.375rem;
}
[data-appearance="airbnb"] .code-btn,
[data-appearance="airbnb"] .auth-guest .auth-google-btn,
[data-appearance="airbnb"] .auth-guest .auth-email-btn,
[data-appearance="airbnb"] .auth-user .auth-btn {
  font-family: var(--font-sans);
}
[data-appearance="airbnb"] .framework-option-buttons .framework-opt {
  border-radius: 0.5rem;
}
[data-appearance="airbnb"] .code-block .code-header {
  border-radius: 0.5rem 0.5rem 0 0;
}
[data-appearance="airbnb"] .code-block pre {
  border-radius: 0 0 0.5rem 0.5rem;
}
[data-appearance="airbnb"] .config-option {
  border-radius: 0.5rem;
  font-family: var(--font-sans);
}
[data-appearance="airbnb"] .alert {
  border-radius: 0.5rem;
}
[data-appearance="airbnb"] h1,
[data-appearance="airbnb"] h2,
[data-appearance="airbnb"] h3 {
  font-family: var(--font-sans);
}
[data-appearance="airbnb"] .modal-content {
  border-radius: 0.75rem;
}
[data-appearance="airbnb"] .admin-tab {
  font-family: var(--font-sans);
  border-radius: 0;
}
[data-appearance="airbnb"] .cross-domain-tab,
[data-appearance="airbnb"] .implementation-tools-tab,
[data-appearance="airbnb"] .account-profile-tab {
  border-radius: 0;
}
[data-appearance="airbnb"] .admin-settings-label,
[data-appearance="airbnb"] .admin-settings-checkbox-label {
  font-family: var(--font-sans);
}

/* Test suite: Run from Blueprint */
.test-suite-run-row {
  margin-bottom: 1rem;
}
.test-suite-run-row .project-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
}
.test-suite-run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.test-suite-run-actions .project-input {
  flex: 1;
  min-width: 12rem;
}
.test-suite-results {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.375rem;
}
.test-suite-results-title {
  font-size: 0.9375rem;
  margin: 0 0 0.5rem 0;
}
.test-suite-results-content .test-suite-hostname {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}
.test-suite-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}
.test-suite-results-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-muted);
}
.test-suite-results-list li:last-child {
  border-bottom: none;
}
.test-suite-results-list li.passed {
  color: var(--accent);
}
.test-suite-results-list li.failed {
  color: var(--text-muted-2);
}
.test-suite-summary {
  margin: 0.5rem 0 0 0;
  font-weight: 600;
}
.test-suite-error {
  color: var(--text-muted-2);
  font-size: 0.875rem;
}
.test-suite-results-actions {
  margin-top: 0.75rem;
}
.test-suite-saved-wrap {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-muted);
}
.test-suite-saved-title {
  font-size: 0.9375rem;
  margin: 0 0 0.5rem 0;
}
.test-suite-saved-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.test-suite-saved-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.375rem;
  font-size: 0.875rem;
}
.test-suite-saved-item-header {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}
.test-suite-saved-host {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.test-suite-saved-meta {
  font-size: 0.75rem;
}
.test-suite-saved-item-result {
  flex-shrink: 0;
  font-size: 0.8125rem;
}
.test-suite-saved-delete {
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
  min-width: auto;
}
.test-suite-saved-empty {
  font-size: 0.8125rem;
  margin: 0;
}

/* Snippet placeholder reference */
.snippet-placeholder-legend {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--feature-bg);
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
}
.snippet-placeholder-legend-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
}
.snippet-placeholder-legend-summary:hover {
  color: var(--accent);
}
.snippet-placeholder-table-wrap {
  margin-top: 0.75rem;
  overflow-x: auto;
}
.snippet-placeholder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.snippet-placeholder-table th,
.snippet-placeholder-table td {
  padding: 0.4rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-muted);
}
.snippet-placeholder-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.snippet-placeholder-table code {
  font-size: 0.8125rem;
  padding: 0.15rem 0.35rem;
  background: var(--surface);
  border-radius: 0.25rem;
}
.snippet-edit-placeholders {
  margin-bottom: 1rem;
}
.snippet-edit-placeholders-summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.snippet-edit-placeholders-summary:hover {
  color: var(--accent);
}
.snippet-placeholder-table-sm {
  font-size: 0.8125rem;
}
.snippet-placeholder-table-sm th,
.snippet-placeholder-table-sm td {
  padding: 0.3rem 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .main-content {
    padding: 2rem 1.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .download-section {
    bottom: 1rem;
    right: 1rem;
  }
}
