:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #1a1a25;
  --fg: #e8e8ed;
  --fg-muted: #9494a8;
  --accent: #6ee7b7;
  --accent-dim: rgba(110, 231, 183, 0.12);
  --accent-glow: rgba(110, 231, 183, 0.25);
  --border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
}

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

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-inner {
  max-width: 720px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: var(--accent-dim);
  border: 1px solid rgba(110, 231, 183, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 32px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin-bottom: 28px;
  color: #fff;
}

.hero h1 .accent {
  color: var(--accent);
}

.lede {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.35;
  filter: blur(100px);
  pointer-events: none;
}

/* ─── PROBLEM ─── */
.problem {
  padding: 100px 24px;
  background: var(--bg);
}

.problem-inner {
  max-width: 960px;
  margin: 0 auto;
}

.problem h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  text-align: center;
  margin-bottom: 56px;
  color: #fff;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
}

.problem-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.problem-card p {
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ─── FEATURES ─── */
.features {
  padding: 100px 24px;
  background: var(--bg-elevated);
}

.features-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.features-header {
  text-align: center;
  margin-bottom: 56px;
}

.features-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: #fff;
  margin-bottom: 16px;
}

.features-sub {
  color: var(--fg-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: rgba(110, 231, 183, 0.25);
}

.feature-highlight {
  border-color: rgba(110, 231, 183, 0.15);
  background: linear-gradient(135deg, var(--bg-card), rgba(110, 231, 183, 0.04));
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ─── AUDIENCE ─── */
.audience {
  padding: 100px 24px;
  background: var(--bg);
}

.audience-inner {
  max-width: 800px;
  margin: 0 auto;
}

.audience h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
  margin-bottom: 56px;
  color: #fff;
}

.audience-columns {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.audience-col {
  flex: 1;
}

.audience-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: 0.3;
}

.audience-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
}

.audience-col ul {
  list-style: none;
}

.audience-col li {
  color: var(--fg-muted);
  padding: 10px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 18px;
}

.audience-col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

.audience-col li:last-child {
  border-bottom: none;
}

/* ─── CLOSING ─── */
.closing {
  padding: 120px 24px;
  background: var(--bg-elevated);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.closing::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.2;
  filter: blur(80px);
  pointer-events: none;
}

.closing-inner {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.closing h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: #fff;
  margin-bottom: 24px;
}

.closing-text {
  color: var(--fg-muted);
  font-size: 1.1rem;
  line-height: 1.75;
}

/* ─── FOOTER ─── */
.site-footer {
  padding: 48px 24px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 6px;
}

.footer-tagline {
  color: var(--fg-muted);
  font-size: 0.85rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .problem-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .audience-columns {
    flex-direction: column;
    gap: 32px;
  }

  .audience-divider {
    width: 100%;
    height: 1px;
    align-self: auto;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
  }

  .hero {
    min-height: 70vh;
    padding: 100px 20px 60px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}

/* ═══════════════════════════════════════════════════════
   APP STYLES — tips platform, nav, search, cards
   ═══════════════════════════════════════════════════════ */

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  line-height: 1;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: rgba(110,231,183,0.3); color: var(--fg); }

/* ─── HERO ACTIONS ─── */
.hero-actions {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ─── APP NAV ─── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.app-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav-brand-clarity { color: #fff; }
.nav-brand-ai { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--fg); background: rgba(255,255,255,0.05); }

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s;
}
.nav-search:focus-within { border-color: rgba(110,231,183,0.35); }
.nav-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  padding: 8px 14px;
  width: 220px;
}
.nav-search-input::placeholder { color: var(--fg-muted); }
.nav-search-btn {
  background: transparent;
  border: none;
  color: var(--fg-muted);
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.nav-search-btn:hover { color: var(--accent); }

/* ─── APP MAIN ─── */
.app-main { min-height: 100vh; }

/* ─── TIPS PAGE HERO ─── */
.tips-page-hero {
  padding: 80px 24px 60px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.tips-page-hero::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.25;
  filter: blur(80px);
  pointer-events: none;
}
.tips-page-hero-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.tips-page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: #fff;
  margin-bottom: 16px;
  margin-top: 16px;
}

/* ─── HERO SEARCH ─── */
.hero-search {
  margin-top: 32px;
  display: flex;
  gap: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s;
}
.hero-search:focus-within { border-color: rgba(110,231,183,0.4); }
.hero-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 14px 18px;
}
.hero-search-input::placeholder { color: var(--fg-muted); }
.hero-search-btn {
  flex-shrink: 0;
  border-radius: 0;
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

/* ─── TIPS CONTENT WRAPPER ─── */
.tips-content { padding: 60px 24px 80px; }
.tips-content-inner { max-width: 1100px; margin: 0 auto; }

/* ─── SECTION TITLE ─── */
.section-title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: #fff;
  margin-bottom: 32px;
}

/* ─── CATEGORIES GRID ─── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 64px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.category-card:hover { border-color: rgba(110,231,183,0.3); transform: translateY(-2px); }
.category-icon { font-size: 2rem; flex-shrink: 0; }
.category-info { flex: 1; min-width: 0; }
.category-info h3 { font-size: 1rem; color: #fff; margin-bottom: 4px; }
.category-info p { font-size: 0.82rem; color: var(--fg-muted); line-height: 1.45; }
.category-count {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── TIPS GRID ─── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.tip-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.tip-card:hover { border-color: rgba(110,231,183,0.25); transform: translateY(-2px); }
.tip-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tip-category-badge {
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 500;
}
.tip-difficulty {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 100px;
}
.tip-difficulty--beginner { background: rgba(110,231,183,0.1); color: #6ee7b7; }
.tip-difficulty--intermediate { background: rgba(250,204,21,0.1); color: #fbbf24; }
.tip-difficulty--advanced { background: rgba(239,68,68,0.1); color: #f87171; }
.tip-card-title { font-size: 1.05rem; color: #fff; margin-bottom: 8px; line-height: 1.35; }
.tip-card-summary { font-size: 0.88rem; color: var(--fg-muted); line-height: 1.6; flex: 1; }
.tip-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  gap: 8px;
  flex-wrap: wrap;
}
.tip-time { font-size: 0.78rem; color: var(--fg-muted); }
.tip-cta { font-size: 0.82rem; color: var(--accent); font-weight: 500; margin-left: auto; }
.tip-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tip-tool-badge {
  font-size: 0.72rem;
  color: var(--fg-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ─── CATEGORY PAGE ─── */
.category-page-hero {
  padding: 60px 24px 40px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.category-page-hero-inner { max-width: 1100px; margin: 0 auto; }
.category-page-icon { font-size: 2.5rem; margin-bottom: 12px; }

.crumb {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 12px;
}
.crumb a { color: var(--fg-muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

.category-sidebar-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
.category-sidebar { position: sticky; top: 80px; }
.sidebar-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.sidebar-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}
.sidebar-cat-link:hover { background: rgba(255,255,255,0.05); color: var(--fg); }
.sidebar-cat-link.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.sidebar-cat-count {
  font-size: 0.72rem;
  color: var(--fg-muted);
  background: var(--bg-card);
  padding: 2px 7px;
  border-radius: 100px;
}

/* ─── TIP DETAIL PAGE ─── */
.tip-detail { padding: 40px 24px 80px; }
.tip-detail-inner { max-width: 780px; margin: 0 auto; }
.tip-detail-header { margin-bottom: 48px; }
.tip-detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tip-detail-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: #fff; margin-bottom: 16px; }
.tip-detail-summary { font-size: 1.1rem; color: var(--fg-muted); line-height: 1.7; }
.tip-tools-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.tools-label { font-size: 0.82rem; color: var(--fg-muted); }

.tip-detail-body { margin-bottom: 40px; }
.steps-heading { font-size: 1.3rem; color: #fff; margin-bottom: 28px; }

.steps-list { list-style: none; display: flex; flex-direction: column; gap: 24px; }
.step-item {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.step-number {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: var(--accent-dim);
  border: 1px solid rgba(110,231,183,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
}
.step-content { flex: 1; min-width: 0; }
.step-title { font-size: 1.05rem; color: #fff; margin-bottom: 8px; }
.step-body { font-size: 0.93rem; color: var(--fg-muted); line-height: 1.7; }

.step-prompt {
  margin-top: 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(110,231,183,0.15);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.prompt-label {
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid rgba(110,231,183,0.1);
}
.prompt-code {
  padding: 16px;
  font-size: 0.875rem;
  color: #c8fde9;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'Fira Code', 'Consolas', monospace;
  margin: 0;
}
.step-pro-tip {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(110,231,183,0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.tip-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tag-pill {
  display: inline-block;
  padding: 5px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.tag-pill:hover { border-color: rgba(110,231,183,0.3); color: var(--accent); }

.tip-detail-footer { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─── SEARCH PAGE ─── */
.search-page { padding: 40px 24px 80px; }
.search-page-inner { max-width: 1000px; margin: 0 auto; }
.search-header { margin-bottom: 40px; }
.search-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: #fff; margin-bottom: 8px; }
.search-meta { font-size: 0.9rem; color: var(--fg-muted); }

.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-icon { font-size: 3rem; margin-bottom: 20px; }
.empty-state h3 { font-size: 1.3rem; color: #fff; margin-bottom: 10px; }
.empty-state p { color: var(--fg-muted); margin-bottom: 28px; }
.empty-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 0.875rem;
  transition: border-color 0.15s, color 0.15s;
}
.category-pill:hover { border-color: rgba(110,231,183,0.3); color: var(--accent); }

/* ─── APP RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-search-input { width: 150px; }
  .category-sidebar-layout { grid-template-columns: 1fr; }
  .category-sidebar { display: none; }
  .tips-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
  .step-item { flex-direction: column; gap: 12px; }
  .tips-page-hero { padding: 60px 20px 40px; }
}