/* Fonts are loaded via <link> in index.php, not @import, to avoid a request chain. */

:root{
  --asphalt:#1c1e22;
  --asphalt-2:#25282e;
  --line:#3a3e46;
  --amber:#f5a623;
  --amber-dim:#7a5a1f;
  --off-white:#eceae4;
  --muted:#9296a1;
  --green:#6fbf73;
  --red:#e5675f;
  /* calendar day states — shared by .cal-day and its .swatch in the legend */
  --drive:#30343c;
  --unload:#3d3320;
}
*{box-sizing:border-box;}
body{
  margin:0;
  background:var(--asphalt);
  color:var(--off-white);
  font-family:'Inter',sans-serif;
  padding:32px 20px 60px;
}
.wrap{max-width:880px;margin:0 auto;}

/* header */
.eyebrow{
  font-family:'Space Mono',monospace;
  letter-spacing:.18em;
  text-transform:uppercase;
  font-size:11px;
  color:var(--amber);
  margin:0 0 6px;
}
h1{
  font-family:'Bebas Neue',sans-serif;
  font-size:52px;
  letter-spacing:.02em;
  margin:0 0 4px;
  line-height:1;
}
.sub{color:var(--muted);font-size:14px;margin:0 0 28px;}

.odometer{
  display:flex;gap:0;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  margin-bottom:36px;
}
.odo-cell{
  flex:1;padding:16px 14px;
  border-right:1px solid var(--line);
  background:var(--asphalt-2);
}
.odo-cell:last-child{border-right:none;}
.odo-num{
  font-family:'Space Mono',monospace;
  font-size:26px;font-weight:700;color:var(--amber);
  display:block;
}
.odo-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;}

/* route strip */
.section-title{
  font-family:'Bebas Neue',sans-serif;
  font-size:22px;letter-spacing:.03em;
  color:var(--off-white);
  margin:0 0 4px;
}
.section-title.spaced{margin-top:44px;}
.section-note{font-size:13px;color:var(--muted);margin:0 0 18px;}

.route{
  position:relative;
  margin:0 0 44px;
  padding-left:26px;
}
.route::before{
  content:"";
  position:absolute;left:9px;top:6px;bottom:6px;
  width:2px;
  background:repeating-linear-gradient(to bottom, var(--amber) 0 8px, transparent 8px 16px);
}
.stop{
  position:relative;
  padding:0 0 26px 20px;
}
.stop:last-child{padding-bottom:0;}
.stop::before{
  content:"";
  position:absolute;left:-26px;top:3px;
  width:11px;height:11px;border-radius:50%;
  background:var(--asphalt);
  border:2px solid var(--amber);
}
.stop.milestone::before{
  background:var(--amber);
}
.stop-date{
  font-family:'Space Mono',monospace;
  font-size:12px;color:var(--amber);
  letter-spacing:.04em;
  text-transform:uppercase;
}
.stop-title{font-size:16px;font-weight:600;margin:2px 0 2px;}
.stop-detail{font-size:13px;color:var(--muted);line-height:1.5;}
.stop-miles{
  display:inline-block;margin-top:6px;
  font-family:'Space Mono',monospace;
  font-size:11px;color:var(--muted);
  border:1px solid var(--line);
  border-radius:4px;padding:2px 8px;
}

/* mini calendars */
.cals{display:flex;gap:24px;margin-bottom:44px;flex-wrap:wrap;}
.cal{
  flex:1;min-width:270px;
  background:var(--asphalt-2);
  border:1px solid var(--line);
  border-radius:10px;
  padding:18px;
}
.cal-head{
  font-family:'Bebas Neue',sans-serif;
  font-size:20px;letter-spacing:.03em;
  margin-bottom:12px;
}
.cal-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:4px;
  text-align:center;
}
.cal-dow{font-size:10px;color:var(--muted);text-transform:uppercase;padding-bottom:4px;}
.cal-day{
  aspect-ratio:1;
  display:flex;align-items:center;justify-content:center;
  font-family:'Space Mono',monospace;
  font-size:12px;
  border-radius:6px;
  color:var(--off-white);
}
.cal-day.empty{visibility:hidden;}
.cal-day.load{background:var(--amber-dim);color:var(--amber);font-weight:700;}
.cal-day.drive{background:var(--drive);color:var(--off-white);}
.cal-day.arrive{background:var(--amber);color:var(--asphalt);font-weight:700;}
.cal-day.unload{background:var(--unload);color:var(--amber);font-weight:700;}
/* A rest day inserted from the waypoints row tools. Reads as a pause in the
   run of driving days rather than as another one of them. */
.cal-day.buffer{background:transparent;border:1px dashed var(--line);color:var(--muted);}
.cal-day.today{outline:1px solid var(--muted);}

.cal-day[data-tip]{position:relative;cursor:default;}
.cal-day[data-tip]:hover{z-index:20;outline:1px solid var(--amber);}
.cal-day[data-tip]:hover::after{
  content:attr(data-tip);
  position:absolute;
  bottom:125%;left:50%;
  transform:translateX(-50%);
  background:var(--asphalt);
  border:1px solid var(--amber);
  color:var(--off-white);
  font-family:'Inter',sans-serif;
  font-size:11px;font-weight:500;
  line-height:1.4;
  padding:8px 12px;
  border-radius:7px;
  white-space:normal;
  width:max-content;
  max-width:190px;
  text-align:left;
  box-shadow:0 6px 16px rgba(0,0,0,.45);
  z-index:30;
  pointer-events:none;
}
.cal-day[data-tip]:hover::before{
  content:"";
  position:absolute;
  bottom:112%;left:50%;
  transform:translateX(-50%);
  border:5px solid transparent;
  border-top-color:var(--amber);
  z-index:30;
  pointer-events:none;
}

.legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:12px;font-size:11px;color:var(--muted);}
.legend span{display:inline-flex;align-items:center;gap:6px;}
.swatch{width:10px;height:10px;border-radius:3px;display:inline-block;}
.swatch.load{background:var(--amber-dim);}
.swatch.drive{background:var(--drive);}
.swatch.arrive{background:var(--amber);}
.swatch.unload{background:var(--unload);}
.swatch.buffer{background:transparent;border:1px dashed var(--line);}

/* cost table */
table{
  width:100%;
  border-collapse:collapse;
  background:var(--asphalt-2);
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
}
thead th{
  text-align:left;
  font-family:'Space Mono',monospace;
  font-size:11px;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted);
  padding:12px 16px;
  border-bottom:1px solid var(--line);
}
thead th:last-child, td:last-child{text-align:right;}
tbody td{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  font-size:14px;
}
tbody tr:last-child td{border-bottom:none;}
.item-name{font-weight:600;}
.item-detail{display:block;font-size:12px;color:var(--muted);margin-top:2px;}
.amount{font-family:'Space Mono',monospace;font-size:15px;}
tfoot td{
  padding:14px 16px;
  font-family:'Space Mono',monospace;
  font-size:15px;
  border-top:1px solid var(--line);
}
.grand{background:#2c2f36;}
.grand td{font-size:17px;font-weight:700;color:var(--amber);}
.buffer-row td{color:var(--green);font-size:13px;padding-top:10px;padding-bottom:16px;}
/* risks table: mitigation column runs a step smaller than the risk label */
.risks tbody td:last-child{font-size:13px;}

.footnote{font-size:12px;color:var(--muted);margin-top:14px;line-height:1.6;}
/* pulls the footnote up under the waypoints block it annotates */
.footnote.tight{margin-top:-24px;margin-bottom:44px;}
strong{color:var(--off-white);}

/* waypoints -- the route table.
   The column template lives in one custom property so the header row and every
   body row read from the same source; they cannot drift apart, and edit mode
   only appends a tools column to it. */
.waypoints{
  margin-bottom:44px;
  --wp-cols:26px 84px minmax(0,1fr) 96px 168px 132px 62px;
}
.wp-head{
  display:grid;grid-template-columns:var(--wp-cols);gap:12px;
  padding:0 16px 8px;font-size:10px;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em;font-family:'Space Mono',monospace;
}
.wp-row{
  padding:12px 16px;
  background:var(--asphalt-2);
  border:1px solid var(--line);
  border-top:none;
  font-size:13px;
}
.wp-row:first-child{border-top:1px solid var(--line);border-radius:10px 10px 0 0;}
.wp-row:last-child{border-radius:0 0 10px 10px;}
.wp-line{display:grid;grid-template-columns:var(--wp-cols);gap:12px;align-items:start;}

.wp-n{font-family:'Space Mono',monospace;font-size:12px;font-weight:700;color:var(--amber);}
.wp-day{font-family:'Space Mono',monospace;color:var(--amber);font-size:11px;text-transform:uppercase;}

.wp-loc{display:flex;flex-flow:row wrap;align-items:baseline;gap:2px 7px;min-width:0;}
.wp-place{font-weight:600;}
.wp-state{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;}
.wp-addr{flex-basis:100%;font-size:11px;color:var(--muted);line-height:1.4;}

/* align-items:flex-start so a .derived underline hugs its own text rather than
   ruling a line across the whole column */
.wp-miles,.wp-hours{display:flex;flex-direction:column;align-items:flex-start;gap:3px;font-family:'Space Mono',monospace;}
.wp-leg,.wp-tot{font-size:14px;font-weight:700;color:var(--off-white);}
.wp-odo,.wp-split{font-size:10px;color:var(--muted);line-height:1.3;}

.wp-clock{
  display:flex;flex-flow:row wrap;align-items:baseline;gap:2px 6px;
  font-family:'Space Mono',monospace;font-size:12px;
}
.wp-dep{color:var(--off-white);}
.wp-arrow{color:var(--muted);}
.wp-arr{font-weight:700;color:var(--amber);}
.wp-next{font-size:9px;color:var(--red);}
.wp-tz{flex-basis:100%;font-size:10px;color:var(--muted);letter-spacing:.06em;}

.wp-wx{
  display:flex;flex-flow:row wrap;align-items:baseline;justify-content:flex-end;
  gap:0 4px;font-family:'Space Mono',monospace;font-size:12px;color:var(--muted);
}
.wp-wx-sep{opacity:.5;}

/* The stored inputs the hour figures above are computed from. Kept visible for
   read-only visitors too: the arithmetic should be checkable, not just shown. */
.wp-inputs{
  margin:9px 0 0;font-family:'Space Mono',monospace;font-size:10px;
  color:var(--muted);text-transform:uppercase;letter-spacing:.05em;line-height:1.7;
}
.wp-in{color:var(--off-white);}
.wp-sep{opacity:.45;margin:0 3px;}
.wp-note{margin:7px 0 0;font-size:12px;line-height:1.6;color:var(--muted);}

/* two-col cards */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:44px;}
@media (max-width:640px){.grid-2{grid-template-columns:1fr;}}
.card{
  background:var(--asphalt-2);
  border:1px solid var(--line);
  border-radius:10px;
  padding:18px 20px;
}
.card h3{
  font-family:'Bebas Neue',sans-serif;
  font-size:17px;letter-spacing:.03em;font-weight:400;
  margin:0 0 10px;color:var(--amber);
}
.card ul{margin:0;padding-left:18px;font-size:13px;line-height:1.7;color:var(--off-white);}
.card p{font-size:13px;line-height:1.7;color:var(--off-white);margin:0 0 8px;}
.card .muted-line{color:var(--muted);font-size:12px;}
.card .muted-line.spaced{margin-top:8px;}

.kv{display:flex;justify-content:space-between;font-size:13px;padding:6px 0;border-bottom:1px solid var(--line);}
.kv:last-child{border-bottom:none;}
.kv-label{color:var(--muted);}
.kv-val{font-family:'Space Mono',monospace;color:var(--off-white);}

.checklist{list-style:none;margin:0;padding:0;columns:2;column-gap:20px;}
.checklist li{
  font-size:13px;line-height:2;
  break-inside:avoid;
  padding-left:20px;position:relative;
}
.checklist li::before{
  content:"";
  position:absolute;left:0;top:7px;
  width:11px;height:11px;
  border:1.5px solid var(--muted);
  border-radius:3px;
}

/* ==========================================================================
   Edit mode
   Everything below only has an effect for an unlocked editor -- the server
   omits [data-ed] and the toolbar buttons entirely for read-only visitors.
   ========================================================================== */

.bar{
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  background:var(--asphalt-2);
  border-bottom:1px solid var(--line);
  padding:8px 20px;
  margin:-32px -20px 28px;
  font-family:'Space Mono',monospace;
  font-size:11px;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em;
}
.bar-state{color:var(--amber);font-weight:700;}
.bar-who{text-transform:none;letter-spacing:0;}
.bar-who b{color:var(--off-white);}
.bar-msg{margin-left:auto;text-transform:none;letter-spacing:0;}
.bar-msg.ok{color:var(--green);}
.bar-msg.err{color:var(--red);text-transform:none;}

.linkbtn{
  background:none;border:1px solid var(--line);
  color:var(--muted);
  font-family:inherit;font-size:11px;
  text-transform:uppercase;letter-spacing:.06em;
  padding:3px 10px;border-radius:5px;cursor:pointer;
}
.linkbtn:hover{border-color:var(--amber);color:var(--amber);}

/* Editable fields: a dotted underline that firms up on hover. */
[data-ed]{
  cursor:text;
  border-bottom:1px dotted var(--line);
  transition:border-color .12s, background-color .12s;
}
[data-ed]:hover{border-bottom-color:var(--amber);background:rgba(245,166,35,.06);}
[data-ed]:focus-visible{outline:2px solid var(--amber);outline-offset:2px;}
[data-ed].editing{border-bottom-color:transparent;background:none;}
[data-ed].saving{opacity:.5;}

.ed-input{
  width:100%;
  background:var(--asphalt);
  border:1px solid var(--amber);
  border-radius:5px;
  color:var(--off-white);
  font-family:inherit;font-size:inherit;font-weight:inherit;
  line-height:inherit;
  padding:3px 7px;
}
.ed-input:focus{outline:none;box-shadow:0 0 0 2px rgba(245,166,35,.25);}
textarea.ed-input{resize:vertical;font-family:'Inter',sans-serif;font-size:13px;}

/* Derived values are never editable -- mark them so that is visible. */
.derived{border-bottom:1px solid var(--amber-dim);}
.derived-key{color:var(--amber);border-bottom:1px solid var(--amber-dim);}
td.derived,.stop-miles.derived,.wp-day.derived{border-bottom:none;}

/* Real checkboxes replace the decorative ::before squares. */
.checklist li:has(.chk)::before{display:none;}
.checklist li:has(.chk){padding-left:22px;}
.chk{
  position:absolute;left:0;top:6px;
  width:12px;height:12px;margin:0;
  accent-color:var(--amber);
  cursor:pointer;
}
.chk:disabled{cursor:default;opacity:.55;}
.checklist li.done{color:var(--muted);text-decoration:line-through;}

/* Row tools */
.rowtools{width:34px;text-align:right;}
.del{
  background:none;border:none;color:var(--muted);
  font-size:16px;line-height:1;cursor:pointer;padding:2px 4px;border-radius:4px;
}
.del:hover{color:var(--red);background:rgba(229,103,95,.12);}
.addrow{
  margin-top:10px;
  background:none;border:1px dashed var(--line);
  color:var(--muted);
  font-family:'Space Mono',monospace;font-size:11px;
  text-transform:uppercase;letter-spacing:.06em;
  padding:7px 14px;border-radius:6px;cursor:pointer;
}
.addrow:hover{border-color:var(--amber);color:var(--amber);}

/* Budget gone negative */
.buffer-row.over td{color:var(--red);}

/* In edit mode the rowtools column becomes :last-child, which would steal the
   right-alignment the base stylesheet pins to that position. Set it explicitly
   by column instead, so read-only and edit mode render identically. */
.amount{text-align:right;}
.costs thead th:nth-child(2),
.risks thead th:nth-child(2),
.risks tbody td:nth-child(2){text-align:right;}

.log td{font-size:12px;text-align:left;}
.log .item-name{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);white-space:nowrap;}

@media (max-width:640px){
  .bar{margin:-32px -20px 20px;font-size:10px;gap:10px;}
  .bar-msg{margin-left:0;width:100%;}
}
/* ==========================================================================
   Calendar events + calendar/timeline linking
   ========================================================================== */

:root{
  --ev-appointment:#5b8dd6;
  --ev-deadline:#e5675f;
  --ev-logistics:#6fbf73;
  --ev-personal:#b07fd4;
}

.ev-dot{
  width:6px;height:6px;border-radius:50%;
  display:inline-block;flex:0 0 auto;
}
.ev-appointment{--ev:var(--ev-appointment);}
.ev-deadline{--ev:var(--ev-deadline);}
.ev-logistics{--ev:var(--ev-logistics);}
.ev-personal{--ev:var(--ev-personal);}
.ev-dot{background:var(--ev,var(--muted));}

/* Dots sit under the date numeral inside the square. */
.cal-day{position:relative;flex-direction:column;gap:2px;}
.cal-day.has-ev{padding-bottom:2px;}
.ev-dots{display:flex;gap:2px;justify-content:center;line-height:0;}

/* Days that map to a timeline stop are interactive. */
.cal-day[data-stops]{cursor:pointer;}
.cal-day[data-stops]:focus-visible{outline:2px solid var(--amber);outline-offset:1px;}

/* Both sides of a calendar<->timeline link. */
.cal-day.linked{box-shadow:inset 0 0 0 2px var(--amber);}
.stop.linked{background:rgba(245,166,35,.07);border-radius:8px;}
.stop.linked::before{transform:scale(1.35);}
.stop{transition:background-color .12s;}
.stop::before{transition:transform .12s;}

@keyframes stopflash{
  0%,100%{background:rgba(245,166,35,0);}
  25%    {background:rgba(245,166,35,.18);}
}
.stop.flash{animation:stopflash 1.4s ease-in-out;border-radius:8px;}

/* --- events list --------------------------------------------------------- */

.events{margin-bottom:14px;}
.ev-head,.ev-row{
  display:grid;
  grid-template-columns:150px 1fr 130px;
  gap:12px;align-items:center;
}
body[data-can-edit] .ev-head,
body[data-can-edit] .ev-row{grid-template-columns:150px 1fr 130px 34px;}

.ev-head{
  padding:0 16px 8px;font-size:10px;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em;
  font-family:'Space Mono',monospace;
}
.ev-row{
  padding:12px 16px;
  background:var(--asphalt-2);
  border:1px solid var(--line);
  border-top:none;
  font-size:13px;
}
.ev-row:first-of-type{border-top:1px solid var(--line);border-radius:10px 10px 0 0;}
.ev-row:last-child{border-radius:0 0 10px 10px;}

.ev-when{
  font-family:'Space Mono',monospace;
  color:var(--amber);font-size:11px;
  text-transform:uppercase;letter-spacing:.04em;
}
.ev-body{display:flex;flex-direction:column;gap:2px;min-width:0;}
.ev-title{font-weight:600;}
.ev-detail{font-size:12px;color:var(--muted);}
.ev-detail em{opacity:.5;font-style:italic;}

.ev-tag{
  font-family:'Space Mono',monospace;font-size:10px;
  text-transform:uppercase;letter-spacing:.06em;
  border:1px solid var(--ev,var(--line));
  color:var(--ev,var(--muted));
  border-radius:4px;padding:2px 7px;white-space:nowrap;
}
.picker{
  width:100%;
  background:var(--asphalt);
  border:1px solid var(--ev,var(--line));
  color:var(--ev,var(--off-white));
  font-family:'Space Mono',monospace;font-size:10px;
  text-transform:uppercase;letter-spacing:.06em;
  border-radius:4px;padding:4px 6px;cursor:pointer;
}
.picker:focus{outline:none;box-shadow:0 0 0 2px rgba(245,166,35,.25);}

.empty-state{
  font-size:13px;color:var(--muted);
  border:1px dashed var(--line);border-radius:10px;
  padding:18px 16px;margin:0 0 14px;
}

@media (max-width:640px){
  .ev-head{display:none;}
  .ev-row,
  body[data-can-edit] .ev-row{grid-template-columns:1fr 110px;gap:6px 10px;}
  .ev-when{grid-column:1/-1;}
  .rowtools{grid-column:2;justify-self:end;}
}
/* ==========================================================================
   Trip-day editing: rest days, day controls, unanchored stops
   ========================================================================== */

/* A buffer/rest day: on the trip, but not driving. */
.cal-day.buffer{
  background:transparent;
  box-shadow:inset 0 0 0 1px var(--amber-dim);
  color:var(--amber);
}
.swatch.buffer{background:transparent;box-shadow:inset 0 0 0 1px var(--amber-dim);}

/* Insert / delete controls on each waypoint row. */
.wp-tools{display:inline-flex;gap:2px;justify-content:flex-end;}
.dayop{
  background:none;border:1px solid var(--line);
  color:var(--muted);
  font-family:'Space Mono',monospace;font-size:12px;line-height:1;
  width:22px;height:22px;border-radius:4px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
}
.dayop:hover{border-color:var(--amber);color:var(--amber);}
.dayop.del:hover{border-color:var(--red);color:var(--red);}

/* Edit mode only appends the tools column; the other tracks are untouched. */
body[data-can-edit] .waypoints{--wp-cols:26px 84px minmax(0,1fr) 96px 168px 132px 62px 52px;}

/* The waypoint date is editable now, so it should not read as derived. */
.wp-day{cursor:inherit;}

/* A stop whose anchoring day was removed. Visible, not silent. */
.stop-date.unanchored{color:var(--red);text-transform:none;letter-spacing:0;}

/* Below ~900px the seven tracks stop fitting. Rows become two stacked bands --
   identity on top, figures below -- and the header, which only labels a grid
   that no longer exists, is hidden rather than left pointing at nothing. */
@media (max-width:900px){
  .wp-head{display:none;}
  .wp-line{grid-template-columns:26px 1fr auto;grid-auto-rows:min-content;gap:4px 12px;}
  .wp-n{grid-row:1;}
  .wp-day{grid-column:2;grid-row:1;}
  .wp-loc{grid-column:2 / -1;grid-row:2;}
  .wp-miles{grid-column:2;grid-row:3;flex-flow:row wrap;align-items:baseline;gap:0 6px;}
  .wp-hours{grid-column:2;grid-row:4;flex-flow:row wrap;align-items:baseline;gap:0 6px;}
  .wp-clock{grid-column:2 / -1;grid-row:5;}
  .wp-wx{grid-column:3;grid-row:1;justify-content:flex-end;}
  body[data-can-edit] .wp-tools{grid-column:3;grid-row:3 / span 2;align-self:start;}
}
/* ==========================================================================
   Today card + countdown
   Derived-only, never editable. Deliberately the first thing on the page:
   on a phone mid-trip this is the whole document you actually need.
   ========================================================================== */

.today{
  background:var(--asphalt-2);
  border:1px solid var(--line);
  border-left:3px solid var(--amber);
  border-radius:10px;
  padding:16px 18px;
  margin:0 0 20px;
}
.today.phase-after{border-left-color:var(--green);opacity:.85;}
.today.phase-before{border-left-color:var(--amber-dim);}

.today-head{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  margin-bottom:8px;
}
.today-tag{
  font-family:'Space Mono',monospace;font-size:10px;font-weight:700;
  text-transform:uppercase;letter-spacing:.12em;
  color:var(--asphalt);background:var(--amber);
  border-radius:3px;padding:2px 7px;
}
.today-date{
  font-family:'Bebas Neue',sans-serif;font-size:22px;letter-spacing:.03em;
  color:var(--off-white);line-height:1;
}
.today-day{
  font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em;
}
.today-kind{
  font-family:'Space Mono',monospace;font-size:10px;
  text-transform:uppercase;letter-spacing:.06em;
  border-radius:4px;padding:2px 8px;
  border:1px solid var(--line);color:var(--muted);
}
.today-kind.drive{background:var(--drive);color:var(--off-white);}
.today-kind.load{background:var(--amber-dim);color:var(--amber);}
.today-kind.arrive{background:var(--amber);color:var(--asphalt);}
.today-kind.unload{background:var(--unload);color:var(--amber);}
.today-kind.buffer{border-color:var(--amber-dim);color:var(--amber);}

.today-jump{
  margin-left:auto;
  font-family:'Space Mono',monospace;font-size:10px;
  text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted);text-decoration:none;
  border-bottom:1px dotted var(--line);
}
.today-jump:hover{color:var(--amber);border-bottom-color:var(--amber);}

.today-line{margin:0 0 4px;font-size:15px;font-weight:600;color:var(--off-white);}
.today-stop{margin:0;font-size:13px;color:var(--muted);}
.today-stop strong{color:var(--off-white);}

/* Today's own leg: departure, derived arrival, zone, hours and miles. */
.today-leg{
  display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;
  margin:6px 0 0;font-family:'Space Mono',monospace;font-size:13px;
  color:var(--off-white);
}
.today-arrow,.today-tz{color:var(--muted);}
.today-mile{
  font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);
  border:1px solid var(--line);border-radius:4px;padding:1px 6px;margin-left:4px;
}

.today-events{list-style:none;margin:8px 0 0;padding:0;font-size:13px;}
.today-events li{display:flex;align-items:center;gap:8px;padding:2px 0;color:var(--off-white);}

/* countdown strip */
.countdown{
  display:flex;gap:0;flex-wrap:wrap;
  margin-top:14px;padding-top:12px;
  border-top:1px solid var(--line);
}
.cd{
  flex:1;min-width:88px;
  display:flex;flex-direction:column;gap:2px;
  padding-right:12px;
}
.cd-num{
  font-family:'Space Mono',monospace;
  font-size:22px;font-weight:700;color:var(--amber);line-height:1;
}
.cd-label{
  font-size:10px;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em;
}
.cd.past .cd-num{color:var(--green);font-size:18px;}
.cd.past .cd-label{opacity:.6;}

/* today's position in the timeline and the calendar */
.stop.is-now::before{
  background:var(--amber);
  box-shadow:0 0 0 4px rgba(245,166,35,.22);
}
.cal-day.today{
  outline:2px solid var(--off-white);
  outline-offset:-1px;
}

@media (max-width:640px){
  /* On a phone the Today card carries the day; give it room and pull the
     reference material below it. */
  .today{margin-left:-6px;margin-right:-6px;padding:14px;}
  .today-date{font-size:20px;}
  .today-jump{margin-left:0;width:100%;}
  .cd{min-width:70px;}
  .cd-num{font-size:19px;}
  .odometer{flex-wrap:wrap;}
  .odo-cell{flex:1 1 50%;border-bottom:1px solid var(--line);}
}