/* Styles for /register/ only (site/components/Register.tsx). Hand-edited;
   build_pages.py does not touch this file. Colours, type, the copper pipe and the board green come from
   site.css and pipes.css.

   The exchange hangs off a copper pipe down the left, as the three
   commitments do on the home page. Under it is one answer panel: the
   choices as plain rows, a box for the visitor's own words as the last row
   of the same list, and a board-green foot holding the Send button. */

.talk { position: relative; max-width: 760px; padding: 6px 0 4px 46px; }

/* the pipe */
.talk::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 16px;
  background: var(--pipe-v);
}

.log { list-style: none; margin: 0; padding: 0; }
.log li { position: relative; max-width: 60ch; }
.log p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* An earlier question, and the answer given to it. */
.log .q { margin-top: 22px; color: var(--muted); font-weight: 500; }
.log .q:first-child { margin-top: 0; }
.log .a { margin-top: 3px; font-weight: 700; }
.log .a.skipped { color: var(--muted); font-weight: 400; font-style: italic; }

/* a branch off the pipe to each question, with a band of tape on the current one */
.log .q::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -32px;
  width: 22px;
  height: 14px;
  background: var(--pipe-h);
}
.log .q.now::after {
  content: '';
  position: absolute;
  top: 12px;
  left: -19px;
  width: 9px;
  height: 18px;
  border-radius: 1.5px;
  border: 1px solid var(--gold-deep);
  background: var(--gold);
}

/* The question being asked. */
.log .q.now { margin-top: 30px; color: var(--ink); scroll-margin-top: 16px; }
.log .q.now:first-child { margin-top: 0; }
.log .q.now::before { top: 14px; }
/* What TLCR says back to the visitor (an answer to something they asked).
   A block of its own in the green of the board, between their answer and
   the next question. Someone watched using the page on 20 Nov 2026 saw only
   the new question, so the reply is made the first thing the eye lands on
   and the question after it is set a size smaller. */
.log .reply {
  margin-top: 26px;
  max-width: 34rem;
  border-radius: 4px 16px 16px 16px;
  padding: 14px 18px 16px;
  background: var(--board);
  color: #fff;
  scroll-margin-top: 16px;
  animation: arrive 0.5s ease-out both;
}
.log .reply .who {
  display: block;
  margin-bottom: 5px;
  color: #e9b765;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.log .reply .lead { font-size: 1.1875rem; font-weight: 500; line-height: 1.45; }
/* a short pipe from the main run to the reply, like the one to each question */
.log .reply::before {
  content: '';
  position: absolute;
  top: 18px;
  left: -32px;
  width: 32px;
  height: 14px;
  background: var(--pipe-h);
}
@keyframes arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .log .reply { animation: none; } }

/* An earlier reply, in the record of the exchange. */
.log .said { margin-top: 22px; border-left: 3px solid var(--board); padding-left: 12px; color: var(--ink); }
.log .said + .q { margin-top: 8px; }

.log .q.now.after-reply { margin-top: 18px; }
.log .q.now.after-reply .ask { font-size: clamp(1.3125rem, 3vw, 1.75rem); }
/* Why the question is asked: plain and quiet, straight under it. */
.log .q.now .why { margin-top: 8px; max-width: 52ch; color: var(--muted); font-size: 1rem; font-weight: 400; line-height: 1.45; }
.log .q.now .ask {
  font-weight: 900;
  font-size: clamp(1.5rem, 3.6vw, 2.125rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.wait { margin: 18px 0 0; color: var(--muted); }
.wait::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}
@media (prefers-reduced-motion: reduce) { .wait::after { content: '...'; animation: none; } }

.talk .err { margin: 18px 0 0; }

/* ---- The answer panel ---- */
.answer {
  margin-top: 20px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: #fff;
}
/* The panel's corners are rounded by rounding its first and last parts, not
   by clipping, because clipping would stop the foot staying in view. */
.how { border-radius: 16px 16px 0 0; }
.answer.busy { opacity: 0.55; }

.how { margin: 0; padding: 13px 18px 11px; color: var(--muted); font-size: 0.9375rem; }

.picks { list-style: none; margin: 0; padding: 0; }
.picks li { border-top: 1px solid #dfe2e6; }

/* A choice: a plain row with a mark at the left, round where one is wanted
   and square where several may be chosen. */
.pick {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 0;
  padding: 14px 18px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.pick::before, .own label::before {
  content: '';
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}
.multi .pick::before { border-radius: 5px; }
.pick:hover { background: #f6f1ea; }
.pick[aria-pressed="true"] { background: #f6f1ea; font-weight: 700; }
.pick[aria-pressed="true"]::before { background: var(--copper); box-shadow: inset 0 0 0 3px #fff; }
.multi .pick[aria-pressed="true"]::before {
  box-shadow: none;
  background: var(--copper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4l3 3 6.4-6.8' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* The visitor's own words: the last row of the same list, with a box that
   is plainly a box. */
.own { border-top: 1px solid #dfe2e6; padding: 14px 18px 16px; }
.own label { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.own label::before { border-style: dashed; border-color: var(--muted); }
.open .own { border-top: 0; padding-top: 2px; }
.open .own label { position: absolute; left: -9999px; }
.own textarea {
  display: block;
  width: calc(100% - 34px);
  min-height: 48px;
  margin: 10px 0 0 34px;
  border: 1.5px solid #9aa2ab;
  border-radius: 10px;
  padding: 11px 13px;
  background: #fbfbfa;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  resize: none;
}
.open .own textarea { width: 100%; min-height: 96px; margin-left: 0; }
/* A one-line answer, such as a name. */
.short .own textarea { min-height: 48px; }
.own textarea::placeholder { color: #7b848e; }
.own textarea:focus { border-color: var(--ink); background: #fff; }

/* The foot of the panel, in the green of the board on the home page. */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-radius: 0 0 15px 15px;
  background: var(--board);
  /* While the choices run off the bottom of the screen, the foot stays at
     the bottom of the screen, so Send is always in reach. */
  position: sticky;
  bottom: 0;
}
/* Send is quiet until there is something to send. */
.foot .btn { opacity: 0.5; transition: opacity 0.15s; }
.foot .btn.ready { opacity: 1; }
.foot .btn { margin-left: auto; padding: 11px 30px; font-size: 1.0625rem; }
.foot .plain { color: #cfdad6; }
.foot .plain:hover { color: #fff; }

.pick:focus-visible, .own textarea:focus-visible, .plain:focus-visible, .finished:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: -3px;
}
.foot .plain:focus-visible, .foot .btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.answer :disabled { cursor: default; }

.ways { margin: 14px 0 0; }

.plain {
  border: 0;
  padding: 4px 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.plain:hover { color: var(--ink); }

/* ---- The contact step and the last word ---- */
/* Where to reach the visitor: the same panel, with the form in place of choices. */
.answer.contact .fields { padding: 20px 18px 4px; border-radius: 16px 16px 0 0; }
/* A panel with no line of instruction: its first part takes the rounded top. */
.answer.open .own { border-radius: 16px 16px 0 0; padding-top: 16px; }
.answer.contact .field { margin-bottom: 20px; }
.answer.contact .tick { margin-bottom: 20px; }
.answer.contact .err { margin: 0 0 18px; }

.finished { margin-top: 26px; }
.finished h2 { margin: 0 0 8px; font-weight: 900; font-size: 1.75rem; }
.finished p { margin: 0 0 10px; max-width: 60ch; }
.finished ul { margin: 0; padding-left: 20px; font-weight: 700; }
.finished li { margin-bottom: 4px; }

.after a { color: inherit; }

@media (max-width: 560px) {
  .talk { padding-left: 34px; }
  .talk::before { width: 12px; }
  .log .q::before { left: -24px; width: 18px; height: 11px; }
  .log .reply::before { left: -24px; width: 24px; height: 11px; }
  .log .q.now::after { left: -15px; width: 7px; height: 15px; }
  .pick, .how, .foot { padding-left: 14px; padding-right: 14px; }
  .own { padding-left: 14px; padding-right: 14px; }
}
