/* Will You Be My Guide, willyoubemyguide.com
 *
 * Two constraints shape everything below and neither is decoration.
 *
 * Colour never carries meaning alone. A free date is blue and also says "4
 * free"; a date nobody can take is grey and also says "None free". There is no
 * red and no green anywhere in this file, so nothing in the interface depends
 * on telling those two apart.
 *
 * Nothing loads from a network. No web font, no icon set, no analytics. The
 * program is meant to run on a laptop in an office with bad wifi and look the
 * same as it does anywhere else.
 */

:root {
  --ink: #16202e;
  --ink-soft: #5a6a7d;
  --line: #d8dee7;
  --line-soft: #e9edf2;
  --surface: #ffffff;
  --surface-sunk: #f4f6f9;
  --page: #eef1f5;
  --accent: #1d4ed8;
  --accent-soft: #e8eefc;
  --accent-ink: #ffffff;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9eef5;
    --ink-soft: #9aa8ba;
    --line: #2c3948;
    --line-soft: #232e3b;
    --surface: #18212c;
    --surface-sunk: #131b24;
    --page: #0f151c;
    --accent: #6c9bff;
    --accent-soft: #1b2c4b;
    --accent-ink: #0f151c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }

/* ------------------------------------------------------------------ header */

.top {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-note { color: var(--ink-soft); font-size: 13px; }
.top-link { margin-left: auto; font-size: 14px; }

/* -------------------------------------------------------------- step rail */

.rail {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 22px 12px;
}

.rail ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 1100px;
}

.rail-node {
  flex: 1 1 150px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-sunk);
}

.rail-num {
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--surface);
}

.rail-label { font-size: 14px; font-weight: 600; }
.rail-state { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }

.rail-node.now { border-color: var(--accent); background: var(--accent-soft); }
.rail-node.now .rail-num { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rail-node.now .rail-state { color: var(--accent); }
.rail-node.done .rail-num { border-color: var(--accent); color: var(--accent); }
.rail-node.todo { opacity: 0.72; }

/* -------------------------------------------------------------- page frame */

.wrap { max-width: 760px; margin: 0 auto; padding: 26px 22px 60px; }
.wrap.wide { max-width: 1100px; }

h1 { font-size: 27px; line-height: 1.2; margin: 6px 0 10px; letter-spacing: -0.02em; }
h2 { font-size: 19px; margin: 32px 0 12px; }
h3 { font-size: 16px; margin: 0 0 2px; }

.lede { color: var(--ink-soft); font-size: 16px; max-width: 62ch; margin: 0 0 22px; }
.muted { color: var(--ink-soft); font-size: 13.5px; }
.hint { color: var(--ink-soft); font-size: 13.5px; margin: 4px 0 16px; }

.back { display: inline-block; margin-top: 26px; font-size: 14px; }

.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 16px 22px; }
.sample { max-width: 1100px; margin: 0 auto; color: var(--ink-soft); font-size: 12.5px; }

/* ------------------------------------------------------------------ landing */

.steps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; }

.steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.steps .num {
  grid-row: 1 / 3;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.steps p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }

/* -------------------------------------------------------------- forms, cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }

input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;          /* below this, iOS zooms the page on focus */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

textarea { resize: vertical; }

input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible, label:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 16px; padding: 12px 14px; }
legend { font-size: 14px; font-weight: 600; padding: 0 4px; }
.radio { display: block; padding: 4px 0; font-size: 15px; }
.radio input { margin-right: 8px; }

button, .go {
  display: inline-block;
  padding: 11px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

.go:hover, button:hover { filter: brightness(1.08); }

.error {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-left-width: 5px;
  border-radius: 8px;
  padding: 11px 14px;
  margin: 0 0 18px;
  font-weight: 600;
}

/* ------------------------------------------------------- choice grids */

.picks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-bottom: 22px; }
.picks.areas { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }

.pick {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  cursor: pointer;
}

.pick:hover { border-color: var(--accent); }
.pick input { margin-top: 3px; }
.pick strong { display: block; font-size: 15px; }
.pick-blurb { display: block; color: var(--ink-soft); font-size: 13px; margin-top: 2px; }

.tag {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.pick.off { opacity: 0.55; cursor: not-allowed; }
.pick.off .tag { background: var(--surface-sunk); color: var(--ink-soft); }
.pick.off:hover { border-color: var(--line); }

/* ------------------------------------------------------------- date strip */

.days { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); margin-bottom: 14px; }

.day {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  cursor: pointer;
}

.day:hover { border-color: var(--accent); }
.day-name { display: block; font-weight: 600; font-size: 14px; }
.day-date { display: block; font-size: 13px; color: var(--ink-soft); }
.day-count { display: block; font-size: 12px; font-weight: 600; color: var(--accent); margin-top: 3px; }
.day.off { opacity: 0.55; cursor: not-allowed; }
.day.off .day-count { color: var(--ink-soft); }
.day.off:hover { border-color: var(--line); }

.flex { display: block; margin-bottom: 20px; font-size: 15px; }
.flex input { margin-right: 8px; }

/* ------------------------------------------------------------------ tables */

.grid { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.grid th, .grid td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.grid thead th { background: var(--surface-sunk); font-size: 13px; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid .num, .grid th.num, .grid td.num { text-align: right; white-space: nowrap; }
.rates .who strong { display: block; }
.rates .where { color: var(--ink-soft); }
.ref { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.04em; }

.aside { margin-top: 22px; }
.aside summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 6px 0; }

/* ----------------------------------------------------------- guide results */

.guides { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.guide {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px;
}

.guide header { margin-bottom: 12px; }
.guide header p { margin: 0; }

.facts { margin: 0; display: grid; gap: 7px; }
.facts > div { display: grid; grid-template-columns: 104px 1fr; gap: 10px; }
.facts dt { color: var(--ink-soft); font-size: 13px; }
.facts dd { margin: 0; font-size: 13.5px; }

.price { margin: 14px 0 14px; padding-top: 13px; border-top: 1px solid var(--line-soft); display: grid; gap: 2px; }
.total { font-size: 23px; font-weight: 700; letter-spacing: -0.01em; }

.guide .go { margin-top: auto; text-align: center; }

.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px; margin-bottom: 20px; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; color: var(--ink-soft); }
.near { padding-left: 20px; }
.near li { margin-bottom: 8px; font-size: 14.5px; }

@media (max-width: 620px) {
  .wrap { padding: 20px 15px 48px; }
  h1 { font-size: 23px; }
  .rail { padding: 0 15px 10px; }
  .rail-node { flex-basis: 100%; }
  .facts > div { grid-template-columns: 92px 1fr; }
}

/* The honeypot field on the booking form.
 *
 * Off-screen rather than display:none, because some bots skip fields that are
 * display:none precisely to avoid traps. A screen reader is told to ignore it
 * by aria-hidden on the wrapper, and it is out of the tab order, so nobody
 * using the form in any normal way can reach it.
 */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.plain { padding-left: 20px; }
.plain li { margin-bottom: 6px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; background: var(--surface-sunk); padding: 1px 5px; border-radius: 4px; }
