/* Arex Spectrum Platform — app UI */
:root {
  /* Arex logo palette: sky #1E90FF · royal #4169E2 · charcoal #606062 */
  --sky: #1e90ff;
  --royal: #4169e2;
  --charcoal: #606062;
  --navy: #122a6e;
  --navy-2: #1b3a8f;
  --primary: #1672dc;
  --primary-hover: #105fbd;
  --primary-soft: #e8f3ff;
  --brand: #4169e2;
  --brand-soft: #edf1fd;
  --urgent: #d9480f;
  --urgent-soft: #fff0e8;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e2e8f2;
  --line-2: #cbd5e4;
  --text: #141a2b;
  --text-2: #4f5668;
  --text-3: #7c8496;
  --good: #137a4b; --good-soft: #e6f6ee;
  --warn: #a15c00; --warn-soft: #fff4dd;
  --bad: #b42318;  --bad-soft: #fdecea;
  --info: #4169e2; --info-soft: #edf1fd;
  --muted-soft: #eef1f5;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 42, .06), 0 4px 16px rgba(15, 27, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 27, 42, .18);
  --tabbar-h: 64px;
  --topbar-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1124; --surface: #111a33; --surface-2: #16203d; --line: #222f52; --line-2: #2c3b66;
    --text: #e8eef6; --text-2: #a9b6c6; --text-3: #7d8ca0;
    --primary: #3d9dff; --primary-hover: #66b2ff; --primary-soft: #102a4d;
    --brand: #7e9cf2; --brand-soft: #1a2552; --navy: #0e1f52; --navy-2: #162c6e; --urgent: #ff8a4c; --urgent-soft: #3a2212;
    --good: #45c486; --good-soft: #10301f; --warn: #f0b44a; --warn-soft: #362a10;
    --bad: #f47a6e; --bad-soft: #3a1714; --info: #7e9cf2; --info-soft: #1a2552; --muted-soft: #1b2a3c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { font-size: .9em; background: var(--muted-soft); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
.h1 { font-size: 26px; font-weight: 750; }
.h2 { font-size: 20px; font-weight: 700; }
.h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic.lg { width: 26px; height: 26px; }
.ic.sm { width: 16px; height: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Shell ---------- */
.app { min-height: 100vh; display: flex; }
.sidebar { width: 256px; flex: none; background: var(--surface); color: var(--text-2); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto; }
.brandmark { display: block; padding: 2px 10px 16px; }
.brandmark img { display: block; width: 150px; height: auto; }
.brandmark span { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: 3px 9px; border-radius: 99px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav .sect { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 14px 12px 6px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550; text-decoration: none; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: var(--primary-soft); color: var(--primary); box-shadow: inset 3px 0 0 var(--sky); }
.side-nav a.active .ic { color: var(--primary); }
.side-nav .count { margin-left: auto; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.side-foot { margin-top: auto; padding: 12px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar .title { font-weight: 700; font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .back { display: none; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-decoration: none !important; }
.icon-btn:hover { background: var(--muted-soft); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.content { padding: 24px; max-width: 1180px; width: 100%; margin: 0 auto; flex: 1; }
.content.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .grow { flex: 1; min-width: 200px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }

.tabbar { display: none; }
.fab { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar { padding: 0 8px 0 16px; height: 56px; }
  .topbar .back { display: inline-grid; margin-left: -8px; }
  .content { padding: 16px 16px calc(var(--tabbar-h) + var(--safe-b) + 24px); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: inherit; font-size: 11px; font-weight: 600; color: var(--text-3); text-decoration: none; background: none; border: 0; position: relative; cursor: pointer; }
  .tabbar .ic { width: 24px; height: 24px; }
  .tabbar .active { color: var(--primary); }
  .tabbar .badge-dot { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
  .fab { display: inline-flex; position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 41; align-items: center; gap: 8px; height: 56px; padding: 0 22px 0 18px; border-radius: 18px; background: var(--primary); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(22, 114, 220, .38); text-decoration: none !important; }
  .page-head .desk { display: none; }
  .h1 { font-size: 22px; }
}

/* top progress bar during navigation */
#nprogress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--primary); z-index: 100; transition: width .3s ease, opacity .3s; opacity: 0; }
#nprogress.on { opacity: 1; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad, .pad { padding: 18px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; font-weight: 700; flex: 1; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 10px; }
.section-title a { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 13px; }
.grid { display: grid; gap: 14px; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } .grid-2.keep { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-2:not(.keep) { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.gap-s { gap: 6px; }

/* Stat tiles */
.stat { padding: 16px 18px; }
.stat .label { font-size: 13px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 28px; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12.5px; color: var(--text-3); }
.stat.accent { background: linear-gradient(135deg, var(--royal), var(--sky)); color: #fff; border-color: transparent; }
.stat.accent .label, .stat.accent .sub { color: rgba(255,255,255,.82); }

/* Lists (tappable rows) */
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li, .list > a + a { border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: inherit; text-decoration: none !important; min-height: 64px; }
a.item:hover { background: var(--surface-2); }
a.item:active { background: var(--muted-soft); }
.item .lead { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.item .lead.orange { background: var(--primary-soft); color: var(--sky); }
.item .lead.green { background: var(--good-soft); color: var(--good); }
.item .lead.red { background: var(--bad-soft); color: var(--bad); }
.item .lead.grey { background: var(--muted-soft); color: var(--text-2); }
.item .body { flex: 1; min-width: 0; }
.item .t { font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item .s { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .end { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.item .chev { color: var(--text-3); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; line-height: 1.6; white-space: nowrap; }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-good { background: var(--good-soft); color: var(--good); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-muted { background: var(--muted-soft); color: var(--text-2); }
.badge-orange { background: var(--urgent-soft); color: var(--urgent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 650; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn.loading { opacity: .6; pointer-events: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-good { background: var(--good); border-color: var(--good); color: #fff; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { height: 54px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
@media (max-width: 900px) { .sticky-actions { bottom: calc(var(--tabbar-h) + var(--safe-b)); } }

/* Forms */
.form .field, .field { display: block; margin-bottom: 14px; }
.field > span, .label { display: block; font-size: 13.5px; font-weight: 650; margin-bottom: 6px; color: var(--text); }
.field .hint { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 5px; font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input:not([type]), select, textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; transition: border .15s, box-shadow .15s; }
textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237b8898' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=file] { font: inherit; font-size: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.input-group { display: flex; gap: 8px; }
.input-group > * { flex: 1; }
.search { position: relative; }
.search .ic { position: absolute; left: 14px; top: 14px; color: var(--text-3); }
.search input { padding-left: 42px; }

/* Choice chips / tiles */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.chip.active, .chip:has(input:checked) { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip input { display: none; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.scroll-x::-webkit-scrollbar { display: none; }
@media (min-width: 901px) { .scroll-x { margin: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; } }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; color: inherit; text-decoration: none !important; transition: border .15s, box-shadow .15s, transform .08s; }
.tile:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.tile:active { transform: scale(.98); }
.tile .tile-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--sky); }
.tile b { font-size: 15px; }
.tile small { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.tile:has(input:checked)::after { content: ""; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat; }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile { padding: 14px; } }

/* Wizard */
.wizard-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.wizard-steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background .3s; }
.wizard-steps span.on { background: var(--primary); }
.wstep { display: none; animation: fadeUp .25s ease; }
.wstep.on { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.summary dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; }
.summary dt { color: var(--text-2); font-size: 13.5px; }
.summary dd { margin: 0; font-weight: 600; }

/* Key-value */
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 10px 14px; margin: 0; }
.kv dt { color: var(--text-2); font-size: 13.5px; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* Progress tracker */
.track { display: flex; gap: 0; margin: 6px 0 4px; }
.track .st { flex: 1; text-align: center; position: relative; font-size: 11.5px; color: var(--text-3); font-weight: 600; padding-top: 26px; }
.track .st::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); z-index: 1; }
.track .st::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.track .st:first-child::after { display: none; }
.track .st.done { color: var(--text); }
.track .st.done::before { background: var(--good); border-color: var(--good); }
.track .st.done::after, .track .st.current::after { background: var(--good); }
.track .st.current { color: var(--primary); }
.track .st.current::before { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 22%, transparent); }
@media (max-width: 520px) { .track .st { font-size: 0; } .track .st.current { font-size: 11.5px; } }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.exc::before { background: var(--bad); }
.timeline .when { font-size: 12px; color: var(--text-3); }

/* Hero cards */
.hero { background: linear-gradient(125deg, var(--royal) 0%, #2f7ef2 55%, var(--sky) 100%); color: #fff; border-radius: 18px; padding: 22px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -30px; top: -60px; width: 240px; height: 240px; background: linear-gradient(135deg, transparent 46%, rgba(255,255,255,.14) 46%, rgba(255,255,255,.14) 54%, transparent 54%); }
.hero h1, .hero h2 { color: #fff; }
.hero p { color: rgba(255,255,255,.86); }
.hero .btn-primary { background: #fff; border-color: #fff; color: var(--royal); }
.hero .btn-primary:hover { background: #f0f5ff; }
.hero .btn { position: relative; z-index: 1; }
.hero-job { display: flex; gap: 14px; align-items: center; }

/* Route block */
.route { position: relative; padding-left: 26px; }
.route .pt { position: relative; padding-bottom: 14px; }
.route .pt:last-child { padding-bottom: 0; }
.route .pt::before { content: ""; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--brand); background: var(--surface); }
.route .pt.end::before { border-color: var(--primary); background: var(--primary); }
.route .pt:not(:last-child)::after { content: ""; position: absolute; left: -17px; top: 20px; bottom: 2px; border-left: 2px dashed var(--line-2); }
.route .lbl { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.route .addr { font-weight: 650; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Alerts & toasts */
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 550; display: flex; gap: 10px; align-items: flex-start; }
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-success { background: var(--good-soft); color: var(--good); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: 14px; width: min(440px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); font-weight: 550; animation: toastIn .3s ease; }
.toast.error { background: #9b1c12; }
.toast.success .ic { color: #5fe0a0; }
.toast.out { animation: toastOut .3s ease forwards; }
.toast a { color: #9ccfff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

/* Sheets / dialogs */
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--text); width: min(560px, 100%); max-height: 90vh; border-radius: 20px; box-shadow: var(--shadow-lg); }
dialog.sheet::backdrop { background: rgba(8, 18, 30, .5); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: popIn .22s ease; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 18px; }
.sheet-body { padding: 8px 18px 20px; overflow-y: auto; max-height: calc(90vh - 70px); }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; padding-bottom: var(--safe-b); }
  dialog.sheet[open] { animation: slideUp .28s cubic-bezier(.2,.9,.3,1); }
  .sheet-head::before { content: ""; position: absolute; left: 50%; top: 7px; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); }
}
@keyframes slideUp { from { transform: translateY(100%); } }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 6px; color: var(--text); font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 1px solid var(--line); text-decoration: none !important; cursor: pointer; text-align: left; }
.menu-list a:last-child { border-bottom: 0; }
.menu-list .ic { color: var(--text-2); }

/* Empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty .ic { width: 44px; height: 44px; color: var(--text-3); stroke-width: 1.5; margin-bottom: 8px; }
.empty h3 { color: var(--text); }

/* Kanban board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 200px; max-height: calc(100vh - 190px); scroll-snap-align: start; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--line); }
.col-head .n { margin-left: auto; font-size: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; }
.col-body { padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.jcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: inherit; text-decoration: none !important; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.jcard:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.jcard .top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.jcard .ref { font-weight: 700; color: var(--text); font-size: 13px; }
.jcard .cli { font-weight: 650; margin: 6px 0 2px; }
.jcard .rt { font-size: 12.5px; color: var(--text-2); }
.jcard .ft { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; flex-wrap: wrap; }
.jcard.exc { border-left: 4px solid var(--bad); }
.jcard.urgent { border-left: 4px solid var(--urgent); }
.sla { font-weight: 700; }
.sla.late { color: var(--bad); }

/* Suggestions */
.sugg { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.sugg.top { border-color: var(--good); background: var(--good-soft); }
.sugg.off { opacity: .6; }
.sugg .score { font-weight: 750; font-size: 18px; width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--good); }

/* Onboarding checklist */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li a, .steps li > div { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: inherit; text-decoration: none !important; }
.steps li + li { border-top: 1px solid var(--line); }
.steps .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--muted-soft); color: var(--text-2); flex: none; }
.steps .done .num { background: var(--good); color: #fff; }
.steps .now .num { background: var(--primary); color: #fff; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; flex: none; }
.ring b { width: 50px; height: 50px; border-radius: 50%; background: var(--royal); display: grid; place-items: center; font-size: 14px; color: #fff; }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.checklist li { padding: 4px 0; font-weight: 550; }
.checklist .ok { color: var(--good); } .checklist .bad { color: var(--bad); }

/* Driver mode */
.driver-cta { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); z-index: 5; }
@media (min-width: 901px) { .driver-cta { bottom: 12px; } }
.big-action { width: 100%; height: 64px; font-size: 18px; border-radius: 18px; box-shadow: 0 10px 26px rgba(22, 114, 220, .35); }
.sigpad { width: 100%; height: 190px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); touch-action: none; display: block; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.photo-grid img, .photo-grid a img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--line); }
.upload-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border: 1.5px dashed var(--line-2); border-radius: 12px; cursor: pointer; font-weight: 650; color: var(--text-2); background: var(--surface-2); }
.upload-btn input { display: none; }
.countdown { font-weight: 750; font-variant-numeric: tabular-nums; }
.countdown.low { color: var(--bad); }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars input { display: none; }
.stars label { font-size: 32px; color: var(--line-2); cursor: pointer; line-height: 1; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f5a623; }

/* Auth */
.auth-body { min-height: 100vh; background: radial-gradient(900px 500px at 100% -10%, color-mix(in srgb, var(--sky) 22%, transparent) 0%, transparent 60%), radial-gradient(800px 500px at -10% 110%, color-mix(in srgb, var(--royal) 18%, transparent) 0%, transparent 60%), var(--bg); display: flex; }
.auth-wrap { width: 100%; max-width: 440px; margin: auto; padding: 28px 18px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 22px; text-align: center; }
.auth-brand img { width: 210px; height: auto; }
.auth-brand span { color: var(--text-2); font-size: 13px; }
.auth-foot { text-align: center; color: var(--text-2); margin-top: 18px; font-size: 14px; }
.auth-foot a { color: var(--primary); font-weight: 650; }
.steps-list li { margin-bottom: 10px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--muted-soft); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.seg a { text-align: center; padding: 9px; border-radius: 9px; font-weight: 650; color: var(--text-2); text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Print (invoice, delivery note) */
.doc { background: #fff; color: #111; max-width: 820px; margin: 0 auto; padding: 36px; border-radius: 6px; box-shadow: var(--shadow); }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { border-bottom: 1px solid #ddd; padding: 8px; text-align: left; }
.doc .tot td { border: 0; padding: 4px 8px; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .tabbar, .fab, .no-print, .toasts { display: none !important; }
  .content { padding: 0; max-width: none; }
  .doc { box-shadow: none; padding: 0; }
}

/* Misc */
.install-banner { display: flex; gap: 12px; align-items: center; }
.kbd-hint { font-size: 12px; color: var(--text-3); }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 14px; }
.notice-row.unread { background: var(--brand-soft); }
.map-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.price-big { font-size: 30px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dl-inline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--text-2); }
.dl-inline b { color: var(--text); font-weight: 650; }
details.more summary { cursor: pointer; font-weight: 650; color: var(--brand); list-style: none; padding: 6px 0; }
details.more summary::-webkit-details-marker { display: none; }
@media (max-width: 900px) { .desk-only { display: none !important; } }
@media (min-width: 901px) { .mob-only { display: none !important; } }
.item .s { display: block; }
.item .t { min-width: 0; }
html, body { overflow-x: hidden; }
.icon-btn .dot { top: 3px; right: 2px; }

/* Logo: swap to light-text version in dark mode */
img.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.logo-light { display: none !important; } :root:not([data-theme="light"]) img.logo-dark { display: block !important; } }
.btn-primary { box-shadow: 0 1px 2px rgba(22,114,220,.25); }
.topbar .mob-logo { height: 26px; width: auto; display: none; }
@media (max-width: 900px) { .topbar .mob-logo { display: block; margin-right: auto; } .topbar .mob-logo + .title { display: none; } }
.doc .doc-logo { width: 170px; height: auto; display: block; }

/* Honeypot field for bots: off-screen, never seen by people */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ================= Public website ================= */
.public-body { background: var(--bg); }
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.sh-inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; height: 68px; display: flex; align-items: center; gap: 24px; }
.sh-logo img { height: 40px; width: auto; display: block; }
.sh-nav { display: flex; gap: 4px; flex: 1; }
.sh-nav a { padding: 8px 10px; font-size: 14.5px; border-radius: 10px; color: var(--text-2); font-weight: 600; text-decoration: none; }
.sh-nav a:hover, .sh-nav a.on { color: var(--primary); background: var(--primary-soft); }
.sh-cta { display: flex; gap: 8px; align-items: center; margin-left: auto; }
@media (max-width: 1100px) { .sh-nav { display: none; } .sh-cta .mob-only { display: inline-grid !important; } }
@media (max-width: 900px) { .sh-inner { height: 60px; padding: 0 12px 0 16px; } .sh-logo img { height: 32px; } }
.site-main { min-height: 60vh; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 860px; }
.section { padding: 56px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.display { font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin: 0 0 14px; }
.lede { font-size: 18px; color: var(--text-2); max-width: 640px; }
.page-hero { padding: 48px 0 28px; background: linear-gradient(180deg, color-mix(in srgb, var(--sky) 10%, var(--bg)), var(--bg)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.page-hero p { color: var(--text-2); margin: 0; max-width: 700px; }
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.crumbs a { color: var(--text-2); }
.home-hero { padding: 64px 0 56px; background: radial-gradient(800px 400px at 90% 0%, color-mix(in srgb, var(--sky) 20%, transparent), transparent 70%), radial-gradient(700px 400px at 0% 100%, color-mix(in srgb, var(--royal) 14%, transparent), transparent 70%); }
.home-hero .grid-2 { align-items: center; gap: 40px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 22px; }
.feature { padding: 20px; }
.feature .tile-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--sky); margin-bottom: 12px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--text-2); margin: 0; font-size: 14.5px; }
.steps-h { counter-reset: st; display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps-h li { list-style: none; counter-increment: st; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps-h li::before { content: counter(st); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--royal), var(--sky)); color: #fff; font-weight: 800; margin-bottom: 10px; }
@media (max-width: 900px) { .steps-h { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps-h { grid-template-columns: 1fr; } }
.cta-band { background: linear-gradient(125deg, var(--royal), var(--sky)); color: #fff; border-radius: 22px; padding: 32px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; flex: 1; min-width: 240px; }
.cta-band .btn-primary { background: #fff; color: var(--royal); border-color: #fff; }
.cta-band .btn { border-color: rgba(255,255,255,.6); }
.cta-band .btn:not(.btn-primary) { background: transparent; color: #fff; }

/* Long-form documents */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; padding: 32px 0 56px; }
.toc { position: sticky; top: 88px; font-size: 14px; }
.toc b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 8px; }
.toc a { display: block; padding: 6px 10px; border-left: 2px solid var(--line); color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--primary); border-color: var(--primary); }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; gap: 16px; } .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; } }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; line-height: 1.7; font-size: 15.5px; }
@media (max-width: 640px) { .prose { padding: 20px 18px; } }
.prose h2 { font-size: 20px; margin: 30px 0 10px; padding-top: 6px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 16px; margin: 20px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); }
.prose .note { background: var(--info-soft); color: var(--text); border-left: 4px solid var(--info); padding: 12px 14px; border-radius: 8px; }
.doc-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); margin-top: 10px; }

/* FAQ accordion */
.faq-group { margin-bottom: 26px; }
.faq-group h2 { font-size: 18px; margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.qa summary { cursor: pointer; list-style: none; padding: 15px 44px 15px 16px; font-weight: 650; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 16px; top: 12px; font-size: 22px; color: var(--primary); font-weight: 500; }
.qa[open] summary::after { content: "–"; }
.qa .ans { padding: 0 16px 16px; color: var(--text-2); line-height: 1.65; }
.qa .ans p:last-child { margin: 0; }

/* Help centre */
.kb-cats { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .kb-cats { grid-template-columns: 1fr; } }
.kb-cat h3 { display: flex; gap: 10px; align-items: center; font-size: 16px; }
.kb-cat a { display: block; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 550; }
.kb-cat a:last-child { border: 0; }
.kb-cat a:hover { color: var(--primary); }
.big-search { position: relative; max-width: 620px; margin-top: 18px; }
.big-search input { height: 56px; padding-left: 48px; font-size: 17px; border-radius: 16px; box-shadow: var(--shadow); }
.big-search .ic { position: absolute; left: 16px; top: 18px; color: var(--text-3); }

/* Footers */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; }
.sf-inner { max-width: 1180px; margin: 0 auto; padding: 40px 20px 24px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 24px; }
.sf-brand img { height: auto; margin-bottom: 10px; }
.sf-brand p { color: var(--text-2); font-size: 14px; }
.sf-col h4 { margin: 4px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.sf-col a { display: block; padding: 5px 0; color: var(--text); text-decoration: none; font-size: 14.5px; }
.sf-col a:hover { color: var(--primary); }
.sf-bottom { max-width: 1180px; margin: 0 auto; padding: 16px 20px 28px; border-top: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.sf-mini a { color: var(--text-2); margin-left: 14px; }
@media (max-width: 900px) { .sf-inner { grid-template-columns: 1fr 1fr; } .sf-brand { grid-column: 1 / -1; } .sf-mini a { margin: 0 14px 0 0; } }
.app-footer { display: flex; gap: 10px 18px; flex-wrap: wrap; justify-content: space-between; padding: 14px 24px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-3); max-width: 1180px; width: 100%; margin: 0 auto; }
.app-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
.app-footer a { color: var(--text-2); }
@media (max-width: 900px) { .app-footer { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); } }
.auth-legal { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 14px; }
.auth-legal a { color: var(--text-2); }
.cookie-note { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 560px; margin: 0 auto; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 16px; padding: 14px 16px; font-size: 14px; }
@media (max-width: 900px) { body:not(.public-body):not(.auth-body) .cookie-note { bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); } }
.grid > .card, .grid-2 > .card, .grid-3 > .card, .grid-4 > .card, .kb-cats > .card, .split > .card { margin-top: 0; }
@media (min-width: 901px) { .steps-h.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* =====================================================================
   Arex Spectrum visual system v2: industrial, ruled, dispatch-board feel
   (overrides the base styles above)
   ===================================================================== */
:root {
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Barlow Semi Condensed", "Arial Narrow", "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ink: #0c1631;           /* deep navy from the logo family: header, footer, top bar */
  --ink-2: #14214a;
  --ink-line: #223061;
  --ink-text: #c9d2e6;
  --ink-mute: #8b98ba;
  --bg: #f4f5f7;
  --surface-2: #f9fafb;
  --line: #e1e4ea;
  --line-2: #c8cdd8;
  --text: #121826;
  --text-2: #4a5263;
  --text-3: #7a8294;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: none;
  --shadow-lg: 0 18px 50px rgba(12, 22, 49, .22);
}
body { font-size: 15px; letter-spacing: 0; }
h1, h2, h3, .h1, .h2, .h3, .display, .stat .value, .price-big, .page-hero h1, .cta-band h2, .brandmark span, .section-title, .sf-col h4, .toc b, .col-head {
  font-family: var(--font-head); letter-spacing: 0; }
.h1 { font-size: 30px; font-weight: 700; }
.h2 { font-size: 23px; font-weight: 700; }
.h3 { font-size: 18px; font-weight: 600; }
.display { font-size: clamp(36px, 5.6vw, 60px); font-weight: 700; line-height: 1.02; text-transform: none; }
.mono, .jcard .ref, .kv dd .mono, code { font-family: var(--font-mono); }
code { background: #eef0f4; border-radius: 3px; font-size: .86em; }

/* Surfaces: crisp borders, no soft glow */
.card { border-radius: var(--radius); box-shadow: none; border-color: var(--line); }
.card-head { background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.card-head h2, .card-head h3 { font-family: var(--font-head); font-size: 16px; font-weight: 600; letter-spacing: .01em; }
.section-title { font-size: 13px; letter-spacing: .12em; color: var(--text); border-bottom: 2px solid var(--text); padding-bottom: 6px; }
.section-title a { font-family: var(--font); letter-spacing: 0; font-weight: 600; }

/* Buttons: squarer, firmer */
.btn { border-radius: var(--radius-sm); font-weight: 600; height: 42px; box-shadow: none; }
.btn-sm { border-radius: 3px; height: 34px; }
.btn-lg { border-radius: var(--radius-sm); height: 50px; font-size: 15.5px; }
.btn-primary { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-dark:hover { background: var(--ink-2); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input:not([type]), select, textarea { border-radius: var(--radius-sm); }
.chip { border-radius: 3px; height: 34px; font-weight: 600; }
.chip.active, .chip:has(input:checked) { background: var(--ink); border-color: var(--ink); }
.badge { border-radius: 3px; font-size: 11.5px; letter-spacing: .02em; padding: 1px 7px; }
.seg { border-radius: var(--radius-sm); }
.seg a { border-radius: 3px; }
.seg a.on { box-shadow: 0 0 0 1px var(--line-2); }
dialog.sheet { border-radius: 10px; }
@media (max-width: 640px) { dialog.sheet { border-radius: 12px 12px 0 0; } }
.toast { border-radius: var(--radius); background: var(--ink); }

/* Tiles & list leads: drop the soft icon squares */
.tile { border-radius: var(--radius); border-width: 1px; }
.tile .tile-ic { width: auto; height: auto; background: none; border-radius: 0; color: var(--royal); justify-content: start; }
.tile .tile-ic .ic { width: 26px; height: 26px; stroke-width: 1.75; }
.tile b { font-family: var(--font-head); font-size: 17px; font-weight: 600; }
.tile:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tile:has(input:checked)::after { background-color: var(--ink); border-radius: 3px; }
.item .lead { border-radius: var(--radius-sm); width: 40px; height: 40px; }

/* Stats: ruled numbers, not glowing tiles */
.stat { border-top: 3px solid var(--line-2); border-radius: 0 0 var(--radius) var(--radius); }
.stat .value { font-size: 34px; font-weight: 700; }
.stat .label { text-transform: uppercase; font-size: 11.5px; letter-spacing: .08em; }
.stat.accent { background: var(--ink); border-color: var(--ink); border-top-color: var(--sky); color: #fff; }
.stat.accent .label, .stat.accent .sub { color: var(--ink-mute); }

/* Hero & CTA blocks: solid navy with a fine rule, no gradients */
.hero { background: var(--ink); border-radius: var(--radius); border-left: 6px solid var(--sky); }
.hero::after { display: none; }
.hero p { color: var(--ink-text); }
.hero .btn-primary { background: var(--sky); border-color: var(--sky); color: #fff; }
.cta-band { background: var(--ink); border-radius: var(--radius); border-left: 6px solid var(--sky); }
.cta-band h2 { font-weight: 600; font-size: 26px; }
.cta-band .btn-primary { background: var(--sky); border-color: var(--sky); color: #fff; }
.cta-band .btn:not(.btn-primary) { border-color: #3a4a7a; }

/* ---------- Dark header & footer (website) ---------- */
.site-header { background: var(--ink); border-bottom: 1px solid var(--ink-line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.sh-nav a { color: var(--ink-text); border-radius: 0; padding: 22px 10px 20px; border-bottom: 2px solid transparent; }
.sh-nav a:hover { background: none; color: #fff; }
.sh-nav a.on { background: none; color: #fff; border-bottom-color: var(--sky); }
.sh-cta .btn-ghost { color: #fff; }
.sh-cta .btn-ghost:hover { background: var(--ink-2); }
.sh-cta .icon-btn { color: #fff; }
.sh-cta .icon-btn:hover { background: var(--ink-2); }
.site-header img.logo-light, .site-footer img.logo-light { display: none !important; }
.site-header img.logo-dark, .site-footer img.logo-dark { display: block !important; }
.site-footer { background: var(--ink); border-top: 4px solid var(--sky); color: var(--ink-text); }
.sf-brand p { color: var(--ink-mute); }
.sf-brand a, .sf-col a { color: var(--ink-text); }
.sf-col a:hover, .sf-brand a:hover, .sf-mini a:hover { color: #fff; text-decoration: underline; }
.sf-col h4 { color: #fff; font-size: 14px; letter-spacing: .1em; }
.sf-bottom { border-top-color: var(--ink-line); color: var(--ink-mute); }
.sf-mini a { color: var(--ink-text); }

/* Page heroes: plain, ruled, left-aligned */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 40px 0 30px; }
.page-hero h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 700; }
.home-hero { background: var(--surface); border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(135deg, transparent 0 22px, rgba(65, 105, 226, .045) 22px 23px); }
.hero-card { border-radius: var(--radius); box-shadow: 0 1px 0 var(--line), 0 12px 30px rgba(12, 22, 49, .08); }
.eyebrow { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; color: var(--royal); font-weight: 600; }
.lede { font-size: 17.5px; }
.crumbs { font-family: var(--font-mono); font-size: 12px; }

/* Feature blocks: ruled spec entries instead of icon cards */
.card.feature { background: transparent; border: 0; border-top: 2px solid var(--text); border-radius: 0; padding: 16px 2px 8px; }
.card.feature .tile-ic { width: auto; height: auto; background: none; color: var(--royal); margin-bottom: 8px; justify-content: start; }
.card.feature .tile-ic .ic { width: 24px; height: 24px; stroke-width: 1.75; }
.card.feature h3 { font-size: 20px; font-weight: 600; }
a.card.feature:hover { border-top-color: var(--sky); }
a.card.feature:hover h3 { color: var(--royal); }
.steps-h li { border-radius: 0; border: 0; border-top: 2px solid var(--text); background: transparent; padding: 14px 2px; }
.steps-h li::before { background: none; color: var(--royal); width: auto; height: auto; display: block; font-family: var(--font-mono); font-size: 13px; content: "0" counter(st); margin-bottom: 6px; }
.section.alt { background: #eceef2; }
.prose { border-radius: var(--radius); }
.prose h2 { font-size: 23px; font-weight: 700; }
.toc a { border-left-width: 2px; }
.qa { border-radius: var(--radius-sm); }
.kb-cat h3 { font-size: 18px; }
.big-search input { border-radius: var(--radius-sm); box-shadow: none; height: 52px; }
table.t th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }

/* ---------- Dark header & footer (apps) ---------- */
.topbar { background: var(--ink); border-bottom: 1px solid var(--ink-line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar .title { color: #fff; font-family: var(--font-head); font-size: 19px; font-weight: 600; }
.topbar .icon-btn { color: #fff; }
.topbar .icon-btn:hover { background: var(--ink-2); }
.topbar .icon-btn .dot { border-color: var(--ink); background: var(--sky); }
.topbar .avatar { background: var(--ink-2); color: #fff; box-shadow: 0 0 0 1px var(--ink-line); }
.app-footer { background: var(--ink); color: var(--ink-mute); border-top: 0; max-width: none; }
.app-footer a { color: var(--ink-text); }
.app-footer a:hover { color: #fff; }
@media (max-width: 900px) {
  .tabbar { background: var(--ink); border-top: 1px solid var(--ink-line); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tabbar a, .tabbar button { color: var(--ink-mute); }
  .tabbar .active { color: #fff; box-shadow: inset 0 2px 0 var(--sky); }
  .tabbar .badge-dot { background: var(--sky); }
  .fab { border-radius: var(--radius); box-shadow: 0 8px 20px rgba(12, 22, 49, .3); }
}
.side-nav a { border-radius: var(--radius-sm); }
.side-nav a.active { box-shadow: inset 3px 0 0 var(--royal); }
.brandmark span { font-family: var(--font-mono); font-size: 10.5px; border-radius: 3px; }
.jcard { border-radius: var(--radius-sm); }
.jcard .ref { font-size: 12.5px; letter-spacing: .02em; }
.col { border-radius: var(--radius); }
.col-head { font-size: 15px; letter-spacing: .02em; }
.track .st { font-family: var(--font-head); font-size: 12.5px; letter-spacing: .02em; }
.auth-body { background: var(--bg); background-image: repeating-linear-gradient(135deg, transparent 0 22px, rgba(65, 105, 226, .05) 22px 23px); }
.auth-wrap .card { border-top: 4px solid var(--ink); }
.cookie-note { border-radius: var(--radius); border-left: 4px solid var(--sky); }
.doc { border-radius: 2px; }
@media (max-width: 640px) { .stat .value { font-size: 25px; white-space: nowrap; } }

/* =====================================================================
   v3: one standard typeface and one type scale everywhere; no decorative icons
   ===================================================================== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font);
  --font-mono: var(--font);
}
html, body, button, input, select, textarea { font-family: var(--font); }
body { font-size: 16px; line-height: 1.6; }
*, *::before, *::after { letter-spacing: normal !important; }
h1, h2, h3, h4, .h1, .h2, .h3, .display, .page-hero h1, .cta-band h2, .prose h2, .stat .value, .price-big { font-family: var(--font); font-weight: 700; line-height: 1.25; text-transform: none; }
h1, .h1, .display, .page-hero h1 { font-size: 36px; }
h2, .h2, .prose h2, .cta-band h2 { font-size: 26px; }
h3, .h3, .card.feature h3, .tile b, .kb-cat h3 { font-size: 19px; font-weight: 600; }
.card-head h2, .card-head h3, .topbar .title, .col-head, .sheet-head h2 { font-family: var(--font); font-size: 17px; font-weight: 600; }
.stat .value { font-size: 30px; }
p, li, dd, dt, td, .lede, .prose, .prose p, .prose li, .card.feature p, label, input, select, textarea, .btn, .btn-lg { font-size: 16px; }
.small, .muted.small, .faint, .sub, .stat .sub, .tile span, .crumbs, .badge, .chip, .btn-sm, table.t td, .item .s, .sf-bottom, .app-footer, .doc-meta, .field > span, .hint { font-size: 14px; }
.eyebrow, .section-title, .stat .label, table.t th, .sf-col h4, .side-nav .sect, .brandmark span, .jcard .ref, code, .mono, .track .st, .tabbar span { font-family: var(--font); font-size: 13px; text-transform: uppercase; }
.jcard .ref, code, .mono, .tabbar span, .track .st { text-transform: none; }
.tabbar span { font-size: 12px; }
@media (max-width: 640px) {
  h1, .h1, .display, .page-hero h1 { font-size: 30px; }
  h2, .h2, .prose h2, .cta-band h2 { font-size: 23px; }
  .stat .value { font-size: 24px; }
}
/* status leads become a slim colour bar instead of an icon square */
.item .lead { width: 4px !important; min-width: 4px; height: auto !important; align-self: stretch; border-radius: 2px; padding: 0; background: var(--line-2); }
.item .lead.orange { background: var(--warn, #b54708); }
.item .lead.green { background: var(--good); }
.item .lead.red { background: var(--bad); }
.item .lead.grey { background: var(--line); }
.sugg .lead { display: none; }
.card.feature { padding-top: 18px; }
.btn .ic, .tile .ic { display: none; }
.btn { gap: 0; }

/* v4: one bundled sans-serif typeface (Inter, SIL OFL) on every device */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root { --font: "Inter", "Helvetica Neue", Arial, sans-serif; --font-head: var(--font); --font-mono: var(--font); }
html, body, body * { font-family: var(--font) !important; }

/* =====================================================================
   v5: heroes. Dark navy band that continues from the header, with a
   faint corridor-map drawing (grid + dashed route + stops) behind it.
   ===================================================================== */
.home-hero, .page-hero {
  position: relative; overflow: hidden; color: #fff; border-bottom: 0;
  background-color: var(--ink);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='520' viewBox='0 0 900 520' fill='none'%3E%3Cpath d='M-20 430 C 160 400 230 300 380 300 S 600 360 690 230 S 820 70 940 60' stroke='%231e90ff' stroke-opacity='.55' stroke-width='2' stroke-dasharray='2 10' stroke-linecap='round'/%3E%3Cpath d='M-20 470 C 200 470 300 380 470 400 S 760 470 940 360' stroke='%23ffffff' stroke-opacity='.10' stroke-width='14' stroke-linecap='round'/%3E%3Cg fill='%230c1631' stroke='%231e90ff' stroke-width='2'%3E%3Ccircle cx='380' cy='300' r='6'/%3E%3Ccircle cx='690' cy='230' r='6'/%3E%3Ccircle cx='840' cy='86' r='6'/%3E%3C/g%3E%3Cg fill='%238b98ba' font-family='Arial,sans-serif' font-size='12' letter-spacing='1.5'%3E%3Ctext x='394' y='292'%3EMLOLONGO%3C/text%3E%3Ctext x='672' y='222' text-anchor='end'%3EATHI RIVER EPZ%3C/text%3E%3Ctext x='822' y='80' text-anchor='end'%3EKITENGELA%3C/text%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 900px 520px, 48px 48px, 48px 48px;
  background-position: right -60px bottom -40px, 0 0, 0 0;
  background-repeat: no-repeat, repeat, repeat;
}
.home-hero::before, .page-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(255,255,255,.08); }
.home-hero::after, .page-hero::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--sky) 0 22%, var(--royal) 22% 40%, transparent 40%); }

/* text on the dark band */
.home-hero .eyebrow, .page-hero .eyebrow { color: var(--sky); display: inline-flex; align-items: center; gap: 10px; }
.home-hero .eyebrow::before, .page-hero .eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--sky); }
.home-hero h1, .page-hero h1 { color: #fff; }
.home-hero .lede, .page-hero p { color: var(--ink-text); }
.home-hero .hl { color: var(--sky); white-space: nowrap; }
.page-hero .crumbs, .page-hero .crumbs a { color: var(--ink-mute); }
.page-hero .crumbs a:hover { color: #fff; }

/* buttons on dark */
.home-hero .btn:not(.btn-primary), .page-hero .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.home-hero .btn:not(.btn-primary):hover, .page-hero .btn:not(.btn-primary):hover { background: rgba(255,255,255,.08); border-color: #fff; }
.home-hero .btn-primary, .page-hero .btn-primary { background: var(--sky); border-color: var(--sky); }
.home-hero .btn-primary:hover, .page-hero .btn-primary:hover { background: #3aa0ff; }

/* home hero layout */
.home-hero { padding: 76px 0 0; }
.home-hero .grid-2 { align-items: center; gap: 56px; }
.home-hero .display { font-size: 52px; line-height: 1.08; margin: 14px 0 18px; }
.home-hero .lede { font-size: 18px; max-width: 540px; }
.hero-card { background: #fff; color: var(--text); border: 0; border-radius: 8px; padding: 22px; position: relative;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06); }
.hero-card::before { content: ""; position: absolute; left: 22px; right: 22px; top: -4px; height: 4px; background: var(--sky); border-radius: 4px 4px 0 0; }
.hc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.hc-head span { font-weight: 700; font-size: 15px; }
.hc-head a { font-size: 14px; font-weight: 600; }
.hero-card .tile { transition: border-color .15s, transform .15s; }
.hero-card .tile:hover { border-color: var(--sky); transform: translateY(-2px); }
.hero-card .tile b { font-size: 17px; }

/* stat strip along the bottom of the home hero */
.hero-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 64px 0 0; padding: 0; border-top: 1px solid rgba(255,255,255,.12); }
.hero-strip { background: linear-gradient(rgba(12,22,49,.88), rgba(12,22,49,.88)); }
.hero-strip > div { padding: 22px 20px 28px 0; }
.hero-strip > div + div { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.12); }
.hero-strip dt { font-size: 30px; font-weight: 700; color: #fff; line-height: 1.1; }
.hero-strip dd { margin: 4px 0 0; font-size: 14px; color: var(--ink-mute); }

/* inner page hero */
.page-hero { padding: 56px 0 52px; }
.page-hero h1 { font-size: 42px; line-height: 1.12; margin: 12px 0 12px; max-width: 820px; }
.page-hero p { font-size: 18px; max-width: 680px; }
.page-hero .crumbs { margin-bottom: 6px; }

/* the header sits flush on the hero, no seam */
.site-header { border-bottom-color: rgba(255,255,255,.06); }

@media (max-width: 900px) {
  .home-hero { padding-top: 44px; }
  .home-hero .grid-2 { gap: 32px; }
  .home-hero .display { font-size: 38px; }
  .hero-strip { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
  .hero-strip > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-strip > div:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.12); }
  .home-hero, .page-hero { background-size: 700px 404px, 40px 40px, 40px 40px; background-position: right -240px bottom -60px, 0 0, 0 0; }
}
@media (max-width: 640px) {
  .home-hero .display { font-size: 32px; }
  .home-hero .lede, .page-hero p { font-size: 16px; }
  .page-hero { padding: 36px 0 36px; }
  .page-hero h1 { font-size: 30px; }
  .hero-strip dt { font-size: 24px; }
  .hero-strip > div { padding: 16px 12px 20px 0; }
  .hero-strip > div + div { padding-left: 12px; }
  .hero-strip > div:nth-child(3) { padding-left: 0; }
}
.page-hero { background-size: 760px 439px, 48px 48px, 48px 48px; background-position: right 10px center, 0 0, 0 0; }
.home-hero { background-position: right -20px bottom -20px, 0 0, 0 0; }
@media (max-width: 900px) { .page-hero, .home-hero { background-size: 620px 358px, 40px 40px, 40px 40px; background-position: right -220px bottom -30px, 0 0, 0 0; } }
