:root {
  --orange: #fe6a00;
  --magenta: #eb3593;
  --purple: #811cbd;
  --navy: #1e1f4d;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, #fe6a00 0%, #eb3593 50%, #811cbd 100%);
  --shadow: 0 10px 30px rgba(30, 31, 77, 0.08);
  --radius: 16px;
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--slate-900);
  background: #fafbfc;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--magenta); }
img { max-width: 100%; height: auto; }
.container { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.brand { display: flex; align-items: center; gap: 0.75rem; color: inherit; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand-name {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
}
.brand-name span {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.header-nav { display: flex; gap: 1.25rem; align-items: center; font-weight: 500; font-size: 0.95rem; }
.header-nav a { color: var(--slate-700); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.65rem 1.15rem; border-radius: 999px; font-weight: 600;
  border: none; cursor: pointer; font-size: 0.95rem;
}
.btn-gradient {
  background: var(--gradient); color: white !important;
  box-shadow: 0 8px 20px rgba(235, 53, 147, 0.25);
}
.btn-gradient:hover { filter: brightness(1.05); color: white !important; }

/* Hero */
.hero {
  background: radial-gradient(1200px 500px at 20% -10%, rgba(254,106,0,0.15), transparent),
              radial-gradient(900px 400px at 90% 0%, rgba(129,28,189,0.12), transparent),
              var(--navy);
  color: white;
  padding: 3.5rem 0 3rem;
}
.hero h1 {
  margin: 0 0 0.5rem; font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em; font-weight: 800;
}
.hero p { margin: 0 0 1.5rem; color: rgba(255,255,255,0.8); font-size: 1.05rem; max-width: 560px; }
.search-wrap { position: relative; max-width: 640px; }
.search-wrap input {
  width: 100%; padding: 1rem 1.15rem 1rem 3rem;
  border-radius: 14px; border: none; font-size: 1rem;
  box-shadow: var(--shadow); font-family: inherit;
}
.search-wrap .icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  opacity: 0.45; font-size: 1.1rem;
}
.search-results {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: white; color: var(--slate-900); border-radius: 14px;
  box-shadow: var(--shadow); max-height: 360px; overflow: auto; z-index: 20;
}
.search-results.open { display: block; }
.search-results a {
  display: block; padding: 0.85rem 1rem; border-bottom: 1px solid var(--slate-100);
  color: inherit;
}
.search-results a:hover { background: var(--slate-100); }
.search-results .meta { font-size: 0.8rem; color: var(--slate-500); }
.search-results .empty { padding: 1rem; color: var(--slate-500); }

/* Cards */
.section { padding: 2.5rem 0; }
.section-title {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 1.25rem;
}
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: white; border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 1.35rem; box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .icon-badge {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 0.9rem;
  background: linear-gradient(135deg, rgba(254,106,0,.12), rgba(129,28,189,.12));
  font-size: 1.25rem;
}
.card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--slate-500); font-size: 0.92rem; }
.card .count {
  margin-top: 0.9rem; font-size: 0.82rem; font-weight: 600;
  color: var(--purple);
}

.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { border-bottom: 1px solid var(--slate-100); }
.article-list a {
  display: block; padding: 1rem 0.25rem; color: var(--slate-900); font-weight: 600;
}
.article-list a:hover { color: var(--magenta); }
.article-list .excerpt {
  display: block; font-weight: 400; color: var(--slate-500);
  font-size: 0.9rem; margin-top: 0.25rem;
}

/* Article page */
.breadcrumbs {
  font-size: 0.88rem; color: var(--slate-500); margin: 1.5rem 0 1rem;
}
.breadcrumbs a { color: var(--slate-500); }
.breadcrumbs a:hover { color: var(--purple); }
.article-layout {
  display: grid; grid-template-columns: 1fr; gap: 2rem; padding-bottom: 3rem;
}
@media (min-width: 900px) {
  .article-layout { grid-template-columns: 240px 1fr; }
}
.sidebar-nav {
  background: white; border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 1rem; height: fit-content; position: sticky; top: 80px;
}
.sidebar-nav h4 {
  margin: 0 0 0.75rem; font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--slate-500);
}
.sidebar-nav a {
  display: block; padding: 0.45rem 0.5rem; border-radius: 8px;
  color: var(--slate-700); font-size: 0.9rem; margin-bottom: 0.15rem;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--slate-100); color: var(--navy);
}
.article-panel {
  background: white; border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: 0 4px 16px rgba(15,23,42,.03);
}
.article-panel h1 {
  margin: 0 0 0.75rem; font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em; line-height: 1.25;
}
.article-meta { color: var(--slate-500); font-size: 0.9rem; margin-bottom: 1.5rem; }
.article-body { font-size: 1.02rem; color: #1f2937; }
.article-body p { margin: 0 0 1rem; }
.article-body ul, .article-body ol { margin: 0 0 1rem; padding-left: 1.35rem; }
.article-body a { text-decoration: underline; }
.article-body img { border-radius: 10px; margin: 0.5rem 0; }

.page-hero-sm {
  background: var(--navy); color: white; padding: 2rem 0 1.5rem;
}
.page-hero-sm h1 { margin: 0; font-size: 1.75rem; letter-spacing: -0.02em; }
.page-hero-sm p { margin: 0.4rem 0 0; color: rgba(255,255,255,.75); }

.site-footer {
  margin-top: auto; background: var(--navy); color: rgba(255,255,255,.75);
  padding: 2rem 0; font-size: 0.9rem;
}
.site-footer a { color: white; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }

.badge {
  display: inline-block; background: rgba(129,28,189,.1); color: var(--purple);
  font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px;
}

/* Help screenshots / placeholders */
.help-screenshot {
  margin: 1rem 0 1.25rem;
  padding: 0;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  overflow: hidden;
}
.help-screenshot img { display: block; width: 100%; margin: 0; border-radius: 0; }
.help-screenshot figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--slate-500);
  line-height: 1.45;
}
.img-placeholder-note {
  padding: 0.85rem 1rem;
  background: var(--slate-100);
  border-left: 3px solid var(--purple);
  border-radius: 8px;
  color: var(--slate-700);
  font-size: 0.95rem;
}

.brand .brand-home-label {
  display: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .header-nav .hide-sm { display: none; }
  .brand .brand-home-label { display: block; }
  .header-nav .mobile-home {
    display: inline-flex;
    color: var(--slate-700);
    font-weight: 600;
    font-size: 0.9rem;
  }
}
@media (min-width: 641px) {
  .header-nav .mobile-home { display: none; }
}
