/* EcoPayback — single hand-rolled stylesheet, no build step.
   Palette derived from the brand logo (plans/EcoPayback_logo.svg). */

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:root {
  --brand-deep: #0d5539;   /* roof / primary actions */
  --brand-mid: #23734a;
  --leaf: #79b63a;          /* accent only — not text on white */
  --brand-accent: #3f7d16;  /* darker leaf, safe for text on white */

  --green: #0d5539;         /* button / action bg */
  --green-dark: #0b4d35;    /* links, hover */
  --btn-ink: #ffffff;       /* text on --green */
  --focus: #0b4d35;

  --ink: #17251d;
  --muted: #55605a;
  --bg: #ffffff;
  --panel: #eef4ec;
  --panel-2: #e3efdf;
  --border: #d3e0d2;
  --callout-bg: #f4f9ee;

  --max: 68rem;
  --measure: 42rem;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-deep: #8fce55;
    --brand-mid: #6bbf7e;
    --leaf: #8cbd43;
    --brand-accent: #8fce55;

    --green: #2f8d5a;
    --green-dark: #8fce55;
    --btn-ink: #08130a;
    --focus: #8fce55;

    --ink: #e7ece8;
    --muted: #a6b0aa;
    --bg: #0e120f;
    --panel: #172019;
    --panel-2: #1d271f;
    --border: #2b352d;
    --callout-bg: #16211a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

main.wrap { padding-block: 1.75rem 3.5rem; }

h1, h2, h3, h4 { line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.8rem); margin: 0 0 .75rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .4rem; }
h4 { font-size: 1rem; margin: 1.25rem 0 .3rem; }

a { color: var(--green-dark); }
a:hover { text-decoration: none; }

p { margin: 0 0 1rem; }
.lede { font-size: 1.15rem; color: var(--muted); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--bg);
  padding: .5rem .75rem;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  z-index: 1000;
}

/* Header + brand */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.05);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-block: .9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
}
.brand__mark { height: 2.6rem; width: 2.6rem; flex: none; }
.brand__name {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -.02em;
}
.brand__eco, .brand__ie { color: var(--brand-accent); }
.brand__pay { color: var(--brand-deep); }

.nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin: 0;
  padding: 0;
}
.nav a { text-decoration: none; color: var(--ink); }
.nav a:hover,
.nav a[aria-current="page"] { color: var(--green-dark); text-decoration: underline; }

/* Menu: inline nav on desktop; burger on mobile when JS is available.
   Without JS the nav simply stays visible (wraps) at every width. */
.menu { position: static; }
.menu__nav { display: block; }
.menu__btn {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-block: -0.15rem;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.menu__ico { width: 1.6rem; height: 1.6rem; }
.menu__ico--close { display: none; }
.menu.is-open .menu__ico--open { display: none; }
.menu.is-open .menu__ico--close { display: inline; }

@media (max-width: 48rem) {
  .js .menu__btn { display: inline-flex; }
  .js .menu__nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 14px rgb(0 0 0 / 0.08);
    padding: .25rem 1.25rem 1rem;
  }
  .js .menu.is-open .menu__nav { display: block; }
  .menu__nav .nav { flex-direction: column; gap: 0; }
  .menu__nav .nav li + li { border-top: 1px solid var(--border); }
  .menu__nav .nav a { display: block; padding: .85rem 0; }
}

/* Breadcrumbs */
.breadcrumbs {
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  font-size: .9rem;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: .35rem;
  margin: 0;
  padding-block: .6rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.breadcrumbs ol::-webkit-scrollbar { display: none; }
.breadcrumbs li {
  flex: 0 0 auto;
  white-space: nowrap;
}
.breadcrumbs li + li::before {
  content: "›";
  margin-right: .35rem;
  color: var(--muted);
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--muted); }

/* Hero + CTAs */
.hero { margin-bottom: 2.5rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block;
  padding: .7rem 1.15rem;
  border-radius: var(--radius);
  background: var(--green);
  color: var(--btn-ink);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--green);
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--btn-ink); }
.btn--ghost { background: transparent; color: var(--green-dark); }
.btn--ghost:hover { background: var(--panel); color: var(--green-dark); }

/* Card grid (hubs, home) */
.card-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  background: var(--bg);
}
.card h3 { margin-top: 0; }
.card h3 a { text-decoration: none; }
.card--feature {
  border-color: var(--brand-deep);
  background: var(--panel);
  grid-column: 1 / -1;
}

.tag {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--brand-deep);
  background: var(--panel-2);
  padding: .2rem .6rem;
  border-radius: 999px;
}

/* Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2.5rem;
}
.panel h2 { margin-top: 0; }

/* Affiliate links */
.aff-link { font-weight: 600; }
.aff-tag {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: super;
  margin-left: .2em;
  padding: .05em .35em;
  border-radius: 4px;
  background: var(--muted);
  color: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Definition lists (FAQ, privacy) */
dl { margin: 1rem 0; }
dt { font-weight: 700; margin-top: 1rem; }
dd { margin: 0 0 .5rem; }

.faq {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding-top: 1rem;
}

/* Article prose (markdown content) — full page width, aligned with the header */

.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin: .3rem 0; }
.prose li::marker { color: var(--brand-accent); }

.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--callout-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--leaf);
  border-radius: 8px;
}
.prose blockquote > :last-child { margin-bottom: 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .95rem;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: .5rem .7rem;
  text-align: left;
  vertical-align: top;
}
.prose thead th { background: var(--panel); }

@media (max-width: 40rem) {
  .prose table { display: block; overflow-x: auto; }
}

/* Task-list checklists (markdown-it-task-lists) */
.prose .contains-task-list { list-style: none; padding-left: .2rem; }
.prose .task-list-item { display: flex; gap: .5rem; align-items: baseline; }
.prose .task-list-item-checkbox { margin-top: .15rem; }

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--panel);
  padding-block: 2rem;
  font-size: .95rem;
}
.site-footer .disclosure { color: var(--muted); max-width: var(--measure); }
.nav--footer { margin: 1rem 0; }
.copyright { color: var(--muted); margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
