/* Hero Zero Bot – website. Same palette as the app (ui/styles.css): light on :root, dark via
   the OS setting or data-theme="dark" (the toggle wins both ways). No external fonts. */

:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --surface: #fcfcfb;
  --surface-2: #f0efea;
  --surface-3: #e7e5df;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #74726c;
  --line: #e1e0d9;
  --line-strong: #c3c2b7;
  --accent: #c98500;
  --accent-ink: #1a1300;
  --accent-soft: #fdf1d6;
  --hero: #d23a2f;
  --good: #0ca30c;
  --good-ink: #006300;
  --warn: #b97800;
  --bad: #d03b3b;
  --info: #2a78d6;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.06), 0 4px 16px rgba(11, 11, 11, 0.05);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --page: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #222220;
    --surface-3: #2c2c2a;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --ink-3: #9b998f;
    --line: #2c2c2a;
    --line-strong: #383835;
    --accent: #f2b52a;
    --accent-ink: #1a1300;
    --accent-soft: #3a2e10;
    --hero: #ef5a4f;
    --good-ink: #2fbf2f;
    --warn: #fab219;
    --bad: #e66767;
    --info: #3987e5;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #222220;
  --surface-3: #2c2c2a;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --ink-3: #9b998f;
  --line: #2c2c2a;
  --line-strong: #383835;
  --accent: #f2b52a;
  --accent-ink: #1a1300;
  --accent-soft: #3a2e10;
  --hero: #ef5a4f;
  --good-ink: #2fbf2f;
  --warn: #fab219;
  --bad: #e66767;
  --info: #3987e5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
code, pre { font-family: var(--mono); font-size: 0.9em; }
[hidden] { display: none !important; }
/* Bilingual pages: both texts sit side by side, German shows unless data-lang="en". */
html:not([data-lang="en"]) body [lang="en"] { display: none !important; }
html[data-lang="en"] body [lang="de"] { display: none !important; }
.muted { color: var(--ink-3); }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 16px; }

/* ---------- header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand b { font-size: 17px; }
.brand small { display: block; color: var(--ink-3); font-size: 11px; line-height: 1.2; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  color: var(--ink-2); padding: 7px 10px; border-radius: 8px; font-size: 15px;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.spacer { flex: 1; }
.tools { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2);
  padding: 6px 9px; border-radius: 8px; font: inherit; font-size: 14px;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; display: block; }

/* ---------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  padding: 9px 16px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  font: inherit; font-size: 15px; font-weight: 550;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.large { padding: 12px 22px; font-size: 16px; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
}
.badge.accent { background: var(--accent-soft); color: var(--ink); }
.badge.good { color: var(--good-ink); background: color-mix(in srgb, var(--good) 14%, transparent); }
.badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }

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

/* ---------- sections */
section { padding: 56px 0; }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head h2 { font-size: 30px; font-weight: 750; }
.section-head p { color: var(--ink-2); margin-top: 10px; font-size: 17px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--hero); margin-bottom: 10px;
}

/* ---------- hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.08; }
.hero h1 .accent { color: var(--hero); }
.hero .lead { font-size: 19px; color: var(--ink-2); margin-top: 18px; max-width: 560px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero .platforms { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; color: var(--ink-3); font-size: 14px; }
.hero .platforms span { display: inline-flex; align-items: center; gap: 6px; }
.hero .platforms svg { width: 16px; height: 16px; }

/* App-like preview of the plan view */
.preview { padding: 0; overflow: hidden; }
.preview-bar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.preview-bar img { width: 22px; height: 22px; }
.preview-bar b { font-size: 14px; }
.preview-bar .badge { margin-left: auto; }
.preview-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.plan-row {
  display: grid; grid-template-columns: 96px 70px 1fr; gap: 10px; align-items: center;
  font-size: 13px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2);
}
.plan-row .mod { font-weight: 600; }
.plan-row .state { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.plan-row .state.act { color: var(--good-ink); }
.plan-row .state.wait { color: var(--info); }
.plan-row .state.idle { color: var(--ink-3); }
.plan-row .text { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; }

/* ---------- feature grid */
.grid { display: grid; gap: 16px; }
/* Grid items may shrink below their content (long lines are cut, not the page widened). */
.grid > *, .split > *, .hero .wrap > *, .platforms-grid > *, .steps > * { min-width: 0; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.feature h3 { font-size: 17px; margin: 12px 0 6px; }
.feature p { color: var(--ink-2); font-size: 15px; }
.ficon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--ink);
}
.ficon svg { width: 22px; height: 22px; }
.ficon.red { background: color-mix(in srgb, var(--hero) 14%, transparent); color: var(--hero); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist.card { padding: 20px 22px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-2); }
.checklist li b { color: var(--ink); }
.checklist svg { width: 20px; height: 20px; color: var(--good); margin-top: 2px; }

.cta {
  text-align: center; padding: 40px 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hero) 10%, var(--surface)), var(--surface));
}
.cta h2 { font-size: 28px; }
.cta p { color: var(--ink-2); margin: 10px auto 22px; max-width: 560px; }

/* ---------- FAQ */
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
}
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); margin-top: 10px; }

/* ---------- downloads page */
.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: 40px; font-weight: 800; }
.page-head .lead { color: var(--ink-2); font-size: 18px; margin-top: 12px; max-width: 760px; }
.release-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; color: var(--ink-3); font-size: 14px; }

.notice {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start;
  border-left: 4px solid var(--accent);
}
.notice h2 { font-size: 19px; }
.notice p { color: var(--ink-2); margin-top: 6px; }

.platforms-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.platform { display: flex; flex-direction: column; gap: 14px; }
.platform.recommended { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.platform-head { display: flex; align-items: center; gap: 12px; }
.platform-head .ficon { flex: none; }
.platform-head h3 { font-size: 19px; }
.platform-head .muted { font-size: 13px; }
.platform-head .badge { margin-left: auto; }
.files { display: flex; flex-direction: column; gap: 8px; }
.file {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: var(--surface-2);
}
.file b { font-size: 15px; display: block; }
.file > div { min-width: 0; }
.file .meta { display: block; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.steps h3 { font-size: 17px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.steps ol, .steps ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.steps li + li { margin-top: 4px; }

pre.cmd {
  margin: 10px 0 0; padding: 12px 14px; border-radius: 10px; overflow-x: auto;
  background: var(--surface-3); color: var(--ink); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.6; white-space: pre;
}
table.reqs { width: 100%; border-collapse: collapse; font-size: 15px; }
table.reqs th, table.reqs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.reqs th { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.notes { white-space: pre-wrap; color: var(--ink-2); font-size: 14px; max-height: 360px; overflow: auto; }

/* ---------- legal pages */
.legal { max-width: 760px; }
.legal h1 { font-size: 34px; margin-bottom: 18px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 10px; }
.todo {
  background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--ink);
  padding: 1px 6px; border-radius: 6px; font-weight: 600;
}

/* ---------- footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 32px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-grid a { color: var(--ink-2); }
.disclaimer { color: var(--ink-3); font-size: 13px; margin-top: 10px; max-width: 460px; }
.copyright { color: var(--ink-3); font-size: 13px; margin-top: 28px; }

/* ---------- responsive */
@media (max-width: 960px) {
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 40px; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .grid.cols-3, .grid.cols-2, .platforms-grid, .steps, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 34px; }
  .page-head h1 { font-size: 32px; }
  .section-head h2 { font-size: 25px; }
  section { padding: 40px 0; }
  .plan-row { grid-template-columns: 78px 1fr; }
  .plan-row .state { display: none; }
  .brand small { display: none; }
  .tools .btn { display: none; }
}
