/* =============================================================
   BLOOKET CALCULATOR - MAIN STYLESHEET
   Modern, minimal, premium design system
   ============================================================= */

/* ========================
   1. CSS CUSTOM PROPERTIES
   ======================== */
:root {
  /* Brand Colors */
  --color-primary:        #5B6EF5;
  --color-primary-dark:   #4357D8;
  --color-primary-light:  #8B9BFF;
  --color-secondary:      #F05A7E;
  --color-accent:         #FFB830;

  /* Neutrals */
  --color-white:          #FFFFFF;
  --color-bg:             #F7F8FC;
  --color-bg-alt:         #EEF0F8;
  --color-border:         #E2E5F0;
  --color-border-light:   #F0F2FA;
  --color-text-dark:      #0F1733;
  --color-text-body:      #3A4060;
  --color-text-muted:     #7A84A8;
  --color-text-light:     #A8B0CC;

  /* Rarity Colors */
  --rarity-common-color:    #9CA3AF;
  --rarity-uncommon-color:  #22C55E;
  --rarity-rare-color:      #3B82F6;
  --rarity-epic-color:      #A855F7;
  --rarity-legendary-color: #EAB308;
  --rarity-chroma-color:    #EC4899;

  /* Rarity Backgrounds */
  --rarity-common-bg:     rgba(156,163,175,0.12);
  --rarity-uncommon-bg:   rgba(34,197,94,0.12);
  --rarity-rare-bg:       rgba(59,130,246,0.12);
  --rarity-epic-bg:       rgba(168,85,247,0.12);
  --rarity-legendary-bg:  rgba(234,179,8,0.12);
  --rarity-chroma-bg:     rgba(236,72,153,0.12);

  /* Shadows */
  --shadow-xs:   0 1px 3px rgba(15,23,51,0.06);
  --shadow-sm:   0 2px 8px rgba(15,23,51,0.08);
  --shadow-md:   0 4px 20px rgba(15,23,51,0.10);
  --shadow-lg:   0 8px 40px rgba(15,23,51,0.12);
  --shadow-xl:   0 16px 60px rgba(15,23,51,0.14);
  --shadow-glow: 0 0 30px rgba(91,110,245,0.25);

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --font-display:'Space Grotesk', 'Inter', sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Container */
  --container-max: 1200px;
  --container-px:  1.5rem;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Header height */
  --header-height: 70px;
}

/* ========================
   2. RESET & BASE
   ======================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-body);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-dark); }

ul, ol { list-style: none; }

table { border-collapse: collapse; width: 100%; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text-dark);
}

/* ========================
   3. UTILITY CLASSES
   ======================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.optional { color: var(--color-text-muted); font-size: 0.8rem; font-weight: 400; }

/* ========================
   4. SKIP LINK
   ======================== */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--color-primary); color: white;
  padding: .5rem 1rem; border-radius: var(--radius-md);
  z-index: 9999; font-weight: 600;
  transition: top var(--transition-base);
}
.skip-link:focus { top: 1rem; color: white; }

/* ========================
   5. HEADER / NAVIGATION
   ======================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-light);
  height: var(--header-height);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--header-height);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.5rem; line-height: 1; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-text-dark);
  letter-spacing: -0.02em;
}
.logo-text strong { color: var(--color-primary); }

/* Nav */
.main-nav { margin-left: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: .45rem .85rem;
  font-weight: 500;
  font-size: .925rem;
  color: var(--color-text-body);
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  max-width: 100%;
}
.nav-link:hover,
.nav-link.active {
  background: var(--color-bg);
  color: var(--color-primary);
}
.dropdown-arrow {
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}
.nav-item.has-dropdown:hover .dropdown-arrow,
.nav-item.has-dropdown .dropdown-trigger[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + .5rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: .5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
  transform: translateX(-50%) translateY(-6px);
  z-index: 600;
}
.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.dropdown-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: var(--radius-md);
  color: var(--color-text-body);
  transition: background var(--transition-fast);
}
.dropdown-link:hover {
  background: var(--color-bg);
  color: var(--color-text-dark);
}
.dropdown-icon { font-size: 1.25rem; flex-shrink: 0; }
.dropdown-link strong { display: block; font-size: .875rem; color: var(--color-text-dark); }
.dropdown-link small { display: block; font-size: .75rem; color: var(--color-text-muted); }

/* Header CTA */
.header-cta { margin-left: var(--space-2); flex-shrink: 0; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
}
.hamburger-bar {
  width: 22px;
  height: 2px;
  background: var(--color-text-dark);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* Mobile Nav */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,51,.6);
  z-index: 800;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}
.mobile-nav {
  position: absolute;
  top: 0; right: 0;
  width: min(340px, 90vw);
  height: 100%;
  background: var(--color-white);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  padding: 1.5rem;
}
.mobile-nav-overlay.open .mobile-nav {
  transform: translateX(0);
}
.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav-close {
  background: var(--color-bg);
  border: none;
  border-radius: var(--radius-sm);
  width: 36px; height: 36px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav-section { margin: 1rem 0; }
.mobile-nav-section-title {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  margin-bottom: .5rem;
  padding-left: .75rem;
}
.mobile-nav-link {
  display: block;
  padding: .6rem .75rem;
  color: var(--color-text-body);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  transition: background var(--transition-fast);
}
.mobile-nav-link:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

/* ========================
   6. BUTTONS
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.4rem;
  font-weight: 600;
  font-size: .925rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
  white-space: nowrap;
  font-family: var(--font-sans);
  line-height: 1;
  max-width: 100%;
  box-sizing: border-box;
}
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(91,110,245,.35);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(91,110,245,.4);
  color: white;
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--color-bg);
  color: var(--color-text-body);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  background: var(--color-border);
  color: var(--color-text-dark);
}
.btn-white {
  background: white;
  color: var(--color-primary);
  border-color: white;
}
.btn-white:hover {
  background: var(--color-bg);
  color: var(--color-primary-dark);
}
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-lg { padding: .9rem 1.8rem; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* ========================
   7. BADGES & TAGS
   ======================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .65rem;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
}
.badge-green { background: rgba(34,197,94,.12); color: #15803d; }
.badge-blue  { background: rgba(59,130,246,.12); color: #1d4ed8; }

.tag {
  display: inline-block;
  padding: .3rem .8rem;
  background: rgba(91,110,245,.08);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: .8rem;
  font-weight: 500;
}

/* Rarity Badges */
.rarity-badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .7rem;
  border-radius: var(--radius-full);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.rarity-common    { background: var(--rarity-common-bg);    color: #4b5563; }
.rarity-uncommon  { background: var(--rarity-uncommon-bg);  color: #15803d; }
.rarity-rare      { background: var(--rarity-rare-bg);      color: #1d4ed8; }
.rarity-epic      { background: var(--rarity-epic-bg);      color: #7e22ce; }
.rarity-legendary { background: var(--rarity-legendary-bg); color: #92400e; }
.rarity-chroma    {
  background: linear-gradient(90deg, rgba(236,72,153,.1), rgba(91,110,245,.1));
  color: #be185d;
}

/* ========================
   8. SECTION UTILITIES
   ======================== */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-10);
}
.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-primary);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--color-text-dark);
  line-height: 1.2;
  margin-bottom: .75rem;
}
.section-title-sm {
  font-size: 1.2rem;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
}
.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ========================
   9. HERO SECTION
   ======================== */
.hero-section {
  padding: var(--space-20) 0 var(--space-16);
  background: linear-gradient(155deg, #f0f2ff 0%, #faf5ff 50%, #fff5f7 100%);
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
}
.hero-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-body);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-xs);
}
.badge-pulse {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .7; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: var(--space-5);
  color: var(--color-text-dark);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-body);
  margin-bottom: var(--space-8);
  line-height: 1.7;
  max-width: 520px;
}

.hero-cta-group {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-item strong { font-size: 1.4rem; font-weight: 800; color: var(--color-text-dark); }
.stat-item span   { font-size: .78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-divider     { width: 1px; height: 36px; background: var(--color-border); }

/* Rarity Cards Preview (hero visual) */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.rarity-cards-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  perspective: 1000px;
}
.rarity-preview-card {
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem .75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  cursor: default;
}
.rarity-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.rarity-preview-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(91,110,245,.15), var(--shadow-md);
}
.rarity-emoji { font-size: 1.8rem; margin-bottom: .4rem; }
.rarity-name  { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); }
.rarity-pct   { font-size: 1.1rem; font-weight: 800; color: var(--color-text-dark); margin-top: .25rem; }

/* ========================
   10. TOOLS SECTION
   ======================== */
.tools-section {
  padding: var(--space-20) 0;
  background: white;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.5rem;
}
.tool-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}
.tool-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-card-featured {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-color: var(--color-primary);
  color: white;
  grid-row: span 1;
  grid-column: span 1;
}
.tool-card-featured .tool-card-title,
.tool-card-featured .tool-card-desc,
.tool-card-featured .tool-features li {
  color: rgba(255,255,255,.95);
}
.tool-card-icon { font-size: 2.2rem; margin-bottom: var(--space-4); }
.tool-card-title { font-size: 1.2rem; margin-bottom: .5rem; }
.tool-card-desc  { font-size: .9rem; color: var(--color-text-muted); margin-bottom: var(--space-5); flex: 1; line-height: 1.6; }
.tool-card-featured .tool-card-desc { color: rgba(255,255,255,.75); }
.tool-features { margin-bottom: var(--space-6); }
.tool-features li { font-size: .875rem; color: var(--color-text-muted); padding: .2rem 0; }
.tool-card-featured .tool-features li { color: rgba(255,255,255,.8); }
.tool-card-cta { margin-top: auto; align-self: flex-start; }
.tool-card-featured .tool-card-cta {
  background: white;
  color: var(--color-primary);
  border-color: white;
}
.tool-card-featured .tool-card-cta:hover {
  background: var(--color-bg);
  color: var(--color-primary-dark);
}

/* ========================
   11. EXPLAINER SECTION
   ======================== */
.explainer-section {
  padding: var(--space-20) 0;
  background: var(--color-bg-alt);
}
.explainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1.5rem;
  margin-bottom: var(--space-10);
}
.explainer-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}
.explainer-card:hover { box-shadow: var(--shadow-md); }
.explainer-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(91,110,245,.15);
  line-height: 1;
  margin-bottom: .5rem;
  font-family: var(--font-display);
}
.explainer-card h3 { font-size: 1.05rem; margin-bottom: .5rem; color: var(--color-text-dark); }
.explainer-card p  { font-size: .9rem; color: var(--color-text-muted); line-height: 1.6; }
.explainer-cta { text-align: center; }

/* ========================
   12. RARITY TABLE SECTION
   ======================== */
.rarity-section {
  padding: var(--space-20) 0;
  background: white;
}
.rarity-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}
.rarity-table {
  min-width: 700px;
  background: white;
}
.rarity-table th {
  background: var(--color-bg);
  padding: .9rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.rarity-table td {
  padding: .85rem 1rem;
  font-size: .9rem;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-body);
}
.rarity-table tr:last-child td { border-bottom: none; }
.rarity-table tr:hover td { background: var(--color-bg); }

.value-low  { color: var(--color-text-muted); }
.value-mid  { color: #2563eb; }
.value-high { color: #7c3aed; }
.value-very-high { color: #b45309; }
.value-ultra { background: linear-gradient(90deg, #ec4899, #6366f1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 700; }

.table-footnote {
  font-size: .82rem;
  color: var(--color-text-muted);
  margin-top: .75rem;
  padding: 0 .25rem;
}
.table-footnote a { color: var(--color-primary); }

/* ========================
   13. EDUCATION SECTION
   ======================== */
.education-section {
  padding: var(--space-20) 0;
  background: var(--color-bg-alt);
}
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: var(--space-12);
  align-items: start;
}
.education-content h3 {
  font-size: 1.15rem;
  margin-bottom: .5rem;
  margin-top: 1.25rem;
  color: var(--color-text-dark);
}
.education-content h3:first-child { margin-top: 0; }
.education-content p { font-size: .95rem; color: var(--color-text-body); line-height: 1.7; margin-bottom: .75rem; }

.education-callouts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.callout {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid transparent;
  font-size: .9rem;
  line-height: 1.6;
}
.callout-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: .1rem; }
.callout-info    { background: rgba(59,130,246,.07);  border-color: #3b82f6; }
.callout-tip     { background: rgba(34,197,94,.07);   border-color: #22c55e; }
.callout-warning { background: rgba(234,179,8,.07);   border-color: #eab308; }
.callout-success { background: rgba(91,110,245,.07);  border-color: var(--color-primary); }

/* ========================
   14. GUIDES SECTION
   ======================== */
.guides-section {
  padding: var(--space-20) 0;
  background: white;
}
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}
.guide-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-decoration: none;
  transition: all var(--transition-base);
}
.guide-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.guide-card-icon { font-size: 2rem; margin-bottom: .75rem; }
.guide-card-title { font-size: 1.1rem; color: var(--color-text-dark); margin-bottom: .5rem; }
.guide-card-desc  { font-size: .875rem; color: var(--color-text-muted); flex: 1; line-height: 1.6; margin-bottom: 1rem; }
.guide-card-link  { font-size: .875rem; color: var(--color-primary); font-weight: 600; margin-top: auto; }

/* ========================
   15. FAQ SECTION
   ======================== */
.faq-section {
  padding: var(--space-20) 0;
  background: var(--color-bg-alt);
}
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.faq-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: .95rem;
  color: var(--color-text-dark);
  cursor: pointer;
  gap: 1rem;
  transition: background var(--transition-fast);
}
.faq-question:hover { background: var(--color-bg); }
.faq-question[aria-expanded="true"] { background: var(--color-bg); }
.faq-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  font-weight: 300;
  color: var(--color-primary);
  transition: transform var(--transition-fast);
  line-height: 1;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-base);
}
.faq-answer.open { max-height: 400px; }
.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  font-size: .9rem;
  color: var(--color-text-body);
  line-height: 1.7;
}

/* ========================
   16. CTA SECTION
   ======================== */
.cta-section {
  padding: var(--space-20) 0;
  background: white;
}
.cta-box {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-16) var(--space-8);
  text-align: center;
  color: white;
}
.cta-box h2 { color: white; font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: .75rem; }
.cta-box p  { color: rgba(255,255,255,.8); font-size: 1.05rem; margin-bottom: var(--space-8); }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ========================
   17. PAGE HERO (Inner Pages)
   ======================== */
.page-hero {
  padding: var(--space-12) 0 var(--space-10);
  background: linear-gradient(155deg, #f0f2ff 0%, #faf5ff 100%);
  border-bottom: 1px solid var(--color-border-light);
}
.page-hero-content { text-align: center; max-width: 700px; margin: 0 auto; }
.page-hero-icon { font-size: 3rem; display: block; margin-bottom: .75rem; }
.page-hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .75rem; }
.page-hero-subtitle { font-size: 1.05rem; color: var(--color-text-muted); max-width: 580px; margin: 0 auto .75rem; }
.hero-tags { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: .75rem; }

.guide-hero { background: linear-gradient(155deg, #faf5ff 0%, #f0f7ff 100%); }

/* ========================
   18. BREADCRUMB
   ======================== */
.breadcrumb-nav {
  background: white;
  border-bottom: 1px solid var(--color-border-light);
  padding: .6rem 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--color-text-muted);
}
.breadcrumb li[aria-current="page"] { color: var(--color-text-dark); font-weight: 500; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

/* ========================
   19. CALCULATOR LAYOUT
   ======================== */
.calculator-section {
  padding: var(--space-12) 0 var(--space-16);
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.calc-panel {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.calc-panel-header {
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 1.5rem;
}
.calc-panel-header h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.calc-panel-header p  { font-size: .85rem; color: var(--color-text-muted); }

.calc-inputs  { padding-bottom: 1.5rem; overflow: hidden; }
.calc-results { padding: 1.5rem; }

/* Forms */
.calc-form { padding: 0 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text-dark);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.form-input, .form-select {
  width: 100%;
  padding: .7rem 1rem;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: .9rem;
  color: var(--color-text-dark);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(91,110,245,.15);
}
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 14px;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-hint { font-size: .78rem; color: var(--color-text-muted); }

/* Range Slider */
.input-with-range { display: flex; flex-direction: column; gap: .5rem; }
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(91,110,245,.4);
}
.range-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: none;
}

/* Tooltip Trigger */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: help;
  transition: background var(--transition-fast);
}
.tooltip-trigger:hover { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* Global Tooltip */
.global-tooltip {
  position: fixed;
  background: var(--color-text-dark);
  color: white;
  padding: .5rem .85rem;
  border-radius: var(--radius-md);
  font-size: .8rem;
  max-width: 220px;
  line-height: 1.4;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  box-shadow: var(--shadow-lg);
}
.global-tooltip.visible { opacity: 1; }

/* Pack Info Card */
.pack-info-card {
  margin: 0 1.5rem 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.pack-info-card h4 { font-size: .875rem; margin-bottom: .75rem; color: var(--color-text-dark); }
.pack-info-grid {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.pack-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  padding: .25rem 0;
  border-bottom: 1px solid var(--color-border-light);
}
.pack-info-row:last-child { border-bottom: none; }
.pack-info-row .rarity-badge { padding: .15rem .5rem; font-size: .72rem; }

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.metric-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: box-shadow var(--transition-fast);
}
.metric-card:hover { box-shadow: var(--shadow-sm); }
.metric-icon  { font-size: 1.5rem; margin-bottom: .5rem; }
.metric-value { font-size: 1.6rem; font-weight: 800; color: var(--color-text-dark); line-height: 1; margin-bottom: .3rem; font-family: var(--font-display); }
.metric-label { font-size: .75rem; font-weight: 600; color: var(--color-text-dark); }
.metric-sublabel { font-size: .7rem; color: var(--color-text-muted); margin-top: .2rem; }

/* Probability Bar */
.probability-gauge-wrap {
  margin-bottom: 1.5rem;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
}
.gauge-label { font-size: .8rem; font-weight: 600; color: var(--color-text-muted); margin-bottom: .5rem; }
.probability-bar-track {
  width: 100%; height: 10px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.probability-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}
.gauge-pct { font-size: 1.5rem; font-weight: 800; color: var(--color-text-dark); text-align: right; margin-top: .3rem; font-family: var(--font-display); }

/* Charts */
.charts-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.chart-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.chart-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: baseline;
}
.chart-subtitle { font-size: .75rem; color: var(--color-text-muted); font-weight: 400; }
.chart-wrap { position: relative; }
.chart-wrap canvas { max-width: 100%; }
.chart-wrap-tall { height: 240px; }
.chart-wrap-tall canvas { height: 100% !important; }

/* Breakdown Table */
.breakdown-table-wrap { border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.breakdown-table-wrap h4 { padding: 1rem 1rem .75rem; font-size: .9rem; background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.breakdown-table th {
  background: var(--color-bg);
  padding: .65rem 1rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.breakdown-table td {
  padding: .7rem 1rem;
  font-size: .85rem;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-body);
}
.breakdown-table tr:last-child td { border-bottom: none; }

/* ========================
   20. HOW TO SECTION
   ======================== */
.how-to-section {
  padding: var(--space-16) 0;
  background: var(--color-bg-alt);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1.25rem;
}
.step-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.step-num {
  width: 40px; height: 40px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800;
  margin-bottom: .75rem;
  font-family: var(--font-display);
}
.step-card h3 { font-size: 1rem; margin-bottom: .4rem; }
.step-card p  { font-size: .875rem; color: var(--color-text-muted); line-height: 1.6; }

/* ========================
   21. SEO CONTENT SECTION
   ======================== */
.seo-content-section {
  padding: var(--space-12) 0;
  background: white;
  border-top: 1px solid var(--color-border-light);
}
.prose-content { max-width: 800px; margin: 0 auto; }
.prose-content h2 { font-size: 1.35rem; margin: 2rem 0 .75rem; color: var(--color-text-dark); }
.prose-content h2:first-child { margin-top: 0; }
.prose-content p  { font-size: .95rem; color: var(--color-text-body); line-height: 1.75; margin-bottom: 1rem; }
.prose-content ul, .prose-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose-content ul { list-style: disc; }
.prose-content ol { list-style: decimal; }
.prose-content li { font-size: .95rem; color: var(--color-text-body); margin-bottom: .35rem; line-height: 1.65; }
.prose-content code {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: .15rem .4rem;
  font-size: .875rem;
  font-family: var(--font-mono);
  color: var(--color-primary);
}

/* ========================
   22. RELATED TOOLS
   ======================== */
.related-tools-section {
  padding: var(--space-12) 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
}
.related-tools-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.related-tool-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.25rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text-body);
  transition: all var(--transition-base);
}
.related-tool-card:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.related-icon { font-size: 1.1rem; }

/* ========================
   23. PACK SIMULATOR
   ======================== */
.simulator-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.radio-group { display: flex; flex-direction: column; gap: .5rem; }
.radio-option {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .75rem;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: .875rem;
  transition: all var(--transition-fast);
}
.radio-option:hover { border-color: var(--color-primary-light); }
.radio-option input[type="radio"] { display: none; }
.radio-custom {
  width: 16px; height: 16px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.radio-option:has(input:checked) { border-color: var(--color-primary); background: rgba(91,110,245,.05); }
.radio-option:has(input:checked) .radio-custom {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: inset 0 0 0 3px white;
}

.sim-session-stats {
  margin: 0 1.5rem 1.5rem;
  padding: 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.sim-session-stats h4 { font-size: .875rem; margin-bottom: .75rem; }
.session-stat {
  display: flex; justify-content: space-between;
  font-size: .82rem; padding: .35rem 0;
  border-bottom: 1px solid var(--color-border-light);
}
.session-stat:last-of-type { border-bottom: none; }

/* Sim Stage */
.sim-stage {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.sim-stage-empty { text-align: center; }
.sim-stage-icon { font-size: 3rem; margin-bottom: .75rem; opacity: .4; }
.sim-stage-empty p { color: var(--color-text-muted); font-size: .9rem; }
.sim-hint { font-size: .82rem; margin-top: .3rem; color: var(--color-text-light); }

/* Sim Cards Container */
.sim-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  width: 100%;
}
.sim-blook-card {
  width: 120px;
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem .75rem;
  text-align: center;
  animation: cardReveal .4s ease forwards;
  opacity: 0;
}
@keyframes cardReveal {
  from { opacity: 0; transform: scale(.8) rotateY(90deg); }
  to   { opacity: 1; transform: scale(1) rotateY(0deg); }
}
.sim-blook-card .blook-emoji { font-size: 2rem; display: block; margin-bottom: .4rem; }
.sim-blook-card .blook-rarity { font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.sim-blook-card.rarity-common    { border-color: var(--rarity-common-color); }
.sim-blook-card.rarity-uncommon  { border-color: var(--rarity-uncommon-color); background: rgba(34,197,94,.03); }
.sim-blook-card.rarity-rare      { border-color: var(--rarity-rare-color); background: rgba(59,130,246,.04); }
.sim-blook-card.rarity-epic      { border-color: var(--rarity-epic-color); background: rgba(168,85,247,.05); }
.sim-blook-card.rarity-legendary { border-color: var(--rarity-legendary-color); background: rgba(234,179,8,.05); }
.sim-blook-card.rarity-chroma    {
  border-image: linear-gradient(135deg, #ec4899, #6366f1) 1;
  background: linear-gradient(135deg, rgba(236,72,153,.06), rgba(99,102,241,.06));
}

/* Sim Batch Results */
.sim-summary-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  color: white; border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.sim-summary-banner h3 { color: white; font-size: 1.1rem; margin-bottom: .3rem; }
.sim-summary-banner p  { color: rgba(255,255,255,.85); font-size: .9rem; }

.sim-tally { margin-bottom: 1.5rem; }
.sim-tally h4 { font-size: .9rem; margin-bottom: .75rem; color: var(--color-text-dark); }
.sim-tally-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: .75rem; }
.sim-tally-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: .75rem 1rem;
  border: 1px solid var(--color-border);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.sim-tally-count { font-size: 1.6rem; font-weight: 800; font-family: var(--font-display); }
.sim-tally-label { font-size: .72rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.sim-tally-pct   { font-size: .78rem; color: var(--color-text-muted); margin-top: .2rem; }

/* Blook List */
.blook-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: .75rem; }
.blook-list-header h4 { font-size: .9rem; }
.blook-list-filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter-btn {
  padding: .3rem .75rem; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 600;
  background: var(--color-bg); border: 1px solid var(--color-border);
  cursor: pointer; color: var(--color-text-muted); transition: all var(--transition-fast);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--color-primary); border-color: var(--color-primary); color: white;
}

.blook-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  gap: .75rem;
  max-height: 400px;
  overflow-y: auto;
  padding: .25rem;
}
.blook-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: .6rem .75rem;
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 500;
  color: var(--color-text-body);
  transition: box-shadow var(--transition-fast);
}
.blook-item:hover { box-shadow: var(--shadow-sm); }
.blook-item-emoji { font-size: 1.1rem; flex-shrink: 0; }

/* ========================
   24. PROBABILITY CALCULATOR
   ======================== */
.mode-tabs {
  display: flex; background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 3px; gap: 2px;
}
.mode-tab {
  flex: 1; padding: .5rem .75rem;
  border-radius: calc(var(--radius-md) - 3px);
  border: none; background: transparent;
  font-size: .8rem; font-weight: 600; color: var(--color-text-muted);
  cursor: pointer; transition: all var(--transition-fast);
}
.mode-tab.active {
  background: white; color: var(--color-primary);
  box-shadow: var(--shadow-xs);
}

/* Formula Card */
.formula-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.formula-card h4 { font-size: .9rem; margin-bottom: .75rem; }
.formula-display {
  font-family: var(--font-mono);
  font-size: .9rem;
  background: var(--color-text-dark);
  color: #a5f3fc;
  padding: .75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: .75rem;
  overflow-x: auto;
}
.formula-explanation { font-size: .85rem; color: var(--color-text-muted); line-height: 1.6; }

/* Milestones */
.milestones-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.5rem;
}
.milestones-card h4 { font-size: .9rem; margin-bottom: .4rem; }
.milestones-desc { font-size: .82rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.milestones-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: .75rem; }
.milestone-item {
  background: var(--color-bg); border-radius: var(--radius-md);
  padding: .75rem; text-align: center; border: 1px solid var(--color-border);
}
.milestone-pct { font-size: 1.3rem; font-weight: 800; color: var(--color-primary); font-family: var(--font-display); }
.milestone-packs { font-size: .72rem; color: var(--color-text-muted); }
.milestone-label { font-size: .75rem; font-weight: 600; color: var(--color-text-dark); margin-top: .2rem; }

/* Formula Box (guide pages) */
.formula-box {
  background: var(--color-text-dark); color: #a5f3fc;
  font-family: var(--font-mono); font-size: .95rem;
  padding: .75rem 1.25rem; border-radius: var(--radius-md);
  margin: .75rem 0; display: inline-block;
}
.formula-box.large { font-size: 1.15rem; padding: 1rem 1.5rem; }

/* Edu Cards Grid */
.edu-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
}
.edu-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.edu-card-icon { font-size: 1.8rem; margin-bottom: .75rem; }
.edu-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.edu-card p  { font-size: .875rem; color: var(--color-text-muted); line-height: 1.65; }
.edu-card ul { padding-left: 1.25rem; list-style: disc; }
.edu-card li { font-size: .875rem; color: var(--color-text-muted); margin-bottom: .25rem; }

/* ========================
   25. VALUE CALCULATOR
   ======================== */
.value-calc-layout {
  display: grid;
  grid-template-columns: 1fr 160px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.trade-side-header {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}
.trade-side-header h3 { font-size: 1rem; margin: 0; }
.trade-side-header p  { font-size: .8rem; color: var(--color-text-muted); margin: 0; }
.trade-side-icon { font-size: 1.75rem; }
.trade-side-offer  { background: rgba(34,197,94,.05); }
.trade-side-receive { background: rgba(59,130,246,.05); }

.blook-adder { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--color-border-light); }

.trade-blook-list {
  padding: 1rem 1.5rem; min-height: 140px; display: flex;
  flex-direction: column; gap: .5rem;
}
.trade-empty-hint { font-size: .82rem; color: var(--color-text-muted); text-align: center; padding: 1.5rem 0; }

.trade-blook-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .75rem;
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); gap: .5rem;
  font-size: .85rem;
}
.trade-blook-info { display: flex; align-items: center; gap: .5rem; flex: 1; }
.trade-blook-value { font-weight: 700; font-size: .82rem; color: var(--color-primary); white-space: nowrap; }
.trade-blook-remove {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted); font-size: 1rem;
  padding: 0 .2rem; line-height: 1;
  transition: color var(--transition-fast);
}
.trade-blook-remove:hover { color: var(--color-secondary); }

.trade-side-total {
  display: flex; justify-content: space-between;
  padding: 1rem 1.5rem; background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  font-size: .9rem; font-weight: 600;
}
.trade-side-total strong { font-size: 1.1rem; color: var(--color-text-dark); }

/* Trade Verdict */
.trade-verdict-panel {
  width: 200px;
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1rem;
  text-align: center;
  position: sticky; top: calc(var(--header-height) + 1rem);
}
.verdict-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.verdict-label { font-size: .95rem; font-weight: 700; color: var(--color-text-dark); margin-bottom: .4rem; }
.verdict-detail { font-size: .78rem; color: var(--color-text-muted); line-height: 1.5; margin-bottom: 1rem; }

.comparison-bar-wrap { margin: 1rem 0; }
.comparison-side-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); text-align: center; margin-bottom: .3rem; }
.comparison-bar-track { display: flex; height: 8px; border-radius: var(--radius-full); overflow: hidden; }
.offer-bar   { background: #22c55e; transition: width .5s ease; }
.receive-bar { background: #3b82f6; transition: width .5s ease; }

.trade-chart-wrap { margin-top: 1rem; }

/* Value Reference */
.value-reference-section { margin-top: 2rem; padding: 2rem; background: var(--color-bg); border-radius: var(--radius-xl); border: 1px solid var(--color-border); }
.value-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 1rem;
}
.value-ref-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1rem;
  text-align: center;
}
.value-ref-multiplier { font-size: 1.5rem; font-weight: 800; color: var(--color-text-dark); font-family: var(--font-display); margin: .4rem 0; }
.value-ref-desc { font-size: .75rem; color: var(--color-text-muted); }

/* ========================
   26. GUIDE CONTENT PAGES
   ======================== */
.guide-content { padding: var(--space-12) 0 var(--space-16); }
.guide-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-10);
  align-items: start;
}
.guide-main { max-width: none; }
.guide-main h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; color: var(--color-text-dark); }
.guide-main h2:first-child { margin-top: 0; }
.guide-main h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; color: var(--color-text-dark); }
.guide-main p  { font-size: .95rem; color: var(--color-text-body); line-height: 1.75; margin-bottom: 1rem; }
.guide-main ul, .guide-main ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.guide-main ul { list-style: disc; }
.guide-main li { margin-bottom: .4rem; font-size: .95rem; color: var(--color-text-body); line-height: 1.65; }
.guide-main code { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 4px; padding: .15rem .4rem; font-size: .875rem; font-family: var(--font-mono); color: var(--color-primary); }

.guide-charts-grid { margin: 1.5rem 0; display: flex; flex-direction: column; gap: 1.5rem; }

.guide-meta { display: flex; gap: 1.25rem; justify-content: center; margin-top: .75rem; flex-wrap: wrap; }
.guide-meta span { font-size: .8rem; color: var(--color-text-muted); }

/* Guide Sidebar */
.guide-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  display: flex; flex-direction: column; gap: 1rem;
}
.sidebar-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.25rem;
}
.sidebar-card h3 { font-size: .9rem; margin-bottom: .75rem; color: var(--color-text-dark); }
.sidebar-highlight { background: linear-gradient(135deg, rgba(91,110,245,.05), rgba(168,85,247,.05)); border-color: rgba(91,110,245,.2); text-align: center; }
.sidebar-fact-icon { font-size: 1.5rem; margin-bottom: .5rem; }
.sidebar-highlight strong { display: block; margin-bottom: .4rem; font-size: .875rem; }
.sidebar-highlight p { font-size: .82rem; color: var(--color-text-muted); margin: 0; line-height: 1.5; }

.toc-list { display: flex; flex-direction: column; gap: .25rem; }
.toc-list a {
  display: block; padding: .35rem .5rem;
  font-size: .82rem; color: var(--color-text-muted); border-radius: 4px;
  transition: all var(--transition-fast);
}
.toc-list a:hover { background: var(--color-bg); color: var(--color-primary); }

.sidebar-tools { display: flex; flex-direction: column; gap: .25rem; }
.sidebar-tools a { display: block; padding: .35rem .5rem; font-size: .82rem; color: var(--color-primary); border-radius: 4px; transition: background var(--transition-fast); }
.sidebar-tools a:hover { background: rgba(91,110,245,.07); }

/* Rarity Detailed Cards */
.rarity-detailed-grid { display: flex; flex-direction: column; gap: 1.25rem; margin: 1.5rem 0; }
.rarity-detailed-card {
  background: white; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.rarity-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem;
}
.rarity-card-icon { font-size: 1.75rem; }
.rarity-card-body { padding: 0 1.25rem 1.25rem; }
.rarity-stat-row {
  display: flex; justify-content: space-between;
  font-size: .85rem; padding: .35rem 0;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-body);
}
.rarity-stat-row:last-of-type { border-bottom: none; }
.rarity-stat-row strong { color: var(--color-text-dark); }
.rarity-desc { font-size: .875rem; color: var(--color-text-muted); line-height: 1.65; margin-top: .75rem; }

.rarity-drop-bar {
  height: 6px; background: var(--color-border);
  border-radius: var(--radius-full); overflow: hidden; margin: .75rem 0;
}
.drop-bar-fill { height: 100%; border-radius: var(--radius-full); }
.chroma-bar { background: var(--color-border); }
.chroma-fill { background: linear-gradient(90deg, #ec4899, #6366f1); }

/* Rarity card border colors */
.rarity-common-card    { border-color: var(--rarity-common-color); }
.rarity-uncommon-card  { border-color: var(--rarity-uncommon-color); }
.rarity-rare-card      { border-color: var(--rarity-rare-color); }
.rarity-epic-card      { border-color: var(--rarity-epic-color); }
.rarity-legendary-card { border-color: var(--rarity-legendary-color); }
.rarity-chroma-card    { border-image: linear-gradient(135deg, #ec4899, #6366f1) 1; }

/* CTA Box in Guides */
.guide-cta-box {
  background: linear-gradient(135deg, rgba(91,110,245,.05), rgba(168,85,247,.05));
  border: 1px solid rgba(91,110,245,.2);
  border-radius: var(--radius-lg); padding: 1.5rem;
  text-align: center; margin: 2rem 0;
}
.guide-cta-box p { font-size: .95rem; color: var(--color-text-muted); margin-bottom: .75rem; }
.guide-cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Pack Odds Guide */
.mistake-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; margin: 1rem 0; }
.mistake-card {
  border-radius: var(--radius-lg); padding: 1.25rem;
  border: 1px solid var(--color-border);
}
.mistake-card.bad  { background: rgba(239,68,68,.04); border-color: rgba(239,68,68,.2); }
.mistake-card.good { background: rgba(34,197,94,.04); border-color: rgba(34,197,94,.2); }
.mistake-header { font-weight: 700; font-size: .9rem; margin-bottom: .5rem; color: var(--color-text-dark); }
.mistake-card p { font-size: .85rem; color: var(--color-text-muted); line-height: 1.6; margin: 0; }

/* Trading Guide */
.value-tiers-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1rem; margin: 1.5rem 0;
}
.value-tier-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.25rem; text-align: center;
}
.tier-rarity { margin-bottom: .5rem; }
.tier-multiplier { font-size: 1.75rem; font-weight: 800; color: var(--color-text-dark); font-family: var(--font-display); margin-bottom: .4rem; }
.tier-note { font-size: .8rem; color: var(--color-text-muted); margin-bottom: .3rem; line-height: 1.5; }
.tier-example { font-size: .75rem; color: var(--color-text-light); font-style: italic; }
.tier-chroma { background: linear-gradient(135deg, rgba(236,72,153,.05), rgba(99,102,241,.05)); border-image: linear-gradient(135deg, #ec4899, #6366f1) 1; }

.trade-examples { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.trade-example {
  border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden;
}
.trade-example.fair    { border-color: rgba(34,197,94,.3); }
.trade-example.unfair  { border-color: rgba(239,68,68,.3); }
.trade-example.great   { border-color: rgba(91,110,245,.3); }
.trade-example-header { padding: .75rem 1.25rem; font-weight: 700; font-size: .85rem; }
.trade-example.fair .trade-example-header    { background: rgba(34,197,94,.07); }
.trade-example.unfair .trade-example-header  { background: rgba(239,68,68,.07); }
.trade-example.great .trade-example-header   { background: rgba(91,110,245,.07); }
.trade-badge { padding: .2rem .6rem; border-radius: var(--radius-full); font-size: .78rem; }
.trade-badge.fair  { background: rgba(34,197,94,.15); color: #15803d; }
.trade-badge.unfair{ background: rgba(239,68,68,.15); color: #dc2626; }
.trade-badge.great { background: rgba(91,110,245,.15); color: var(--color-primary); }
.trade-example-body {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem;
}
.trade-ex-side { flex: 1; }
.trade-ex-side strong { display: block; font-size: .85rem; margin-bottom: .4rem; color: var(--color-text-dark); }
.trade-ex-side ul { list-style: none; padding: 0; }
.trade-ex-side li { font-size: .82rem; color: var(--color-text-muted); margin-bottom: .2rem; }
.trade-ex-vs { font-size: 1.4rem; color: var(--color-text-muted); flex-shrink: 0; }
.trade-example-verdict { padding: 0 1.25rem 1rem; font-size: .82rem; color: #dc2626; font-style: italic; }

.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 1rem; margin: 1.5rem 0; }
.tip-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem; }
.tip-icon { font-size: 1.5rem; margin-bottom: .5rem; }
.tip-card h3 { font-size: .95rem; margin-bottom: .4rem; }
.tip-card p  { font-size: .85rem; color: var(--color-text-muted); line-height: 1.6; margin: 0; }

/* Pack Comparison Table */
.comparison-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); border: 1px solid var(--color-border); max-width: 100%; }
.comparison-table { min-width: 600px; }
.comparison-table th {
  background: var(--color-bg); padding: .8rem 1rem;
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--color-text-muted); text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.comparison-table td {
  padding: .75rem 1rem; font-size: .875rem; color: var(--color-text-body);
  border-bottom: 1px solid var(--color-border-light);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: var(--color-bg); }

/* Rarity Result Grid (Pack Chance Calc) */
.rarity-result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.rarity-result-card {
  background: white; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.1rem;
  text-align: center;
}
.rrc-badge { margin-bottom: .6rem; }
.rrc-prob  { font-size: 1.6rem; font-weight: 800; font-family: var(--font-display); line-height: 1; margin-bottom: .2rem; }
.rrc-label { font-size: .72rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.rrc-expected { font-size: .8rem; color: var(--color-text-muted); margin-top: .3rem; }

/* ========================
   27. FOOTER
   ======================== */
.site-footer {
  background: var(--color-text-dark);
  color: rgba(255,255,255,.7);
  padding: var(--space-16) 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}
.footer-logo .logo-text { color: white; }
.footer-tagline { font-size: .875rem; line-height: 1.7; margin: .75rem 0 1rem; max-width: 260px; }
.footer-badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.footer-badges .badge-green { background: rgba(34,197,94,.15); color: #4ade80; }
.footer-badges .badge-blue  { background: rgba(59,130,246,.15); color: #60a5fa; }
.footer-heading { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.5); margin-bottom: .75rem; }
.footer-links { display: flex; flex-direction: column; gap: .3rem; }
.footer-links a { font-size: .875rem; color: rgba(255,255,255,.65); transition: color var(--transition-fast); padding: .15rem 0; }
.footer-links a:hover { color: white; }
.footer-seo-links {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: var(--space-6) 0;
  margin-bottom: var(--space-6);
}
.footer-seo-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.4); margin-bottom: .75rem; }
.footer-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.footer-tag {
  padding: .2rem .7rem;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius-full);
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.08);
  transition: all var(--transition-fast);
}
.footer-tag:hover { background: rgba(255,255,255,.1); color: white; }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: var(--space-5) 0;
  margin-bottom: var(--space-5);
}
.footer-disclaimer p { font-size: .78rem; color: rgba(255,255,255,.4); line-height: 1.6; }
.footer-disclaimer strong { color: rgba(255,255,255,.55); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: var(--space-4) 0;
  flex-wrap: wrap; gap: .75rem;
}
.footer-copyright { font-size: .78rem; color: rgba(255,255,255,.35); }
.footer-bottom-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-bottom-links a { font-size: .78rem; color: rgba(255,255,255,.35); transition: color var(--transition-fast); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.6); }

/* ========================
   28. RESPONSIVE DESIGN
   ======================== */

/* ── Global overflow guard ── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
*, *::before, *::after { min-width: 0; } /* Prevent grid/flex children from overflowing */

/* ── Tables: always scrollable on small screens ── */
.rarity-table-wrapper,
.comparison-table-wrap,
.breakdown-table-wrap,
.milestones-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rarity-table,
.comparison-table,
.breakdown-table {
  min-width: 540px;
}

/* ── Buttons: never overflow on narrow screens ── */
.btn {
  max-width: 100%;
  box-sizing: border-box;
}

/* ──────────────────────────────
   TABLET  ≤ 1024px
   ────────────────────────────── */
@media (max-width: 1024px) {
  :root { --container-px: 1.25rem; }

  /* Hero: stack vertically */
  .hero-section .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-visual { justify-content: center; }
  .hero-subtitle { margin: 0 auto var(--space-8); }
  .hero-cta-group { justify-content: center; }
  .hero-stats { justify-content: center; }
  .rarity-cards-preview {
    grid-template-columns: repeat(3, 1fr);
    max-width: 380px;
    margin: 0 auto;
  }

  /* Calculator / Simulator / Guide: single column */
  .calculator-layout { grid-template-columns: 1fr; }
  .simulator-layout  { grid-template-columns: 1fr; }
  .guide-layout      { grid-template-columns: 1fr; }
  .guide-sidebar     { position: static; }

  /* Education: single column */
  .education-grid { grid-template-columns: 1fr; }

  /* Footer: 2-column */
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Value calc: single column stack */
  .value-calc-layout {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .trade-verdict-panel { width: 100%; position: static; }
}

/* ──────────────────────────────
   MOBILE  ≤ 768px
   ────────────────────────────── */
@media (max-width: 768px) {
  /* Header */
  .main-nav   { display: none; }
  .header-cta { display: none; }
  .hamburger  { display: flex; }
  .header-inner { gap: var(--space-3); }

  /* Typography */
  .hero-title    { font-size: 1.85rem; line-height: 1.15; }
  .hero-subtitle { font-size: .97rem; }
  .section-title { font-size: 1.4rem; }
  .page-hero-title { font-size: 1.7rem; }

  /* Hero stats: wrap + smaller */
  .hero-stats { flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
  .stat-item strong { font-size: 1.2rem; }

  /* Hero CTA */
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
    gap: .75rem;
  }
  .hero-cta-group .btn { width: 100%; max-width: 320px; justify-content: center; }

  /* Rarity preview cards: 3-col on mobile (compact) */
  .rarity-cards-preview {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    gap: .5rem;
  }
  .rarity-preview-card { padding: .75rem .5rem; }
  .rarity-emoji { font-size: 1.4rem; }
  .rarity-name  { font-size: .65rem; }
  .rarity-pct   { font-size: .9rem; }

  /* Sections: reduce padding */
  .hero-section,
  .tools-section,
  .explainer-section,
  .rarity-section,
  .education-section,
  .guides-section,
  .faq-section,
  .cta-section { padding: var(--space-12) 0; }

  /* Tools grid: single column */
  .tools-grid { grid-template-columns: 1fr; }

  /* Explainer grid: single column */
  .explainer-grid { grid-template-columns: 1fr; }

  /* Education grid: single column */
  .education-grid { grid-template-columns: 1fr; gap: var(--space-6); }

  /* Guides grid: single column */
  .guides-grid { grid-template-columns: 1fr; }

  /* Mistake cards: single column */
  .mistake-cards { grid-template-columns: 1fr; }

  /* Metrics grid: 2-column */
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .metric-value { font-size: 1.3rem; }

  /* Footer: single column */
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer-tagline { max-width: 100%; }

  /* Value calc: always single column on mobile */
  .value-calc-layout {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .trade-verdict-panel { width: 100%; position: static; }

  /* Trade example body: stack on mobile */
  .trade-example-body {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }
  .trade-ex-vs { text-align: center; font-size: 1.2rem; }

  /* Simulator cards: smaller */
  .sim-blook-card { width: 100px; }

  /* Blook adder: stack inputs */
  .blook-adder { padding: 1rem; }
  .blook-adder .form-group { gap: .4rem; }

  /* Trade side layout: full width panels */
  .trade-side-header { padding: 1rem; }
  .trade-blook-list  { padding: .75rem 1rem; }
  .trade-side-total  { padding: .75rem 1rem; }
  .blook-adder       { padding: .75rem 1rem; }

  /* CTA box */
  .cta-box { padding: var(--space-10) var(--space-5); }
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: .75rem;
  }
  .cta-buttons .btn { width: 100%; max-width: 300px; justify-content: center; }

  /* Value ref grid: 2-col */
  .value-ref-grid { grid-template-columns: repeat(2, 1fr); }

  /* Value tiers: 2-col */
  .value-tiers-grid { grid-template-columns: repeat(2, 1fr); }

  /* Tips grid: 1-col */
  .tips-grid { grid-template-columns: 1fr; }

  /* Edu cards: 1-col */
  .edu-cards-grid { grid-template-columns: 1fr; }

  /* Steps grid: 1-col */
  .steps-grid { grid-template-columns: 1fr; }

  /* Rarity result grid: 2-col */
  .rarity-result-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }

  /* Sim tally: 2-col */
  .sim-tally-grid { grid-template-columns: repeat(2, 1fr); }

  /* Blook list: 2-col */
  .blook-list { grid-template-columns: repeat(2, 1fr); }

  /* Pack info card: full width */
  .pack-info-card { margin: 0 1rem 1.25rem; }

  /* Form inside calc */
  .calc-form { padding: 0 1rem 1.25rem; }
  .calc-panel-header { padding: 1.25rem 1rem 0; }
  .calc-results { padding: 1rem; }

  /* Charts */
  .chart-wrap-tall { height: 200px; }

  /* Related tools: wrap neatly */
  .related-tools-grid { gap: .6rem; flex-wrap: wrap; }
  .related-tool-card  { padding: .55rem 1rem; font-size: .82rem; flex-shrink: 0; }

  /* Hero tags */
  .hero-tags { justify-content: center; gap: .4rem; }
  .tag { font-size: .75rem; padding: .25rem .65rem; }

  /* Breadcrumb smaller */
  .breadcrumb { font-size: .78rem; flex-wrap: wrap; }

  /* Page hero */
  .page-hero   { padding: var(--space-8) 0; }
  .page-hero-icon { font-size: 2.4rem; }

  /* Rarity detailed cards */
  .rarity-detailed-grid { gap: 1rem; }

  /* Guide charts */
  .guide-charts-grid { gap: 1rem; }
  .chart-card { padding: 1rem; }

  /* Blook list filters: scroll horizontally */
  .blook-list-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .25rem; }
  .filter-btn { flex-shrink: 0; }

  /* Blook list header: stack */
  .blook-list-header { flex-direction: column; align-items: flex-start; }

  /* Formula box: smaller */
  .formula-box.large { font-size: .95rem; padding: .75rem 1rem; }
  .formula-display   { font-size: .8rem; overflow-x: auto; }

  /* Mode tabs */
  .mode-tabs { flex-direction: row; }
  .mode-tab  { font-size: .75rem; padding: .45rem .5rem; }

  /* Milestones grid: 2-col */
  .milestones-grid { grid-template-columns: repeat(2, 1fr); }

  /* Comparison section */
  .comparison-section { padding: var(--space-10) 0; }

  /* Guide content padding */
  .guide-content { padding: var(--space-8) 0 var(--space-12); }

  /* Prose content */
  .prose-content h2 { font-size: 1.2rem; }
  .seo-content-section { padding: var(--space-8) 0; }

  /* How-to section */
  .how-to-section { padding: var(--space-10) 0; }

  /* Sim stage: smaller padding */
  .sim-stage { padding: 1.25rem; min-height: 200px; }

  /* Sim cards: smaller */
  .sim-blook-card { width: 90px; padding: .75rem .5rem; }
  .sim-blook-card .blook-emoji { font-size: 1.6rem; }

  /* Sim summary banner */
  .sim-summary-banner { padding: 1rem; }
}

/* ──────────────────────────────
   SMALL MOBILE  ≤ 480px
   ────────────────────────────── */
@media (max-width: 480px) {
  :root { --container-px: .875rem; }

  /* Typography */
  .hero-title    { font-size: 1.6rem; }
  .section-title { font-size: 1.25rem; }
  .page-hero-title { font-size: 1.5rem; }

  /* Rarity preview: 2×3 on small mobile */
  .rarity-cards-preview {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    gap: .4rem;
  }
  .rarity-preview-card { padding: .6rem .4rem; }

  /* Metrics: single column */
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .metric-card  { padding: .85rem .65rem; }
  .metric-value { font-size: 1.1rem; }

  /* Hero CTA: full-width stacked */
  .hero-cta-group { flex-direction: column; align-items: stretch; }
  .hero-cta-group .btn { max-width: 100%; }

  /* CTA buttons */
  .cta-buttons { flex-direction: column; align-items: stretch; }
  .cta-buttons .btn { max-width: 100%; }

  /* Guide CTA */
  .guide-cta-buttons { flex-direction: column; align-items: stretch; }
  .guide-cta-buttons .btn { max-width: 100%; width: 100%; }

  /* Value ref: 2-col stays but smaller */
  .value-ref-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }

  /* Value tiers: 2-col on 480px */
  .value-tiers-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }

  /* Rarity result grid: 2-col */
  .rarity-result-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }

  /* Sim tally: 2-col */
  .sim-tally-grid { grid-template-columns: repeat(2, 1fr); }

  /* Blook list: 2-col */
  .blook-list { grid-template-columns: repeat(2, 1fr); }

  /* Pack info card */
  .pack-info-card { margin: 0 .875rem 1rem; }
  .calc-form { padding: 0 .875rem 1rem; }
  .calc-panel-header { padding: 1rem .875rem 0; }

  /* Footer tags: smaller */
  .footer-tag { font-size: .7rem; padding: .15rem .55rem; }

  /* Sim session stats */
  .sim-session-stats { margin: 0 .875rem 1rem; }

  /* Chart height: smaller on tiny screens */
  .chart-wrap-tall { height: 180px; }

  /* Comparison table: allow horizontal scroll  */
  .comparison-table { min-width: 480px; }
  .rarity-table     { min-width: 480px; }
  .breakdown-table  { min-width: 480px; }

  /* Milestones: 2-col */
  .milestones-grid { grid-template-columns: repeat(2, 1fr); }

  /* Formula card */
  .formula-card { padding: 1rem; }

  /* Blook list header */
  .blook-list-header { gap: .5rem; }

  /* FAQ question text */
  .faq-question { font-size: .88rem; padding: 1rem 1.1rem; }
  .faq-answer p { padding: 0 1.1rem 1rem; }

  /* Steps */
  .step-card { padding: var(--space-5); }

  /* Related tools */
  .related-tools-grid { gap: .5rem; }
  .related-tool-card  { padding: .5rem .85rem; font-size: .8rem; }

  /* Section padding */
  .hero-section,
  .tools-section,
  .explainer-section,
  .rarity-section,
  .education-section,
  .guides-section,
  .faq-section,
  .cta-section { padding: var(--space-10) 0; }

  /* Trade example */
  .trade-examples { gap: .75rem; }
  .trade-example-body { padding: .75rem 1rem; flex-direction: column; align-items: stretch; }

  /* CTA box padding */
  .cta-box { padding: var(--space-8) var(--space-4); }
  .cta-box h2 { font-size: 1.3rem; }

  /* Breadcrumb */
  .breadcrumb { font-size: .75rem; gap: .3rem; }

  /* Radio group */
  .radio-option { font-size: .82rem; padding: .5rem .65rem; }

  /* Form elements */
  .form-input, .form-select { font-size: .875rem; padding: .65rem .875rem; }
  .btn-lg { padding: .8rem 1.4rem; font-size: .95rem; }
}

/* ──────────────────────────────
   VERY SMALL  ≤ 360px
   ────────────────────────────── */
@media (max-width: 360px) {
  :root { --container-px: .75rem; }

  .hero-title { font-size: 1.4rem; }
  .page-hero-title { font-size: 1.35rem; }
  .section-title { font-size: 1.15rem; }

  /* Rarity preview: 3-col stays, just tighter */
  .rarity-cards-preview { grid-template-columns: repeat(3, 1fr); gap: .3rem; }
  .rarity-preview-card { padding: .5rem .3rem; }
  .rarity-emoji { font-size: 1.2rem; }
  .rarity-name  { font-size: .6rem; }
  .rarity-pct   { font-size: .8rem; }

  .blook-list { grid-template-columns: 1fr 1fr; }
  .sim-tally-grid { grid-template-columns: 1fr 1fr; }

  .metrics-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .metric-card  { padding: .75rem .5rem; }
  .metric-value { font-size: 1rem; }

  .cta-box h2 { font-size: 1.1rem; }
  .cta-box p  { font-size: .9rem; }

  .tool-card { padding: var(--space-5); }
  .explainer-card { padding: var(--space-5); }
  .guide-card { padding: var(--space-5); }

  /* Value tiers: 1-col on tiny screens */
  .value-tiers-grid { grid-template-columns: 1fr; }

  /* Rarity result: 1-col */
  .rarity-result-grid { grid-template-columns: 1fr; }

  /* Sim blook card: even smaller */
  .sim-blook-card { width: 80px; }