/* The event's own look, taken from babystepscamino.com's stylesheet:
   accent hsl(0,100%,35.88%), black hsl(0,0%,5.1%), light accent
   hsl(0,100%,67.45%), a white ground, Fjalla One over Open Sans at
   17px with the site's own spacing, and Poppins for the small print. */
:root {
  --bg: #ffffff; --ink: #0d0d0d; --muted: #5c5c5c; --line: #e2e2e2; --soft: #f7f5f5;
  --accent: #b70000; --accent-ink: #ffffff; --accent-soft: #fdeaea; --accent-light: #ff5959;
  --bad: #8a0000; --good: #2e7d32; --link: #aa2109;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Fjalla One", "Poppins", "Open Sans", system-ui, sans-serif;
  --meta: "Poppins", "Open Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
/* a class that sets display beats the browser's own rule for the
   hidden attribute, and this page hides things by that attribute */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.8 var(--body); letter-spacing: .06em; color: var(--ink); background: var(--bg); }
header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 16px; border-bottom: 1px solid var(--line); }
/* the event's logo, at the height the site gives it on a phone */
header .brand { display: block; line-height: 0; }
header .brand img { display: block; width: auto; height: 108px; }
@media (max-width: 600px) { header .brand img { height: 76px; } }
/* the event site's own navigation, so a pilgrim can get back to the
   pages that sent them here. The site sets these in its meta face. */
header nav.site { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.15rem; flex: 1 1 auto; }
header nav.site a { font-family: var(--meta); font-weight: 500; font-size: .82rem; letter-spacing: .04em;
  color: var(--ink); text-decoration: none; white-space: nowrap; }
header nav.site a:hover { color: var(--accent); }
@media (max-width: 900px) { header nav.site { gap: .2rem .8rem; } header nav.site a { font-size: .75rem; } }
@media (max-width: 560px) { header { flex-wrap: wrap; } header nav.site { order: 3; width: 100%; gap: .15rem .7rem; } }
main { max-width: 760px; margin: 0 auto; padding: 1.2rem 16px 3rem; }
footer { max-width: 760px; margin: 0 auto; padding: 0 16px 2rem; font-size: .8rem; }
/* the site's own scale: 2.706 / 1.471 / 1.118 rem over a 17px base,
   Fjalla One at its single weight, its own letter spacing and leading.
   The first of them is held back at phone width, where 46px of a
   condensed face fills the screen. */
h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; line-height: 1.3; letter-spacing: .01em; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 7vw, 2.70588235rem); }
h2 { font-size: 1.47058824rem; margin-top: 1.6rem; }
h3 { font-size: 1.11764706rem; margin-top: 1.1rem; }
h4 { font-size: 1.2rem; margin: 1rem 0 .3rem; }
p { margin: 0 0 .8rem; }
/* the site's own link colour, so a venue link in the copy is not the
   browser's blue */
a { color: var(--link); }
a.btn, a.btn:hover { color: var(--accent-ink); }
a.btn.quiet { color: var(--accent); }
.muted { color: var(--muted); }
.bad { color: var(--bad); }
.banner { background: #fff4d6; color: #5b4300; padding: .5rem 16px; text-align: center; font-size: .9rem; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: 1rem; background: var(--bg); }
.card.soft { background: var(--soft); border-color: transparent; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .doors { grid-template-columns: 1fr; } }
.meter { margin: 1rem 0 1.5rem; }
.meter .bar { height: 12px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.meter .fill { height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s; }
.meter .label { font-size: .9rem; color: var(--muted); margin-top: .35rem; }
.btn { display: inline-block; font: 600 1rem var(--meta); letter-spacing: .02em; padding: .65rem 1.4rem; border-radius: 4px; border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn.quiet { background: transparent; color: var(--accent); }
.btn.danger { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.small { font-size: .85rem; padding: .35rem .7rem; }
label, .field { display: block; font-family: var(--meta); font-weight: 500; font-size: .9rem; letter-spacing: 0; line-height: 1.4; margin: .7rem 0 .25rem; }
input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%; font: 1rem/1.5 var(--body); letter-spacing: normal; padding: .55rem .65rem;
  border: 1px solid #c4c4c4; border-radius: 6px; background: var(--bg); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 5.5rem; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .row, .row3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; font-size: .95rem; margin: .45rem 0; }
.check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); flex: none; }
.check .note { color: var(--muted); font-size: .85rem; }
.check.off { color: var(--muted); }
.help { color: var(--muted); font-family: var(--meta); font-size: .85rem; line-height: 1.5; letter-spacing: 0; margin: .1rem 0 .6rem; }
/* a door on the landing: what it is, who it is for, what it costs */
.door .for { color: var(--muted); }
.door .fee { font-weight: 600; }
.doors + .choose { margin-top: 1rem; }
.meter .hurry { color: var(--accent); font-weight: 600; }
/* a person's card, and the two questions it answers about them */
.person { position: relative; }
.person > h2 { padding-right: 9rem; }
/* Remove is a quiet text link in the card's top corner, at every width.
   A bordered button under the name reads as the thing to press next,
   which on this card it never is. A long name is cut short here; the
   button's aria-label still carries the whole of it. */
.person .remove { position: absolute; top: .95rem; right: .9rem; max-width: 8.5rem;
  font: 400 .85rem var(--body); padding: 0; border: 0; background: none;
  color: var(--muted); text-decoration: underline; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .remove:hover { color: var(--bad); }
.person .weekend, .person .about { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: .3rem; }
.group { margin: 0 0 .7rem; }
.group .closed { color: var(--muted); font-size: .85rem; margin: .2rem 0 0; }
/* the Sunday distance sits under the Sunday row it belongs to */
.sub { margin-left: 1.75rem; }
/* the two weekends a person can have, with the first person's written
   out under the one that copies it */
.sameas { margin: .3rem 0 .8rem; }
.sameas .check { font-weight: 600; }
.summary { margin: .1rem 0 .5rem 1.75rem; color: var(--muted); font-size: .88rem; }
.help.room { margin-top: .5rem; }
/* a long day row wraps rather than pushing the page sideways */
.check span { min-width: 0; overflow-wrap: break-word; }
.fees table { width: 100%; border-collapse: collapse; }
.fees td { padding: .3rem 0; border-bottom: 1px solid var(--line); overflow-wrap: break-word; }
.fees td:last-child { text-align: right; }
.fees tr.total td { font-weight: 600; border-bottom: none; }
.actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: 1.2rem; }
.status { font-size: .85rem; color: var(--muted); }
.error { background: #fdecea; color: var(--bad); padding: .6rem .8rem; border-radius: 6px; margin: .8rem 0; }
.ok { color: var(--good); }

/* the pilgrim's agreement: a dialog whose terms scroll, over a scrim.
   The button under it stays shut until the text has been read to its
   end and the box is ticked. */
.scrim { position: fixed; inset: 0; background: rgba(13,13,13,.55); z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--bg); border-radius: 10px; padding: 1.2rem 1.3rem;
  width: min(44rem, 100%); max-height: min(44rem, 92vh); overflow: auto;
  display: flex; flex-direction: column; }
.modal h2 { margin-top: 0; }
.modal .terms { border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem;
  overflow-y: auto; max-height: 22rem; min-height: 8rem; background: var(--soft);
  font-size: .95rem; margin: .4rem 0 .8rem; }
.modal .terms:focus { outline: 2px solid var(--accent); }
.modal .terms p { margin: 0 0 .8rem; }
.modal .terms p:last-child { margin-bottom: 0; }
.modal .actions { margin-top: .4rem; }
@media (max-width: 600px) { .modal .terms { max-height: 48vh; } }

/* the wait a person can see: a bar across the top while any fetch is in
   flight, and a spinner in the button that started one */
.busy { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--accent-soft); overflow: hidden; z-index: 20; }
.busy::after { content: ""; display: block; height: 100%; width: 40%; background: var(--accent); animation: busy-slide 1.1s linear infinite; }
@keyframes busy-slide { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
.spin {
  display: inline-block; width: .8em; height: .8em; margin-left: .45rem; vertical-align: -.05em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin-turn .6s linear infinite;
}
@keyframes spin-turn { to { transform: rotate(360deg); } }
.loading { text-align: center; color: var(--muted); padding: 2.5rem 0; }
.loading .spin { display: block; width: 1.5rem; height: 1.5rem; border-width: 3px; margin: 0 auto .6rem; color: var(--accent); }
/* edit mode: the toggle, the organizer's name, the step row and the
   spans an organizer types into. A stranger never sees any of it. */
header .tools { display: flex; align-items: center; gap: .9rem; }
.editcopy { font: 600 .85rem var(--body); color: var(--accent); background: none; border: 1px solid var(--accent); border-radius: 5px; padding: .2rem .55rem; cursor: pointer; }
.editcopy.on { background: var(--accent); color: var(--accent-ink); }
.prompt { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .6rem 16px; background: var(--accent-soft); }
.prompt label { margin: 0; font-size: .85rem; }
.prompt input { width: 14rem; }
.steps { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; padding: .5rem 16px; background: var(--soft); border-bottom: 1px solid var(--line); }
.steps .lead { font-size: .8rem; font-weight: 600; color: var(--muted); margin-right: .3rem; }
.steps button { font: 600 .8rem var(--body); color: var(--accent); background: var(--bg); border: 1px solid var(--accent); border-radius: 5px; padding: .2rem .5rem; cursor: pointer; }
.steps button.on { background: var(--accent); color: var(--accent-ink); }
body.editing .copy { outline: 1px dashed var(--accent); outline-offset: 2px; border-radius: 2px; background: var(--accent-soft); }
body.editing .copy:focus { outline: 2px solid var(--accent); background: var(--bg); white-space: pre-wrap; }
/* A string inside a solid button. The editing background is nearly
   white and a solid button's own colour is white text, so the words
   vanished the moment Edit text went on. Ink while they are edited. */
body.editing .btn .copy, body.editing a.btn .copy { color: var(--ink); }
body.editing .btn, body.editing .check, body.editing a.btn, body.editing .remove { cursor: default; }
.tick { color: var(--good); font-weight: 600; margin-left: .3rem; }
.copy-bad { color: var(--bad); font-size: .85rem; margin-left: .3rem; }
.ribbon { background: #fff4d6; color: #5b4300; padding: .45rem .8rem; border-radius: 6px; font-size: .85rem; font-weight: 600; margin-bottom: 1rem; }
.otherlist .key { display: block; font-size: .78rem; color: var(--muted); margin-top: .8rem; }

/* the check-in link: one big button for a hand holding a phone and a child */
.btn.big { font-size: 1.2rem; padding: 1rem 1.6rem; width: 100%; text-align: center; }
.done { font-weight: 600; font-size: 1.1rem; }

/* the payment step's amount chooser */
.picks { border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; margin: 1.2rem 0; }
.picks > p:first-child { margin: 0 0 .5rem; font-weight: 600; }
#amount-box { margin: .6rem 0 0 1.7rem; }
#amount-box label { display: inline-flex; align-items: baseline; gap: .25rem; font-weight: 600; }
#amount-box input { width: 7rem; }
#amount-box .note { margin: .4rem 0 0; color: var(--muted); font-size: .85rem; font-weight: 400; }

/* the agreement drawn as a preview: the backdrop is for looking at, so
   it must not swallow the clicks meant for the step row behind it */
.scrim.preview { position: static; inset: auto; background: none; z-index: auto;
  padding: 0; margin: 1.2rem 0 0; }
.scrim.preview .modal { box-shadow: 0 0 0 1px var(--line); max-height: none; }
/* the agreement while its words are being edited: one block of raw
   text, so the blank lines between paragraphs can be seen and typed */
.terms .copy { white-space: pre-wrap; display: block; }

/* the address suggestions under the street box */
.suggests { position: relative; }
.suggests #place-list { position: absolute; z-index: 30; left: 0; right: 0; margin: -.2rem 0 0;
  padding: 0; list-style: none; background: var(--bg); border: 1px solid var(--accent);
  border-radius: 4px; box-shadow: 0 6px 18px rgba(13,13,13,.14); overflow: hidden; }
.suggests #place-list button { display: block; width: 100%; text-align: left; border: 0;
  background: none; font: inherit; padding: .5rem .7rem; cursor: pointer; }
.suggests #place-list button:hover, .suggests #place-list button:focus { background: var(--accent-soft); }
.suggests #place-list b { display: block; font-weight: 600; }
.suggests #place-list span { color: var(--muted); font-size: .85rem; }
body.editing .suggests #place-list { display: none; }
.picks.assist { margin-top: 1.4rem; }
.picks.assist .note { margin: .3rem 0 .8rem 1.7rem; }
.picks.assist .actions { margin: 0; }
