/* Deltarune Save Editor — site chrome styles.
   The editor tool injects its own prefixed styles via editor.css; this file
   intentionally contains no rules for the tool mount or its internals. */

:root {
  --bg: #0e0e17;
  --panel: #171724;
  --text: #e8e8f0;
  --muted: #a3a3bd;
  --line: #2a2a3d;
  --accent: #b45cff;
  --secondary: #00d4ff;
  --success: #3ddc84;
  --warning: #ffb020;
  --radius: 12px;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

body, h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--secondary); text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  border-radius: 4px;
}

[id] { scroll-margin-top: 84px; }

.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 14, 23, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  padding-block: 6px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--panel);
}

/* Hero */
.hero { padding: 64px 0 44px; text-align: center; }

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subhead {
  margin: 16px auto 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.chips {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
}

.chips li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { border-color: var(--accent); color: var(--accent); }
.btn-ghost:hover { background: rgba(180, 92, 255, 0.12); }

/* Editor mount section — container width/padding only */
.editor-section { padding: 8px 0 40px; }

/* Generic sections */
.section { padding: 56px 0; }

.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.01em;
}

.section-lede {
  margin-top: 8px;
  max-width: 62ch;
  color: var(--muted);
}

/* Steps */
.steps {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(180, 92, 255, 0.15);
  color: var(--accent);
  font-weight: 800;
}

.step h3 { margin-top: 12px; font-size: 1.05rem; }
.step p { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }

.note {
  margin-top: 20px;
  padding: 12px 16px;
  border-left: 3px solid var(--warning);
  background: rgba(255, 176, 32, 0.08);
  border-radius: 8px;
  font-size: 0.95rem;
}

/* Cards / grids */
.grid {
  margin-top: 28px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card h3 { font-size: 1.05rem; }
.card p { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }

.chapter-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.chapter-card:hover { border-color: var(--accent); }
.chapter-card h3 { color: var(--accent); }

/* Why / prose */
.prose { max-width: 74ch; }
.prose p { margin-top: 14px; }

/* Privacy */
.privacy-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--success);
  border-radius: var(--radius);
  padding: 24px;
}

.privacy-panel p { margin-top: 12px; color: var(--muted); }

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(61, 220, 132, 0.1);
  border: 1px solid rgba(61, 220, 132, 0.35);
  border-radius: 999px;
  color: var(--success);
  font-weight: 600;
  font-size: 0.9rem;
}

.privacy-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

/* FAQ */
.faq-list { margin-top: 24px; display: grid; gap: 12px; }

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq-item summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 14px 18px;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item p { padding: 0 18px 16px; color: var(--muted); }

/* Ad slots: invisible until real ad code is pasted in */
.ad-slot {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
  min-height: 0;
}

/* Footer */
.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
}

.footer-nav, .footer-legal { display: flex; flex-wrap: wrap; gap: 0 18px; }
.footer-legal { margin-top: 8px; }

.footer-nav a, .footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-nav a:hover, .footer-legal a:hover { color: var(--text); }

.disclaimer {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 72ch;
}

.copyright { margin-top: 8px; font-size: 0.85rem; color: var(--muted); }

@media (min-width: 720px) {
  .section { padding: 72px 0; }
  .hero { padding: 88px 0 56px; }
}
