/* SatPole – simple, modern, fast. No external fonts. */
:root {
  --paper: #f5f3ec;
  --paper-2: #ece8dc;
  --card: #ffffff;
  --ink: #16231a;
  --muted: #5b685e;
  --line: #dcd7c8;
  --green: #1f4d2b;
  --green-2: #2f6e3c;
  --leaf: #4f9a4f;
  --ochre: #c79a2b;
  --low: #b0532a;
  --low-bg: #fbeee6;
  --good-bg: #e8f3e5;
  --mid-bg: #f7f1dc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 35, 26, .05), 0 8px 24px rgba(22, 35, 26, .06);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: var(--green-2); text-underline-offset: 3px; }
a:hover { color: var(--green); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--paper-2); padding: .15em .4em; border-radius: 6px; }

.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-alt { background: var(--paper-2); }
.section-title { margin-bottom: 1.2em; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; margin: .4em 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(245, 243, 236, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav a[aria-current="page"] { color: var(--green-2); font-weight: 600; }
.nav a.btn { color: #fff; }
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; background: var(--green); color: #fff;
  font: 600 1rem var(--sans); padding: 12px 20px; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--green-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-lg { width: 100%; padding: 15px 20px; font-size: 1.05rem; }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--green); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--paper-2); color: var(--green); }

label { display: block; font-weight: 600; margin: 0 0 6px; font-size: .95rem; }
input[type="text"] {
  width: 100%; font: 1.05rem var(--sans); padding: 13px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
input[type="text"]:focus { border-color: var(--green-2); outline: 3px solid rgba(79, 154, 79, .25); }

.alert { background: var(--low-bg); color: #6d2f14; border: 1px solid #efcdb9; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.alert-info { background: var(--mid-bg); color: #5a4612; border-color: #eadfb4; }

/* ---------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); margin-bottom: 20px; }
.card-title { font-size: 1.3rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head .card-title { margin: 0; }

/* ---------- hero */
.hero { padding: clamp(36px, 6vw, 80px) 0; background:
  radial-gradient(1200px 400px at 10% -10%, rgba(79, 154, 79, .14), transparent 60%),
  repeating-linear-gradient(115deg, transparent 0 46px, rgba(31, 77, 43, .035) 46px 48px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.hero h1 span { color: var(--green-2); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--ochre); margin-bottom: 1em; }
.lead { font-size: 1.15rem; color: #34433a; max-width: 36em; }
.ticks { list-style: none; padding: 0; margin: 1.5em 0 0; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--good-bg); border: 2px solid var(--leaf); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: .52em; width: 5px; height: 9px; border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.start { margin: 0; }
.demo-link { margin: 16px 0 0; font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- tabs */
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper-2); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.tab { border: 0; background: transparent; padding: 10px; border-radius: 8px; font: 600 .95rem var(--sans); color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.tabpanel input[type="text"] { margin-bottom: 4px; }
.tabpanel .btn-lg { margin-top: 6px; }

/* ---------- maps */
.map { border-radius: 10px; border: 1px solid var(--line); background: #e6e2d6; z-index: 0; }
.map-draw { height: 300px; margin-bottom: 8px; cursor: crosshair; }
.map-field { height: 360px; }
.draw-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.draw-bar .muted { margin-right: auto; font-size: .9rem; }
.legend { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .85rem; color: var(--muted); }
.legend-bar { flex: 1; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #8c6b4d, #ccb380 20%, #ede08c 35%, #bfd966 50%, #73b84d 65%, #338c33 80%, #0d591a); }

/* ---------- features, steps, pricing, faq */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature p { color: var(--muted); margin: 0; }
.feature-num { font-family: var(--serif); font-size: 2.4rem; color: var(--green-2); margin-bottom: 8px; line-height: 1; }
.feature-swatch { height: 38px; border-radius: 8px; margin-bottom: 10px; background: linear-gradient(90deg, #ccb380, #ede08c, #bfd966, #73b84d, #338c33, #0d591a); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 14px; max-width: 760px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 62px; background: var(--card); border-radius: 12px; border: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; }
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 20px; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan ul { padding-left: 1.1em; margin: 0 0 22px; color: #34433a; flex: 1; }
.plan li { margin-bottom: 6px; }
.plan-pro { border-color: var(--ochre); }
.price { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 14px; color: var(--green); }
.badge { position: absolute; top: 18px; right: 18px; background: var(--mid-bg); color: #6f5512; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.faq p { color: #34433a; }

/* ---------- field page */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.field-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.field-head h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: .2em; }
.field-head p { margin: 0; }
.save-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: .85rem; }
.save-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.save-row code { font-size: 1rem; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 2px; border-top: 4px solid var(--line); }
.kpi-good { border-top-color: var(--leaf); }
.kpi-mid { border-top-color: var(--ochre); }
.kpi-low { border-top-color: var(--low); }
.kpi-label { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi-value { font-family: var(--serif); font-size: 2.4rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 1rem; color: var(--muted); font-family: var(--sans); }
.kpi-value-sm { font-size: 2rem; }
.kpi-sub { font-size: .9rem; color: var(--muted); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field-grid > .card { margin-bottom: 20px; }
@media (max-width: 900px) { .field-grid { grid-template-columns: 1fr; } }

.statements { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.st { padding: 12px 14px 12px 40px; border-radius: 10px; position: relative; background: var(--paper); }
.st::before { position: absolute; left: 14px; top: 12px; font-weight: 700; }
.st-info::before { content: "i"; color: var(--muted); font-family: var(--serif); font-style: italic; }
.st-good { background: var(--good-bg); }
.st-good::before { content: "↑"; color: var(--green-2); }
.st-warn { background: var(--low-bg); }
.st-warn::before { content: "!"; color: var(--low); }

.seg { display: inline-flex; background: var(--paper-2); border-radius: 9px; padding: 3px; }
.seg-btn { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font: 600 .85rem var(--sans); color: var(--muted); cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.chart-box { position: relative; height: 320px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px 10px; }
.table td { border-bottom: 1px solid var(--line); padding: 9px 10px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700; }
.pill-good { background: var(--good-bg); color: var(--green); }
.pill-warn { background: var(--low-bg); color: var(--low); }

.wx { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.wx-day { border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.wx-past { background: var(--paper-2); }
.wx-date { font-size: .8rem; color: var(--muted); }
.wx-t { font-weight: 700; font-size: 1.05rem; }
.wx-t small { color: var(--muted); font-weight: 400; }
.wx-r { font-size: .82rem; color: #2a5a8a; }

/* ---------- prose pages */
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose .table { margin: 1em 0 1.5em; }

/* ---------- footer */
.footer { background: var(--ink); color: #c9d1ca; padding: 40px 0; margin-top: 20px; font-size: .92rem; }
.footer-in { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; }
.footer strong { color: #fff; font-size: 1.05rem; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.footer a { color: #e6ece7; }
.attrib { grid-column: 1 / -1; font-size: .8rem; color: #9aa79d; border-top: 1px solid #2c3b31; padding-top: 16px; margin: 0; }
@media (max-width: 700px) { .footer-in { grid-template-columns: 1fr; } }

/* Leaflet tweaks */
.leaflet-container { font-family: var(--sans); }
