/*
 * The calendar, as a stylesheet.
 *
 * Choice's colours for the chrome, because this is Choice's software. The
 * trucks' own colours for the bookings, because that is the information. The
 * two never compete: the bar is teal, the bookings are whatever the trucks
 * are, and nothing else in the page is coloured at all.
 *
 * Phone first. The month grid is the only thing that needs a wide screen, and
 * on a narrow one the week view takes over.
 */

:root {
  --teal: #0080A3;
  --teal-dark: #006580;
  --orange: #F26122;
  --ink: #122128;
  --ink-soft: #46555c;
  --muted: #6b7478;
  --line: #dfe3e5;
  --paper: #ffffff;
  --wash: #f4f6f7;
  --warn-bg: #fff6e8;
  --warn-line: #e8a33d;
  --stop-bg: #fdecec;
  --stop-line: #c0392b;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(18, 33, 40, .08), 0 2px 8px rgba(18, 33, 40, .05);
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}

a { color: var(--teal-dark); }

h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .6rem; }
h2 { font-size: 1.05rem; line-height: 1.3; margin: 0 0 .6rem; }
h3 { font-size: .95rem; margin: 0; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lede { color: var(--ink-soft); margin: 0 0 1rem; }

/* ---- the bar ---------------------------------------------------------- */

.bar {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-wrap: wrap;
  padding: .7rem 1rem;
  background: var(--teal);
  border-bottom: 3px solid var(--orange);
  color: #fff;
}

.bar .brand {
  font-weight: 650;
  font-size: 1.02rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: .01em;
}

.bar nav { display: flex; gap: .2rem; flex-wrap: wrap; margin-right: auto; }

.bar nav a {
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .92rem;
}

.bar nav a:hover, .bar nav a:focus { background: rgba(255, 255, 255, .16); color: #fff; }

.bar .who { color: rgba(255, 255, 255, .72); font-size: .85rem; }

.bar .signout { color: rgba(255, 255, 255, .92); font-size: .85rem; }

.count {
  display: inline-block;
  min-width: 1.35em;
  padding: 0 .35em;
  margin-left: .3em;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: .78rem;
  font-weight: 650;
  text-align: center;
}

.count--big { font-size: .95rem; vertical-align: .15em; }

main { max-width: 760px; margin: 0 auto; padding: 1.1rem 1rem 2rem; }

body.wide main { max-width: 1400px; }

.foot {
  padding: 1.2rem 1rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}

.foot a { color: var(--teal-dark); }

/* ---- panels, forms, buttons ------------------------------------------- */

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0 0 1rem;
  box-shadow: var(--shadow);
}

.panel.narrow { max-width: 25rem; margin: 2rem auto; }

.panel--proposal { border-left: 4px solid var(--orange); }

fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.2rem 0 0;
  padding: .9rem 0 0;
}

legend { padding: 0 .4rem 0 0; font-weight: 650; font-size: .9rem; color: var(--ink-soft); }

.field { display: block; margin: 0 0 .9rem; }

.field > span { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .25rem; }

.field small { display: block; color: var(--muted); font-size: .8rem; margin-top: .2rem; }

input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=time], input[type=number], select, textarea {
  width: 100%;
  padding: .6rem .65rem;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #c3cacd;
  border-radius: 6px;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

textarea { resize: vertical; }

.grid2 { display: grid; gap: 0 .9rem; grid-template-columns: 1fr; }

@media (min-width: 540px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .4rem; }

.button {
  display: inline-block;
  padding: .62rem 1.05rem;
  background: var(--teal);
  color: #fff;
  border: 1px solid var(--teal);
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover, .button:focus { background: var(--teal-dark); border-color: var(--teal-dark); }

.button.secondary { background: #fff; color: var(--teal-dark); border-color: #c3cacd; }

.button.secondary:hover, .button.secondary:focus { background: var(--wash); border-color: var(--teal); }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--teal-dark);
  text-decoration: underline;
  cursor: pointer;
}

form.inline { display: inline; }

.flash {
  margin: 0 0 1rem;
  padding: .7rem .9rem;
  background: #e8f4f7;
  border-left: 4px solid var(--teal);
  border-radius: 4px;
}

.flash--bad { background: var(--stop-bg); border-left-color: var(--stop-line); }

.warn {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-left-width: 4px;
  border-radius: var(--radius);
}

.warn h2 { margin: 0 0 .4rem; font-size: .98rem; }
.warn ul { margin: 0; padding-left: 1.1rem; }
.warn p { margin: .6rem 0 0; }

.warn--stop { background: var(--stop-bg); border-color: var(--stop-line); }

.crumb { margin: 0 0 .9rem; font-size: .9rem; }

.pairs { margin: 0; }

.pair { display: flex; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.pair:last-child { border-bottom: 0; }
.pair dt { flex: 0 0 8.5rem; color: var(--muted); font-size: .88rem; }
.pair dd { margin: 0; flex: 1 1 auto; }

/* ---- the calendar head ------------------------------------------------- */

.calhead { margin: 0 0 1rem; }

.calhead__when { display: flex; align-items: center; gap: .6rem; }
.calhead__when h1 { margin: 0; flex: 1 1 auto; }

.step {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #c3cacd;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
}

.step:hover, .step:focus { border-color: var(--teal); color: var(--teal-dark); }

.calhead__tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .7rem; }

.views { display: inline-flex; border: 1px solid #c3cacd; border-radius: 6px; overflow: hidden; background: #fff; }

.view { padding: .5rem .8rem; color: var(--ink-soft); text-decoration: none; font-size: .9rem; }
.view + .view { border-left: 1px solid var(--line); }
.view--on { background: var(--teal); color: #fff; font-weight: 600; }

/* ---- the truck filter -------------------------------------------------- */

/*
 * The filter is links, not tick boxes. A tick box that does nothing until a
 * second button is pressed reads as broken, so each of these acts on the tap.
 * They still have to look like something you switch on and off, which is what
 * the little box and the tick are doing.
 */
.filter {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem .8rem;
  margin: 0 0 1rem;
}

.filter__set { display: flex; flex-wrap: wrap; gap: .3rem; }
.filter__legend { width: 100%; font-size: .82rem; color: var(--ink-soft, #555); }
.filter__ticks { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter__more { width: 100%; margin: .1rem 0 0; display: flex; gap: .9rem; flex-wrap: wrap; }

.tick {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .6rem .3rem .45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .88rem;
  cursor: pointer;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.tick__box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: .72rem;
  line-height: 1;
  background: #fff;
}

.tick > span:last-child { border-bottom: 3px solid var(--truck, var(--teal)); padding-bottom: 1px; }
.tick--on { border-color: var(--truck, var(--teal)); background: var(--wash); }
.tick--on .tick__box { background: var(--truck, var(--teal)); border-color: var(--truck, var(--teal)); color: #fff; }
.tick:hover { border-color: var(--truck, var(--teal)); }
.tick:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ---- a booking chip ---------------------------------------------------- */
/*
 * Colour is the truck. Shape is the broad status: a solid chip is firm, a
 * dashed one is not yet, a faded struck-through one no longer holds the date.
 * The exact status is a word on the chip whenever it is not firm — colour and
 * shape never carry the meaning on their own, and "Firm" on every chip in the
 * diary would be a label on nothing.
 */

.chip {
  display: block;
  padding: .3rem .45rem;
  margin: 0 0 .25rem;
  border-radius: 5px;
  border: 2px solid var(--truck, #555);
  background: var(--truck, #555);
  color: #fff;
  text-decoration: none;
  font-size: .82rem;
  line-height: 1.32;
  overflow: hidden;
}

.chip:hover, .chip:focus { filter: brightness(1.12); }
.chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.chip--held { background: #fff; color: var(--ink); border-style: dashed; }

.chip--off { opacity: .55; }
.chip--off .chip__truck { text-decoration: line-through; }

.chip--cont { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dotted; }
.chip--goes-on { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: dotted; }

.chip__truck { display: block; font-weight: 650; }
.chip__when { display: block; }
.chip__where, .chip__pax, .chip__run { display: block; opacity: .9; font-size: .96em; }

.chip--held .chip__truck { color: var(--truck, var(--ink)); }

/* The status, on the chips that have one. It sits under the venue rather than
   at the end, because a cancelled job is something you want to know before
   you have read the times. */
.chip__state {
  display: inline-block;
  margin: .1rem 0 .15rem;
  padding: 0 .4rem;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.5;
}

.away {
  display: block;
  padding: .18rem .4rem;
  margin: 0 0 .2rem;
  font-size: .78rem;
  color: var(--muted);
  background: var(--wash);
  border-left: 3px solid #c3cacd;
  border-radius: 3px;
}

.away__why { display: block; font-style: italic; }

.legend { color: var(--muted); font-size: .85rem; margin: 1rem 0 0; }

/* ---- the month grid ---------------------------------------------------- */

/*
 * The month grid scrolls sideways on a narrow screen rather than being hidden.
 * An earlier draft set display:none below 760px, which meant anybody whose
 * remembered view was the month opened the app on a phone and saw an empty
 * page — the worst possible first impression, and invisible from a desktop.
 */
.monthwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.month {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--paper);
}

.month th {
  padding: .4rem .3rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--wash);
}

.month th abbr { text-decoration: none; }

.cell {
  vertical-align: top;
  border: 1px solid var(--line);
  padding: .25rem;
  height: 7.5rem;
}

.cell--other { background: #fafbfb; }
.cell--other .cell__date { opacity: .45; }
.cell--today { box-shadow: inset 0 0 0 2px var(--teal); }

.cell__date {
  display: flex;
  align-items: baseline;
  gap: .25rem;
  text-decoration: none;
  color: var(--ink-soft);
  margin-bottom: .2rem;
}

.cell__num { font-weight: 650; font-size: .9rem; }
.cell__mon { font-size: .7rem; color: var(--muted); }
.cell--other .cell__mon { display: inline; }

.cell__body { display: block; }

/* ---- the week view ----------------------------------------------------- */

.week { list-style: none; margin: 0; padding: 0; }

.wday {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 .7rem;
  padding: .7rem .8rem;
  box-shadow: var(--shadow);
}

.wday--today { border-left: 4px solid var(--teal); }
.wday--empty { background: #fbfcfc; box-shadow: none; }

.wday__head { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .5rem; }
.wday__name { font-weight: 650; }
.wday__date { color: var(--muted); font-size: .9rem; font-weight: 400; }
.wday__today {
  margin-left: auto;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--teal-dark);
  font-weight: 650;
}

.wday__none { margin: 0; color: var(--muted); font-size: .9rem; }

.wday .chip { font-size: .9rem; padding: .5rem .6rem; }

/* ---- one booking ------------------------------------------------------- */

.bookhead {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--truck, var(--teal));
  border-radius: var(--radius);
  padding: .9rem 1rem;
  margin: 0 0 1rem;
  box-shadow: var(--shadow);
}

.bookhead__truck {
  margin: 0 0 .15rem;
  color: var(--truck, var(--teal-dark));
  font-weight: 650;
  font-size: .9rem;
}

.bookhead h1 { margin: 0 0 .4rem; }
.bookhead__state { display: flex; gap: .7rem; flex-wrap: wrap; margin: 0; font-size: .9rem; }

.state {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 650;
  background: var(--wash);
  border: 1px solid var(--line);
}

.state--firm { background: #e7f3e9; border-color: #a9cfb0; color: #1f5130; }
.state--held { background: var(--warn-bg); border-color: var(--warn-line); color: #7a5a14; }
.state--cancelled, .state--lost { background: var(--stop-bg); border-color: #e0a9a3; color: #8c2b20; }
.state--completed { background: #eceff0; color: var(--ink-soft); }
.state--enquiry { background: #e6eff8; border-color: #a9c2de; color: #1d4a7a; }
.state--quoted { background: #efe9f6; border-color: #c3b2db; color: #4b2f73; }
.state--postponed { background: #f3eee4; border-color: #d8c9a8; color: #6b5520; }

.changes { margin: .3rem 0 .6rem; padding-left: 1.1rem; }
.changes li { margin: .15rem 0; }

.why {
  margin: 0 0 .8rem;
  padding: .6rem .75rem;
  background: var(--wash);
  border-radius: 5px;
  font-style: italic;
}

.notes { white-space: pre-wrap; margin: 0; }

.history { list-style: none; margin: 0; padding: 0; font-size: .88rem; }

.history li {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  padding: .35rem 0;
  border-bottom: 1px solid var(--line);
}

.history li:last-child { border-bottom: 0; }
.history__who { font-weight: 600; }
.history__detail { color: var(--ink-soft); }
.history time { margin-left: auto; color: var(--muted); white-space: nowrap; }

.old { margin: 1rem 0 0; }
.old summary { cursor: pointer; color: var(--teal-dark); }
.oldprop { padding: .6rem 0; border-bottom: 1px solid var(--line); }

.aways { list-style: none; margin: 0; padding: 0; }

.aways li {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: baseline;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line);
}

.aways li:last-child { border-bottom: 0; }
.away__name { font-weight: 600; }
.away__when { color: var(--ink-soft); font-size: .9rem; }
.aways .away__why { display: inline; color: var(--muted); font-size: .88rem; }
.aways form { margin-left: auto; }

.signin h1 { margin-bottom: .5rem; }

/* ---- narrow screens ---------------------------------------------------- */

@media (max-width: 760px) {
  .cell { height: 6rem; padding: .15rem; }
  .chip { font-size: .76rem; }
  main { padding-left: .6rem; padding-right: .6rem; }
}

@media (min-width: 761px) {
  .cell__mon { display: none; }
  .cell--other .cell__mon { display: inline; }
}

@media print {
  .bar, .foot, .calhead__tools, .filter, .legend { display: none; }
  .panel, .month, .cell { box-shadow: none; }
  body { background: #fff; }
}

/* ---- people ----
   Who can open the calendar. One card per person rather than a table: each
   row carries two small forms, and a table of forms collapses on a phone. */

.people { list-style: none; margin: 0; padding: 0; }

.person {
  display: grid;
  gap: 4px 24px;
  grid-template-columns: 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 12px;
  box-shadow: var(--shadow);
}

@media (min-width: 720px) {
  .person { grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 1fr) auto; align-items: center; }
  .person .field { margin-bottom: 0; }
}

.person--off { background: #fbfcfc; box-shadow: none; }
.person--off .person__name { text-decoration: line-through; }

.person__name { margin: 0; font-weight: 650; }
.person__email { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.person__meta { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }

.person__role { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.person__role .button { flex: none; }

.truckdot {
  display: inline-block;
  width: .7em;
  height: .7em;
  border-radius: 50%;
  background: var(--truck, #555);
  margin-right: .3em;
  vertical-align: baseline;
}

/* The role picker. Each choice says what the person can do, because "staff"
   and "driver" are words from a database and mean nothing on their own. */
.pick {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .7rem .9rem;
  margin: 0 0 .5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.pick input { accent-color: var(--teal); margin-top: .25rem; }
.pick span { display: block; }
.pick small { display: block; color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.pick:has(input:checked) { border-color: var(--teal); background: #eef6f9; }
.pick:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ---- trucks ---- */

.trucks { list-style: none; margin: 0; padding: 0; }

.truck {
  display: flex;
  gap: .9rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 10px;
  box-shadow: var(--shadow);
}

.truck--off { background: #fbfcfc; box-shadow: none; }
.truck--off .truck__name { color: var(--muted); }

.truck__dot {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  background: var(--truck, #555);
}
.truck--off .truck__dot { opacity: .45; }

.truck__body { flex: 1 1 12rem; min-width: 0; }
.truck__name { margin: 0; font-weight: 650; }
.truck__meta { margin: 3px 0 0; color: var(--muted); font-size: .85rem; }
.truck__actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }

/* The colour picker. Swatches rather than a hex field, because colour is how
   a truck is recognised and two near-identical ones are a misread booking. */
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; }

.swatch {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .8rem .45rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: .9rem;
}
.swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch__dot { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--truck, #555); flex: none; }
.swatch__name small { color: var(--muted); }
.swatch--on, .swatch:has(input:checked) {
  border-color: var(--truck, var(--teal));
  box-shadow: inset 0 0 0 1px var(--truck, var(--teal));
  font-weight: 600;
}
.swatch:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---- on the road ----
   The one part of this used with one hand, parked, late. Big targets, said
   in plain words, and never drawn greyed-out: a disabled button tells
   somebody the app is broken rather than that the diary is thin. */

.road { display: flex; gap: .7rem; margin: 0 0 1rem; flex-wrap: wrap; }

.road a {
  flex: 1 1 11rem;
  display: block;
  padding: .8rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow);
  min-height: 3.4rem;
}
.road__go { background: var(--teal); }
.road__go:hover, .road__go:focus { background: var(--teal-dark); }
.road__call { background: #1F5130; }
.road__call:hover, .road__call:focus { background: #184226; }

.road__what { display: block; font-weight: 700; font-size: .95rem; }
.road__who {
  display: block;
  font-size: .85rem;
  opacity: .9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.placelink { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.placelink:hover { color: var(--teal-dark); }

/* A number inside a note is tappable where it sits, rather than being
   repeated somewhere tidier. */
.tapcall { white-space: nowrap; font-weight: 600; }

@media (max-width: 420px) {
  .road a { flex: 1 1 100%; }
}

/* ---- finding a booking ---- */

.find { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin: 0 0 1rem; }
.find__label { flex: 1 1 100%; font-size: .88rem; font-weight: 600; }
.find input[type=search] {
  flex: 1 1 14rem;
  padding: .6rem .7rem;
  font: inherit;
  border: 1px solid #c3cacd;
  border-radius: 6px;
  background: #fff;
}
.find--compact .find__label { position: absolute; left: -9999px; }
.find--compact { margin-bottom: .8rem; }

.hits { list-style: none; margin: 0; padding: 0; }

.hit {
  display: flex;
  gap: .9rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--truck, #555);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin: 0 0 .6rem;
  box-shadow: var(--shadow);
}

.hit__body { flex: 1 1 14rem; min-width: 0; }
.hit__where { margin: 0; font-weight: 650; }
.hit__where a { color: inherit; text-decoration: none; }
.hit__where a:hover { text-decoration: underline; }
.hit__when { margin: 3px 0 0; color: var(--muted); font-size: .85rem; }
.hit__who { margin: 3px 0 0; font-size: .88rem; }
.hit__tap { display: flex; gap: .5rem; flex-wrap: wrap; }
.hit__tap .button { padding: .45rem .9rem; font-size: .88rem; }

.tick--state span, .tick .state { font-size: .8rem; }
/* A status pill carries its own colour; it does not want a truck's underline. */
.tick > span.state { border-bottom: 0; padding-bottom: 0; }

@media (max-width: 480px) {
  .hit__tap { flex: 1 1 100%; }
  .hit__tap .button { flex: 1; text-align: center; }
}

/* A line saying what you are looking at and what you can do with it, for
   somebody whose answer to the second part is "look". */
.notice {
  margin: 0 0 1rem;
  padding: .75rem .95rem;
  background: #eef6f9;
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  font-size: .92rem;
}

.panel--quiet { background: var(--wash); box-shadow: none; }
.panel--quiet p { margin: 0 0 .5rem; }
.panel--quiet p:last-child { margin-bottom: 0; }

/* Which diary is open. Only drawn when somebody can see more than one, which
   today is Jody and nobody else: her mother runs the Wiener Wagon from the
   same app and should never be shown a door into the food trucks. */
.diaries { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }

.diaries a, .diaries__on {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .8rem;
  line-height: 1.6;
  text-decoration: none;
}

.diaries a { color: #fff; opacity: .75; border: 1px solid rgba(255, 255, 255, .45); }
.diaries a:hover, .diaries a:focus { opacity: 1; }
.diaries__on { background: #fff; color: var(--teal); font-weight: 650; }

.tickbox { display: flex; gap: .5rem; align-items: flex-start; margin: 0 0 .8rem; }
.tickbox input { margin-top: .25rem; }
.tickbox small { display: block; color: var(--muted); }

/* A week that has been, folded to one line. The month opens on the first, so
   by the third week there are two weeks of finished jobs between the top of
   the page and the next thing anybody has to do. */
.week--done td { padding: 0; border: 1px solid var(--line); background: var(--wash); }

.foldedweek {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  flex-wrap: wrap;
  padding: .5rem .8rem;
  text-decoration: none;
  color: var(--ink-soft, #555);
  font-size: .86rem;
}

.foldedweek:hover, .foldedweek:focus-visible { background: #fff; }
.foldedweek__when { font-weight: 650; color: var(--ink); }
.foldedweek__what { flex: 1; min-width: 0; }
.foldedweek__open { color: var(--teal); text-decoration: underline; }
