/* The page people check in on at a club event: /checkin, old /checkin/<id> links, and /checkin/print
   (the sign by the door) (/js/checkin-site.js).
   Made for a phone held at the door: one column, big boxes, the button in reach of a thumb. Colors
   come from the tokens in app.css, so light and dark both work. Class names start with ck-. */

/* The first heading starts where the Events page's does (18px under the site header, 12px on phones). */
.ck { max-width: 480px; margin: 18px auto 0; }
.ck-head { margin-bottom: 14px; }
.ck-head h1 { margin: 0 0 4px; }
.ck-head h1:focus, .ck-done h1:focus, .ck-stop h1:focus { outline: none; }
.ck-head .lede { margin: 0; font-size: 16px; }
.ck-note { margin: 0 0 14px; border-left-color: var(--accent); }

/* The event: what, when and where, so people know they are in the right place. */
.ck-event {
  display: grid; gap: 4px; margin: 0 0 18px; padding: 12px 14px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--accent);
}
.ck-event p { margin: 0; overflow-wrap: anywhere; }
.ck-event-kicker { font-size: 12px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.ck-event-title { font-size: 20px; font-weight: 800; line-height: 1.25; }
.ck-event-line { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 15px; }
.ck-event-line .hub-icon { flex: none; margin-top: 3px; }

.ck-form .field { margin-bottom: 16px; }
.ck-form label { margin-bottom: 6px; }
.ck-optional { font-weight: 500; color: var(--muted); }
.ck-form .hint { margin: 6px 0 0; }
.ck input[type="email"] {
  width: 100%; min-height: 48px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--field-line);
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 16px;
}
.ck input[type="text"] { min-height: 48px; }
.ck input[type="email"]:focus { border-color: var(--accent); }
.ck input[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
input[type="text"].ck-code-input {
  min-height: 58px; text-align: center; text-transform: uppercase;
  font: 800 26px/1 ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.18em;
}

.ck-remember { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 8px; font-weight: 500; cursor: pointer; }
.ck-remember input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }

/* Who sees it, said plainly. */
.ck-who {
  display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 10px 12px;
  border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 14px;
}
.ck-who strong { color: var(--text); }
.ck-who .hub-icon { flex: none; margin-top: 2px; color: var(--accent); }
.ck-form .form-error { margin: 0 0 12px; }
/* A problem with one box shows right under it. */
.ck-form .ck-field-error { margin: 6px 0 0; }

.ck-join { margin: 18px 0 0; text-align: center; font-size: 15px; }
.ck-join a { font-weight: 700; }
.ck-more { margin: 10px 0 0; text-align: center; font-size: 14px; }

/* Done: a big check, the name and the time, the event, and the way to sign up. */
.ck-done { text-align: center; margin-top: 8px; }
.ck-done-mark {
  display: inline-grid; place-items: center; width: 68px; height: 68px; margin: 4px 0 12px; border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok);
}
.ck-done h1 { font-size: clamp(26px, 7vw, 32px); margin-bottom: 6px; }
.ck-done-line { color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.ck-other { margin: 10px 0 0; font-size: 15px; }
.ck-done .ck-event, .ck-stop .ck-event { text-align: left; margin: 16px 0; }
.ck-done .ck-who { justify-content: center; text-align: left; }
.ck-done .ck-join { font-size: 16px; }
.ck-stop { margin-top: 8px; }
.ck-stop h1 { font-size: clamp(24px, 6vw, 30px); }

/* How they heard (2026-10-05): seven choices, two to a row on a phone, each a big target. */
.ck-heard { margin: 0 0 16px; }
.ck-heard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ck-heard-choice {
  display: flex; align-items: center; gap: 10px; min-height: 46px; margin: 0; padding: 8px 12px;
  border: 1px solid var(--field-line); border-radius: 10px; background: var(--bg);
  font-weight: 500; line-height: 1.25; cursor: pointer;
}
.ck-heard-choice input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--accent); }
.ck-heard-choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ck-heard-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ck-heard-clear { margin-top: 6px; }
.ck-back { margin: -8px 0 14px; }
@media (max-width: 359px) { .ck-heard-grid { grid-template-columns: minmax(0, 1fr); } }

/* Several meetings open: each is a big button with the meeting on it. */
.ck-pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ck-pick-button {
  display: grid; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer; border-radius: 12px;
}
.ck-pick-button .ck-event { margin: 0; transition: border-color 0.15s; }
.ck-pick-button:hover .ck-event { border-color: var(--accent); }
.ck-pick-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ck-nowrap { white-space: nowrap; }
.ck-pick-done { display: flex; align-items: center; gap: 6px; padding: 0 14px; color: var(--ok); font-weight: 650; font-size: 14px; }

/* Nothing open: the next meeting, and Check again. */
.ck-next { margin: 16px 0 0; font-weight: 650; }
.ck-stop .ck-next + .ck-event { margin: 8px 0; }
.ck-next-open { margin: 0; color: var(--muted); }
.ck-again { margin: 16px 0 0; }

/* /checkin/print: a sheet of paper on screen, and only the sheet on the printer. Fixed black on white in
   both themes, so what is seen is what prints, in black and white too. */
.ck-print { max-width: 8.5in; margin: 18px auto 0; }
.ck-print-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 14px; }
.ck-print-tools p { margin: 0; flex: 1 1 260px; color: var(--muted); }
.ck-sheet {
  display: grid; justify-items: center; align-content: start; text-align: center;
  aspect-ratio: 8.5 / 11; padding: 6% 8%; border-radius: 6px;
  background: #fff; color: #000; box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
.ck-sheet p, .ck-sheet h1 { margin: 0; color: #000; }
.ck-sheet-club { font-size: clamp(14px, 2.6vw, 22px); font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.ck-sheet-title { margin-top: 0.4em !important; font-size: clamp(26px, 6vw, 52px); font-weight: 850; line-height: 1.1; }
.ck-sheet-qr { width: 78%; aspect-ratio: 1; margin: 5% 0 3%; }
.ck-sheet-qr svg { display: block; width: 100%; height: 100%; }
.ck-sheet .qr-light { fill: #fff; }
.ck-sheet .qr-dark { fill: #000; }
.ck-sheet-step { font-size: clamp(14px, 2.6vw, 22px); }
.ck-sheet-url { margin-top: 0.15em !important; font-size: clamp(20px, 4.8vw, 40px); font-weight: 850; overflow-wrap: anywhere; }
.ck-sheet-foot { margin-top: auto !important; padding-top: 4%; font-size: clamp(11px, 1.9vw, 15px); text-wrap: balance; }

/* One page, with room to spare: WebKit (Safari's File, Print) prints a CSS pixel about 7% larger than
   other browsers, so a 10 inch sheet with a 6 inch code ran onto a second page with the last line
   alone on it (measured in review, 2026-10-05). The sheet is 9.2 inches, the code 5 (about 5.3 with
   its quiet zone, in WebKit), and the body's full window height (app.css) is let go, since in a tall
   window it added a blank page. body.ck-printing on .ck-print outranks the phone rule's margin below. */
@page { size: letter; margin: 0.5in; }
@media print {
  body.ck-printing { background: #fff !important; min-height: 0 !important; }
  body.ck-printing .skip, body.ck-printing .site-header, body.ck-printing .site-footer, body.ck-printing .ck-print-tools { display: none !important; }
  body.ck-printing main, body.ck-printing #view { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  body.ck-printing .ck-print { max-width: none; margin: 0; }
  .ck-sheet {
    aspect-ratio: auto; height: 9.2in; padding: 0.3in 0.4in; border-radius: 0; box-shadow: none; break-inside: avoid;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .ck-sheet-club { font-size: 20pt; }
  .ck-sheet-title { font-size: 34pt; }
  .ck-sheet-qr { width: 5in; margin: 0.3in 0 0.2in; }
  .ck-sheet-step { font-size: 18pt; }
  .ck-sheet-url { font-size: 30pt; }
  .ck-sheet-foot { font-size: 12pt; }
}

@media (max-width: 759px) {
  .ck { margin-top: 12px; }
  .ck-form, .ck-done, .ck-stop { padding: 16px; }
  .ck-print { margin-top: 12px; }
  /* Every button a thumb can hit, at least 44px tall, as hub-checkin.css does for the screen's small
     ones; the form's two small link buttons were 34px (review, 2026-10-05). */
  .ck-form .btn.ck-heard-clear, .ck-form .btn.ck-back, .ck-again .btn, .ck-print-tools .btn { min-height: 44px; }
}
