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

:root {
  --bg:        #f8fafc;
  --surface:   #ffffff;
  --border:    #e2e8f0;
  --border-2:  #f1f5f9;
  --text-1:    #0f172a;
  --text-2:    #475569;
  --text-3:    #94a3b8;
  --navy:      #0f172a;
  --accent:    #6366f1;
  --radius:    12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Nav ──────────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  white-space: nowrap;
}
.logo-icon { font-size: 20px; }

/* Desktop: no inline search — hidden */
.nav-search { display: none; }

/* Mobile search icon button (hidden on desktop, shown on mobile) */
.nav-search-icon {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
}
.nav-search-icon:hover { color: #fff; background: rgba(255,255,255,.08); }

/* Mobile search bar — slides down from header */
.mobile-search-bar {
  display: none;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px 16px;
  background: var(--navy);
}
.mobile-search-bar.open { display: block; }
.mobile-search-form {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.07);
}
.mobile-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 14px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
}
.mobile-search-input::placeholder { color: rgba(255,255,255,.35); }
.mobile-search-submit {
  background: rgba(255,255,255,.1);
  border: none;
  padding: 0 14px;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.mobile-search-submit:hover { color: #fff; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 1;
  min-width: 0;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  padding: 6px 9px;
  border-radius: 6px;
}
.nav-link.active,
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }

/* ── Hamburger button ──────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
}

/* ── Mobile slide-in menu ─────────────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 280px;
  background: #0f172a;
  border-left: 1px solid #1e293b;
  z-index: 500;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 499;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: all; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #1e293b;
}
.mobile-menu-logo { font-size: 15px; font-weight: 800; color: #fff; }
.mobile-menu-close {
  background: rgba(255,255,255,.08);
  border: none; border-radius: 6px;
  color: rgba(255,255,255,.6);
  font-size: 14px;
  width: 32px; height: 32px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.mobile-menu-nav { display: flex; flex-direction: column; padding: 12px 0; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  border-left: 3px solid transparent;
}
.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.05);
  border-left-color: #6366f1;
}
.mobile-nav-count {
  margin-left: auto;
  font-size: 11px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.4);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.mobile-nav-submit {
  margin-top: 8px;
  border-top: 1px solid #1e293b;
  padding-top: 16px;
  color: #a5b4fc;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding: 80px 24px 72px;
  text-align: center;
}

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

.hero-eyebrow { margin-bottom: 18px; }
.hero-badge {
  display: inline-block;
  background: rgba(99,102,241,.2);
  border: 1px solid rgba(99,102,241,.4);
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 5px 14px;
  border-radius: 20px;
}

.hero-title {
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  color: #fff;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,.55);
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-search {
  display: flex;
  max-width: 560px;
  margin: 0 auto 28px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(99,102,241,.4);
}
.hero-search-input {
  flex: 1;
  border: none;
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  color: var(--text-1);
}
.hero-search-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,.4);
  font-weight: 500;
}

.hero-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .1; }
.s1 { width: 500px; height: 500px; background: #6366f1; top: -200px; left: -100px; }
.s2 { width: 400px; height: 400px; background: #8b5cf6; bottom: -150px; right: -100px; }
.s3 { width: 300px; height: 300px; background: #3b82f6; top: 50%; left: 50%; transform: translate(-50%,-50%); }

/* ── Category Hero (filtered pages) ────────────────────────────────────────── */
.cat-hero-section {
  background: var(--navy);
  padding: 28px 0 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
/* Text on dark navy background must be light */
.cat-hero-section .browse-title { color: #fff; }
.cat-hero-section .browse-sub   { color: rgba(255,255,255,.55); }

.cat-hero-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.cat-hero-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

/* ── Breadcrumb ─────────────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.5); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span[aria-current] { color: rgba(255,255,255,.8); }

/* ── Category Grid ─────────────────────────────────────────────────────────── */
.cat-section {
  padding: 52px 0 0;
}

.section-head {
  text-align: center;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text-1);
  margin-bottom: 6px;
}
.section-head p { font-size: 15px; color: var(--text-2); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (min-width: 540px)  { .cat-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 900px)  { .cat-grid { grid-template-columns: repeat(9, 1fr); } }

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  cursor: pointer;
  position: relative;
}
.cat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, #6366f1);
  border-radius: 0 0 var(--radius) var(--radius);
}

.cat-card-icon { font-size: 24px; line-height: 1; }
.cat-card-name { font-size: 11px; font-weight: 700; color: var(--text-1); }
.cat-card-count { font-size: 11px; color: var(--text-3); }

/* ── Browse Section ────────────────────────────────────────────────────────── */
.browse-section { padding: 36px 0 56px; }

.browse-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.browse-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text-1);
}
.browse-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

/* ── Filter pills ──────────────────────────────────────────────────────────── */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}
.pill.active {
  background: var(--pill-color, var(--accent));
  border-color: var(--pill-color, var(--accent));
  color: #fff;
}
.pill-count {
  background: rgba(0,0,0,.1);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
.pill.active .pill-count { background: rgba(255,255,255,.2); }

/* ── Theme Grid ────────────────────────────────────────────────────────────── */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.theme-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-thumb-link { display: block; }
.card-thumb {
  position: relative;
  overflow: hidden;
  background: var(--border-2);
  aspect-ratio: 16/10;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid;
}

.card-downloads {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}

.card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 7px;
  margin-top: 2px;
}

.btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  justify-content: center;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* ── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 44px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
}
.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.page-ellipsis {
  font-size: 14px;
  color: var(--text-3);
  padding: 0 4px;
}

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 52px; margin-bottom: 16px; }
.empty-state h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 15px; color: var(--text-2); margin-bottom: 24px; }

/* ── Related Category Links ─────────────────────────────────────────────────── */
.related-cats-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
}

.related-cats-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 20px;
}

.related-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.related-cat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cat-color, var(--accent));
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rcc-icon { font-size: 18px; }
.rcc-name { font-size: 13px; font-weight: 600; color: var(--text-1); flex: 1; }
.rcc-count { font-size: 11px; color: var(--text-3); }

/* ── Stats Band ────────────────────────────────────────────────────────────── */
.stats-band {
  background: var(--navy);
  padding: 44px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 800px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  padding: 0 20px;
  border-right: 1px solid rgba(255,255,255,.08);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.4);
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 52px 24px 0;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,.4);
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: 16px;
}

.footer-cats-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.footer-cat-pill {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.45);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
}

.footer-col h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { padding: 4px 0; }
.footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,.4);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.25);
  max-width: 1240px;
  margin: 0 auto;
}
.footer-bottom a { color: rgba(255,255,255,.35); }

/* ── Preview Page ──────────────────────────────────────────────────────────── */
.preview-topbar {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.preview-topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.5);
}
.topbar-back:hover { color: #fff; }

.topbar-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions { display: flex; gap: 8px; }

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.topbar-btn.ghost {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.12);
}
.topbar-btn.primary { color: #fff; }

/* Breadcrumb on preview page */
.preview-breadcrumb {
  background: rgba(15,23,42,.96);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 8px 0;
}
.preview-breadcrumb nav {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.preview-breadcrumb a { color: rgba(255,255,255,.5); }
.preview-breadcrumb a:hover { color: #fff; }

/* Browser chrome */
.preview-wrap {
  max-width: 1240px;
  margin: 24px auto;
  padding: 0 24px;
}

.browser-chrome {
  background: #1e293b;
  border: 1px solid #334155;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chrome-dots { display: flex; gap: 6px; }
.chrome-dot { width: 12px; height: 12px; border-radius: 50%; }
.chrome-dot.red    { background: #ef4444; }
.chrome-dot.yellow { background: #f59e0b; }
.chrome-dot.green  { background: #22c55e; }

.chrome-url {
  flex: 1;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: rgba(255,255,255,.35);
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chrome-dl {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.iframe-box {
  border: 1px solid #334155;
  border-top: none;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: #fff;
}

.iframe-box iframe {
  width: 100%;
  height: 68vh;
  min-height: 500px;
  border: none;
  display: block;
}

.no-preview {
  height: 440px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.no-preview-name { font-size: 38px; font-weight: 900; color: #fff; }
.no-preview-sub  { font-size: 14px; color: rgba(255,255,255,.35); }

/* Details grid */
.details-section {
  max-width: 1240px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.detail-block {}

.detail-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  margin-bottom: 10px;
}
.detail-eyebrow a { color: var(--accent); }

.detail-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text-1);
  margin-bottom: 10px;
}

.detail-cat-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.detail-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 16px;
}

.tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag-chip {
  background: var(--border-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.tag-chip:hover { background: var(--border); }

.detail-cta-row { display: flex; gap: 10px; margin-top: 6px; }
.detail-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.detail-cta-ghost {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
}

/* Meta table */
.meta-table {
  width: 100%;
  border-collapse: collapse;
}
.meta-table tr { border-bottom: 1px solid var(--border-2); }
.meta-table tr:last-child { border-bottom: none; }
.meta-table td, .meta-table th {
  padding: 9px 4px;
  font-size: 13px;
  text-align: left;
}
.meta-table th {
  color: var(--text-3);
  font-weight: 500;
  width: 50%;
}
.meta-table td { color: var(--text-1); font-weight: 600; text-align: right; }
.meta-table a { color: var(--accent); }

/* Download panel */
.dl-panel {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  align-self: start;
}

.dl-panel-price {
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}
.dl-panel-sub { font-size: 12px; color: rgba(255,255,255,.35); margin-top: -4px; }

.dl-main-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.dl-browse-btn {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.dl-features {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.dl-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

.dl-downloads-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.3);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.dl-downloads-count strong { color: rgba(255,255,255,.55); }

/* Related themes */
.related-section {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 40px 0 52px;
}

.related-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 6px;
}
.related-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.related-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.related-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.related-card-body {
  padding: 10px 12px 12px;
}
.related-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}
.related-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-3);
}
.related-dl-btn { font-size: 11px; font-weight: 700; }

.related-footer { text-align: center; }
.related-all-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  padding: 8px 0;
}

/* Other categories (internal linking on preview page) */
.other-cats-section {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 36px 0 44px;
}
.other-cats-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 16px;
}
.other-cats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.other-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cc, var(--accent));
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

/* Switch to hamburger below 1100px — nav-links become too crowded */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-search-icon { display: flex; }
  .mobile-search-bar { display: none; } /* shown via .open class */
}

@media (max-width: 1024px) {
  .details-grid { grid-template-columns: 1fr 1fr; }
  .dl-panel { grid-column: 1 / -1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* Hero */
  .hero { padding: 52px 16px 48px; }
  .hero-title { font-size: 26px; letter-spacing: -1px; }
  .hero-sub { font-size: 15px; }
  .hero-search { flex-direction: column; border-radius: 10px; overflow: visible; border: none; gap: 8px; }
  .hero-search-input { border-radius: 10px; border: 2px solid rgba(99,102,241,.4); padding: 13px 16px; }
  .hero-search-btn { border-radius: 10px; padding: 13px; font-size: 14px; text-align: center; }
  .hero-trust { gap: 10px; font-size: 12px; }

  /* Nav */
  .nav-search { max-width: none; flex: 1; }
  .nav-inner { gap: 10px; }

  /* Category grid */
  .cat-grid { grid-template-columns: repeat(3, 1fr); }

  /* Browse */
  .browse-section { padding: 24px 0 40px; }
  .filter-pills { gap: 4px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
  .filter-pills::-webkit-scrollbar { display: none; }
  .pill { flex-shrink: 0; }

  /* Theme grid */
  .theme-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Details */
  .details-grid { grid-template-columns: 1fr; }
  .details-section { padding: 0 16px; }
  .detail-cta-row { flex-direction: column; }
  .detail-cta-btn, .detail-cta-ghost { text-align: center; justify-content: center; }

  /* Preview */
  .preview-topbar-inner { padding: 0 12px; }
  .topbar-name { display: none; }
  .preview-wrap { padding: 0 12px; margin: 12px auto; }
  .iframe-box iframe { height: 55vw; min-height: 260px; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 30px; }

  /* Related */
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .site-footer { padding: 40px 16px 0; }

  /* Submit */
  .submit-form-wrap { padding: 20px 14px; }
  .form-row { grid-template-columns: 1fr; }

  /* Admin */
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-wrap { padding: 20px 12px 60px; }
}

@media (max-width: 480px) {
  /* Theme grid single col on very small screens */
  .theme-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .related-grid { grid-template-columns: 1fr; }
  .cat-hero-section { padding: 20px 0 18px; }
  .browse-title { font-size: 20px; }

  /* Preview topbar buttons */
  .topbar-btn.ghost { display: none; }
  .topbar-actions { gap: 6px; }

  /* Details */
  .detail-name { font-size: 22px; }
  .dl-panel { padding: 18px 16px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; }
  .footer-col:last-child { display: none; }

  /* Stats band */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-item { padding: 16px 10px; }
  .stat-num { font-size: 26px; }

  /* Admin */
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SUBMIT PAGE
══════════════════════════════════════════════════════════════════════════════ */

.submit-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 56px 0 48px;
  border-bottom: 1px solid #334155;
}
.submit-h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin-top: 16px;
  letter-spacing: -.02em;
}
.submit-sub {
  color: #94a3b8;
  margin-top: 10px;
  max-width: 600px;
  line-height: 1.6;
}

.submit-section { padding: 48px 0 80px; }
.submit-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* Form */
.submit-form-wrap { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 36px; }
.submit-errors {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px;
  padding: 16px 20px; color: #dc2626; margin-bottom: 24px; font-size: .9rem;
}
.submit-errors ul { margin: 8px 0 0 18px; }
.submit-errors li { margin-top: 4px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .875rem; font-weight: 600; color: var(--text-1); margin-bottom: 6px; }
.req { color: #dc2626; }
.form-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: .9375rem; font-family: inherit;
  background: #fff; color: var(--text-1); outline: none;
  transition: border-color .15s;
}
.form-input:focus { border-color: #3b82f6; }
.form-input.error { border-color: #dc2626; }
.form-select { 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='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer; }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: .8rem; color: var(--text-2); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* File drop */
.file-drop {
  border: 2px dashed var(--border); border-radius: 10px; padding: 32px 20px;
  text-align: center; background: #f8fafc; cursor: pointer; position: relative;
  transition: border-color .15s, background .15s;
}
.file-drop.drag-over { border-color: #3b82f6; background: #eff6ff; }
.file-drop p { color: var(--text-2); font-size: .9rem; margin-top: 8px; }
.file-drop .file-hint { font-size: .8rem; color: #94a3b8; margin-top: 4px; }
.file-browse-link { color: #3b82f6; cursor: pointer; text-decoration: underline; }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-selected { color: #16a34a; font-weight: 600; font-size: .9rem; margin-top: 10px; }

/* Checklist */
.submit-checklist { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin: 24px 0; }
.checklist-title { font-weight: 600; font-size: .875rem; margin-bottom: 12px; }
.check-item { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--text-1); cursor: pointer; padding: 4px 0; }
.check-item input { width: 16px; height: 16px; flex-shrink: 0; }

/* Submit button */
.submit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #3b82f6; color: #fff; border: none; border-radius: 10px;
  padding: 14px 28px; font-size: 1rem; font-weight: 700; cursor: pointer;
  font-family: inherit;
}

/* Sidebar */
.submit-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 24px;
}
.sidebar-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--text-1); }
.sidebar-steps { padding-left: 18px; }
.sidebar-steps li { margin-bottom: 8px; font-size: .875rem; color: var(--text-2); line-height: 1.5; }
.sidebar-list { list-style: none; }
.sidebar-list li { padding: 5px 0; font-size: .875rem; color: var(--text-2); border-bottom: 1px solid var(--border-2); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-card-note { background: #eff6ff; border-color: #bfdbfe; }
.sidebar-card-note strong { color: #1d4ed8; }
.sidebar-card-note p { margin-top: 6px; font-size: .875rem; color: #3b82f6; }

/* Thanks page */
.thanks-section { padding: 100px 0; }
.thanks-inner { max-width: 520px; text-align: center; }
.thanks-icon { font-size: 64px; margin-bottom: 24px; }
.thanks-h1 { font-size: 2rem; font-weight: 800; color: var(--text-1); margin-bottom: 16px; }
.thanks-sub { color: var(--text-2); line-height: 1.7; margin-bottom: 36px; }
.thanks-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.thanks-btn { padding: 12px 28px; border-radius: 10px; font-weight: 700; font-size: .9375rem; text-decoration: none; }
.thanks-btn.primary { background: #3b82f6; color: #fff; }
.thanks-btn.ghost { background: #fff; color: var(--text-1); border: 1.5px solid var(--border); }

/* ══════════════════════════════════════════════════════════════════════════════
   ADMIN
══════════════════════════════════════════════════════════════════════════════ */

.admin-body { background: #f1f5f9; font-family: Inter, sans-serif; }

/* Login */
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #0f172a; }
.admin-login-card { background: #1e293b; border: 1px solid #334155; border-radius: 16px; padding: 40px; width: 100%; max-width: 380px; }
.admin-login-logo { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 24px; }
.admin-login-h1 { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 24px; }
.admin-login-form label { display: block; font-size: .875rem; font-weight: 600; color: #94a3b8; margin-bottom: 6px; }
.admin-login-form .form-input { background: #0f172a; border-color: #334155; color: #fff; }
.admin-login-form .form-input:focus { border-color: #3b82f6; }
.admin-error { background: #450a0a; border: 1px solid #7f1d1d; color: #fca5a5; border-radius: 8px; padding: 10px 14px; font-size: .875rem; margin-bottom: 16px; }

/* Header */
.admin-header { background: #0f172a; border-bottom: 1px solid #1e293b; padding: 0 24px; position: sticky; top: 0; z-index: 100; }
.admin-header-inner { max-width: 1400px; margin: 0 auto; height: 56px; display: flex; align-items: center; gap: 24px; }
.admin-site-link { color: #94a3b8; text-decoration: none; font-size: .875rem; }
.admin-title { font-size: 1rem; font-weight: 700; color: #fff; flex: 1; }
.admin-logout { color: #94a3b8; text-decoration: none; font-size: .875rem; }
.admin-logout:hover { color: #fff; }

/* Wrap */
.admin-wrap { max-width: 1400px; margin: 0 auto; padding: 32px 24px 80px; }

/* Stats */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 36px; }
.admin-stat {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 20px 24px; border-left: 4px solid #3b82f6;
}
.admin-stat.green { border-left-color: #16a34a; }
.admin-stat.gray  { border-left-color: #94a3b8; }
.admin-stat.orange { border-left-color: #d97706; }
.admin-stat-num { font-size: 2rem; font-weight: 800; color: #0f172a; }
.admin-stat-label { font-size: .8125rem; color: #64748b; margin-top: 4px; }

/* Section */
.admin-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; margin-bottom: 32px; overflow: hidden; }
.admin-section-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #f1f5f9; }
.admin-section-head h2 { font-size: 1.1rem; font-weight: 700; color: #0f172a; flex: 1; }
.admin-empty { padding: 40px 24px; color: #94a3b8; text-align: center; }

/* Filter buttons */
.admin-filter-row { display: flex; gap: 4px; }
.af-btn { padding: 5px 14px; border-radius: 8px; border: 1.5px solid #e2e8f0; background: #fff; color: #64748b; font-size: .8125rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.af-btn.active { background: #0f172a; color: #fff; border-color: #0f172a; }

/* Table */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-table th { background: #f8fafc; padding: 10px 16px; text-align: left; font-size: .8rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e2e8f0; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8fafc; }
.admin-theme-name { font-weight: 600; color: #0f172a; text-decoration: none; }
.admin-theme-name:hover { color: #3b82f6; }
.admin-slug { display: block; font-size: .75rem; color: #94a3b8; margin-top: 2px; }
.admin-num { font-variant-numeric: tabular-nums; color: #475569; }
.admin-date { font-size: .8125rem; color: #64748b; white-space: nowrap; }
.admin-email-link { color: #3b82f6; text-decoration: none; font-size: .8125rem; }
.admin-zip { font-size: .8125rem; color: #475569; }

/* Badges */
.admin-badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.admin-badge.green  { background: #dcfce7; color: #16a34a; }
.admin-badge.gray   { background: #f1f5f9; color: #64748b; }
.admin-badge.red    { background: #fee2e2; color: #dc2626; }
.admin-badge.orange { background: #fef3c7; color: #d97706; }

/* Cat badge in admin */
.admin-cat-badge { display: inline-block; background: #f1f5f9; color: #475569; border-radius: 6px; padding: 2px 8px; font-size: .75rem; font-weight: 600; }

/* Action buttons */
.admin-actions { display: flex; gap: 6px; }
.admin-btn {
  display: inline-block; padding: 5px 12px; border-radius: 7px;
  font-size: .8125rem; font-weight: 600; border: none; cursor: pointer;
  font-family: inherit; text-decoration: none;
}
.admin-btn.ghost  { background: #f1f5f9; color: #475569; }
.admin-btn.green  { background: #dcfce7; color: #15803d; }
.admin-btn.red    { background: #fee2e2; color: #dc2626; }
.admin-btn:disabled { opacity: .45; cursor: default; }

/* ── Responsive additions ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .submit-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .submit-form-wrap { padding: 24px 16px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-table th, .admin-table td { padding: 10px 10px; }
}

/* ── About Page ────────────────────────────────────────────────────────────── */
.about-section { padding: 64px 0; }
.about-container { max-width: 860px; }
.about-block { margin-bottom: 48px; }
.about-block h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 12px; }
.about-block p { color: var(--text-2); line-height: 1.75; margin-bottom: 12px; }
.about-block a { color: var(--accent); }
.about-list { list-style: none; color: var(--text-2); line-height: 2; }
.about-cta-btn {
  display: inline-block; margin-top: 8px; padding: 10px 22px;
  background: var(--accent); color: #fff; border-radius: 8px;
  font-weight: 600; font-size: .9375rem;
}

/* ── Blog List ─────────────────────────────────────────────────────────────── */
.blog-list-section { padding: 64px 0; }
.blog-container { max-width: 900px; }
.blog-grid { display: grid; gap: 40px; }
.blog-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.blog-card-thumb-link { display: block; }
.blog-card-thumb { width: 100%; height: 220px; object-fit: cover; }
.blog-card-body { padding: 24px; }
.blog-card-meta { font-size: .8125rem; color: var(--text-3); margin-bottom: 8px; }
.blog-card-author { margin-left: 8px; }
.blog-card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.blog-card-title a:hover { color: var(--accent); }
.blog-card-excerpt { color: var(--text-2); font-size: .9375rem; line-height: 1.65; margin-bottom: 16px; }
.blog-read-more { color: var(--accent); font-weight: 600; font-size: .9rem; }

/* ── Blog Post ─────────────────────────────────────────────────────────────── */
.blog-post-section { padding: 56px 0; }
.blog-post-layout { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; }
.blog-post-cover { width: 100%; border-radius: var(--radius); margin-bottom: 32px; }
.blog-post-content.prose { color: var(--text-1); line-height: 1.8; font-size: 1rem; }
.prose h1,.prose h2,.prose h3,.prose h4 { margin: 1.5em 0 .6em; font-weight: 700; }
.prose h1 { font-size: 1.75rem; }
.prose h2 { font-size: 1.375rem; }
.prose h3 { font-size: 1.125rem; }
.prose p  { margin-bottom: 1.25em; }
.prose ul,.prose ol { margin: 0 0 1.25em 1.5em; }
.prose li { margin-bottom: .4em; }
.prose a  { color: var(--accent); text-decoration: underline; }
.prose pre { background: #0f172a; color: #e2e8f0; padding: 20px; border-radius: 8px; overflow-x: auto; margin-bottom: 1.25em; font-size: .875rem; }
.prose code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .875em; }
.prose pre code { background: none; padding: 0; font-size: 1em; }
.prose blockquote { border-left: 4px solid var(--accent); padding: 8px 20px; background: #f8fafc; margin: 1.25em 0; color: var(--text-2); }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.25em; }
.prose th,.prose td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.prose th { background: #f8fafc; font-weight: 600; }
.prose img { border-radius: 8px; margin: 1.25em 0; }

/* Sidebar */
.blog-post-sidebar { position: sticky; top: 80px; }
.sidebar-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.sidebar-widget h3 { font-size: .9375rem; font-weight: 700; margin-bottom: 14px; }
.sidebar-cat-link { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border-2); font-size: .875rem; color: var(--text-2); }
.sidebar-cat-link:last-child { border-bottom: none; }
.sidebar-cat-link:hover { color: var(--accent); }
.sidebar-cat-count { font-size: .75rem; color: var(--text-3); }
.sidebar-cta-btn { display: block; background: var(--accent); color: #fff; text-align: center; padding: 14px 16px; border-radius: 8px; font-weight: 600; font-size: .9rem; line-height: 1.6; }

/* ── Admin Blog Edit Form ───────────────────────────────────────────────────── */
.blog-edit-form { max-width: 900px; }
.blog-edit-form .form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.blog-edit-form label { font-weight: 600; font-size: .875rem; }
.form-hint { font-size: .8rem; color: #64748b; margin-top: 4px; }
.form-hint em { font-style: normal; color: var(--accent); }
.req { color: #dc2626; }
.blog-content-editor { font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace; font-size: .875rem; line-height: 1.7; resize: vertical; }
.form-actions { display: flex; gap: 12px; margin-top: 28px; }
.admin-flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; font-size: .9rem; }
.admin-flash.success { background: #dcfce7; color: #15803d; }
.admin-flash.error   { background: #fee2e2; color: #dc2626; }
.admin-empty { color: #64748b; padding: 20px 0; font-size: .9375rem; }
.admin-empty a { color: var(--accent); }

@media (max-width: 860px) {
  .blog-post-layout { grid-template-columns: 1fr; }
  .blog-post-sidebar { position: static; }
}

/* ── Blog Category Nav ─────────────────────────────────────────────────────── */
.blog-cat-nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.blog-cat-pills { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; padding-bottom: 10px; }
.blog-cat-pills::-webkit-scrollbar { display: none; }
.blog-cat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; font-size: .8125rem; font-weight: 600; color: var(--text-2); background: var(--bg); border: 1px solid var(--border); white-space: nowrap; }
.blog-cat-pill:hover { color: var(--accent); border-color: var(--accent); }
.blog-cat-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.blog-cat-count { font-size: .7rem; opacity: .75; }
.blog-card-cat { font-size: .75rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; margin-right: 8px; }
.blog-post-cat-label { display: inline-block; background: rgba(99,102,241,.12); color: var(--accent); padding: 2px 10px; border-radius: 99px; font-size: .8125rem; font-weight: 600; }

/* ── Related Posts ─────────────────────────────────────────────────────────── */
.related-posts-section { padding: 56px 0; background: var(--surface); border-top: 1px solid var(--border); }
.related-posts-title { font-size: 1.375rem; font-weight: 800; margin-bottom: 28px; }
.related-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.related-post-card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; }
.related-post-img { display: none; }
.related-post-img-placeholder { display: none; }
.related-post-body { padding: 16px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.related-post-cat { font-size: .75rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.related-post-heading { font-size: 1rem; font-weight: 700; line-height: 1.45; margin-bottom: 8px; color: var(--text); }
.related-post-excerpt { font-size: .875rem; color: var(--text-2); line-height: 1.6; flex: 1; margin-bottom: 14px; }
.related-post-read { font-size: .8125rem; font-weight: 600; color: var(--accent); margin-top: auto; }
@media (max-width: 860px) {
  .related-posts-grid { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Contact Page ──────────────────────────────────────────────────────────── */
.contact-section { padding: 64px 0; }
.contact-container { max-width: 1100px; }
.contact-grid { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: start; }
.contact-form-wrap h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 8px; }
.contact-sub { color: var(--text-2); margin-bottom: 28px; font-size: .9375rem; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.contact-field label { font-size: .875rem; font-weight: 600; }
.contact-info { display: flex; flex-direction: column; gap: 0; }
.contact-info-block { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); margin-bottom: 16px; }
.contact-info-icon { font-size: 24px; margin-bottom: 8px; }
.contact-info-block h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.contact-info-block p { font-size: .875rem; color: var(--text-2); line-height: 1.6; }
.contact-info-note { font-size: .8125rem; color: var(--text-3); margin-top: 4px; }
.contact-cta-link { display: inline-block; margin-top: 8px; font-size: .875rem; font-weight: 600; color: var(--accent); }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr; }
}
