/* StaleSnap public site. Same palette as the dashboard (client/src/index.css). No inline styles: the CSP is style-src 'self'. */
:root {
  color-scheme: light dark;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #15171c;
  --text-2: #4d5461;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --accent-text: #4338ca;
  --on-accent: #ffffff;
  --stale: #c2410c;
  --stale-bg: #fff3ea;
  --ok: #15803d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 16px rgba(16, 24, 40, 0.06);
  --focus: 0 0 0 3px rgba(79, 70, 229, 0.45);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1015;
    --bg-alt: #13161c;
    --surface: #181b23;
    --border: #2a2f3a;
    --text: #e8eaef;
    --text-2: #a9b0bd;
    --accent: #7c74ff;
    --accent-hover: #918aff;
    --accent-soft: #24234a;
    --accent-text: #b3aeff;
    --stale: #fdba74;
    --stale-bg: #2b1a0e;
    --ok: #4ade80;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --focus: 0 0 0 3px rgba(145, 138, 255, 0.55);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
main:focus { outline: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
.muted { color: var(--text-2); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 10;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 8px; color: var(--on-accent); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.7em 1.2em; border-radius: 9px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-text); }
.btn-sm { padding: 0.5em 0.9em; font-size: 0.9rem; }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }

/* ---------------------------------------------------------------- header / footer */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.site-nav a:not(.btn) { color: var(--text-2); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }
/* Language switcher: a plain link to the same page in the other language (no script, no redirect). */
.site-nav a.lang-switch { border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; font-size: 0.9rem; }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); margin-top: 64px; padding: 40px 0; font-size: 0.95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.footer-inner p { margin: 0 0 0.4em; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(150px, auto)); gap: 6px 32px; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--text); }
.footer-inner p.footer-language { max-width: 34em; margin-top: 0.8em; }

/* ---------------------------------------------------------------- home */
.hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--accent-soft), var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 0.8em; }
.lead { font-size: 1.2rem; color: var(--text-2); max-width: 36em; }
.small { font-size: 0.9rem; }

/* Illustration: a docs screenshot next to the live screen, the changed label flagged. Pure HTML/CSS. */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.shot-label { font-size: 0.75rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; display: block; }
.shot-bar { height: 8px; border-radius: 4px; background: var(--border); margin-bottom: 8px; }
.shot-bar.w60 { width: 60%; }
.shot-bar.w80 { width: 80%; }
.shot-bar.w40 { width: 40%; }
.shot-btn { display: inline-block; font-size: 0.75rem; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: var(--on-accent); margin-top: 4px; }
.shot-btn.changed { outline: 2px solid var(--stale); outline-offset: 3px; }
.shot-flag { display: block; margin-top: 12px; font-size: 0.75rem; font-weight: 600; color: var(--stale); background: var(--stale-bg); border-radius: 6px; padding: 4px 8px; }

.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 48px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; background: var(--accent); color: var(--on-accent);
}
.cta-band { text-align: center; }
.cta-band .cta-row { justify-content: center; }

/* ---------------------------------------------------------------- pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 24px; justify-content: center; margin: 32px 0; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); border-width: 2px; }
.plan-badge { align-self: flex-start; font-size: 0.75rem; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
.price { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; margin: 0.1em 0 0; }
.price span { font-size: 1rem; font-weight: 500; color: var(--text-2); }
.price-note { font-size: 0.9rem; color: var(--text-2); }
.checklist { list-style: none; padding: 0; margin: 1em 0 1.5em; flex: 1; }
.checklist li { padding-left: 28px; position: relative; margin-bottom: 0.5em; }
.checklist li::before { content: "\2713"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
.faq dt { font-weight: 600; margin-top: 1.2em; }
.faq dd { margin: 0.3em 0 0; color: var(--text-2); }

/* ---------------------------------------------------------------- legal */
.legal { padding: 48px 0 0; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal h3 { margin-top: 1.4em; }
.legal li { margin-bottom: 0.4em; }
.updated { color: var(--text-2); font-size: 0.95rem; }
.summary { background: var(--accent-soft); border-radius: var(--radius); padding: 16px 20px; margin: 1.5em 0; }
.summary p:last-child, .summary ul:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); padding: 10px 12px 10px 0; }
th { font-weight: 600; }
dl.identity { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; }
dl.identity dt { font-weight: 600; }
dl.identity dd { margin: 0; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .section { padding: 48px 0; }
  .grid-3, .steps, .plans { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  dl.identity { grid-template-columns: 1fr; gap: 2px; }
  dl.identity dd { margin-bottom: 10px; }
  .site-nav { gap: 4px 14px; }
}
