/* =========================================================
   DieselMath — design tokens (based on the SquareUp reference)
   ========================================================= */
:root {
  --bg: #141414;
  --bg-2: #222522;       /* cards and panels: slightly lighter than the background */
  --surface: #282b28;
  --surface-2: #2f332f;
  --border: #2a2d2a;
  --border-2: #353935;
  --text: #ffffff;       /* important numbers and headings */
  --muted: #b8bdb8;      /* labels, descriptions, supporting info */
  --danger: #ff7777;     /* negative money results */
  --accent-fill: #caff33; /* buttons and bars: stays bright lime in both themes */
  --text-2: #e6e6e6;
  --warn: #ffc433;
  --hover-border: #444;
  --header-bg: rgba(20, 20, 20, 0.82);
  --glass: rgba(30, 30, 30, 0.75);
  --banner-bg: #121212;
  --hero-veil: rgba(18, 18, 18, 0.92);
  --icon-bg: linear-gradient(145deg, #2a2a2a, #1c1c1c);
  color-scheme: dark;
  --dim: #8c8c8c;
  --accent: #caff33;
  --accent-ink: #141414;
  --accent-soft: rgba(202, 255, 51, 0.12);

  --radius: 10px;
  --radius-sm: 8px;
  --container: 1280px;
  --gutter: clamp(16px, 4vw, 80px);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Page content runs edge to edge — no empty strips at the sides */
main > .container { padding-inline: 0; }
.frame { border-inline: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn--primary:hover { background: #d8ff66; }
.btn--ghost { background: var(--bg-2); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--hover-border); background: var(--surface); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.logo__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--accent-fill);
  border-radius: 8px;
  color: var(--accent-ink);
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-2);
  transition: background 0.2s;
}
.nav a:hover { background: var(--surface); }
.nav a.is-active { background: var(--surface-2); color: var(--text); }
.header__cta { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-2);
  place-items: center;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(64px, 9vw, 110px) 0 0;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero__inner { position: relative; z-index: 2; }
.hero__title {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin-inline: auto;
}
.hero__title em { font-style: normal; color: var(--accent); }
.audience {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
  max-width: 100%;
}
.audience__label {
  padding-right: 18px;
  border-right: 1px solid var(--border-2);
  color: var(--dim);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.audience__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.audience .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 12px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  transition: border-color .2s, background-color .2s;
}
.audience .chip svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.audience .chip:hover {
  border-color: rgba(202, 255, 51, 0.45);
  background: rgba(202, 255, 51, 0.06);
}
.hero__lead {
  max-width: 640px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 300;
}
.hero__buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.hero__terrain {
  position: relative;
  height: clamp(220px, 28vw, 360px);
  margin-top: -40px;
  z-index: 1;
  pointer-events: none;
}
.hero__terrain canvas { width: 100%; height: 100%; }
.hero__terrain::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(transparent, var(--bg));
}

/* ---------- Stats / trust strip ---------- */
.trust {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.trust__label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 20px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--bg);
  font-size: 14px;
  white-space: nowrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 44px 24px 36px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: 0; }
.stat strong {
  display: block;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stat strong span { color: var(--accent); }
.stat p { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- Section banner (textured header) ---------- */
.banner {
  position: relative;
  padding: clamp(64px, 8vw, 100px) 24px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 10% 0%, rgba(202,255,51,0.10), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(202,255,51,0.06), transparent 55%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 7px),
    var(--banner-bg);
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 70% at 50% 50%, var(--hero-veil), transparent 80%);
}
.banner > * { position: relative; }
.banner h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.banner p {
  max-width: 680px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 300;
}

/* ---------- Grids of bordered cells ---------- */
.grid {
  display: grid;
  border-bottom: 1px solid var(--border);
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.cell {
  padding: clamp(28px, 3.5vw, 48px);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.grid--3 .cell:nth-child(3n) { border-right: 0; }
.grid--2 .cell:nth-child(2n) { border-right: 0; }

.icon-box {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--icon-bg);
  border: 1px solid var(--border-2);
  color: var(--accent);
  flex-shrink: 0;
}
.cell h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.cell p { color: var(--muted); font-size: 15px; font-weight: 300; }
.cell .btn { margin-top: auto; }
.cell__head { display: flex; align-items: center; gap: 16px; }
.cell__head h3 { font-size: 22px; font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- Calculator ---------- */
.calc {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border-bottom: 1px solid var(--border);
}
.calc__form, .calc__result { padding: clamp(28px, 4vw, 56px); }
.calc__form { border-right: 1px solid var(--border); display: grid; gap: 28px; align-content: start; }
.tabs {
  display: inline-flex;
  padding: 6px;
  gap: 6px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  justify-self: start;
}
.tab {
  padding: 10px 18px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
}
.tab.is-active { background: var(--surface-2); color: var(--text); }
.field { display: grid; gap: 10px; }
.field__top { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.field__top label { color: var(--muted); }
.field__top output { font-weight: 600; font-size: 18px; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent-fill) var(--fill, 50%), var(--surface-2) var(--fill, 50%));
  outline-offset: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-fill);
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-fill);
  border: 4px solid var(--bg);
}
.calc__result {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(202,255,51,0.08), transparent 70%),
    var(--bg-2);
}
.calc__result .eyebrow { color: var(--muted); font-size: 15px; }
.calc__big {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.calc__big small { font-size: 0.4em; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.breakdown { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--border-2); }
.breakdown li { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; }
.breakdown li b { color: var(--text); font-weight: 500; }
.note { font-size: 13px; color: var(--dim); }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); }
.step {
  padding: clamp(28px, 3vw, 40px);
  border-right: 1px solid var(--border);
  display: grid;
  gap: 14px;
  align-content: start;
}
.step:last-child { border-right: 0; }
.step__num {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
}
.step h3 { font-size: 20px; font-weight: 600; }
.step p { color: var(--muted); font-size: 15px; font-weight: 300; }

/* ---------- Testimonials ---------- */
.quote { gap: 22px; }
.quote blockquote { margin: 0; font-size: 17px; font-weight: 300; color: var(--text-2); line-height: 1.6; }
.stars { color: var(--accent); letter-spacing: 3px; font-size: 15px; }
.person { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.avatar {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  font-weight: 600;
  color: var(--accent);
}
.person b { display: block; font-weight: 500; }
.person span { color: var(--dim); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.faq details {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px clamp(24px, 3vw, 48px);
}
.faq details:nth-child(2n) { border-right: 0; }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--accent);
  font-size: 22px;
  font-weight: 300;
  transition: transform 0.2s;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 14px; color: var(--muted); font-weight: 300; }

/* ---------- CTA ---------- */
.cta { padding: clamp(56px, 7vw, 96px) 24px; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding: 56px 0;
}
.footer__about p { color: var(--muted); font-size: 15px; font-weight: 300; margin-top: 16px; max-width: 320px; }
.footer h4 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { color: var(--muted); font-size: 15px; }
.footer ul a:hover { color: var(--accent); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 14px;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 .cell:nth-child(3n) { border-right: 1px solid var(--border); }
  .grid--3 .cell:nth-child(2n) { border-right: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav, .header__cta .btn--ghost { display: none; }
  .menu-toggle { display: grid; }
  .header.is-open .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 84px; left: 0; right: 0;
    padding: 12px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .calc { grid-template-columns: 1fr; }
  .calc__form { border-right: 0; border-bottom: 1px solid var(--border); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 680px) {
  .grid--3, .grid--2, .faq, .steps { grid-template-columns: 1fr; }
  .cell, .faq details, .step { border-right: 0 !important; }
  .step { border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: 0; }
  .header__cta .btn--primary { display: none; }
  .footer__top { grid-template-columns: 1fr; }
  .frame { border-inline: 0; }
  .audience { flex-direction: column; gap: 14px; }
  .audience__label { padding: 0; border: 0; }
  .audience .chip { font-size: 14px; padding: 8px 12px; }
}

/* ---------- Calculator & list helpers ---------- */
.calc__fields { display: grid; gap: 28px; }
.field__top label small { display: block; font-size: 13px; color: var(--dim); }
.calc__result .breakdown { margin-top: 20px; }
.calc__cta { margin-top: auto; }
.verdict {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}
.verdict--good { background: var(--accent-soft); color: var(--accent); }
.verdict--great { background: var(--accent-fill); color: var(--accent-ink); font-weight: 600; }
.verdict--ok { background: rgba(255, 196, 51, 0.12); color: var(--warn); }
.verdict--bad { background: rgba(255, 119, 119, 0.12); color: var(--danger); }
.steps { margin: 0; padding: 0; list-style: none; }
figure.cell { margin: 0; }

/* =========================================================
   Inner pages
   ========================================================= */
.page-hero {
  padding: clamp(56px, 8vw, 96px) 24px clamp(48px, 6vw, 72px);
  text-align: center;
  border-bottom: 1px solid var(--border);
  background-image:
    radial-gradient(60% 80% at 50% 0%, rgba(202,255,51,0.08), transparent 70%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: auto, 22px 22px, 22px 22px;
}
.pill {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.page-hero h1 em { font-style: normal; color: var(--accent); }
.page-hero p {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 300;
}

/* ---------- Typeable number fields ---------- */
.num {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  background: var(--bg-2);
  transition: border-color 0.2s;
}
.num:focus-within { border-color: var(--accent); }
.num__pre, .num__suf { color: var(--dim); font-size: 15px; }
.num input {
  width: 84px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: right;
  outline: none;
  -moz-appearance: textfield;
}
.num input::-webkit-outer-spin-button,
.num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__top { align-items: center; gap: 12px; }

/* ---------- Calculator teaser cards (home) ---------- */
.tool-card h3 { font-size: 24px; }
.tool-card__preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tool-card__preview div { background: var(--bg-2); padding: 14px 16px; }
.tool-card__preview span { display: block; font-size: 13px; color: var(--dim); }
.tool-card__preview b { font-size: 20px; font-weight: 600; }
.tool-card__preview b.hl { color: var(--accent); }

/* ---------- Pricing ---------- */
.billing-wrap { display: flex; justify-content: center; padding: 32px 24px 0; }
.billing .save {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 32px clamp(16px, 3vw, 40px) clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: var(--bg-2);
}
.plan--featured {
  border-color: var(--accent);
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(202,255,51,0.10), transparent 70%),
    var(--bg-2);
}
.plan__badge {
  position: absolute;
  top: -13px;
  left: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
}
.plan h3 { font-size: 22px; font-weight: 600; }
.plan__desc { color: var(--muted); font-size: 15px; font-weight: 300; margin-top: 6px; }
.plan__price { display: flex; align-items: baseline; gap: 6px; }
.plan__price strong { font-size: 48px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.plan__price span { color: var(--muted); }
.plan__billed { color: var(--dim); font-size: 13px; min-height: 20px; margin-top: -12px; }
.checks { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--border-2); }
.checks li { display: flex; gap: 10px; font-size: 15px; color: var(--text-2); }
.checks li::before {
  content: "";
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23caff33' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 8'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.plan .btn { margin-top: auto; }

.compare-wrap { overflow-x: auto; border-bottom: 1px solid var(--border); }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td {
  padding: 18px clamp(16px, 2.5vw, 32px);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--muted); }
.compare thead th { font-size: 17px; font-weight: 600; color: var(--text); background: var(--bg-2); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--accent); font-weight: 600; }
.compare .no { color: var(--dim); }
.compare .group td {
  background: var(--bg-2);
  color: var(--text) !important;
  font-weight: 600;
  text-align: left;
}

/* ---------- FAQ page ---------- */
.faq-search { padding: 32px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: center; }
.faq-search input { max-width: 560px; }
.faq-cat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px clamp(24px, 3vw, 48px);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 22px;
  font-weight: 600;
}
.faq-cat .icon-box { width: 44px; height: 44px; }
.faq--single { grid-template-columns: 1fr; }
.faq--single details { border-right: 0; }
.faq-empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.more-link { display: flex; justify-content: center; padding: 32px 24px; border-bottom: 1px solid var(--border); }

/* ---------- Forms (sign up / log in) ---------- */
.auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.auth__side {
  padding: clamp(32px, 5vw, 64px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
  background:
    radial-gradient(80% 60% at 0% 0%, rgba(202,255,51,0.08), transparent 70%),
    var(--bg-2);
}
.auth__side h2 { font-size: clamp(28px, 3vw, 36px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.auth__side p { color: var(--muted); font-weight: 300; }
.auth__main { padding: clamp(32px, 5vw, 64px); }
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label.lbl { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.input, .form select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.input:focus, .form select:focus { border-color: var(--accent); }
.input::placeholder { color: var(--dim); }
.form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3b3b3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 2px; }
.check a, .form__alt a { color: var(--accent); }
.form__alt { text-align: center; font-size: 15px; color: var(--muted); }
.form__alt button { background: none; border: 0; color: var(--accent); padding: 0; font-size: 15px; }
.err { color: var(--danger); font-size: 13px; min-height: 0; }
.input.is-invalid { border-color: var(--danger); }
.success {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  padding: 32px 0;
}
.success .icon-box { width: 72px; height: 72px; }
.success h3 { font-size: 28px; font-weight: 600; }
.success p { color: var(--muted); max-width: 420px; }
.auth__title { font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.auth__sub { color: var(--muted); margin-bottom: 28px; font-weight: 300; }

@media (max-width: 1080px) {
  .plans { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__side { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 680px) {
  .form__row { grid-template-columns: 1fr; }
  .num input { width: 70px; }
  .field__top label { font-size: 14px; }
}

/* =========================================================
   Trucking details: highway, exit signs, lane lines
   ========================================================= */

/* ---------- Highway under the hero ---------- */
.highway {
  position: relative;
  z-index: 2;
  height: 170px;
  margin-top: -80px;
  overflow: hidden;
  pointer-events: none;
}
.highway__road {
  position: absolute;
  inset: auto 0 26px 0;
  height: 30px;
  background: linear-gradient(#1c1c1c, #181818);
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
}
.highway__lane {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: repeating-linear-gradient(90deg, rgba(202,255,51,0.55) 0 34px, transparent 34px 70px);
  animation: lane 1.1s linear infinite;
}
@keyframes lane { to { background-position: -70px 0; } }

.rig {
  position: absolute;
  bottom: 38px;
  left: 0;
  width: 560px;
  height: auto;
  animation: drive 24s linear infinite;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5));
}
.rig__text { fill: var(--accent); font: 700 40px var(--font); letter-spacing: .01em; }
.rig__tag { fill: var(--muted); font: 600 10px var(--font); letter-spacing: .32em; }
.rig__bob { animation: bob .45s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-0.7px); } }
.wheel__tire { fill: #2a2e2a; stroke: #5c625c; stroke-width: .8; }
.wheel__tread { fill: none; stroke: #3a3f3a; stroke-width: 1; stroke-dasharray: 1.4 1; }
.wheel__wall { fill: #1a1d1a; stroke: #343934; stroke-width: .6; }
.wheel__rim { fill: url(#rigRim); }
.wheel__lip { fill: none; stroke: #6f756f; stroke-width: .5; }
.wheel__holes { fill: #2a2e2a; }
.wheel__plate { fill: #b9beb9; stroke: #7b817b; stroke-width: .4; }
.wheel__lugs { fill: #f2f5f2; stroke: #5f655f; stroke-width: .25; }
.wheel__cap { fill: #8b918b; }
.wheel__glint { fill: none; stroke: #fff; stroke-width: .5; stroke-linecap: round; opacity: .8; }
.wheel__spin { transform-box: fill-box; transform-origin: center; animation: spin .5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drive {
  from { transform: translateX(-580px); }
  to   { transform: translateX(calc(100vw + 40px)); }
}

/* ---------- "Exit" road-sign step numbers ---------- */
.steps { position: relative; }
.steps::before {               /* dashed lane line across the steps */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(202,255,51,0.45) 0 28px, transparent 28px 56px);
}
.step__num {
  justify-self: start;
  display: inline-grid;
  justify-items: center;
  min-width: 84px;
  padding: 8px 14px 10px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 3px #161616, inset 0 0 0 4px rgba(202,255,51,0.35);
  font-size: 40px;
  color: var(--accent);
  -webkit-text-stroke: 0;
}
.step__num small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

/* ---------- Inner page headers: moving lane line ---------- */
.page-hero { position: relative; overflow: hidden; }
.page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(202,255,51,0.4) 0 34px, transparent 34px 70px);
  animation: lane 1.6s linear infinite;
}
.page-hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40px;
  background: linear-gradient(transparent, rgba(255,255,255,0.03));
  border-top: 1px solid var(--border);
}

/* ---------- Footer: lane line on top edge ---------- */
.footer { position: relative; }
.footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -2px;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(202,255,51,0.35) 0 34px, transparent 34px 70px);
}

@media (max-width: 680px) {
  .rig { width: 340px; bottom: 38px; animation-duration: 15s; }
  .highway { height: 130px; margin-top: -50px; }
  .step__num { font-size: 32px; min-width: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .rig { animation-duration: 40s; }   /* still drives, just slower and without the bounce */
  .page-hero::after, .rig__bob { animation: none; }
}

/* ---------- FAQ closest-match search ---------- */
.faq-hint {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}
.faq-hint b { color: var(--text); font-weight: 600; }
.faq details.is-best { background: rgba(202, 255, 51, 0.05); box-shadow: inset 3px 0 0 var(--accent); }
.faq-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23caff33' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* =========================================================
   Tool pages (IFTA, P&L, maintenance, per diem, budget,
   dispatch, settlement, compliance) + tools hub
   ========================================================= */
.tool { border-bottom: 1px solid var(--border); }
.tool-grid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); }
.tool-panel {
  padding: clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--border);
  background: var(--bg-2);
  display: grid;
  gap: 22px;
  align-content: start;
}
.tool-main { padding: clamp(24px, 3vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-content: start; min-width: 0; }
.tool-main > *, .tool-panel > * { min-width: 0; }
.tool-panel h2, .tool-main h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.tool-sub { color: var(--dim); font-size: 14px; margin-top: -14px; }
.tool .form { gap: 14px; }
.tool .form .input, .tool .form select { padding: 12px 14px; font-size: 15px; }
.input--sm { padding: 10px 12px; font-size: 15px; }
.tool .form__row { gap: 12px; }
.tool-divider { border: 0; border-top: 1px solid var(--border-2); margin: 4px 0; }
.dim { color: var(--dim); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-head p { color: var(--dim); font-size: 14px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-actions .btn { padding: 10px 16px; font-size: 14px; }
.btn--danger:hover { border-color: rgba(255, 119, 119, 0.6); color: var(--danger); }
.tool-note { font-size: 13px; color: var(--dim); line-height: 1.55; }
.tool-note a { color: var(--accent); }
.form-msg { color: var(--warn); font-size: 14px; min-height: 0; }
.form-msg:empty { display: none; }

/* KPI strip */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.kpi { background: var(--bg); padding: 18px 20px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.kpi span { color: var(--dim); font-size: 13px; }
.kpi b { font-size: clamp(22px, 2.3vw, 30px); font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.kpi b.hl { color: var(--accent); }
.kpi b.neg { color: var(--danger); }
.kpi--text b { font-size: 17px; line-height: 1.35; font-weight: 500; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-2); border-radius: var(--radius); }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th {
  text-align: left;
  font-weight: 500;
  color: var(--dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
}
.ledger td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.ledger td.wrap { white-space: normal; min-width: 160px; color: var(--muted); }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }
.ledger .r { text-align: right; }
.ledger .pos { color: var(--accent); }
.ledger .neg { color: var(--danger); }
.ledger tfoot td { font-weight: 600; background: var(--bg-2); border-top: 1px solid var(--border-2); }
.empty-row td { text-align: center; color: var(--dim); padding: 32px 20px; white-space: normal; }
.cell-input {
  width: 84px;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  text-align: right;
  outline: none;
}
.cell-input:focus { border-color: var(--accent); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font: inherit;
  transition: color 0.2s, border-color 0.2s;
}
.icon-btn:hover { color: var(--danger); border-color: rgba(255, 119, 119, 0.5); }
.icon-btn--go:hover, .load-card__btns .icon-btn[data-dir]:hover { color: var(--accent); border-color: rgba(202, 255, 51, 0.5); }
.icon-btn:disabled { opacity: 0.3; pointer-events: none; }

/* Badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge--ok { background: var(--accent-soft); color: var(--accent); }
.badge--warn { background: rgba(255, 196, 51, 0.12); color: var(--warn); }
.badge--bad { background: rgba(255, 119, 119, 0.12); color: var(--danger); }
.badge--muted { background: var(--surface-2); color: var(--muted); }

/* Category bars */
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: minmax(120px, 200px) 1fr minmax(90px, auto); gap: 14px; align-items: center; font-size: 14px; color: var(--muted); }
.bar__track { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar__fill { display: block; height: 100%; background: var(--accent-fill); border-radius: 99px; }
.bar b { text-align: right; color: var(--text); font-weight: 500; white-space: nowrap; }
.bar b small { color: var(--dim); font-weight: 400; margin-left: 4px; }

/* Editable rows (budget, settlement) */
.row-list { display: grid; gap: 10px; }
.row-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.row-item .num input { width: 96px; font-size: 15px; }
.row-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-2); font-weight: 600; }
.row-total b { color: var(--accent); }
.field-inline { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

/* Result card (budget, settlement) */
.result-card {
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
  background: radial-gradient(80% 120% at 100% 0%, rgba(202, 255, 51, 0.07), transparent 60%), var(--bg-2);
  display: grid;
  gap: 18px;
}
.result-card .calc__big { margin: 0; }
.result-card .calc__big.neg { color: var(--danger); }

/* Dispatch board */
.board { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.board__col {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 220px;
}
.board__col h3 { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.board__col h3 span { color: var(--accent); }
.board__sum { font-size: 13px; color: var(--dim); margin-top: -6px; }
.board__empty { font-size: 13px; color: var(--dim); text-align: center; padding: 24px 0; border: 1px dashed var(--border-2); border-radius: var(--radius-sm); }
.load-card {
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}
.load-card__top { display: flex; justify-content: space-between; align-items: baseline; }
.load-card__top strong { color: var(--text); font-size: 14px; }
.load-card__top b { color: var(--accent); font-size: 15px; }
.load-card__route { color: var(--text); font-size: 14px; font-weight: 500; }
.load-card__route span { color: var(--accent); }
.load-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.load-card__btns { display: flex; gap: 4px; }
.load-card__btns .icon-btn { width: 28px; height: 28px; }

/* Compliance deadlines */
.deadlines { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.deadline {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.deadline.is-overdue { border-color: rgba(255, 119, 119, 0.4); }
.deadline__date { text-align: center; line-height: 1.1; padding-right: 16px; border-right: 1px solid var(--border-2); }
.deadline__date b { display: block; font-size: 24px; color: var(--accent); margin: 2px 0; }
.deadline__date span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.deadline h4 { font-size: 16px; font-weight: 600; }
.deadline p { font-size: 13px; color: var(--dim); margin-top: 2px; }
.deadline__cat { color: var(--muted); font-weight: 500; margin-right: 4px; }
.deadline__cat::after { content: " ·"; color: var(--dim); }
.deadline__side { display: flex; align-items: center; gap: 8px; }

/* Tools hub */
.tools-group { display: flex; align-items: center; gap: 14px; padding: 26px clamp(24px, 3vw, 48px); border-bottom: 1px solid var(--border); }
.tools-group h2 { font-size: 22px; font-weight: 600; }
.tools-group p { color: var(--dim); font-size: 15px; margin-left: auto; }
.tool-tile h3 { font-size: 22px; }
.tool-tile .badge { justify-self: start; align-self: flex-start; }

/* Homepage tool links */
.tool-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.tool-link {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 26px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s;
}
.tool-link:nth-child(5n) { border-right: 0; }
.tool-link:nth-last-child(-n + 5) { border-bottom: 0; }
.tool-link:hover { background: rgba(202, 255, 51, 0.04); }
.tool-link .icon-box { width: 46px; height: 46px; }
.tool-link h3 { font-size: 17px; font-weight: 600; }
.tool-link p { font-size: 14px; color: var(--dim); font-weight: 300; }
.tool-link span.go { font-size: 14px; color: var(--accent); font-weight: 500; }

@media (max-width: 1080px) {
  .tool-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-link:nth-child(5n) { border-right: 1px solid var(--border); }
  .tool-link:nth-child(2n) { border-right: 0; }
  .tool-link:nth-last-child(-n + 5) { border-bottom: 1px solid var(--border); }
  .tool-link:nth-last-child(-n + 2) { border-bottom: 0; }
}
@media (max-width: 900px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-group p { display: none; }
}
@media (max-width: 680px) {
  .tool-links { grid-template-columns: 1fr; }
  .tool-link, .tool-link:nth-child(5n) { border-right: 0; }
  .tool-link:nth-last-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .tool-link:last-child { border-bottom: 0; }
  .bar { grid-template-columns: 1fr auto; }
  .bar__track { grid-column: 1 / -1; grid-row: 2; }
  .deadline { grid-template-columns: 54px minmax(0, 1fr); gap: 14px; }
  .deadline__side { grid-column: 2; }
  .tool .form__row { grid-template-columns: 1fr; }
}

@media print {
  .header, .footer, .page-hero, .tool-panel .tool-actions, .banner, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Dispatch: stacked layout, load table, status chips ---------- */
.tool-grid--stack { grid-template-columns: minmax(0, 1fr); }
.tool-grid--stack .tool-panel { border-right: 0; border-bottom: 1px solid var(--border); }
.form--wide { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-items: end; }
.form--wide .form__row { display: contents; }
.form--wide button[type="submit"] { height: 46px; }

.status-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.status-chip {
  --c: var(--muted);
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--c);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.status-chip span { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.status-chip b { font-size: 22px; font-weight: 600; color: var(--text); line-height: 1.2; }
.status-chip small { font-size: 13px; color: var(--dim); }
.status-chip:hover { background: var(--surface); }
.status-chip.is-active { background: color-mix(in srgb, var(--c) 12%, var(--bg-2)); border-color: var(--c); }
.status-chip--booked, .status-select--booked { --c: #8ab4ff; }
.status-chip--in-transit, .status-select--in-transit { --c: #ffc433; }
.status-chip--delivered, .status-select--delivered { --c: #c58bff; }
.status-chip--invoiced, .status-select--invoiced { --c: #ff9f5a; }
.status-chip--paid, .status-select--paid { --c: var(--accent); }

.ledger--loads .route-cell { color: var(--text); font-weight: 500; }
.ledger--loads .route-cell span { color: var(--accent); }
.status-select {
  appearance: none;
  padding: 7px 30px 7px 12px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: 99px;
  background: color-mix(in srgb, var(--c) 14%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3b3b3' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  color: var(--c);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.status-select:focus-visible { box-shadow: 0 0 0 2px var(--c); }
.status-select option { background: var(--bg-2); color: var(--text); }

@media (max-width: 900px) {
  .status-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .status-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form--wide { grid-template-columns: 1fr; }
}

/* ---------- Install-the-app bar (phones only, added by js/pwa.js) ---------- */
.install-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  max-width: 520px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  animation: install-in 0.3s ease-out;
}
.install-bar img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.install-bar__text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.install-bar__text > b { display: block; color: var(--text); font-size: 15px; font-weight: 600; }
.install-bar__em { color: var(--text); font-weight: 600; }
.install-bar__share { display: inline-block; vertical-align: -3px; color: var(--accent); }
.install-bar__go { flex: none; }
.install-bar__close { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; background: none; border: 0; color: var(--dim); }
.install-bar__close:hover { color: var(--text); }
@keyframes install-in { from { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .install-bar { animation: none; } }

/* Log In / Free Trial inside the phone menu (the header buttons are hidden on small screens) */
.nav .nav__auth { display: none; }
@media (max-width: 900px) {
  .header.is-open .nav .nav__auth { display: flex; justify-content: center; margin-top: 8px; padding: 12px 16px; }
  .header.is-open .nav .nav__auth.btn--ghost { margin-top: 16px; }
  .header.is-open .nav .nav__auth.btn--primary { color: var(--accent-ink); }
}

/* ---------- Legal pages (Terms, Privacy, Disclaimer) ---------- */
.legal { max-width: 760px; margin-inline: auto; padding: clamp(32px, 5vw, 56px) 24px clamp(48px, 7vw, 80px); color: var(--muted); font-size: 16px; line-height: 1.7; }
.legal h2 { margin: 40px 0 12px; color: var(--text); font-size: 22px; font-weight: 600; }
.legal h2:first-of-type { margin-top: 8px; }
.legal h3 { margin: 24px 0 8px; color: var(--text); font-size: 17px; font-weight: 600; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 22px; list-style: disc; }
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--accent); }
.legal b, .legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal__note { padding: 14px 16px; margin-bottom: 28px; border: 1px solid var(--border-2); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--bg-2); font-size: 15px; }
.legal table { width: 100%; margin: 0 0 16px; border-collapse: collapse; font-size: 15px; }
.legal th, .legal td { padding: 10px 12px; border: 1px solid var(--border-2); text-align: left; vertical-align: top; }
.legal th { color: var(--text); font-weight: 600; background: var(--bg-2); }
.legal__table { overflow-x: auto; }

/* Signed in (set by js/main.js): keep "My Account" in the phone header */
@media (max-width: 680px) {
  .is-signed-in .header__cta .btn--primary { display: inline-flex; }
}

/* ---------- Weekly target (load profit calculator) ---------- */
.target-box { display: grid; gap: 22px; padding: 20px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--bg-2); }
.target-box__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.target-box__head h3 { margin: 0; font-size: 17px; }
.tabs--sm .tab { padding: 6px 12px; font-size: 14px; }
.target-result { display: grid; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-2); }
.target-result[hidden] { display: none; }
.target-result__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--muted); font-size: 15px; }
.target-result__top b { color: var(--text); font-size: 20px; font-weight: 600; }
.target-result.is-hit .target-result__top b { color: var(--accent); }
.target-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.target-bar span { height: 100%; transition: width 0.25s ease; }
.target-bar__done { background: rgba(202, 255, 51, 0.35); }
.target-bar__load { background: var(--accent-fill); }
.target-result__line { margin: 0; font-size: 15px; color: var(--text); }
.target-result__dim { color: var(--muted); font-size: 14px; }
.target-result__dim:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .target-bar span { transition: none; } }
.target-box .tabs { background: var(--bg); }
.calc__big .neg, .breakdown li b.neg { color: var(--danger); }

/* ---------- Equipment, extra costs and pay (load profit calculator) ---------- */
.equip { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.equip .lbl { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.equip select.input {
  width: 100%; padding: 12px 40px 12px 14px; font-size: 15px; color: var(--text);
  border: 1px solid var(--border-2); border-radius: 8px; background-color: var(--bg);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8bdb8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.equip select.input:disabled { opacity: 0.6; }
.equip select option { background: var(--bg-2); color: var(--text); }
.target-box__head .note { margin: 0; }
.xlist { display: grid; gap: 4px; }
.xrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; }
.xrow.is-on { background: var(--surface); }
.xrow__name { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 15px; cursor: pointer; flex: 1; min-width: 0; }
.xrow.is-on .xrow__name { color: var(--text); }
.xrow__name input { accent-color: var(--accent); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.xrow__name small { display: block; font-size: 13px; color: var(--dim); }
.xrow .num { flex: none; }
.xrow .num input { width: 64px; }
.xrow:not(.is-on) .num { opacity: 0.55; }
.breakdown--detail { gap: 9px; }
.breakdown--detail .bd-head { color: var(--text); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 10px; }
.breakdown--detail .bd-head:first-child { padding-top: 0; }
.breakdown--detail .bd-total { color: var(--text); border-top: 1px dashed var(--border-2); padding-top: 9px; }
.breakdown--detail .bd-total b { font-weight: 700; }
.breakdown--detail .bd-neg, .breakdown--detail .bd-neg b { color: var(--danger); border-top: 1px dashed var(--border-2); padding-top: 9px; }
@media (max-width: 560px) { .equip { grid-template-columns: 1fr; } }

/* ---------- Plan renewal terms ---------- */
.plan__renew { font-size: 13px; line-height: 1.45; color: var(--muted); text-align: center; margin-top: -8px; }
.renew-terms { margin: 32px clamp(16px, 3vw, 40px) clamp(40px, 5vw, 64px); padding: 24px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--bg-2); display: grid; gap: 14px; }
.renew-terms h3 { font-size: 18px; margin: 0; }
.renew-terms ul { display: grid; gap: 10px; margin: 0; padding-left: 18px; list-style: disc; color: var(--muted); font-size: 15px; }
.renew-terms li b { color: var(--text); font-weight: 600; }
.renew-terms .note a { color: var(--accent); }
@media (max-width: 900px) { .renew-terms { max-width: 560px; margin-inline: auto; } }

/* =========================================================
   AI help chat (js/chat.js)
   ========================================================= */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; font-family: var(--font); }
body:has(.install-bar) .chat { bottom: 112px; }           /* sit above the phone install bar */
.chat__fab {
  width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center; margin-left: auto;
  background: var(--accent-fill); color: var(--accent-ink); cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(202, 255, 51, 0.12);
  transition: transform .15s ease;
}
.chat__fab:hover { transform: scale(1.05); }
.chat__fab:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.chat__ico-close, .chat.is-open .chat__ico-open { display: none; }
.chat.is-open .chat__ico-close { display: block; }
.chat__panel {
  position: absolute; right: 0; bottom: 72px; width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border-2); border-radius: 16px; background: var(--bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); animation: chat-in .18s ease-out;
}
.chat__panel[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(10px); } }
.chat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border-2); }
.chat__head b { display: block; color: var(--text); font-size: 16px; }
.chat__head span { color: var(--muted); font-size: 12px; }
.chat__new { flex: none; padding: 6px 10px; border: 1px solid var(--border-2); border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.chat__new:hover { color: var(--text); border-color: var(--muted); }
.chat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.chat__msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.chat__msg p { margin: 0; }
.chat__msg p + p, .chat__msg ul + p, .chat__msg p + ul { margin-top: 8px; }
.chat__msg ul { margin: 0; padding-left: 18px; list-style: disc; }
.chat__msg li + li { margin-top: 4px; }
.chat__msg a { color: var(--accent); text-decoration: underline; }
.chat__msg--bot { align-self: flex-start; background: var(--bg-2); color: var(--muted); border: 1px solid var(--border-2); border-bottom-left-radius: 4px; }
.chat__msg--bot b { color: var(--text); }
.chat__msg--user { align-self: flex-end; background: var(--accent-fill); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.chat__msg.is-note { border-color: rgba(255, 196, 51, 0.4); color: var(--warn); }
.chat__dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.chat__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: chat-dot 1s infinite ease-in-out; }
.chat__dots i:nth-child(2) { animation-delay: .15s; }
.chat__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat__starters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chat__starters button { padding: 8px 12px; border: 1px solid rgba(202, 255, 51, 0.35); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.chat__starters button:hover { background: rgba(202, 255, 51, 0.2); }
.chat__form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--border-2); background: var(--bg-2); }
.chat__input { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; line-height: 1.35; }
.chat__input:focus { outline: none; border-color: var(--accent); }
.chat__send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; display: grid; place-items: center; background: var(--accent-fill); color: var(--accent-ink); cursor: pointer; }
.chat__send:disabled { opacity: .5; cursor: wait; }
.chat__fine { margin: 0; padding: 0 12px 10px; background: var(--bg-2); color: var(--dim); font-size: 11px; text-align: center; }
@media (max-width: 560px) {
  .chat { right: 14px; bottom: 14px; }
  .chat.is-open { left: 0; right: 0; top: 0; bottom: 0; }
  .chat.is-open .chat__fab { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; box-shadow: none; z-index: 2; background: transparent; color: var(--text); }
  .chat__panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .chat__head { padding-right: 64px; padding-top: max(14px, env(safe-area-inset-top)); }
  .chat__form { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .chat__panel, .chat__dots i { animation: none; } }

/* =========================================================
   Send Feedback (js/feedback.js)
   ========================================================= */
.fb-open { overflow: hidden; }
.fb { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.fb[hidden] { display: none; }
.fb__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.65); }
.fb__box { position: relative; width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 1px solid var(--border-2); border-radius: 16px; background: var(--bg-2); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.fb__box h2 { font-size: 22px; font-weight: 600; color: var(--text); }
.fb__sub, .fb__done p { color: var(--muted); font-size: 15px; margin: 6px 0 16px; }
.fb__x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.fb__x:hover { color: var(--text); background: var(--surface); }
.fb__form { display: grid; gap: 14px; }
.fb__form .lbl { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.fb__form .lbl small { color: var(--dim); }
.fb__form .input { width: 100%; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.fb__form .input:focus { outline: none; border-color: var(--accent); }
.fb__msg { resize: vertical; min-height: 110px; }
.fb__kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fb__kinds label { cursor: pointer; }
.fb__kinds input { position: absolute; opacity: 0; pointer-events: none; }
.fb__kinds span { display: block; padding: 10px 6px; border: 1px solid var(--border-2); border-radius: 10px; text-align: center; font-size: 14px; color: var(--muted); }
.fb__kinds input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.fb__kinds input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.fb__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb__err { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(255, 119, 119, 0.1); color: var(--danger); font-size: 14px; }
.fb__fine { margin: 0; color: var(--dim); font-size: 12px; text-align: center; }
.fb-tab {
  position: fixed; right: 0; top: 50%; z-index: 55; transform: translateY(-50%) rotate(-90deg); transform-origin: right bottom;
  translate: 0 -50%; padding: 8px 14px; border: 1px solid var(--border-2); border-bottom: 0; border-radius: 8px 8px 0 0;
  background: var(--bg-2); color: var(--muted); font: 500 13px var(--font); letter-spacing: .02em; cursor: pointer;
}
.fb-tab:hover { color: var(--accent); border-color: rgba(202, 255, 51, 0.4); }
@media (max-width: 900px) { .fb-tab { display: none; } }
@media (max-width: 420px) { .fb__kinds { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   Diesel prices, Auto Miles, small calculators (js/minis.js)
   ========================================================= */
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link:disabled { opacity: .5; cursor: wait; }
.form-error { margin: 0; color: var(--danger); font-size: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255, 119, 119, 0.1); }
.form-error:empty, .form-error[hidden] { display: none; }
.dim { color: var(--dim); }
.dp-sub { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.result-card .btn { margin-top: 16px; justify-self: start; }
.dp-change { color: var(--muted); }
.dp-change.up { color: var(--danger); }      /* diesel going up is bad news for truckers */
.dp-change.down { color: var(--accent); }
.ledger tr.is-mine td { background: var(--accent-soft); }
.ledger tr.is-mine .badge { background: var(--accent-fill); color: var(--accent-ink); margin-left: 6px; }
.ledger tr.is-us td { font-weight: 600; color: var(--text); }
.ledger .r { text-align: right; }
.dp-hint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.dp-hint b { color: var(--text); }

/* Home page diesel band */
.diesel-band { display: grid; gap: 18px; padding: clamp(24px, 4vw, 40px) clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--border); }
.diesel-band[hidden] { display: none; }
.diesel-band__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.diesel-band__head h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 600; }
.diesel-band__links { display: flex; gap: 10px; flex-wrap: wrap; }
.dw { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dw__item { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--bg-2); }
.dw__item span { color: var(--muted); font-size: 14px; }
.dw__item b { color: var(--text); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.dw__item small { font-size: 13px; }
.dw__item--mine { border-color: rgba(202, 255, 51, 0.4); }
.dw__item--mine b { color: var(--accent); }
.dw__note { grid-column: 1 / -1; margin: 0; color: var(--dim); font-size: 13px; }

/* Auto Miles */
.am-stops { display: grid; gap: 10px; }
.am-stops:empty { display: none; }
.am-stop { display: flex; gap: 8px; align-items: center; }
.am-stop .input { flex: 1; }
#am-legs li span { overflow-wrap: anywhere; padding-right: 12px; }

/* Buy vs lease */
.bl-cards .cell { border: 1px solid var(--border-2); border-radius: var(--radius); }
.bl-cards .cell h3 { margin-bottom: 12px; }
.bl-cards .cell.is-winner { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.bl-cards .cell.is-winner h3::after { content: "Cheaper"; margin-left: 10px; padding: 3px 9px; border-radius: 99px; background: var(--accent-fill); color: var(--accent-ink); font-size: 12px; font-weight: 600; vertical-align: middle; }


/* =========================================================
   Day theme — easier to read in bright sunlight.
   js/theme.js sets <html data-theme="light|dark"> before the page draws
   (following the device setting until the driver picks one with the sun/moon button).
   ========================================================= */
:root[data-theme="light"] {
  /* Soft, warm stone tones instead of stark white: easier on the eyes for long sessions.
     Same family as the night theme: charcoal ink + lime accent. */
  --bg: #eff1ea;          /* page: warm off-white with a hint of green */
  --bg-2: #fafbf6;        /* cards and panels: lifted, but not pure white */
  --surface: #e6e9df;
  --surface-2: #dbdfd2;
  --border: #dde1d4;
  --border-2: #c9cebf;
  --text: #1c211b;        /* soft charcoal, not pure black */
  --text-2: #323831;
  --muted: #545c52;
  --dim: #737b70;
  --accent: #446f05;      /* readable olive-green for text, links and outlines */
  --accent-fill: #c4f23a; /* the brand lime, a touch deeper so it doesn't glare on light backgrounds */
  --accent-ink: #1a1f12;
  --accent-soft: rgba(124, 176, 0, 0.13);
  --danger: #b4323a;
  --warn: #8a5a06;
  --hover-border: #a9b09f;
  --header-bg: rgba(239, 241, 234, 0.88);
  --glass: rgba(250, 251, 246, 0.86);
  --banner-bg: #e7ecda;
  --hero-veil: rgba(239, 241, 234, 0.92);
  --icon-bg: linear-gradient(145deg, #fafbf6, #e6e9df);
  --card-shadow: 0 1px 2px rgba(40, 50, 25, 0.05), 0 6px 18px rgba(40, 50, 25, 0.05);
  color-scheme: light;
}
:root[data-theme="light"] body { background: var(--bg); color: var(--text-2); }
:root[data-theme="light"] .btn--primary { box-shadow: 0 1px 0 rgba(60, 90, 0, 0.18); }
:root[data-theme="light"] .btn--primary:hover { background: #b6e62a; }
:root[data-theme="light"] .btn--ghost { background: var(--bg-2); }
:root[data-theme="light"] .btn--ghost:hover { background: var(--surface); }
:root[data-theme="light"] .result-card,
:root[data-theme="light"] .calc__result,
:root[data-theme="light"] .status-chip { box-shadow: var(--card-shadow); }
:root[data-theme="light"] .chat__panel, :root[data-theme="light"] .fb__box { box-shadow: 0 24px 60px rgba(30, 40, 15, 0.16); }
:root[data-theme="light"] .chat__fab { box-shadow: 0 10px 24px rgba(30, 40, 15, 0.16), 0 0 0 6px rgba(124, 176, 0, 0.16); }
:root[data-theme="light"] .install-bar { box-shadow: 0 16px 40px rgba(30, 40, 15, 0.16); }
:root[data-theme="light"] ::selection { background: rgba(196, 242, 58, 0.55); color: var(--text); }

/* Load-status colors: the night ones are pastel and fade out on light backgrounds */
:root[data-theme="light"] .status-chip--booked, :root[data-theme="light"] .status-select--booked { --c: #2f6bc9; }
:root[data-theme="light"] .status-chip--in-transit, :root[data-theme="light"] .status-select--in-transit { --c: #a36a00; }
:root[data-theme="light"] .status-chip--delivered, :root[data-theme="light"] .status-select--delivered { --c: #7a42c0; }
:root[data-theme="light"] .status-chip--invoiced, :root[data-theme="light"] .status-select--invoiced { --c: #c25414; }

/* Lime tints and white hover glows written for the night theme */
:root[data-theme="light"] .ledger tbody tr:hover td { background: rgba(40, 50, 25, 0.035); }
:root[data-theme="light"] .tool-link:hover { background: var(--accent-soft); }
:root[data-theme="light"] .faq details.is-best { background: var(--accent-soft); }
:root[data-theme="light"] .chat__starters button { border-color: rgba(68, 111, 5, 0.3); }
:root[data-theme="light"] .chat__starters button:hover { background: rgba(124, 176, 0, 0.22); }
:root[data-theme="light"] .fb-tab:hover,
:root[data-theme="light"] .icon-btn--go:hover,
:root[data-theme="light"] .load-card__btns .icon-btn[data-dir]:hover,
:root[data-theme="light"] .dw__item--mine { border-color: rgba(68, 111, 5, 0.45); }
:root[data-theme="light"] .verdict--ok, :root[data-theme="light"] .badge--warn { background: rgba(163, 106, 0, 0.12); }
:root[data-theme="light"] .verdict--bad, :root[data-theme="light"] .badge--bad,
:root[data-theme="light"] .fb__err, :root[data-theme="light"] .form-error { background: rgba(180, 50, 58, 0.09); }
:root[data-theme="light"] .fb__backdrop { background: rgba(28, 33, 27, 0.45); }

/* Sun / moon switch */
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--border-2); border-radius: 10px; background: transparent; color: var(--text); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--hover-border); background: var(--surface); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="light"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="light"] .theme-toggle .ico-moon { display: none; }

/* City suggestions (js/places.js) */
.places {
  position: absolute; z-index: 90; margin: 0; padding: 6px; list-style: none; max-height: 300px; overflow-y: auto;
  border: 1px solid var(--border-2); border-radius: 12px; background: var(--bg-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.places[hidden] { display: none; }
.places li { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 15px; cursor: pointer; }
.places li b { color: var(--accent); font-weight: 600; }
.places li em { color: var(--dim); font-style: normal; font-size: 13px; margin-left: 4px; }
.places li:hover, .places li[aria-selected="true"] { background: var(--surface); }
.places__pin { color: var(--dim); font-size: 10px; flex: none; }
:root[data-theme="light"] .places { box-shadow: 0 16px 40px rgba(20, 30, 10, 0.15); }

/* Download PDF button (js/pdf.js) */
.pdf-bar { display: flex; justify-content: flex-end; }
.pdf-btn { gap: 8px; }
.pdf-btn:disabled { opacity: .6; cursor: wait; }
@media print {
  .header, .footer, .chat, .fb-tab, .fb, .pdf-bar, .install-bar, .cta, .banner { display: none !important; }
}

/* Guides */
.guide-card { display: grid; gap: 10px; align-content: start; }
.guide-card .badge { justify-self: start; }
.guide-card h3 { font-size: 19px; }
.guide-card p { color: var(--muted); }
.guide-card__tool { color: var(--accent); font-weight: 500; font-size: 15px; }
.guide-card__tool:hover { text-decoration: underline; }

/* =========================================================
   Languages (js/i18n.js, scripts/i18n.mjs)
   ========================================================= */
/* Barlow has no Russian letters; js/i18n.js loads Onest for Russian pages. */
:root:lang(ru) { --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif; }

/* Header menu (computers and tablets) */
.lang { position: relative; flex: none; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px;
  border: 1px solid var(--border-2); border-radius: 10px; color: var(--text);
  font-size: 13px; font-weight: 600; letter-spacing: .04em; cursor: pointer; list-style: none; user-select: none;
}
.lang__btn::-webkit-details-marker { display: none; }
.lang__btn::marker { content: ""; }
.lang__btn:hover, .lang[open] .lang__btn { border-color: var(--hover-border); background: var(--surface); }
.lang__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang__btn svg { color: var(--dim); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 160px; padding: 6px;
  display: grid; gap: 2px; border: 1px solid var(--border-2); border-radius: 12px;
  background: var(--bg-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.lang__menu a { padding: 10px 12px; border-radius: 8px; font-size: 15px; color: var(--text-2); }
.lang__menu a:hover { background: var(--surface); color: var(--text); }
.lang__menu a[aria-current] { color: var(--accent); font-weight: 600; }
.lang__menu a[aria-current]::after { content: " ✓"; }
:root[data-theme="light"] .lang__menu { box-shadow: 0 16px 40px rgba(30, 40, 15, 0.15); }

/* Row inside the phone menu */
.nav .nav__lang { display: none; }
@media (max-width: 900px) {
  .header__cta .lang { display: none; }
  .header.is-open .nav .nav__lang {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--dim);
  }
  .header.is-open .nav .nav__lang svg { margin-right: 6px; }
  .header.is-open .nav .nav__lang a {
    min-width: 56px; padding: 10px 12px; text-align: center; font-weight: 600; letter-spacing: .04em;
    border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  }
  .header.is-open .nav .nav__lang a[aria-current] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
}

/* "View this page in Spanish / Russian?" for first-time visitors */
.lang-offer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px;
  padding: 10px var(--gutter); background: var(--banner-bg); border-bottom: 1px solid var(--border);
  font-size: 15px; color: var(--text);
}
/* The account app has no phone menu, so its language button stays in the header */
.lang__menu button { padding: 10px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 15px; color: var(--text-2); }
.lang__menu button:hover { background: var(--surface); color: var(--text); }
.lang__menu button[aria-current] { color: var(--accent); font-weight: 600; }
.lang__menu button[aria-current]::after { content: " ✓"; }
@media (max-width: 900px) { .header__cta .lang--app { display: block; } }
@media (max-width: 520px) { .lang--app .lang__btn span { display: none; } .lang--app .lang__btn { padding: 0 10px; } }

/* "Coming soon" / "Free now" tags on features that aren't built yet */
.soon {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 99px; vertical-align: middle;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--muted);
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.5; white-space: nowrap;
}
p > .soon:first-child { margin-left: 0; margin-right: 4px; }
.soon--now { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.soon-line { margin: 0; font-size: 13px; color: var(--dim); }
.soon-line .soon { margin-left: 0; }
.beta-note { max-width: 760px; margin: 0 auto 20px; padding: 12px 16px; text-align: center; font-size: 15px; color: var(--muted);
  border: 1px dashed var(--border-2); border-radius: var(--radius); }
.beta-note b { color: var(--text); }
