/* Layout: one column, mobile first. Deep blue for trust, warm orange for the one action that matters. */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --fg: #16213a;
  --muted: #5b6478;
  --line: #dcdfe6;
  --brand: #16305e;
  --brand-ink: #ffffff;
  --accent: #e8641b;
  --accent-ink: #ffffff;
  --ok: #1f8a4c;
  --warn: #b8730b;
  --bad: #c43a2f;
  --font: 'Heebo', 'Segoe UI', Arial, sans-serif;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #10151f; --surface: #182031; --fg: #eef1f6; --muted: #aab3c5; --line: #2b3549; --brand: #2c4f94; --accent: #f0772f; color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.55; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0 0 .4em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 900; }
h2 { font-size: 1.45rem; font-weight: 700; margin-top: 1.2em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1040px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
main.wrap { padding-block: 1.5rem 3rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.num { text-align: left; font-variant-numeric: tabular-nums; direction: ltr; }
.row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.gap { gap: .6rem; }
.inline { display: inline; }
.tag { font-size: .75rem; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: .1em .6em; vertical-align: middle; }
.eyebrow { color: var(--muted); font-size: .9rem; margin-bottom: .3em; }

/* Header and footer */
header.site { background: var(--brand); color: var(--brand-ink); }
header.site .row { justify-content: space-between; padding-block: .7rem; }
header.site a { color: var(--brand-ink); text-decoration: none; }
.brand { font-weight: 900; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; }
.mark { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; background: var(--accent); border-radius: 50%; font-weight: 900; }
nav.topnav, nav.adminnav { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: .95rem; }
nav.adminnav a.muted { opacity: .7; }
footer.site { background: var(--surface); border-top: 1px solid var(--line); padding-block: 2rem; font-size: .95rem; }
footer .cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.topnav .phone { font-weight: 700; direction: ltr; }
/* Sticky contact bar: always one thumb away on phones */
.stickybar { position: fixed; inset-inline: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom, 0px); }
.stickybar a { display: block; text-align: center; padding: .85em .4em; font-weight: 700; text-decoration: none; font-size: 1rem; background: var(--surface); color: var(--fg); }
.stickybar .call { background: var(--brand); color: var(--brand-ink); }
.stickybar .wa { background: #25d366; color: #fff; }
.stickybar .req { background: var(--accent); color: var(--accent-ink); }
body:not(.admin) main.wrap { padding-bottom: 5.5rem; }
.trust { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-weight: 500; }
.trust li::before { content: '✓'; color: var(--ok); font-weight: 900; margin-inline-end: .4em; }
.resetform { margin-top: 1rem; }
.chip.warn { border-color: var(--warn); }
.badge.st-draft { background: color-mix(in srgb, var(--warn) 25%, var(--surface)); }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); border-radius: var(--radius); padding: .6em 1.3em; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn.big { font-size: 1.15rem; padding: .8em 1.6em; }
.btn.small { font-size: .9rem; padding: .35em .9em; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
header .btn.small { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Hero and sections */
.hero { padding-block: 2rem 1.5rem; }
.hero.small { padding-block: 1rem; }
.lead { font-size: 1.2rem; max-width: 40rem; }
.cta { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1rem 0; }
.promise { color: var(--muted); font-weight: 500; }
section { margin-block: 2.5rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; text-decoration: none; color: inherit; min-width: 0; }
.card p { color: var(--muted); font-size: .95rem; }
.card .link { color: var(--brand); font-weight: 700; }
.card:hover { border-color: var(--brand); }
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
ol.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1rem 1rem; position: relative; padding-inline-start: 3.2rem; }
ol.steps li::before { content: counter(s); position: absolute; inset-inline-start: 1rem; top: .9rem; width: 1.6em; height: 1.6em; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); border-radius: 50%; font-weight: 900; }
.cta-band { background: var(--brand); color: var(--brand-ink); border-radius: var(--radius); padding: 2rem; text-align: center; }
.cta-band h2 { margin-top: 0; }
.faq details { border-bottom: 1px solid var(--line); padding: .6rem 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.prose { max-width: 42rem; }

/* Tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .95rem; }
th, td { padding: .6rem .7rem; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); font-weight: 700; }
tr.hot td { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
pre.msg { white-space: pre-wrap; font: inherit; font-size: .85rem; margin: 0; max-width: 40ch; }

/* Forms */
.reqform { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; max-width: 44rem; }
.reqform.narrow { max-width: 24rem; margin: 2rem auto; }
.reqform.compact { padding: 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 900; font-size: 1.3rem; margin-bottom: .6rem; }
label { display: block; font-weight: 500; margin-bottom: .9rem; }
label.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: .35em; }
input[type=text], input[type=tel], input[type=number], input[type=password], input:not([type]), select, textarea { display: block; width: 100%; font: inherit; padding: .6em .7em; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); margin-top: .3rem; }
textarea { resize: vertical; }
.two { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 1rem; }
.choice { position: relative; margin: 0; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: inline-block; padding: .5em 1em; border: 2px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; }
.choice input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-weight: 700; }
.choice input:focus-visible + span { outline: 3px solid var(--accent); }
.stars .choice span { font-size: 1.4rem; padding: .3em .8em; }
.err { color: var(--bad); font-size: .9rem; margin: -.4rem 0 .8rem; }
.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid var(--ok); border-radius: 8px; padding: .6rem .9rem; margin-bottom: 1rem; }
.hp { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.progress { height: 6px; background: var(--line); border-radius: 3px; margin-bottom: 1.2rem; overflow: hidden; }
.progress span { display: block; height: 100%; width: 33%; background: var(--accent); transition: width .3s; }
.formnav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1rem; }
.formnav #next, .formnav #submit { margin-inline-start: auto; }

/* Tracking */
.track { max-width: 42rem; }
.statusline { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin: 1.2rem 0; font-size: .85rem; text-align: center; }
.statusline span { padding: .5rem .2rem; border-top: 4px solid var(--line); color: var(--muted); }
.statusline span.past { border-color: var(--ok); color: var(--fg); }
.statusline span.on { border-color: var(--accent); color: var(--fg); font-weight: 700; }
.track[data-status=no_tech] .statusline span.on { border-color: var(--warn); }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.take { max-width: 40rem; }

/* Admin */
body.admin { font-size: 15px; }
body.admin main.wrap { max-width: 1200px; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: .25em .8em; text-decoration: none; color: var(--fg); background: var(--surface); font-size: .9rem; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.badge { display: inline-block; font-size: .8rem; padding: .1em .6em; border-radius: 999px; background: var(--line); white-space: nowrap; vertical-align: middle; }
.badge.st-new, .badge.st-dispatched { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); }
.badge.st-no_tech { background: color-mix(in srgb, var(--warn) 25%, var(--surface)); }
.badge.st-assigned, .badge.st-on_way { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
.badge.st-done, .badge.st-closed { background: color-mix(in srgb, var(--ok) 20%, var(--surface)); }
.badge.st-cancelled { background: color-mix(in srgb, var(--bad) 18%, var(--surface)); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-block: 1rem; min-width: 0; }
.panel h2 { margin-top: .2em; font-size: 1.15rem; }
.cols2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
code.copy { display: inline-block; max-width: 100%; overflow-wrap: anywhere; background: var(--bg); padding: .2em .4em; border-radius: 4px; cursor: pointer; direction: ltr; font-size: .85em; }
ul.log { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
ul.log li { padding: .3rem 0; border-bottom: 1px solid var(--line); }
ul.log time { color: var(--muted); margin-inline-end: .6rem; font-variant-numeric: tabular-nums; }
.tiles { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; }
.tile b { display: block; font-size: 1.6rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: .85rem; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 140px; overflow-x: auto; padding-bottom: 1.4rem; }
.bars div { display: flex; flex-direction: column; align-items: center; min-width: 28px; position: relative; }
.bars i { display: block; width: 20px; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars span { position: absolute; top: 100%; font-size: .7rem; color: var(--muted); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (min-width: 900px) {
  .stickybar { display: none; }
  body:not(.admin) main.wrap { padding-bottom: 3rem; }
}
@media (max-width: 600px) {
  nav.topnav a:not(.btn):not(.phone) { display: none; }
  nav.topnav .btn { display: none; }
  .formnav { flex-direction: column-reverse; }
  .formnav #next, .formnav #submit { margin-inline-start: 0; }
  .formnav .btn { width: 100%; }
}
