/*
Theme Name: COSO Logistics Loadboard
Theme URI: https://shipcoso.com
Author: COSO Logistics
Author URI: https://shipcoso.com
Description: Custom high-tech load board theme for COSO Logistics — post loads, search/filter freight, carrier & shipper dashboards, and booking workflow, all built natively for WordPress (no page builder required).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: coso-loadboard
*/

/* Base variables — clean corporate tech palette */
:root {
  --coso-navy: #0b1f3a;
  --coso-blue: #0b63f6;
  --coso-teal: #38bdf8;
  --coso-teal-dark: #0ea5e9;
  --coso-bg: #f5f7fa;
  --coso-card: #ffffff;
  --coso-border: #e2e8f0;
  --coso-text: #1b2430;
  --coso-text-muted: #5b6b7c;
  --coso-success: #1f9d55;
  --coso-warning: #d97706;
  --coso-danger: #dc2626;
  --coso-radius: 10px;
  --coso-shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --coso-shadow-lg: 0 8px 24px rgba(16,24,40,.10);
  --coso-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Accessibility: a clear, consistent keyboard focus ring on every
   interactive element (WCAG 2.4.7). Only shows for keyboard users. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.coso-btn:focus-visible {
  outline: 3px solid #1f7ae0;
  outline-offset: 2px;
  border-radius: 6px;
}

body {
  font-family: var(--coso-font);
  background: var(--coso-bg);
  color: var(--coso-text);
  margin: 0;
  line-height: 1.5;
}

a { color: var(--coso-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Global type scale — clear, deliberate hierarchy so headings always read
   as bolder AND larger than the copy beneath them. */
h1, h2, h3, h4, h5, h6 {
  color: var(--coso-navy);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
h1 { font-size: 40px; }
h2 { font-size: 30px; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
h4 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
p { line-height: 1.62; }

.coso-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Site header */
.coso-site-header {
  background: var(--coso-navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--coso-shadow);
}
.coso-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  flex-wrap: wrap;
  row-gap: 10px;
}
.coso-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.coso-logo:hover { text-decoration: none; }
.coso-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--coso-teal) 0%, var(--coso-blue) 100%);
  position: relative;
  overflow: hidden;
}
.coso-logo-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,.35) 0px,
    rgba(255,255,255,.35) 2px,
    transparent 2px,
    transparent 9px
  );
}
.coso-logo-mark::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.65), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
}
.coso-logo:hover .coso-logo-mark::after { left: 130%; }
@media (prefers-reduced-motion: reduce) { .coso-logo-mark::after { transition: none; } }
.coso-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.coso-logo-word {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.coso-logo-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--coso-teal);
}
.coso-nav { display: flex; align-items: center; gap: 4px; }
.coso-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.coso-nav li { list-style: none; margin: 0; }
.coso-nav a {
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.coso-nav a.coso-nav-cta {
  background: var(--coso-blue);
  color: #fff;
  font-weight: 600;
}
.coso-nav a.coso-nav-cta:hover {
  background: var(--coso-teal-dark);
  text-decoration: none;
}
.coso-nav a:hover, .coso-nav a.active { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.coso-header-cta { display: flex; gap: 10px; align-items: center; }

.coso-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
}
.coso-btn-primary {
  background: linear-gradient(135deg, var(--coso-teal) 0%, var(--coso-teal-dark) 100%);
  color: #04201e;
  position: relative;
  overflow: hidden;
}
.coso-btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  transition: left .5s ease;
}
.coso-btn-primary:hover::after { left: 130%; }
.coso-btn-primary:hover { background: linear-gradient(135deg, var(--coso-teal-dark) 0%, var(--coso-blue) 100%); color: #fff; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .coso-btn-primary::after { transition: none; } }
.coso-btn-outline { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.coso-btn-outline:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.coso-btn-ghost { background: transparent; color: var(--coso-blue); border-color: var(--coso-border); }
.coso-btn-ghost:hover { background: #eef2f7; text-decoration: none; }
.coso-btn-sm { padding: 6px 12px; font-size: 13px; }
.coso-btn-block { width: 100%; justify-content: center; }
.coso-btn-danger { background: #fee2e2; color: var(--coso-danger); }

/* Hero */
.coso-hero {
  background: linear-gradient(135deg, var(--coso-navy) 0%, #12335c 60%, var(--coso-blue) 100%);
  color: #fff;
  padding: 72px 24px 90px;
  position: relative;
  overflow: hidden;
}
.coso-hero-inner { max-width: 1200px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.coso-hero h1, .coso-hero h2, .coso-hero h3 { color: #fff; }
.coso-hero h1 { font-size: 42px; margin: 0 0 14px; font-weight: 800; letter-spacing: -0.5px; position: relative; padding-bottom: 20px; display: inline-block; color: #fff; }
.coso-hero h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--coso-teal), var(--coso-blue));
}
.coso-hero p { font-size: 18px; color: #cbd5e1; max-width: 640px; margin: 0 auto 30px; }
.coso-hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Same gradient-underline accent for pages whose main heading sits in a
   plain section rather than the dark hero (Load Board, Dashboard, Carrier
   Profile) — opt in with .coso-section-heading-accent on the <h2>. */
.coso-section-heading-accent { position: relative; padding-bottom: 16px; display: inline-block; }
.coso-section-heading-accent::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--coso-teal), var(--coso-blue));
}

/* Subtle animated "freight lane" streaks behind the hero copy */
.coso-hero-animated .coso-hero-lanes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    120deg,
    rgba(56, 189, 248, 0.14) 0px,
    rgba(56, 189, 248, 0.14) 2px,
    transparent 2px,
    transparent 90px
  );
  background-size: 200% 200%;
  animation: coso-lane-drift 18s linear infinite;
}
@keyframes coso-lane-drift {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .coso-hero-animated .coso-hero-lanes { animation: none; }
}

.coso-stats-strip {
  max-width: 1200px;
  margin: -50px auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.coso-stat-card {
  background: var(--coso-card);
  border-radius: var(--coso-radius);
  box-shadow: var(--coso-shadow-lg);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--coso-border);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.coso-stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--coso-teal);
  box-shadow: 0 16px 34px rgba(56,189,248,.22);
}
.coso-stat-card .num { font-size: 26px; font-weight: 800; color: var(--coso-navy); transition: color .18s ease; }
.coso-stat-card:hover .num { color: var(--coso-blue); }
.coso-stat-card .label { font-size: 13px; color: var(--coso-text-muted); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .coso-stat-card, .coso-stat-card:hover { transition: none; transform: none; } }

/* Section */
.coso-section { padding: 56px 24px; }
.coso-section h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; color: var(--coso-navy); }
.coso-section .sub { color: var(--coso-text-muted); font-size: 16px; line-height: 1.6; max-width: 680px; margin-bottom: 30px; }

/* Loadboard filter bar */
.coso-filterbar {
  background: var(--coso-card);
  border: 1px solid var(--coso-border);
  border-radius: var(--coso-radius);
  box-shadow: var(--coso-shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  align-items: end;
}
.coso-field { display: flex; flex-direction: column; gap: 6px; }
.coso-field label { font-size: 12px; font-weight: 600; color: var(--coso-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.coso-field input, .coso-field select, .coso-field textarea {
  padding: 10px 12px;
  border: 1px solid var(--coso-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--coso-font);
  background: #fff;
  color: var(--coso-text);
}
.coso-form-input,
#coso-staff-load-search {
  padding: 10px 12px;
  border: 1px solid var(--coso-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--coso-font);
  background: #fff;
  color: var(--coso-text);
}
.coso-form-input:focus,
#coso-staff-load-search:focus {
  outline: none;
  border-color: var(--coso-blue);
}
.coso-staff-status-select {
  padding: 6px 8px;
  border: 1px solid var(--coso-border);
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--coso-font);
  background: #fff;
  color: var(--coso-text);
}
.coso-field input:focus, .coso-field select:focus, .coso-field textarea:focus {
  outline: none;
  border-color: var(--coso-blue);
  box-shadow: 0 0 0 3px rgba(20,93,160,.12);
}

/* Load table */
.coso-load-table-wrap {
  background: var(--coso-card);
  border: 1px solid var(--coso-border);
  border-radius: var(--coso-radius);
  box-shadow: var(--coso-shadow);
  overflow: hidden;
}
table.coso-load-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.coso-load-table thead th {
  text-align: left;
  background: #f8fafc;
  color: var(--coso-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--coso-border);
  white-space: nowrap;
}
.coso-load-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--coso-border);
  vertical-align: middle;
}
.coso-load-table tbody tr:last-child td { border-bottom: none; }
.coso-load-table tbody tr:hover { background: #f8fafc; }
.coso-route { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--coso-navy); }
.coso-route .arrow { color: var(--coso-teal); }
.coso-rate { font-weight: 700; color: var(--coso-success); }
.coso-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.coso-badge-open { background: #e6fbf6; color: var(--coso-teal-dark); }
.coso-badge-booked { background: #fef3c7; color: var(--coso-warning); }
.coso-badge-delivered { background: #e5e7eb; color: #4b5563; }
.coso-empty-state { padding: 48px 24px; text-align: center; color: var(--coso-text-muted); }

/* Cards / dashboards */
.coso-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.coso-card {
  background: var(--coso-card);
  border: 1px solid var(--coso-border);
  border-radius: var(--coso-radius);
  box-shadow: var(--coso-shadow);
  padding: 22px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.coso-card h3 { margin-top: 0; margin-bottom: 8px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--coso-navy); }
/* Body copy inside cards reads clearly smaller & lighter than the card title. */
.coso-card p { font-size: 14.5px; line-height: 1.6; color: var(--coso-text-muted); }
.coso-card p:last-child { margin-bottom: 0; }
/* Clickable cards (industries hub, equipment links, etc.) and cards
   explicitly opted-in via .coso-card-hover (feature tiles that aren't
   links but should still feel alive) get a lift + glow on hover. Plain
   info/form cards are left alone so a form doesn't visually "jump". */
a.coso-card:hover,
.coso-card-hover:hover {
  border-color: var(--coso-blue);
  box-shadow: 0 14px 30px rgba(11,99,246,.16);
  transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
  .coso-card, a.coso-card:hover, .coso-card-hover:hover { transition: none; transform: none; }
}
.coso-detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--coso-border); font-size: 14px; }
.coso-detail-row:last-child { border-bottom: none; }
.coso-detail-row .k { color: var(--coso-text-muted); display: inline-flex; align-items: center; gap: 6px; }
.coso-detail-row .k .coso-icon { flex-shrink: 0; }
.coso-detail-row .v { font-weight: 600; }

.coso-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--coso-border); margin-bottom: 20px; }
.coso-tabs a { padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--coso-text-muted); border-bottom: 2px solid transparent; }
.coso-tabs a.active { color: var(--coso-blue); border-color: var(--coso-blue); }

.coso-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.coso-form .full { grid-column: 1 / -1; }
.coso-alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.coso-alert-success { background: #e6fbf6; color: var(--coso-teal-dark); }
.coso-alert-error { background: #fee2e2; color: var(--coso-danger); }

/* Visual equipment picker (Post a Load) */
.coso-equip-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.coso-equip-pill { position: relative; cursor: pointer; }
.coso-equip-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.coso-equip-pill span {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--coso-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--coso-text-muted);
  background: #fff;
  transition: all .15s ease;
}
.coso-equip-pill:hover span { border-color: var(--coso-blue); }
.coso-equip-pill input[type="radio"]:checked + span {
  background: var(--coso-navy);
  border-color: var(--coso-navy);
  color: #fff;
}
.coso-equip-pill input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--coso-blue);
  outline-offset: 2px;
}

/* Checkbox groups (equipment, regions, notification prefs) */
.coso-checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 12px;
  background: #f8fafc;
  border: 1px solid var(--coso-border);
  border-radius: 8px;
  padding: 14px;
}
.coso-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--coso-text);
  padding: 4px 0;
  cursor: pointer;
}
.coso-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--coso-teal);
  cursor: pointer;
}
.coso-form h3 { color: var(--coso-navy); font-size: 15px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--coso-border); padding-bottom: 8px; }
.coso-form input[type="file"] {
  padding: 8px;
  border: 1px dashed var(--coso-border);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  width: 100%;
}
.coso-notify-box { background: linear-gradient(135deg, #f0fbfa 0%, #ffffff 100%); border-color: var(--coso-teal); }

/* Scrollable legal agreement text box */
.coso-legal-box {
  max-height: 420px;
  overflow-y: scroll;
  background: #f8fafc;
  border: 1px solid var(--coso-border);
  border-radius: 8px;
  padding: 20px 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--coso-text);
}
.coso-legal-box h4 {
  color: var(--coso-navy);
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
  border-bottom: none;
  margin: 18px 0 6px;
  padding-bottom: 0;
}
.coso-legal-box h4:first-child { margin-top: 0; }
.coso-legal-box p { margin: 0 0 10px; white-space: pre-line; }

/* Footer */
.coso-site-footer { background: var(--coso-navy); color: #94a3b8; padding: 40px 24px; margin-top: 60px; font-size: 14px; }
.coso-site-footer a { color: #cbd5e1; }
.coso-footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* Loading spinner */
.coso-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(0,0,0,.1); border-top-color: var(--coso-blue); border-radius: 50%; animation: coso-spin .6s linear infinite; }
@keyframes coso-spin { to { transform: rotate(360deg); } }

/* Fix: stat-tile numbers were painting behind the hero because the hero
   (position:relative) outranks the stats strip (position:static) in the
   stacking order. Promoting the strip above it fixes the overlap. */
.coso-stats-strip { position: relative; z-index: 2; }

/* Region coverage map ("Where We Run") */
.coso-map-wrap {
  background: var(--coso-card);
  border: 1px solid var(--coso-border);
  border-radius: var(--coso-radius);
  padding: 24px;
  margin-bottom: 40px;
}
.coso-us-map {
  width: 100%;
  height: auto;
  max-height: 480px;
  display: block;
  margin: 0 auto;
}
.coso-map-region {
  fill: #dce7fb;
  stroke: #fff;
  stroke-width: 3;
  cursor: pointer;
  transition: fill .2s ease, filter .2s ease;
}
.coso-map-region:hover,
.coso-map-region.is-active,
.coso-us-map.glow-all .coso-map-region {
  fill: var(--coso-blue);
  filter: drop-shadow(0 0 10px rgba(11,99,246,.55));
}
.coso-map-label {
  font-size: 15px;
  font-weight: 700;
  fill: var(--coso-navy);
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}
@media (prefers-reduced-motion: reduce) { .coso-map-region { transition: none; } }

.coso-map-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; justify-content: center; }
.coso-map-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid var(--coso-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--coso-navy);
  cursor: pointer;
  transition: all .18s ease;
}
.coso-map-tag .coso-icon { color: var(--coso-blue); flex-shrink: 0; }
.coso-map-tag:hover,
.coso-map-tag.is-active {
  background: var(--coso-blue);
  color: #fff;
  border-color: var(--coso-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11,99,246,.25);
}
.coso-map-tag:hover .coso-icon,
.coso-map-tag.is-active .coso-icon { color: #fff; }
.coso-map-tag-wide { background: var(--coso-navy); color: #fff; }
.coso-map-tag-wide .coso-icon { color: var(--coso-teal); }
.coso-map-tag-wide:hover { background: #12335c; }
@media (prefers-reduced-motion: reduce) { .coso-map-tag { transition: none; } .coso-map-tag:hover, .coso-map-tag.is-active { transform: none; } }
@media (max-width: 640px) { .coso-map-wrap { padding: 14px; } .coso-map-label { font-size: 11px; } }

/* Icon badges: How We Work steps + Commodities We Move cards */
.coso-step-card, .coso-commodity-card { position: relative; padding-top: 74px; }
.coso-step-icon, .coso-commodity-icon {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,99,246,.1);
  color: var(--coso-blue);
  transition: transform .25s ease;
}
.coso-step-icon .coso-icon, .coso-commodity-icon .coso-icon { width: 22px; height: 22px; }
.coso-commodity-icon { animation: coso-float 3s ease-in-out infinite; }
@keyframes coso-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Glossy gradient sheen + hover "pop" on every icon badge site-wide
   (section icons, step icons, commodity icons, industry-hub icons). Pure
   overlay so it never changes the badge's own tint. */
/* NOTE: no `position` here — step/commodity icons are position:absolute
   (badge pinned to the card's top-left) and a blanket position:relative
   was overriding that, dropping every icon onto its text. Each static
   icon class declares its own position:relative instead. */
.coso-section-icon, .coso-step-icon, .coso-commodity-icon, .coso-industry-icon {
  isolation: isolate;
}
.coso-section-icon::before, .coso-step-icon::before, .coso-commodity-icon::before, .coso-industry-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.6), transparent 65%);
  pointer-events: none;
}
.coso-card:hover .coso-step-icon,
.coso-card:hover .coso-industry-icon,
a.coso-card:hover .coso-industry-icon,
.coso-card-hover:hover .coso-step-icon {
  transform: scale(1.1) rotate(-4deg);
}
@media (prefers-reduced-motion: reduce) {
  .coso-step-icon, .coso-commodity-icon,
  .coso-card:hover .coso-step-icon, .coso-card:hover .coso-industry-icon,
  a.coso-card:hover .coso-industry-icon, .coso-card-hover:hover .coso-step-icon { transition: none; transform: none; }
}
.coso-icon-amber { background: rgba(217,119,6,.14); color: #b45309; }
.coso-icon-teal  { background: rgba(56,189,248,.16); color: var(--coso-teal-dark); }
.coso-icon-green { background: rgba(31,157,85,.14); color: var(--coso-success); }
.coso-icon-blue  { background: rgba(11,99,246,.1); color: var(--coso-blue); }
@media (prefers-reduced-motion: reduce) { .coso-commodity-icon { animation: none; } }

/* Industry hub card icons */
.coso-industry-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,99,246,.1);
  color: var(--coso-blue);
  margin-bottom: 14px;
}

/* Reusable pill/tag list — used for long scannable lists (services,
   commodities, capabilities) where individual per-item icon cards would
   be too heavy. Each tag still gets a hover "pop" so long lists aren't
   completely static. */
.coso-tag-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.coso-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--coso-navy);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--coso-border);
  transition: all .15s ease;
}
.coso-tag .coso-icon { width: 15px; height: 15px; flex-shrink: 0; }
.coso-tag:hover {
  background: var(--coso-blue);
  color: #fff;
  border-color: var(--coso-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11,99,246,.25);
}
@media (prefers-reduced-motion: reduce) { .coso-tag { transition: none; } .coso-tag:hover { transform: none; } }

/* Section icon badge — a colored circle/rounded-square icon that sits
   next to an H2, used to visually anchor long-form content sections. */
.coso-section-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,99,246,.1);
  color: var(--coso-blue);
  margin-bottom: 12px;
}

/* Mobile nav toggle */
.coso-nav-toggle {
  display: none;
  width: 38px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.coso-nav-toggle span { display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px; }

@media (max-width: 900px) {
  .coso-filterbar { grid-template-columns: repeat(2, 1fr); }
  .coso-stats-strip { grid-template-columns: repeat(2, 1fr); }
  .coso-grid-2 { grid-template-columns: 1fr; }
  .coso-form { grid-template-columns: 1fr; }

  .coso-nav-toggle { display: flex; }
  .coso-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--coso-navy);
    padding: 10px 16px 16px;
    box-shadow: var(--coso-shadow-lg);
    z-index: 40;
  }
  .coso-nav.coso-nav-open { display: flex; }
  .coso-nav a { padding: 12px 4px; }
  .coso-header-inner { position: relative; }
}

/* ------------------------------------------------------------------
 * Phone-first pass. Most carriers/drivers check the Load Board and their
 * Dashboard from a phone, not a desktop, so this tightens up touch target
 * sizes and reflows the wide data tables (Load Board, Manage Loads,
 * Carrier list) into stacked cards instead of a cramped, horizontally-
 * squished table.
 * ------------------------------------------------------------------ */
@media (max-width: 640px) {
  .coso-section { padding: 32px 16px; }
  .coso-container { padding: 0 4px; }
  h1 { font-size: 30px !important; }
  h2 { font-size: 24px; }
  .coso-section h2 { font-size: 24px; }
  h3, .coso-card h3 { font-size: 18px; }
  .coso-section .sub { font-size: 15px; }

  /* Bigger, easier-to-tap buttons and form fields on touchscreens. */
  .coso-btn { min-height: 44px; padding: 10px 16px; }
  .coso-btn-sm { min-height: 38px; padding: 8px 14px; }
  .coso-field input, .coso-field select, .coso-field textarea { min-height: 44px; font-size: 16px; } /* 16px avoids iOS auto-zoom on focus */
  .coso-field textarea { min-height: 88px; }

  /* Load Board / Manage Loads / Carrier list tables -> stacked cards. */
  .coso-load-table-wrap { background: transparent; border: none; box-shadow: none; overflow: visible; }
  table.coso-load-table, table.coso-load-table tbody { display: block; width: 100%; }
  table.coso-load-table thead { display: none; }
  table.coso-load-table tr {
    display: block;
    background: var(--coso-card);
    border: 1px solid var(--coso-border);
    border-radius: var(--coso-radius);
    box-shadow: var(--coso-shadow);
    padding: 14px 16px;
    margin-bottom: 12px;
  }
  table.coso-load-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--coso-border);
    text-align: right;
  }
  table.coso-load-table td:last-child { border-bottom: none; padding-bottom: 0; }
  table.coso-load-table td:first-child { padding-top: 0; }
  table.coso-load-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--coso-text-muted);
    text-align: left;
    flex-shrink: 0;
  }
  table.coso-load-table td[data-label=""]::before { content: none; }
  table.coso-load-table td[data-label=""] { justify-content: stretch; padding-top: 10px; }
  table.coso-load-table td[data-label=""] .coso-btn { width: 100%; }
  table.coso-load-table .coso-route { justify-content: flex-end; text-align: right; }

  /* Single-load detail + dashboard 2-column layouts stack cleanly. */
  .coso-grid-2 { gap: 16px; }
  .coso-detail-row { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .coso-filterbar { grid-template-columns: 1fr !important; }
  .coso-stats-strip { grid-template-columns: 1fr 1fr; }
  .coso-hero { padding: 44px 16px 56px; }
}

/* ------------------------------------------------------------------
 * Site-wide polish pass: decorative floating orbs (used behind hero /
 * page-header sections) + a stronger "pop" shadow utility for cards
 * that deserve extra visual weight. Kept purely decorative/ambient so
 * they never interfere with content or forms.
 * ------------------------------------------------------------------ */
.coso-orb-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.coso-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: .5;
  animation: coso-orb-float 10s ease-in-out infinite;
}
.coso-orb-teal { background: radial-gradient(circle at 30% 30%, rgba(56,189,248,.55), transparent 70%); }
.coso-orb-blue { background: radial-gradient(circle at 30% 30%, rgba(11,99,246,.5), transparent 70%); }
@keyframes coso-orb-float {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(16px,-20px) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .coso-orb { animation: none; } }
@media (max-width: 640px) { .coso-orb-field { display: none; } }

/* Soft on-white variant, for orbs placed over light section backgrounds
   instead of the dark navy hero gradient. */
.coso-orb-soft .coso-orb-teal { background: radial-gradient(circle at 30% 30%, rgba(56,189,248,.28), transparent 70%); }
.coso-orb-soft .coso-orb-blue { background: radial-gradient(circle at 30% 30%, rgba(11,99,246,.22), transparent 70%); }

.coso-shadow-pop {
  box-shadow: 0 20px 44px rgba(16,24,40,.14), 0 4px 10px rgba(16,24,40,.06);
  transition: box-shadow .2s ease, transform .2s ease;
  position: relative;
}
.coso-shadow-pop:hover { box-shadow: 0 26px 56px rgba(11,99,246,.20); transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .coso-shadow-pop, .coso-shadow-pop:hover { transition: none; transform: none; } }

/* Save / favorite (star) button on load rows and the single load page. */
.coso-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--coso-border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--coso-text-muted);
  vertical-align: middle;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.coso-fav-btn:hover { border-color: #d97706; color: #b45309; }
.coso-fav-btn .coso-fav-star { font-size: 16px; line-height: 1; color: #cbd5e1; transition: color .15s ease; }
.coso-fav-btn:hover .coso-fav-star { color: #f59e0b; }
.coso-fav-btn.is-fav { border-color: #f0c36d; background: #fffbeb; color: #b45309; }
.coso-fav-btn.is-fav .coso-fav-star { color: #f59e0b; }
.coso-fav-compact { padding: 5px 8px; }
@media (prefers-reduced-motion: reduce) { .coso-fav-btn, .coso-fav-btn .coso-fav-star { transition: none; } }

/* ------------------------------------------------------------------
 * Beauty pass — typographic hierarchy + premium finish.
 * Headings read decisively bolder/larger than body; cards, stats and
 * hero get a more polished, high-end feel.
 * ------------------------------------------------------------------ */

/* Softer, richer default card shadow + crisper hairline border. */
.coso-card {
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px rgba(16,24,40,.06);
  border-color: #e8edf3;
}

/* Section rhythm: a touch more breathing room between the intro and the grid. */
.coso-section { padding: 60px 24px; }
.coso-section > h2:first-child,
.coso-section > .coso-section-icon + h2 { margin-top: 0; }

/* Secondary section headings (e.g. "How We Work", "Where We Run") sit a
   step below the page's main H2 but still clearly above body copy. */
.coso-section h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; margin: 40px 0 16px; color: var(--coso-navy); }

/* Stat cards: make the number the hero of the card. */
.coso-stat-card { padding: 22px 18px; }
.coso-stat-card .num { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.coso-stat-card .label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--coso-text-muted); margin-top: 8px; }

/* Hero lead paragraph: larger, calmer, easier to read against the navy. */
.coso-hero p { font-size: 19px; line-height: 1.55; color: #d5e0ee; }

/* Card titles that are also links shouldn't get the generic underline;
   the whole card is the hover affordance. */
a.coso-card:hover h3 { text-decoration: none; }

/* Tables: heavier column headers, roomier rows for a more considered feel. */
table.coso-load-table thead th { font-weight: 700; letter-spacing: .04em; color: var(--coso-text-muted); }
table.coso-load-table td { padding-top: 15px; padding-bottom: 15px; }

/* Primary CTA cards (the "Have a load?" blocks) — center headings get
   a bit more presence. */
.coso-card[style*="text-align:center"] h3,
.coso-card[style*="text-align: center"] h3 { font-size: 22px; }

@media (max-width: 640px) {
  .coso-section { padding: 36px 16px; }
  .coso-section h3 { font-size: 19px; margin-top: 28px; }
  .coso-stat-card .num { font-size: 28px; }
  .coso-hero p { font-size: 16px; }
}

/* ============================================================
   Driver Fitness, Weather, Compliance, Nutrition (v40)
   ============================================================ */

/* --- Weather widget --- */
.coso-wx { font-size: 15px; }
.coso-wx-loading, .coso-wx-err { color: var(--coso-text-muted); padding: 8px 0; }
.coso-wx-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.coso-wx-place { font-weight:700; color:var(--coso-navy); }
.coso-wx-change, .coso-wx-geo { background:none; border:none; color:var(--coso-blue); cursor:pointer; font-size:13px; padding:0; }
.coso-wx-geo { display:block; margin-top:10px; }
.coso-wx-main { display:flex; align-items:center; gap:14px; margin:4px 0 10px; }
.coso-wx-emoji { font-size:44px; line-height:1; }
.coso-wx-temp { font-size:34px; font-weight:800; color:var(--coso-navy); line-height:1; }
.coso-wx-cond { font-size:14px; color:var(--coso-text-muted); margin-top:2px; }
.coso-wx-stats { display:flex; flex-wrap:wrap; gap:14px; font-size:13px; color:var(--coso-text); margin-bottom:10px; }
.coso-wx-note { font-size:13px; color:var(--coso-navy); background:#f0f9ff; border:1px solid #d6ebfb; border-radius:8px; padding:8px 12px; }
.coso-wx-searchtitle { font-weight:700; color:var(--coso-navy); margin-bottom:8px; }
.coso-wx-form { display:flex; gap:8px; }
.coso-wx-input { flex:1; padding:8px 12px; border:1px solid #cdd9e6; border-radius:8px; font-size:14px; }

/* --- Fitness app --- */
.coso-fit-shell { max-width: 920px; margin: 0 auto; }
.coso-fit-controls { margin-bottom: 20px; }
.coso-fit-toggle { display:inline-flex; background:rgba(255,255,255,.12); border-radius:999px; padding:4px; margin-bottom:16px; }
.coso-fit-loc { border:none; background:transparent; color:#c7d3e2; font-weight:700; padding:9px 20px; border-radius:999px; cursor:pointer; font-size:14px; transition:.15s; }
.coso-fit-loc.is-active { background:#fff; color:var(--coso-navy); }
.coso-fit-splits { display:flex; flex-wrap:wrap; gap:8px; }
.coso-fit-split { border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.06); color:#fff; padding:8px 16px; border-radius:999px; cursor:pointer; font-size:14px; font-weight:600; transition:.15s; }
.coso-fit-split:hover { background:rgba(255,255,255,.16); }
.coso-fit-split.is-active { background:var(--coso-blue); border-color:var(--coso-blue); color:#fff; }
.coso-fit-panel { display:none; }
.coso-fit-panel.is-active { display:block; }
.coso-fit-blurb { color:#c7d3e2; font-size:15px; margin:0 0 16px; max-width:720px; }
.coso-fit-plan { display:none; background:#fff; border-radius:14px; padding:22px 24px; color:var(--coso-text); }
.coso-fit-plan.is-active { display:block; }
.coso-fit-plan-head h4 { margin:0 0 6px; font-size:19px; color:var(--coso-navy); }
.coso-fit-meta { display:flex; flex-wrap:wrap; gap:14px; font-size:13px; color:var(--coso-text-muted); margin-bottom:14px; }
.coso-fit-table { width:100%; border-collapse:collapse; }
.coso-fit-table th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--coso-text-muted); border-bottom:2px solid #eef2f7; padding:8px 10px; }
.coso-fit-table td { padding:10px; border-bottom:1px solid #f0f3f7; vertical-align:top; }
.coso-fit-num { text-align:center; font-weight:700; color:var(--coso-navy); white-space:nowrap; width:70px; }
.coso-fit-ex { display:block; font-weight:600; color:var(--coso-navy); }
.coso-fit-note { display:block; font-size:12.5px; color:var(--coso-text-muted); margin-top:2px; }
.coso-fit-finisher { margin:14px 0 0; font-size:14px; background:#f0f9ff; border-left:3px solid var(--coso-blue); padding:10px 14px; border-radius:0 8px 8px 0; }
.coso-fit-hero { background:linear-gradient(135deg,#0b1f3a,#12315c); }

/* --- Nutrition --- */
.coso-nutri-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:20px; }
.coso-nutri-list { margin:8px 0 0; padding-left:18px; }
.coso-nutri-list li { margin-bottom:6px; font-size:14.5px; }
.coso-nutri-tip { background:#f0f9ff; border-radius:8px; padding:10px 14px; font-size:14px; margin-top:10px; }
.coso-nutri-disclaimer { font-size:12px; color:var(--coso-text-muted); text-align:center; margin-top:24px; }

/* --- Compliance --- */
.coso-comp-pill { display:inline-block; color:#fff; font-size:12px; font-weight:700; padding:4px 12px; border-radius:999px; letter-spacing:.01em; }
.coso-comp-hero-top { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin-bottom:10px; }
.coso-comp-exp { font-size:13px; color:var(--coso-text-muted); }
.coso-comp-exp.is-expired { color:#c0392b; font-weight:700; }
.coso-comp-headline { font-size:16px; color:var(--coso-navy); margin:0; }
.coso-comp-note { font-size:13px; color:var(--coso-text-muted); margin-top:10px; }
.coso-comp-check { list-style:none; margin:0; padding:0; }
.coso-comp-check li { display:flex; gap:12px; align-items:flex-start; padding:12px 0; border-bottom:1px solid #f0f3f7; }
.coso-comp-mark { flex:0 0 26px; width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; color:#fff; font-size:14px; }
.coso-comp-check li.is-ok .coso-comp-mark { background:#0f9d58; }
.coso-comp-check li.is-missing .coso-comp-mark { background:#d9822b; }
.coso-comp-item strong { display:block; color:var(--coso-navy); font-size:14.5px; }
.coso-comp-help { display:block; font-size:12.5px; color:var(--coso-text-muted); margin-top:1px; }
.coso-comp-todo { margin-top:16px; background:#fff8f0; border:1px solid #f5dcc0; border-radius:10px; padding:12px 16px; font-size:14px; }
.coso-comp-todo ul { margin:6px 0 0; padding-left:18px; }
.coso-comp-card:hover { transform:translateY(-2px); }

/* --- Carrier controls --- */
.coso-carrier-controls .coso-form-input { padding:9px 12px; border:1px solid #cdd9e6; border-radius:8px; font-size:14px; }

@media (max-width:600px) {
	.coso-fit-plan { padding:16px; }
	.coso-fit-num { width:52px; font-size:13px; }
}

/* --- Staff website metrics --- */
.coso-metrics { margin-top:16px; }
.coso-metrics-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:20px; }
.coso-metric { background:#fff; border:1px solid #e6ecf3; border-radius:12px; padding:16px; text-align:center; }
.coso-metric .mv { font-size:26px; font-weight:800; color:var(--coso-navy); line-height:1; }
.coso-metric .ml { font-size:12px; color:var(--coso-text-muted); text-transform:uppercase; letter-spacing:.03em; margin-top:6px; }
.coso-metrics-chart { background:#fff; border:1px solid #e6ecf3; border-radius:12px; padding:18px 18px 8px; margin-bottom:18px; }
.coso-metrics-chart-title { font-size:13px; font-weight:700; color:var(--coso-navy); margin-bottom:14px; }
.coso-bars { display:flex; align-items:flex-end; gap:6px; height:140px; }
.coso-bar-col { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; position:relative; }
.coso-bar { width:100%; max-width:34px; background:linear-gradient(180deg,var(--coso-blue),var(--coso-teal)); border-radius:5px 5px 0 0; min-height:3px; transition:.2s; }
.coso-bar-val { font-size:10px; color:var(--coso-text-muted); margin-top:4px; }
.coso-bar-lbl { font-size:9px; color:var(--coso-text-muted); margin-top:1px; white-space:nowrap; transform:rotate(-40deg); transform-origin:center; height:20px; }
.coso-metrics-top { background:#fff; border:1px solid #e6ecf3; border-radius:12px; padding:16px 18px; }
.coso-metrics-top-row { display:flex; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid #f0f3f7; font-size:14px; }
.coso-metrics-top-row:last-child { border-bottom:none; }
.coso-metrics-top-row span { color:var(--coso-text-muted); white-space:nowrap; font-size:13px; }
.coso-metrics-note { font-size:12px; color:var(--coso-text-muted); margin-top:12px; }

/* --- Fitness: water + steps non-negotiables banner --- */
.coso-fit-nonneg { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:22px; }
.coso-fit-nonneg-item { display:flex; gap:12px; align-items:flex-start; background:rgba(56,189,248,.12); border:1px solid rgba(56,189,248,.35); border-radius:12px; padding:14px 16px; font-size:14px; line-height:1.5; color:#eaf4ff; }
.coso-fit-nonneg-item strong { color:#fff; }
.coso-fit-nonneg-icon { font-size:26px; line-height:1; flex:0 0 auto; }
@media (max-width:720px){ .coso-fit-nonneg { grid-template-columns:1fr; } }

/* --- Fitness: overload/dumbbell tiles, equipment chips, meal footer --- */
.coso-fit-overload { display:flex; gap:16px; align-items:flex-start; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.15); border-radius:14px; padding:20px 22px; margin-top:22px; }
.coso-fit-overload h4 { color:#fff; margin:0 0 8px; font-size:18px; }
.coso-fit-overload p { color:#c7d3e2; margin:0 0 10px; font-size:14.5px; line-height:1.6; }
.coso-fit-overload p:last-child { margin-bottom:0; }
.coso-fit-overload-icon { font-size:32px; line-height:1; flex:0 0 auto; }
.coso-fit-dumbbell { border-color:rgba(56,189,248,.4); background:rgba(56,189,248,.1); }
.coso-fit-equip { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:14px; }
.coso-fit-equip-label { font-size:13px; color:#c7d3e2; margin-right:4px; }
.coso-fit-eq { border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.06); color:#fff; padding:6px 13px; border-radius:999px; cursor:pointer; font-size:13px; font-weight:600; transition:.15s; }
.coso-fit-eq:hover { background:rgba(255,255,255,.16); }
.coso-fit-eq.is-active { background:var(--coso-teal); border-color:var(--coso-teal); color:#062033; }
.coso-meal-foot { color:#c7d3e2; font-size:13px; margin-top:16px; line-height:1.6; }
.coso-meal-app .coso-fit-meta { color:var(--coso-text); }
.coso-meal-app .coso-fit-meta span { font-weight:600; }
