/* =========================================================
   WFCS Booking Docs — Stylesheet
   Accent: deep teal (#0d7377) + warm green (#14a085)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  /* Light mode */
  --bg-body:         #f8f9fa;
  --bg-sidebar:      #ffffff;
  --bg-content:      #ffffff;
  --bg-code:         #f3f4f6;
  --bg-code-block:   #1e2128;
  --bg-table-alt:    #f9fafb;
  --bg-tip:          #ecfdf5;
  --bg-warning:      #fffbeb;
  --bg-danger:       #fef2f2;
  --bg-search:       #ffffff;
  --bg-search-result:#f0fdf4;

  --border:          #e5e7eb;
  --border-sidebar:  #e5e7eb;
  --border-tip:      #6ee7b7;
  --border-warning:  #fcd34d;
  --border-danger:   #fca5a5;

  --text-primary:    #111827;
  --text-secondary:  #4b5563;
  --text-muted:      #9ca3af;
  --text-code:       #0d7377;
  --text-code-block: #abb2bf;
  --text-tip:        #065f46;
  --text-warning:    #92400e;
  --text-danger:     #991b1b;
  --text-link:       #0d7377;
  --text-link-hover: #0a5a5e;

  --accent:          #0d7377;
  --accent-light:    #14a085;
  --accent-hover:    #0a5a5e;
  --accent-subtle:   #e0f4f4;

  --sidebar-w:       272px;
  --toc-w:           220px;
  --header-h:        56px;
  --content-max:     72ch;
  --radius:          6px;
  --radius-lg:       10px;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:          0 4px 16px rgba(0,0,0,.08);
  --transition:      150ms ease;
}

[data-theme="dark"] {
  --bg-body:         #0f1117;
  --bg-sidebar:      #161b22;
  --bg-content:      #1a1f2e;
  --bg-code:         #252b37;
  --bg-code-block:   #13161d;
  --bg-table-alt:    #1e2430;
  --bg-tip:          #0a2518;
  --bg-warning:      #2a1f0a;
  --bg-danger:       #2a0f0f;
  --bg-search:       #1e2430;
  --bg-search-result:#0d2015;

  --border:          #2d3748;
  --border-sidebar:  #2d3748;
  --border-tip:      #065f46;
  --border-warning:  #92400e;
  --border-danger:   #7f1d1d;

  --text-primary:    #e2e8f0;
  --text-secondary:  #94a3b8;
  --text-muted:      #64748b;
  --text-code:       #4dd0d0;
  --text-code-block: #abb2bf;
  --text-tip:        #6ee7b7;
  --text-warning:    #fcd34d;
  --text-danger:     #fca5a5;
  --text-link:       #4dd0d0;
  --text-link-hover: #7de8e8;

  --accent:          #0d9ba0;
  --accent-light:    #14c89e;
  --accent-hover:    #4dd0d0;
  --accent-subtle:   #0a2a2a;

  --shadow-sm:       0 1px 3px rgba(0,0,0,.3);
  --shadow:          0 4px 16px rgba(0,0,0,.4);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout Shell ──────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Top Header ────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.brand-logo svg { width: 18px; height: 18px; color: #fff; }

.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.header-spacer { flex: 1; }

.header-search {
  position: relative;
  width: min(320px, 40vw);
}

.search-input {
  width: 100%;
  padding: 7px 36px 7px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-search);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

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

.search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.search-kbd {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', monospace;
  pointer-events: none;
  line-height: 1.6;
}

.header-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 8px;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px;
  font-family: inherit;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.header-btn:hover {
  background: var(--bg-code);
  color: var(--text-primary);
}

.hamburger {
  display: none;
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-sidebar);
  overflow-y: auto;
  padding: 20px 0 40px;
  z-index: 90;
  transition: transform 350ms cubic-bezier(.4,0,.2,1);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

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

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 16px;
}

.sidebar-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 20px 6px;
  display: block;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  border-left: 3px solid transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  line-height: 1.4;
}

.sidebar-link:hover {
  color: var(--accent);
  background: var(--accent-subtle);
  border-left-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
  border-left-color: var(--accent);
  font-weight: 600;
}

.sidebar-link svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: .7;
}

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

/* Sub-items in sidebar TOC */
.sidebar-link.sidebar-sub {
  padding-left: 32px;
  font-size: 12.5px;
}

a.sidebar-link {
  text-decoration: none;
}

/* ── Main Content Area ─────────────────────────────────── */
.main-area {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  flex: 1;
  display: flex;
  min-width: 0;
}

.content-wrapper {
  flex: 1;
  min-width: 0;
  padding: 48px 48px 80px;
  max-width: 900px;
}

/* ── Table of Contents (right rail) ────────────────────── */
.toc-rail {
  width: var(--toc-w);
  flex-shrink: 0;
  padding: 48px 24px 80px 0;
  position: sticky;
  top: var(--header-h);
  align-self: flex-start;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-item a {
  display: block;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 3px 8px;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1.4;
}

.toc-item a:hover {
  color: var(--accent);
  border-left-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.toc-item.active a {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.toc-item.toc-h3 a {
  padding-left: 20px;
  font-size: 12px;
}

/* ── Typography ────────────────────────────────────────── */
.prose h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}

.prose h1 + p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.prose h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  letter-spacing: -.01em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h2:first-of-type { margin-top: 32px; }

.prose h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 10px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h4 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .8rem;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  max-width: var(--content-max);
}

.prose a {
  color: var(--text-link);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition: all var(--transition);
}

.prose a:hover {
  color: var(--text-link-hover);
  border-bottom-color: var(--accent);
}

.prose ul, .prose ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
  max-width: var(--content-max);
}

.prose li {
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.prose li > ul, .prose li > ol {
  margin-top: 6px;
  margin-bottom: 6px;
}

.prose strong { color: var(--text-primary); font-weight: 600; }

/* ── Inline Code ───────────────────────────────────────── */
.prose code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: .82em;
  background: var(--bg-code);
  color: var(--text-code);
  padding: .15em .4em;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* ── Code Blocks ───────────────────────────────────────── */
.prose pre {
  background: var(--bg-code-block);
  border-radius: var(--radius-lg);
  margin: 20px 0 24px;
  position: relative;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.04);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 8px 16px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.code-lang {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.copy-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.12);
  color: #9ca3af;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  padding: 3px 10px;
  display: flex; align-items: center; gap: 5px;
  transition: all var(--transition);
}

.copy-btn:hover { background: rgba(255,255,255,.08); color: #d1d5db; }
.copy-btn.copied { color: #4ade80; border-color: #4ade80; }

.copy-btn svg { width: 12px; height: 12px; }

.prose pre code {
  display: block;
  padding: 20px;
  background: none;
  color: var(--text-code-block);
  font-size: .83em;
  line-height: 1.65;
  border: none;
  white-space: pre;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.prose pre code::-webkit-scrollbar { height: 4px; }
.prose pre code::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

/* ── Tables ────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.prose th {
  background: var(--bg-code);
  padding: 10px 16px;
  text-align: left;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.prose td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

.prose tr:last-child td { border-bottom: none; }
.prose tbody tr:nth-child(even) td { background: var(--bg-table-alt); }

.prose td code, .prose th code {
  font-size: .8em;
}

/* ── Callout Boxes ─────────────────────────────────────── */
.callout {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  margin: 20px 0;
  border-left: 4px solid;
  max-width: var(--content-max);
}

.callout-tip {
  background: var(--bg-tip);
  border-color: var(--border-tip);
  color: var(--text-tip);
}

.callout-warning {
  background: var(--bg-warning);
  border-color: var(--border-warning);
  color: var(--text-warning);
}

.callout-danger {
  background: var(--bg-danger);
  border-color: var(--border-danger);
  color: var(--text-danger);
}

.callout-title {
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.callout p { color: inherit; margin-bottom: 0; }
.callout code { background: rgba(0,0,0,.08); border-color: transparent; }

/* ── Badge ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .03em;
  vertical-align: middle;
  margin-left: 6px;
  text-transform: uppercase;
}

.badge-get    { background: #dbeafe; color: #1e40af; }
.badge-post   { background: #dcfce7; color: #166534; }
.badge-put    { background: #fef9c3; color: #854d0e; }
.badge-delete { background: #fee2e2; color: #991b1b; }
.badge-auth   { background: #f3e8ff; color: #6b21a8; }
.badge-super  { background: #fdf2f8; color: #86198f; }

/* ── Search Overlay ────────────────────────────────────── */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.search-overlay.open { display: flex; }

.search-modal {
  background: var(--bg-content);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(600px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-modal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.search-modal-input-row svg { color: var(--text-muted); flex-shrink: 0; width: 18px; height: 18px; }

.search-modal-input {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.search-modal-input::placeholder { color: var(--text-muted); }

.search-results {
  overflow-y: auto;
  padding: 8px 0;
}

.search-result-item {
  display: block;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}

.search-result-item:hover, .search-result-item.focused {
  background: var(--bg-search-result);
}

.search-result-section {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}

.search-result-title {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 2px;
}

.search-result-snippet {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Method badges in API section ──────────────────────── */
.endpoint-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.method-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.method-get    { background: #dbeafe; color: #1d4ed8; }
.method-post   { background: #dcfce7; color: #15803d; }
.method-put    { background: #fef9c3; color: #a16207; }
.method-patch  { background: #ffedd5; color: #c2410c; }
.method-delete { background: #fee2e2; color: #b91c1c; }

.endpoint-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: .88rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Mobile Overlay ────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 85;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .toc-rail { display: none; }
  .content-wrapper { max-width: 100%; padding: 36px 36px 60px; }
}

@media (max-width: 768px) {
  :root {
    --sidebar-w: 280px;
  }

  .hamburger { display: flex; }
  .header-search { width: auto; }
  .search-kbd { display: none; }
  .search-input { width: 32px; padding-right: 8px; cursor: pointer; }
  .search-input:focus { width: 180px; }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .sidebar-overlay.open { display: block; }

  .main-area {
    margin-left: 0;
  }

  .content-wrapper {
    padding: 24px 20px 60px;
  }
}

@media (max-width: 480px) {
  .prose h1 { font-size: 1.6rem; }
  .prose h2 { font-size: 1.15rem; }
  .brand-sub { display: none; }
  .search-input { display: none; }
  .header-search { display: none; }
}

/* ── Highlight.js overrides ────────────────────────────── */
.hljs {
  background: none !important;
  padding: 0 !important;
  color: var(--text-code-block);
}

/* ── Utility ───────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Agent Onboarding — Custom styles
   ========================================================= */

/* ── Login page ─────────────────────────────────────────── */
.login-wrap {
  min-height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.login-card {
  background: var(--bg-content);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 0.9rem;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-body);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  text-decoration: none;
  transition: background var(--transition), opacity var(--transition);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary.full-width { width: 100%; text-align: center; }

.error-msg {
  color: var(--text-danger);
  background: var(--bg-danger);
  border: 1px solid var(--border-danger);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 0.875rem;
}

.hidden { display: none !important; }

/* ── Role badge in header ──────────────────────────────── */
.role-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── No-sidebar layout (onboarding pages) ──────────────── */
.main-area.no-sidebar {
  margin-left: 0;
}

/* ── Prompt cards ──────────────────────────────────────── */
.prompt-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 14px 0;
  background: var(--bg-content);
  transition: border-color var(--transition), box-shadow var(--transition);
  max-width: var(--content-max);
}

.prompt-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.prompt-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.prompt-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.prompt-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 10px;
}

.prompt-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  background: var(--bg-code);
  color: var(--text-code);
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 10px;
}

.copy-button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  transition: background var(--transition);
}

.copy-button:hover { background: var(--accent-hover); }

.copy-button.copied {
  background: #16a34a;
}

/* ── Difficulty badges ─────────────────────────────────── */
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.7rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.difficulty-badge.easy         { background: #dcfce7; color: #15803d; }
.difficulty-badge.intermediate { background: #fef9c3; color: #a16207; }
.difficulty-badge.advanced     { background: #fee2e2; color: #b91c1c; }

[data-theme="dark"] .difficulty-badge.easy         { background: #14532d; color: #86efac; }
[data-theme="dark"] .difficulty-badge.intermediate { background: #422006; color: #fde68a; }
[data-theme="dark"] .difficulty-badge.advanced     { background: #450a0a; color: #fca5a5; }

/* ── Category label in prompt card ─────────────────────── */
.category-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ── Search & filter bar ───────────────────────────────── */
.prompt-search-bar {
  width: 100%;
  max-width: var(--content-max);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-search);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 14px;
}

.prompt-search-bar:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.filter-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.filter-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tag.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Empty state ───────────────────────────────────────── */
.prompts-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: var(--content-max);
}

/* ── Quick start link button ───────────────────────────── */
.btn-outline {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--accent-subtle);
}
