/* ─── TubeVersity — CSS ──────────────────────────────────────────────────── */
/* Using CSS nesting + custom properties (native, no SCSS needed) */

:root {
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --danger: #dc2626;
  --border: #e5e7eb;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1100px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */

.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */

.main-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary) !important;
  text-decoration: none !important;
  letter-spacing: -0.5px;
}

.nav-search {
  flex: 1;
  max-width: 280px;
  margin: 0 1rem;
}

.nav-search-input {
  width: 100%;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  background: var(--bg);
  transition: border-color 0.15s;
}

.nav-search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search-topic-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-topic-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text) !important;
  text-decoration: none !important;
  transition: background 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.nav-link:hover { background: var(--bg); }

.nav-btn-primary {
  background: var(--primary) !important;
  color: white !important;
}

.nav-btn-primary:hover {
  background: var(--primary-hover) !important;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Sections ───────────────────────────────────────────────────────────── */

.section {
  padding: 2rem 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.section-more {
  text-align: center;
  margin-top: 1.5rem;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.section-header-row .section-title {
  margin-bottom: 0;
}

/* Language pills */
.lang-pills {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.lang-pill {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.lang-pill-active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Audio tracks badge */
.audio-tracks-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
  color: #3b5998;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.page-header {
  padding: 2rem 0 1rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
}

/* ─── Breadcrumb ─────────────────────────────────────────────────────────── */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.15s;
  display: block;
  color: inherit !important;
  text-decoration: none !important;
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Tags & Badges ──────────────────────────────────────────────────────── */

.tag {
  display: inline-block;
  background: var(--bg);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-free {
  background: var(--success-light);
  color: var(--success);
}

.badge-premium {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-complete {
  background: var(--success-light);
  color: var(--success);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
  text-decoration: none !important;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover { background: var(--primary-hover); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover { background: #047857; }

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }

.btn-lg { padding: 0.65rem 1.75rem; font-size: 1rem; }

.btn-full { width: 100%; }

.btn-disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  background: white;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ─── Auth Page ──────────────────────────────────────────────────────────── */

.auth-page {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-switch {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ─── Alerts ─────────────────────────────────────────────────────────────── */

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--warning);
}

/* ─── Course Header ──────────────────────────────────────────────────────── */

.course-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  margin: 0 -1.25rem;
  padding: 2rem 1.25rem;
}

.course-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.course-header h1 {
  margin-bottom: 0.5rem;
}

.course-desc {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 700px;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* ─── Mind Map / Topic Tree ──────────────────────────────────────────────── */

.mind-map {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.topic-tree {
  padding-left: 0.5rem;
}

.topic-node {
  margin-bottom: 0.25rem;
}

.topic-node-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.topic-node-header:hover {
  background: var(--bg);
}

.topic-connector {
  position: relative;
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.connector-line {
  position: absolute;
  width: 2px;
  background: var(--border);
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  height: 200%;
}

.topic-toggle {
  font-size: 0.65rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.topic-leaf {
  color: var(--primary);
  font-size: 0.5rem;
}

.topic-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.topic-desc-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.topic-arrow {
  color: var(--primary);
  font-weight: 500;
  margin-left: auto;
  padding-left: 0.5rem;
}

.topic-children {
  padding-left: 2rem;
  border-left: 2px solid var(--border);
  margin-left: 1.25rem;
}

.depth-0 > .topic-node-header .topic-name {
  font-size: 1.05rem;
  font-weight: 600;
}

.depth-0 > .topic-node-header .connector-dot {
  width: 10px;
  height: 10px;
}

/* ─── Video Cards ────────────────────────────────────────────────────────── */

.video-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-thumbnail {
  position: relative;
  cursor: pointer;
  background: #000;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: background 0.2s;
}

.video-thumbnail:hover .play-overlay {
  background: rgba(0,0,0,0.5);
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  padding-left: 4px;
}

.video-embed {
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  padding: 1rem 1.25rem;
}

.video-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.video-channel {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.video-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.score-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.score-high { background: #dcfce7; color: #166534; }
.score-mid { background: #fef3c7; color: #92400e; }
.score-low { background: #fef2f2; color: #991b1b; }

.style-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.duration-tag {
  display: inline-block;
  background: var(--bg);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.primary-tag {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.video-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.video-actions {
  display: flex;
  gap: 0.5rem;
}

.video-completed {
  border-color: var(--success);
  border-width: 2px;
}

/* ─── Obfuscated Video ───────────────────────────────────────────────────── */

.video-obfuscated {
  position: relative;
}

.video-blur-overlay {
  background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.lock-icon {
  font-size: 2rem;
}

.video-blur-overlay p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Curation Grid ──────────────────────────────────────────────────────── */

.curation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.curation-video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.curation-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
}

.curation-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.curation-video-info {
  padding: 0.75rem 1rem;
}

.curation-video-info h4 {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Dashboard ──────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.6rem 1.25rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}

.tab:hover { color: var(--text); }

.tab-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ─── Progress ───────────────────────────────────────────────────────────── */

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.progress-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text) !important;
  text-decoration: none !important;
}

.progress-title:hover { color: var(--primary) !important; }

.progress-pct {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.progress-bar-outer {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-inner {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.bar-complete {
  background: var(--success);
}

.progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  align-items: center;
}

/* ─── Certificates ───────────────────────────────────────────────────────── */

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cert-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.cert-info {
  flex: 1;
}

.cert-info h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.cert-code code {
  background: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: monospace;
}

/* ─── Filters ────────────────────────────────────────────────────────────── */

.filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  background: white;
}

/* ─── Utility ────────────────────────────────────────────────────────────── */

.text-muted { color: var(--text-muted); }

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.error-state {
  text-align: center;
  padding: 3rem;
  color: var(--danger);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.main-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2rem;
}

/* ─── Topic Link Cards ───────────────────────────────────────────────────── */

.link-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.topic-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-relationship {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.link-target {
  font-weight: 500;
  text-decoration: none !important;
}

.link-target:hover { text-decoration: underline !important; }

/* ─── Personal Curations ─────────────────────────────────────────────────── */

.curation-rule-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.curation-rule-form h3 {
  margin-bottom: 0.25rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.form-group-flex { flex: 1; min-width: 180px; }

.curation-rules-list h3 {
  margin-bottom: 1rem;
}

.curation-rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.rule-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

/* ─── Pricing / Upgrade Page ─────────────────────────────────────────────── */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-featured {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: 0 4px 24px rgba(79, 70, 229, 0.12);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.2rem 1rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pricing-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.pricing-price {
  margin-bottom: 0.5rem;
}

.price-currency {
  font-size: 1.2rem;
  font-weight: 600;
  vertical-align: top;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.price-period {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pricing-alt {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pricing-save {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  flex: 1;
}

.pricing-features li {
  padding: 0.35rem 0;
  font-size: 0.875rem;
  padding-left: 1.25rem;
  position: relative;
}

.pricing-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 600;
}

.feature-disabled {
  color: var(--text-muted);
  text-decoration: line-through;
}

.feature-disabled::before {
  content: "\2717" !important;
  color: var(--text-muted) !important;
}

.pricing-cta {
  margin-top: 1rem;
  text-align: center;
}

.btn-full {
  width: 100%;
}

/* ─── Certificate Verification ───────────────────────────────────────────── */

.cert-verify-result {
  max-width: 500px;
  margin: 2rem auto;
  text-align: center;
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.cert-verify-result .cert-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.cert-valid {
  border-color: var(--success);
}

.cert-invalid {
  border-color: var(--danger);
}

.cert-details {
  text-align: left;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.cert-details p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
  }
  .nav-search {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
    margin: 0;
  }
  .pricing-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .curation-rule-card { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-stats { gap: 1.5rem; }
  .stat-num { font-size: 1.5rem; }
  .card-grid { grid-template-columns: 1fr; }
  .curation-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 0; }
  .nav-link { padding: 0.3rem 0.5rem; font-size: 0.8rem; }
  .topic-children { padding-left: 1rem; margin-left: 0.75rem; }
  .cert-card { flex-direction: column; }
}
