:root {
  --bg: #f7faf8;
  --surface: #ffffff;
  --text: #17201b;
  --muted: #56615b;
  --border: #e1e8e3;
  --green: #15803d;
  --green-dark: #116632;
  --green-soft: #e9f6ee;
  --focus: #15803d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 32, 27, 0.04), 0 8px 24px rgba(23, 32, 27, 0.06);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--green-dark); text-underline-offset: 3px; transition: color 0.15s ease; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(24px, 3.2vw, 32px); margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 6px; }
p { margin: 0 0 12px; }
kbd {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 6px; background: var(--surface); font: 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: 16px; top: -48px; padding: 8px 14px; background: var(--text); color: #fff; border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 12px; color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(247, 250, 248, 0.88); border-bottom: 1px solid transparent; backdrop-filter: saturate(1.4) blur(8px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; }
.wordmark:hover { color: var(--text); }
.mark { width: 22px; height: 22px; border-radius: 7px; background: var(--green); box-shadow: inset 0 0 0 5px var(--green-soft), inset 0 0 0 7px var(--green); }
.nav ul { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav ul a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: background-color 0.15s ease, color 0.15s ease; }
.nav ul a:hover { color: var(--text); background: var(--green-soft); }
.nav .nav-cta { color: var(--green-dark); border: 1px solid #bfe1cb; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s var(--ease), box-shadow 0.18s ease;
}
.button.primary { background: var(--green); color: #fff; box-shadow: 0 1px 2px rgba(21, 128, 61, 0.25); }
.button.primary:hover { background: var(--green-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(21, 128, 61, 0.22); }
.button.ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.button.ghost:hover { border-color: #bfe1cb; color: var(--green-dark); transform: translateY(-1px); }
.button[aria-disabled="true"] { background: #eef1ef; color: var(--muted); border-color: var(--border); box-shadow: none; pointer-events: none; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.eyebrow { display: inline-block; margin-bottom: 18px; padding: 4px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 14px; font-weight: 600; }
h1 { font-size: clamp(36px, 5.6vw, 58px); letter-spacing: -0.035em; margin-bottom: 18px; }
.lead { font-size: 19px; color: var(--muted); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.fine { color: var(--muted); font-size: 14px; }

/* Snapshot preview */
.preview { position: relative; margin: 0; background: #fbfdfc; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.preview-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.preview-bar span { width: 10px; height: 10px; border-radius: 50%; background: #dfe5e1; }
.preview-bar em { margin-left: 8px; font-style: normal; font-size: 12px; color: var(--muted); }
.preview-body { margin: 0; padding: 18px 20px 28px; overflow-x: auto; font: 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; color: #33403a; white-space: pre; }
.preview-body b { color: var(--text); }
.preview-body i { color: var(--muted); }
.preview-body mark { background: var(--green-soft); color: var(--green-dark); border-radius: 4px; padding: 0 3px; }
.preview-toast {
  position: absolute; right: -12px; bottom: -18px; display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; font-weight: 600;
}
.check { position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--green); }
.check::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Sections and cards */
.section { padding-top: 56px; padding-bottom: 56px; }
.section-lead { color: var(--muted); max-width: 40em; margin-bottom: 28px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}
.card p { color: var(--muted); margin: 0; }
.steps, .features { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps { grid-template-columns: repeat(3, 1fr); margin-top: 24px; }
.features { grid-template-columns: repeat(2, 1fr); }
.steps .card:hover, .features .card:hover, .download:hover { border-color: #c9e4d3; box-shadow: var(--shadow); transform: translateY(-2px); }
.step-number { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 14px; border-radius: 9px; background: var(--green-soft); color: var(--green-dark); font-weight: 700; }

.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; padding: 36px; background: linear-gradient(180deg, #ffffff, #f4faf6); }
.privacy:hover { transform: none; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding: 6px 0 6px 30px; font-weight: 500; }
.checks li::before { content: ""; position: absolute; left: 0; top: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--green-soft); box-shadow: inset 0 0 0 1px #bfe1cb; }
.checks li::after { content: ""; position: absolute; left: 6px; top: 13px; width: 4px; height: 8px; border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.privacy .note { grid-column: 1 / -1; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; }

.downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.download { display: flex; flex-direction: column; align-items: flex-start; }
.download h3 { font-size: 22px; }
.download .detail { font-size: 14px; }
.download .meta { margin-top: 6px; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.download .meta:empty { display: none; }
.download .button { margin-top: auto; }
.download .detail + .meta + .button, .download .meta + .button { margin-top: 18px; }

/* Footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 28px; padding-bottom: 40px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--green-dark); }

/* Privacy page */
.prose { max-width: 760px; padding-top: 56px; padding-bottom: 40px; }
.prose h1 { font-size: clamp(32px, 5vw, 44px); }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--green); }
.prose .lead { margin-bottom: 8px; }
.prose .updated { color: var(--muted); font-size: 14px; }

/* Motion: a short fade-up on load and as sections scroll into view. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-copy { animation: rise 0.6s var(--ease) both; }
.preview { animation: rise 0.7s var(--ease) 0.12s both; }
.preview-toast { animation: rise 0.5s var(--ease) 0.7s both; }
.prose { animation: rise 0.5s var(--ease) both; }
[data-reveal] { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
[data-reveal].pending { opacity: 0; transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal].pending { opacity: 1; transform: none; }
  .button:hover, .card:hover { transform: none !important; }
}

/* Tablet */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 48px; }
  .steps { grid-template-columns: 1fr; }
  .preview-toast { right: 12px; }
}

/* Mobile */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav { min-height: 56px; }
  .nav li:not(:last-child):not(.nav-github) { display: none; }
  .nav-github .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lead { font-size: 17px; }
  .features, .downloads, .privacy { grid-template-columns: 1fr; }
  .privacy { padding: 24px; }
  .section { padding-top: 40px; padding-bottom: 40px; }
  .actions .button { flex: 1 1 auto; }
  .preview-body { font-size: 12px; padding: 14px 14px 30px; }
}

/* Cookie consent banner (created by gtag.js) and the footer "Cookie settings" link */
.link-button { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--green-dark); }
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: rise 0.4s var(--ease) both;
}
.consent p { flex: 1 1 260px; margin: 0; font-size: 14px; color: var(--text); }
.consent-actions { display: flex; gap: 8px; }
.consent .button { min-height: 40px; padding: 8px 16px; }

/* GitHub mark (inline SVG) in the header link and hero button */
.gh-mark { width: 16px; height: 16px; flex: none; fill: currentColor; }
.button .gh-mark { width: 18px; height: 18px; }
