/* ============================================================
   DARKSAINT GAMES — Shared Stylesheet
   Design system derived from WC_RPG_Worlds_Owner_Reference_v2
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #0d0f14;
  --surface:     #12161f;
  --surface2:    #181d28;
  --surface3:    #1d2333;
  --border:      #252d3d;
  --border2:     #2e3a50;
  --text:        #c8d0e8;
  --text-dim:    #6878a0;
  --text-bright: #eef2ff;
  --text-faint:  #3d4a65;

  --teal:   #3dba8f;
  --purple: #7c5cbf;
  --blue:   #5b8dee;
  --gold:   #c9a84c;
  --orange: #d4833a;
  --red:    #e05555;

  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Consolas', 'SF Mono', monospace;

  --nav-h:    64px;
  --r:        12px;
  --r-sm:     8px;
  --r-xs:     5px;
  --ease:     0.2s ease;
  --ease-out: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; touch-action: manipulation; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; touch-action: manipulation; }

/* Minimum touch target size — applied only on touch screens */
@media (hover: none) and (pointer: coarse) {
  .btn, .nav-mobile a, .sidebar-link { min-height: 44px; }
  .nav-hamburger { min-height: 44px; min-width: 44px; justify-content: center; }
  .stat-item { cursor: default; }
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ── Navigation ────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(13, 15, 20, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 24px;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}
.nav-logo .logo-main {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
}
.nav-logo .logo-sub {
  font-size: 9px;
  font-weight: 500;
  color: var(--purple);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}
.nav-logo .logo-main span { color: var(--orange); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--r-xs);
  border: 1px solid transparent;
  font-size: 12px;
  color: var(--text-dim);
  transition: all var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }
.nav-links a.active { color: var(--text-bright); background: var(--surface3); border-color: var(--border2); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-xs);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  transition: all var(--ease);
}
.btn-discord {
  background: rgba(91, 141, 238, 0.12);
  border-color: rgba(91, 141, 238, 0.3);
  color: var(--blue);
}
.btn-discord:hover { background: rgba(91, 141, 238, 0.22); border-color: rgba(91, 141, 238, 0.5); }
.btn-fab {
  background: rgba(61, 186, 143, 0.12);
  border-color: rgba(61, 186, 143, 0.3);
  color: var(--teal);
}
.btn-fab:hover { background: rgba(61, 186, 143, 0.22); border-color: rgba(61, 186, 143, 0.5); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: all var(--ease);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 10px 12px;
  border-radius: var(--r-xs);
  font-size: 13px;
  color: var(--text-dim);
  transition: all var(--ease);
}
.nav-mobile a:hover { color: var(--text); background: var(--surface2); }

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
  padding: 14px 40px;
  font-size: 12px;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb a { color: var(--text-dim); transition: color var(--ease); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--text-faint); }
.breadcrumb .current { color: var(--text); }

/* ── Hero (Home) ───────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
  padding: 80px 40px;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 45, 61, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 45, 61, 0.45) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: gridDrift 24s linear infinite;
}
@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 44px 44px; }
}
.hero-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 141, 238, 0.07) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
  top: 50%;
  left: 30%;
}
.hero-glow-purple {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 191, 0.06) 0%, transparent 70%);
  pointer-events: none;
  top: 20%;
  right: 10%;
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--orange);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}
.hero-title {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 900;
  color: var(--text-bright);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.hero-title span { color: var(--orange); }
.hero-subtitle {
  font-size: clamp(13px, 1.8vw, 17px);
  color: var(--purple);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-tagline {
  font-size: clamp(14px, 1.5vw, 17px);
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover { background: #4a7ed8; box-shadow: 0 0 20px rgba(91, 141, 238, 0.35); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border2);
}
.btn-outline:hover { border-color: var(--text-dim); background: var(--surface2); }
.btn-teal { background: rgba(61,186,143,0.12); color: var(--teal); border-color: rgba(61,186,143,0.3); }
.btn-teal:hover { background: rgba(61,186,143,0.22); box-shadow: 0 0 16px rgba(61,186,143,0.2); }
.btn-purple { background: rgba(124,92,191,0.12); color: var(--purple); border-color: rgba(124,92,191,0.3); }
.btn-purple:hover { background: rgba(124,92,191,0.22); }
.btn-orange { background: rgba(212,131,58,0.12); color: var(--orange); border-color: rgba(212,131,58,0.3); }
.btn-orange:hover { background: rgba(212,131,58,0.22); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 14px; }

/* ── Stats Bar ─────────────────────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 36px;
  border-right: 1px solid var(--border);
  flex: 1;
  min-width: 140px;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-bright);
  line-height: 1;
}
.stat-num.accent-teal { color: var(--teal); }
.stat-num.accent-blue { color: var(--blue); }
.stat-num.accent-purple { color: var(--purple); }
.stat-num.accent-orange { color: var(--orange); }
.stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── Section ───────────────────────────────────────────────── */
.section { padding: 64px 40px; }
.section-sm { padding: 40px 40px; }
.section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-desc {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 40px;
}

/* ── Cards Grid ────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.products-grid.has-featured { grid-template-columns: 1fr 1fr 1fr; }
.featured-card-wrap { grid-column: 1 / -1; }

/* ── Product Card ──────────────────────────────────────────── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-accent, var(--border));
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-accent, var(--border2));
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px color-mix(in srgb, var(--card-accent, var(--border)) 20%, transparent);
}
.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--surface2);
  position: relative;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}
.product-card:hover .card-image img { transform: scale(1.04); }
.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
  color: var(--text-faint);
  gap: 10px;
}
.card-img-placeholder svg { opacity: 0.35; }
.card-img-placeholder span { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

.card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-studio { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); }
.card-title { font-size: 17px; font-weight: 800; color: var(--text-bright); line-height: 1.2; }
.card-desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.65; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; }

/* ── Featured Card ─────────────────────────────────────────── */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  transition: box-shadow var(--ease);
}
.featured-card:hover { box-shadow: 0 12px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(91,141,238,0.2); }
.featured-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 100% 50%, rgba(91,141,238,0.05) 0%, transparent 60%);
  pointer-events: none;
}
.featured-image {
  height: 100%;
  min-height: 260px;
  overflow: hidden;
  background: var(--surface2);
  position: relative;
}
.featured-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.featured-body { padding: 28px 32px; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.featured-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 6px;
}
.featured-label::before { content: ''; display: block; width: 16px; height: 2px; background: var(--blue); }
.featured-title { font-size: 24px; font-weight: 900; color: var(--text-bright); line-height: 1.1; }
.featured-desc { font-size: 13px; color: var(--text-dim); line-height: 1.7; }
.featured-progress { display: flex; flex-direction: column; gap: 8px; }
.progress-item { display: flex; flex-direction: column; gap: 4px; }
.progress-label { font-size: 10px; color: var(--text-dim); display: flex; justify-content: space-between; }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; background: var(--blue); }
.progress-fill.done { background: var(--teal); }

/* ── Status Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; }
.badge-released { background: rgba(61,186,143,0.15); border: 1px solid rgba(61,186,143,0.3); color: var(--teal); }
.badge-released .badge-dot { background: var(--teal); }
.badge-indev {
  background: rgba(91,141,238,0.15);
  border: 1px solid rgba(91,141,238,0.3);
  color: var(--blue);
  animation: pulseBadge 2.5s ease-in-out infinite;
}
.badge-indev .badge-dot { background: var(--blue); animation: pulseDot 2.5s ease-in-out infinite; }
.badge-available { background: rgba(212,131,58,0.15); border: 1px solid rgba(212,131,58,0.3); color: var(--orange); }
.badge-available .badge-dot { background: var(--orange); }
.badge-editor { background: rgba(201,168,76,0.15); border: 1px solid rgba(201,168,76,0.3); color: var(--gold); }
.badge-editor .badge-dot { background: var(--gold); }

@keyframes pulseBadge {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 8px rgba(91,141,238,0.4); }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 6px rgba(91,141,238,0.8); }
}

/* ── Tags ──────────────────────────────────────────────────── */
.tag {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ── Detail Link ───────────────────────────────────────────── */
.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all var(--ease);
}
.detail-link:hover { color: var(--text-bright); gap: 8px; }
.detail-link svg { transition: transform var(--ease); }
.detail-link:hover svg { transform: translateX(3px); }

/* ── Product Hero (product pages) ──────────────────────────── */
.product-hero {
  padding: 52px 40px 44px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.product-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 100% at 100% 50%, color-mix(in srgb, var(--page-accent, var(--blue)) 6%, transparent) 0%, transparent 60%);
  pointer-events: none;
}
.product-hero-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }
.product-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.product-hero-studio {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--page-accent, var(--blue));
  margin-bottom: 8px;
}
.product-hero-title { font-size: clamp(26px, 4vw, 42px); font-weight: 900; color: var(--text-bright); line-height: 1.1; margin-bottom: 6px; }
.product-hero-version { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }
.product-hero-desc { font-size: 14.5px; color: var(--text-dim); line-height: 1.75; max-width: 660px; margin-top: 16px; }
.product-hero-meta { display: flex; gap: 24px; margin-top: 24px; flex-wrap: wrap; }
.meta-item { display: flex; flex-direction: column; gap: 3px; }
.meta-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-faint); }
.meta-value { font-size: 12.5px; color: var(--text); font-weight: 600; }

/* ── Product Body ──────────────────────────────────────────── */
.product-body { max-width: 1200px; margin: 0 auto; }
.product-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.product-main { display: flex; flex-direction: column; gap: 32px; }
.product-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* ── Content Blocks ────────────────────────────────────────── */
.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.block-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.block-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--page-accent, var(--blue)) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--page-accent, var(--blue)) 30%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--page-accent, var(--blue));
  font-size: 13px;
  flex-shrink: 0;
}
.block-title { font-size: 13px; font-weight: 700; color: var(--text-bright); }
.block-body { padding: 20px; }

/* ── Screenshot Section ────────────────────────────────────── */
.screenshot-section {
  width: 100%;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.screenshot-section img { width: 100%; height: auto; display: block; }
.screenshot-placeholder {
  width: 100%;
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
  color: var(--text-faint);
  gap: 12px;
  border-radius: var(--r);
  border: 1px solid var(--border);
}
.screenshot-placeholder span { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; }

/* ── Feature List ──────────────────────────────────────────── */
.feature-list { display: flex; flex-direction: column; gap: 10px; }
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color var(--ease);
}
.feature-item:hover { border-color: color-mix(in srgb, var(--page-accent, var(--blue)) 40%, transparent); }
.feature-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--page-accent, var(--blue)) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--page-accent, var(--blue)) 30%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--page-accent, var(--blue));
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}
.feature-text { flex: 1; }
.feature-name { font-size: 13px; font-weight: 700; color: var(--text-bright); margin-bottom: 3px; }
.feature-desc { font-size: 12px; color: var(--text-dim); line-height: 1.55; }

/* ── Module Grid (Dynamic RPG Worlds) ──────────────────────── */
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.module-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--mc, var(--border2));
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 12px 14px;
  transition: border-color var(--ease);
}
.module-card:hover { border-left-color: var(--mc, var(--border2)); }
.module-name { font-size: 12.5px; font-weight: 700; color: var(--text-bright); margin-bottom: 4px; }
.module-desc { font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }
.module-status { font-size: 10px; margin-top: 6px; }

/* ── Phase Timeline ─────────────────────────────────────────── */
.phase-list { display: flex; flex-direction: column; gap: 0; }
.phase-item { display: flex; gap: 20px; }
.phase-spine { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.phase-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid;
}
.phase-dot.done { background: rgba(61,186,143,0.2); border-color: var(--teal); color: var(--teal); }
.phase-dot.inprog { background: rgba(91,141,238,0.2); border-color: var(--blue); color: var(--blue); }
.phase-dot.planned { background: var(--surface3); border-color: var(--border2); color: var(--text-faint); }
.phase-line { width: 2px; flex: 1; background: var(--border); min-height: 24px; margin: 4px 0; }
.phase-item:last-child .phase-line { display: none; }
.phase-content { padding: 4px 0 28px; }
.phase-name { font-size: 14px; font-weight: 700; color: var(--text-bright); margin-bottom: 4px; }
.phase-sub { font-size: 11px; color: var(--text-dim); margin-bottom: 12px; }
.phase-items { display: flex; flex-direction: column; gap: 6px; }
.phase-module {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 10px;
  background: var(--surface2);
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
}
.phase-module .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── Architecture Table ─────────────────────────────────────── */
.arch-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.arch-table th {
  background: var(--surface2);
  color: var(--text-faint);
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.arch-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(37,45,61,0.6);
  vertical-align: top;
}
.arch-table tr:last-child td { border-bottom: none; }
.arch-table tr:hover td { background: var(--surface2); }
.arch-table td:first-child { font-family: var(--font-mono); font-size: 11.5px; color: #8ab4fa; white-space: nowrap; }

/* ── Sidebar Cards ─────────────────────────────────────────── */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.sidebar-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-card-body { padding: 16px 18px; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: var(--surface2);
  margin-bottom: 8px;
  transition: all var(--ease);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.sidebar-link:last-child { margin-bottom: 0; }
.sidebar-link:hover { border-color: color-mix(in srgb, var(--page-accent, var(--blue)) 40%, transparent); background: var(--surface3); color: var(--text-bright); }
.sidebar-link .link-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--page-accent, var(--blue)) 15%, transparent);
  color: var(--page-accent, var(--blue));
  font-size: 14px;
  flex-shrink: 0;
}
.sidebar-link .link-sub { font-size: 10px; color: var(--text-dim); font-weight: 400; margin-top: 1px; }
.sidebar-link .link-text { flex: 1; }
.sidebar-link .link-name { font-size: 12px; font-weight: 600; color: var(--text); }

/* ── Spec Row ──────────────────────────────────────────────── */
.spec-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.spec-row:last-child { border-bottom: none; }
.spec-key { color: var(--text-faint); }
.spec-val { color: var(--text); font-weight: 600; font-family: var(--font-mono); font-size: 11.5px; }

/* ── Code Block ────────────────────────────────────────────── */
code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: #0e1525;
  border: 1px solid #1e2d45;
  padding: 1px 6px;
  border-radius: 3px;
  color: #8ab4fa;
}

/* ── Studio Section ────────────────────────────────────────── */
.studios-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.studio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--ease);
}
.studio-card:hover { border-color: var(--border2); }
.studio-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--studio-accent, var(--orange));
}
.studio-name { font-size: 20px; font-weight: 900; color: var(--text-bright); margin-bottom: 6px; }
.studio-name span { color: var(--studio-accent, var(--orange)); }
.studio-byline { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px; }
.studio-desc { font-size: 13px; color: var(--text-dim); line-height: 1.7; margin-bottom: 18px; }
.studio-plugins { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── CTA Banner ────────────────────────────────────────────── */
.cta-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 100% 50%, rgba(91,141,238,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.cta-title { font-size: 22px; font-weight: 800; color: var(--text-bright); margin-bottom: 6px; }
.cta-desc { font-size: 13px; color: var(--text-dim); }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

/* ── Contact Cards ─────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  transition: all var(--ease);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--contact-accent, var(--blue));
}
.contact-card:hover {
  border-color: color-mix(in srgb, var(--contact-accent, var(--blue)) 40%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: color-mix(in srgb, var(--contact-accent, var(--blue)) 15%, transparent);
  border: 2px solid color-mix(in srgb, var(--contact-accent, var(--blue)) 30%, transparent);
  color: var(--contact-accent, var(--blue));
}
.contact-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--text-faint); }
.contact-title { font-size: 16px; font-weight: 800; color: var(--text-bright); }
.contact-value { font-size: 12.5px; color: var(--contact-accent, var(--blue)); word-break: break-all; }
.contact-desc { font-size: 12px; color: var(--text-dim); line-height: 1.6; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo { font-size: 13px; font-weight: 800; color: var(--text-bright); letter-spacing: 2px; text-transform: uppercase; }
.footer-logo span { color: var(--orange); }
.footer-copy { font-size: 11px; color: var(--text-faint); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 12px; color: var(--text-dim); transition: color var(--ease); }
.footer-links a:hover { color: var(--text); }

/* ── Product Page Bottom CTA ───────────────────────────────── */
.product-cta {
  margin-top: 48px;
  padding: 36px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.product-cta-text { flex: 1; }
.product-cta-text h3 { font-size: 18px; font-weight: 800; color: var(--text-bright); margin-bottom: 6px; }
.product-cta-text p { font-size: 13px; color: var(--text-dim); }
.product-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

/* ── Scroll Reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--ease-out), transform var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Page wrapper ──────────────────────────────────────────── */
.page-content { max-width: 1320px; margin: 0 auto; }
.page-content-full { max-width: 100%; }
.inner { max-width: 1320px; margin: 0 auto; }

/* ── Divider ───────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── Doc Cards (docs.html) ──────────────────────────────────── */
.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--da, var(--blue));
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.doc-card:not(.doc-card-soon):hover {
  transform: translateY(-3px);
  border-color: var(--da, var(--blue));
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.doc-card-body { padding: 22px 22px 18px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.doc-card-header { display: flex; align-items: flex-start; gap: 14px; }
.doc-card-icon {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.doc-card-studio { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: 3px; }
.doc-card-title { font-size: 16px; font-weight: 800; color: var(--text-bright); line-height: 1.2; }
.doc-card-desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.65; flex: 1; }
.doc-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.doc-card-cta { font-size: 12px; font-weight: 700; color: var(--blue); transition: gap var(--ease); letter-spacing: 0.3px; }
.doc-card:hover .doc-card-cta { color: var(--text-bright); }

/* ── Pre / Code Blocks ──────────────────────────────────────── */
pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 14px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre;
  max-width: 100%;
}

/* ── Two-column content grid (collapses on mobile) ──────────── */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── Table scroll wrapper ────────────────────────────────────── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-xs);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .products-grid.has-featured { grid-template-columns: 1fr 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-image { min-height: 220px; height: 220px; }
  .product-layout { grid-template-columns: 1fr; }
  .product-sidebar { order: -1; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .studios-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .site-nav { padding: 0 20px; }
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 60px 24px; min-height: 440px; }
  .section { padding: 48px 24px; }
  .section-sm { padding: 32px 24px; }
  .products-grid, .products-grid.has-featured { grid-template-columns: 1fr; }
  .featured-card-wrap { grid-column: auto; }
  .studios-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .two-col-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 28px 24px; flex-direction: column; text-align: center; }
  .cta-actions { justify-content: center; }
  .breadcrumb { padding: 12px 24px; }
  .product-hero { padding: 36px 24px; }
  .product-hero-meta { gap: 16px; flex-wrap: wrap; }
  .stats-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stat-item { padding: 16px 20px; min-width: 120px; }
  .stat-num { font-size: 24px; }
  .site-footer { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  /* Tables: let content wrap at mobile instead of overflowing */
  .arch-table td:first-child { white-space: normal; word-break: break-word; }
  .arch-table { font-size: 11.5px; }
  /* Product CTA */
  .product-cta { flex-direction: column; align-items: flex-start; }
  .product-cta-actions { width: 100%; }
  /* Block body pre */
  pre { font-size: 11px; }
}

@media (max-width: 600px) {
  html { font-size: 13px; }
  .product-hero-top { flex-direction: column; gap: 12px; }
  .product-hero-title { font-size: clamp(22px, 7vw, 32px); }
  .product-hero-meta { gap: 12px; }
  .meta-item { flex-direction: row; align-items: center; gap: 8px; }
  .meta-label { min-width: 80px; }
  .hero { padding: 48px 20px; min-height: 380px; }
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .product-cta-actions { flex-direction: column; }
  .product-cta-actions .btn { width: 100%; }
  .section { padding: 40px 20px; }
  .section-sm { padding: 28px 20px; }
  .block-body { padding: 16px; }
  .feature-item { padding: 10px 12px; gap: 10px; }
  .feature-name { font-size: 12.5px; }
  .featured-body { padding: 20px; }
  .contact-card { padding: 24px 20px; }
  .site-footer { padding: 28px 20px; }
  .cta-banner { padding: 24px 20px; }
  pre { font-size: 10.5px; padding: 12px; white-space: pre-wrap; word-break: break-word; }
  code { font-size: 11px; }
  .arch-table th, .arch-table td { font-size: 11.5px; padding: 8px 10px; }
  .nav-mobile a { padding: 12px; font-size: 14px; min-height: 44px; display: flex; align-items: center; }
  /* Stats bar — horizontal scroll on very small */
  .stats-bar { -webkit-overflow-scrolling: touch; }
  .stat-item { padding: 14px 18px; min-width: 100px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 9px; }
  /* Module cards */
  .module-name { font-size: 12px; }
  .module-desc { font-size: 11px; }
}

@media (max-width: 400px) {
  html { font-size: 12.5px; }
  .site-nav { padding: 0 16px; }
  .hero { padding: 40px 16px; }
  .section { padding: 32px 16px; }
  .block-body { padding: 12px; }
  pre { font-size: 10px; }
  .product-hero { padding: 28px 16px; }
  .breadcrumb { padding: 10px 16px; }
}
