/* DirectHaul
   Palette borrowed from interstate guide signage and weigh-station paperwork:
   reflective guide green, lane-paint yellow reserved for the one action that
   matters on each screen, asphalt for text. Built thumb-first: nothing
   interactive is under 48px, and the rate-per-mile is the largest thing on a
   load because that is the number a driver actually decides on. */

:root {
  --guide:    #0B5D3B;
  --guide-lo: #094C30;
  --asphalt:  #26272B;
  --slate:    #5C6068;
  --concrete: #D6D8D3;
  --surface:  #EDEEEC;
  --card:     #FFFFFF;
  --paint:    #E8A317;
  --flag:     #A32218;
  --ok:       #0B5D3B;

  --gap: 1rem;
  --radius-card: 3px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--asphalt);
  font-family: ui-sans-serif, system-ui, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.wrap { max-width: 44rem; margin: 0 auto; padding: var(--gap) var(--gap) 6rem; }

/* ---- masthead ---- */
.masthead {
  background: var(--guide);
  color: #fff;
  padding: 1.1rem var(--gap);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.masthead h1 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.masthead .who { font-size: .85rem; opacity: .85; }
.masthead a { color: #fff; }

/* ---- landing hero ---- */
/* The artwork is the photograph only. The headline is real text below it, so it
   stays legible on a phone and says what the app actually does. Capped on tall
   viewports; the crop holds the bottom-left logo and the driver. */
.hero { display: block; background: var(--asphalt); }
.hero img {
  display: block; width: 100%; height: auto;
  max-height: 58vh; object-fit: cover; object-position: left bottom;
}
.hero-copy { background: var(--guide); color: #fff; padding: 1rem var(--gap) 1.1rem; }
.hero-line {
  margin: 0; max-width: none;
  font-size: 1.35rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em;
}
.hero-sub { margin: .45rem 0 0; max-width: 46ch; font-size: .92rem; opacity: .9; }

h2 { font-size: 1.05rem; font-weight: 700; margin: 2rem 0 .75rem; letter-spacing: -0.01em; }
h2:first-of-type { margin-top: 1rem; }
p { max-width: 60ch; }
.muted { color: var(--slate); font-size: .9rem; }

/* ---- the task picker: the carrier's whole home screen ---- */
.tasks { display: grid; gap: .6rem; margin: 1rem 0 2rem; }
.task {
  display: block;
  background: var(--card);
  border: 1px solid var(--concrete);
  border-left: 5px solid var(--guide);
  border-radius: var(--radius-card);
  padding: 1rem;
  min-height: 56px;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.task strong { display: block; font-size: 1.02rem; }
.task span { color: var(--slate); font-size: .88rem; }
.task:hover { border-left-color: var(--paint); }
.task:disabled { opacity: .5; cursor: not-allowed; border-left-color: var(--concrete); }

/* ---- load card: origin, a rule carrying the mileage, destination ---- */
.load {
  background: var(--card);
  border: 1px solid var(--concrete);
  border-radius: var(--radius-card);
  padding: .9rem 1rem;
  margin-bottom: .6rem;
}
.route { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.route .place { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.route .rule {
  flex: 1; height: 0; border-top: 2px solid var(--concrete); position: relative;
}
.route .rule::after {
  content: attr(data-miles);
  position: absolute; top: -.72em; left: 50%; transform: translateX(-50%);
  background: var(--card); padding: 0 .45rem;
  font-size: .72rem; color: var(--slate); white-space: nowrap;
}
.rate { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.rate small { font-size: .78rem; font-weight: 400; color: var(--slate); letter-spacing: 0; }
.load .meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .85rem; color: var(--slate); margin-top: .4rem; }
.load .bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .5rem; }

.tag {
  display: inline-block; border-radius: var(--radius-pill);
  padding: .12rem .6rem; font-size: .75rem; border: 1px solid var(--concrete);
}
.tag.match { background: #E7F0EA; border-color: var(--guide); color: var(--guide-lo); }
.tag.miss  { background: #FBF0DA; border-color: var(--paint); color: #7A5606; }

/* ---- compliance panel ---- */
.blockers {
  background: #FBF0DA; border: 1px solid var(--paint);
  border-radius: var(--radius-card); padding: .9rem 1rem; margin: 1rem 0;
}
.blockers ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.blockers li { margin-bottom: .3rem; }
.cleared {
  background: #E7F0EA; border: 1px solid var(--guide);
  border-radius: var(--radius-card); padding: .75rem 1rem; margin: 1rem 0;
}

/* ---- forms ---- */
label { display: block; margin-bottom: .8rem; font-size: .9rem; color: var(--slate); }
input, select, textarea {
  display: block; width: 100%; margin-top: .25rem;
  padding: .7rem .65rem; min-height: 48px;
  font: inherit; color: var(--asphalt);
  background: var(--card);
  border: 1px solid var(--concrete); border-radius: var(--radius-card);
}
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, .task:focus-visible {
  outline: 3px solid var(--paint); outline-offset: 2px;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

button {
  font: inherit; font-weight: 600; cursor: pointer;
  min-height: 48px; padding: .7rem 1.1rem;
  border-radius: var(--radius-card); border: 1px solid var(--guide);
  background: var(--guide); color: #fff;
}
button.primary { background: var(--paint); border-color: #C7860B; color: #26272B; }
button.quiet { background: transparent; color: var(--guide); }
button.small { min-height: 40px; padding: .4rem .8rem; font-size: .88rem; }

/* Filter tabs. Unselected reads as a choice, not as an action - lane-paint yellow
   stays reserved for the one real action on a screen. aria-current carries the
   same state for screen readers, which a colour swap alone did not. */
.tab { background: var(--card); color: var(--guide); border: 1px solid var(--concrete); }
.tab[aria-current="true"] { background: var(--guide); border-color: var(--guide); color: #fff; }
.tab.small { min-height: 44px; }

/* Back at the top of a section as well as the bottom: the carrier profile is a long
   scroll, and a driver should not have to reach the end of it to get out. */
.back-top { margin: 0 0 .4rem; padding-left: 0; }

.notice { padding: .7rem .9rem; border-radius: var(--radius-card); margin: .8rem 0; font-size: .92rem;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.notice.error { background: #F6E2E0; border: 1px solid var(--flag); color: #6E1610; }
.notice.info  { background: #E7F0EA; border: 1px solid var(--guide); }
.notice.warn  { background: #FBF0DA; border: 1px solid var(--paint); color: #7A5606; }

.empty {
  border: 2px dashed var(--concrete); border-radius: var(--radius-card);
  padding: 1.5rem 1rem; text-align: center; color: var(--slate);
}

.privacy {
  border-top: 1px solid var(--concrete); margin-top: 2rem; padding-top: .8rem;
  font-size: .82rem; color: var(--slate);
}

.hidden { display: none; }

/* ---- legal pages ---- */
.draft-banner {
  background: #FBF0DA; border: 1px solid var(--paint);
  border-radius: var(--radius-card); padding: .9rem 1rem; margin: 1rem 0;
  font-size: .88rem; color: #7A5606;
}
.legal-nav { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; font-size: .9rem; }
.legal h3 { font-size: .95rem; font-weight: 700; margin: 1.6rem 0 .5rem; }
.legal p, .legal li { color: var(--asphalt); max-width: 68ch; }
.legal ol, .legal ul { padding-left: 1.3rem; }
.legal li { margin-bottom: .4rem; }
.legal .placeholder { background: #FBF0DA; padding: 0 .2rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
