:root {
  color-scheme: light;
  --bg: #F5F1EA; --surface: #FFFFFF; --text: #1F2A26; --text-2: #2C3A35; --muted: #6B7570; --border: #E3DDD3;
  --primary: #2F5D50; --on-primary: #FFFFFF; --primary-soft: #DCE8E2; --accent: #C8693F;
  --store-bg: #111111; --store-fg: #FFFFFF; --store-hover: #2A2A2A; --shadow: rgba(31, 42, 38, 0.18);
}
/* Dark: follows the device unless the visitor picked light or dark (theme.js sets data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121816; --surface: #1C2420; --text: #E7ECE9; --text-2: #D2DAD5; --muted: #9AA6A0; --border: #2D3833;
    --primary: #7DB8A3; --on-primary: #0F1F19; --primary-soft: #203430; --accent: #E08A62;
    --store-bg: #F5F1EA; --store-fg: #111111; --store-hover: #FFFFFF; --shadow: rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121816; --surface: #1C2420; --text: #E7ECE9; --text-2: #D2DAD5; --muted: #9AA6A0; --border: #2D3833;
  --primary: #7DB8A3; --on-primary: #0F1F19; --primary-soft: #203430; --accent: #E08A62;
  --store-bg: #F5F1EA; --store-fg: #111111; --store-hover: #FFFFFF; --shadow: rgba(0, 0, 0, 0.5);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--primary); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
header { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand b { color: var(--primary); font-weight: 700; }
.langs button {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.hero { text-align: center; padding: 40px 0 24px; }
.hero img { width: 120px; height: 120px; }
h1 { font-size: clamp(30px, 7vw, 44px); line-height: 1.15; margin: 16px 0 12px; letter-spacing: -0.5px; }
h2 { font-size: 22px; margin: 32px 0 8px; }
.lead { color: var(--muted); font-size: 19px; max-width: 520px; margin: 0 auto; }
.cta {
  display: inline-block; margin-top: 24px; padding: 14px 24px; border-radius: 12px;
  background: var(--primary); color: var(--on-primary); text-decoration: none; font-weight: 600;
}
.note { color: var(--muted); font-size: 14px; margin-top: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 24px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.free { background: var(--primary-soft); border-radius: 16px; padding: 20px; margin: 8px 0 24px; }
.code {
  font: 700 34px/1 ui-monospace, Menlo, monospace; letter-spacing: 4px; color: var(--primary);
  background: var(--surface); border: 1px dashed var(--primary); border-radius: 12px; padding: 16px; margin: 16px auto; display: inline-block;
}
.doc { padding-bottom: 40px; }
.doc p, .doc li { color: var(--text-2); }
footer { border-top: 1px solid var(--border); margin-top: 32px; padding: 20px 0 40px; color: var(--muted); font-size: 14px; }
footer a { margin-right: 16px; }
[data-lang] { display: none; }
html[lang="nb"] [data-lang="nb"], html[lang="en"] [data-lang="en"] { display: revert; }

/* Landing pages (generated by scripts/web/generate.py) */
.langs { display: flex; gap: 6px; }
.langs a {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-decoration: none;
  border-radius: 999px; padding: 6px 12px; font-size: 14px;
}
.langs a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.hero .logo { width: 96px; height: 96px; }
.appstore {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px;
  min-height: 52px; padding: 14px 26px; border-radius: 14px; background: var(--store-bg); color: var(--store-fg);
  font-weight: 600; font-size: 17px; text-decoration: none;
}
.appstore::before {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.appstore:hover { background: var(--store-hover); }
.shots {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px 16px 24px;
  margin: 8px -16px 0; -webkit-overflow-scrolling: touch;
}
.shots img {
  flex: none; width: 200px; height: auto; scroll-snap-align: center; border-radius: 26px;
  border: 6px solid #1c1c1c; background: #1c1c1c; box-shadow: 0 10px 30px var(--shadow);
}
section > h2 { margin-top: 40px; }
.steps { padding-left: 22px; margin: 0; }
.steps li { margin: 6px 0; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--text-2); }
.final { text-align: center; background: var(--primary-soft); border-radius: 20px; padding: 28px 16px 32px; margin-top: 40px; }
.final h2, .free h2 { margin-top: 0; }
section.free { margin-top: 40px; }
@media (min-width: 760px) {
  .shots { justify-content: center; overflow: visible; }
  .shots img { width: 150px; }
}

/* Light/dark toggle in the header (theme.js) */
.tools { display: flex; align-items: center; gap: 8px; }
.theme {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; cursor: pointer;
}
.theme svg { width: 18px; height: 18px; }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme .sun { display: block; }
  :root:not([data-theme]) .theme .moon { display: none; }
}

/* Guides (scripts/web/guides.py) */
.crumbs { font-size: 14px; color: var(--muted); margin: 8px 0 4px; }
.crumbs a { color: var(--muted); }
.guide h1 { text-align: left; font-size: clamp(28px, 6vw, 38px); margin-top: 8px; }
.guide .meta { color: var(--muted); font-size: 14px; margin-top: -4px; }
.guide article h2 { margin-top: 32px; }
.guide article li { margin: 4px 0; }
.guide table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.guide th, .guide td { border-bottom: 1px solid var(--border); padding: 8px 6px; text-align: left; }
@media (max-width: 560px) { .guide table { display: block; overflow-x: auto; font-size: 14px; } }
.guide .tip { background: var(--surface); border-left: 4px solid var(--primary); border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.guide-cta { background: var(--primary-soft); border-radius: 18px; padding: 20px 20px 24px; margin: 28px 0; text-align: center; }
.guide-cta h2 { margin: 0 0 8px; }
.guide-cta p { margin: 0; }
.guide-list { display: grid; gap: 12px; margin: 16px 0; }
.guide-card { display: block; text-decoration: none; color: var(--text); }
.guide-card:hover { border-color: var(--primary); }
.lead-left { color: var(--muted); font-size: 18px; }
.more ul { padding-left: 20px; }
