/* Hallmark · design-system: hamster-club-indicators · tone: warm-expert · visual-density: 5 · design-variance: 6 */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Nunito:wght@400;500;600;700&display=swap');

:root {
  /* === COLOUR SYSTEM === */
  /* Primary brand palette */
  --color-coral: #FF8A5B;
  --color-gold: #FFB627;
  --color-cream: #FFFBF5;
  --color-ink: #3A2E29;

  /* Indicator-specific accent colours */
  --acc-whale-primary: #3B82F6;
  --acc-whale-secondary: #06B6D4;
  --acc-mmflow-primary: #7C3AED;
  --acc-mmflow-secondary: #5a3aa0;
  --acc-balls-primary: #22C55E;
  --acc-balls-secondary: #EF4444;
  --acc-rail-primary: #29B6F6;
  --acc-rail-secondary: #FF1493;

  /* Neutral palette */
  --color-white: #FFFFFF;
  --color-black: #0A0A0A;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Semantic colours */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;

  /* Brand gradient */
  --gradient-brand: linear-gradient(135deg, #FF8A5B, #FFB627);

  /* Dark graph canvas (for contrast with light cream background) */
  --color-chart-bg: #1A1A2E;
  --color-chart-surface: #16213E;
  --color-chart-border: #0F3460;

  /* === TYPOGRAPHY === */
  --font-display: 'Baloo 2', sans-serif;
  --font-body: 'Nunito', sans-serif;

  /* Type scale (modular 1.25 ratio) */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.5rem;      /* 24px */
  --text-2xl: 1.875rem;   /* 30px */
  --text-3xl: 2.25rem;    /* 36px */
  --text-4xl: 3rem;       /* 48px */
  --text-5xl: 3.75rem;    /* 60px */
  --text-display: 4.5rem; /* 72px */

  /* Line heights */
  --lh-tight: 1.25;
  --lh-normal: 1.5;
  --lh-relaxed: 1.75;
  --lh-loose: 2;

  /* Font weights */
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-xbold: 800;

  /* === SPACING SCALE (4pt base) === */
  --space-xs: 0.25rem;    /* 4px */
  --space-sm: 0.5rem;     /* 8px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */

  /* === BORDER RADIUS === */
  --radius-none: 0;
  --radius-xs: 0.25rem;   /* 4px */
  --radius-sm: 0.5rem;    /* 8px */
  --radius-md: 0.75rem;   /* 12px */
  --radius-lg: 1rem;      /* 16px */
  --radius-xl: 1.5rem;    /* 24px */
  --radius-2xl: 2rem;     /* 32px */
  --radius-full: 9999px;

  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-chart: 0 20px 40px -15px rgba(0, 0, 0, 0.2);

  /* === TRANSITIONS === */
  --dur-fast: 150ms;
  --dur-base: 200ms;
  --dur-slow: 300ms;

  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 1, 1, 0.2);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* === Z-INDEX SCALE === */
  --z-hide: -1;
  --z-base: 0;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-fixed: 30;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-popover: 60;
  --z-tooltip: 70;

  /* === LAYOUT === */
  --container-max: 1280px;
  --container-pad: 1rem;
}

@media (min-width: 768px) {
  :root {
    --container-pad: 1.5rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --container-pad: 2rem;
  }
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--color-ink);
  background-color: var(--color-cream);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-xbold);
  line-height: var(--lh-tight);
  color: var(--color-ink);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-coral);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--color-gold);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

strong {
  font-weight: var(--fw-bold);
}

/* === RESPONSIVE UTILITY === */
@media (max-width: 767px) {
  h1 {
    font-size: var(--text-3xl);
  }
  h2 {
    font-size: var(--text-2xl);
  }
  h3 {
    font-size: var(--text-xl);
  }
}

/* === CONTAINER === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* === LAYOUT: BENTO GRID === */
.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  grid-auto-flow: dense;
}

@media (min-width: 768px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
  }

  .bento-featured,
  .bento-tile {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 767px) {
  .bento {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .bento-featured,
  .bento-tile {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

/* === SECTIONS === */
section {
  padding: var(--space-3xl) var(--container-pad);
}

section + section {
  border-top: 1px solid var(--color-gray-200);
}

/* === SITE HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-fixed);
  background-color: var(--color-cream);
  border-bottom: 1px solid var(--color-gray-200);
  padding: var(--space-md) var(--container-pad);
  backdrop-filter: blur(10px);
  background-color: rgba(255, 251, 245, 0.95);
}

.site-header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--color-ink);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.site-header-logo:hover {
  opacity: 0.8;
}

.site-header-logo img {
  width: 32px;
  height: 32px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.site-nav a {
  font-size: var(--text-sm);
  color: var(--color-ink);
  transition: color var(--dur-fast) var(--ease-out);
}

.site-nav a:hover {
  color: var(--color-coral);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--color-coral);
  font-weight: var(--fw-semibold);
}

@media (max-width: 767px) {
  .site-nav {
    display: none;
  }

  .burger-btn {
    display: block;
  }
}

@media (min-width: 768px) {
  .burger-btn {
    display: none;
  }
}

.burger-btn {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.burger-btn:hover {
  opacity: 0.7;
}

.burger-btn span {
  width: 24px;
  height: 2px;
  background-color: var(--color-ink);
  transition: all var(--dur-fast) var(--ease-out);
  display: block;
}

.burger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.burger-btn.active span:nth-child(2) {
  opacity: 0;
}

.burger-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

/* === HERO === */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--container-pad);
  text-align: center;
}

.hero-inner {
  max-width: 900px;
}

.hero h1 {
  margin-bottom: var(--space-lg);
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: var(--text-lg);
  color: var(--color-gray-600);
  margin-bottom: var(--space-xl);
  line-height: var(--lh-relaxed);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding: var(--space-2xl) var(--container-pad);
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero p {
    font-size: var(--text-base);
  }

  .hero-cta {
    flex-direction: column;
  }
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary {
  background: var(--gradient-brand);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

.btn-ghost {
  background: transparent;
  color: var(--color-coral);
  border: 2px solid var(--color-coral);
}

.btn-ghost:hover {
  background: var(--color-coral);
  color: var(--color-white);
  text-decoration: none;
}

.btn-ghost:active {
  transform: scale(0.98);
}

.btn-ghost:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

.btn-secondary {
  background-color: var(--color-gray-100);
  color: var(--color-ink);
}

.btn-secondary:hover {
  background-color: var(--color-gray-200);
  text-decoration: none;
}

/* === GUIDE TILE (CARD) === */
.guide-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background-color: var(--color-white);
  box-shadow: var(--shadow-md);
  transition: all var(--dur-base) var(--ease-out);
  text-decoration: none;
  color: var(--color-ink);
}

.guide-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.guide-tile:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

.guide-tile-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tile-accent-1, #FF8A5B), var(--tile-accent-2, #FFB627));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-4xl);
  color: rgba(255, 255, 255, 0.1);
  font-weight: var(--fw-xbold);
}

.guide-tile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder fallback gradient when image is loading */
.guide-tile-cover[data-loading] {
  background: linear-gradient(135deg, var(--tile-accent-1, #FF8A5B), var(--tile-accent-2, #FFB627));
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

.guide-tile-content {
  flex: 1;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.guide-tile h3 {
  font-size: var(--text-xl);
  margin: 0;
  color: var(--color-ink);
}

.guide-tile p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  line-height: var(--lh-normal);
}

.guide-tile-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--tile-accent-1, #FF8A5B);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  margin-top: auto;
}

/* Indicator-specific tile accent colours */
.guide-tile.whale .guide-tile-cover {
  --tile-accent-1: #3B82F6;
  --tile-accent-2: #06B6D4;
}

.guide-tile.whale .guide-tile-badge {
  --tile-accent-1: #3B82F6;
}

.guide-tile.mmflow .guide-tile-cover {
  --tile-accent-1: #7C3AED;
  --tile-accent-2: #5a3aa0;
}

.guide-tile.mmflow .guide-tile-badge {
  --tile-accent-1: #7C3AED;
}

.guide-tile.balls .guide-tile-cover {
  --tile-accent-1: #22C55E;
  --tile-accent-2: #EF4444;
}

.guide-tile.balls .guide-tile-badge {
  --tile-accent-1: #22C55E;
}

.guide-tile.rail .guide-tile-cover {
  --tile-accent-1: #29B6F6;
  --tile-accent-2: #FF1493;
}

.guide-tile.rail .guide-tile-badge {
  --tile-accent-1: #29B6F6;
}

/* === SIGNAL LEGEND === */
.signal-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.signal-card {
  background-color: var(--color-chart-bg);
  border: 1px solid var(--color-chart-border);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  color: var(--color-white);
}

.signal-card h4 {
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
  font-size: var(--text-lg);
}

.signal-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-gray-200);
  line-height: var(--lh-relaxed);
}

/* === CHART FIGURE === */
.chart-figure {
  margin: var(--space-2xl) 0;
  padding: var(--space-lg);
  background-color: var(--color-chart-bg);
  border: 2px solid var(--color-chart-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.chart-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-md);
}

.chart-figure figcaption {
  font-size: var(--text-sm);
  color: var(--color-gray-300);
  font-style: italic;
}

/* === SETTINGS TABLE === */
.settings-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-variant-numeric: tabular-nums;
}

.settings-table th {
  background-color: var(--color-chart-surface);
  color: var(--color-gold);
  text-align: left;
  padding: var(--space-md);
  font-weight: var(--fw-bold);
  border-bottom: 2px solid var(--color-chart-border);
}

.settings-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-gray-200);
}

.settings-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 767px) {
  .settings-table {
    font-size: var(--text-sm);
  }

  .settings-table th,
  .settings-table td {
    padding: var(--space-sm);
  }
}

/* === SETTINGS ACCORDION === */
.settings-accordion {
  list-style: none;
  margin: var(--space-xl) 0;
}

.accordion-item {
  border-bottom: 1px solid var(--color-gray-200);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background-color: var(--color-white);
  border: none;
  cursor: pointer;
  width: 100%;
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  transition: all var(--dur-fast) var(--ease-out);
}

.accordion-header:hover {
  background-color: var(--color-gray-50);
}

.accordion-header:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: -2px;
}

.accordion-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  transition: transform var(--dur-base) var(--ease-out);
  flex-shrink: 0;
  margin-left: var(--space-md);
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: var(--space-lg);
  background-color: var(--color-gray-50);
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--color-gray-700);
}

.accordion-item.open .accordion-content {
  display: block;
  animation: slideDown var(--dur-base) var(--ease-out);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === STICKY TOC (TABLE OF CONTENTS) === */
.toc-wrapper {
  position: relative;
}

.toc {
  position: sticky;
  top: 100px;
  list-style: none;
  padding: var(--space-md);
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  max-height: 80vh;
  overflow-y: auto;
  font-size: var(--text-sm);
}

.toc li {
  margin-bottom: var(--space-sm);
}

.toc a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-ink);
  transition: all var(--dur-fast) var(--ease-out);
  border-radius: var(--radius-sm);
}

.toc a:hover {
  background-color: var(--color-gray-50);
  color: var(--color-coral);
  text-decoration: none;
}

.toc a.active {
  background-color: var(--color-coral);
  color: var(--color-white);
  font-weight: var(--fw-semibold);
}

@media (max-width: 1023px) {
  .toc {
    display: none;
  }
}

/* === CALLOUT / ALERTS === */
.callout {
  padding: var(--space-lg);
  border-left: 4px solid var(--color-gold);
  background-color: var(--color-gray-50);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
  font-size: var(--text-sm);
}

.callout.tip {
  border-left-color: var(--color-info);
  background-color: rgba(59, 130, 246, 0.05);
}

.callout.warning {
  border-left-color: var(--color-warning);
  background-color: rgba(245, 158, 11, 0.05);
}

.callout.error {
  border-left-color: var(--color-error);
  background-color: rgba(239, 68, 68, 0.05);
}

.callout h5 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  font-size: var(--text-base);
}

.callout p {
  margin-bottom: 0;
}

/* === FAQ ACCORDION === */
.faq {
  list-style: none;
}

.faq-item {
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-gray-200);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  transition: color var(--dur-fast) var(--ease-out);
}

.faq-question:hover {
  color: var(--color-coral);
}

.faq-question:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

.faq-toggle {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
  margin-left: var(--space-md);
}

.faq-item.open .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 0 var(--space-lg) 0;
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--color-gray-700);
}

.faq-item.open .faq-answer {
  display: block;
  animation: slideDown var(--dur-base) var(--ease-out);
}

/* === CTA BLOCK === */
.cta-block {
  background: var(--gradient-brand);
  color: var(--color-white);
  padding: var(--space-2xl) var(--space-lg);
  border-radius: var(--radius-lg);
  text-align: center;
  margin: var(--space-2xl) 0;
}

.cta-block h3 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.cta-block p {
  margin-bottom: var(--space-lg);
  color: rgba(255, 255, 255, 0.9);
}

.cta-block .btn {
  margin: 0 auto;
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-coral);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  gap: var(--space-xs);
}

.badge-gold {
  background-color: var(--color-gold);
}

.badge-gray {
  background-color: var(--color-gray-300);
  color: var(--color-ink);
}

/* === STEPS / NUMBERED LIST === */
.steps {
  list-style: none;
  counter-reset: step-counter;
}

.steps li {
  counter-increment: step-counter;
  margin-bottom: var(--space-2xl);
  padding-left: var(--space-xl);
  position: relative;
}

.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gradient-brand);
  color: var(--color-white);
  border-radius: var(--radius-full);
  font-weight: var(--fw-bold);
}

.steps li h4 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.steps li p {
  margin-bottom: var(--space-sm);
}

/* === SITE FOOTER === */
.site-footer {
  background-color: var(--color-ink);
  color: var(--color-white);
  padding: var(--space-2xl) var(--container-pad);
  border-top: 1px solid var(--color-gray-800);
  margin-top: var(--space-3xl);
}

.site-footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.site-footer h4 {
  color: var(--color-gold);
  margin-bottom: var(--space-md);
}

.site-footer a {
  color: var(--color-gray-300);
  transition: color var(--dur-fast) var(--ease-out);
}

.site-footer a:hover {
  color: var(--color-coral);
  text-decoration: none;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.site-footer-bottom {
  border-top: 1px solid var(--color-gray-800);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-gray-400);
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === UTILITY CLASSES === */
.text-center {
  text-align: center;
}

.text-wrap-balance {
  text-wrap: balance;
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-2xl {
  margin-bottom: var(--space-2xl);
}

.mt-2xl {
  margin-top: var(--space-2xl);
}

.py-2xl {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.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;
}

/* === MOBILE OVERFLOW & RESPONSIVE FIX === */
/* Ensure inline grid-template-columns collapse on mobile */
@media (max-width: 767px) {
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.2fr"],
  [style*="grid-template-columns:1fr 1.2fr"],
  [style*="1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Prevent horizontal overflow and ensure responsive images */
html,
body {
  max-width: 100%;
}

img,
svg,
.chart-figure img {
  max-width: 100%;
  height: auto;
}

/* === FIX PASS 2: мобильный hero overflow + featured-плитка === */
@media (max-width: 767px) {
  .hero h1 { font-size: var(--text-3xl) !important; overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
  .hero h1, .hero p { max-width: 100%; }
  .hero { padding-left: var(--container-pad) !important; padding-right: var(--container-pad) !important; }
  .hero .container, .hero-inner { padding-left: 0; padding-right: 0; max-width: 100%; }
}
@media (min-width: 768px) {
  /* featured-плитка: cover заполняет высоту, контент компактно внизу — без вертикальной пустоты */
  .bento-featured .guide-tile-cover { aspect-ratio: auto; flex: 1 1 auto; min-height: 320px; }
  .bento-featured .guide-tile-content { flex: 0 0 auto; }
}
