/* gardenandveg.app — the look of the program itself: its greens, IBM Plex Sans,
   light and dark by the system. The fonts are served from here: no request
   ever leaves for a font host. */

@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-SemiBold.ttf") format("truetype"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f4f7f4;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --line: #d9e2db;
  --text: #14211a;
  --text-2: #56665c;
  --accent: #15803d;
  --accent-ink: #ffffff;
  --accent-soft: #dcf2e3;
  --on-accent-soft: #166534;
  --rail: #14532d;
  --rail-text: #cfe7d6;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(20, 33, 26, 0.06), 0 4px 16px rgba(20, 33, 26, 0.06);

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* Names the owner's page (admin/license) uses. */
  --surface-container-lowest: var(--surface);
  --surface-container-low: var(--surface-2);
  --outline: var(--text-2);
  --outline-variant: var(--line);
  --on-surface-variant: var(--text-2);
  --error: var(--danger);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1411;
    --surface: #161f1a;
    --surface-2: #1c2721;
    --line: #28362d;
    --text: #e2ebe5;
    --text-2: #9fb0a5;
    --accent: #4ade80;
    --accent-ink: #0e1411;
    --accent-soft: #173523;
    --on-accent-soft: #86efac;
    --rail: #0b1f13;
    --rail-text: #cfe7d6;
    --danger: #f97066;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.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;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1.125rem; color: var(--text); text-decoration: none;
}
.nav-brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-link { color: var(--text-2); text-decoration: none; font-weight: 500; }
.nav-link:hover { color: var(--text); }

/* ── Language switcher ──────────────────────────────────────────────────── */
#lang-switcher { position: relative; }
.lang-btn {
  font: inherit; font-size: 0.875rem; font-weight: 500;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 6px 10px; cursor: pointer;
}
.lang-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  list-style: none; margin: 0; padding: 6px; min-width: 150px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow);
}
.lang-dropdown.open { display: block; }
.lang-dropdown li { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.lang-dropdown li:hover { background: var(--surface-2); }
.lang-dropdown li.active { color: var(--accent); font-weight: 600; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; text-decoration: none;
  padding: 11px 20px; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary, .btn-teal { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, .btn-teal:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { background: var(--surface-2); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.phone-actions { margin-top: 20px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ── Type ───────────────────────────────────────────────────────────────── */
.display-lg { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.01em; }
.headline-lg { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 600; }
.body-lg { font-size: 1.125rem; color: var(--text-2); }
.muted { color: var(--text-2); }

/* ── Home: hero ─────────────────────────────────────────────────────────── */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 18px; }
.badge {
  align-self: flex-start;
  font-size: 0.875rem; font-weight: 600;
  color: var(--on-accent-soft); background: var(--accent-soft);
  padding: 4px 12px; border-radius: 999px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { font-size: 0.9375rem; color: var(--text-2); }
/* Screenshots: a click opens the picture at full size. */
.hero-shot, .shot-link {
  display: block; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); background: var(--surface);
}
.hero-shot img, .shot-link img { width: 100%; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.15fr 1fr; }
  .hero { padding: 80px 0 56px; }
}

/* ── Home: sections ─────────────────────────────────────────────────────── */
.section { padding: 48px 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; max-width: 720px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.card h3 { font-size: 1.0625rem; font-weight: 600; }
.card p { color: var(--text-2); }
.card-icon { font-size: 1.5rem; line-height: 1; }
.shots { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.shot { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.shot h3 { font-size: 1.0625rem; font-weight: 600; }
.shot p { margin: 4px 0 0; color: var(--text-2); }
.split {
  display: grid; gap: 24px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow);
}
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; padding: 40px; } }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 0.45em;
  width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 14px 18px;
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin-top: 10px; color: var(--text-2); }

/* What's new (js/changelog-render.js) */
.changelog-list { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.changelog-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 24px; display: flex; flex-direction: column; gap: 14px;
}
.changelog-card-header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.version-badge {
  font-family: var(--font-mono); font-weight: 600; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--on-accent-soft);
}
.changelog-item { display: flex; flex-direction: column; gap: 8px; }
.changelog-tag {
  align-self: flex-start; font-size: 0.8125rem; font-weight: 600; padding: 2px 10px;
  border-radius: 999px; background: var(--surface-2); color: var(--text-2);
}
.changelog-tag.tag-new { background: var(--accent-soft); color: var(--on-accent-soft); }
.changelog-tag.tag-fix { color: var(--danger); }
.changelog-lines { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-brand { font-weight: 600; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-copyright { color: var(--text-2); font-size: 0.875rem; margin-top: 10px; }
