/* Carbon Tracker public pages. Hand-written and self-contained: these pages are static HTML served
   by the Worker, so they do not share the app's Tailwind bundle. Colours follow the registered logo
   (navy, blue, lime) with a paddock-and-pine palette for the land-based pages. */

:root {
  color-scheme: light;
  --navy: #071a27;
  --navy-2: #0b2a3d;
  --blue: #0d6f9e;
  --blue-bright: #1696d2;
  --lime: #7ac143;
  --lime-bright: #8fd14f;
  --pine: #14402c;
  --pine-2: #1f5a3a;
  --paddock: #5d7a2e;
  --clay: #8a5a2b;
  --ground: #f6f4ee;
  --panel: #ffffff;
  --panel-2: #fbfaf6;
  --line: #e2ddd0;
  --line-strong: #cfc8b6;
  --ink: #0c1a24;
  --ink-2: #44535f;
  --ink-3: #5c6a75;
  --hero-a: var(--navy);
  --hero-b: var(--navy-2);
  --hero-glow: rgba(22, 150, 210, 0.3);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(12, 26, 36, 0.06), 0 8px 24px rgba(12, 26, 36, 0.06);
  --wrap: 1120px;
}

body.theme-forest { --hero-a: #0b2a1d; --hero-b: #14402c; --hero-glow: rgba(122, 193, 67, 0.26); }
body.theme-farm { --hero-a: #1d2a12; --hero-b: #33491c; --hero-glow: rgba(214, 178, 76, 0.24); }
body.theme-obligations { --hero-a: #0a1c2b; --hero-b: #12344d; --hero-glow: rgba(22, 150, 210, 0.3); }
body.theme-ledger { --hero-a: #10202b; --hero-b: #1b3a44; --hero-glow: rgba(92, 192, 240, 0.24); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pine-2); margin-bottom: 10px; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 68ch; }
.muted { color: var(--ink-3); }
.small { font-size: 0.86rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 12px; border: 2px solid transparent;
  font-size: 1.02rem; font-weight: 700; text-decoration: none; cursor: pointer; font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lime { background: var(--lime); color: var(--navy); box-shadow: 0 8px 22px rgba(122, 193, 67, 0.35); }
.btn-lime:hover { background: var(--lime-bright); color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: var(--panel); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 0.92rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 46px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a.nav-link { color: var(--ink-2); text-decoration: none; font-size: 0.93rem; font-weight: 600; padding: 10px 11px; border-radius: 8px; }
.nav a.nav-link:hover, .nav a.nav-link[aria-current="page"] { color: var(--navy); background: #eef3ea; }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--line-strong); background: #fff; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { display: block; }
@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 2px; box-shadow: 0 18px 30px rgba(12, 26, 36, 0.12); }
  .nav.open { display: flex; }
  .nav a.nav-link { padding: 14px 10px; font-size: 1.02rem; }
  .nav .btn { margin: 10px 0 0; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 88% 8%, var(--hero-glow), transparent 62%),
    linear-gradient(160deg, var(--hero-a) 0%, var(--hero-b) 100%);
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 150px; }
.hero .eyebrow { color: var(--lime); }
.hero .lead { color: rgba(255, 255, 255, 0.86); font-size: 1.18rem; margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-note { margin-top: 14px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.72); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.92); }
.crumbs { font-size: 0.84rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 16px; }
.crumbs a { color: rgba(255, 255, 255, 0.9); }
.hero-scene { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; width: 100%; height: 190px; display: block; pointer-events: none; }
.hero-visual { display: flex; justify-content: center; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 34px; padding-top: 44px; padding-bottom: 120px; }
  .hero-scene { height: 120px; }
}

/* Phone frame and sample card */
.phone { width: 264px; padding: 10px; border-radius: 38px; background: #0a1620; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); transform: rotate(-2.5deg); }
.phone img { display: block; width: 100%; height: auto; border-radius: 28px; }
.sample { width: 100%; max-width: 400px; background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
.sample h2, .sample .sample-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }
.sample dl { margin: 14px 0 0; display: grid; gap: 12px; }
.sample dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.sample dd { margin: 2px 0 0; font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sample dd small { display: block; font-size: 0.82rem; font-weight: 500; letter-spacing: 0; color: var(--ink-3); margin-top: 2px; }
.sample .tag { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eaf5df; color: #2c5a12; }

/* Estimator */
.estimator { width: 100%; max-width: 420px; background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
.estimator .est-title { font-size: 1.12rem; font-weight: 700; margin: 0 0 2px; letter-spacing: -0.01em; }
.estimator p.small { margin-bottom: 14px; color: var(--ink-3); }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 4px; color: var(--ink-2); }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font: inherit; font-size: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.est-result { margin-top: 14px; padding: 16px; border-radius: 12px; background: #f0f7e8; border: 1px solid #cfe5b8; }
.est-result[hidden] { display: none; }
.est-result .big { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--pine); }
.est-result ul { margin: 10px 0 12px; padding: 0; list-style: none; font-size: 0.9rem; color: var(--ink-2); display: grid; gap: 4px; }
.est-error { margin-top: 10px; font-size: 0.9rem; color: #a0322f; }
.est-error[hidden] { display: none; }

/* Sections */
section.block { padding: 72px 0; }
section.block.panel { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.block.tight { padding: 48px 0; }
.section-head { max-width: 72ch; margin-bottom: 30px; }
.section-head p { color: var(--ink-2); margin-top: 12px; }
.prose { max-width: 74ch; }
.prose h2 { margin-bottom: 16px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 0; list-style: none; display: grid; gap: 10px; margin: 0 0 1em; }
.prose ul li { position: relative; padding-left: 30px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 18px; height: 18px; border-radius: 50%; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23071a27' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17.5 19 7'/%3E%3C/svg%3E") center / 12px no-repeat; }
.two-col { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 28px; } section.block { padding: 52px 0; } }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
section.panel .card { background: var(--panel-2); }
.card p { color: var(--ink-2); font-size: 0.97rem; margin: 0; }
.card .figure { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--pine); line-height: 1.1; }
.card .figure small { display: block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0; color: var(--ink-3); margin-top: 3px; }
.card .more { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 0.95rem; }
.icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #eaf5df; color: var(--pine-2); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-top: -64px; position: relative; z-index: 3; }
.stats div { padding: 22px 24px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats strong { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; color: var(--navy); line-height: 1.1; }
.stats span { font-size: 0.88rem; color: var(--ink-3); }
@media (max-width: 700px) { .stats div { border-right: 0; border-bottom: 1px solid var(--line); } .stats div:last-child { border-bottom: 0; } }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.steps li { counter-increment: step; position: relative; padding-left: 58px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps p { color: var(--ink-2); font-size: 0.97rem; margin: 6px 0 0; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
table.compare { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 0.96rem; }
table.compare th, table.compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare tr:last-child td, table.compare tr:last-child th { border-bottom: 0; }
table.compare thead th { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); background: var(--panel-2); }
table.compare thead th.us { color: var(--pine); background: #eaf5df; }
table.compare td.us { background: #f6fbf0; font-weight: 600; color: var(--ink); }
table.compare tbody th { font-weight: 700; width: 26%; }

/* Pricing */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.price { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.price.best { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(122, 193, 67, 0.2), var(--shadow); }
.price .flag { position: absolute; top: -13px; left: 22px; background: var(--lime); color: var(--navy); font-size: 0.74rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.price .amount small { font-size: 0.9rem; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.price p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }
.price .btn { margin-top: auto; }
.ticks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px 28px; color: var(--ink-2); font-size: 0.96rem; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 17px; height: 17px; border-radius: 50%; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23071a27' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17.5 19 7'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* CTA band */
.cta-band { color: #fff; background: radial-gradient(800px 400px at 90% 0%, var(--hero-glow), transparent 60%), linear-gradient(160deg, var(--hero-a), var(--hero-b)); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-top: 54px; padding-bottom: 54px; }
.cta-band .cta-text { flex: 1 1 420px; }
.cta-band p { color: rgba(255, 255, 255, 0.82); margin: 10px 0 0; font-size: 1.02rem; }

/* FAQ */
.faq { max-width: 860px; display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
section.panel .faq details { background: var(--panel-2); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { display: inline; font-size: 1.05rem; }
.faq summary::after { content: ""; position: absolute; right: 2px; top: 24px; width: 11px; height: 11px; border-right: 2.5px solid var(--pine-2); border-bottom: 2.5px solid var(--pine-2); transform: rotate(45deg); transition: transform 0.15s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq details p { color: var(--ink-2); padding-bottom: 18px; margin: 0; }

/* Contact and footer */
.contact { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; } }
.contact-actions { display: flex; flex-direction: column; gap: 12px; }
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.78); font-size: 0.92rem; padding: 56px 0 96px; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer img { height: 44px; width: auto; margin-bottom: 14px; }
.site-footer .legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.84rem; color: rgba(255, 255, 255, 0.62); }

/* Sticky mobile call to action */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .sticky-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 12px; align-items: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(7, 26, 39, 0.97); color: #fff; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25); transform: translateY(110%); transition: transform 0.2s ease; }
  .sticky-cta.show { transform: none; }
  .sticky-cta span { flex: 1; font-size: 0.84rem; line-height: 1.3; }
  .sticky-cta .btn { min-height: 46px; padding: 0 16px; font-size: 0.94rem; }
}

.notfound { padding: 110px 0; text-align: center; }
.notfound .lead { margin: 16px auto 26px; }

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