@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&family=DM+Mono:wght@400;500&display=swap');

/* ═══ TOKENS ════════════════════════════════════════════════════════ */
:root {
  /* Backgrounds — green-dark */
  --bg:          #060b06;
  --bg-2:        #0d160d;
  --bg-3:        #131f13;
  --bg-card:     #0f1a0f;
  --bg-elevated: #172417;

  /* Borders */
  --border:       #1f3320;
  --border-2:     #2e5030;
  --border-focus: #4ade80;

  /* Green */
  --green:       #4ade80;
  --green-dim:   #34c265;
  --green-muted: #2a9e52;
  --green-glow:  rgba(74,222,128,0.18);
  --green-soft:  rgba(74,222,128,0.08);

  /* Gold */
  --gold:      #f59e0b;
  --gold-dim:  #d97706;
  --gold-soft: rgba(245,158,11,0.10);

  /* Cyan */
  --cyan:      #06b6d4;
  --cyan-dim:  #0891b2;
  --cyan-soft: rgba(6,182,212,0.08);

  /* Purple */
  --purple:      #a78bfa;
  --purple-soft: rgba(167,139,250,0.08);

  /* Semantic */
  --danger:  #f87171;
  --success: #4ade80;
  --warning: #f59e0b;
  --info:    #06b6d4;
  --star:    #f59e0b;

  /* Text — improved contrast (all pass WCAG AA) */
  --text:     #e2f0e2;
  --text-1:   #e2f0e2;
  --text-2:   #a8c8a8;
  --text-3:   #7a9e7a;
  --text-inv: #060b06;

  /* Typography */
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --mono:  'DM Mono', 'Courier New', monospace;
  --pixel: 'Press Start 2P', cursive;

  /* Layout */
  --radius:    6px;
  --radius-lg: 12px;
  --radius-xl: 18px;

  /* Motion */
  --dur-fast: 0.15s;
  --dur-base: 0.22s;
  --dur-slow: 0.4s;
  --ease:     cubic-bezier(0.22,1,0.36,1);
  --transition: all var(--dur-base) var(--ease);

  /* Layout helpers */
  --header-h:  68px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
}

/* ═══ RESET ═════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; overflow-x: hidden; scroll-behavior: smooth; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--text);
  line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(74,222,128,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,222,128,0.012) 1px, transparent 1px);
  background-size: 32px 32px;
}
img, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: var(--r); }
.pixel { font-family: var(--pixel); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }
.skip-link {
  position: absolute; top: -60px; left: 1rem; background: var(--green); color: var(--bg);
  padding: 10px 20px; font-weight: 700; text-decoration: none; z-index: 9999;
  border-radius: 0 0 var(--r) var(--r); transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ═══ HEADER ════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 200; height: var(--header-h);
  background: rgba(6,11,6,0.94); backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 1rem; }
.logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; flex-shrink: 0; }
.logo-icon-svg { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border-2); }
.logo-text {
  font-family: var(--pixel); font-size: 0.6rem; color: var(--green); letter-spacing: 0.1em;
  text-shadow: 0 0 18px rgba(74,222,128,0.55);
}
.main-nav ul { display: flex; gap: 1.5rem; list-style: none; align-items: center; }
.main-nav a {
  font-size: 0.875rem; font-weight: 500; color: var(--text-2); text-decoration: none;
  transition: color 0.18s; position: relative; padding-bottom: 2px;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--green); border-radius: 1px; transition: width 0.18s;
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--green); }
.nav-cta {
  background: var(--green-soft) !important; border: 1px solid var(--border-2) !important;
  border-radius: 999px !important; padding: 0.38rem 1rem !important;
  color: var(--green) !important; font-size: 0.82rem !important; font-weight: 600 !important;
}
.nav-cta:hover { background: rgba(74,222,128,0.14) !important; }
.nav-cta::after { display: none !important; }
.mobile-menu-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 0.5rem; min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.burger-line { display: block; width: 22px; height: 2px; background: var(--text-2); border-radius: 2px; transition: background 0.18s; }

/* ═══ BREADCRUMB ════════════════════════════════════════════════════ */
.breadcrumb-nav { background: rgba(0,0,0,0.18); padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.breadcrumb-list { list-style: none; display: flex; gap: 0.5rem; font-size: 0.76rem; opacity: 0.55; }
.breadcrumb-list a { text-decoration: none; color: inherit; }
.breadcrumb-list a:hover { color: var(--green); opacity: 1; }

/* ═══ LAYOUT ════════════════════════════════════════════════════════ */
.layout { display: flex; flex: 1; }

/* ═══ SIDEBAR ═══════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--bg-2); border-right: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto; display: flex; flex-direction: column; gap: 1.5rem;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.sidebar-title {
  font-family: var(--pixel); font-size: 0.42rem; color: var(--text-3);
  letter-spacing: 0.22em; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.search-box { position: relative; }
.search-box svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-input {
  width: 100%; padding: 0.62rem 0.75rem 0.62rem 2.2rem;
  background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r); font-family: var(--sans); font-size: 0.85rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
.search-input::placeholder { color: var(--text-3); }

.filter-section-label { font-family: var(--pixel); font-size: 0.42rem; color: var(--text-3); letter-spacing: 0.16em; margin-bottom: 0.6rem; }

.edition-filters { display: flex; flex-direction: column; gap: 0.28rem; }
.edition-btn {
  padding: 0.48rem 0.75rem; background: transparent; border: 1px solid var(--border);
  color: var(--text-2); font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  cursor: pointer; border-radius: var(--r); text-align: left;
  display: flex; align-items: center; gap: 0.55rem;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.edition-btn:hover { border-color: var(--border-2); color: var(--text); background: var(--bg-3); }
.edition-btn.active-all     { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.edition-btn.active-java    { border-color: var(--cyan);  color: var(--cyan);  background: rgba(6,182,212,0.07); }
.edition-btn.active-bedrock { border-color: var(--gold);  color: var(--gold);  background: rgba(245,158,11,0.07); }
.edition-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-all { background: var(--green); } .dot-java { background: var(--cyan); } .dot-bedrock { background: var(--gold); }

/* Tag filters with max-height scroll */
.filter-group { display: flex; flex-direction: column; gap: 0.1rem; max-height: 280px; overflow-y: auto; padding-right: 2px; }
.filter-group::-webkit-scrollbar { width: 3px; }
.filter-group::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.filter-label {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.32rem 0.45rem; cursor: pointer; border-radius: 6px;
  font-size: 0.82rem; color: var(--text-2); transition: background 0.15s, color 0.15s;
}
.filter-label:hover { background: var(--bg-3); color: var(--text); }
.filter-checkbox {
  appearance: none; width: 15px; height: 15px; border: 1px solid var(--border-2);
  background: var(--bg); border-radius: 3px; cursor: pointer; flex-shrink: 0;
  position: relative; transition: background 0.15s, border-color 0.15s;
}
.filter-checkbox:checked { background: var(--green); border-color: var(--green); }
.filter-checkbox:checked::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: var(--bg); font-size: 9px; font-weight: 700; }
.filter-tag-name { flex: 1; }
.filter-count {
  font-size: 0.6rem; color: var(--text-3); background: var(--bg-3);
  border: 1px solid var(--border); padding: 0.05rem 0.32rem; border-radius: 10px;
  min-width: 20px; text-align: center; font-family: var(--mono);
}

.sidebar-footer { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.reset-btn {
  width: 100%; padding: 0.5rem 1rem; background: transparent; border: 1px solid var(--border);
  color: var(--text-3); font-family: var(--sans); font-size: 0.8rem;
  cursor: pointer; border-radius: var(--r);
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.reset-btn:hover { border-color: var(--border-2); color: var(--text-2); background: var(--bg-3); }

/* ═══ MAIN ══════════════════════════════════════════════════════════ */
.main { flex: 1; padding: 0; min-width: 0; display: flex; flex-direction: column; }

/* Page header — hero strip */
.page-header {
  padding: 1.75rem 2rem 1.4rem;
  background: linear-gradient(180deg, rgba(74,222,128,0.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.page-header-left { display: flex; flex-direction: column; gap: 0.3rem; }
.page-title {
  font-family: var(--pixel); font-size: 0.7rem; color: var(--green);
  letter-spacing: 0.08em; line-height: 1.7;
  text-shadow: 0 0 28px rgba(74,222,128,0.35);
}
.page-subtitle { font-size: 0.88rem; color: var(--text-2); }
.page-header-right { flex-shrink: 0; }
.page-count {
  font-size: 0.78rem; color: var(--text-3); font-family: var(--mono);
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 0.35rem 0.75rem; border-radius: 999px;
}
.page-count span { color: var(--green); font-weight: 600; }

/* Sort bar — always visible on scroll */
.sort-bar {
  position: sticky; top: var(--header-h); z-index: 100;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 2rem;
  background: rgba(6,11,6,0.97); backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.45);
}
.sort-label { font-size: 0.8rem; color: var(--text-3); white-space: nowrap; }
.sort-select {
  padding: 0.38rem 0.8rem; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); font-family: var(--sans); font-size: 0.82rem;
  border-radius: var(--r); cursor: pointer; transition: border-color 0.18s;
}
.sort-select:focus { outline: none; border-color: var(--green); }
/* Push filter button to far right */
.filter-sort-btn {
  margin-left: auto;
  padding: 0.38rem 0.9rem !important; background: var(--bg-3) !important;
  border: 1px solid var(--border-2) !important; color: var(--text-2) !important;
  font-size: 0.82rem !important; font-family: var(--sans) !important; font-weight: 500 !important;
  cursor: pointer; border-radius: var(--r) !important; white-space: nowrap;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  display: flex; align-items: center; gap: 0.4rem;
}
.filter-sort-btn:hover { border-color: var(--green) !important; color: var(--green) !important; background: var(--green-soft) !important; }

/* Grid wrapper */
.grid-wrap { padding: 1.5rem 2rem 2.5rem; flex: 1; }

/* ═══ SEED GRID ═════════════════════════════════════════════════════ */
.seed-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

/* ═══ SEED CARD — 16:9 YouTube-style ═══════════════════════════════ */
.seed-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  border: 1px solid var(--border);
  /* Edition accent on left edge */
  border-left: 3px solid rgba(74,222,128,0.3);
  background: linear-gradient(135deg, #081208 0%, #0c1c0c 100%);
  display: block; /* override flex */
}
.seed-card.edition-bedrock { border-left-color: rgba(6,182,212,0.35); }
.seed-card:hover {
  border-color: var(--green-dim); border-left-color: var(--green);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(74,222,128,0.08);
}
.seed-card.edition-bedrock:hover { border-color: var(--cyan); border-left-color: var(--cyan); box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(6,182,212,0.1); }

/* Image — fills entire card */
.card-img-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
}
/* Pixel grid overlay */
.card-img-wrap::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(74,222,128,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,222,128,0.04) 1px, transparent 1px);
  background-size: 14px 14px;
}
/* Bottom gradient — heavier so text overlay is readable */
.card-img-wrap::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(4,8,4,0.55) 58%,
    rgba(4,8,4,0.92) 100%
  );
}
.card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.38s ease; }
.seed-card:hover .card-img { transform: scale(1.04); }

/* No-image placeholder */
.card-no-img {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.55rem;
}
.card-no-img-icon {
  font-size: 2rem; line-height: 1;
  filter: drop-shadow(0 0 12px rgba(74,222,128,0.55));
}
.card-no-img-text { font-family: var(--pixel); font-size: 0.32rem; color: var(--text-3); letter-spacing: 0.12em; }

/* Badges — top-right corner */
.card-badge {
  position: absolute; top: 0.55rem; right: 0.55rem; z-index: 5;
  font-family: var(--pixel); font-size: 0.34rem;
  padding: 0.2rem 0.48rem; border-radius: 5px;
  background: rgba(5,10,5,0.92); border: 1px solid rgba(74,222,128,0.25);
  color: var(--green); letter-spacing: 0.05em;
}
.edition-pill {
  position: absolute; top: 0.55rem; left: 0.7rem; z-index: 5;
  font-family: var(--mono); font-size: 0.62rem; font-weight: 500;
  padding: 0.16rem 0.5rem; border-radius: 5px;
  background: rgba(5,10,5,0.92); border: 1px solid;
}
.ep-java    { color: #4ade80; border-color: rgba(74,222,128,0.35); }
.ep-bedrock { color: #06b6d4; border-color: rgba(6,182,212,0.35); }

/* Card body — overlaid at the bottom of the 16:9 card */
.card-body {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 4;
  padding: 0.65rem 0.8rem 0.7rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}

.card-title {
  font-family: var(--pixel); font-size: 0.4rem; color: #fff; line-height: 1.7;
  transition: color 0.2s; letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  /* clamp to 1 line */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seed-card:hover .card-title { color: var(--green); }
.seed-card.edition-bedrock:hover .card-title { color: var(--cyan); }

/* Seed code row with copy button */
.card-code {
  display: flex; align-items: center; gap: 0; overflow: hidden;
  background: rgba(6,11,6,0.82); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; backdrop-filter: blur(4px);
}
.card-code-label {
  font-size: 0.56rem; color: var(--text-3); flex-shrink: 0;
  padding: 0.22rem 0 0.22rem 0.55rem; white-space: nowrap;
}
.card-code-value {
  font-family: var(--mono); font-size: 0.76rem; color: var(--green);
  flex: 1; padding: 0.22rem 0.45rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.seed-card.edition-bedrock .card-code-value { color: var(--cyan); }
.card-copy-btn {
  flex-shrink: 0; padding: 0.22rem 0.5rem;
  background: transparent; border: none; border-left: 1px solid rgba(255,255,255,0.1);
  color: var(--text-3); cursor: pointer; font-size: 0.72rem;
  transition: color 0.15s, background 0.15s;
  display: flex; align-items: center; gap: 0.25rem;
  font-family: var(--mono); white-space: nowrap;
}
.card-copy-btn:hover { color: var(--green); background: var(--green-soft); }
.card-copy-btn.copied { color: var(--green); }

/* Hide description & tags (no room in 16:9) */
.card-desc { display: none; }
.card-tags {
  display: flex; flex-wrap: nowrap; gap: 0.25rem; overflow: hidden;
  max-height: 1.4rem;
}
.tag {
  font-size: 0.5rem; padding: 0.08rem 0.36rem;
  border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.55);
  border-radius: 4px; text-transform: uppercase; letter-spacing: 0.07em; font-family: var(--mono);
  white-space: nowrap; flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.seed-card:hover .tag { border-color: rgba(74,222,128,0.4); color: var(--green); }
.seed-card.edition-bedrock:hover .tag { border-color: rgba(6,182,212,0.4); color: var(--cyan); }

/* ═══ EMPTY / SKELETON ══════════════════════════════════════════════ */
.state-msg {
  grid-column: 1/-1; padding: 4rem 2rem; text-align: center; color: var(--text-3);
  border: 1px dashed var(--border-2); border-radius: 12px;
}
.state-msg .state-icon { font-size: 2.2rem; display: block; margin-bottom: 1rem; }
.skeleton-card {
  border-radius: 12px; border: 1px solid var(--border); aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(15,26,15,0.8) 50%, var(--bg-card) 75%);
  background-size: 200% 100%; animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ═══ PAGINATION ════════════════════════════════════════════════════ */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 0.5rem;
  padding: 2rem 2rem 2.5rem;
}
.page-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-2);
  padding: 0.5rem 1rem; font-size: 0.82rem; font-family: var(--sans); font-weight: 500;
  cursor: pointer; border-radius: var(--r); min-width: 44px; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.page-btn:hover:not(:disabled) { border-color: var(--green-dim); color: var(--green); background: var(--green-soft); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-info {
  font-size: 0.78rem; color: var(--text-3); font-family: var(--mono);
  padding: 0.5rem 0.9rem; background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--r);
}

/* ═══ SEO CONTENT BELOW GRID ════════════════════════════════════════ */
.seo-block { max-width: 860px; margin: 0 auto; padding: 3rem 1.5rem 2rem; border-top: 1px solid rgba(255,255,255,0.07); }

/* ═══ FOOTER ════════════════════════════════════════════════════════ */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: auto; }
.footer-inner-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 3rem; padding: 3rem 0 2.5rem; }
.footer-brand { display: flex; flex-direction: column; gap: 0.85rem; }
.footer-logo { font-family: var(--pixel); font-size: 0.65rem; color: var(--green); letter-spacing: 0.1em; }
.footer-brand p { font-size: 0.84rem; color: var(--text-3); line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-family: var(--pixel); font-size: 0.44rem; color: var(--text-2); letter-spacing: 0.12em; margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a { font-size: 0.84rem; color: var(--text-3); text-decoration: none; transition: color 0.18s; }
.footer-col a:hover { color: var(--green); }
.footer-bottom-bar { border-top: 1px solid var(--border); padding: 1rem 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-bottom-inner small { font-size: 0.76rem; color: var(--text-3); }


/* ═══ SEO SECTION ═══════════════════════════════════════════════════ */
.seo-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  width: 100%;
}
.seo-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Intro */
.seo-intro { max-width: 780px; }
.seo-heading-lg {
  font-size: 1.15rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.65rem; line-height: 1.4;
}
.seo-lead {
  font-size: 0.88rem; line-height: 1.85; color: var(--text-2);
}

/* Category pills nav */
.seo-cat-nav {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.seo-cat-label {
  font-size: 0.75rem; color: var(--text-3); white-space: nowrap; flex-shrink: 0;
}
.seo-cat-pills {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.seo-pill {
  font-size: 0.78rem; padding: 0.28rem 0.7rem;
  background: var(--green-soft);
  border: 1px solid rgba(74,222,128,0.22);
  border-radius: 5px; color: var(--green);
  text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.seo-pill:hover {
  background: rgba(74,222,128,0.14);
  border-color: rgba(74,222,128,0.45);
}

/* Two-column body */
.seo-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

/* Articles */
.seo-articles { display: flex; flex-direction: column; gap: 0; }
.seo-article {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.seo-article:first-child { padding-top: 0; }
.seo-article:last-of-type { border-bottom: none; }

.seo-h2 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; line-height: 1.4; }
.seo-h3 { font-size: 0.78rem; font-weight: 500; color: var(--text-3); margin-bottom: 0.5rem; letter-spacing: 0.01em; }
.seo-p  { font-size: 0.86rem; line-height: 1.85; color: var(--text-2); }

.seo-how-to { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.65rem; }
.seo-how-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.seo-how-badge {
  font-family: var(--pixel); font-size: 0.34rem; white-space: nowrap; flex-shrink: 0;
  padding: 0.25rem 0.55rem; border-radius: 5px; margin-top: 0.2rem;
  background: var(--green-soft); border: 1px solid rgba(74,222,128,0.3); color: var(--green);
}
.seo-how-badge--bedrock {
  background: rgba(6,182,212,0.08); border-color: rgba(6,182,212,0.3); color: var(--cyan);
}

.seo-links {
  font-size: 0.84rem; color: var(--text-3); margin-top: 0.5rem;
  padding-top: 1.25rem; border-top: 1px solid var(--border);
  line-height: 2;
}
.seo-links a { color: var(--green); text-decoration: none; }
.seo-links a:hover { text-decoration: underline; }

/* Aside: summary + FAQ */
.seo-aside {
  display: flex; flex-direction: column; gap: 1.25rem;
  position: sticky; top: calc(var(--header-h) + 56px); /* below sticky sort bar */
}

/* Summary card */
.seo-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.seo-summary-title {
  font-family: var(--pixel); font-size: 0.44rem;
  color: var(--green); letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}
.seo-summary-list {
  list-style: none; display: flex; flex-direction: column; gap: 0.55rem;
}
.seo-summary-list li {
  font-size: 0.82rem; color: var(--text-2); line-height: 1.5;
  padding-left: 0.75rem; position: relative;
}
.seo-summary-list li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--green); font-size: 0.7rem; top: 0.1rem;
}
.seo-summary-list strong { color: var(--text); }

/* FAQ */
.seo-faq {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.seo-faq-title {
  font-family: var(--pixel); font-size: 0.44rem;
  color: var(--text-2); letter-spacing: 0.1em;
  padding: 0.85rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.seo-details {
  border-bottom: 1px solid var(--border);
}
.seo-details:last-child { border-bottom: none; }
.seo-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.75rem 1.1rem; cursor: pointer;
  font-size: 0.83rem; font-weight: 600; color: var(--text-2);
  list-style: none; user-select: none;
  transition: color 0.15s, background 0.15s;
}
.seo-summary::-webkit-details-marker { display: none; }
.seo-summary::after {
  content: '+'; color: var(--text-3); font-size: 1rem; font-weight: 400; flex-shrink: 0;
}
.seo-details[open] > .seo-summary { color: var(--green); background: var(--green-soft); }
.seo-details[open] > .seo-summary::after { content: '−'; color: var(--green); }
.seo-details-p {
  font-size: 0.82rem; line-height: 1.75; color: var(--text-2);
  padding: 0.6rem 1.1rem 0.85rem;
}

/* ═══ SEO RESPONSIVE ════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .seo-body { grid-template-columns: 1fr 300px; gap: 2rem; }
  .seo-aside { position: static; } /* don't sticky on mid-sizes */
}
@media (max-width: 780px) {
  /* Stack to single column on mobile */
  .seo-inner { padding: 2rem 1.25rem 2.5rem; gap: 1.5rem; }
  .seo-body { grid-template-columns: 1fr; gap: 1.5rem; }
  .seo-aside { position: static; }
  /* Show aside ABOVE articles on mobile */
  .seo-aside { order: -1; }
  .seo-aside { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  .seo-summary-card, .seo-faq { flex: 1 1 280px; }
  .seo-cat-nav { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .seo-heading-lg { font-size: 1rem; }
}
@media (max-width: 540px) {
  .seo-inner { padding: 1.5rem 0.9rem 2rem; }
  .seo-aside { flex-direction: column; }
  .seo-summary-card, .seo-faq { flex: none; width: 100%; }
  .seo-cat-pills { gap: 0.35rem; }
  .seo-pill { font-size: 0.74rem; padding: 0.25rem 0.55rem; }
  .seo-h2 { font-size: 0.88rem; }
  .seo-p  { font-size: 0.82rem; }
  .seo-summary { font-size: 0.8rem; padding: 0.7rem 0.9rem; }
  .seo-details-p { font-size: 0.78rem; padding: 0.5rem 0.9rem 0.75rem; }
  .seo-how-to { gap: 0.6rem; }
}

/* ═══ RESPONSIVE ════════════════════════════════════════════════════ */

/* ── Tablet (sidebar collapses to drawer) ── */
@media (max-width: 860px) {
  .mobile-menu-toggle { display: flex; }

  /* Nav becomes full-width dropdown */
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(6,11,6,0.98); backdrop-filter: blur(16px);
    padding: 1.25rem 1.5rem; visibility: hidden; opacity: 0; pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
    border-bottom: 1px solid var(--border); z-index: 199;
  }
  .main-nav.open { visibility: visible; opacity: 1; pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 0; align-items: stretch; }
  .main-nav li { border-bottom: 1px solid var(--border); }
  .main-nav li:last-child { border-bottom: none; }
  .main-nav a { display: block; padding: 0.85rem 0; text-align: center; font-size: 0.9rem; }

  /* Sidebar becomes off-canvas drawer */
  .sidebar {
    position: fixed; left: -100%; top: 0;
    width: min(88vw, 320px); height: 100vh;
    z-index: 150; transition: left 0.28s ease;
    box-shadow: 6px 0 40px rgba(0,0,0,0.7);
    padding-top: 1.75rem;
  }
  .sidebar.open { left: 0; }

  /* Main area uses full width */
  .page-header  { padding: 1.25rem 1.25rem 1rem; }
  .sort-bar     { padding: 0.65rem 1.25rem; top: var(--header-h); }
  .grid-wrap    { padding: 1.25rem; }
  .seed-grid    { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .pagination   { padding: 1.25rem 1.25rem 2rem; }

  .footer-inner-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-brand p { max-width: 100%; }
  .footer-col ul { align-items: center; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}

/* ── Mobile (≤ 540px) — single column ── */
@media (max-width: 540px) {
  :root { --header-h: 56px; }
  .container { padding: 0 0.9rem; }

  /* Header tighter */
  .logo-icon-svg { width: 28px; height: 28px; }
  .logo-text     { font-size: 0.52rem; }

  /* Page header stacks */
  .page-header {
    flex-direction: column; align-items: flex-start;
    gap: 0.6rem; padding: 1rem 1rem 0.85rem;
  }
  .page-title    { font-size: 0.55rem; }
  .page-subtitle { font-size: 0.82rem; }

  /* Sort bar compact */
  .sort-bar { padding: 0.6rem 1rem; gap: 0.5rem; }
  .sort-label { display: none; } /* hide label — select explains itself */
  .sort-select { flex: 1; font-size: 0.8rem; }
  .filter-sort-btn { font-size: 0.8rem !important; padding: 0.38rem 0.7rem !important; }

  /* Single column grid */
  .grid-wrap  { padding: 0.9rem; }
  .seed-grid  { grid-template-columns: 1fr; gap: 0.9rem; }

  /* Card tweaks for phone — 16:9 stays, just tighten overlay body */
  .card-body     { padding: 0.5rem 0.65rem 0.6rem; gap: 0.22rem; }
  .card-title    { font-size: 0.35rem; }
  .card-code-value { font-size: 0.68rem; }
  .card-copy-btn { font-size: 0.65rem; padding: 0.2rem 0.4rem; }

  /* Pagination compact */
  .pagination { gap: 0.4rem; padding: 1rem 0.9rem 1.75rem; }
  .page-btn   { padding: 0.45rem 0.75rem; font-size: 0.78rem; min-width: 40px; }
  .page-info  { font-size: 0.72rem; padding: 0.45rem 0.65rem; }

  /* Footer compact */
  .footer-inner-grid { padding: 2rem 0 1.5rem; gap: 1.5rem; }
  .footer-logo  { font-size: 0.58rem; }
  .footer-col h4 { font-size: 0.42rem; }
  .footer-col a  { font-size: 0.8rem; }

  /* Fix iOS input zoom */
  .search-input { font-size: 16px; }
}

/* ── Very small phones (≤ 380px) ── */
@media (max-width: 380px) {
  .page-title { font-size: 0.48rem; }
  .card-title { font-size: 0.35rem; }
  .card-body  { padding: 0.65rem 0.75rem; }
}

/* ── Touch targets ── */
@media (hover: none) and (pointer: coarse) {
  .edition-btn, .reset-btn, .page-btn { min-height: 44px; }
  .filter-label { min-height: 40px; }
  .card-copy-btn { min-height: 38px; min-width: 60px; }
}

body.menu-open { overflow: hidden; }


/* ── Mobile performance: disable expensive backdrop-filter on small screens ── */
@media (max-width: 768px) {
  *{
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ── Promote animated elements to compositor layer ── */
.main-nav a,
.btn, button,
[class*="card"],
[class*="tag"],
[class*="badge"],
[class*="tab"] {
  will-change: transform;
}
