/* Make a Trucking Profit design system */

:root {
  /* Brand */
  --accent: #e8842a;
  --accent-strong: #d9781f;
  --accent-deep: #b35f14;
  --accent-soft: rgba(232, 132, 42, 0.14);

  /* Surfaces (dark navy brand theme) */
  --bg: #0b1220;
  --bg-raised: #101a2c;
  --surface: #131f33;
  --surface-alt: #182740;
  --border: #26364f;
  --border-strong: #35496a;

  /* Text */
  --text: #e9eef6;
  --text-dim: #a9b8cc;
  --text-faint: #7d8ba0;

  /* Semantic */
  --good: #3ecf8e;
  --good-soft: rgba(62, 207, 142, 0.12);
  --warn: #f2c144;
  --warn-soft: rgba(242, 193, 68, 0.12);
  --bad: #ff6b5e;
  --bad-soft: rgba(255, 107, 94, 0.12);

  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(2, 6, 14, 0.45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(90rem 40rem at 85% -10%, rgba(232, 132, 42, 0.08), transparent 60%),
    radial-gradient(70rem 45rem at -10% 15%, rgba(46, 92, 160, 0.16), transparent 55%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--accent); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.hidden { display: none !important; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px;
}
.brand-link {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; color: var(--text);
  font-weight: 800; letter-spacing: -0.01em;
  margin-right: auto;
}
.brand-link img { width: 40px; height: 40px; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a {
  color: var(--text-dim); text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: .45rem .75rem; border-radius: 9px;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a.active { color: var(--accent); }
.account-chip { display: flex; align-items: center; gap: .5rem; }
.account-chip .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
}
.account-chip .who { font-size: .85rem; color: var(--text-dim); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- buttons ---------- */
button, .btn {
  font-family: inherit; font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; border-radius: 10px;
  padding: .62rem 1.1rem; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
button:active, .btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-primary:disabled { background: #4b5566; color: #9aa7b8; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-alt); }
.btn-ghost { background: transparent; color: var(--text-dim); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn-danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn-link { background: none; border: none; color: var(--accent); text-decoration: underline; padding: 0; font-weight: 700; }

/* ---------- forms ---------- */
label { font-weight: 600; color: var(--text-dim); font-size: .92rem; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  width: 100%;
  font: inherit; color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: .62rem .75rem;
}
input:focus-visible, select:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[inputmode="decimal"], input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
input::placeholder { color: var(--text-faint); }

.field { display: grid; gap: .3rem; margin-bottom: .9rem; }
.field .control { display: flex; gap: .5rem; align-items: center; }
.field .hint { font-size: .8rem; color: var(--text-faint); margin: 0; }
.field.inline { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; }
.field.inline > label { padding-right: .5rem; }

.input-affix { position: relative; flex: 1; display: flex; align-items: center; }
.input-affix > input { flex: 1; }
.input-affix .prefix, .input-affix .suffix {
  position: absolute; color: var(--text-faint); font-size: .9rem; pointer-events: none;
}
.input-affix .prefix { left: .7rem; }
.input-affix .suffix { right: .7rem; }
.input-affix.has-prefix input { padding-left: 1.6rem; text-align: left; }
.input-affix.has-suffix input { padding-right: 2.6rem; }

/* segmented radio control */
.segmented { display: inline-flex; width: fit-content; background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.segmented label {
  position: relative; cursor: pointer; border-radius: 8px;
  padding: .42rem .85rem; font-weight: 600; color: var(--text-dim); font-size: .9rem;
}
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented label:has(input:checked) { background: var(--accent-strong); color: #fff; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }

.help-btn {
  flex: 0 0 auto;
  width: 26px; height: 26px; padding: 0; border-radius: 50%;
  background: var(--surface-alt); color: var(--text-dim);
  border: 1px solid var(--border-strong);
  font-size: .8rem; font-weight: 800;
}
.help-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- cards & layout ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; letter-spacing: -0.01em; }

.subsection {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .9rem 0;
  background: var(--bg-raised);
}
.subsection > h4 { margin: 0 0 .75rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); }

.repeat-row { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: .55rem; align-items: center; margin-bottom: .55rem; }
.repeat-row input { min-width: 0; }

/* ---------- landing ---------- */
.hero { padding: 4.5rem 0 3rem; text-align: left; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 1rem; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero .lede { color: var(--text-dim); font-size: 1.1rem; max-width: 34rem; margin: 0 0 1.6rem; }
.hero-badges { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.badge {
  font-size: .78rem; font-weight: 700; color: var(--text-dim);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: .28rem .7rem;
  background: var(--bg-raised);
}
.hero-ctas { display: flex; gap: .8rem; flex-wrap: wrap; }

.napkin {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-alt) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.napkin h2 { margin: 0 0 .2rem; font-size: 1.2rem; }
.napkin .napkin-sub { margin: 0 0 1.1rem; color: var(--text-faint); font-size: .88rem; }
.napkin-result {
  margin-top: 1.1rem; padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
  display: none;
}
.napkin-result.show { display: block; }
.napkin-result .rate-line { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.napkin-result .rate { font-size: 2.1rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.napkin-result .per { color: var(--text-faint); font-weight: 600; }
.napkin-result .range { color: var(--text-dim); font-size: .88rem; margin: .25rem 0 .6rem; }
.napkin-assumptions { font-size: .8rem; color: var(--text-faint); margin: .5rem 0 0; }
.napkin-assumptions summary { cursor: pointer; font-weight: 600; color: var(--text-dim); }
.napkin-cta { margin-top: .9rem; display: grid; gap: .4rem; }
.napkin-cta .why { font-size: .82rem; color: var(--text-dim); text-align: center; margin: 0; }

.section { padding: 3.2rem 0; }
.section h2.section-title { font-size: 1.7rem; letter-spacing: -0.02em; margin: 0 0 .4rem; }
.section .section-sub { color: var(--text-dim); margin: 0 0 2rem; max-width: 42rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.3rem; }
.feature .icon { font-size: 1.4rem; margin-bottom: .5rem; display: block; }
.feature h3 { margin: 0 0 .35rem; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--text-dim); font-size: .92rem; }

.steps-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.step-card { position: relative; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.2rem 1.2rem 1.2rem 3.4rem; }
.step-card::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1rem; top: 1.1rem;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.step-card h3 { margin: 0 0 .3rem; font-size: 1rem; }
.step-card p { margin: 0; color: var(--text-dim); font-size: .9rem; }

/* ---------- consult / conversion ---------- */
.consult-card {
  margin-top: 1.2rem;
  border-color: var(--accent-deep);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(217, 120, 31, 0.08) 100%);
}
.consult-card h3 { margin: 0 0 .35rem; }
.consult-card p { margin: 0; color: var(--text-dim); }

.cta-band {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-alt) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2.4rem 2rem;
  text-align: center;
}
.cta-band h2 { margin: 0 0 .5rem; font-size: 1.6rem; letter-spacing: -0.02em; }
.cta-band p { margin: 0 auto 1.4rem; color: var(--text-dim); max-width: 38rem; }
.cta-band .cta-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.cta-band .cta-small { margin: 1rem 0 0; font-size: .82rem; color: var(--text-faint); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .7rem; max-width: 46rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .95rem 1.15rem;
}
.faq summary {
  cursor: pointer; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 1.1rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .7rem 0 0; color: var(--text-dim); font-size: .94rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 2rem 0 2.6rem; color: var(--text-dim); font-size: .9rem; }
.site-footer .wrap { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.site-footer .foot-brand { margin-right: auto; }
.foot-links { display: flex; gap: 1rem; margin-top: .5rem; }
.foot-links a { color: var(--text-dim); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--accent); }
.contact-links { display: flex; gap: .7rem; }
.contact-links a, .contact-links button {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-dim);
  padding: 0;
}
.contact-links a:hover, .contact-links button:hover { color: var(--accent); border-color: var(--accent); }
.contact-links svg { width: 19px; height: 19px; fill: currentColor; }

/* ---------- wizard ---------- */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; padding: 1.6rem 0 6rem; }
.calc-main { min-width: 0; }

.stepper { display: flex; gap: .25rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.stepper .step {
  flex: 1 1 0; min-width: 92px;
  border: none; background: none; padding: .45rem .4rem .55rem; cursor: pointer;
  border-top: 3px solid var(--border); border-radius: 2px;
  text-align: left; color: var(--text-faint); font-weight: 600; font-size: .78rem;
}
.stepper .step .step-num { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.stepper .step .step-name { display: block; color: inherit; font-size: .85rem; }
.stepper .step.current { border-top-color: var(--accent); color: var(--text); }
.stepper .step.done { border-top-color: var(--good); color: var(--text-dim); }
.stepper .step:disabled { cursor: default; }

.wizard-pane { display: none; }
.wizard-pane.current { display: block; }
.wizard-pane h2 { margin: 0 0 .25rem; font-size: 1.35rem; letter-spacing: -0.01em; }
.wizard-pane .pane-sub { color: var(--text-dim); margin: 0 0 1.3rem; font-size: .95rem; }

.wizard-nav { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1.6rem; }

.gst-note {
  display: block;
  background: var(--warn-soft); border: 1px solid rgba(242, 193, 68, 0.35);
  color: var(--warn); font-weight: 600; font-size: .85rem;
  border-radius: 10px; padding: .5rem .8rem; margin-bottom: 1.1rem;
}

/* summary rail */
.calc-rail { position: sticky; top: 84px; display: grid; gap: 1rem; }
.rail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; }
.rail-card .rail-label { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); font-weight: 700; }
.rail-card .rail-value { font-size: 1.65rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.rail-card .rail-sub { color: var(--text-dim); font-size: .84rem; margin: .15rem 0 0; }
.rail-metrics { display: grid; gap: .45rem; margin-top: .8rem; }
.rail-metric { display: flex; justify-content: space-between; font-size: .86rem; color: var(--text-dim); }
.rail-metric strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* mobile action bar */
.mobile-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: rgba(16, 26, 44, 0.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-strong);
  padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
  align-items: center; justify-content: space-between; gap: 1rem;
}
.mobile-bar .mb-label { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); font-weight: 700; }
.mobile-bar .mb-value { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- results ---------- */
.verdict {
  border-radius: var(--radius-lg); padding: 1.3rem 1.4rem; margin-bottom: 1.2rem;
  border: 1px solid var(--border);
}
.verdict.good { background: var(--good-soft); border-color: rgba(62, 207, 142, 0.4); }
.verdict.warn { background: var(--warn-soft); border-color: rgba(242, 193, 68, 0.4); }
.verdict.bad { background: var(--bad-soft); border-color: rgba(255, 107, 94, 0.4); }
.verdict .verdict-kicker { font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 800; color: var(--text-dim); }
.verdict .verdict-value { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.verdict.good .verdict-value { color: var(--good); }
.verdict.warn .verdict-value { color: var(--warn); }
.verdict.bad .verdict-value { color: var(--bad); }
.verdict .verdict-note { color: var(--text-dim); margin: .3rem 0 0; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.metric-tile { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem 1rem; }
.metric-tile .m-label { font-size: .76rem; color: var(--text-faint); font-weight: 600; }
.metric-tile .m-value { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.breakdown-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.breakdown-table th, .breakdown-table td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--border); }
.breakdown-table td:last-child, .breakdown-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown-table tr.bd-total td { font-weight: 800; border-bottom: none; color: var(--accent); }
.bd-bar { height: 6px; border-radius: 3px; background: var(--accent); min-width: 2px; }
.bd-bar-track { background: var(--bg); border-radius: 3px; margin-top: .25rem; }

.warning-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.warning-list li {
  background: var(--warn-soft); border: 1px solid rgba(242, 193, 68, 0.3);
  border-radius: 10px; padding: .6rem .85rem; font-size: .9rem; color: var(--text);
}
.warning-list li::before { content: "⚠ "; color: var(--warn); }

.results-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- dialogs & toasts ---------- */
dialog {
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text);
  max-width: 480px; width: calc(100vw - 2.5rem);
  padding: 1.4rem; box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(4, 8, 16, 0.65); backdrop-filter: blur(3px); }
dialog.wide { max-width: 760px; }
dialog h3 { margin-top: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: var(--surface-alt); border: 1px solid var(--border-strong);
  color: var(--text); font-weight: 600; font-size: .92rem;
  border-radius: 10px; padding: .65rem 1.1rem; z-index: 120;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ---------- auth ---------- */
.auth-wrap { max-width: 420px; margin: 3.5rem auto; padding: 0 1.25rem; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.7rem; box-shadow: var(--shadow); }
.auth-tabs { display: flex; gap: .4rem; margin-bottom: 1.3rem; background: var(--bg-raised); padding: 4px; border-radius: 10px; }
.auth-tabs button { flex: 1; background: none; color: var(--text-dim); padding: .5rem; }
.auth-tabs button.active { background: var(--surface-alt); color: var(--text); }
.auth-error { color: var(--bad); font-size: .88rem; margin: .5rem 0 0; min-height: 1.2em; }
.auth-note { color: var(--text-faint); font-size: .8rem; margin-top: 1rem; }

/* scenario list */
.scenario-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-height: 300px; overflow-y: auto; }
.scenario-list li { display: flex; align-items: center; gap: .6rem; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .8rem; }
.scenario-list .s-name { font-weight: 700; margin-right: auto; }
.scenario-list .s-date { color: var(--text-faint); font-size: .78rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; }
  .feature-grid, .steps-band { grid-template-columns: 1fr; }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-rail { display: none; }
  .mobile-bar { display: flex; }
}
@media (max-width: 640px) {
  .field.inline { grid-template-columns: 1fr; }
  .brand-link { font-size: .88rem; gap: .5rem; }
  .brand-link img { width: 32px; height: 32px; }
  .stepper { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; }
  .stepper .step { flex: 0 0 auto; min-width: 0; padding-right: .9rem; }
  .stepper .step .step-name { white-space: nowrap; }
  .repeat-row { grid-template-columns: 1fr 1fr auto; }
  .hero { padding: 2.6rem 0 2rem; }
  .site-nav a.nav-calc-link { display: none; }
  .wizard-nav { flex-direction: column-reverse; }
  .wizard-nav .btn, .wizard-nav button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- fleet app ---------- */
.app-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; padding: 1.4rem 0 3rem; align-items: start; }
.app-nav { position: sticky; top: 84px; display: grid; gap: .2rem; }
.app-nav a {
  display: flex; align-items: center; gap: .6rem;
  color: var(--text-dim); text-decoration: none; font-weight: 600; font-size: .93rem;
  padding: .55rem .8rem; border-radius: 10px;
}
.app-nav a:hover { background: var(--surface); color: var(--text); }
.app-nav a.active { background: var(--accent-soft); color: var(--accent); }
.app-nav .nav-section { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); font-weight: 700; padding: .9rem .8rem .25rem; }
.app-main { min-width: 0; display: grid; gap: 1.1rem; }
.app-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.app-title-row h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.01em; }
.mode-chip { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: .3rem .7rem; }
.mode-chip.demo { background: var(--warn-soft); color: var(--warn); }
.mode-chip.live { background: var(--good-soft); color: var(--good); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.kpi .k-label { font-size: .74rem; color: var(--text-faint); font-weight: 600; }
.kpi .k-value { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi .k-sub { font-size: .76rem; color: var(--text-dim); }

.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); padding: .45rem .55rem; border-bottom: 1px solid var(--border-strong); }
.data-table td { padding: .55rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.table-scroll { overflow-x: auto; }

.chip { display: inline-block; font-size: .74rem; font-weight: 700; border-radius: 999px; padding: .2rem .6rem; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.neutral { background: var(--surface-alt); color: var(--text-dim); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem 1rem; }
.form-grid .field { margin-bottom: 0; }
.empty-state { text-align: center; color: var(--text-dim); padding: 2.2rem 1rem; }
.empty-state .btn { margin-top: .8rem; }

.week-grid { display: grid; grid-template-columns: 140px repeat(7, 1fr); gap: 4px; font-size: .82rem; }
.week-grid .wg-head { font-weight: 700; color: var(--text-faint); font-size: .72rem; text-transform: uppercase; padding: .3rem; }
.week-grid .wg-driver { font-weight: 700; padding: .5rem .3rem; }
.week-grid .wg-cell { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 8px; min-height: 44px; padding: .25rem .4rem; cursor: pointer; }
.week-grid .wg-cell:hover { border-color: var(--accent); }
.week-grid .wg-cell .wg-truck { font-weight: 700; color: var(--accent); }

#fleetMap { height: 320px; border-radius: var(--radius); border: 1px solid var(--border); }

.price-card { max-width: 460px; margin: 1.5rem auto; text-align: center; }
.price-card .chip { display: inline-flex; align-items: center; gap: .4rem; }
.price-line { display: flex; align-items: baseline; justify-content: center; gap: .45rem; margin: .4rem 0 1rem; }
.price-line .price { font-size: 3rem; font-weight: 800; color: var(--accent); letter-spacing: -0.03em; }
.price-line .price-per { color: var(--text-dim); font-weight: 600; }
.price-features { list-style: none; margin: 0 0 1.3rem; padding: 0; display: grid; gap: .45rem; text-align: left; }
.price-features li { padding-left: 1.5rem; position: relative; color: var(--text-dim); font-size: .95rem; }
.price-features li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 800; }

/* social sign-in */
.social-divider { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0 1rem; color: var(--text-faint); font-size: .8rem; font-weight: 600; }
.social-divider::before, .social-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.social-buttons { display: grid; gap: .55rem; }
.social-btn { width: 100%; background: var(--bg-raised); color: var(--text); border: 1px solid var(--border-strong); justify-content: center; }
.social-btn:hover { background: var(--surface-alt); border-color: var(--accent); }
.social-btn svg { width: 18px; height: 18px; }

@media (max-width: 960px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-nav { position: static; display: flex; overflow-x: auto; gap: .3rem; padding-bottom: .3rem; }
  .app-nav .nav-section { display: none; }
  .app-nav a { white-space: nowrap; }
}

/* ---------- read-only demo mode ---------- */
.demo-banner {
  background: linear-gradient(90deg, #14532d, #166534);
  color: #ecfdf5;
  text-align: center;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
}
.demo-banner strong { color: #bbf7d0; }
.demo-disabled,
button.demo-disabled,
a.demo-disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  pointer-events: auto !important;
}
a.demo-disabled, div.demo-disabled, select.demo-disabled { pointer-events: none !important; }
