/* CrewMargin light theme. Palette per the Marketing design brief (2026-10-23). Contrast results:
   see docs/CONTRAST.md (not shipped). --pos-text / --neg-text are the text
   versions of the profit/loss colours: #2F8F46 fails AA as small text (4.09:1 on white), so text uses
   the darker #237A3A; bars and icons keep #2F8F46. Amber (#F2B705) is never used as a text colour. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/BarlowSemiCondensed-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/BarlowSemiCondensed-Bold.woff2") format("woff2"); }
:root {
  --bg: #F7F5F0; --panel: #FFFFFF; --panel2: #FBFAF7; --line: #E3DED3; --field: #8A8F87; --text: #1E2421; --muted: #5F6B66;
  --accent: #1F5135; --accent-hover: #173F29; --accent2: #1F5135; --tint: #EAF2EC;
  --pos: #2F8F46; --pos-text: #237A3A; --neg: #C2410C; --neg-text: #C2410C; --neg-tint: #FDF0EA;
  --amber: #F2B705; --amber-tint: #FDF6DD; --warn: #8A5A00; --r: 12px;
  --head: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); font-variant-numeric: tabular-nums; }
h1, h2, h3, .big, .brand, .outro { font-family: var(--head); }
input, select, button, table, .kpi strong, .big { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.top { background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: inset 0 4px 0 var(--accent); padding: 26px 0 26px; margin-bottom: 26px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: .2px; display: flex; align-items: center; gap: 12px; }
.wordmark { display: block; height: 34px; width: auto; }
.logo { color: var(--accent); }
.beta { font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: 2px 10px; }
h1 { font-size: 44px; font-weight: 700; line-height: 1.05; margin: 18px 0 10px; letter-spacing: -.2px; color: var(--text); }
.tag { color: var(--muted); margin: 0 0 6px; max-width: 720px; }
.privacy { margin: 0; color: var(--accent); font-size: 14px; font-weight: 600; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(30,36,33,.04); }
h2 { font-size: 24px; font-weight: 700; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 20px; font-weight: 600; margin: 0 0 10px; }
.num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); border: 1px solid var(--accent); font-family: var(--body); font-size: 13px; font-weight: 600; color: #FFFFFF; }
.hint { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.files { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.drop { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1.5px dashed var(--field); border-radius: 10px; background: var(--panel2); cursor: pointer; transition: border-color .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--tint); }
.drop.loaded { border-style: solid; border-color: var(--accent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop small { color: var(--muted); font-size: 13px; }
.req { color: var(--text); font-size: 12px; font-weight: 600; } /* orange is only for losing numbers */
.opt { color: var(--muted); font-size: 12px; }
.status { font-size: 12px; color: var(--muted); margin-top: 4px; }
.status.good { color: var(--pos-text); } .status.bad, .bad { color: var(--text); font-weight: 600; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.row.spread { justify-content: space-between; margin-top: 0; }
button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #FFFFFF; padding: 10px 16px; font-weight: 600; }
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.ghost { background: var(--panel); color: var(--accent); border-color: var(--accent); font-weight: 600; }
button.ghost:hover { background: var(--tint); border-color: var(--accent-hover); color: var(--accent-hover); }
select, input[type=number], input[type=email] { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--field); border-radius: 8px; padding: 8px 10px; }
.inline { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: var(--panel2); }
summary { cursor: pointer; font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid currentColor; font-weight: 600; }
.pill.good { color: var(--pos-text); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 6px 8px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); padding: 7px 8px; }
table.map { margin-top: 10px; } table.map select { width: 100%; max-width: 280px; }
table.map tr.need td:first-child { color: var(--text); font-weight: 700; }
.ex { color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.auto { color: var(--pos-text); }
.data td:not(:first-child), .data th:not(:first-child) { text-align: right; }
.negrow td:nth-last-child(2), .negrow td:last-child { color: var(--neg-text); }
.scroll { overflow-x: auto; }
.settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.lbl { font-weight: 600; } .lbl em { color: var(--muted); font-style: normal; font-weight: 400; font-size: 13px; }
.inp { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.inp input { width: 110px; }
#fuelKmBox { display: flex; flex-direction: column; gap: 8px; }
.why { color: var(--muted); font-size: 13px; }
.toggle { display: inline-flex; border: 1px solid var(--field); border-radius: 8px; overflow: hidden; width: max-content; }
.toggle button { background: var(--panel); color: var(--muted); border: 0; border-radius: 0; padding: 6px 12px; font-weight: 600; }
.toggle button:hover { background: var(--tint); color: var(--accent); }
.toggle button.on { background: var(--accent); color: #FFFFFF; box-shadow: none; }
.worst { border-color: #F0C9B5; border-left: 6px solid var(--neg); background: var(--neg-tint); }
.worst.ok { border-color: #C9DECF; border-left-color: var(--pos); background: var(--tint); }
.eyebrow { color: var(--text); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.big { font-size: 44px; font-weight: 700; letter-spacing: -.2px; }
.worst p { margin: 4px 0 0; color: var(--muted); } .worst p strong { color: var(--text); }
.neg { color: var(--neg-text); } .pos { color: var(--pos-text); }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; padding: 14px 16px; }
.kpi span { color: var(--muted); font-size: 13px; } .kpi strong { font-size: 26px; font-family: var(--head); font-weight: 700; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
#crewTable, #dayTable, #jobTable, #visitTable { overflow-x: auto; }
.grid2 table { font-size: 13px; } .grid2 td, .grid2 th { padding: 6px 5px; }
.grid2 .toggle button { padding: 3px 8px; font-size: 12px; }
.grid2 .card { margin-bottom: 16px; }
.chart svg { width: 100%; height: auto; margin-bottom: 8px; }
.chart .lbl { fill: var(--muted); font-size: 12px; font-family: var(--body); } .chart .val { fill: var(--text); font-size: 12px; font-weight: 600; font-family: var(--body); font-variant-numeric: tabular-nums; }
.chart .bar.pos { fill: var(--pos); } .chart .bar.neg { fill: var(--neg); } .chart .zero { stroke: var(--field); stroke-width: 1; }
.notes ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; } .notes li.warn { color: var(--warn); }
.gate { position: relative; min-height: 220px; overflow: hidden; }
.locked { filter: blur(4px); opacity: .45; pointer-events: none; user-select: none; }
.gatebox { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(ellipse at center, rgba(255,255,255,.96), rgba(255,255,255,.75)); padding: 20px; }
.gatebox p { margin: 0 0 12px; color: var(--muted); }
.gatebox form { display: flex; gap: 8px; } .gatebox input { width: 260px; }
.tiny { font-size: 12px; margin-top: 10px !important; }
.disclaimer { text-align: center; color: var(--muted); font-weight: 600; margin: 22px 0 6px; }
.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 20px 34px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .files, .settings, .grid2 { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, 1fr); } h1 { font-size: 34px; } }
a { color: var(--accent); text-underline-offset: 2px; } a:hover { color: var(--accent-hover); }
.help { max-width: 760px; padding-top: 24px; padding-bottom: 40px; }
.help h1 { font-size: 34px; } .help h2 { font-size: 22px; margin-top: 24px; }
.help li, .help p { color: var(--text); } .help .tiny { color: var(--muted); }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.faq dl { margin: 0; } .faq dt { font-weight: 600; margin-top: 10px; } .faq dd { margin: 2px 0 0; color: var(--muted); }
.outro { text-align: center; font-size: 24px; font-weight: 700; margin: 30px 0 0; }
.na { color: var(--muted); font-style: italic; }
.est { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--text); background: var(--amber); border-radius: 4px; padding: 1px 6px; vertical-align: middle; }
.banner { background: var(--amber-tint); border: 1px solid #E9D48E; border-left: 6px solid var(--amber); color: var(--text); border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; }
.banner strong { color: var(--text); }
#crewOverheads { display: flex; flex-direction: column; gap: 6px; }
.crewrow .crewname { min-width: 140px; max-width: 180px; color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crewrow input { width: 90px; }
.toggle button { padding: 6px 10px; }
details.advanced { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.advanced summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; }
details.advanced[open] summary { margin-bottom: 10px; }
.toggle.small button { padding: 3px 8px; font-size: 12px; }
.worstcrew { margin: 8px 0 0; color: var(--muted); }
.lossword { font-size: 0.45em; font-weight: 600; vertical-align: middle; color: var(--muted); }
.worstcrew strong { color: var(--text); }
.demo-badge { background: var(--tint); border: 1px dashed var(--accent); color: var(--accent); border-radius: var(--r); padding: 8px 14px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.check { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); margin-top: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.drop:focus-within, :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 8px; font-size: 13px; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.check.inline { display: inline-flex; margin: 6px 0 0; color: inherit; font-weight: 600; }
.kpis.four { grid-template-columns: repeat(4, 1fr); }
.kpi.overdue strong { color: var(--warn); }
input[type=checkbox] { accent-color: var(--accent); }
@media (max-width: 720px) { .kpis.four { grid-template-columns: 1fr 1fr; } }
/* ---- BUILD 2: marketing homepage sections (hero, how it works, what you'll see, pricing, CTA band, help popup) ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; align-items: center; }
.eyebrow-hero { margin: 22px 0 0; font-family: var(--head); font-weight: 600; font-size: 20px; color: var(--muted); }
.hero h1 { margin-top: 4px; font-size: 52px; }
.hero .tag { font-size: 18px; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
a.btn { display: inline-block; text-decoration: none; border-radius: 8px; padding: 12px 20px; font-weight: 600; border: 1px solid var(--accent); }
a.btn.primary { background: var(--accent); color: #FFFFFF; }
a.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #FFFFFF; }
.cta-row button { padding: 12px 20px; }
.cta-note { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.hero-shot { margin: 0; position: relative; }
.hero-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(30,36,33,.12); }
.example-label { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--text); background: var(--amber); border-radius: 4px; padding: 2px 8px; }
.hero-shot .example-label { position: absolute; top: -10px; right: 12px; }
.band { margin: 0 0 34px; }
.band > h2 { font-size: 32px; margin: 0 0 14px; }
.steps3 { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps3 li { margin: 0; } .steps3 h3 { margin: 10px 0 6px; } .steps3 p { margin: 0; color: var(--muted); }
.sample { margin: 0; } .sample figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; } .sample figcaption h3 { margin: 0; }
.weekbars { width: 100%; height: auto; } .weekbars .bar.pos { fill: var(--pos); } .weekbars .axis { stroke: var(--field); stroke-width: 1; }
.weekbars .lbl { fill: var(--muted); font-size: 13px; } .weekbars .val { fill: var(--text); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
#check > h2 { margin-bottom: 14px; }
.price { max-width: 460px; } .price-big { font-family: var(--head); font-size: 22px; margin: 0 0 8px; } .price-big strong { font-size: 40px; font-weight: 700; } .price-big .or { color: var(--muted); font-size: 18px; margin: 0 6px; }
.price ul { margin: 0 0 16px; padding-left: 18px; }
.faq dl.card { margin: 0; }
.cta-band { text-align: center; background: var(--accent); color: #FFFFFF; border-radius: var(--r); padding: 30px 20px; margin: 10px 0 0; }
.cta-band .outro { color: #FFFFFF; margin: 0 0 16px; }
.cta-band a.btn.primary { background: #FFFFFF; color: var(--accent); border-color: #FFFFFF; } .cta-band a.btn.primary:hover { background: var(--tint); color: var(--accent-hover); }
.cta-band :focus-visible { outline-color:#FFFFFF }
dialog#helpDialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 1px solid var(--line); border-radius: var(--r); padding: 0; color: var(--text); background: var(--panel); box-shadow: 0 20px 50px rgba(30,36,33,.25); }
dialog#helpDialog::backdrop { background: rgba(30,36,33,.45); }
.dialog-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; }
.help-body { padding: 6px 20px 20px; } .help-body h3 { margin: 16px 0 6px; } .help-body h4 { font-family: var(--head); font-size: 18px; margin: 16px 0 4px; } .help-body .tiny { color: var(--muted); }
@media (max-width: 860px) { .hero, .steps3 { grid-template-columns: 1fr; } .hero h1 { font-size: 38px; } }
/* ---- LANDING build: the tool lives at /app (app.html); marketing sections moved to the landing page at / ---- */
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--panel); color: var(--accent); padding: 8px 16px; border-radius: 8px; box-shadow: 0 4px 16px rgba(30,36,33,.18); }
.app-top { padding: 14px 0; }
.app-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-bar .brand { display: inline-flex; }
.app-bar .wordmark { height: 28px; }
#check > h1 { font-size: 40px; margin: 0 0 6px; }
#check > .tag { margin-bottom: 8px; }
#check > .privacy { margin-bottom: 18px; }
#check:focus { outline: none; }
.foot-nav { display: flex; justify-content: center; gap: 20px; margin-bottom: 8px; }
.foot-nav a { color: var(--text); font-weight: 600; }
.foot p { margin: 0; }
/* phones: grid tracks may shrink below their content (1fr alone = minmax(auto, 1fr) let the crew card grow to ~521px at 390) */
@media (max-width: 860px) {
  .grid2, .files, .settings { grid-template-columns: minmax(0, 1fr); }
  .kpis, .kpis.three, .kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #check > h1 { font-size: 32px; }
}
@media (max-width: 480px) {
  .card { padding: 16px 14px; }
  .row.spread { gap: 8px; }
  .kpi { padding: 12px; } .kpi strong { font-size: 22px; }
  .big { font-size: 36px; }
  .gatebox form { flex-direction: column; width: 100%; } .gatebox input { width: 100%; }
  .crewrow .crewname { min-width: 0; }
  .inp input { width: 96px; }
}
/* phones: the crew and day tables stack each row into a small card (label from data-label) instead of an
   8-column table; the long job / visit tables keep their own sideways scroll inside the card, unwrapped */
.scroll td { white-space: nowrap; }
@media (max-width: 600px) {
  .chart .lbl, .chart .val { font-size: 17px; }
  #crewTable table.data, #dayTable table.data { font-size: 14px; }
  #crewTable tr.head, #dayTable tr.head { display: none; }
  #crewTable tr, #dayTable tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  #crewTable td, #dayTable td { display: flex; justify-content: space-between; gap: 8px; border: 0; padding: 2px 0; text-align: right; white-space: normal; }
  #crewTable td::before, #dayTable td::before { content: attr(data-label); color: var(--muted); text-align: left; font-weight: 400; }
  #crewTable td:first-child, #dayTable td:first-child { grid-column: 1 / -1; font-weight: 600; font-size: 15px; text-align: left; }
  #crewTable td:first-child::before, #dayTable td:first-child::before { content: none; }
  #crewTable td:nth-child(4), #dayTable td:nth-child(4) { grid-column: 1 / -1; }
}
