/* ===========================================================
   Anime Apocalypse Wiki — Design System
   =========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---- Tokens ------------------------------------------------ */
:root {
  --bg: #F7F8FC;
  --surface: #FFFFFF;
  --fg: #1F2937;
  --muted: #6B7280;
  --border: #E6E8F0;
  --accent: #8B5CF6;
  --accent-hover: #7C3AED;
  --accent-purple: #8B5CF6;
  --accent-green: #A78BFA;
  --accent-red: #C084FC;
  --accent-orange: #A855F7;
  --accent-yellow: #DDD6FE;

  --text-primary: var(--fg);
  --text-secondary: var(--muted);

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.10);

  --max-width: 1200px;
  --nav-height: 64px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ---- Layout ------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
}

.section { padding: 64px 0; }
@media (max-width: 640px) {
  .section { padding: 40px 0; }
}

/* ---- Typography -------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
}
h1 { font-size: clamp(32px, 4vw, 48px); }
h2 { font-size: clamp(26px, 3vw, 36px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }
h4 { font-size: clamp(18px, 1.8vw, 22px); }

.text-muted { color: var(--muted); }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 18px; }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); }

/* ---- Navigation -------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: linear-gradient(135deg, #060816 0%, #14002e 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139,92,246,0.15);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.15s;
}
.nav-logo:hover { opacity: 0.8; text-decoration: none; }
.nav-logo img { height: 32px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.15s var(--ease-out);
}
.nav-links a:hover {
  color: #fff;
  background: rgba(139,92,246,0.2);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--accent);
  background: rgba(139,92,246,0.15);
  font-weight: 600;
}
.nav-mobile-toggle { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; background: #0a0a14; border-bottom: 1px solid rgba(139,92,246,0.15); flex-direction: column; padding: 12px 24px; gap: 4px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 16px; }
  .nav-mobile-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: 20px; color: #fff; background: rgba(139,92,246,0.15); }
}

/* ---- Navigation Dropdown ----------------------------------- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown-toggle:hover { color: #fff; background: rgba(139,92,246,0.2); }
.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 10px;
  transition: transform 0.2s var(--ease-out);
}
.nav-dropdown.open .nav-dropdown-toggle::after { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: #0f0f1a;
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s var(--ease-out);
  z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: all 0.15s;
}
.nav-dropdown-menu a:hover { background: rgba(139,92,246,0.15); color: #fff; text-decoration: none; }
.nav-dropdown-menu a.active { color: var(--accent); background: rgba(139,92,246,0.15); font-weight: 600; }

@media (max-width: 900px) {
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 12px 16px; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 4px 0 4px 16px;
    display: none;
    background: transparent;
    min-width: auto;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a { padding: 10px 14px; width: auto; }
}

/* ---- Hero -------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: left;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #060816 0%, #0d0520 50%, #14002e 100%);
}
.hero-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0.45;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(6,8,22,0.92) 0%,
      rgba(6,8,22,0.78) 40%,
      rgba(13,5,32,0.55) 60%,
      rgba(20,0,46,0.30) 75%,
      transparent 100%
    );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 0 max(24px, 5vw);
  width: 100%;
}
.hero-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(139,92,246,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero-badge-top::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}
.hero h1 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 0.95;
  letter-spacing: -2px;
}
.hero h1 .accent-gradient {
  background: linear-gradient(135deg, #c084fc 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  line-height: 1.65;
  max-width: 560px;
}
.hero-badges {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Hero bottom stats bar */
.hero-stats-bar {
  position: absolute;
  bottom: 40px;
  left: max(24px, 5vw);
  right: max(24px, 5vw);
  z-index: 2;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: box-shadow 0.2s, transform 0.2s var(--ease-out);
  backdrop-filter: blur(8px);
}
.hero-stat-item:hover {
  box-shadow: 0 8px 28px rgba(139,92,246,0.2);
  transform: translateY(-2px);
  border-color: rgba(139,92,246,0.3);
}
.hero-stat-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(139,92,246,0.2);
  border-radius: var(--radius-md);
  font-size: 16px;
}
.hero-stat-text {
  display: flex;
  flex-direction: column;
}
.hero-stat-num {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.hero-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Hero update card (floating right) */
.hero-update-card {
  position: absolute;
  right: max(24px, 5vw);
  bottom: 140px;
  z-index: 2;
  width: 240px;
  padding: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
  backdrop-filter: blur(12px);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.hero-update-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(139,92,246,0.2);
  border-color: rgba(139,92,246,0.3);
}
.hero-update-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}
.hero-update-label::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}
.hero-update-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.hero-update-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .hero-update-card { display: none; }
  .hero-stats-bar { justify-content: center; left: 24px; right: 24px; }
  .hero-content { text-align: center; }
  .hero-badges { justify-content: center; }
  .hero p { max-width: none; }
}
@media (max-width: 640px) {
  .hero-stats-bar { gap: 8px; bottom: 24px; }
  .hero-stat-item { padding: 10px 14px; }
  .hero-stat-icon { width: 30px; height: 30px; font-size: 14px; }
  .hero-stat-num { font-size: 14px; }
}

/* ---- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.15s var(--ease-out);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(139,92,246,0.35);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139,92,246,0.4);
  text-decoration: none;
  color: #fff;
}
.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--muted);
  text-decoration: none;
  color: var(--fg);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--surface);
  color: var(--fg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  background: var(--bg);
  border-color: var(--muted);
  text-decoration: none;
  color: var(--fg);
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-copy {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  font-family: var(--font-mono);
  transition: all 0.15s;
}
.btn-copy:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.btn-copy.copied { background: var(--accent-purple); color: #fff; border-color: var(--accent-purple); }

/* ---- Cards ------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { color: var(--muted); font-size: 15px; line-height: 1.6; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ---- Badges & Tags ----------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-new { background: var(--accent); color: #fff; }
.badge-blue { background: rgba(139,92,246,0.1); color: var(--accent); }
.badge-purple { background: rgba(124,92,255,0.1); color: var(--accent-purple); }
.badge-red,
.badge-orange,
.badge-yellow,
.badge-green {
  background: rgba(139,92,246,0.1);
  color: var(--accent-purple);
}
.badge-gray { background: var(--bg); color: var(--muted); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: rgba(139,92,246,0.08);
  color: var(--accent-purple);
  border: 1px solid rgba(139,92,246,0.16);
}

/* ---- Tier Colors ------------------------------------------- */
.tier-s { color: #6D28D9; background: rgba(109,40,217,0.10); }
.tier-a { color: #7C3AED; background: rgba(124,58,237,0.09); }
.tier-b { color: #8B5CF6; background: rgba(139,92,246,0.08); }
.tier-c { color: #A78BFA; background: rgba(167,139,250,0.10); }
.tier-d { color: #6B5B95; background: rgba(107,91,149,0.08); }

/* ---- Code blocks ------------------------------------------- */
.code-block {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg);
  letter-spacing: 0.02em;
}

/* ---- Section Header ---------------------------------------- */
.section-header {
  margin-bottom: 32px;
}
.section-header h2 {
  margin-bottom: 8px;
}
.section-header p {
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
}

/* ---- FAQ Accordion ----------------------------------------- */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s var(--ease-out);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-question {
  width: 100%;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
}
.faq-question::after {
  content: '+';
  font-size: 20px;
  color: var(--muted);
  transition: transform 0.2s var(--ease-out);
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-out), padding 0.3s var(--ease-out);
  padding: 0 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 20px 18px;
}

/* ---- Tabs -------------------------------------------------- */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all 0.15s var(--ease-out);
  cursor: pointer;
  background: none;
}
.tab-btn:hover { color: var(--fg); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-panel { display: none; animation: fadeIn 0.2s var(--ease-out); }
.tab-panel.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Tables ------------------------------------------------ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg);
}
.data-table tbody tr {
  transition: background 0.15s;
}
.data-table tbody tr:hover { background: var(--bg); }

/* ---- Forms / Calculator ------------------------------------ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--fg);
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 100px; }

/* ---- Footer ------------------------------------------------ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.footer-desc { font-size: 14px; color: var(--muted); line-height: 1.6; }
.footer-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--muted);
  padding: 4px 0;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- Utilities --------------------------------------------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.rounded { border-radius: var(--radius-md); }
.border { border: 1px solid var(--border); }
.bg-surface { background: var(--surface); }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Page Header (non-hero) -------------------------------- */
.page-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(139,92,246,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(192,132,252,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.page-header .container { position: relative; z-index: 1; }
.page-header h1 { color: #fff; margin-bottom: 12px; }
.page-header p { color: rgba(255,255,255,0.8); font-size: 18px; max-width: 640px; }
.page-header .badge { margin-top: 16px; }

/* ---- Stat Bar ------------------------------------------------ */
.stat-bar {
  display: flex;
  gap: 32px;
  margin-top: 24px;
}
.stat-item {
  text-align: center;
}
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 640px) {
  .stat-bar { gap: 20px; flex-wrap: wrap; }
  .stat-value { font-size: 22px; }
}

/* ---- Two column layout ------------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---- Guide card (for guides list) -------------------------- */
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.guide-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.guide-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.guide-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ---- Highlight box ----------------------------------------- */
.highlight-box {
  background: linear-gradient(135deg, rgba(139,92,246,0.06) 0%, rgba(192,132,252,0.06) 100%);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ---- Internal link panel ----------------------------------- */
.link-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 32px;
}
.link-panel p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.link-panel p:last-child { margin-bottom: 0; }
.link-panel a { font-weight: 600; }

/* ---- Scroll nav (for boss pages) --------------------------- */
.scroll-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.scroll-nav a {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  transition: all 0.15s var(--ease-out);
}
.scroll-nav a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}

/* ---- Tooltip / Note ---------------------------------------- */
.note {
  padding: 12px 16px;
  background: rgba(139,92,246,0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---- Responsive images in content -------------------------- */
.content-img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 16px 0;
}

/* ---- Page entrance animation ------------------------------- */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-header + .section .container {
  animation: pageEnter 0.4s var(--ease-out);
}

/* ---- Scroll reveal animation ------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Print styles ------------------------------------------ */
@media print {
  .site-nav, .site-footer, .deck-counter, .deck-hint { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; }
}
