/* =============================================================================
   Cargolane — static freight tracking site
   Colours are injected from config.js (theme) into these variables by site.js.
   The values here are fallbacks so the page still looks right on its own.
   ============================================================================= */

:root{
  --ink:      #16232b;
  --paper:    #f6f2ea;
  --accent:   #e08a2b;
  --accent-dark:#c06f18;
  --slate:    #5c6b73;

  --card:     #ffffff;
  --line:     #e4dccd;
  --ink-soft: #2c3a43;
  --ok:       #2f7d4f;

  --wrap: 1120px;
  --radius: 4px;
  --shadow: 0 1px 0 rgba(22,35,43,.04), 0 14px 40px -24px rgba(22,35,43,.45);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--paper);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; }

h1,h2,h3,h4{ font-family:var(--font-display); font-weight:600; line-height:1.1; letter-spacing:-.01em; margin:0; }

.wrap{ width:100%; max-width:var(--wrap); margin:0 auto; padding:0 24px; }

/* Grid/flex children default to min-width:auto, which makes them refuse to
   shrink below their content and overflow on small screens. Let them shrink. */
.hero-grid > *, .services-grid > *, .meta-grid > *, .cols > *, .about-grid > *,
.how-grid > *, .footer-top > *, .form-grid > *, .route > *, .stats .wrap > *,
.track-row > *, .summary-head > * { min-width:0; }
.section{ padding:88px 0; }
.eyebrow{
  font-family:var(--font-display); font-weight:500; font-size:.78rem;
  letter-spacing:.14em; text-transform:uppercase; color:var(--accent-dark);
  display:inline-block; margin-bottom:14px;
}
.lead{ color:var(--slate); font-size:1.05rem; max-width:60ch; }

/* ---- Buttons ------------------------------------------------------------- */
.btn{
  display:inline-flex; align-items:center; gap:.5rem;
  font-family:var(--font-display); font-weight:500; font-size:.95rem;
  padding:13px 22px; border-radius:var(--radius); border:1.5px solid transparent;
  cursor:pointer; text-decoration:none; transition:transform .12s ease, background .15s ease;
}
.btn:active{ transform:translateY(1px); }
.btn svg{ width:1.15em; height:1.15em; flex:none; }
.btn-accent{ background:var(--accent); color:#1c1206; }
.btn-accent:hover{ background:var(--accent-dark); color:#fff; }
.btn-ghost{ background:transparent; border-color:currentColor; }
.btn-ghost:hover{ background:var(--ink); color:var(--paper); border-color:var(--ink); }

/* ---- Header -------------------------------------------------------------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.site-header .wrap{ display:flex; align-items:center; gap:24px; height:72px; }
.brand{ display:flex; align-items:center; gap:11px; text-decoration:none; margin-right:auto; }
.brand-mark{
  width:34px; height:34px; border-radius:7px; background:var(--ink);
  display:grid; place-items:center; flex:none;
}
.brand-mark svg{ width:19px; height:19px; }
.brand-name{ font-family:var(--font-display); font-weight:700; font-size:1.15rem; letter-spacing:-.02em; }
.brand-logo{ height:34px; width:auto; }
.nav{ display:flex; gap:26px; }
.nav a{ text-decoration:none; font-size:.94rem; color:var(--ink-soft); font-weight:500; }
.nav a:hover{ color:var(--accent-dark); }
.header-cta{ font-size:.9rem; }
.nav-toggle{ display:none; background:none; border:0; font-size:1.5rem; cursor:pointer; color:var(--ink); }

/* ---- Hero ---------------------------------------------------------------- */
.hero{ position:relative; overflow:hidden; padding:76px 0 64px; }
.hero-grid{ display:grid; grid-template-columns:1.15fr .85fr; gap:56px; align-items:center; }
.hero h1{ font-size:clamp(2.3rem, 5vw, 3.6rem); margin:16px 0 20px; max-width:15ch; }
.hero p.lead{ font-size:1.12rem; }

/* tracking box — the operational centrepiece */
.track-box{
  margin-top:32px; background:var(--card); border:1px solid var(--line);
  border-radius:8px; box-shadow:var(--shadow); padding:22px;
}
.track-box label{ font-family:var(--font-display); font-weight:500; font-size:.82rem; letter-spacing:.1em; text-transform:uppercase; color:var(--slate); }
.track-row{ display:flex; gap:10px; margin-top:10px; }
.track-row input{
  flex:1; min-width:0; padding:14px 16px; font-size:1.05rem; font-family:var(--font-body);
  border:1.5px solid var(--line); border-radius:var(--radius); background:#fff; color:var(--ink);
}
.track-row input:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.track-hint{ margin:12px 0 0; font-size:.85rem; color:var(--slate); }
.track-error{ margin-top:12px; padding:11px 14px; border-radius:var(--radius); background:#fbe9e5; color:#8a2b16; font-size:.9rem; border:1px solid #f1c7bd; }

/* hero side visual — layered SVG route card, no stock photo */
.hero-visual{ position:relative; }
.route-card{
  background:var(--ink); color:var(--paper); border-radius:12px; padding:26px;
  box-shadow:var(--shadow); position:relative; overflow:hidden;
}
.route-card .rc-top{ display:flex; justify-content:space-between; align-items:center; font-family:var(--font-display); font-size:.8rem; letter-spacing:.12em; text-transform:uppercase; color:color-mix(in srgb, var(--paper) 62%, transparent); }
.route-card .rc-code{ font-family:var(--font-display); font-size:1.5rem; font-weight:700; margin:14px 0 22px; letter-spacing:-.01em; }
.rc-track{ display:flex; align-items:center; gap:0; margin:6px 0 22px; }
.rc-dot{ width:12px; height:12px; border-radius:50%; background:var(--accent); flex:none; }
.rc-dot.hollow{ background:transparent; border:2px solid color-mix(in srgb, var(--paper) 45%, transparent); }
.rc-seg{ height:2px; flex:1; background:color-mix(in srgb, var(--paper) 30%, transparent); }
.rc-seg.done{ background:var(--accent); }
.rc-meta{ display:grid; grid-template-columns:1fr 1fr; gap:16px 12px; }
.rc-meta div span{ display:block; font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color:color-mix(in srgb, var(--paper) 55%, transparent); }
.rc-meta div strong{ font-weight:500; font-size:.98rem; }
.hero-badge{
  position:absolute; bottom:-16px; left:-16px; background:var(--accent); color:#1c1206;
  font-family:var(--font-display); font-weight:600; font-size:.85rem; padding:12px 16px;
  border-radius:8px; box-shadow:var(--shadow); transform:rotate(-3deg);
}

/* ---- Stats band ---------------------------------------------------------- */
.stats{ background:var(--ink); color:var(--paper); }
.stats .wrap{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; padding-top:38px; padding-bottom:38px; }
.stat{ padding:6px 0; }
.stat b{ font-family:var(--font-display); font-size:2.1rem; font-weight:700; display:block; color:var(--accent); letter-spacing:-.02em; }
.stat span{ color:color-mix(in srgb, var(--paper) 70%, transparent); font-size:.92rem; }

/* ---- Section heading ----------------------------------------------------- */
.sec-head{ max-width:64ch; margin-bottom:44px; }
.sec-head h2{ font-size:clamp(1.8rem,3.4vw,2.5rem); margin:6px 0 14px; }

/* ---- Services (deliberately non-uniform bento) --------------------------- */
.services-grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:18px; }
.svc{
  background:var(--card); border:1px solid var(--line); border-radius:8px; padding:26px;
  grid-column:span 2; transition:border-color .15s ease, transform .15s ease;
}
.svc:hover{ border-color:var(--accent); transform:translateY(-3px); }
/* first two cards are wider to break the grid rhythm */
.svc:nth-child(1){ grid-column:span 3; }
.svc:nth-child(2){ grid-column:span 3; }
.svc-icon{ width:44px; height:44px; border-radius:9px; background:color-mix(in srgb, var(--accent) 16%, var(--paper)); display:grid; place-items:center; margin-bottom:16px; color:var(--accent-dark); }
.svc-icon svg{ width:22px; height:22px; }
.svc h3{ font-size:1.18rem; margin-bottom:8px; }
.svc p{ color:var(--slate); font-size:.95rem; margin:0; }

/* ---- How it works -------------------------------------------------------- */
.how{ background:#efe8da; }
.how-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:28px; counter-reset:step; }
.how-step{ position:relative; padding-top:14px; }
.how-step .num{
  font-family:var(--font-display); font-weight:700; font-size:1.1rem; color:#1c1206;
  width:42px; height:42px; border-radius:50%; background:var(--accent); display:grid; place-items:center; margin-bottom:18px;
}
.how-step h3{ font-size:1.25rem; margin-bottom:8px; }
.how-step p{ color:var(--slate); margin:0; }

/* ---- About (asymmetric split) -------------------------------------------- */
.about-grid{ display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:center; }
.about-copy p{ color:var(--ink-soft); }
.about-list{ list-style:none; padding:0; margin:22px 0 0; }
.about-list li{ display:flex; gap:12px; align-items:flex-start; padding:10px 0; border-top:1px solid var(--line); font-weight:500; }
.about-list li:first-child{ border-top:0; }
.check{ color:var(--ok); flex:none; width:1.15em; height:1.15em; margin-top:4px; }
.about-panel{
  background:var(--ink); color:var(--paper); border-radius:12px; padding:36px; box-shadow:var(--shadow);
}
.about-panel .big{ font-family:var(--font-display); font-size:3rem; font-weight:700; color:var(--accent); line-height:1; }
.about-panel p{ color:color-mix(in srgb, var(--paper) 75%, transparent); margin:10px 0 0; }
.about-panel hr{ border:0; border-top:1px solid color-mix(in srgb, var(--paper) 22%, transparent); margin:26px 0; }

/* ---- FAQ ----------------------------------------------------------------- */
.faq-list{ max-width:820px; margin:0 auto; }
.faq-item{ border-bottom:1px solid var(--line); }
.faq-q{
  width:100%; text-align:left; background:none; border:0; cursor:pointer;
  font-family:var(--font-display); font-weight:500; font-size:1.1rem; color:var(--ink);
  padding:22px 40px 22px 0; position:relative;
}
.faq-q::after{ content:"+"; position:absolute; right:6px; top:50%; transform:translateY(-50%); font-size:1.5rem; color:var(--accent-dark); transition:transform .2s ease; }
.faq-item.open .faq-q::after{ content:"–"; }
.faq-a{ max-height:0; overflow:hidden; transition:max-height .28s ease; color:var(--slate); }
.faq-a p{ margin:0 0 22px; max-width:70ch; }

/* ---- CTA strip ----------------------------------------------------------- */
.cta{ background:var(--accent); color:#1c1206; }
.cta .wrap{ display:flex; align-items:center; justify-content:space-between; gap:30px; flex-wrap:wrap; padding:56px 24px; }
.cta h2{ font-size:clamp(1.6rem,3vw,2.2rem); max-width:20ch; }
.cta .btn-ghost{ border-color:#1c1206; color:#1c1206; }
.cta .btn-ghost:hover{ background:#1c1206; color:var(--accent); border-color:#1c1206; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer{ background:var(--ink); color:color-mix(in srgb, var(--paper) 72%, transparent); padding:64px 0 30px; }
.footer-top{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; gap:34px; }
.footer-brand .brand-name{ color:var(--paper); }
.footer-brand p{ margin:16px 0 0; font-size:.92rem; max-width:34ch; }
.footer-col h4{ color:var(--paper); font-size:.82rem; letter-spacing:.1em; text-transform:uppercase; margin-bottom:14px; }
.footer-col ul{ list-style:none; padding:0; margin:0; }
.footer-col li{ margin:9px 0; }
.footer-col a{ text-decoration:none; font-size:.92rem; }
.footer-col a:hover{ color:var(--accent); }
.footer-bottom{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-top:44px; padding-top:22px; border-top:1px solid color-mix(in srgb, var(--paper) 16%, transparent); font-size:.85rem; }
.footer-bottom a{ color:var(--accent); text-decoration:none; }

/* =============================================================================
   TRACKING RESULT PAGE
   ============================================================================= */
.track-page{ padding:44px 0 80px; }
.mini-search{ display:flex; gap:10px; max-width:520px; margin-bottom:34px; }
.mini-search input{ flex:1; padding:12px 15px; border:1.5px solid var(--line); border-radius:var(--radius); font-size:1rem; background:#fff; }
.mini-search input:focus{ outline:none; border-color:var(--accent); }

.not-found{ background:var(--card); border:1px solid var(--line); border-radius:10px; padding:48px; text-align:center; box-shadow:var(--shadow); }
.not-found h2{ font-size:1.6rem; margin-bottom:10px; }
.not-found p{ color:var(--slate); max-width:46ch; margin:0 auto 22px; }

.latest{
  display:flex; gap:16px; align-items:flex-start; background:var(--ink); color:var(--paper);
  border-radius:10px; padding:22px 24px; box-shadow:var(--shadow);
}
.latest .bell{ width:40px; height:40px; border-radius:9px; background:var(--accent); color:#1c1206; display:grid; place-items:center; flex:none; }
.latest .bell svg{ width:20px; height:20px; }
.party .tel svg{ width:1em; height:1em; vertical-align:-1px; }
.latest span{ font-family:var(--font-display); font-size:.74rem; letter-spacing:.12em; text-transform:uppercase; color:color-mix(in srgb, var(--paper) 60%, transparent); }
.latest p{ margin:4px 0 0; font-size:1.05rem; }

.summary{ background:var(--card); border:1px solid var(--line); border-radius:10px; padding:28px; margin-top:22px; box-shadow:var(--shadow); }
.summary-head{ display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; border-bottom:1px solid var(--line); padding-bottom:20px; margin-bottom:22px; }
.summary-head h1{ font-size:1.5rem; display:flex; align-items:center; gap:10px; }
.badge{ font-family:var(--font-display); font-weight:500; font-size:.85rem; padding:8px 14px; border-radius:100px; display:inline-flex; align-items:center; gap:7px; }
.badge.delivered{ background:#e2f1e8; color:var(--ok); }
.badge.progress{ background:color-mix(in srgb, var(--accent) 18%, var(--paper)); color:var(--accent-dark); }
.badge .dot{ width:8px; height:8px; border-radius:50%; background:currentColor; }

.meta-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px 26px; }
.meta{ }
.meta dt{ font-size:.74rem; letter-spacing:.08em; text-transform:uppercase; color:var(--slate); margin-bottom:5px; }
.meta dd{ margin:0; font-weight:500; font-size:1.02rem; display:flex; align-items:center; gap:8px; }
.copy-btn{ background:none; border:1px solid var(--line); border-radius:5px; padding:3px 7px; cursor:pointer; color:var(--slate); font-size:.8rem; }
.copy-btn:hover{ border-color:var(--accent); color:var(--accent-dark); }
.auto-chip{ font-family:var(--font-display); font-size:.62rem; letter-spacing:.1em; text-transform:uppercase; background:color-mix(in srgb, var(--accent) 20%, var(--paper)); color:var(--accent-dark); padding:2px 7px; border-radius:100px; vertical-align:middle; }

.cols{ display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-top:22px; }
.panel{ background:var(--card); border:1px solid var(--line); border-radius:10px; padding:26px; box-shadow:var(--shadow); }
.panel h2{ font-size:1.15rem; display:flex; align-items:center; gap:9px; margin-bottom:20px; }
.panel h2 svg{ width:19px; height:19px; color:var(--accent-dark); }

/* from / to */
.route{ display:grid; grid-template-columns:1fr auto 1fr; gap:14px; align-items:start; }
.party .role{ font-size:.74rem; letter-spacing:.08em; text-transform:uppercase; color:var(--slate); }
.party .who{ font-weight:600; font-family:var(--font-display); margin:4px 0 2px; }
.party .addr{ color:var(--slate); font-size:.92rem; font-style:normal; }
.party .tel{ font-size:.9rem; margin-top:8px; }
.party .tel a{ color:var(--accent-dark); text-decoration:none; }
.route-arrow{ color:var(--accent); display:grid; place-items:center; padding-top:18px; }
.route-arrow svg{ width:26px; height:26px; }

/* map */
#map{ height:320px; width:100%; border-radius:8px; border:1px solid var(--line); background:#e9e4d8; z-index:1; }
.map-note{ font-size:.82rem; color:var(--slate); margin:12px 0 0; }
.map-legend{ display:flex; gap:20px; margin-top:12px; font-size:.85rem; color:var(--slate); }
.map-legend i{ width:22px; height:3px; border-radius:2px; display:inline-block; vertical-align:middle; margin-right:7px; }
.map-legend .done{ background:var(--accent); }
.map-legend .todo{ background:#9aa7ad; }

/* timeline */
.timeline{ list-style:none; margin:0; padding:0; position:relative; }
.timeline li{ position:relative; padding:0 0 26px 34px; }
.timeline li::before{ content:""; position:absolute; left:9px; top:4px; bottom:-4px; width:2px; background:var(--line); }
.timeline li:last-child::before{ display:none; }
.timeline .tl-dot{ position:absolute; left:0; top:2px; width:20px; height:20px; border-radius:50%; background:#fff; border:2px solid var(--line); display:grid; place-items:center; }
.timeline li.done .tl-dot{ background:var(--accent); border-color:var(--accent); color:#1c1206; }
.timeline li.current .tl-dot{ border-color:var(--accent); animation:tl-pulse 1.8s ease-out infinite; }
.timeline li.done::before, .timeline li.current::before{ background:var(--accent); }
/* Completed connectors get a subtle downward "flow" so progress feels alive. */
.timeline li.done::before{ background:linear-gradient(var(--accent),var(--accent) 55%,color-mix(in srgb,var(--accent) 55%,#fff) 55%,var(--accent)); background-size:100% 14px; animation:tl-flow 1.1s linear infinite; }
.tl-dot svg{ width:11px; height:11px; }
.tl-label{ font-family:var(--font-display); font-weight:500; }
.timeline li.upcoming .tl-label{ color:var(--slate); }
.tl-date{ font-size:.82rem; color:var(--slate); }

@keyframes tl-pulse{ 0%{ box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 45%,transparent); } 70%{ box-shadow:0 0 0 9px color-mix(in srgb,var(--accent) 0%,transparent); } 100%{ box-shadow:0 0 0 0 transparent; } }
@keyframes tl-flow{ to{ background-position:0 14px; } }

/* Entrance: steps fade/slide in with a small stagger when the panel loads. */
.timeline.animate-in li{ animation:tl-in .45s ease both; }
.timeline.animate-in li:nth-child(2){ animation-delay:.06s; }
.timeline.animate-in li:nth-child(3){ animation-delay:.12s; }
.timeline.animate-in li:nth-child(4){ animation-delay:.18s; }
.timeline.animate-in li:nth-child(5){ animation-delay:.24s; }
.timeline.animate-in li:nth-child(6){ animation-delay:.30s; }
.timeline.animate-in li:nth-child(7){ animation-delay:.36s; }
.timeline.animate-in li:nth-child(n+8){ animation-delay:.42s; }
@keyframes tl-in{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }

/* Map: marching-ants remaining route + pulsing current-position halo. */
.leaflet-overlay-pane .flow-line{ animation:map-dash 1s linear infinite; }
@keyframes map-dash{ to{ stroke-dashoffset:-14; } }
.leaflet-overlay-pane .cur-halo{ transform-box:fill-box; transform-origin:center; animation:map-halo 1.8s ease-out infinite; }
@keyframes map-halo{ 0%{ transform:scale(.7); opacity:.8; } 100%{ transform:scale(2.6); opacity:0; } }

@media (prefers-reduced-motion: reduce){
  .timeline li.current .tl-dot, .timeline li.done::before, .timeline.animate-in li,
  .leaflet-overlay-pane .flow-line, .leaflet-overlay-pane .cur-halo{ animation:none !important; }
}

/* actions */
.actions{ display:flex; gap:12px; flex-wrap:wrap; margin-top:22px; }

/* toast */
.toast{ position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:var(--ink); color:var(--paper); padding:12px 20px; border-radius:8px; opacity:0; pointer-events:none; transition:.25s ease; font-size:.9rem; z-index:100; }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

/* =============================================================================
   LEGAL + 404
   ============================================================================= */
.doc{ max-width:760px; margin:0 auto; padding:56px 0 80px; }
.doc h1{ font-size:2.2rem; margin-bottom:8px; }
.doc .updated{ color:var(--slate); font-size:.9rem; margin-bottom:34px; }
.doc p{ margin:0 0 18px; color:var(--ink-soft); }
.doc .back{ display:inline-block; margin-bottom:30px; color:var(--accent-dark); text-decoration:none; font-weight:500; }
.doc-nav{ display:flex; flex-wrap:wrap; gap:8px; margin:30px 0 0; }
.doc-nav a{ font-size:.85rem; padding:7px 13px; border:1px solid var(--line); border-radius:100px; text-decoration:none; color:var(--slate); }
.doc-nav a:hover, .doc-nav a.active{ border-color:var(--accent); color:var(--accent-dark); background:color-mix(in srgb, var(--accent) 10%, var(--paper)); }

.center-screen{ min-height:70vh; display:grid; place-items:center; text-align:center; padding:40px 24px; }
.center-screen .code{ font-family:var(--font-display); font-weight:700; font-size:6rem; color:var(--accent); line-height:1; }
.center-screen h1{ font-size:1.8rem; margin:10px 0; }
.center-screen p{ color:var(--slate); max-width:44ch; margin:0 auto 24px; }

/* =============================================================================
   ADMIN (offline shipment builder — its own back-office chrome)
   ============================================================================= */
.admin-body{ background:#eef0f2; }
.admin-bar{ background:var(--ink); color:var(--paper); }
.admin-bar .wrap{ display:flex; align-items:center; gap:16px; height:64px; }
.admin-bar .brand-name{ color:var(--paper); }
.admin-bar .admin-tag{ font-family:var(--font-display); font-size:.68rem; letter-spacing:.12em; text-transform:uppercase; background:var(--accent); color:#1c1206; padding:3px 8px; border-radius:5px; }
.admin-exit{ margin-left:auto; color:color-mix(in srgb, var(--paper) 78%, transparent); text-decoration:none; font-size:.9rem; font-weight:500; }
.admin-exit:hover{ color:var(--accent); }
.admin-actions{ flex-direction:row; gap:12px; margin-top:8px; flex-wrap:wrap; }

.admin-shell{ max-width:920px; margin:0 auto; padding:44px 24px 80px; }

/* control panel */
.cp-card{ background:var(--card); border:1px solid var(--line); border-radius:10px; padding:24px; margin-top:20px; box-shadow:var(--shadow); }
.cp-h{ font-family:var(--font-display); font-size:1.15rem; margin:0 0 16px; }
.cp-hint{ font-weight:400; text-transform:none; letter-spacing:0; color:var(--slate); font-size:.78rem; }
.cp-remember{ display:inline-flex; align-items:center; gap:8px; font-size:.9rem; color:var(--slate); margin:6px 0 16px; cursor:pointer; }
.cp-remember input{ width:16px; height:16px; }
.cp-msg{ font-size:.9rem; color:var(--slate); align-self:center; }
.cp-msg.bad{ color:#8a2b16; }
.cp-listhead{ display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:6px; }
.cp-listhead .cp-h{ margin:0; }
.cp-listactions{ display:flex; gap:10px; flex-wrap:wrap; }
.cp-list{ margin-top:14px; display:flex; flex-direction:column; gap:10px; }
.cp-row{ display:flex; align-items:center; gap:14px; padding:14px 16px; border:1px solid var(--line); border-radius:8px; background:var(--paper); }
.cp-row-main{ min-width:0; flex:1; }
.cp-track{ font-family:var(--font-display); font-weight:600; }
.cp-route{ font-size:.85rem; color:var(--slate); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cp-badge{ font-family:var(--font-display); font-size:.78rem; padding:5px 11px; border-radius:100px; background:color-mix(in srgb, var(--accent) 16%, var(--paper)); color:var(--accent-dark); white-space:nowrap; flex:none; }
.cp-badge.auto{ background:#e2f1e8; color:var(--ok); }
.cp-row-actions{ display:flex; gap:8px; flex:none; }
.btn.cp-sm{ padding:7px 13px; font-size:.85rem; }
.cp-del:hover{ background:#fbe9e5; border-color:#e0a99b; color:#8a2b16; }
.cp-empty{ color:var(--slate); text-align:center; padding:20px 0; }
.cp-save-note{ font-size:.88rem; color:var(--slate); margin:14px 0 0; }
.cp-save-note.bad{ color:#8a2b16; }
.cp-save-note.ok{ color:var(--ok); }
.btn.cp-attention{ box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }

/* stops (route) editor */
.stops-head{ display:grid; grid-template-columns:1.4fr 1.2fr 1.3fr 1.2fr 32px; gap:8px; font-size:.72rem; letter-spacing:.05em; text-transform:uppercase; color:var(--slate); margin-bottom:6px; padding:0 2px; }
.stops-list{ display:flex; flex-direction:column; gap:8px; margin-bottom:10px; }
.stop-row{ display:grid; grid-template-columns:1.4fr 1.2fr 1.3fr 1.2fr 32px; gap:8px; align-items:center; }
.stop-row input{ padding:9px 10px; border:1.5px solid var(--line); border-radius:var(--radius); font-size:.92rem; font-family:var(--font-body); background:#fff; color:var(--ink); min-width:0; }
.stop-row input:focus{ outline:none; border-color:var(--accent); }
.s-del{ width:32px; height:32px; border:1.5px solid var(--line); background:#fff; border-radius:6px; cursor:pointer; color:var(--slate); font-size:1.2rem; line-height:1; }
.s-del:hover{ border-color:#e0a99b; background:#fbe9e5; color:#8a2b16; }
@media (max-width:720px){
  .stops-head{ display:none; }
  .stop-row{ grid-template-columns:1fr 1fr; grid-auto-rows:auto; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--paper); position:relative; }
  .stop-row .s-place, .stop-row .s-note{ grid-column:1 / -1; }
  .stop-row .s-del{ position:absolute; top:8px; right:8px; width:26px; height:26px; }
}
.admin-note{ background:#efe8da; border:1px solid var(--line); border-left:4px solid var(--accent); padding:16px 18px; border-radius:6px; font-size:.92rem; margin-bottom:28px; }
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px 20px; }
.field{ display:flex; flex-direction:column; gap:6px; }
.field.full{ grid-column:1 / -1; }
.field label{ font-size:.8rem; letter-spacing:.05em; text-transform:uppercase; color:var(--slate); font-weight:500; }
.field input, .field select, .field textarea{ padding:11px 13px; border:1.5px solid var(--line); border-radius:var(--radius); font-size:.98rem; font-family:var(--font-body); background:#fff; color:var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color:var(--accent); }
.admin-out{ margin-top:26px; }
.admin-out textarea{ width:100%; min-height:230px; font-family:"SFMono-Regular",Consolas,monospace; font-size:.85rem; border:1.5px solid var(--line); border-radius:8px; padding:16px; background:#fbfaf7; color:var(--ink); }
.fieldset-title{ font-family:var(--font-display); font-weight:600; font-size:1.05rem; grid-column:1/-1; margin:14px 0 2px; padding-top:14px; border-top:1px solid var(--line); }
.fieldset-title:first-child{ border-top:0; padding-top:0; }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width:900px){
  .hero-grid{ grid-template-columns:1fr; gap:40px; }
  .stats .wrap{ grid-template-columns:repeat(2,1fr); }
  .services-grid{ grid-template-columns:repeat(2,1fr); }
  .svc, .svc:nth-child(1), .svc:nth-child(2){ grid-column:span 1; }
  .how-grid{ grid-template-columns:1fr; }
  .about-grid{ grid-template-columns:1fr; gap:34px; }
  .meta-grid{ grid-template-columns:repeat(2,1fr); }
  .cols{ grid-template-columns:1fr; }
  .footer-top{ grid-template-columns:1fr 1fr; gap:28px; }
  .form-grid{ grid-template-columns:1fr; }
}
@media (max-width:620px){
  .section{ padding:60px 0; }
  .nav, .header-cta{ display:none; }
  .nav-toggle{ display:block; }
  .site-header .wrap.nav-open{ height:auto; flex-wrap:wrap; padding-bottom:16px; }
  .site-header .wrap.nav-open .nav{ display:flex; flex-direction:column; gap:10px; flex-basis:100%; }
  .services-grid{ grid-template-columns:1fr; }
  .stats .wrap{ grid-template-columns:1fr 1fr; }
  .footer-top{ grid-template-columns:1fr; }
  .summary-head{ flex-direction:column; align-items:flex-start; }
  .route{ grid-template-columns:1fr; }
  .route-arrow{ transform:rotate(90deg); padding:6px 0; }
  .cp-row{ flex-wrap:wrap; }
  .cp-row-main{ flex-basis:100%; }
  .cp-row-actions{ margin-left:auto; }
}

/* =============================================================================
   PRINT — turns the tracking page into a clean receipt (Save as PDF)
   ============================================================================= */
/* =============================================================================
   RECEIPT — a clean branded document, hidden on screen, shown when printing.
   ============================================================================= */
.receipt{ display:none; color:#14202a; }
.receipt .rhead{ display:flex; justify-content:space-between; align-items:baseline; border-bottom:3px solid var(--ink); padding-bottom:12px; }
.receipt .rbrand{ font-family:var(--font-display); font-weight:700; font-size:1.5rem; letter-spacing:-.02em; }
.receipt .rtitle{ font-family:var(--font-display); text-transform:uppercase; letter-spacing:.14em; font-size:.8rem; color:#54636c; }
.receipt .rcode{ display:flex; justify-content:space-between; align-items:center; background:#f4f1ea; border:1px solid #e2dccd; border-radius:6px; padding:12px 16px; margin:18px 0; }
.receipt .rcode span{ text-transform:uppercase; letter-spacing:.1em; font-size:.72rem; color:#54636c; }
.receipt .rcode strong{ font-family:var(--font-display); font-size:1.4rem; letter-spacing:.02em; }
.receipt .rparties{ display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:18px; }
.receipt h4{ font-family:var(--font-display); text-transform:uppercase; letter-spacing:.1em; font-size:.7rem; color:#54636c; margin:0 0 6px; }
.receipt .rparties p{ margin:0; font-weight:600; }
.receipt .rmuted{ font-weight:400 !important; color:#54636c; font-size:.9rem; }
.receipt .rtable{ width:100%; border-collapse:collapse; margin-bottom:18px; }
.receipt .rtable th, .receipt .rtable td{ text-align:left; padding:7px 0; border-bottom:1px solid #e6e0d3; font-size:.92rem; }
.receipt .rtable th{ width:44%; color:#54636c; font-weight:500; }
.receipt .rroute ul{ list-style:none; margin:8px 0 0; padding:0; }
.receipt .rroute li{ display:flex; align-items:center; gap:10px; padding:4px 0; color:#8a949b; font-size:.92rem; }
.receipt .rroute li.rdone{ color:#14202a; font-weight:500; }
.receipt .rmark{ color:var(--accent-dark); width:14px; }
.receipt .rat{ margin-left:auto; color:#54636c; font-size:.82rem; }
.receipt .rfoot{ display:flex; justify-content:space-between; gap:12px; margin-top:22px; padding-top:12px; border-top:1px solid #e6e0d3; font-size:.78rem; color:#54636c; }

@media print{
  @page{ margin:14mm; }
  .site-header, .site-footer, .mini-search, .actions, .latest, .summary, .cols, #map, .map-legend, .map-note, .toast, .nav-toggle, .track-page > #result > *:not(.receipt){ display:none !important; }
  body{ background:#fff; }
  .track-page{ padding:0; }
  .receipt{ display:block !important; }
  a[href]::after{ content:""; }
}
