/* After the SP-238 demo mock (demo_experience.html): TBTL ink and paper, FortID blues,
   Inter for text and Newsreader for headings. Phone pages first; .kiosk is the tablet. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/Inter.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/static/fonts/Newsreader.woff2") format("woff2"); }

:root {
  --ink: #21243d;
  --muted: #5c6070;
  --accent: #1475b3;
  --accent-dark: #0f5780;
  --accent-soft: #e8f4fb;
  --action: oklch(48.8% .243 264.376);
  --action-hover: oklch(42.4% .199 265.638);
  --paper: #f6f7f9;
  --line: #e4e6ec;
  --green: #176644;
  --green-bg: #e6f4eb;
  --amber: #6c4912;
  --amber-bg: #fff5df;
  --error: #a3251c;
  --serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 "Inter", Helvetica, Arial, sans-serif;
}
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:is(button, a, input, select, textarea):focus-visible { outline: 3px solid #4fa8e0; outline-offset: 3px; }

/* Site header and footer. */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .9rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line);
}
.site-head.dark { background: var(--ink); color: #fff; border-bottom: 0; }
.site-head > span { font-size: .75rem; color: var(--muted); }
.site-head.dark > span { color: #c7c9d6; letter-spacing: .1em; font-size: .7rem; }
.brand { display: flex; align-items: center; gap: .45rem; font-size: 1.35rem; font-weight: 500; letter-spacing: -.03em; color: inherit; text-decoration: none; }
.brand img { width: 1.6rem; height: 1.6rem; display: block; }
.tbtl-mark { display: block; width: 9rem; height: auto; }
.site-foot {
  max-width: 30rem; margin: 0 auto; padding: 1.25rem; text-align: center;
  color: var(--muted); font-size: .75rem;
}

/* Page body. */
.page { flex: 1; width: 100%; max-width: 30rem; margin: 0 auto; padding: 1.75rem 1.25rem 1rem; display: flex; flex-direction: column; }
.page.wide { max-width: 72rem; }
.screen { flex: 1; display: flex; flex-direction: column; }
.step-label { margin: 0 0 1rem; color: #6b7280; font-size: .8rem; letter-spacing: .04em; }
h1 { font: 400 2.4rem/1.08 var(--serif); letter-spacing: -.02em; margin: .25rem 0 1rem; }
h2 { font: 400 1.75rem/1.2 var(--serif); letter-spacing: -.01em; margin: 2rem 0 .75rem; }
p { margin: 0 0 1rem; }
.muted, :where(.screen) > p { color: var(--muted); }
.quiet { color: var(--muted); font-size: .8rem; text-align: center; margin: .6rem 0 0; }
.tag { display: inline-block; color: var(--accent); background: var(--accent-soft); font-size: .7rem; letter-spacing: .05em; font-weight: 700; padding: .3rem .6rem; border-radius: 4px; text-transform: uppercase; }
.tag.optional { background: #fff3d7; color: #725314; }

.book-cover { display: block; width: 8rem; height: auto; border-radius: 3px; box-shadow: 7px 8px 0 #0002; margin: 0 0 1.5rem; }

/* Buttons. */
.primary, .secondary {
  display: inline-flex; justify-content: center; align-items: center; gap: .5rem;
  min-height: 3.25rem; padding: .75rem 1.25rem; border: 0; border-radius: 9px;
  font-size: 1rem; font-weight: 650; text-decoration: none; text-align: center;
}
.primary { color: #fff; background: #2340aa; }
.primary:hover { background: #1b328b; }
.kiosk .primary { background: var(--action); }
.kiosk .primary:hover { background: var(--action-hover); }
.secondary { background: #fff; color: var(--accent); border: 1px solid #bdd8e9; }
.secondary:hover { background: #edf6fc; }
.full { width: 100%; }
.text-button {
  border: 0; padding: .6rem 0; background: transparent; color: var(--accent);
  font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; text-align: center;
}
.spacer { flex: 1; min-height: 1.25rem; }
/* On a computer the QR code follows the text; only the phone button sits at the bottom. */
.screen:has(> #phone-start[hidden]) > .spacer { display: none; }

/* Cards and notes. */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin: 0 0 1rem; box-shadow: 0 3px 8px #1118270d; }
.card h3 { font-size: 1rem; line-height: 1.35; margin: 0; }
.card p { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.help-note { background: #edf6fc; padding: .8rem 1rem; border-radius: 8px; color: #315e77; font-size: .875rem; }
.session-ok { color: #00856b; background: #effcf5; border: 1px solid #bee3d5; border-radius: 8px; padding: .65rem .9rem; font-size: .875rem; font-weight: 600; margin: 0 0 1rem; }
.note { background: var(--amber-bg); color: var(--amber); border-radius: 8px; padding: .75rem 1rem; font-size: .9rem; }
.service { border: 1px solid #d5e2ec; background: #f8fafc; border-radius: 9px; padding: .9rem 1rem; margin: .5rem 0 1rem; font-size: .9rem; }
.service p { margin: .4rem 0 0; color: var(--muted); }
.selection { border-left: 3px solid #c1a465; padding: .4rem 0 .4rem .8rem; font-size: .875rem; color: var(--muted); }
.hint { font-size: .8rem; color: var(--muted); line-height: 1.6; }
.steps { margin: .5rem 0 1.25rem; padding-left: 1.25rem; color: var(--muted); }
.steps li { margin: .5rem 0; }
.store-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.store-links a { border: 1px solid var(--line); border-radius: 6px; padding: .45rem .8rem; font-size: .875rem; text-decoration: none; color: var(--ink); background: #fff; }
.success-icon {
  width: 4.5rem; height: 4.5rem; display: grid; place-items: center; align-self: center;
  border-radius: 50%; color: var(--green); background: var(--green-bg); font-size: 2rem; margin: .5rem auto 1rem;
}
.screen.center { text-align: center; }
.screen.center h1 { margin-top: 0; }
.qr-start { text-align: center; }

/* Forms. */
form label { display: block; font-size: .875rem; font-weight: 600; margin: 0 0 1rem; }
form label span { font-weight: 400; color: var(--muted); }
form input, form select, form textarea {
  display: block; width: 100%; margin-top: .4rem; padding: .7rem .8rem;
  font: 400 1rem/1.5 "Inter", sans-serif; color: var(--ink);
  border: 1px solid #ced5df; border-radius: 7px; background: #fff;
}
form textarea { resize: vertical; min-height: 8rem; }
.error { color: var(--error); }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1.25rem 0 .5rem; }

/* Ticket page QR (desktop) and the link QR page. */
.qr { display: inline-block; padding: 1rem; margin: .5rem auto 1rem; background: #fff; border: 1px solid #bdd8e9; border-radius: 13px; }
.qr img, .qr canvas { display: block; }

/* Venue banner (home page). */
.banner { background: var(--ink); color: #fff; border-radius: 13px; padding: 1.75rem 1.5rem; display: flex; gap: 1.5rem; align-items: center; }
.banner h1 { font-size: 2.6rem; margin: 1rem 0; }
.banner p { color: #c7c9d6; font-size: .95rem; }
.banner strong { color: #fff; }
.banner .book-cover { width: 9rem; margin: 0; flex: none; }
.callout { border-left: 3px solid #4fa8e0; padding: .6rem 0 .6rem 1rem; margin-top: 1.5rem; }
.callout strong { display: block; font-size: 1.15rem; }
.callout span { display: block; color: #c7c9d6; font-size: .9rem; margin-top: .4rem; }
@media (max-width: 40rem) { .banner { flex-direction: column-reverse; align-items: flex-start; } }

/* Entrance tablet. */
.kiosk { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.kiosk .site-head { padding: 1.1rem 1.75rem; }
.kiosk-body { flex: 1; padding: 2rem 1.75rem; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.kiosk-body h1 { font-size: 3rem; margin: .5rem 0 .75rem; }
.kiosk-body p { color: var(--muted); font-size: 1.15rem; max-width: 40rem; }
.kiosk-body .attendee { font: 400 3.25rem/1.2 var(--serif); margin: .5rem 0 .75rem; }
.kiosk-body .secondary, .kiosk-body .primary { font-size: 1.1rem; padding: .9rem 2rem; }
.kiosk-body .success-icon { width: 6rem; height: 6rem; font-size: 3rem; }
.kiosk-body .qr { padding: 1.25rem; }
.kiosk-body.entry-success { background: var(--green-bg); }
.kiosk-body.entry-success .success-icon { background: var(--green); color: #fff; }
.kiosk-body.entry-success :is(h1, .attendee) { color: #174e35; }
.kiosk-body.entry-success h1 { font: 600 2.1rem/1.2 "Inter", sans-serif; letter-spacing: -.01em; }
.kiosk-body.entry-success p { color: #44735b; }
.kiosk-body.entry-success .secondary { color: var(--green); border-color: #b5d5bf; }
.kiosk-body.entry-denied { background: var(--amber-bg); }
.kiosk-body.entry-denied :is(h1, .attendee) { color: var(--amber); }
.kiosk-body.entry-denied p { color: #795e30; }
.denied-icon { width: 5rem; height: 5rem; display: grid; place-items: center; border: 2px solid #ae7920; border-radius: 50%; color: var(--amber); font-size: 2.5rem; margin: 0 auto 1rem; }
.kiosk-body input[type=search] { width: min(40rem, 100%); padding: .9rem 1rem; font: inherit; font-size: 1.15rem; border: 1px solid #ced5df; border-radius: 8px; }
.guest-list { list-style: none; padding: 0; margin: 1.5rem 0; width: min(40rem, 100%); }
.guest-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #edf6fc; border: 1px solid var(--line); padding: 1rem 1.25rem; border-radius: 10px; margin: 0 0 .75rem; text-align: left; }
.guest-row strong { display: block; font-size: 1.1rem; }
.guest-row small { color: var(--muted); font-size: .875rem; }
.guest-row .primary { font-size: .95rem; padding: .6rem 1rem; min-height: 0; flex: none; }
.kiosk-foot { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 1.75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.dot { display: inline-block; width: .45rem; height: .45rem; background: #438f66; border-radius: 50%; margin-right: .4rem; vertical-align: middle; }

/* Admin page: desktop. */
.admin h2 { font-size: 1.5rem; }
.admin .primary.small, .admin .secondary.small { min-height: 0; padding: .5rem 1rem; font-size: .9rem; }
.admin .exports { display: flex; flex-wrap: wrap; gap: .5rem; }
.admin .attendees-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 2rem 0 .75rem; }
.admin .attendees-heading h2 { margin: 0; }
.admin .delete-all { color: var(--error); border-color: currentColor; }
.admin .delete-all:hover:not(:disabled) { background: #fff3f2; }
.admin .delete-all:disabled { background: #fff; opacity: .55; cursor: not-allowed; }
.admin form.inline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.admin form.inline input { width: auto; flex: 1 1 12rem; margin: 0; }
.admin input[type=search] { width: 100%; padding: .6rem .8rem; font: inherit; border: 1px solid #ced5df; border-radius: 7px; }
.admin pre { background: var(--paper); padding: .75rem 1rem; border-radius: 8px; white-space: pre-wrap; }
.admin table { width: 100%; border-collapse: collapse; margin-top: .75rem; font-size: .875rem; background: #fff; }
.admin th, .admin td { padding: .4rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin th { color: var(--muted); font-weight: 600; }
.counters { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.counters li { flex: 1 1 9rem; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.counters strong { display: block; font: 400 2rem/1.2 var(--serif); color: var(--ink); }
