:root {
  --bg: hsl(42 100% 97%);
  --bg-soft: hsl(0 0% 100%);
  --border: hsl(38 45% 86%);
  --fg: hsl(230 48% 15%);
  --muted: hsl(230 22% 44%);
  --primary: hsl(38 96% 52%);
  --primary-fg: hsl(30 80% 12%);
  --moon: hsl(252 85% 66%);
  --header-bg: hsl(42 100% 97% / 0.82);
  --hover-bg: hsl(38 60% 88% / 0.7);
  --shadow: 0 16px 40px -16px rgba(80, 60, 20, 0.18);
  --glow-sun: hsl(38 96% 58% / 0.12);
  --glow-moon: hsl(256 84% 74% / 0.12);
  --radius: 1rem;
  --maxw: 56rem;
}

html.dark {
  --bg: hsl(244 34% 11%);
  --bg-soft: hsl(243 32% 16%);
  --border: hsl(244 28% 24%);
  --fg: hsl(45 70% 96%);
  --muted: hsl(245 20% 72%);
  --primary: hsl(42 95% 62%);
  --primary-fg: hsl(244 40% 12%);
  --moon: hsl(252 90% 78%);
  --header-bg: hsl(244 34% 11% / 0.82);
  --hover-bg: hsl(244 30% 30% / 0.6);
  --shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  --glow-sun: hsl(38 96% 58% / 0.10);
  --glow-moon: hsl(256 84% 74% / 0.14);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(60% 50% at 12% 0%, var(--glow-sun), transparent 70%),
    radial-gradient(55% 45% at 92% 8%, var(--glow-moon), transparent 70%);
  background-attachment: fixed;
  line-height: 1.65;
  font-size: 17px;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--fg); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.2rem; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 0.35rem; flex: 1; flex-wrap: wrap; }
.nav-link {
  color: var(--muted);
  padding: 0.4rem 0.7rem;
  border-radius: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-link:hover { color: var(--fg); background: var(--hover-bg); text-decoration: none; }
.nav-link.active { color: var(--fg); background: var(--hover-bg); }
.header-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: hsl(38 96% 64%); color: var(--primary-fg); }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1.05rem; }

/* Language selector (no-JS <details> dropdown) */
.lang-menu { position: relative; }
.lang-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu[open] > summary { color: var(--fg); }
.lang-menu ul {
  position: absolute;
  right: 0;
  margin: 0.4rem 0 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  min-width: 11rem;
  box-shadow: var(--shadow);
  z-index: 30;
}
.lang-option {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 0.55rem;
  color: var(--fg);
  font-size: 0.95rem;
}
.lang-option:hover { background: var(--hover-bg); text-decoration: none; }
.lang-option.current { color: var(--primary); font-weight: 600; }

/* Page body */
.page { padding: 2.5rem 1.25rem 4rem; }
.breadcrumb { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; display: flex; gap: 0.5rem; align-items: center; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--fg); }

h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 1rem; }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); margin: 2.2rem 0 0.6rem; letter-spacing: -0.01em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 48rem; margin: 0 0 1.5rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.4rem; }
li { margin: 0.35rem 0; }
strong { color: var(--fg); font-weight: 700; }

.content-section { max-width: 48rem; }
.faq-item { max-width: 48rem; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.5rem; }
.faq-item:first-of-type { border-top: none; }
.faq-item h2 { margin-top: 0; }

/* Hero (home) */
.hero { padding: 2rem 0 1rem; max-width: 48rem; }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.5rem 0 0.5rem; }

.feature-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.feature-list li { position: relative; padding-left: 1.7rem; }
.feature-list li::before { content: "☀"; position: absolute; left: 0; color: var(--primary); }

/* Theme index grid + cards */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}
.theme-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1.1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  box-shadow: var(--shadow);
  transition: transform 0.1s ease;
}
.theme-card:hover { text-decoration: none; transform: translateY(-2px); }
.theme-card-name { font-weight: 700; font-size: 1.05rem; }
.theme-card-tagline { color: var(--muted); font-size: 0.9rem; }

/* Theme symbols (two glyph "pieces") */
.theme-symbols { display: flex; gap: 0.75rem; margin: 0.25rem 0 0.5rem; }
.theme-sym { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.theme-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.7rem;
  border-radius: 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
}
.theme-sym-label { font-size: 0.8rem; color: var(--muted); }

/* Free / premium tier badges */
.tier-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--muted);
}
.tier-badge.premium { background: var(--primary); color: var(--primary-fg); }

/* Changelog */
.changelog-entry { max-width: 48rem; border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 1.75rem; }
.changelog-entry:first-of-type { border-top: none; }
.changelog-date { font-size: 0.85rem; font-weight: 400; color: var(--muted); }

/* Press kit downloads */
.press-assets { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.press-assets li { margin: 0; }
.press-assets a { font-weight: 500; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 3rem; margin-top: 2rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 1rem; }
.footer-links a { color: var(--muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--fg); }
.footer-note { font-size: 0.85rem; max-width: 48rem; }
.footer-copy { font-size: 0.85rem; }

@media (max-width: 640px) {
  .site-nav { order: 3; width: 100%; }
  .header-actions { margin-left: 0; }
}
