/* ============================================================
   MyTrakt Landing — Design System
   Faithful replica of the addon's dark theme (Trakt-inspired)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ---- CSS Custom Properties (Dark theme — mirrors globals.css oklch values) ---- */
:root {
  --bg:            oklch(0.13 0 0);        /* --background */
  --bg-grad-end:   oklch(0.18 0 0);        /* --card (gradient end) */
  --card:          oklch(0.18 0 0);        /* --card */
  --card-2:        oklch(0.21 0 0);        /* --muted (slightly lighter card) */
  --sidebar:       oklch(0.15 0 0);        /* --sidebar */
  --foreground:    oklch(0.95 0 0);        /* --foreground */
  --muted:         oklch(0.21 0 0);        /* --muted */
  --muted-fg:      oklch(0.75 0 0);        /* --muted-foreground */
  --border:        oklch(0.3 0 0);         /* --border */
  --primary:       oklch(0.6 0.25 12);     /* --primary  (Trakt red) */
  --primary-fg:    oklch(1 0 0);           /* --primary-foreground */
  --success:       #4caf7d;
  --success-bg:    oklch(0.6 0.18 152 / 0.12);
  --success-border:oklch(0.6 0.18 152 / 0.28);
  --destructive:   oklch(0.6 0.25 12);     /* --destructive (same as primary) */
  --destructive-bg: oklch(0.6 0.25 12 / 0.12);
  --destructive-border: oklch(0.6 0.25 12 / 0.28);
  --warning:       #e8a020;
  --warning-bg:    rgba(232, 160, 32, 0.12);
  --warning-border:rgba(232, 160, 32, 0.28);
  --input:         oklch(0.21 0 0);        /* --input */
  --radius:        0.5rem;
  --radius-lg:     0.75rem;
  --font-sans:     'Source Sans 3', system-ui, sans-serif;
  --font-serif:    'Playfair Display', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-grad-end) 100%);
  color: var(--foreground);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ---- Utility ---- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-sm { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 1rem; }
.container-md { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--foreground);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p { color: var(--muted-fg); line-height: 1.7; }

.text-primary { color: var(--primary); }
.text-muted   { color: var(--muted-fg); }
.text-success { color: var(--success); }
.font-bold    { font-weight: 700; }
.font-semibold{ font-weight: 600; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity .15s, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}
.btn-primary:hover { opacity: .88; }
.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--muted); }
.btn-ghost {
  background: transparent;
  color: var(--muted-fg);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--muted); color: var(--foreground); }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-icon { padding: 0.45rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem 0.75rem;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-content { padding: 0 1.5rem 1.5rem; }
.card-content-pt { padding: 1.5rem; }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.badge-secondary { background: var(--muted); color: var(--muted-fg); }
.badge-success   { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-danger    { background: var(--destructive-bg); color: var(--destructive); border-color: var(--destructive-border); }
.badge-primary   { background: var(--primary); color: var(--primary-fg); }
.badge-recommend {
  background: linear-gradient(135deg, rgba(237,28,36,.15), rgba(237,28,36,.08));
  color: var(--primary);
  border-color: rgba(237,28,36,.35);
  font-weight: 600;
}
.badge-recommend svg {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

/* ---- Spinner ---- */
.spinner {
  width: 1rem; height: 1rem;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--muted) 25%, var(--card-2) 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 0.25rem;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 28, 28, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--foreground);
}
.nav-logo-img {
  width: 2rem; height: 2rem;
  border-radius: 0.4rem;
  object-fit: contain;
  flex-shrink: 0;
}
.nav-logo-icon {
  width: 2rem; height: 2rem;
  background: var(--primary);
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.nav-logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.nav-logo-icon .logo-fallback {
  font-size: 0.6rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted-fg);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--foreground); background: var(--muted); }
.nav-link.active { background: var(--primary); color: var(--primary-fg); }
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius);
}
.nav-hamburger:hover { background: var(--muted); }
.nav-hamburger svg { width: 22px; height: 22px; }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile .nav-link { width: 100%; padding: 0.55rem 0.75rem; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 1rem 3rem;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(237,28,36,.12), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 80%);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(237,28,36,.12);
  color: var(--primary);
  border: 1px solid rgba(237,28,36,.3);
  border-radius: 9999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero-sub {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--muted-fg);
}
.hero-points {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  max-width: 760px;
  margin: -0.5rem auto 2rem;
}
.hero-points span {
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: .35rem .75rem;
  background: rgba(255,255,255,.035);
  color: var(--muted-fg);
  font-size: .8rem;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   INSTANCES SECTION
   ============================================================ */
.section { padding: 4rem 1rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { max-width: 560px; margin: 0 auto; }

/* Recommend banner */
.recommend-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(237,28,36,.07);
  border: 1px solid rgba(237,28,36,.25);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}
.recommend-banner svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; margin-top: 0.1rem; }
.recommend-banner p { margin: 0; font-size: 0.9rem; color: var(--foreground); }
.recommend-banner strong { color: var(--primary); }

/* Summary row */
.instances-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (max-width: 480px) { .instances-summary { grid-template-columns: 1fr; } }

.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.summary-icon {
  width: 2.2rem; height: 2.2rem;
  background: rgba(237,28,36,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.summary-icon.green { background: rgba(76,175,125,.12); }
.summary-icon svg { width: 18px; height: 18px; color: var(--primary); }
.summary-icon.green svg { color: var(--success); }
.summary-label { font-size: 0.78rem; color: var(--muted-fg); margin-bottom: 0.1rem; }
.summary-value { font-size: 1.5rem; font-weight: 700; color: var(--foreground); line-height: 1; }

/* Instance cards grid */
.instances-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.instance-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.instance-card.recommended {
  border-color: rgba(237,28,36,.45);
  box-shadow: 0 0 0 1px rgba(237,28,36,.2), 0 4px 24px rgba(237,28,36,.08);
}
.instance-card-header {
  padding: 1.25rem 1.5rem 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.instance-name a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--foreground);
  transition: color .15s;
}
.instance-name a:hover { color: var(--primary); }
.instance-url {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted-fg);
  margin-top: 0.2rem;
  transition: color .15s;
}
.instance-url:hover { color: var(--primary); }
.instance-url svg { width: 11px; height: 11px; }

.instance-stats {
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.stat-col .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-fg);
  margin-bottom: 0.2rem;
}
.stat-col .stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1;
}
.stat-skeleton { display: inline-block; width: 3rem; height: 1.4rem; }

.instance-footer {
  padding: 1rem 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
  flex-wrap: wrap;
}
.instance-resp {
  font-size: 0.75rem;
  color: var(--muted-fg);
}
.instance-error {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--destructive);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps-bg { background: rgba(255,255,255,.02); }
.steps-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}
.step-number {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 9999px;
}
.step-icon {
  width: 3.5rem; height: 3.5rem;
  background: var(--muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto 1.25rem;
}
.step-icon svg { width: 24px; height: 24px; color: var(--primary); }
.step-card h3 { margin-bottom: 0.5rem; font-family: var(--font-sans); }
.step-card p { font-size: 0.9rem; }

/* ============================================================
   CATALOG SOURCES
   ============================================================ */
.catalog-section { border-top: 1px solid rgba(255,255,255,.04); }
.catalog-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.catalog-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.catalog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(237,28,36,.45);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.catalog-card-accent {
  border-color: rgba(237,28,36,.38);
  background: linear-gradient(160deg, rgba(237,28,36,.1), var(--card) 55%);
}
.catalog-card-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.catalog-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .75rem;
  background: rgba(237,28,36,.12);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 800;
}
.catalog-card h3 { font-family: var(--font-sans); font-size: 1.1rem; margin-bottom: .5rem; }
.catalog-card p { font-size: .88rem; }
.catalog-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: 1.25rem; }
.catalog-tags span { padding: .2rem .55rem; border-radius: 9999px; background: var(--muted); color: var(--muted-fg); font-size: .72rem; }

/* ============================================================
   CROSS-SYNC
   ============================================================ */
.cross-sync-section {
  background: linear-gradient(135deg, rgba(237,28,36,.07), rgba(255,255,255,.015));
  border-top: 1px solid rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .9rem;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.section-kicker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid rgba(237,28,36,.35);
  border-radius: 50%;
  font-size: .95rem;
  line-height: 1;
}
.sync-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.sync-panel {
  padding: 1.5rem;
  background: rgba(20,20,20,.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.sync-panel-destination { border-color: rgba(76,175,125,.3); }
.sync-panel-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.sync-panel-heading h3 { font-family: var(--font-sans); font-size: 1.05rem; margin-bottom: .15rem; }
.sync-panel-heading p { font-size: .8rem; }
.sync-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .65rem;
  background: rgba(237,28,36,.12);
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
}
.sync-panel-destination .sync-panel-icon { background: var(--success-bg); color: var(--success); }
.sync-provider-list { display: grid; gap: .55rem; list-style: none; }
.sync-provider-list li {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  padding: .7rem .8rem;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: .55rem;
  background: rgba(255,255,255,.025);
}
.sync-provider-list strong { color: var(--foreground); font-size: .88rem; }
.sync-provider-list span { color: var(--muted-fg); font-size: .78rem; }
.sync-points {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}
.sync-points span {
  padding: .35rem .7rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--muted-fg);
  font-size: .78rem;
}
.sync-note { max-width: 720px; margin: 1.25rem auto 0; text-align: center; font-size: .78rem; }

/* ============================================================
   TRUST SIGNALS / FEATURES
   ============================================================ */
.features-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.feature-card {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}
.feature-icon {
  width: 3rem; height: 3rem;
  background: rgba(237,28,36,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.feature-icon svg { width: 22px; height: 22px; color: var(--primary); }
.feature-card h3 { font-family: var(--font-sans); font-size: 1rem; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.85rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--sidebar);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer-brand h3 { font-size: 1rem; font-family: var(--font-sans); margin-bottom: 0.15rem; color: var(--foreground); }
.footer-brand p  { font-size: 0.82rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: center;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--muted-fg);
  transition: color .15s;
}
.footer-links a:hover { color: var(--primary); }
.footer-copy {
  font-size: 0.78rem;
  color: var(--muted-fg);
  margin-top: 1.5rem;
  text-align: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   PAGE CONTENT (about, privacy, etc.)
   ============================================================ */
.page-hero {
  padding: 3.5rem 1rem 2rem;
  text-align: center;
}
.page-hero .page-logo {
  width: 4rem; height: 4rem;
  background: var(--primary);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.03em;
}
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero p { max-width: 560px; margin: 0 auto; }

.content-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.content-card h2 {
  font-size: 1.1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.content-card h2 svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.content-card p { font-size: 0.9rem; line-height: 1.75; }
.content-card ul { padding-left: 1.25rem; }
.content-card ul li { font-size: 0.9rem; color: var(--muted-fg); margin-bottom: 0.3rem; line-height: 1.6; }

.content-section { padding: 1rem 1rem 4rem; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--foreground);
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: border-color .15s;
  outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(237,28,36,.15);
}
.form-textarea { resize: vertical; min-height: 7rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .hero { padding: 3.5rem 1rem 2rem; }
  .hero h1 br { display: none; }
  .section { padding: 3rem 1rem; }
  .instances-grid { grid-template-columns: 1fr; }
  .instance-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-points { gap: .4rem; }
  .hero-points span { font-size: .75rem; }
}

@media (max-width: 700px) {
  .sync-panels { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Refresh button spin state */
.spin { animation: spin .7s linear infinite; }

/* ============================================================
   SETUP PAGE — INSTANCE PICKER
   ============================================================ */
.setup-instances {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.setup-instance-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color .15s, background .15s;
}
.setup-instance-card:hover   { border-color: rgba(237,28,36,.5); background: var(--card-2); }
.setup-instance-card.selected { border-color: var(--primary); background: rgba(237,28,36,.05); }
.setup-instance-info h3 { font-family: var(--font-sans); font-size: 1rem; margin-bottom: 0.2rem; }
.setup-instance-info p { font-size: 0.82rem; }

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,.4);
  padding: 1rem 1.5rem;
  animation: slideUp .25s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
#cookie-banner .cookie-inner {
  max-width: 720px;
  margin: 0 auto;
}
#cookie-banner h3 {
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .3rem;
}
#cookie-banner .cookie-desc {
  font-size: .8rem;
  color: var(--muted-fg);
  margin-bottom: .75rem;
}
#cookie-banner .cookie-desc a { color: var(--primary); }
#cookie-banner .cookie-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
#cookie-expand {
  margin-top: .75rem;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  display: none;
}
#cookie-expand.open { display: block; }
.cookie-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
}
.cookie-toggle-row:last-child { border-bottom: none; }
.cookie-toggle-row input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin-top: .2rem;
  cursor: pointer;
}
.cookie-toggle-row input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
.cookie-toggle-label strong { font-size: .85rem; font-weight: 600; color: var(--foreground); }
.cookie-toggle-label p { font-size: .78rem; margin-top: .1rem; }
.cookie-toggle-actions {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}

/* Floating cookie button */
#cookie-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9998;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: .5rem .9rem;
  cursor: pointer;
  font-size: .78rem;
  font-family: var(--font-sans);
  color: var(--foreground);
  display: none;
  align-items: center;
  gap: .4rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  transition: opacity .15s;
}
#cookie-fab:hover { opacity: .85; }
#cookie-fab.visible { display: flex; }

/* Cookie preferences page */
.cookie-pref-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
}
.cookie-pref-section .cprow {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cookie-pref-section .cprow:last-child { border-bottom: none; }
.cookie-pref-section .cprow.muted-bg { background: rgba(255,255,255,.03); }
.cprow input[type=checkbox] {
  width:16px; height:16px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin-top: .25rem;
  cursor: pointer;
}
.cprow input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
.cprow h3 { font-family: var(--font-sans); font-size: .9rem; font-weight: 600; margin-bottom: .2rem; }
.cprow p  { font-size: .82rem; }
.cprow .hint { font-size: .75rem; margin-top:.25rem; color: var(--muted-fg); }
.pref-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.pref-actions .btn { flex: 1; justify-content: center; min-width: 140px; }
