/* Apply the Support page palette and typography to the existing site layouts. */
:root, html[data-theme="dark"] {
  --gold: var(--muted);
  --accent: var(--ink);
  --accent-bright: var(--ink);
  --accent-soft: var(--surface);
}
body, html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
}
body::before, html[data-theme="dark"] body::after, .geometry, .hero-side, .preview-glow {
  display: none;
}
header.nav, header.detail-nav,
html[data-theme="dark"] header.nav, html[data-theme="dark"] header.detail-nav {
  background: var(--bg);
  border-color: var(--line);
  backdrop-filter: none;
}
header.nav .wrap, header.detail-nav {
  width: min(100% - 36px, 1180px);
  max-width: none;
  min-height: 76px;
  height: auto;
  margin-inline: auto;
  padding: 14px 0;
  gap: 14px 28px;
}
header.nav nav, header.detail-nav nav { gap: 8px 22px; }
header.nav nav a, header.detail-nav nav a,
header.detail-nav nav a[aria-current="page"] {
  font: 400 14px/1.4 var(--font);
  text-decoration: none;
}
header nav a[aria-current="page"] { font-weight: 650; }
.nav .logo, .detail-home span { font: 650 16px/1.4 var(--font); }
.wrap { width: min(100% - 36px, 1180px); max-width: none; padding-inline: 0; margin-inline: auto; }
.editorial-hero { min-height: 0; padding-block: clamp(40px, 7vw, 86px) 42px; }
.hero-meta { position: static; margin-bottom: 22px; }
.editorial-hero .eyebrow-serif { margin: 0 0 12px; font: 500 15px/1.5 var(--font); }
.editorial-hero h1, .lib h1, .requests-intro h1, .detail-title, .screenshot-main h1 {
  font: 650 clamp(32px, 6vw, 66px)/1.08 var(--font);
  letter-spacing: -.035em;
}
h1 em, h2 em { font-style: normal; color: var(--muted); }
.section-heading h2 { font-size: clamp(25px, 4vw, 40px); font-weight: 650; }
.feature-content h3, .tile h3 { font-size: clamp(19px, 2.5vw, 26px); font-weight: 650; }
.text-cta { font: 600 15px/1.5 var(--font); }
.preview-frame, html[data-theme="dark"] .preview-frame,
.calc, .request-contact, .tile, .dlg {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.btn, .theme-toggle { border-radius: 6px; }
footer .footer-verse { font: 400 13px/1.55 var(--font); }
@media (max-width: 820px) {
  header.nav .wrap, header.detail-nav { flex-wrap: wrap; }
  header.nav nav[aria-label="Sections"], header.detail-nav nav { order: 3; flex: 1 0 100%; justify-content: flex-start; margin: 0; }
  header.nav .logo, header.nav .theme-toggle { margin-block: 0; }
}

/* Landing page and controls use the same violet accent throughout the site. */
.editorial-hero {
  align-items: center;
  text-align: center;
  padding-top: clamp(48px, 8vw, 100px);
  background: radial-gradient(ellipse 420px 250px at 50% 145px, var(--brand-wash), transparent 85%);
}
.hero-meta { justify-content: center; margin-bottom: 16px; }
.hero-meta span:first-child {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font: 550 12px/1.4 var(--font);
  text-transform: none;
  letter-spacing: normal;
}
.editorial-hero .eyebrow-serif { display: none; }
.editorial-hero h1 {
  max-width: 19ch;
  margin-inline: auto;
  font-size: clamp(34px, 6vw, 60px);
  text-wrap: balance;
}
.editorial-hero h1 em { color: var(--brand); }
.editorial-hero .hero-bottom {
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 20px 0 36px;
}
.editorial-hero .hero-bottom p { font-size: 15px; line-height: 1.6; }
.editorial-hero .hero-bottom br { display: none; }
.editorial-hero .text-cta, .btn:not(.ghost) {
  padding: 10px 18px;
  background: var(--brand-button);
  border: 1px solid var(--brand-button);
  border-radius: 8px;
  color: white;
  text-decoration: none;
}
.editorial-hero .guru-game { align-self: stretch; text-align: start; }
header nav a[aria-current="page"], header nav a:hover { color: var(--brand); }
.tile { overflow: hidden; }
.tile .tile-body { padding: 16px; }
.request-contact, .calc, .preview-frame { border-radius: 12px; }
a:focus-visible, button:focus-visible { outline-color: var(--brand); }

/* Keep each card action together when the row wraps. */
.feature-actions, .tile .tile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.feature-actions { margin-top: 16px; }
.tile .tile-actions { padding: 0 16px 16px; }
.feature-actions > *, .tile-actions > * {
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
  font: 550 13px/1.4 var(--font);
  padding-block: 6px;
}
.tile:hover { background: var(--card); border-color: var(--line); }
.tile .tile-top { flex-wrap: wrap; gap: 6px 10px; }
.tile .tile-own { padding-inline: 16px; }
.tile .tile-actions .btn { padding: 8px 12px; }
.section-heading-actions { flex-wrap: wrap; }

.editorial-hero .particle-headline {
  position: relative;
  max-width: 100%;
  font-size: clamp(21px, 6.6vw, 60px);
}
.particle-headline > span, .particle-headline > em {
  display: block;
  white-space: nowrap;
}
.particle-headline canvas {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.particle-headline.has-particles canvas { display: block; }
.particle-headline.has-particles > :is(span, em) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .particle-headline.has-particles canvas { display: none; }
  .particle-headline.has-particles > :is(span, em) { opacity: 1; }
  .editorial-hero .particle-headline.has-particles > em { color: var(--brand); }
}

.hero-downloads {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font: 550 14px/1.4 var(--font);
}
.hero-download-number { overflow: hidden; color: var(--ink); }
.hero-download-number strong {
  display: block;
  font: 650 23px/1.2 var(--font);
  font-variant-numeric: tabular-nums;
}
.hero-download-new {
  position: relative;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--brand-wash);
  color: var(--brand);
  font: 700 10px/1.4 var(--font);
}
.hero-download-tooltip {
  position: absolute;
  z-index: 2;
  top: calc(100% + 6px);
  right: 0;
  width: min(240px, 65vw);
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  text-align: start;
  font: 400 12px/1.4 var(--font);
  visibility: hidden;
}
.hero-download-new:hover .hero-download-tooltip,
.hero-download-new:focus-visible .hero-download-tooltip { visibility: visible; }
