/* 00-fonts.css */
/* DM Sans — official TFS typeface (SIL OFL, licence in assets/fonts/DMSans-OFL.txt). Two weights only: Regular + Bold. */
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400;font-display:swap;src:url('../assets/fonts/dmsans-regular.woff2') format('woff2')}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:700;font-display:swap;src:url('../assets/fonts/dmsans-bold.woff2') format('woff2')}

/* 01-base.css */
/* ==========================================================================
   Tokens — official TFS Brandbook 2.0 (01 Branding/Brandbook TFS/03 Colores)
   Balance: ~70% white/light, 20% carbon, 10% Freight Red.
   Red is for primary actions and accents; never red body text on carbon.
   ========================================================================== */
:root {
  --red: #C21E23;          /* Freight Red */
  --red-700: #A1191D;      /* hover / pressed (Freight Red, darker) */
  --red-50: #FBECEC;
  --ink: #252326;          /* Carbon */
  --steel: #4E5257;        /* body copy on white (darker Steel for long text) */
  --slate: #63686D;        /* Steel, one step darker for text: 5.6:1 on white, 5.0:1 on Light */
  --concrete: #F0F1F2;     /* Light — quiet panels and bands */
  --line: #D9DADC;
  --line-strong: #B9BCBF;
  --white: #FFFFFF;

  --ok: #176A4A;    --ok-50: #E7F2EC;     /* Success */
  --info: #245EA8;  --info-50: #E9F0F9;   /* Information + keyboard focus */
  --warn: #865900;  --warn-50: #FBF2E1;   /* Warning */
  --danger: #9F2634;--danger-50: #FAEBED; /* Error */

  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font-body);

  /* type scale — brand: headings 32–56 px, body 16–18 px / 1.5, labels 14 px */
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.875rem;    /* 14 labels */
  --fs-base: 1.0625rem; /* 17 body */
  --fs-md: 1.25rem;     /* 20 */
  --fs-lg: 1.5rem;      /* 24 */
  --fs-xl: clamp(2rem, 1.7rem + 1.1vw, 2.5rem);     /* 32–40 */
  --fs-2xl: clamp(2.25rem, 1.7rem + 2.2vw, 3.5rem); /* 36–56 */

  --container: 1280px;
  --gutter: 16px;
  --section: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --radius: 4px;
  --radius-lg: 8px;
  --logo-h: 44px;       /* header logo height (client request: compact header) */
  --header-h: 64px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 150ms;
  --t: 220ms;
  --focus: 0 0 0 2px var(--white), 0 0 0 5px var(--info);   /* brand: visible blue focus */
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --logo-h: 52px; --header-h: 76px; } }

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
picture img { width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--red); }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 700; }
main:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 2px; }
::selection { background: var(--red); color: var(--white); }
html { scrollbar-color: var(--line-strong) transparent; accent-color: var(--red); }
input, textarea { caret-color: var(--red); }
.num, .track-summary dd, .creds dd, .site-footer__contact { font-variant-numeric: tabular-nums; }
/* links on dark surfaces: never red text on carbon (brand rule) */
.cta-band a:not(.btn):hover, .page-hero a:not(.btn):hover, .hero a:not(.btn):hover { color: var(--white); text-decoration-thickness: 2px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--radius); text-decoration: none; }
.skip-link:focus, .skip-link:hover { top: 12px; color: var(--white); }
.tbc { color: var(--slate); font-style: italic; }
.lead { font-size: var(--fs-md); line-height: 1.5; color: var(--steel); max-width: 62ch; }
.muted { color: var(--slate); }
.measure { max-width: 68ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* 02-layout.css */
/* ==========================================================================
   Header + navigation (sticky)
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, .93);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
}
body.nav-open .site-header::before { background: var(--white); }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 2px 12px rgba(34, 34, 36, .06); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.site-header__logo { flex: none; display: block; }
body.nav-open .site-header { transform: none; }
.site-header__logo img { height: var(--logo-h); width: auto; }

.nav-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--white); color: var(--ink); font: 700 var(--fs-sm)/1 var(--font-body); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px;
  transition: transform var(--t) var(--ease), opacity var(--t-fast);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* mobile panel */
.site-nav {
  position: fixed; inset: var(--header-h) 0 0 0; background: var(--white);
  padding: 8px var(--gutter) 32px; overflow-y: auto;
  border-top: 1px solid var(--line);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
}
.site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.site-nav__list { list-style: none; }
.site-nav__item { border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; }
.site-nav__link {
  flex: 1; display: flex; align-items: center; min-height: 56px;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); text-decoration: none; color: var(--ink);
}
.site-nav__link[aria-current="page"] { color: var(--red); }
.site-nav__sub-toggle {
  width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: var(--radius);
}
.site-nav__sub-toggle svg { transition: transform var(--t) var(--ease); }
.site-nav__sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-nav__sub { list-style: none; flex-basis: 100%; display: none; padding: 0 0 12px 12px; }
.has-sub.is-open .site-nav__sub { display: block; }
.site-nav__sub a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--steel); }
.site-nav__sub a:hover, .site-nav__sub a[aria-current="page"] { color: var(--red); }
.site-nav__actions { display: grid; gap: 12px; margin-top: 24px; }
.site-nav__login {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); text-decoration: none; font-weight: 700;
}
.site-nav__login[aria-current="page"] { border-color: var(--ink); }
body.nav-open { overflow: hidden; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; visibility: visible; opacity: 1; transform: none; transition: none;
    display: flex; align-items: center; flex: 1; padding: 0; border: 0; overflow: visible; background: none;
  }
  .site-nav__list { display: flex; gap: 4px; margin-left: 24px; }
  .site-nav__item { border: 0; position: relative; flex-wrap: nowrap; }
  .site-nav__link {
    min-height: 44px; padding: 0 12px; font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700;
    position: relative;
  }
  .site-nav__link::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--red);
    transform: scaleX(0); transform-origin: left; transition: transform var(--t) var(--ease);
  }
  .site-nav__link:hover { color: var(--ink); }
  .site-nav__link:hover::after, .site-nav__link[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav__link[aria-current="page"] { color: var(--ink); }
  .has-sub .site-nav__link { padding-right: 2px; }
  .site-nav__sub-toggle { width: 28px; height: 44px; }
  .site-nav__sub {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; padding: 8px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(34, 34, 36, .12);
    display: block; visibility: hidden; opacity: 0; transform: translateY(-4px);
    transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility 0s linear var(--t-fast);
  }
  .site-nav__sub::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
  .has-sub:hover .site-nav__sub, .has-sub.is-open .site-nav__sub, .has-sub:focus-within .site-nav__sub {
    visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
  }
  .site-nav__sub a { padding: 0 12px; border-radius: var(--radius); font-size: var(--fs-sm); font-weight: 400; }
  .site-nav__sub a:hover { background: var(--concrete); }
  .site-nav__actions { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; }
  .site-nav__login { border: 0; padding: 0 12px; font-size: var(--fs-sm); min-height: 44px; }
  .site-nav__login:hover { color: var(--red); }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section); }
.section--band { background: var(--concrete); }
.section--tight { padding-block: calc(var(--section) * .6); }
.section__head { max-width: 720px; margin-bottom: clamp(2rem, 1.5rem + 1.5vw, 3rem); }
.section__head p { color: var(--steel); font-size: var(--fs-md); line-height: 1.5; margin: 0; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: end; justify-content: space-between; }
.section__head--row > div { max-width: 640px; }

/* Interior page hero: photo + title */
.page-hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.page-hero__media { position: absolute; inset: 0; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20, 20, 22, .86) 0%, rgba(20, 20, 22, .6) 55%, rgba(20, 20, 22, .2) 100%);
}
.page-hero__body { position: relative; padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); max-width: 720px; }
.page-hero h1 { color: var(--white); margin-bottom: .35em; }
.page-hero p { color: rgba(255, 255, 255, .88); font-size: var(--fs-md); line-height: 1.5; margin: 0; max-width: 56ch; }
.page-hero .btn-row { margin-top: 28px; }

/* Plain page header (forms, legal) */
.page-head { background: var(--white) url('/assets/brand/coordinates-light.svg') repeat left top / 600px auto; border-bottom: 1px solid var(--line); padding-block: clamp(2.5rem, 2rem + 2.5vw, 4rem); }
.page-head h1 { font-size: var(--fs-xl); margin-bottom: .3em; }
.page-head p { margin: 0; color: var(--steel); font-size: var(--fs-md); max-width: 62ch; line-height: 1.5; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-sm); color: var(--slate); margin-bottom: 14px; }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--slate); }
.page-hero .breadcrumb, .page-hero .breadcrumb a { color: rgba(255, 255, 255, .78); }
.page-hero .breadcrumb li + li::before { color: rgba(255, 255, 255, .4); }

/* Split: media + copy */
.split { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-copy { grid-template-columns: 5fr 6fr; }
  .split--reverse > :first-child { order: 2; }
}
.split__media { border-radius: var(--radius-lg); overflow: hidden; }
.split__media img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--concrete); border-top: 4px solid var(--red); padding-top: clamp(3rem, 2rem + 3vw, 4.5rem); font-size: var(--fs-sm); }
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.site-footer__brand { grid-column: 1 / -1; max-width: 360px; }
.site-footer__brand img { width: 148px; height: auto; margin-bottom: 18px; }
.site-footer__brand p { color: var(--steel); }
.site-footer__title { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700; color: var(--ink); margin: 0 0 12px; letter-spacing: 0; }
.site-footer__col ul { list-style: none; display: grid; gap: 2px; }
.site-footer__col a { display: inline-flex; align-items: center; min-height: 36px; color: var(--steel); text-decoration: none; }
.site-footer__col a:hover { color: var(--red); text-decoration: underline; }
.site-footer__contact li { display: grid; padding: 4px 0; color: var(--steel); }
.site-footer__contact span { font-size: var(--fs-xs); color: var(--slate); }
.site-footer__contact a { min-height: 32px; }
.site-footer__reg { white-space: nowrap; margin-left: 8px; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-block: 20px; border-top: 1px solid var(--line); color: var(--slate);
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom ul { list-style: none; display: flex; gap: 20px; }
.site-footer__bottom a { color: var(--slate); display: inline-flex; min-height: 44px; align-items: center; }
.site-footer__credit { margin: 0; padding-bottom: 20px; font-size: var(--fs-xs); color: var(--slate); }
.site-footer__credit a { color: var(--slate); text-decoration: none; }
.site-footer__credit a:hover { color: var(--red); }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1.6fr repeat(4, 1fr); }
  .site-footer__brand { grid-column: auto; }
}
@media (max-width: 719px) { .page-head { background-image: none; background-color: var(--concrete); } }


/* ==========================================================================
   Utility bar (desktop): phone, quick tools and portal logins above the nav
   ========================================================================== */
.utility { display: none; background: var(--ink); color: var(--white); font-size: var(--fs-sm); }
@media (min-width: 1024px) { .utility { display: block; } }
.utility__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.utility__list { list-style: none; display: flex; gap: 4px 24px; }
.utility a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: rgba(255, 255, 255, .86); text-decoration: none; }
.utility a svg { color: var(--red); flex: none; }
.utility a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
/* portal logins live in the utility bar on desktop; the mobile menu keeps them */
@media (min-width: 1024px) {
  .site-nav__login { display: none; }
  .site-nav__link { font-size: var(--fs-base); padding: 0 14px; }
  .site-nav__list { margin-left: 32px; gap: 2px; }
}
/* section headings carry a short Freight Red bar (accent, 10% of the palette) */
.section__head h2::before, .accent-bar::before { content: ''; display: block; width: 40px; height: 4px; margin-bottom: 18px; background: var(--red); border-radius: 1px; }
.site-footer__bottom p { max-width: 90ch; }

/* ==========================================================================
   Services mega-menu (Schneider / J.B. Hunt pattern)
   ========================================================================== */
.mega__title { margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--slate); }
.mega ul { list-style: none; }
.mega__services a { display: grid; gap: 2px; padding: 10px 0; text-decoration: none; color: var(--ink); min-height: 44px; }
.mega__services a span { font-size: var(--fs-sm); color: var(--steel); }
.mega__services a:hover strong, .mega__services a[aria-current="page"] strong { color: var(--red); }
.mega__all a, .mega__tools a { display: flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--ink); }
.mega__track { display: none; }
@media (max-width: 1023px) {
  .site-nav__sub.mega { padding: 0 0 16px 12px; }
  .mega__col + .mega__col { margin-top: 8px; }
  .mega__tools { display: none; }               /* the mobile menu already lists these */
  .mega__col:nth-child(2) .mega__title { display: none; }
}
@media (min-width: 1024px) {
  .site-nav__sub.mega {
    display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 28px; width: min(860px, 80vw); padding: 24px;
    left: -24px;
  }
  .site-nav__sub.mega a { padding: 0; border-radius: 0; font-size: inherit; font-weight: inherit; }
  .site-nav__sub.mega a:hover { background: none; }
  .mega__services li + li { border-top: 1px solid var(--line); }
  .mega__services a { padding: 12px 0; font-size: var(--fs-base); }
  .mega__all a, .mega__tools a { font-weight: 700 !important; font-size: var(--fs-sm) !important; }
  .mega__all a:hover, .mega__tools a:hover { color: var(--red); text-decoration: underline; }
  .mega__track {
    display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--radius-lg);
    background: var(--ink) url('/assets/brand/trajectory-dark.svg') no-repeat right -80px bottom -60px / 320px auto; color: var(--white);
  }
  .mega__track-title { margin: 0; font-weight: 700; font-size: var(--fs-md); }
  .mega__track p:last-child { margin: 0; font-size: var(--fs-xs); color: rgba(255, 255, 255, .78); }
  .mega__track .input { min-height: 44px; }
}

/* Footer quick links (Schneider pattern) */
.footer-quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 40px; }
@media (min-width: 900px) { .footer-quick { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.footer-quick a {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 14px 18px; border-radius: var(--radius-lg);
  background: var(--white); border: 1px solid var(--line); font-weight: 700; text-decoration: none; color: var(--ink);
  transition: border-color var(--t-fast) var(--ease);
}
.footer-quick a svg { color: var(--red); flex: none; }
.footer-quick a:hover { border-color: var(--ink); color: var(--ink); }

/* 03-components.css */
/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  font: 700 var(--fs-sm)/1 var(--font-body); letter-spacing: .01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 2px solid transparent; border-radius: var(--radius);
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-700); color: var(--white); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: #000; color: var(--white); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .7); color: var(--white); background: transparent; }
.btn--ghost-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--sm { min-height: 40px; padding: 0 16px; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: var(--fs-base); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.btn .spinner { 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; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-weight: 700; color: var(--ink); text-decoration: none;
}
.link-arrow svg { transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover { color: var(--red); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ==========================================================================
   Service cards
   ========================================================================== */
.service-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.service-card__media { position: relative; overflow: hidden; }
.service-card__media img { aspect-ratio: 3 / 2; object-fit: cover; transition: transform 300ms var(--ease); }
.service-card:hover .service-card__media img { transform: scale(1.03); }
.service-card__body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.service-card h3 { font-size: var(--fs-lg); margin-bottom: 10px; }
.service-card p { color: var(--steel); }
.service-card__actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 8px; }

/* ==========================================================================
   Feature list (Why TFS, service details)
   ========================================================================== */
.feature-list { list-style: none; display: grid; gap: 0; }
.feature-list li { display: grid; grid-template-columns: 28px 1fr; gap: 4px 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list svg { color: var(--red); margin-top: 3px; }
.feature-list h3 { font-size: var(--fs-md); margin: 0 0 4px; }
.feature-list p { margin: 0; color: var(--steel); }

.check-list { list-style: none; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
  content: ''; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red); transform: rotate(-45deg);
}

/* ==========================================================================
   Steps (How it works — a real sequence)
   ========================================================================== */
.steps { list-style: none; display: grid; gap: 0; counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding: 0 0 28px 64px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px;
  display: grid; place-items: center; background: var(--ink); color: var(--white);
  font: 700 var(--fs-md)/1 var(--font-display);
  border-radius: var(--radius);
}
.steps li::after { content: ''; position: absolute; left: 21px; top: 52px; bottom: 8px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li:last-child { padding-bottom: 0; }
.steps h3 { font-size: var(--fs-md); margin: 8px 0 6px; }
.steps p { margin: 0; color: var(--steel); }
@media (min-width: 960px) {
  .steps--row { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .steps--row li { padding: 64px 0 0; }
  .steps--row li::after { left: 56px; right: -16px; top: 21px; bottom: auto; width: auto; height: 2px; }
  .steps--row li:last-child::after { display: none; }
  .steps--row li:first-child::before { background: var(--red); }
  .steps--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Notices, badges
   ========================================================================== */
.notice {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 16px 18px;
  border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--concrete); font-size: var(--fs-sm);
}
.notice svg { margin-top: 2px; }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice strong { color: var(--ink); }
.notice--info { background: var(--info-50); border-color: #c5d6eb; color: #183f6b; }
.notice--warn { background: var(--warn-50); border-color: #ecd3a2; color: #5e3e00; }
.notice--ok { background: var(--ok-50); border-color: #bcdcc8; color: #154d2c; }
.notice--danger { background: var(--danger-50); border-color: #efc2c4; color: #7c1215; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.4; background: var(--concrete); color: var(--steel); border: 1px solid var(--line);
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--demo { background: var(--warn-50); color: var(--warn); border-color: #ecd3a2; }
.badge--transit { background: var(--info-50); color: var(--info); border-color: #c5d6eb; }
.badge--ok { background: var(--ok-50); color: var(--ok); border-color: #bcdcc8; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band { background: var(--ink) url('/assets/brand/trajectory-dark.svg') no-repeat right -6vw center / auto 160%; color: var(--white); position: relative; overflow: hidden; }
/* phones: the curve sits below the copy, never behind it */
@media (max-width: 719px) { .cta-band__inner { padding-bottom: 150px; } }
@media (min-width: 720px) and (max-width: 899px) { .cta-band { background-position: right -40vw center; } }
.cta-band__inner { position: relative; display: grid; gap: 24px; padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.cta-band h2 { color: var(--white); font-size: var(--fs-xl); margin: 0 0 8px; }
.cta-band p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 52ch; font-size: var(--fs-md); line-height: 1.5; }
/* brand composition: content on the quiet left area, Trajectory curve on the right */
.cta-band__inner > * { max-width: 620px; }
@media (min-width: 900px) { .cta-band__inner { padding-right: 40%; } }

/* ==========================================================================
   Accordion (FAQ)
   ========================================================================== */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding: 14px 0; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); line-height: 1.25;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ''; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translateY(-3px); transition: transform var(--t) var(--ease);
}
.accordion details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.accordion summary:hover { color: var(--red); }
.accordion__body { padding: 0 0 22px; color: var(--steel); max-width: 72ch; }
.accordion__body p:last-child { margin: 0; }

/* ==========================================================================
   Tabs
   ========================================================================== */
.tabs__list { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; }
.tabs__tab {
  position: relative; min-height: 48px; padding: 0 18px; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font: 700 var(--fs-sm)/1 var(--font-body); color: var(--slate);
}
.tabs__tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--red); transform: scaleX(0); transition: transform var(--t) var(--ease); }
.tabs__tab[aria-selected="true"] { color: var(--ink); }
.tabs__tab[aria-selected="true"]::after { transform: scaleX(1); }
.tabs__tab:hover { color: var(--ink); }
.tabs__panel[hidden] { display: none; }
.tabs__panel { animation: fade-in var(--t) var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Timeline (tracking)
   ========================================================================== */
.timeline { list-style: none; position: relative; }
.timeline li { position: relative; padding: 0 0 22px 34px; }
.timeline li::before {
  content: ''; position: absolute; left: 5px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--line-strong);
}
.timeline li::after { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.is-done::before { background: var(--ink); border-color: var(--ink); }
.timeline li.is-current::before { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 4px var(--red-50); }
.timeline li.is-pending { color: var(--slate); }
.timeline__title { font-weight: 700; display: block; }
.timeline__meta { font-size: var(--fs-sm); color: var(--slate); }

/* Generic content card */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); }
.panel--band { background: var(--concrete); }

/* Legal / long-form prose */
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--fs-lg); margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; margin-bottom: 1em; }
.prose li { margin-bottom: .4em; }

.link-inline { display: inline; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-inline:hover { color: var(--red); }

/* 04-public.css */
/* ==========================================================================
   Home hero — real TFS tractor photo, headline, quick actions
   ========================================================================== */
.hero { position: relative; background: var(--ink); color: var(--white); }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 18, 20, .88) 0%, rgba(18, 18, 20, .66) 42%, rgba(18, 18, 20, .08) 78%),
    linear-gradient(0deg, rgba(18, 18, 20, .55) 0%, rgba(18, 18, 20, 0) 40%);
}
.hero__body { position: relative; padding-top: clamp(4rem, 2rem + 8vw, 8.5rem); padding-bottom: clamp(9rem, 6rem + 8vw, 12rem); }
.hero h1 {
  color: var(--white); max-width: 15ch; margin-bottom: 20px;
  font-size: var(--fs-2xl); line-height: 1.06;
}
.hero__sub { max-width: 46ch; font-size: var(--fs-md); line-height: 1.5; color: rgba(255, 255, 255, .9); margin-bottom: 32px; }

/* Quick actions panel overlapping the hero edge */
.quick { position: relative; z-index: 2; margin-top: calc(clamp(9rem, 6rem + 8vw, 12rem) * -1 + 40px); }
.quick__card {
  background: var(--white); color: var(--ink); border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgba(18, 18, 20, .18); border: 1px solid var(--line); overflow: hidden;
}
.quick__tabs { display: flex; border-bottom: 1px solid var(--line); }
.quick__tab {
  position: relative; flex: 1; min-height: 56px; border: 0; background: var(--concrete); cursor: pointer;
  font: 700 var(--fs-md)/1 var(--font-display); color: var(--slate); padding: 0 20px; text-align: left;
  display: flex; align-items: center; gap: 10px;
}
.quick__tab + .quick__tab { border-left: 1px solid var(--line); }
.quick__tab[aria-selected="true"] { background: var(--white); color: var(--ink); }
.quick__tab[aria-selected="true"]::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--red);
}
@media (min-width: 720px) { .quick__tab { flex: none; padding: 0 28px; } }
.quick__panel { padding: 22px 20px 24px; }
@media (min-width: 720px) { .quick__panel { padding: 26px 28px 28px; } }
.quick__form { display: grid; gap: 14px; align-items: end; }
@media (min-width: 720px) { .quick__form--quote { grid-template-columns: 1fr 1fr 1fr; } .quick__form--quote .btn { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .quick__form--quote { grid-template-columns: 1fr 1fr 1fr auto; } .quick__form--quote .btn { grid-column: auto; } }
@media (min-width: 720px) { .quick__form--track { grid-template-columns: 1fr auto; } }
.quick__hint { margin: 12px 0 0; font-size: var(--fs-sm); color: var(--slate); }
.quick__hint a { color: var(--ink); font-weight: 700; }

/* ==========================================================================
   Home sections
   ========================================================================== */
.why__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.why__media img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 899px) { .why__media img { aspect-ratio: 16 / 10; } }

.track-band { background: var(--concrete); }
.track-band__grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .track-band__grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.track-band h2 { margin-bottom: 10px; }
.track-band p { color: var(--steel); margin: 0; max-width: 50ch; }
.track-form { display: grid; gap: 12px; }
@media (min-width: 560px) { .track-form { grid-template-columns: 1fr auto; align-items: end; } }
.track-form .field { margin: 0; }
.track-band__links { margin-top: 12px; font-size: var(--fs-sm); color: var(--slate); }
.track-band__links a { color: var(--ink); font-weight: 700; }

/* ==========================================================================
   Service detail pages
   ========================================================================== */
.detail-grid { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); }
@media (min-width: 960px) { .detail-grid { grid-template-columns: 7fr 5fr; align-items: start; } }
.detail-grid h2 { font-size: var(--fs-lg); }
.detail-aside { display: grid; gap: 20px; }
@media (min-width: 960px) { .detail-aside { position: sticky; top: calc(var(--header-h) + 24px); } }
.detail-aside h2 { font-size: var(--fs-md); margin-bottom: 12px; }
.detail-aside p { color: var(--steel); font-size: var(--fs-sm); }
.audience { display: grid; gap: 12px; }
@media (min-width: 640px) { .audience { grid-template-columns: 1fr 1fr; } }
.audience li { list-style: none; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.audience strong { display: block; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; margin-bottom: 2px; }
.audience span { color: var(--steel); font-size: var(--fs-sm); }

/* Services overview rows */
.service-rows { display: grid; gap: clamp(3rem, 2rem + 3vw, 5rem); }
.service-row h2 { font-size: var(--fs-xl); }
.service-row p { color: var(--steel); }
.service-row .check-list { margin: 20px 0 28px; }

/* Values (About) */
.values { display: grid; gap: 0; list-style: none; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .values { grid-template-columns: repeat(2, 1fr); column-gap: 48px; } }
.values li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.values h3 { margin: 0 0 6px; font-size: var(--fs-md); }
.values p { margin: 0; color: var(--steel); }

/* Contact */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 7fr 4fr; align-items: start; } }
.contact-list { list-style: none; display: grid; gap: 18px; }
.contact-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.contact-list .icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--concrete); display: grid; place-items: center; color: var(--red); }
.contact-list span { display: block; font-size: var(--fs-xs); color: var(--slate); }
.contact-list a { font-weight: 700; text-decoration: none; }

/* Track page result */
.track-result { margin-top: 32px; }
.track-summary { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin: 20px 0 28px; }
@media (min-width: 720px) { .track-summary { grid-template-columns: repeat(4, 1fr); } }
.track-summary div { padding: 14px 16px; background: var(--concrete); border-radius: var(--radius); }
.track-summary dt { font-size: var(--fs-xs); color: var(--slate); }
.track-summary dd { margin: 2px 0 0; font-weight: 700; }
.track-result__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.track-result__head h2 { margin: 0; font-size: var(--fs-lg); }

/* 404 */
.not-found { padding-block: clamp(4rem, 3rem + 6vw, 8rem); }
.not-found h1 { font-size: var(--fs-2xl); }

/* Mobile hero: let the truck show above the headline */
@media (max-width: 719px) {
  .hero__media img { object-position: 84% 50%; }
  .hero__media::after { background: linear-gradient(0deg, rgba(18, 18, 20, .94) 0%, rgba(18, 18, 20, .86) 52%, rgba(18, 18, 20, .15) 82%); }
  .hero__body { padding-top: 15rem; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .page-hero__media::after { background: linear-gradient(0deg, rgba(20, 20, 22, .9) 0%, rgba(20, 20, 22, .72) 100%); }
}

/* Background photos fill their box at every size */
.hero__media picture, .page-hero__media picture { position: absolute; inset: 0; }
.hero__media picture img, .page-hero__media picture img { height: 100%; }

/* Commodities (freight page) */
.commodities { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .commodities { grid-template-columns: repeat(3, 1fr); } }
.commodities li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.commodities li::before { content: ''; flex: none; width: 8px; height: 8px; background: var(--red); border-radius: 1px; }

/* Credentials strip (about) */
.creds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .creds { grid-template-columns: repeat(4, 1fr); } }
.creds div { padding: 20px 16px 20px 0; }
@media (min-width: 900px) { .creds div + div { border-left: 1px solid var(--line); padding-left: 24px; } }
.creds dt { font-size: var(--fs-xs); color: var(--slate); }
.creds dd { margin: 4px 0 0; font: 700 var(--fs-lg)/1.15 var(--font-display); }

/* Fleet gallery (about) */
.fleet-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.fleet-grid figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; }
.fleet-grid img { aspect-ratio: 4 / 3; object-fit: cover; height: 100%; }
.fleet-grid__wide { grid-column: 1 / -1; }
.fleet-grid__wide img { aspect-ratio: 16 / 9; }
@media (min-width: 900px) {
  .fleet-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .fleet-grid__wide { grid-column: span 2; grid-row: span 2; }
  .fleet-grid__wide img { aspect-ratio: auto; }
}

/* ==========================================================================
   Home additions: 3-tab quick panel, credentials bar, freight we haul, audiences
   ========================================================================== */
.quick__tab { flex: 1 1 0; justify-content: center; text-align: center; padding: 0 12px; font-size: var(--fs-base); }
@media (min-width: 720px) { .quick__tab { flex: none; justify-content: flex-start; padding: 0 28px; font-size: var(--fs-md); } }
.quick__book { display: grid; gap: 16px; align-items: center; }
.quick__book p { margin: 0; color: var(--steel); max-width: 60ch; }
@media (min-width: 1024px) { .quick__book { grid-template-columns: 1fr auto; } }

.creds-bar { padding-block: 28px 8px; }
.creds-bar__list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.creds-bar__list li { display: grid; gap: 2px; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) {
  .creds-bar__list { grid-template-columns: repeat(5, auto); justify-content: space-between; border-bottom: 1px solid var(--line); }
  .creds-bar__list li { border-bottom: 0; padding: 18px 24px 18px 0; }
  .creds-bar__list li + li { padding-left: 24px; border-left: 1px solid var(--line); }
}
.creds-bar__label { font-size: var(--fs-xs); color: var(--slate); }
.creds-bar__value { font-weight: 700; color: var(--ink); text-decoration: none; }
a.creds-bar__value:hover { color: var(--red); text-decoration: underline; }

.haul__grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .haul__grid { grid-template-columns: 5fr 7fr; gap: 64px; } }
.haul__grid h2 { margin-bottom: 12px; }
.haul__grid p { color: var(--steel); max-width: 46ch; }
.haul__list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--ink); }
@media (min-width: 640px) { .haul__list { grid-template-columns: repeat(3, 1fr); } }
.haul__list li { padding: 18px 12px 18px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-md); font-weight: 700; }

.audiences__grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .audiences__grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.audience-card { padding: clamp(24px, 3vw, 40px); border-radius: var(--radius-lg); background: var(--concrete); }
.audience-card h2 { font-size: var(--fs-lg); margin-bottom: 10px; }
.audience-card p { color: var(--steel); max-width: 52ch; }
.audience-card__links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.audience-card__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line-strong); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.audience-card__links a:hover { border-color: var(--ink); color: var(--ink); }
.audience-card--dark { background: var(--ink); color: var(--white); }
.audience-card--dark h2 { color: var(--white); }
.audience-card--dark p { color: rgba(255, 255, 255, .82); }
.audience-card--dark .audience-card__links a { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .45); }
.audience-card--dark .audience-card__links a:hover { border-color: var(--white); background: rgba(255, 255, 255, .08); color: var(--white); }

/* One authored moment: the hero copy and the quick panel arrive together on load */
@keyframes tfs-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes tfs-settle { from { transform: translateY(14px); } }
/* the headline only settles (no fade) so it paints immediately */
.hero h1 { animation: tfs-settle 700ms cubic-bezier(.16, 1, .3, 1) both; }
.hero__sub { animation: tfs-rise 700ms 90ms cubic-bezier(.16, 1, .3, 1) both; }
.quick__card { animation: tfs-rise 800ms 180ms cubic-bezier(.16, 1, .3, 1) both; }

/* phones: short tab labels so the three tabs never wrap */
.q-short { display: none; }
@media (max-width: 479px) { .q-long { display: none; } .q-short { display: inline; } }

@media (max-width: 719px) {
  .hero__media img { object-position: 84% 50%; }
  .hero__media::after { background: linear-gradient(180deg, rgba(18, 18, 20, 0) 0%, rgba(18, 18, 20, .12) 28%, rgba(18, 18, 20, .86) 52%, rgba(18, 18, 20, .95) 100%); }
  .creds-bar__list li:last-child { grid-column: 1 / -1; }
  /* CTA band: the Trajectory curve lives in its own strip under the copy */
  .cta-band { background-image: none; }
  .cta-band::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: url('/assets/brand/trajectory-dark.svg') no-repeat center 42% / cover; }
}
/* tab labels are inline text (with responsive spans), not flex items */
.quick__tab { display: block; gap: 0; line-height: 56px; white-space: nowrap; }
@media (max-width: 719px) { .cta-band__inner { position: relative; z-index: 1; padding-bottom: 150px; } }

/* ==========================================================================
   Services panel — dark rounded band with a service tab strip (J.B. Hunt)
   ========================================================================== */
.svc-panel { background: var(--ink); color: var(--white); border-radius: 16px; padding: clamp(24px, 4vw, 56px); }
.svc-panel__head { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.svc-panel__head h2 { color: var(--white); margin-bottom: 10px; }
.svc-panel__head h2::before { content: ''; display: block; width: 40px; height: 4px; margin-bottom: 18px; background: var(--red); border-radius: 1px; }
.svc-panel__head p { color: rgba(255, 255, 255, .8); max-width: 56ch; margin: 0; }
.svc-panel__all { color: var(--white); }
.svc-panel__all:hover { color: var(--white); text-decoration: underline; }
.svc-panel__tabs { display: grid; gap: 8px; margin-bottom: 28px; }
@media (min-width: 720px) { .svc-panel__tabs { grid-template-columns: repeat(3, 1fr); gap: 0; border-bottom: 1px solid rgba(255, 255, 255, .18); } }
.svc-panel__tab {
  display: grid; gap: 2px; text-align: left; padding: 16px 18px; min-height: 56px; cursor: pointer;
  background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .72); border: 0; border-radius: var(--radius); font: inherit;
  position: relative; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
@media (min-width: 720px) { .svc-panel__tab { background: none; border-radius: 0; padding: 14px 20px 18px 0; } }
.svc-panel__tab strong { font-size: var(--fs-md); color: inherit; }
.svc-panel__tab span { font-size: var(--fs-sm); }
.svc-panel__tab:hover { color: var(--white); }
.svc-panel__tab[aria-selected="true"] { color: var(--white); background: rgba(255, 255, 255, .1); }
@media (min-width: 720px) { .svc-panel__tab[aria-selected="true"] { background: none; } }
.svc-panel__tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform var(--t) var(--ease); }
@media (max-width: 719px) { .svc-panel__tab::after { top: 0; bottom: 0; right: auto; width: 3px; height: auto; transform: scaleY(0); transform-origin: top; } }
.svc-panel__tab[aria-selected="true"]::after { transform: none; }
.svc-panel__tab:focus-visible { box-shadow: 0 0 0 3px var(--info); }
.svc-panel__pane { display: grid; gap: 28px; align-items: center; animation: fade-in var(--t) var(--ease); }
.svc-panel__pane[hidden] { display: none; }
@media (min-width: 960px) { .svc-panel__pane { grid-template-columns: 1fr 1fr; gap: 48px; } }
.svc-panel__media { border-radius: var(--radius-lg); overflow: hidden; }
.svc-panel__media img { aspect-ratio: 16 / 10; object-fit: cover; }
.svc-panel__copy h3 { color: var(--white); font-size: var(--fs-lg); margin-bottom: 10px; }
.svc-panel__copy p { color: rgba(255, 255, 255, .82); }
.svc-panel__copy .check-list { margin: 18px 0 26px; color: var(--white); }
.svc-panel__copy .check-list li::before { border-color: var(--red); }

/* ==========================================================================
   Visibility — shipper / driver toggle with a sample status card
   ========================================================================== */
.visibility__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .visibility__grid { grid-template-columns: 7fr 5fr; gap: 64px; } }
.visibility .lead { margin-bottom: 24px; }
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; background: var(--concrete); border-radius: 999px; margin-bottom: 20px; }
.seg__btn { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: none; cursor: pointer; font: 700 var(--fs-sm)/1 var(--font-body); color: var(--slate); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.seg__btn[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 4px rgba(37, 35, 38, .14); }
.feat-list { list-style: none; display: grid; gap: 0; margin-bottom: 24px; border-top: 1px solid var(--line); }
.feat-list li { display: grid; grid-template-columns: 22px 1fr; gap: 4px 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.feat-list svg { color: var(--red); margin-top: 2px; }
.feat-list .badge { grid-column: 2; justify-self: start; }
@media (min-width: 640px) { .feat-list li { grid-template-columns: 22px 1fr auto; align-items: center; } .feat-list .badge { grid-column: auto; } }

.status-card { margin: 0; padding: 24px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(37, 35, 38, .10); }
.status-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.status-card__ref { font-weight: 700; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.status-card__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 20px; }
.status-card__meta div { padding: 12px; background: var(--concrete); border-radius: var(--radius); }
.status-card__meta dt { font-size: var(--fs-xs); color: var(--slate); }
.status-card__meta dd { margin: 4px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.status-card figcaption { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--slate); }
.status-card figcaption a { color: var(--ink); font-weight: 700; }

/* Inline lead form at the end of service pages (J.B. Hunt pattern) */
.lead-form__grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .lead-form__grid { grid-template-columns: 5fr 7fr; gap: 56px; } }
.lead-form .lead a { color: var(--ink); font-weight: 700; }
.lead-form__call { font-size: var(--fs-md); }
.lead-form__call a { font-weight: 700; color: var(--ink); }
.status-card__ref { white-space: nowrap; }
@media (max-width: 479px) { .status-card { padding: 18px; } .status-card__ref { font-size: var(--fs-base); } }
.mega__services a { gap: 4px; }

/* ==========================================================================
   Freight we haul — tiles, lists and commodity pages
   ========================================================================== */
.cargo-icon { color: var(--red); flex: none; }
.page-hero__icon { margin: 0 0 14px; }
.page-hero__icon .cargo-icon { color: var(--white); background: var(--red); border-radius: var(--radius-lg); padding: 9px; width: 58px; height: 58px; }

.haul__list a { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: var(--ink); }
.haul__list a span { transition: color var(--t-fast) var(--ease); }
.haul__list a:hover span { color: var(--red); }
.haul__list li { padding: 14px 12px 14px 0; }
.commodities a { text-decoration: none; color: var(--ink); }
.commodities a:hover { color: var(--red); text-decoration: underline; }

.cargo-grid { list-style: none; display: grid; gap: 16px; }
@media (min-width: 640px) { .cargo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cargo-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.cargo-tile {
  height: 100%; display: grid; align-content: start; gap: 10px; padding: 28px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--white); text-decoration: none; color: var(--ink); position: relative; overflow: hidden;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.cargo-tile strong { font-size: var(--fs-lg); line-height: 1.2; }
.cargo-tile span { color: var(--steel); }
.cargo-tile .cargo-tile__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; color: var(--ink); }
.cargo-tile:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 35, 38, .10); color: var(--ink); }

.cargo-tile .cargo-icon { width: 40px; height: 40px; }

.fit-list { list-style: none; display: grid; gap: 10px; margin: 18px 0 48px; }
.fit-list a {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink);
  transition: border-color var(--t-fast) var(--ease);
}
.fit-list strong { grid-column: 1; }
.fit-list span { grid-column: 1; font-size: var(--fs-sm); color: var(--steel); }
.fit-list svg { grid-column: 2; grid-row: 1 / span 2; transition: transform var(--t-fast) var(--ease); }
.fit-list a:hover { border-color: var(--ink); color: var(--ink); }
.fit-list a:hover svg { transform: translateX(3px); }

.cargo-mini { list-style: none; display: grid; gap: 2px; margin-top: 8px; }
.cargo-mini a { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: var(--fs-sm); }
.cargo-mini a:hover { color: var(--red); }

/* ==========================================================================
   Visual layer — TFS graphic system (Trajectory, Freight Red), restrained motion
   ========================================================================== */
/* Hero: the Trajectory curve sweeps in once over the photo (brand: one large crop on hero areas) */
.hero { overflow: hidden; }
.hero__curve { position: absolute; right: -6%; bottom: -16%; width: min(60vw, 940px); height: auto; aspect-ratio: 3 / 2; pointer-events: none; opacity: .92; }
.hero__curve path { animation: tfs-sweep 1400ms 250ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes tfs-sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.hero__media img { animation: tfs-zoom 1800ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes tfs-zoom { from { transform: scale(1.06); } }
@media (max-width: 719px) { .hero__curve { width: 120vw; right: -40%; bottom: 0; opacity: .85; } }

/* Track band in Freight Red (10% accent) — solid surface so the form stays legible */
.track-band { background: var(--red); color: var(--white); }
.track-band h2 { color: var(--white); }
.track-band h2.accent-bar::before { background: var(--white); }
.track-band p { color: rgba(255, 255, 255, .92); }
.track-band .field label { color: var(--white); }
.track-band .input { border-color: transparent; }
.track-band .input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.track-band__links { color: rgba(255, 255, 255, .92); }
.track-band__links a { color: var(--white); }
.track-band__links a:hover { color: var(--white); text-decoration-thickness: 2px; }
.track-band .btn--dark:hover { background: #000; }

/* How it works: the route lights up in red when the section comes into view */
.steps li::before { transition: background-color 300ms var(--ease) var(--d, 0ms); }
.steps li::after { background: linear-gradient(var(--red), var(--red)) no-repeat left top / 100% 0%, var(--line); transition: background-size 600ms var(--ease) var(--d, 0ms); }
@media (min-width: 960px) { .steps--row li::after { background-size: 0% 100%, auto; } }
.steps.is-in li::before { background: var(--red); }
.steps.is-in li::after { background-size: 100% 100%, auto; }
.steps li:nth-child(2) { --d: 250ms; } .steps li:nth-child(3) { --d: 500ms; } .steps li:nth-child(4) { --d: 750ms; } .steps li:nth-child(5) { --d: 1000ms; }
.steps--row li:first-child::before { background: var(--ink); }
.steps.is-in.steps--row li:first-child::before { background: var(--red); }
@media (max-width: 479px) { .haul__list { grid-template-columns: 1fr; } }

/* "For shippers / For TFS drivers" pill: never wider than the screen on 320 px phones */
.visibility__grid > * { min-width: 0; }
.seg { max-width: 100%; }
.seg__btn { min-width: 0; white-space: normal; }

/* 05-forms.css */
/* ==========================================================================
   Forms
   ========================================================================== */
.form { display: grid; gap: 36px; }
.form-section { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-section legend, .form-section__title {
  display: block; width: 100%; padding: 0 0 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
  font: 700 var(--fs-lg)/1.2 var(--font-display); color: var(--ink);
}
.form-section__hint { margin: -10px 0 20px; color: var(--slate); font-size: var(--fs-sm); }
.form-grid { display: grid; gap: 18px 20px; }
@media (min-width: 640px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .form-grid .span-2 { grid-column: span 2; }
  .form-grid .span-all { grid-column: 1 / -1; }
}

.field { display: grid; gap: 6px; align-content: start; }
.field label, .field .label { font-weight: 700; font-size: var(--fs-sm); color: var(--ink); }
.field .opt { font-weight: 400; color: var(--slate); }
.field .help { font-size: var(--fs-xs); color: var(--slate); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: 400 var(--fs-base)/1.4 var(--font-body); color: var(--ink);
  background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #6B7075; opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--steel); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--info); box-shadow: 0 0 0 3px rgba(36, 94, 168, .22); }
.textarea { min-height: 120px; resize: vertical; }
.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23222224' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 14px; background: var(--concrete); border: 1px solid var(--line-strong);
  border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; color: var(--slate); font-size: var(--fs-sm); white-space: nowrap;
}

/* invalid state — only after the user interacted / submitted */
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-50); }
.field__error { display: none; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--danger); }
.field.is-invalid .field__error { display: flex; }
.field__error::before { content: '!'; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: var(--white); font-size: 11px; }

/* checkboxes & radio cards */
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: var(--fs-sm); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--red); }
.check-group { display: grid; gap: 10px; }
@media (min-width: 640px) { .check-group--cols { grid-template-columns: 1fr 1fr; } }
.field.is-invalid .check { color: var(--danger); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 8px; }
.form-actions p { margin: 0; font-size: var(--fs-sm); color: var(--slate); }
.form-summary { scroll-margin-top: calc(var(--header-h) + 24px); }
.form-summary ul { margin: 6px 0 0; padding-left: 18px; }
.form-summary a { color: inherit; font-weight: 700; }

/* form page layout: form + aside */
.form-layout { display: grid; gap: 40px; }
@media (min-width: 1024px) { .form-layout { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 56px; align-items: start; } }
.form-aside { display: grid; gap: 20px; }
@media (min-width: 1024px) { .form-aside { position: sticky; top: calc(var(--header-h) + 24px); } }
.form-aside h2 { font-size: var(--fs-md); margin-bottom: 10px; }
.form-aside p, .form-aside li { font-size: var(--fs-sm); color: var(--steel); }
.status-flow { list-style: none; display: grid; gap: 8px; }
.status-flow li { display: flex; align-items: center; gap: 10px; }
.status-flow li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.status-flow li:first-child::before { background: var(--red); }

/* result after submit */
.form-result { animation: fade-in var(--t) var(--ease); }
.form-result h2 { font-size: var(--fs-lg); }
.form-result dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: var(--fs-sm); margin: 16px 0; }
.form-result dt { color: var(--slate); }
.form-result dd { margin: 0; font-weight: 700; }
.form-layout > *, .contact-grid > *, .detail-grid > * { min-width: 0; }

/* ==========================================================================
   Mobile adaptation
   ========================================================================== */
html { -webkit-tap-highlight-color: rgba(194, 30, 35, .12); }
.site-nav__phone { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; font-weight: 700; text-decoration: none; color: var(--ink); }
@media (min-width: 1024px) { .site-nav__phone { display: none; } }

/* thumb-reach action bar: appears once the hero is out of view */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; gap: 10px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(37, 35, 38, .08);
  transform: translateY(110%); transition: transform var(--t) var(--ease);
}
.mobile-bar.is-visible { transform: none; }
.mobile-bar__call {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  border: 2px solid var(--ink); border-radius: var(--radius); font-weight: 700; text-decoration: none; color: var(--ink);
}
.mobile-bar__call svg { color: var(--red); }
.mobile-bar__quote { flex: 1.3; min-height: 48px; font-size: var(--fs-base); }
body.no-mobile-bar .mobile-bar, body.nav-open .mobile-bar { display: none; }
@media (min-width: 1024px) { .mobile-bar { display: none; } }
@media (max-width: 1023px) { body:not(.no-mobile-bar) .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); } }

@media (max-width: 719px) {
  /* tabs share the width instead of scrolling sideways */
  .tabs__list { overflow: visible; }
  .tabs__tab { flex: 1 1 0; white-space: normal; text-align: center; line-height: 1.25; padding: 10px 8px; }
  /* tracking summary: the reported time gets a full row */
  .track-summary div:nth-child(2) { grid-column: 1 / -1; }
  /* credentials read as facts, not headlines */
  .creds dd { font-size: var(--fs-md); }
  /* comfortable tap targets in the footer */
  .site-footer__col a { min-height: 44px; }
  .site-footer__bottom a { min-height: 44px; }
}

/* Spam trap on the public forms (forms.js): off screen, not display:none, which bots skip. Hidden from screen
   readers by aria-hidden on its wrapper and from the keyboard by tabindex=-1. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* 06-auth.css */
/* ==========================================================================
   Auth screens (login, forgot, reset)
   ========================================================================== */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; }
@media (min-width: 960px) { .auth { grid-template-columns: minmax(480px, 1fr) 1fr; } }
.auth__panel { display: flex; flex-direction: column; padding: 28px var(--gutter); }
@media (min-width: 960px) { .auth__panel { padding: 40px clamp(40px, 6vw, 96px); } }
.auth__logo img { width: 148px; height: auto; }
.auth__main { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 420px; padding-block: 40px; }
@media (min-width: 960px) { .auth__main { margin-inline: 0; } }
.auth__main h1 { font-size: var(--fs-xl); margin-bottom: 8px; }
.auth__main > p { color: var(--steel); }
.auth__form { display: grid; gap: 18px; margin-top: 20px; }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--fs-sm); }
.auth__row a { font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
.auth__foot { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: var(--fs-xs); color: var(--slate); }
.auth__foot a { color: var(--slate); display: inline-flex; min-height: 32px; align-items: center; }
.auth__credit { width: 100%; }
.auth__credit a { text-decoration: none; }
.auth__media { display: none; position: relative; background: var(--ink) url('/assets/brand/trajectory-dark.svg') no-repeat center / cover; }
@media (min-width: 960px) { .auth__media { display: block; } }
.portal-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--concrete); border-radius: var(--radius-lg); margin-top: 20px; }
.portal-switch button {
  min-height: 40px; border: 0; border-radius: var(--radius); background: none; cursor: pointer;
  font: 700 var(--fs-sm)/1 var(--font-body); color: var(--slate);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.portal-switch button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(34, 34, 36, .12); }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 72px; }
.password-toggle {
  position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 12px; border: 0; background: none; cursor: pointer;
  font: 700 var(--fs-xs)/1 var(--font-body); color: var(--steel); border-radius: var(--radius);
}
.password-toggle:hover { color: var(--ink); background: var(--concrete); }

.demo-entry { margin-top: 28px; padding: 18px; border: 1px solid #ecd3a2; border-radius: 12px; background: var(--warn-50); }
.demo-entry h2 { font-size: var(--fs-base); margin: 0 0 4px; }
.demo-entry p { margin: 0 0 12px; font-size: var(--fs-sm); color: #5e3e00; }
.demo-entry__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.demo-entry__grid .btn { min-height: 44px; }
.demo-entry__grid .btn:last-child { grid-column: 1 / -1; }

/* very narrow phones (320 px): the panel may shrink below its content's natural width */
.auth > * { min-width: 0; }
.portal-switch > * { min-width: 0; white-space: normal; }

/* 07-polish.css */
/* ==========================================================================
   Polish layer (loads last): surfaces, photo treatment and small interactions
   ========================================================================== */
/* --- Footer on Carbon with the negative logo ----------------------------- */
.site-footer { background: var(--ink); border-top: 0; color: rgba(255, 255, 255, .78); }
.site-footer__brand p { color: rgba(255, 255, 255, .78); }
.site-footer__title { color: var(--white); }
.site-footer__col a { color: rgba(255, 255, 255, .78); }
.site-footer__col a:hover { color: var(--white); }
.site-footer__contact li { color: rgba(255, 255, 255, .86); }
.site-footer__contact span { color: rgba(255, 255, 255, .6); }
.site-footer__bottom { border-top-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .66); }
.site-footer__bottom a, .site-footer__credit, .site-footer__credit a { color: rgba(255, 255, 255, .66); }
.site-footer__bottom a:hover, .site-footer__credit a:hover { color: var(--white); }
.footer-quick a { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); color: var(--white); }
.footer-quick a:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); color: var(--white); }
.footer-quick a svg { color: rgba(255, 255, 255, .9); }
body:not(.no-mobile-bar) .site-footer { background: var(--ink); }

/* --- Final CTA on Light with the Trajectory curve (so it doesn't merge with the dark footer) --- */
.cta-band { background: var(--concrete) url('/assets/brand/trajectory-curve.svg') no-repeat right -6vw center / auto 170%; color: var(--ink); }
.cta-band h2 { color: var(--ink); }
.cta-band p { color: var(--steel); }
.cta-band .btn--ghost-light { border-color: var(--ink); color: var(--ink); }
.cta-band .btn--ghost-light:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.cta-band a:not(.btn):hover { color: var(--red); }
@media (max-width: 719px) {
  .cta-band { background-image: none; }
  .cta-band::after { background-image: url('/assets/brand/trajectory-curve.svg'); }
}
@media (min-width: 720px) and (max-width: 899px) { .cta-band { background-position: right -40vw center; } }

/* --- Photos: one radius, soft depth, gentle zoom on the ones that link ---- */
.split__media, .why__media picture:first-child, .svc-panel__media, .fleet-grid figure, .fleet-strip__track li { border-radius: 14px; overflow: hidden; }
.split__media, .svc-panel__media { box-shadow: 0 24px 48px -24px rgba(37, 35, 38, .45); }
.split__media img, .svc-panel__media img { transition: transform 600ms var(--ease); }
.split:hover .split__media img, .svc-panel__pane:hover .svc-panel__media img { transform: scale(1.025); }

/* "Why" — two real photos, the second one overlapping with a white keyline */
.why__media { position: relative; overflow: visible; border-radius: 0; padding: 0 12% 14% 0; }
.why__media picture:first-child { display: block; box-shadow: 0 30px 60px -30px rgba(37, 35, 38, .5); }
.why__media picture:first-child img { aspect-ratio: 4 / 5; object-fit: cover; }
.why__inset { position: absolute; right: 0; bottom: 0; width: 52%; border: 6px solid var(--concrete); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 40px -20px rgba(37, 35, 38, .55); }
.why__inset img { aspect-ratio: 4 / 3; object-fit: cover; }
.why__media::before { content: ''; position: absolute; left: -14px; top: 28px; width: 6px; height: 96px; background: var(--red); border-radius: 2px; }
@media (max-width: 899px) { .why__media { padding: 0 10% 12% 0; } .why__media picture:first-child img { aspect-ratio: 16 / 11; } .why__media::before { display: none; } }

/* Fleet strip: edge-to-edge row of real photos, swipe or scroll */
.fleet-strip { padding-block: calc(var(--section) * .85) 0; }
.fleet-strip__head { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: end; margin-bottom: 24px; }
.fleet-strip__head h2 { margin: 0; }
.fleet-strip__track {
  list-style: none; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  padding: 4px max(var(--gutter), calc((100vw - var(--container)) / 2)) 28px; scrollbar-width: thin;
}
.fleet-strip__track li { flex: none; width: min(82vw, 520px); scroll-snap-align: center; box-shadow: 0 20px 40px -24px rgba(37, 35, 38, .5); }
.fleet-strip__track li:first-child { width: min(82vw, 700px); }
.fleet-strip__track img { height: clamp(220px, 30vw, 380px); width: 100%; object-fit: cover; }
.fleet-strip__track:focus-visible { box-shadow: none; outline: 3px solid var(--info); outline-offset: -3px; }

/* --- Interior heroes: the curve signs every page, copy stays on the calm side --- */
.page-hero::after { content: ''; position: absolute; right: -6%; bottom: -30%; width: min(54vw, 760px); aspect-ratio: 3 / 2; background: url('/assets/brand/trajectory-curve.svg') no-repeat right bottom / contain; opacity: .9; pointer-events: none; }
.page-hero__body { z-index: 1; }
.page-hero__media::after { background: linear-gradient(90deg, rgba(20, 20, 22, .9) 0%, rgba(20, 20, 22, .62) 48%, rgba(20, 20, 22, .12) 100%); }
@media (max-width: 719px) { .page-hero::after { width: 110vw; right: -45%; bottom: -12%; opacity: .8; } }

/* --- Buttons and cards: a little lift, no new colours -------------------- */
.btn--primary { box-shadow: 0 8px 18px -10px rgba(37, 35, 38, .45); }
.btn--primary:hover { box-shadow: 0 12px 22px -10px rgba(37, 35, 38, .55); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(1px); box-shadow: none; }
.quick__card { border-radius: 14px; box-shadow: 0 30px 60px -28px rgba(18, 18, 20, .55); }
.panel, .cargo-tile, .status-card, .audience li, .fit-list a, .footer-quick a { border-radius: 12px; }
.svc-panel { border-radius: 20px; }
.creds-bar__value { font-size: var(--fs-md); }
.haul__list li { transition: background-color var(--t-fast) var(--ease); }
.haul__list li:hover { background: var(--concrete); }
.haul__list a { padding-left: 8px; }

.status-card figcaption a { display: inline-block; padding: 8px 0; }

/* --- Touch targets (mobile check): phone links, commodity tiles, helper links --- */
a.creds-bar__value { display: inline-flex; align-items: center; min-height: 44px; }
.commodities li { padding: 0; }
.commodities li::before { margin-left: 14px; }
.commodities a { display: flex; align-items: center; flex: 1; min-height: 48px; padding: 8px 14px 8px 0; }
.contact-list a { display: inline-flex; align-items: center; min-height: 44px; }
.form-aside .check-list a { display: inline-flex; align-items: center; min-height: 44px; }
.form-aside .check-list li::before { top: 1.05em; }
.auth__foot a { min-height: 44px; }
.site-footer__contact a { min-height: 44px; }

/* phones: no curve behind the interior hero copy */
@media (max-width: 719px) { .page-hero::after { display: none; } }

/* 08-app.css */
/* ==========================================================================
   Portals (customer, driver, dispatch, accounting, admin) — operational UI.
   Same brand tokens as the public site, different job: scan fast, act fast.
   ========================================================================== */
body.app { background: var(--concrete); font-size: 0.9375rem; }
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 16px; background: var(--warn-50); border-bottom: 1px solid #ecd3a2; color: #5e3e00; font-size: var(--fs-xs); }
.demo-banner .link-inline { margin-left: auto; min-height: 32px; }

.app-shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100dvh - 40px); }
@media (min-width: 1024px) { .app-shell { grid-template-columns: 248px minmax(0, 1fr); } }

/* --- sidebar ----------------------------------------------------------- */
.app-side { background: var(--ink); color: var(--white); display: flex; flex-direction: column; padding: 20px 14px; gap: 6px; }
.app-side__logo img { width: 132px; height: auto; margin: 0 8px 4px; }
.app-side__portal { margin: 8px 8px 10px; font-size: var(--fs-xs); color: rgba(255, 255, 255, .62); }
.app-nav { display: grid; gap: 2px; }
.app-nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: rgba(255, 255, 255, .8); text-decoration: none; font-weight: 700; font-size: var(--fs-sm); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.app-nav a svg { flex: none; opacity: .85; }
.app-nav a:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.app-nav a[aria-current="page"] { background: var(--white); color: var(--ink); }
.app-nav .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--red); color: var(--white); font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
.app-side__credit { margin: auto 8px 0; padding-top: 16px; font-size: 11px; }
.app-side__credit a { color: rgba(255, 255, 255, .55); text-decoration: none; }
@media (max-width: 1023px) {
  .app-side { position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); z-index: 60; transform: translateX(-102%); transition: transform var(--t) var(--ease); overflow-y: auto; }
  .app-side.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(37, 35, 38, .5); }
}

/* --- top bar ----------------------------------------------------------- */
.app-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px var(--gutter); background: var(--white); border-bottom: 1px solid var(--line); }
.app-top__menu { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); cursor: pointer; color: var(--ink); }
@media (min-width: 1024px) { .app-top__menu { display: none; } }
.app-top__title { font-size: var(--fs-md); margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-top__actions { display: flex; align-items: center; gap: 6px; }
.app-menu { position: relative; }
.app-menu > button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; font: 700 var(--fs-sm)/1 var(--font-body); color: var(--ink); position: relative; }
.app-menu > button:hover, .app-menu > button[aria-expanded="true"] { background: var(--concrete); }
.app-menu .dot { position: absolute; top: 6px; right: 4px; min-width: 18px; padding: 2px 5px; border-radius: 999px; background: var(--red); color: var(--white); font-size: 10px; }
.app-menu__panel { position: absolute; right: 0; top: calc(100% + 6px); width: min(360px, 92vw); max-height: 70vh; overflow: auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(37, 35, 38, .3); padding: 8px; z-index: 40; }
.app-menu__panel[hidden] { display: none; }
.app-menu__panel h2 { font-size: var(--fs-sm); margin: 8px 8px 6px; }
.app-menu__item { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-decoration: none; cursor: pointer; }
.app-menu__item:hover { background: var(--concrete); color: var(--ink); }
.app-menu__item small { color: var(--slate); }
.app-menu__item.is-unread strong::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--red); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font-size: 12px; }
@media (max-width: 559px) { .app-menu [data-user-name] { display: none; } }

/* --- content ----------------------------------------------------------- */
.app-content { padding: 20px var(--gutter) 48px; max-width: 1440px; width: 100%; }
.app-content:focus { outline: none; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.page-actions p { margin: 0; color: var(--steel); max-width: 70ch; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.card + .card, .card-grid + .card, .card + .card-grid, .kpis + .card, .kpis + .card-grid { margin-top: 16px; }
.card > h2, .card__head h2 { font-size: var(--fs-base); margin: 0 0 12px; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.card__head h2 { margin: 0; }
.card-grid { display: grid; gap: 16px; }
@media (min-width: 960px) { .card-grid--2 { grid-template-columns: 1fr 1fr; } .card-grid--21 { grid-template-columns: 2fr 1fr; } }
.card-grid > .card { margin: 0; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.kpi { display: grid; gap: 2px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color var(--t-fast) var(--ease); }
a.kpi:hover { border-color: var(--ink); color: var(--ink); }
.kpi__value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__label { font-weight: 700; font-size: var(--fs-sm); }
.kpi__sub { font-size: var(--fs-xs); color: var(--slate); }
.kpi--alert .kpi__value { color: var(--danger); }

/* status badges: dot + text, never colour alone */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; border: 1px solid var(--line); background: var(--concrete); color: var(--steel); }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st--info { background: var(--info-50); color: var(--info); border-color: #c5d6eb; }
.st--ok { background: var(--ok-50); color: var(--ok); border-color: #bcdcc8; }
.st--warn { background: var(--warn-50); color: var(--warn); border-color: #ecd3a2; }
.st--danger { background: var(--danger-50); color: var(--danger); border-color: #efc2c4; }
.st--danger::before { border-radius: 1px; transform: rotate(45deg); }

/* --- data tables ------------------------------------------------------- */
.dt__bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.dt__bar .field { gap: 4px; }
.dt__bar .field label { font-size: 12px; }
.dt__bar .input, .dt__bar .select { min-height: 40px; padding: 6px 12px; font-size: var(--fs-sm); }
.dt__bar .select { padding-right: 34px; }
.dt__search { flex: 1 1 220px; }
.dt__bar .btn { margin-left: auto; }
.dt__wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.dt table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dt th { text-align: left; padding: 0; background: var(--concrete); border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12px; }
.dt th button, .dt th span { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; background: none; font: 700 12px/1 var(--font-body); color: var(--steel); cursor: pointer; }
.dt th span { cursor: default; }
.dt th button[aria-sort]::after { content: '↕'; opacity: .4; }
.dt th button[aria-sort="ascending"]::after { content: '↑'; opacity: 1; }
.dt th button[aria-sort="descending"]::after { content: '↓'; opacity: 1; }
.dt td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt tr:last-child td { border-bottom: 0; }
.dt tbody tr:hover { background: #fafafa; }
.dt td a { font-weight: 700; color: var(--ink); }
.dt td .muted { font-size: 12px; }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: var(--fs-xs); color: var(--slate); }
.dt__pager { display: flex; gap: 6px; }
.dt__pager button { min-width: 40px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); cursor: pointer; font: 700 var(--fs-sm)/1 var(--font-body); }
.dt__pager button[disabled] { opacity: .45; cursor: default; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn--xs { min-height: 34px; padding: 0 12px; font-size: 12px; border-width: 1px; }
.empty { padding: 28px 16px; text-align: center; color: var(--slate); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }
@media (max-width: 719px) {
  /* each row becomes a card with labelled values */
  .dt__wrap { border: 0; background: none; overflow: visible; }
  .dt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dt table, .dt tbody, .dt tr, .dt td { display: block; width: 100%; }
  .dt tr { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; margin-bottom: 10px; }
  .dt td { display: grid; grid-template-columns: 42% 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
  .dt td::before { content: attr(data-label); font-size: 12px; color: var(--slate); font-weight: 700; }
  .dt td:last-child { border-bottom: 0; }
  .dt .num { text-align: left; }
  .dt__bar .btn { margin-left: 0; }
  /* the "nothing here" row has no label: it uses the whole card */
  .dt td[colspan] { display: block; padding: 0; border: 0; }
  .dt td[colspan]::before { content: none; }
  .dt tr:has(> td[colspan]) { padding: 0; }
  /* long names wrap inside their card instead of widening the page */
  .dt td > *, .dt td a { min-width: 0; overflow-wrap: anywhere; }
}

/* --- detail ------------------------------------------------------------ */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; margin: 0; }
.dl dt { font-size: 12px; color: var(--slate); }
.dl dd { margin: 2px 0 0; font-weight: 700; }
.stops { display: grid; gap: 12px; }
@media (min-width: 720px) { .stops { grid-template-columns: 1fr 1fr; } }
.stop { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.stop h3 { font-size: var(--fs-sm); margin: 0 0 6px; color: var(--slate); }
.stop strong { display: block; font-size: var(--fs-base); }
.stop p { margin: 4px 0 0; color: var(--steel); }
.progress { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 4px 0 6px; }
.progress i { height: 6px; border-radius: 3px; background: var(--line); }
.progress i.on { background: var(--ink); }
.progress i.now { background: var(--red); }
.feed { list-style: none; display: grid; gap: 0; }
.feed li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed small { color: var(--slate); }
.bars { display: grid; gap: 8px; }
.bars div { display: grid; grid-template-columns: minmax(110px, 34%) 1fr 34px; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.bars i { display: block; height: 10px; border-radius: 5px; background: var(--ink); min-width: 2px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
.alert-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.alert-row:last-child { border-bottom: 0; }
.alert-row small { color: var(--slate); grid-column: 1; }
.alert-row a { grid-row: 1 / span 2; grid-column: 2; }

/* --- dialogs, toasts --------------------------------------------------- */
dialog.modal { margin: auto; width: min(560px, 94vw); max-height: 90vh; padding: 0; border: 0; border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(37, 35, 38, .6); }
dialog.modal::backdrop { background: rgba(37, 35, 38, .55); }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: var(--fs-md); margin: 0; }
.modal__body { padding: 18px 20px; display: grid; gap: 14px; }
.modal__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--concrete); }
.modal__close { width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 22px; line-height: 1; color: var(--steel); }
.modal__close:hover { background: var(--concrete); }
.toast-region { position: fixed; right: 16px; bottom: 16px; left: 16px; z-index: 80; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; max-width: 420px; padding: 12px 16px; border-radius: 10px; background: var(--ink); color: var(--white); font-size: var(--fs-sm); font-weight: 700; box-shadow: 0 16px 30px -12px rgba(37, 35, 38, .6); animation: fade-in var(--t) var(--ease); }
.toast--error { background: var(--danger); }
.form-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--danger-50); color: #7c1215; font-weight: 700; font-size: var(--fs-sm); }
.form-error[hidden] { display: none; }

/* --- driver portal: one column, large targets, bottom tabs on phones ---- */
body.app[data-role="driver"] .app-content { max-width: 720px; }
.drv-load { display: grid; gap: 10px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.drv-load + .drv-load { margin-top: 12px; }
.drv-load:hover { border-color: var(--ink); color: var(--ink); }
.drv-load__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.drv-load__id { font-size: var(--fs-md); font-weight: 700; }
.drv-route { display: grid; gap: 6px; }
.drv-route div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.drv-route span { color: var(--slate); font-size: var(--fs-sm); }
.btn--xl { min-height: 60px; width: 100%; font-size: var(--fs-md); border-radius: 12px; }
.drv-actions { display: grid; gap: 10px; }
@media (max-width: 1023px) {
  body.app[data-role="driver"] .app-content { padding-bottom: 96px; }
  body.app[data-role="driver"] .app-top__menu { display: none; }
  body.app[data-role="driver"] .app-side { position: fixed; inset: auto 0 0 0; width: auto; transform: none; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); flex-direction: row; overflow: visible; box-shadow: 0 -8px 24px rgba(37, 35, 38, .25); }
  body.app[data-role="driver"] .app-side__logo, body.app[data-role="driver"] .app-side__portal, body.app[data-role="driver"] .app-side__credit { display: none; }
  body.app[data-role="driver"] .app-nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  body.app[data-role="driver"] .app-nav a { flex-direction: column; justify-content: center; gap: 3px; min-height: 56px; padding: 4px; font-size: 11px; text-align: center; }
  body.app[data-role="driver"] .app-nav .count { position: absolute; margin: -34px 0 0 30px; }
  body.app[data-role="driver"] .toast-region { bottom: 84px; }
}
@media print {
  .demo-banner, .app-side, .app-top, .no-print, .toast-region { display: none !important; }
  body.app { background: #fff; } .app-shell { display: block; } .card { border: 0; padding: 0; }
}

/* grid children may shrink: wide tables scroll inside their own wrapper, never the page */
.app-main, .card, .card-grid > *, .dt { min-width: 0; }
.btn--xl { white-space: normal; text-align: center; line-height: 1.2; padding-block: 10px; }
.dt td:first-child, .dt td a, .dt td .st { white-space: nowrap; }
@media (max-width: 719px) { .dt td:first-child, .dt td a { white-space: normal; overflow-wrap: anywhere; } }

/* The API restarting during a deploy (api.js): one calm full-width line at the top, gone by itself when the API answers. */
.sysdown { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--info-50); border-bottom: 1px solid #c5d6eb; color: #183f6b; font-size: var(--fs-sm); font-weight: 600; }
.sysdown__pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--info); animation: sysdown-pulse 1.6s ease-in-out infinite; }
@keyframes sysdown-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sysdown__pulse { animation: none; } }

/* 09-brand3.css */
/* =============================================================================
   Brandbook 3.0 — graphic system on the site and the portals.
   Four families from the logo's gesture and slant (official SVGs in /assets/brand, see tools/brand-surfaces.py):
     Sweep  signature curve      CTA band, interior heroes, sign-in panel (through trajectory-*.svg)
     Grain  precision texture    the only repeatable tile: footer, tracking band, portal sidebar
     Slant  structural rhythm    directional panel, reserved for areas without copy (not placed yet)
     Cut    architectural frame  empty and error states, document headers (PDF)
   ============================================================================= */

/* --- Grain: texture on the solid brand surfaces --- */
.site-footer, body:not(.no-mobile-bar) .site-footer { background: linear-gradient(rgba(37, 35, 38, .8), rgba(37, 35, 38, .8)), var(--ink) url('/assets/brand/grain-dark.svg') repeat 0 0 / 1200px 800px; }
.track-band { background: linear-gradient(rgba(194, 30, 35, .7), rgba(194, 30, 35, .7)), var(--red) url('/assets/brand/grain-red.svg') repeat 0 0 / 1200px 800px; }
/* Brandbook 3.3 grain is higher contrast: kept as a quiet texture behind text, never over it at full strength */
.app-side { background: linear-gradient(rgba(37, 35, 38, .82), rgba(37, 35, 38, .82)), var(--ink) url('/assets/brand/grain-dark.svg') repeat 0 0 / 1200px 800px; }

/* --- Slant is a directional panel for areas without copy. Every light band on the site carries text,
   so it is not placed yet; the official files are in /assets/brand (slant-*.svg) for future sections. --- */

/* --- Cut: frames the states where there is nothing to show yet --- */
.app .empty { position: relative; overflow: hidden; }
@media (max-width: 719px) { .app .card > .empty::after, .app .dt .empty::after { content: none; } }
.app .card > .empty::after, .app .dt .empty::after { content: ''; position: absolute; top: 0; right: 0; width: 132px; aspect-ratio: 3 / 2; background: url('/assets/brand/cut-light-t.svg') no-repeat right top / 380% auto; opacity: .16; pointer-events: none; }

/* --- Portal: brand accent on the top bar, same red rule as the printed header --- */
.app-top { border-top: 3px solid var(--red); }

/* 10-dash.css */
/* =============================================================================
   Dashboards — layout patterns taken from ERP Base (page context line, one filter row, grouped
   stat tiles with an icon chip, chart cards with title + subtitle, quiet empty states) in the TFS brand.
   Charts follow the dataviz method: thin marks, hairline solid grid, emphasis in Freight Red.
   ============================================================================= */

/* --- context line and actions --- */
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 18px; }
.dash-head__when { margin: 0; color: var(--slate); font-size: var(--fs-sm); }
.dash-head__when strong { color: var(--ink); font-weight: 700; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dash-more { position: relative; }
.dash-more > summary { list-style: none; cursor: pointer; }
.dash-more > summary::-webkit-details-marker { display: none; }
.dash-more__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(37, 35, 38, .14); display: grid; }
.dash-more__menu a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: var(--fs-sm); font-weight: 700; }
.dash-more__menu a:hover, .dash-more__menu a:focus-visible { background: var(--concrete); }

/* --- sections --- */
.dash-section + .dash-section, .dash-section + .card, .dash-head + .card { margin-top: 22px; }
.dash-section__title { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.dash-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.dash-filter .dash-section__title { margin: 0; }
.period { display: inline-flex; padding: 3px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; gap: 2px; }
.period button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--slate); font: 700 var(--fs-xs)/1 var(--font-body); cursor: pointer; }
.period button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.period button:focus-visible { box-shadow: var(--focus); outline: none; }

/* --- stat tiles --- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; }
.tile { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon value" "label label" "sub sub"; align-items: center; column-gap: 12px; row-gap: 2px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
a.tile:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(37, 35, 38, .07); }
a.tile:focus-visible { box-shadow: var(--focus); outline: none; }
.tile__icon { grid-area: icon; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--concrete); color: var(--ink); }
.tile__value { grid-area: value; font-size: 1.75rem; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.tile__label { grid-area: label; margin-top: 6px; font-size: var(--fs-sm); font-weight: 700; }
.tile__sub { grid-area: sub; font-size: var(--fs-xs); color: var(--slate); }
.tile--danger .tile__icon { background: var(--danger-50); color: var(--danger); }
.tile--danger .tile__value { color: var(--danger); }
.tile--danger { border-color: #EBC4C9; }
.tile--warn .tile__icon { background: var(--warn-50); color: var(--warn); }
.tile--ok .tile__icon { background: var(--ok-50); color: var(--ok); }
.tile--info .tile__icon { background: var(--info-50); color: var(--info); }
.tile--brand .tile__icon { background: var(--red-50); color: var(--red); }
.tile--hero { grid-column: span 2; }
.tile--hero .tile__value { font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); }

/* --- chart cards --- */
.card__sub { margin: -6px 0 14px; color: var(--slate); font-size: var(--fs-xs); }
.dash-grid { display: grid; gap: 16px; }
@media (min-width: 1000px) { .dash-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid--3 > :last-child { grid-column: 1 / -1; } }
@media (min-width: 1240px) { .dash-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-grid--3 > :last-child { grid-column: auto; } }
@media (min-width: 1000px) { .dash-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid--21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .dash-grid--12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.dash-grid > .card, .dash-grid > section { margin: 0; min-width: 0; }

.figure { display: grid; gap: 2px; margin: 0 0 6px; }
.figure__value { font-size: clamp(2rem, 1.6rem + 1.4vw, 3rem); font-weight: 700; line-height: 1.05; letter-spacing: -.015em; }
.figure__label { color: var(--slate); font-size: var(--fs-sm); }

/* column chart */
.cols { margin: 0; }
.cols__plot { position: relative; height: 188px; margin: 6px 0 0 44px; }
.cols__grid span { position: absolute; left: 0; right: 0; border-top: 1px solid #ECEDEE; }
.cols__grid span:first-child { border-top-color: var(--line-strong); }
.cols__grid b { position: absolute; right: calc(100% + 8px); top: -.55em; font-size: 11px; font-weight: 400; color: var(--slate); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cols__bars { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.cols__slot { flex: 1 1 0; display: flex; justify-content: center; align-items: flex-end; height: 100%; min-width: 0; }
.cols__bar { position: relative; width: min(24px, 62%); padding: 0; border: 0; border-radius: 4px 4px 0 0; background: var(--c); cursor: default; }
.cols__bar:hover, .cols__bar:focus-visible { filter: brightness(1.12); outline: none; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
.cols__val { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.cols__x { display: flex; margin: 8px 0 0 44px; }
.cols__x span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 11px; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ranked bars */
.hb { display: grid; gap: 10px; }
.hb__row { display: grid; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: var(--fs-sm); }
.hb__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb__label a { color: var(--ink); }
.hb__track { display: block; height: 12px; }
.hb__track i { display: block; height: 100%; background: var(--c); border-radius: 0 4px 4px 0; }
.hb__val { min-width: 3.5ch; text-align: right; font-variant-numeric: tabular-nums; }

/* tall segmented bar + legend */
.segbar { display: flex; gap: 2px; height: 28px; margin: 6px 0 12px; }
.segbar__part { position: relative; display: flex; align-items: center; min-width: 4px; padding: 0 8px; background: var(--c); border-radius: 4px; }
.segbar__part:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
.segbar__part b { font-size: 12px; color: var(--l, var(--white)); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.legend b { font-variant-numeric: tabular-nums; }

/* table twin and tooltip */
.chart-table { margin-top: 12px; font-size: var(--fs-xs); }
.chart-table summary { cursor: pointer; color: var(--slate); font-weight: 700; width: max-content; }
.chart-table summary:focus-visible { box-shadow: var(--focus); outline: none; border-radius: 4px; }
.chart-table table { width: 100%; margin-top: 8px; border-collapse: collapse; }
.chart-table th, .chart-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.chart-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.chart-tip { position: absolute; z-index: 60; display: grid; gap: 1px; padding: 8px 10px; background: var(--ink); color: var(--white); border-radius: 8px; font-size: 12px; pointer-events: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); max-width: 240px; }
.chart-tip strong { font-size: 14px; }
.chart-tip span, .chart-tip small { color: rgba(255, 255, 255, .78); }

/* --- compact lists on dashboards --- */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list__main { display: grid; gap: 2px; min-width: 0; }
.mini-list__main a { font-weight: 700; color: var(--ink); }
.mini-list__main small { color: var(--slate); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .progress { grid-column: 1 / -1; margin: 4px 0 0; }
.mini-list .progress i { height: 4px; }
.feed--compact li small { color: var(--slate); }

/* --- phones --- */
@media (max-width: 719px) {
  .dash-actions { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter, 16px) * -1); padding: 2px var(--gutter, 16px) 6px; scrollbar-width: none; }
  .dash-actions::-webkit-scrollbar { display: none; }
  .dash-actions > * { flex: none; }
  .dash-more__menu { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px; column-gap: 10px; }
  .tile__icon { width: 30px; height: 30px; border-radius: 8px; }
  .tile__icon svg { width: 16px; height: 16px; }
  .tile__value { font-size: 1.45rem; }
  .tile--hero { grid-column: 1 / -1; }
  .cols__plot { height: 150px; margin-left: 38px; }
  .cols__x { margin-left: 38px; }
  .hb__row { grid-template-columns: minmax(0, 1fr) auto; }
  .hb__track { grid-column: 1 / -1; grid-row: 2; height: 10px; }
}
@media (prefers-reduced-motion: reduce) { .tile, a.tile { transition: none; } }
@media print { .dash-actions, .dash-filter .period, .chart-table summary { display: none; } .chart-table[open] table { display: table; } }

/* --- grouped menu: sections with their screens inside ------------------ */
.nav-group { display: grid; gap: 2px; }
.nav-group__btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: rgba(255, 255, 255, .8); font: 700 var(--fs-sm)/1.2 var(--font-body); text-align: left; cursor: pointer; }
.nav-group__btn svg { flex: none; opacity: .85; }
.nav-group__btn:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.nav-group__btn:focus-visible, .app-nav a:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--white); }
.nav-group.is-here > .nav-group__btn { color: var(--white); }
.nav-group__total { margin-left: auto; display: flex; }
.nav-group__total .count { margin-left: 0; }
.nav-group__btn[aria-expanded="true"] .nav-group__total { display: none; }
.nav-group__chev { margin-left: 6px; transition: transform .15s ease; }
.nav-group__btn[aria-expanded="true"] .nav-group__chev { transform: rotate(90deg); }
.nav-group__btn:not([aria-expanded="true"]) .nav-group__total:empty + .nav-group__chev { margin-left: auto; }
.nav-group__btn[aria-expanded="true"] .nav-group__chev { margin-left: auto; }
.nav-group__items { display: grid; gap: 2px; margin: 0 0 4px 21px; padding-left: 11px; border-left: 1px solid rgba(255, 255, 255, .16); }
.nav-group__items[hidden] { display: none; }
.app-nav .nav-group__items a { min-height: 40px; padding: 0 10px; font-size: var(--fs-xs); }

/* --- section tabs above the page --------------------------------------- */
.subnav { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.subnav__title { flex: none; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.subnav__tabs { display: flex; gap: 4px; padding: 3px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; scrollbar-width: none; }
.subnav__tabs::-webkit-scrollbar { display: none; }
.subnav__tabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 8px; color: var(--slate); font-size: var(--fs-xs); font-weight: 700; text-decoration: none; white-space: nowrap; }
.subnav__tabs a:hover { color: var(--ink); background: var(--concrete); }
.subnav__tabs a[aria-current="page"] { background: var(--ink); color: var(--white); }
.subnav__tabs a:focus-visible { outline: none; box-shadow: var(--focus); }
.subnav .count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: var(--white); font-size: 10px; text-align: center; }
@media (max-width: 719px) {
  .subnav { flex-direction: column; align-items: stretch; gap: 8px; }
  .subnav__tabs { margin: 0 calc(var(--gutter, 16px) * -1); border-radius: 0; border-width: 1px 0; padding: 4px var(--gutter, 16px); }
}
@media (prefers-reduced-motion: reduce) { .nav-group__chev { transition: none; } }
@media print { .subnav { display: none; } }

/* --- lists: quick views and clear filters --- */
.dt__views { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.dt__views button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--steel); font: 700 var(--fs-xs)/1 var(--font-body); cursor: pointer; }
.dt__views button span { color: var(--slate); font-weight: 400; font-variant-numeric: tabular-nums; }
.dt__views button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.dt__views button[aria-pressed="true"] span { color: rgba(255, 255, 255, .75); }
.dt__views button:focus-visible { outline: none; box-shadow: var(--focus); }
.dt__clear { align-self: end; min-height: 40px; }
.dt__clear[hidden] { display: none; }
@media (max-width: 719px) { .dt__views { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -4px; } .dt__views button { flex: none; } }

/* --- driver: two upload buttons, and updates waiting for signal --- */
.drv-actions--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drv-actions--2 .btn--xl { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; margin: 0; font-size: var(--fs-base); cursor: pointer; }
.field .drv-actions--2 label.btn--dark { color: var(--white); }
.field .drv-actions--2 label.btn--outline { color: var(--ink); }
.label { display: block; margin-bottom: 6px; font-weight: 700; font-size: var(--fs-sm); }
.outbox { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: var(--warn-50); border: 1px solid #ecd3a2; color: #5e3e00; font-weight: 700; font-size: var(--fs-sm); }

/* --- global search --- */
.app-search { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--concrete); color: var(--slate); font: 700 var(--fs-xs)/1 var(--font-body); cursor: pointer; }
.app-search:hover { border-color: var(--line-strong); color: var(--ink); }
.app-search:focus-visible { outline: none; box-shadow: var(--focus); }
.app-search kbd { padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--white); font: 400 11px/1.2 var(--font-body); }
@media (max-width: 719px) { .app-search { width: 44px; height: 44px; padding: 0; justify-content: center; } .app-search span, .app-search kbd { display: none; } }
.gsearch { width: min(640px, 94vw); padding: 0; margin-top: 10vh; }
.gsearch__box { padding: 14px; }
.gsearch__box .input { font-size: var(--fs-base); }
.gsearch__list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 52vh; overflow: auto; }
.gsearch__list a { display: grid; grid-template-columns: 76px 1fr; gap: 2px 10px; padding: 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.gsearch__list a small { grid-column: 2; color: var(--slate); font-size: var(--fs-xs); }
.gsearch__list [aria-selected="true"] a, .gsearch__list a:hover { background: var(--concrete); }
.gsearch__kind { grid-row: span 2; align-self: center; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
.gsearch__empty { padding: 14px 10px; color: var(--slate); font-size: var(--fs-sm); }
.gsearch__hint { margin: 10px 0 0; font-size: 11px; color: var(--slate); }

/* --- load detail tabs --- */
.tabset { margin-top: 16px; }
.tabset__list { display: flex; gap: 4px; padding: 3px; margin-bottom: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; scrollbar-width: none; }
.tabset__list::-webkit-scrollbar { display: none; }
.tabset__list [role=tab] { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 8px; background: none; color: var(--slate); font: 700 var(--fs-sm)/1 var(--font-body); cursor: pointer; }
.tabset__list [role=tab][aria-selected="true"] { background: var(--ink); color: var(--white); }
.tabset__list [role=tab]:focus-visible { outline: none; box-shadow: var(--focus); }
.tabset__n { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: var(--concrete); color: var(--ink); font-size: 11px; }
[role=tabpanel]:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 12px; }


/* --- settings: event checkboxes --- */
.checks-grid { display: grid; gap: 16px; margin: 12px 0; }
@media (min-width: 900px) { .checks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.checks { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 6px; }
.checks legend { padding: 0 6px; font-weight: 700; display: flex; gap: 8px; align-items: center; }

/* phones: route and delivery lines wrap instead of running under the View button */
@media (max-width: 719px) {
  .mini-list__main small { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
}

/* =============================================================================
   Website: visits, form funnels, page speed and heatmaps (views-site.js)
   ============================================================================= */
.speed { font-weight: 700; }
.speed--ok { color: #2E8F62; }
.speed--warn { color: #9A6700; }
.speed--danger { color: var(--red, #C21E23); }
.heat-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.heat-bar__page { flex: 1 1 280px; margin: 0; min-width: 0; }
.heat-bar__page select { width: 100%; }
.heat-layout { display: grid; gap: 16px; }
@media (min-width: 1100px) { .heat-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.heat-side { display: grid; gap: 16px; min-width: 0; }
.heat-stage { overflow: hidden; padding: 12px; min-width: 0; }
.heat-frame { position: relative; transform-origin: top left; background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.heat-frame iframe { display: block; border: 0; pointer-events: none; }
.heat-frame canvas { position: absolute; inset: 0; pointer-events: none; }
.heat-depth { position: absolute; top: 0; left: calc(100% + 12px); bottom: 0; width: 60px; pointer-events: none; }
.heat-depth span { position: absolute; left: 0; right: 0; background: #252326; border-bottom: 1px solid rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center; }
.heat-depth b { color: #fff; font-size: 22px; font-weight: 700; }
.heat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; }
.heat-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle, rgba(194, 30, 35, .9), rgba(194, 30, 35, 0)); vertical-align: middle; }
.heat-dot--dead { background: radial-gradient(circle, rgba(208, 138, 0, .9), rgba(208, 138, 0, 0)); }

.heat-box { position: relative; overflow: hidden; }
.heat-stage { overflow: visible; }
/* click targets are page text: they wrap instead of running under the count */
.heat-side .hb__row { min-width: 0; }
.heat-side .hb__label { min-width: 0; white-space: normal; overflow-wrap: anywhere; }

/* 11-motion.css */
/* =============================================================================
   Motion for the public website (src/js/motion.js). One easing, short distances, no bounce.
   Everything here is off under prefers-reduced-motion (01-base.css shortens it to nothing,
   and motion.js does not mark anything to reveal).
   ============================================================================= */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }

/* --- scroll reveal ------------------------------------------------------------ */
.rv { transition: opacity 650ms var(--ease-out) var(--rv-d, 0ms), transform 800ms var(--ease-out) var(--rv-d, 0ms); }
.rv--rise:not(.is-in) { opacity: 0; transform: translate3d(0, 22px, 0); }
.rv--media { overflow: hidden; }
.rv--media:not(.is-in) { opacity: 0; transform: scale(.985); }
.rv--media img { transition: transform 1400ms var(--ease-out); }
.rv--media:not(.is-in) img { transform: scale(1.06); }
.rv.rv-done { transition-delay: 0ms; }
@media (max-width: 719px) { .rv--rise:not(.is-in) { transform: translate3d(0, 14px, 0); } }

/* --- hero: the photo settles and the brand curve sweeps in once ---------------- */
@keyframes tfs-photo-settle { from { transform: scale(1.06); } }
@keyframes tfs-sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.hero__media img, .page-hero__media img { animation: tfs-photo-settle 1600ms var(--ease-out) both; transform-origin: 70% 50%; }
.hero__curve { animation: tfs-sweep 1100ms 250ms var(--ease-out) both; }

/* --- header lifts off the page once it scrolls -------------------------------- */
.site-header { transition: box-shadow 250ms var(--ease-out); }
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(37, 35, 38, .06), 0 8px 24px rgba(37, 35, 38, .08); }

/* --- hover (pointer devices only) ------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .btn--primary, .btn--dark { transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out); }
  .btn--primary:hover, .btn--dark:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(194, 30, 35, .22); }
  .btn--dark:hover { box-shadow: 0 8px 18px rgba(37, 35, 38, .22); }
  .service-card, .audience-card { transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out), border-color var(--t) var(--ease); }
  .service-card:hover, .audience-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(37, 35, 38, .10); }
  .haul__list a { transition: background-color var(--t-fast) var(--ease), transform var(--t) var(--ease-out); }
  .haul__list a:hover .cargo-icon { transform: translateY(-2px); }
  .haul__list .cargo-icon { transition: transform var(--t) var(--ease-out), color var(--t-fast) var(--ease); }
}

/* --- press feedback on touch screens ---------------------------------------- */
@media (hover: none) {
  .btn:active, .service-card:active, .audience-card:active, .haul__list a:active { transform: scale(.98); transition: transform 90ms var(--ease); }
}

/* 12-tables.css */
/* ==========================================================================
   Batch 2 (from ERP Base): table tools (column filters, column chooser, export menu, row selection),
   searchable dropdowns, loading placeholders, sound switch, custom period on dashboards.
   ========================================================================== */

/* --- table tools -------------------------------------------------------- */
.dt__tools { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; align-items: end; }
.dt__bar .dt__tools .btn { margin-left: 0; }
.dt__n { font-variant-numeric: tabular-nums; }
.dt__menu { position: relative; }
.dt__menu > [data-menu]::after { content: ''; width: 8px; height: 8px; margin-left: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.dt__menu > [aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.dt__pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 35; min-width: 220px; max-height: min(60vh, 420px); overflow: auto; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(37, 35, 38, .3); }
.dt__pop[hidden] { display: none; }
.dt__pop fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.dt__pop legend { font-size: 12px; font-weight: 700; color: var(--slate); padding: 0 0 6px; }
.dt__pop .check { align-items: center; min-height: 36px; }
.dt__pop .check input:disabled + span { color: var(--slate); }
.dt__pop--list { display: grid; gap: 2px; padding: 6px; }
.dt__pop--list button { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font: 700 var(--fs-sm)/1 var(--font-body); color: var(--ink); text-align: left; cursor: pointer; }
.dt__pop--list button small { color: var(--slate); font-weight: 400; }
.dt__pop--list button:hover { background: var(--concrete); }
.dt__pop--list p { margin: 4px 10px 6px; font-size: 12px; color: var(--slate); }
@media (max-width: 719px) { .dt__tools { margin-left: 0; } .dt__pop { right: auto; left: 0; } .dt__menu:last-child .dt__pop { left: auto; right: 0; } }

/* column filters: one control per filterable column */
.dt__cf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px 14px; margin: -2px 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--concrete); }
.dt__cf[hidden] { display: none; }
.dt__cf .field { gap: 4px; }
.dt__cf label, .dt__range legend { font-size: 12px; font-weight: 700; color: var(--ink); }
.dt__cf .input, .dt__cf .select { min-height: 40px; padding: 6px 10px; font-size: var(--fs-sm); }
.dt__cf .select { padding-right: 34px; }
.dt__range { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.dt__range legend { padding: 0 0 4px; grid-column: 1 / -1; }
.dt__range > div { display: grid; gap: 2px; min-width: 0; }
.dt__range label { font-weight: 400; color: var(--slate); }

/* row selection */
.dt th.dt__pick, .dt td.dt__pick { width: 44px; padding: 0 0 0 12px; }
.dt__pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); vertical-align: middle; cursor: pointer; }
.dt tbody tr.is-picked { background: var(--red-50); }
.dt__sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--white); }
.dt__sel[hidden] { display: none; }
.dt__sel strong { font-variant-numeric: tabular-nums; }
.dt__sel .btn--dark { background: var(--white); color: var(--ink); border-color: var(--white); }
.dt__sel .btn--outline { color: var(--white); border-color: rgba(255, 255, 255, .6); background: transparent; }
.dt__sel .link-inline { margin-left: auto; min-height: 36px; color: var(--white); }
@media (max-width: 719px) {
  .dt td.dt__pick { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
  .dt td.dt__pick::before { content: 'Select'; }
  .dt__sel .link-inline { margin-left: 0; }
}

/* --- searchable dropdown ---------------------------------------------- */
.combo { position: relative; }
.combo__native { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; pointer-events: none; }
.combo__input { padding-right: 40px; }
.combo__toggle { position: absolute; top: 0; right: 0; width: 40px; height: 100%; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23222224' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center; cursor: pointer; }
.combo__list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; max-height: 260px; overflow: auto; margin: 0; padding: 4px; list-style: none; background: var(--white); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 18px 40px -12px rgba(37, 35, 38, .3); }
.combo__list[hidden] { display: none; }
.combo__list li { padding: 10px 12px; border-radius: 6px; font-size: var(--fs-sm); cursor: pointer; overflow-wrap: anywhere; }
.combo__list li.is-current { font-weight: 700; }
.combo__list li[aria-selected="true"] { background: var(--ink); color: var(--white); }
.combo__list li:not([aria-selected="true"]):hover { background: var(--concrete); }
.combo__none { color: var(--slate); cursor: default; }

/* --- loading placeholders ---------------------------------------------- */
.skel { display: grid; gap: 12px; padding: 6px 0; }
.skel__line { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--concrete) 0%, #e3e4e6 45%, var(--concrete) 90%) 0 0 / 220% 100%; animation: skel 1.3s ease-in-out infinite; }
.skel-row td { padding: 14px 12px; }
.skel-row .skel__line { width: 88%; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -120% 0; } }
/* first paint, before the page's script has drawn anything: a card of placeholder rows, without markup */
.app [data-page][aria-busy="true"]:empty::before {
  content: ''; display: block; height: 380px; border: 1px solid var(--line); border-radius: 12px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .65) 50%, transparent 100%) -120% 0 / 40% 100% no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 28px, var(--concrete) 28px 42px, transparent 42px 56px) 20px 20px / calc(100% - 40px) calc(100% - 40px) no-repeat,
    var(--white);
  animation: skel-page 1.4s ease-in-out infinite;
}
@keyframes skel-page { to { background-position: 220% 0, 20px 20px, 0 0; } }
@media (prefers-reduced-motion: reduce) { .skel__line, .app [data-page][aria-busy="true"]:empty::before { animation: none; } }

/* --- sound alerts switch (My account) -------------------------------- */
.app-menu__switch { grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.app-menu__switch > span { display: grid; gap: 2px; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); transition: background-color var(--t-fast) var(--ease); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--t-fast) var(--ease); }
[aria-checked="true"] > .switch { background: var(--ok); }
[aria-checked="true"] > .switch::after { transform: translateX(16px); }
.app-menu__switch:focus-visible { box-shadow: var(--focus); outline: none; }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }

/* --- dashboards: custom period ----------------------------------------- */
/* five choices don't fit a phone in one row: the switch scrolls sideways instead of widening the page */
.dash-filter .period { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dash-filter .period button { flex: none; }
.dash-section__sub { margin-left: 6px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--slate); }
.dash-range { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px; margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.dash-range[hidden] { display: none; }
.dash-range .field { gap: 4px; min-width: 150px; flex: 0 1 180px; }
.dash-range .field label { font-size: 12px; }
.dash-range .input { min-height: 40px; padding: 6px 10px; font-size: var(--fs-sm); }
.dash-range .btn { min-height: 40px; }
.dash-range .form-error, .dash-range .help { flex: 1 1 100%; margin: 0; }
.dash-span { grid-column: 1 / -1; }
.tiles--period .tile { padding: 12px 14px; }
[data-updated] { white-space: nowrap; }
@media (max-width: 479px) { .dash-range .field { flex: 1 1 100%; min-width: 0; } }
@media print { .dash-range, .dt__tools, .dt__sel, .dt__cf, .dt__pick { display: none !important; } }

/* 13-admin.css */
/* ==========================================================================
   Batch 3 — Settings: Company and Modules, the Email templates screen, the theme choice in the user menu
   ========================================================================== */

/* --- a short index at the top of the long settings page ------------------- */
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.jump a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
.jump a:hover { border-color: var(--ink); color: var(--ink); }
#company, #modules { scroll-margin-top: 80px; }
.card + #company { margin-top: 16px; }

/* --- modules: one row per module with its switch ------------------------- */
.mods { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.mod__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.mod__row:hover { border-color: var(--line-strong); }
.mod__text { display: grid; gap: 3px; min-width: 0; }
.mod__text small { color: var(--slate); font-size: var(--fs-xs); line-height: 1.45; }
.mod__text em { font-style: normal; color: var(--ink); }
.mod__switch { position: relative; display: inline-grid; width: 38px; height: 22px; }
.mod__switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.mod__switch input:checked + .switch { background: var(--ok); }
.mod__switch input:checked + .switch::after { transform: translateX(16px); }
.mod__switch input:focus-visible + .switch { box-shadow: var(--focus); }
[data-mod-why] { display: block; margin: 0 0 12px; }
[data-mod-why][hidden] { display: none; }

/* --- company: fields and the invoice header preview --------------------- */
.company { display: grid; gap: 18px; }
@media (min-width: 1100px) { .company { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .company__preview { position: sticky; top: 84px; } }
.company__fields { display: grid; gap: 14px; min-width: 0; }
.company__group { margin: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.company__group legend { padding: 0 6px; font-size: var(--fs-sm); font-weight: 700; }
.company .textarea { min-height: 76px; }
.logo-pick__opts { display: grid; gap: 10px; }
@media (min-width: 560px) { .logo-pick__opts { grid-template-columns: 1fr 1fr; } }
.logo-pick__opt { display: grid; grid-template-columns: 22px auto 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: var(--fs-sm); cursor: pointer; }
.logo-pick__opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.logo-pick__opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.logo-pick__img { display: grid; place-items: center; width: 104px; height: 50px; border-radius: 6px; border: 1px solid #D9DADC; }
.logo-pick__img--light { background: #FFFFFF; }
.logo-pick__img--dark { background: #252326; border-color: #252326; }
.logo-pick__img img { width: 84px; height: auto; }
.company__preview-title { margin: 0 0 8px; font-size: var(--fs-sm); font-weight: 700; }
/* the preview is paper: it stays white in the dark theme, like the PDF */
.paper { padding: 18px; border-radius: 6px; background: #FFFFFF; color: #252326; box-shadow: 0 0 0 1px #D9DADC, 0 10px 24px -14px rgba(37, 35, 38, .45); font-size: 11px; line-height: 1.45; overflow: hidden; }
.paper__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.paper__logo { display: inline-grid; place-items: center; padding: 6px; border-radius: 4px; }
.paper__logo--dark { background: #252326; padding: 8px 10px; }
.paper__logo img { width: 104px; height: auto; }
.paper__title { display: grid; text-align: right; }
.paper__title strong { font-size: 17px; letter-spacing: .02em; color: #252326; }
.paper__title small { color: #5B6066; font-size: 11px; }
.paper__company { margin: 10px 0 8px; color: #4E5257; overflow-wrap: anywhere; }
.paper__rule { margin: 0 0 10px; border: 0; border-top: 2px solid #C21E23; }
.paper__pay { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.paper__pay div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.paper__pay b { font-size: 10px; color: #4E5257; }
.paper__foot { margin: 12px 0 0; text-align: center; color: #4E5257; font-size: 10px; overflow-wrap: anywhere; }

/* --- email templates ----------------------------------------------------- */
.tpl { display: grid; gap: 16px; }
@media (min-width: 1024px) { .tpl { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } .tpl__list { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; } }
.tpl__list h2 { font-size: var(--fs-base); margin: 0 0 8px; }
.tpl__list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tpl__list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.tpl__list a:hover { background: var(--concrete); color: var(--ink); }
.tpl__list a[aria-current="page"] { background: var(--ink); color: var(--white); font-weight: 700; }
.tpl__list a[aria-current="page"] .st { background: var(--white); color: var(--ink); border-color: var(--white); }
@media (max-width: 1023px) { .tpl__list ul { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; } .tpl__list a { white-space: nowrap; border: 1px solid var(--line); } }
.tpl__main { display: grid; gap: 16px; min-width: 0; }
.tpl__main .field + .field { margin-top: 14px; }
.tpl__body { min-height: 190px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.5; }
.tpl__ph { margin: 16px 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.tpl__ph legend { padding: 0 6px; font-size: var(--fs-sm); font-weight: 700; }
.tpl__ph .help { margin: 0 0 10px; }
.tpl__ph ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tpl__chip { display: grid; gap: 1px; min-height: 44px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.tpl__chip:hover { border-color: var(--ink); }
.tpl__chip code { font-size: 13px; font-weight: 700; color: var(--ink); }
.tpl__chip small { font-size: 11px; color: var(--slate); }
.tpl__subject { margin: 0 0 10px; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.tpl__preview [data-perror] { display: block; margin: 0 0 10px; }
.tpl__preview [data-perror][hidden] { display: none; }
/* the email is shown as it arrives: on its own light page, whatever the portal's theme */
.tpl__frame { display: block; width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 8px; background: #F0F1F2; color-scheme: light; }
.tpl__versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tpl__versions details { border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.tpl__versions summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: var(--fs-sm); }
.tpl__versions summary small { font-size: 12px; }
.tpl__vsub { margin: 4px 0 6px; font-weight: 700; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.tpl__vbody { margin: 0 0 10px; padding: 10px; border-radius: 6px; background: var(--concrete); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.tpl__versions .btn { margin-bottom: 12px; }
[aria-invalid="true"] { border-color: var(--danger) !important; }

/* --- theme choice in the user menu -------------------------------------- */
.theme-pick { margin: 6px 8px 10px; padding: 0; border: 0; min-width: 0; }
.theme-pick legend { padding: 0; margin: 0 0 6px; font-size: var(--fs-sm); font-weight: 700; }
.theme-pick__opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.theme-pick__opts label { position: relative; display: grid; }
.theme-pick__opts input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.theme-pick__opts span { display: grid; place-items: center; min-height: 36px; border-radius: 7px; font-size: var(--fs-sm); font-weight: 700; }
.theme-pick__opts input:checked + span { background: var(--ink); color: var(--white); }
.theme-pick__opts input:focus-visible + span { box-shadow: var(--focus); }
.theme-pick small { display: block; margin-top: 6px; color: var(--slate); font-size: 12px; }

/* 14-dark.css */
/* ==========================================================================
   Dark theme of the portals (Light / Dark / System in the user menu, saved per browser).
   Only html[data-theme="dark"] turns it on, and only layout-app.html sets it: the public website and the sign-in
   pages always keep the brand's light look. Everything sits inside @media screen, so printing and saving as PDF
   use the light colors. Text contrast is checked page by page with tools/dark-check.cjs (4.5:1, 3:1 large text).
   Most of the portal follows from the tokens; the rules below are the places that wrote a light color by hand, or
   that put text on Freight Red or on a colour that changes meaning in the dark.
   ========================================================================== */
:root {
  /* chart colors (charts.js): one set per theme, each mark at least 3:1 on its card */
  --chart-base: #6B7075; --chart-emphasis: #C21E23; --chart-ok: #24774F; --chart-info: #3A73C2; --chart-warn: #D08A00;
  --chart-late-1: #E58A8C; --chart-late-2: #C21E23; --chart-late-3: #7A1215; --chart-neutral: #9EA2A6; --chart-grid: #ECEDEE;
  /* the label written on each color (segmented bars): white on the deep ones, Carbon on the light ones */
  --chart-on-base: #FFFFFF; --chart-on-emphasis: #FFFFFF; --chart-on-ok: #FFFFFF; --chart-on-info: #FFFFFF; --chart-on-warn: #161719;
  --chart-on-late-1: #161719; --chart-on-late-2: #FFFFFF; --chart-on-late-3: #FFFFFF; --chart-on-neutral: #161719;
}

@media screen {
  html[data-theme="dark"] {
    color-scheme: dark;
    --white: #1C1D20;        /* surfaces: cards, tables, inputs, menus, dialogs */
    --concrete: #121315;     /* the page behind them, quiet panels */
    --ink: #ECEDEE;          /* text */
    --steel: #C4C7CB;
    --slate: #A6ABB1;        /* secondary text: 6.9:1 on cards */
    --line: #34373C;
    --line-strong: #51565D;
    --red-50: #3A1C1F;
    --ok: #6CD3A0;   --ok-50: #13281E;
    --info: #8DB8F2; --info-50: #162438;
    --warn: #F0B65A; --warn-50: #2D2310;
    --danger: #F5959D; --danger-50: #3A1A1F;
    --red-text: #FF8F94;     /* Freight Red as text or an icon on a dark surface (the brand red itself is 2.8:1 there) */
    --chart-base: #8A9096; --chart-emphasis: #F0646A; --chart-ok: #4CC38A; --chart-info: #6FA4EC; --chart-warn: #E5A53A;
    --chart-late-1: #F2A3A6; --chart-late-2: #F0646A; --chart-late-3: #C9383E; --chart-neutral: #9EA2A6; --chart-grid: #2C2F33;
    --chart-on-base: #161719; --chart-on-emphasis: #161719; --chart-on-ok: #161719; --chart-on-info: #161719; --chart-on-warn: #161719;
    --chart-on-late-1: #161719; --chart-on-late-2: #161719; --chart-on-late-3: #FFFFFF; --chart-on-neutral: #161719;
    background: var(--concrete);
    scrollbar-color: var(--line-strong) var(--concrete);
  }
  html[data-theme="dark"] body.app { background: var(--concrete); color: var(--ink); }

  /* links and the brand accent used as text */
  html[data-theme="dark"] a:hover, html[data-theme="dark"] .link-inline:hover, html[data-theme="dark"] .link-arrow:hover { color: var(--red-text); }
  html[data-theme="dark"] ::selection { background: #8E1619; color: #FFFFFF; }
  html[data-theme="dark"] .tile--brand .tile__icon { color: var(--red-text); }
  html[data-theme="dark"] .speed--ok { color: var(--ok); }
  html[data-theme="dark"] .speed--warn { color: var(--warn); }
  html[data-theme="dark"] .speed--danger { color: var(--danger); }

  /* text on Freight Red stays white: buttons, counters, the bell's dot */
  html[data-theme="dark"] .btn--primary, html[data-theme="dark"] .btn--primary:hover,
  html[data-theme="dark"] .app-nav .count, html[data-theme="dark"] .subnav .count, html[data-theme="dark"] .app-menu .dot { color: #FFFFFF; }
  html[data-theme="dark"] .field__error::before { color: #161719; }
  /* the dark button turns light (the strongest action on a dark page): its hover can't go to black any more */
  html[data-theme="dark"] .btn--dark:hover { background: #FFFFFF; color: #161719; }
  html[data-theme="dark"] .btn--outline { border-color: var(--line-strong); }
  html[data-theme="dark"] .btn--outline:hover { border-color: var(--ink); }

  /* sidebar: stays darker than the page, with the light pill for the screen that is open */
  html[data-theme="dark"] .app-side { background: linear-gradient(rgba(11, 12, 13, .86), rgba(11, 12, 13, .86)), #0B0C0D url('/assets/brand/grain-dark.svg') repeat 0 0 / 1200px 800px; color: #ECEDEE; box-shadow: inset -1px 0 0 #26282C; }
  html[data-theme="dark"] .app-nav a:hover, html[data-theme="dark"] .nav-group__btn:hover, html[data-theme="dark"] .nav-group.is-here > .nav-group__btn { color: #FFFFFF; }
  html[data-theme="dark"] .app-nav a[aria-current="page"] { background: #ECEDEE; color: #161719; }
  html[data-theme="dark"] .nav-group__btn:focus-visible, html[data-theme="dark"] .app-nav a:focus-visible { box-shadow: 0 0 0 2px #0B0C0D, 0 0 0 4px #ECEDEE; }

  /* top bar, menus, dialogs, toasts */
  html[data-theme="dark"] .app-top { border-bottom-color: var(--line); }
  html[data-theme="dark"] .app-menu__panel, html[data-theme="dark"] .dash-more__menu, html[data-theme="dark"] .dt__pop, html[data-theme="dark"] .combo__list { box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); border-color: var(--line-strong); }
  html[data-theme="dark"] dialog.modal { background: var(--white); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px var(--line); }
  html[data-theme="dark"] dialog.modal::backdrop, html[data-theme="dark"] dialog.drawer::backdrop { background: rgba(0, 0, 0, .66); }
  html[data-theme="dark"] dialog.drawer { box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px var(--line); }
  /* dispatch board: today's column a step lighter than the cards' surface, the cards lifted on hover */
  html[data-theme="dark"] .dcell.is-today { background: #24262A; }
  html[data-theme="dark"] .lcard:hover { box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .8); }
  html[data-theme="dark"] .toast { box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .8); }
  html[data-theme="dark"] .chart-tip { background: #ECEDEE; color: #161719; }
  html[data-theme="dark"] .chart-tip span, html[data-theme="dark"] .chart-tip small { color: #3E4247; }

  /* status colors written by hand for the light page */
  html[data-theme="dark"] .st--info, html[data-theme="dark"] .badge--transit { border-color: #2C4669; }
  html[data-theme="dark"] .st--ok, html[data-theme="dark"] .badge--ok { border-color: #22513B; }
  html[data-theme="dark"] .st--warn, html[data-theme="dark"] .badge--demo { border-color: #5A4419; }
  html[data-theme="dark"] .st--danger { border-color: #5E2A31; }
  html[data-theme="dark"] .st:not([class*="st--"]) { border-color: var(--line-strong); }
  html[data-theme="dark"] .notice--info, html[data-theme="dark"] .sysdown { border-color: #2C4669; color: #D4E3F8; }
  html[data-theme="dark"] .notice--warn, html[data-theme="dark"] .outbox, html[data-theme="dark"] .demo-banner { border-color: #5A4419; color: #F6DDAE; }
  html[data-theme="dark"] .notice--ok { border-color: #22513B; color: #C7EED9; }
  html[data-theme="dark"] .notice--danger { border-color: #5E2A31; color: #FFD0D4; }
  html[data-theme="dark"] .form-error { color: #FFD0D4; }
  html[data-theme="dark"] .tile--danger { border-color: #5E2A31; }
  html[data-theme="dark"] a.tile:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }

  /* forms */
  html[data-theme="dark"] .input::placeholder, html[data-theme="dark"] .textarea::placeholder { color: #9A9FA6; }
  html[data-theme="dark"] .input:focus, html[data-theme="dark"] .select:focus, html[data-theme="dark"] .textarea:focus { box-shadow: 0 0 0 3px rgba(141, 184, 242, .28); }
  html[data-theme="dark"] .check input, html[data-theme="dark"] .dt__pick input, html[data-theme="dark"] .logo-pick__opt input { accent-color: #E2474C; }
  html[data-theme="dark"] input, html[data-theme="dark"] textarea { caret-color: var(--ink); }
  /* the dropdown arrows were drawn in Carbon */
  html[data-theme="dark"] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23ECEDEE' stroke-width='1.6'/%3E%3C/svg%3E"); }
  html[data-theme="dark"] .combo__toggle { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23ECEDEE' stroke-width='1.6'/%3E%3C/svg%3E"); }

  /* tables, lists, skeletons */
  html[data-theme="dark"] .dt tbody tr:hover { background: rgba(255, 255, 255, .035); }
  html[data-theme="dark"] .dt__sel .btn--outline { border-color: rgba(22, 23, 25, .5); }
  html[data-theme="dark"] .dt__views button[aria-pressed="true"] span { color: rgba(22, 23, 25, .78); }
  html[data-theme="dark"] .skel__line { background-image: linear-gradient(90deg, var(--concrete) 0%, #2A2C30 45%, var(--concrete) 90%); }
  html[data-theme="dark"] .app [data-page][aria-busy="true"]:empty::before {
    background:
      linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .05) 50%, transparent 100%) -120% 0 / 40% 100% no-repeat,
      repeating-linear-gradient(to bottom, transparent 0 28px, var(--concrete) 28px 42px, transparent 42px 56px) 20px 20px / calc(100% - 40px) calc(100% - 40px) no-repeat,
      var(--white);
  }

  /* switches: a white knob on a track that reads as on or off in the dark */
  html[data-theme="dark"] .switch::after { background: #F4F5F6; }
  html[data-theme="dark"] [aria-checked="true"] > .switch, html[data-theme="dark"] .mod__switch input:checked + .switch { background: #2E9E6A; }

  /* charts: the grid is a hairline */
  html[data-theme="dark"] .cols__grid span { border-top-color: var(--chart-grid); }
  html[data-theme="dark"] .cols__bar:hover, html[data-theme="dark"] .cols__bar:focus-visible, html[data-theme="dark"] .segbar__part:focus-visible { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
  html[data-theme="dark"] .bars i { background: var(--chart-base); }

  /* heatmaps: the page itself is shown as visitors see it (light); only the frame around it follows the theme */
  html[data-theme="dark"] .heat-frame { box-shadow: 0 0 0 1px var(--line-strong); }
}

/* 15-board.css */
/* ==========================================================================
   Dispatch board (views-board.js): drivers by day, loads as cards, and the "Edit load" drawer.
   Only tokens: the dark theme follows from 14-dark.css without rules of its own here.
   The grid scrolls inside its own box (both ways on wider screens, sideways on phones), never the page.
   ========================================================================== */
.dboard { min-width: 0; }
.dboard__bar { display: grid; gap: 10px; padding: 12px 14px; margin-bottom: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.dboard__period, .dboard__tools { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; min-width: 0; }
.dboard__nav { display: flex; align-items: center; gap: 2px; margin-right: auto; min-width: 0; }
.dboard__range { margin: 0 6px; font-size: var(--fs-base); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dboard__arrow { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); color: var(--ink); font: 700 18px/1 var(--font-body); cursor: pointer; }
.dboard__arrow:hover { border-color: var(--ink); }
.dboard__bar .field { gap: 4px; }
.dboard__bar .field label { font-size: 12px; }
.dboard__bar .input, .dboard__bar .select { min-height: 40px; padding: 6px 12px; font-size: var(--fs-sm); }
.dboard__bar .select { padding-right: 34px; }
.dboard__date { width: 170px; }
.dboard__search { flex: 1 1 240px; }
.dboard__tools > .field:not(.dboard__search) { flex: 0 1 170px; }
.dboard__tools .dt__menu { align-self: end; }
/* days shown: a segmented control */
.dboard__days { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--concrete); }
.dboard__days span { padding: 0 8px 0 6px; font-size: 12px; font-weight: 700; color: var(--steel); }
.dboard__days button { min-width: 34px; min-height: 32px; border: 0; border-radius: 7px; background: none; color: var(--steel); font: 700 var(--fs-sm)/1 var(--font-body); cursor: pointer; font-variant-numeric: tabular-nums; }
.dboard__days button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.dboard__filter { width: min(320px, 86vw); display: grid; gap: 10px; padding: 12px; }
.dboard__filter .link-inline { justify-self: start; }
/* legend: a swatch drawn like the cards, and the name in text (never colour alone) */
.dboard__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 12px; font-weight: 700; color: var(--steel); }
.dboard__legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 18px; height: 12px; border-radius: 3px; border: 1px solid var(--line); border-left-width: 4px; background: var(--white); }
.dboard__count { margin: 0 0 8px; font-size: var(--fs-xs); color: var(--slate); }

/* --- the grid ---------------------------------------------------------- */
.dboard__scroll { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--white); overscroll-behavior-x: contain; }
.dboard__scroll:focus-visible { outline: none; box-shadow: var(--focus); }
@media (min-width: 720px) { .dboard__scroll { max-height: max(440px, calc(100dvh - 300px)); } }
.dgrid { --who: 196px; --day: 104px; --notes: 236px; min-width: calc(var(--who) + var(--n) * var(--day) + var(--notes)); font-size: var(--fs-sm); }
.dgrid__head, .drow { display: grid; grid-template-columns: var(--who) repeat(var(--n), minmax(var(--day), 1fr)) var(--notes); }
.dgrid__head { position: sticky; top: 0; z-index: 4; background: var(--concrete); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--steel); }
.dgrid__head > div { display: flex; align-items: baseline; gap: 4px; min-height: 36px; padding: 9px 10px; border-left: 1px solid var(--line); white-space: nowrap; }
.dgrid__head b { color: var(--ink); font-size: var(--fs-sm); }
.dgrid__corner { position: sticky; left: 0; z-index: 1; border-left: 0 !important; background: var(--concrete); font-weight: 700; }
.dgrid__notes { position: sticky; right: 0; z-index: 1; background: var(--concrete); font-weight: 700; }
.dgrid__day.is-today { color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--red); }
.dgrid__rows { margin: 0; padding: 0; list-style: none; }
.drow { border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: 0; }
.drow--empty { display: block; }
/* notes column switched off (toolbar): the days get its room */
.dgrid--nonotes { --notes: 0px; }
.dgrid--nonotes .drow__notes, .dgrid--nonotes .dgrid__notes { display: none; }

/* the driver: sticky on the left while the days scroll */
.drow__who { position: sticky; left: 0; z-index: 2; display: flex; gap: 10px; align-items: flex-start; min-width: 0; padding: 10px 10px 10px 12px; background: var(--white); box-shadow: 1px 0 0 var(--line); }
.drow__av { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--white); font-size: 12px; font-weight: 700; }
.drow__av--open { background: var(--concrete); color: var(--ink); border: 1px dashed var(--line-strong); }
.drow__id { display: grid; gap: 1px; min-width: 0; }
.drow__name, .drow__line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow__name { color: var(--ink); }
.drow__line { font-size: 12px; color: var(--slate); }
.drow__free { color: var(--ok); font-weight: 700; }
.drow__flag { justify-self: start; margin: 2px 0; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--concrete); color: var(--steel); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.drow.is-inactive .drow__av { background: var(--concrete); color: var(--steel); border: 1px solid var(--line-strong); }
.drow--open .drow__who, .drow--open .drow__notes { background: var(--concrete); }

/* the days: one cell per day behind the cards, a lane per overlapping load */
.drow__days { grid-column: 2 / span var(--n); display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: repeat(var(--lanes), minmax(68px, auto)); padding: 4px 0; min-width: 0; }
.dcell { grid-row: 1 / -1; margin: -4px 0; border-left: 1px solid var(--line); }
.dcell.is-today { background: var(--concrete); }
.drow--open { background: var(--concrete); }

/* a load: its colour is its stage, its first line says the stage in words */
.lcard { position: relative; z-index: 1; display: grid; align-content: start; gap: 1px; min-width: 0; margin: 3px 4px; padding: 6px 8px 6px 9px; text-align: left; font: inherit; font-size: 12px; line-height: 1.35; color: var(--ink); cursor: pointer;
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--slate); border-radius: 6px; transition: box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.lcard:hover { box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35); }
.lcard:focus-visible { outline: none; box-shadow: var(--focus); }
.lcard > span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard__top { color: var(--steel); }
.lcard__top b { color: var(--ink); }
.lcard__from, .lcard__to { font-weight: 700; font-size: var(--fs-sm); }
.lcard__to small { font-weight: 400; color: var(--steel); }
.lcard__t1, .lcard__t2 { color: var(--steel); }
.lcard:not(.lcard--wide) .lcard__to::before { content: '→ '; }
/* two days or more: origin and pickup on the left, destination and delivery on the right, as in EZLoads */
.lcard--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "top top" "from to" "t1 t2"; column-gap: 12px; }
.lcard--wide .lcard__top { grid-area: top; } .lcard--wide .lcard__from { grid-area: from; } .lcard--wide .lcard__to { grid-area: to; text-align: right; }
.lcard--wide .lcard__t1 { grid-area: t1; } .lcard--wide .lcard__t2 { grid-area: t2; text-align: right; }
.lcard--new { border-left-color: var(--slate); }
.lcard--route { background: var(--info-50); border-left-color: var(--info); }
.lcard--alert { background: var(--danger-50); border-left-color: var(--danger); }
.lcard--done { background: var(--ok-50); border-left-color: var(--ok); }
/* cut by the period: square, dashed edge on the side where the load goes on */
.lcard--cutl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dashed; }
.lcard--cutr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 2px dashed var(--line-strong); }
.swatch--new { border-left-color: var(--slate); }
.swatch--route { background: var(--info-50); border-left-color: var(--info); }
.swatch--alert { background: var(--danger-50); border-left-color: var(--danger); }
.swatch--done { background: var(--ok-50); border-left-color: var(--ok); }

/* notes column: sticky on the right on wide screens */
.drow__notes { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 8px 12px; background: var(--white); box-shadow: -1px 0 0 var(--line); position: sticky; right: 0; z-index: 2; }
.drow__acts { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.drow__acts .link-inline { min-height: 28px; font-size: 12px; }
.nlist { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nlist li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nlist__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--steel); }
.nlist__t b { color: var(--danger); }
.nlist__more, .nlist__none { margin: 0; font-size: 12px; color: var(--slate); }
.nbadge { flex: none; display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); border-left: 3px solid var(--slate); background: var(--white); color: var(--ink); font: 700 11px/1.5 var(--font-body); white-space: nowrap; }
button.nbadge { min-height: 30px; padding: 0 10px; cursor: pointer; }
.nbadge--route { background: var(--info-50); border-left-color: var(--info); }
.nbadge--alert { background: var(--danger-50); border-left-color: var(--danger); }
.nbadge--done { background: var(--ok-50); border-left-color: var(--ok); }

@media (max-width: 719px) {
  .dboard__bar { padding: 10px; }
  .dboard__nav { width: 100%; margin-right: 0; }
  /* the range wraps instead of running under the arrows at 320 px */
  .dboard__range { flex: 1; min-width: 0; text-align: center; font-size: var(--fs-sm); white-space: normal; line-height: 1.25; }
  /* a day column is narrow on a phone: a card that spans days lists origin and destination one under the other */
  .lcard--wide { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "from" "t1" "to" "t2"; }
  .lcard--wide .lcard__to, .lcard--wide .lcard__t2 { text-align: left; }
  .lcard--wide .lcard__to::before { content: '→ '; }
  .dboard__date { flex: 1 1 140px; width: auto; }
  .dboard__days { flex: 1 1 100%; justify-content: space-between; }
  .dboard__days button { flex: 1; }
  .dboard__tools > .field:not(.dboard__search) { flex: 1 1 130px; }
  .dboard__search { flex-basis: 100%; }
  /* phones: a narrow driver column stays; notes scroll with the days */
  .dgrid { --who: 124px; --day: 112px; --notes: 210px; }
  .drow__who { padding: 8px; gap: 0; }
  .drow__av { display: none; }
  .drow__notes, .dgrid__notes { position: static; }
}

/* --- the "Edit load" drawer -------------------------------------------- */
dialog.drawer { position: fixed; inset: 0 0 0 auto; width: min(980px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 14px 0 0 14px;
  display: none; flex-direction: column; background: var(--white); color: var(--ink); box-shadow: -30px 0 80px -30px rgba(37, 35, 38, .6); }
dialog.drawer[open] { display: flex; animation: drawer-in var(--t) var(--ease); }
dialog.drawer::backdrop { background: rgba(37, 35, 38, .5); }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { dialog.drawer[open] { animation: none; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.drawer__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.drawer__title h2 { margin: 0; font-size: var(--fs-md); }
.drawer__title h2:focus { outline: none; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 16px; }
.drawer__body > * { min-width: 0; }
.drawer__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--concrete); }
.drawer__others { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--steel); }

/* route: start, then each stop, with the miles between them */
.droute { display: grid; gap: 8px; }
.droute__list { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0; padding: 0; list-style: none; }
.droute__stop { display: grid; align-content: start; gap: 1px; min-width: 150px; max-width: 240px; padding: 10px 12px; border: 1px solid var(--line); border-top: 3px solid var(--slate); border-radius: 8px; background: var(--white); font-size: 12px; }
.droute__stop small { font-weight: 700; color: var(--slate); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.droute__stop strong { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.droute__stop span { color: var(--steel); overflow-wrap: anywhere; }
.droute__stop--start { background: var(--concrete); border-style: dashed; border-top-style: solid; }
.droute__stop--pu { border-top-color: var(--ok); }
.droute__stop--del { border-top-color: var(--info); }
.droute__leg { display: grid; place-items: center; align-content: center; min-width: 48px; color: var(--steel); }
.droute__leg span[aria-hidden] { font-size: 20px; line-height: 1; }
.droute__leg small { font-size: 12px; font-weight: 700; white-space: nowrap; }
.droute__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: var(--fs-sm); }
.droute__help { max-width: 80ch; margin: 0; font-size: 12px; color: var(--slate); }

/* the four sections, then notes and tabs */
.dsecs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.dsec { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.dsec__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dsec__head h3 { margin: 0; font-size: var(--fs-base); }
.dsec__n { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--concrete); font-size: 11px; text-align: center; vertical-align: middle; }
.dsec__edit { min-height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--white); color: var(--ink); font: 700 12px/1 var(--font-body); cursor: pointer; }
.dsec__edit:hover { border-color: var(--ink); }
.dsec__dl { display: grid; gap: 7px; margin: 0; }
.dsec__dl > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 8px; align-items: baseline; }
.dsec__dl dt { font-size: 12px; color: var(--slate); }
.dsec__dl dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.dsec__dl dd small { font-weight: 400; }
.dsec__dl .link-inline { min-height: 28px; font-size: 12px; }
.dsec__none { margin: 0; }
.dnotes { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.dnotes li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dnotes li:last-child { border-bottom: 0; }
.dnotes p { margin: 0; overflow-wrap: anywhere; }
.dnotes p b { color: var(--danger); }
.dnotes small { color: var(--slate); font-size: 12px; }
.dtabs { margin-top: 0; }
.dtabs [role=tabpanel] { padding: 4px 2px; }
.dtabs__acts { margin-bottom: 10px; }
.dtabs__sum { margin: 10px 0 0; font-size: 12px; color: var(--steel); }
.dtabs__dl { margin-bottom: 12px; }
.dtabs__note { margin: 10px 0 0; font-size: var(--fs-sm); }
.dtabs__h { margin: 14px 0 4px; font-size: var(--fs-sm); }
.dhist strong { font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 719px) {
  /* phones: the drawer is the whole screen */
  dialog.drawer { width: 100vw; border-radius: 0; }
  .drawer__head, .drawer__body, .drawer__foot { padding-left: 16px; padding-right: 16px; }
  .droute__list { flex-direction: column; flex-wrap: nowrap; }
  .droute__stop { max-width: none; }
  .droute__leg { grid-auto-flow: column; justify-content: start; gap: 8px; min-height: 24px; padding-left: 14px; }
  .droute__leg span[aria-hidden] { transform: rotate(90deg); }
  .drawer__foot .btn { flex: 1; }
}
/* the "Notes column" switch reads as on or off, not only by its colour */
.dboard__toggle[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.dboard__toggle::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; }
.dboard__toggle[aria-pressed="true"]::before { background: currentColor; }
