/* style.css — design tokens + component styles for Podcast Creator Community */

:root,
[data-theme='light'] {
  /* Surfaces — warm cream */
  --color-bg: #f6f3ee;
  --color-surface: #ffffff;
  --color-surface-2: #fcfaf6;
  --color-surface-offset: #f1ece4;
  --color-surface-offset-2: #e9e2d6;
  --color-divider: #e7e0d4;
  --color-border: #ddd4c4;
  --color-border-strong: #d0c5b0;

  /* Text */
  --color-text: #221c14;
  --color-text-muted: #6c6557;
  --color-text-faint: #a59d8c;
  --color-text-inverse: #fcfaf6;

  /* Primary accent — warm studio amber/copper, evokes audio + warmth */
  --color-primary: #b4400f;
  --color-primary-hover: #9a3609;
  --color-primary-active: #7a2c06;
  --color-primary-highlight: #f3ddcf;
  --color-primary-soft: #fcefe7;

  /* Secondary — deep warm plum for trust */
  --color-secondary: #4a1e4f;
  --color-secondary-highlight: #e9dce9;

  /* Semantic */
  --color-warning: #9a4a0e;
  --color-warning-highlight: #f6e2cc;
  --color-warning-soft: #fcf1e6;
  --color-error: #a01f3a;
  --color-error-highlight: #f5d6dd;
  --color-error-soft: #fbe9ed;
  --color-success: #2f6a2a;
  --color-success-highlight: #dde9d4;
  --color-success-soft: #edf4e8;
  --color-info: #0b5594;
  --color-info-highlight: #d3e2ef;
  --color-info-soft: #e8f0f7;

  /* Gold — accent for gamification */
  --color-gold: #b07a00;
  --color-gold-soft: #f7eccf;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 70 / 0.05);
  --shadow-md: 0 4px 14px oklch(0.2 0.02 70 / 0.08);
  --shadow-lg: 0 14px 36px oklch(0.2 0.02 70 / 0.13);

  /* Type */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.75rem + 0.35vw, 0.9375rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg: clamp(1.0625rem, 0.95rem + 0.55vw, 1.25rem);
  --text-xl: clamp(1.375rem, 1.1rem + 1.1vw, 1.75rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --font-display: 'Clash Display', 'Satoshi', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* Layout */
  --sidebar-w: 244px;
  --header-h: 60px;
}

[data-theme='dark'] {
  --color-bg: #14110d;
  --color-surface: #1c1814;
  --color-surface-2: #221d18;
  --color-surface-offset: #1a1611;
  --color-surface-offset-2: #27211b;
  --color-divider: #2a241d;
  --color-border: #3a3128;
  --color-border-strong: #4a3f33;

  --color-text: #e7e0d3;
  --color-text-muted: #968d7d;
  --color-text-faint: #6b6356;
  --color-text-inverse: #1c1814;

  --color-primary: #e06a2f;
  --color-primary-hover: #d2541a;
  --color-primary-active: #b94511;
  --color-primary-highlight: #3a2a20;
  --color-primary-soft: #2a1f17;

  --color-secondary: #c98fce;
  --color-secondary-highlight: #3a2c3c;

  --color-warning: #d68a3c;
  --color-warning-highlight: #4a361f;
  --color-warning-soft: #2f2419;
  --color-error: #e86b86;
  --color-error-highlight: #4a2530;
  --color-error-soft: #321d23;
  --color-success: #7bbf5c;
  --color-success-highlight: #2f3f22;
  --color-success-soft: #1d2a17;
  --color-info: #6fa8d8;
  --color-info-highlight: #243543;
  --color-info-soft: #18242f;
  --color-gold: #e8b23d;
  --color-gold-soft: #332a16;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 14px 36px oklch(0 0 0 / 0.5);
}

/* ---- Layout shell ---- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100dvh;
}

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.45);
  z-index: 55;
}
.scrim.show {
  display: block;
}

.sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  border-right: 1px solid var(--color-divider);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  min-height: var(--header-h);
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.brand-mark {
  color: var(--color-primary);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-name span {
  color: var(--color-primary);
}
.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-full);
}
.powered-by strong {
  color: var(--color-primary);
  font-weight: 700;
}
.powered-foot {
  display: block;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
}
.nav-section {
  padding: var(--space-3) var(--space-3) var(--space-1);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  font-weight: 600;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: left;
}
.nav-link:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.nav-link[aria-current='page'] {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}
.nav-link svg {
  flex-shrink: 0;
  opacity: 0.9;
}
.nav-badge {
  margin-left: auto;
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  line-height: 1.6;
}

.sidebar-foot {
  padding: var(--space-4);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.sidebar-foot a {
  color: var(--color-text-muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Top bar ---- */
.topbar {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-5);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
}
.topbar-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-9);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.topbar-search input::placeholder {
  color: var(--color-text-faint);
}
.topbar-search svg {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}
.icon-btn:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.icon-btn .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: 2px solid var(--color-surface);
}
.icon-btn {
  position: relative;
}
.menu-toggle {
  display: none;
}

.main {
  grid-column: 2;
  grid-row: 2;
  padding: var(--space-6) var(--space-6) var(--space-12);
  min-width: 0;
}
.main.narrow {
  max-width: 880px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  letter-spacing: -0.015em;
}
.page-sub {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}
.btn-primary:active {
  background: var(--color-primary-active);
}
.btn-outline {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-ghost {
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}
.btn-lg {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-base);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn svg {
  flex-shrink: 0;
}

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad {
  padding: var(--space-5);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
}
.card-head h2,
.card-head h3 {
  font-size: var(--text-base);
  font-weight: 600;
}
.card-body {
  padding: var(--space-5);
}

/* ---- Badges & chips ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.6;
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}
.badge-primary {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.badge-success {
  background: var(--color-success-soft);
  color: var(--color-success);
}
.badge-warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}
.badge-error {
  background: var(--color-error-soft);
  color: var(--color-error);
}
.badge-info {
  background: var(--color-info-soft);
  color: var(--color-info);
}
.badge-gold {
  background: var(--color-gold-soft);
  color: var(--color-gold);
}
.badge-purple {
  background: var(--color-secondary-highlight);
  color: var(--color-secondary);
}
.badge-outline {
  background: transparent;
  border: 1px solid var(--color-border);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
}
.chip[aria-pressed='true'],
.chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}
.chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.chip[aria-pressed='true']:hover {
  color: var(--color-text-inverse);
}

/* ---- Forms ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.field .hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.input,
.select,
.textarea {
  width: 100%;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.input-row {
  display: flex;
  gap: var(--space-3);
}
.input-row > * {
  flex: 1;
}

/* ---- Avatar ---- */
.avatar {
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.sm {
  width: 32px;
  height: 32px;
  font-size: var(--text-xs);
}
.avatar.md {
  width: 40px;
  height: 40px;
}
.avatar.lg {
  width: 64px;
  height: 64px;
  font-size: var(--text-lg);
}
.avatar.xl {
  width: 96px;
  height: 96px;
  font-size: var(--text-xl);
}

/* ---- Grids ---- */
.grid {
  display: grid;
  gap: var(--space-4);
}
.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.cols-2-1 {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-6);
  align-items: start;
}

/* ---- Stat cards ---- */
.stat {
  padding: var(--space-5);
}
.stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-val {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: var(--space-1);
  font-variant-numeric: tabular-nums;
}
.stat-trend {
  font-size: var(--text-xs);
  margin-top: var(--space-1);
  color: var(--color-text-muted);
}

/* ---- Forum post ---- */
.post {
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-divider);
}
.post:last-child {
  border-bottom: none;
}
.post-head {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.post-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.post-author {
  font-weight: 600;
  font-size: var(--text-sm);
}
.post-time {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.post-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  margin-top: var(--space-2);
  letter-spacing: -0.01em;
}
.post-body {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
  white-space: pre-wrap;
}
.post-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}
.vote {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px var(--space-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}
.vote:hover {
  border-color: var(--color-primary);
}
.vote.up[aria-pressed='true'] {
  background: var(--color-success-soft);
  border-color: var(--color-success);
  color: var(--color-success);
}
.vote.down[aria-pressed='true'] {
  background: var(--color-error-soft);
  border-color: var(--color-error);
  color: var(--color-error);
}
.action-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 4px var(--space-2);
  border-radius: var(--radius-sm);
}
.action-link:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* ---- Creator card ---- */
.creator-card {
  padding: var(--space-5);
}
.creator-card .top {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.creator-name {
  font-weight: 600;
  font-size: var(--text-base);
}
.creator-podcast {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.creator-bio {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.creator-meta {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.creator-foot {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}

/* ---- List rows ---- */
.row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-5);
}
.row + .row {
  border-top: 1px solid var(--color-divider);
}
.row-title {
  font-weight: 600;
  font-size: var(--text-sm);
}
.row-sub {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: 2px;
}

/* ---- Notifications panel ---- */
.popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: 90vw;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  overflow: hidden;
}
.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  font-weight: 600;
  font-size: var(--text-sm);
}
.notif {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.notif:last-child {
  border-bottom: none;
}
.notif:hover {
  background: var(--color-surface-offset);
}
.notif.unread {
  background: var(--color-primary-soft);
}
.notif-msg {
  font-size: var(--text-sm);
  color: var(--color-text);
}
.notif-time {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: 2px;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.45);
  display: grid;
  place-items: center;
  padding: var(--space-4);
  z-index: 100;
  animation: fade 160ms ease;
}
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  overflow-y: auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-divider);
}
.modal-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
}
.modal-body {
  padding: var(--space-5);
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-divider);
}

/* ---- Safety check panel ---- */
.safety-panel {
  margin-top: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--color-surface-offset);
}
.safety-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  padding: 3px 0;
}
.safety-row svg {
  flex-shrink: 0;
}
.score-bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset-2);
  overflow: hidden;
  margin-top: var(--space-2);
}
.score-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.score-fill.good {
  background: var(--color-success);
}
.score-fill.warn {
  background: var(--color-warning);
}
.score-fill.bad {
  background: var(--color-error);
}
.safety-warn {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-warning-soft);
  border: 1px solid var(--color-warning);
  color: var(--color-warning);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
}
.safety-warn svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.safety-warn strong {
  display: block;
  margin-bottom: 2px;
}
.flagged-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* ---- Reputation / badge row ---- */
.reputation {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.rep-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-gold-soft);
  color: var(--color-gold);
}

/* ---- Misc ---- */
.divider {
  height: 1px;
  background: var(--color-divider);
  margin: var(--space-4) 0;
}
.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}
.link-list a:hover {
  background: var(--color-surface-offset);
}
.link-list svg {
  color: var(--color-text-faint);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}
.empty {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  color: var(--color-text-muted);
}
.empty svg {
  margin: 0 auto var(--space-4);
  color: var(--color-text-faint);
}
.empty h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.filter-bar {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
}
.filter-bar .search {
  flex: 1;
  min-width: 180px;
  position: relative;
}
.filter-bar .search input {
  width: 100%;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-9);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
}
.filter-bar .search svg {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
}
.filter-bar select {
  padding: var(--space-2) var(--space-8) var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c6557' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
}

/* ---- Waveform hero strip ---- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-text-inverse);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}
.hero-powered {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.16);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  backdrop-filter: blur(4px);
}
.hero-powered strong {
  font-weight: 700;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  max-width: 28ch;
}
.hero p {
  margin-top: var(--space-3);
  max-width: 52ch;
  opacity: 0.92;
  font-size: var(--text-sm);
}
.hero .btn-row {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}
.hero .btn-primary {
  background: var(--color-text-inverse);
  color: var(--color-primary);
}
.hero .btn-outline {
  background: transparent;
  border-color: oklch(1 0 0 / 0.4);
  color: var(--color-text-inverse);
}
.wave {
  position: absolute;
  right: var(--space-6);
  bottom: var(--space-6);
  opacity: 0.18;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 90px;
}
.wave span {
  display: block;
  width: 4px;
  background: var(--color-text-inverse);
  border-radius: var(--radius-full);
  animation: wave 1.2s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-anim {
  animation: slide 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Onboarding checklist ---- */
.checklist {
  list-style: none;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}
.check-box {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.checklist li.done .check-box {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-text-inverse);
}
.checklist li.done span {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

/* ---- Mobile nav ---- */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  z-index: 40;
  padding: var(--space-1);
}
.mobile-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-faint);
  border-radius: var(--radius-md);
}
.mobile-bar a[aria-current='page'] {
  color: var(--color-primary);
}

/* ---- Mobile responsive ---- */
@media (max-width: 880px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    grid-column: 1;
    position: fixed;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
    width: 86vw;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .topbar, .main {
    grid-column: 1;
  }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
  }
  .mobile-bar {
    display: flex;
  }
  .main {
    padding-bottom: 84px;
  }
  .cols-2-1 {
    grid-template-columns: 1fr;
  }
  .topbar-search {
    display: none;
  }
  .hero {
    padding: var(--space-5);
  }
  .wave {
    display: none;
  }
}

@media (max-width: 560px) {
  .main {
    padding: var(--space-4);
    padding-bottom: 88px;
  }
  .page-head {
    align-items: flex-start;
  }
}
