/* Lightrole house style: cool off-white paper, Inter Tight, hairline rules,
   wide-tracked uppercase labels, teal accent. Hierarchy comes from
   whitespace and type size, not from boxes.

   ⭐ LIGHT, since 2026-09-08, on Kieran's instruction. It was a dark navy
   scheme and everything else about it is unchanged: the same cool cast, the
   same hairlines, the same restraint. Only the ground and the ink swapped.

   ⛔ THE NAMES STILL MEAN WHAT THEY MEANT, which is why they did not change.
   `--ink` is the GROUND and `--text` is what is written on it. They are used
   that way round all over, including as `color: var(--ink)` on a teal pin,
   where the glyph has to be the ground colour. Do not read `--ink` as "black".

   ⚠️ THE ACCENT HAD TO CHANGE COLOUR, not just position. The old teal was
   #4dd0c5, a mint that sat well on navy and is about 1.7:1 on white, so it
   was unreadable as text and washed out as a button. It is now a deep teal at
   about 5.2:1 on the page. Anything that lands on the light ground as text or
   as a border needed the same treatment: amber, red and green are all
   darkened here for the same reason. If a colour is ever added back at its
   dark-mode value, it will look fine to whoever adds it and be illegible to
   everyone else. */

:root {
  --ink: #f6f8fa;      /* the page. Cool off-white, never pure white */
  --ink-2: #ffffff;    /* a raised surface, e.g. the quote panel */
  --line: #ccd6e0;     /* a hairline you are meant to see */
  --line-soft: #e3e9ef; /* a hairline that only separates */
  --text: #0d1a26;
  /* ⚠️ Both are darker than a straight inversion of the navy scheme would
     give. They carry real information on this site, not decoration: a hint is
     where the postcodes and the inc-VAT figure live. At 5.4:1 and 3.1:1 the
     quieter one failed AA on paper, so they are set at about 6.8:1 and 4.6:1,
     which keeps two clear steps AND keeps both readable. */
  --muted: #46596b;
  --dim: #5f7285;
  --teal: #0e7c72;
  --warn: #96690a;
  --bad: #b3372c;
  --good: #1f7a4d;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-inline-size: 940px;
  margin: 0 auto;
  padding: 0 20px 96px;
}

/* --- masthead --------------------------------------------------------- */

header.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 20px;
  border-block-end: 1px solid var(--line);
  margin-block-end: 32px;
  flex-wrap: wrap;
}

.mark {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.02em;
}
.mark b { font-weight: 600; }

.top nav {
  display: flex;
  gap: 20px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.top nav a { color: var(--muted); }
.top nav a.on { color: var(--teal); }

/* --- type ------------------------------------------------------------- */

h1 {
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 8px;
}

.lede { color: var(--muted); margin: 0 0 36px; max-inline-size: 56ch; }

.label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  display: block;
  margin-block-end: 7px;
}

.rule {
  border: 0;
  border-block-start: 1px solid var(--line);
  margin: 34px 0 28px;
}

.section-head {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  padding-block-end: 10px;
  border-block-end: 1px solid var(--line);
  margin-block-end: 20px;
}

/* --- form ------------------------------------------------------------- */

.field { margin-block-end: 20px; }

.row {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}
.row-3 { grid-template-columns: 1fr 1fr 1fr; }

input[type=text], input[type=number], input[type=tel],
input[type=password], input[type=datetime-local], select, textarea {
  inline-size: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  font: inherit;
  font-size: 16px;              /* below 16 and iOS zooms the page on tap */
  padding: 0 12px;
  block-size: 44px;
  transition: border-color .15s;
}
textarea { block-size: auto; padding: 11px 12px; resize: vertical; min-block-size: 76px; }
select { block-size: 44px; appearance: none; padding-inline-end: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.hint { font-size: 13px; color: var(--dim); margin-block-start: 6px; }

/* segmented control, for the one choice that changes the price most */

.seg { display: flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.seg button {
  flex: 1;
  background: var(--ink-2);
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  transition: background .15s, color .15s;
}
.seg button + button { border-inline-start: 1px solid var(--line); }
.seg button[aria-pressed=true] { background: var(--teal); color: var(--ink); font-weight: 500; }

button.go {
  inline-size: 100%;
  background: var(--teal);
  color: var(--ink);
  border: 0;
  border-radius: 3px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 16px;
  cursor: pointer;
}
button.go:disabled { opacity: .45; cursor: default; }

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 3px;
  font: inherit;
  font-size: 14px;
  padding: 11px 18px;
  cursor: pointer;
}
button.ghost:hover { border-color: var(--teal); color: var(--teal); }

details.more { margin-block-start: 8px; }
details.more > summary {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  list-style: none;
  padding-block: 10px;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '+ '; color: var(--teal); }
details.more[open] > summary::before { content: '- '; }

/* --- the answer ------------------------------------------------------- */

.answer { margin-block-start: 40px; }

.price {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-block-end: 18px;
  border-block-end: 1px solid var(--line);
}
.price .big {
  font-size: clamp(52px, 14vw, 88px);
  font-weight: 300;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--teal);
}
.price .side { color: var(--muted); font-size: 15px; }
.price .side b { color: var(--text); font-weight: 500; }

table.bd { inline-size: 100%; border-collapse: collapse; margin-block-start: 4px; }
table.bd td {
  padding: 13px 0;
  border-block-end: 1px solid var(--line-soft);
  vertical-align: top;
  font-size: 15px;
}
table.bd td.amt { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.bd td .d { display: block; color: var(--dim); font-size: 13px; margin-block-start: 3px; }
table.bd tr.tot td { border-block-end: 0; padding-block-start: 16px; font-weight: 600; }

dl.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px 28px;
  margin: 0;
}
dl.facts dt {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--dim); margin-block-end: 5px;
}
dl.facts dd {
  margin: 0; font-size: 21px; font-weight: 300; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
dl.facts dd small { display: block; font-size: 13px; color: var(--dim); letter-spacing: 0; margin-block-start: 3px; }

.note {
  border-inline-start: 2px solid var(--warn);
  padding: 2px 0 2px 14px;
  margin-block-start: 14px;
  color: var(--muted);
  font-size: 14px;
}
.note.bad { border-color: var(--bad); }
.note.info { border-color: var(--teal); }

.err {
  border-inline-start: 2px solid var(--bad);
  padding: 2px 0 2px 14px;
  color: var(--bad);
  margin-block-start: 20px;
}

.actions { display: flex; gap: 12px; margin-block-start: 28px; flex-wrap: wrap; }

.spin { color: var(--muted); font-size: 14px; margin-block-start: 24px; }

/* --- saved list ------------------------------------------------------- */

table.list { inline-size: 100%; border-collapse: collapse; font-size: 14px; }
table.list th {
  text-align: start; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); font-weight: 400; padding: 0 12px 10px 0;
  border-block-end: 1px solid var(--line);
}
table.list td { padding: 14px 12px 14px 0; border-block-end: 1px solid var(--line-soft); vertical-align: top; }
table.list td.n { text-align: end; font-variant-numeric: tabular-nums; padding-inline-end: 0; }
table.list .ref { color: var(--teal); font-variant-numeric: tabular-nums; }

/* --- login ------------------------------------------------------------ */

.login { max-inline-size: 340px; margin: 18vh auto 0; padding: 0 20px; }

@media (max-width: 620px) {
  .row, .row-3 { grid-template-columns: 1fr; gap: 20px; }
  .wrap { padding-inline: 16px; }
  table.list .hide-s { display: none; }
}

/* --- the map ---------------------------------------------------------- */

.mapwrap { margin: 22px 0 0; }

.map {
  block-size: 330px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.mapwrap.tall .map { block-size: min(74vh, 760px); }

.mapwrap figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-block-start: 10px;
}

.keys { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.key { display: inline-flex; align-items: center; gap: 8px; }
.key i { display: block; inline-size: 20px; border-block-start-style: solid; }
.key i.k-charged { border-block-start-width: 3px; border-color: var(--teal); }
.key i.k-off { border-block-start-width: 2px; border-color: var(--muted); }
.key i.k-patch { border-block-start-width: 2px; border-style: dashed; border-color: var(--muted); }
.key i.k-charge {
  inline-size: 16px; block-size: 16px; border: 0; border-radius: 50%;
  background: var(--warn); color: var(--ink);
  font-size: 10px; font-weight: 700; font-style: normal;
  display: grid; place-items: center;
}

button.ghost.small { padding: 7px 14px; font-size: 12px; }

/* Pins. Collection is a dot, delivery is a square, same as every map an
   operator has ever used. The yard is quiet because it is not the job. */
.pin {
  display: grid; place-items: center;
  inline-size: 22px; block-size: 22px;
  border-radius: 50%;
  font-size: 11px; font-weight: 600; line-height: 1;
  font-family: 'Inter Tight', sans-serif;
}
.pin.from { background: var(--teal); color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 124, 114, .20); }
.pin.to { background: var(--text); color: var(--ink); border-radius: 3px; box-shadow: 0 0 0 3px rgba(13, 26, 38, .16); }
.pin.yard {
  inline-size: 16px; block-size: 16px; border-radius: 2px;
  background: var(--ink); color: var(--muted);
  border: 1px solid var(--dim); font-size: 9px;
}
.pin.charge { inline-size: 18px; block-size: 18px; background: var(--warn); color: var(--ink); font-size: 10px; }
/* A crossing that costs nothing. Marked, because where the van crosses the
   river is worth seeing, but never amber: amber means money. */
.pin.crossing {
  inline-size: 16px; block-size: 16px; font-size: 10px;
  background: var(--ink); color: var(--dim); border: 1px solid var(--dim);
}

/* Leaflet, dressed for a light page. */
.leaflet-container { font: inherit; background: var(--ink-2); }
.leaflet-control-attribution {
  background: rgba(255, 255, 255, .8) !important;
  color: var(--dim) !important;
  font-size: 10px;
  padding: 1px 6px;
}
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a {
  background: var(--ink-2); color: var(--text);
  border-block-end-color: var(--line);
}
.leaflet-bar a:hover { background: var(--line-soft); color: var(--teal); }
.leaflet-tooltip {
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line); border-radius: 3px;
  font-size: 12px; padding: 6px 9px;
  box-shadow: none;
}
.leaflet-tooltip b { font-weight: 600; }
.leaflet-tooltip-top::before { border-top-color: var(--line); }
.leaflet-tooltip-bottom::before { border-bottom-color: var(--line); }
.leaflet-tooltip-left::before { border-left-color: var(--line); }
.leaflet-tooltip-right::before { border-right-color: var(--line); }

@media (max-width: 620px) {
  .map { block-size: 260px; }
}

/* --- planning a day --------------------------------------------------- */

.job {
  border-block-start: 1px solid var(--line-soft);
  padding-block: 20px 4px;
}
.job:first-child { border-block-start: 0; }

.jobhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 14px;
}
.jobn {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

button.x {
  background: none;
  border: 0;
  color: var(--dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
button.x:hover { color: var(--bad); }

/* The running order. A number, a time, what to do, what it took to get there. */
table.bd.stops td { padding-block: 11px; vertical-align: top; }
table.bd.stops td.stopn { inline-size: 34px; padding-inline-end: 6px; }
table.bd.stops td.stoptime {
  inline-size: 54px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding-inline-end: 10px;
}
table.bd.stops tr.yardrow td { color: var(--muted); }
table.bd.stops tr.yardrow b { font-weight: 400; }
table.bd.stops .amt { font-size: 13px; color: var(--muted); }

.keys .pin { display: inline-grid; }

@media (max-width: 620px) {
  table.bd.stops td.amt { display: none; }
}

/* A stop visited more than once, or once to collect and once to drop. */
.pin.both {
  background: var(--teal);
  color: var(--ink);
  border-radius: 6px;
  inline-size: auto;
  min-inline-size: 22px;
  padding-inline: 5px;
  box-shadow: 0 0 0 3px rgba(14, 124, 114, .20);
}
.pin.from, .pin.to { inline-size: auto; min-inline-size: 22px; padding-inline: 4px; }

/* The one-off tick on a job row. */
.tickline {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  margin-block: 4px 8px;
  font-size: 14px;
  color: var(--muted);
}
.tickline input { inline-size: auto; block-size: auto; margin-block-start: 4px; }
.tickline .hint { display: block; margin: 2px 0 0; }
