/* RV Camper Care — one stylesheet for the whole site.
   Colors come from the RV & Camper Care logo: forest-to-lime green on cream, black type. */

:root {
  --cream: #f8f3d4;   /* logo background */
  --panel: #fffcf0;
  --ink: #141a12;     /* logo wordmark black */
  --muted: #4a5446;
  --forest: #006838;  /* logo dark green */
  --leaf: #3c9130;    /* logo mid green */
  --lime: #95ce24;    /* logo light green: buttons and accents */
  --deep: #0b3b22;    /* footer */
  --line: #e2dbb8;
  --good: #1f7a4d;
  --bad: #a3312a;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; }
a { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; border-radius: 3px; }
.site-foot :focus-visible, .est-readout :focus-visible { outline-color: var(--lime); }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--forest);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; font-stretch: 112%; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: 1.25rem; color: var(--muted); }
.fine { font-size: 0.9rem; color: var(--muted); }

/* ---------- Header + livery ---------- */
.site-head { background: var(--panel); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); }
.brand-mark { width: 44px; height: 44px; display: block; }
.brand-name { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink); line-height: 1; }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--lime); }

.livery { display: grid; grid-template-rows: 7px 5px 3px; }
.livery span:nth-child(1) { background: var(--lime); }
.livery span:nth-child(2) { background: var(--leaf); }
.livery span:nth-child(3) { background: var(--forest); }

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 48px; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 460px; } }
.hero h1 { max-width: 14ch; }
.hero-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.hero-points li { padding-left: 30px; position: relative; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 18px; height: 8px;
  background: linear-gradient(90deg, var(--forest), var(--lime)); border-radius: 2px;
}

/* ---------- Estimator ---------- */
.estimator {
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 24px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(0, 60, 30, 0.35);
}
.estimator h2 { font-size: 1.35rem; }
.est-readout {
  margin: 20px 0 8px;
  padding: 18px 20px;
  background: var(--forest);
  color: #fff;
  border-radius: var(--radius-sm);
}
.est-range {
  font-family: var(--display); font-stretch: 125%; font-weight: 800;
  font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1; display: block;
  font-variant-numeric: tabular-nums;
}
.est-note { font-size: 0.95rem; color: #dcebd2; margin: 8px 0 0; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field legend { font-weight: 700; font-size: 1rem; }
.field .hint { font-size: 0.9rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink);
  padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.25); }
textarea { min-height: 120px; resize: vertical; }
.row2 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }
.checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--leaf); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.error-list { background: #fbeceb; color: var(--bad); border-radius: var(--radius-sm); padding: 12px 16px 12px 36px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1.05rem var(--body); text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: var(--radius-sm); border: 2px solid var(--forest);
  background: var(--lime); color: var(--ink); min-height: 48px;
}
.btn:hover { background: #a9da4d; color: var(--ink); }
.btn-quiet { background: transparent; }
.btn-quiet:hover { background: var(--cream); }
.btn-danger { background: #fff; border-color: var(--bad); color: var(--bad); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin: 20px 0 0; font-weight: 700; }
.flash-ok { background: #e3f2ea; color: var(--good); }
.flash-error { background: #fbeceb; color: var(--bad); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--panel); border-block: 1px solid var(--line); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0 0; display: grid; gap: 24px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 10px;
  font-family: var(--display); font-weight: 800; color: var(--forest); background: var(--lime);
}
.svc-groups { display: grid; gap: 8px 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 16px; }
.svc-groups h3 { margin: 12px 0 4px; }
.svc-list { padding-left: 1.1em; margin: 0; }
.svc-list li { margin-bottom: 6px; break-inside: avoid; }

.page { padding: 40px 0 64px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; }

/* ---------- Tables (partner + admin) ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.9rem; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 0.85rem; font-weight: 700; background: var(--cream); }
.tag-accepted, .tag-paid, .tag-active { background: #e3f2ea; color: var(--good); }
.tag-offered, .tag-open, .tag-pending, .tag-credit_requested { background: #fdf1d6; color: #7a5300; }
.tag-unmatched, .tag-failed, .tag-payment_failed, .tag-paused { background: #fbeceb; color: var(--bad); }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 24px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; }
.stat b { display: block; font-family: var(--display); font-stretch: 125%; font-size: 1.8rem; color: var(--forest); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 0.95rem; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.facts dt { font-weight: 700; color: var(--muted); }
dl.facts dd { margin: 0; }

/* ---------- Articles ---------- */
.article { padding: 40px 0 64px; }
.article .narrow > h2 { margin-top: 1.6em; }
.article li { margin-bottom: 0.4em; }
.article-meta { color: var(--muted); font-size: 0.95rem; }
.article-cta { background: var(--forest); color: #fff; border-radius: var(--radius-lg); padding: 24px; margin-top: 40px; }
.article-cta h2 { color: #fff; }
.article-cta p { color: #dcebd2; }
.card-list { list-style: none; padding: 0; display: grid; gap: 16px; }
.card-list a { display: block; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--lime); border-radius: var(--radius-sm); padding: 18px 20px; text-decoration: none; color: var(--ink); }
.card-list a:hover { border-left-color: var(--leaf); }
.card-list h2 { font-size: 1.2rem; margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-foot { background: var(--deep); color: #dcebd2; padding: 40px 0 28px; margin-top: 0; }
.site-foot a { color: #fff; }
.site-foot .fine { color: #b7cba8; }
.foot-row { display: grid; gap: 24px; grid-template-columns: 1fr; margin-bottom: 20px; }
@media (min-width: 800px) { .foot-row { grid-template-columns: 2fr 1fr; } }
.foot-brand { font-family: var(--display); font-stretch: 125%; font-weight: 800; color: #fff; font-size: 1.2rem; }
.foot-nav { display: grid; gap: 8px; }

.install-tip { display: none; }
.install-tip.show { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .est-range { transition: opacity 160ms ease; }
  .est-range.updating { opacity: 0.35; }
}
@media print { .site-head, .site-foot, .btn { display: none; } }
