/* Black page, one neutral colour, and red only for the single thing that needs
   attention right now (the closing countdown, or "missed"). No decoration, no motion
   apart from a shake on a wrong passphrase. */

:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #e8e8e8;
  --dim: #7d7d7d;
  --ghost: #5e5e5e;
  --line: #2e2e2e;
  --danger: #ff3131;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  --pad: clamp(22px, 5vw, 64px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: var(--fg); color: var(--bg); }

html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--pad);
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 var(--mono);
  -webkit-font-smoothing: antialiased;
}

.mark,
.foot { color: var(--dim); font-size: 13px; }

main { align-self: center; padding: 4vh 0 10vh; } /* a little above centre */

.digits {
  margin-left: -.05em; /* big type sits slightly right of small text; pull it back in line */
  font-size: clamp(48px, 16.5vw, 168px);
  line-height: .9;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.digits .sec { color: var(--ghost); }

.caption { margin: 22px 0 0; color: var(--dim); font-size: 13px; }

.danger,
.caption.danger { color: var(--danger); }

/* A message the escalation put on the site. */
.note {
  max-width: 560px;
  margin: 28px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--fg); }

/* ---- Forms ---------------------------------------------------------------- */
form { display: grid; gap: 14px; max-width: 380px; }

input {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: 16px/1.3 var(--mono); /* 16px keeps iPhones from zooming in */
  caret-color: var(--fg);
}
input::placeholder { color: var(--ghost); }
input:focus { outline: none; border-bottom-color: var(--fg); }

.field { display: flex; align-items: center; gap: 14px; color: var(--dim); font-size: 13px; }
.field input { width: auto; padding: 8px 0; }
input[type="time"]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }

button {
  justify-self: start;
  margin-top: 8px;
  padding: 11px 24px;
  border: 1px solid var(--fg);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: 14px/1 var(--mono);
  cursor: pointer;
}
button:hover,
button:focus-visible { background: var(--fg); color: var(--bg); outline: none; }
button:disabled { opacity: .4; cursor: progress; }

.error { min-height: 1.5em; margin: 0; color: var(--fg); font-size: 13px; }

/* Open window: one underlined line with an arrow to submit. */
#checkin-form { margin-top: 32px; }
.entry { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.entry:focus-within { border-bottom-color: var(--fg); }
.entry input { border: 0; }
.entry button { margin: 0; padding: 8px 2px 8px 16px; border: 0; color: var(--dim); font-size: 20px; }
.entry button:hover,
.entry button:focus-visible { background: transparent; color: var(--fg); }

.shake { animation: shake .3s; }
@keyframes shake {
  25%, 75% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .shake { animation: none; }
}
