/* Roundtable programme: one screen per idea, sized to the phone. Colours from the invitation. */
:root {
  --navy-top: #062951;      /* sampled from the invitation banner (top) */
  --navy: #04305d;          /* banner middle */
  --navy-bottom: #023668;   /* banner bottom */
  --gold: #ffc000;
  --ink: #002244;           /* headings and labels */
  --text: #333333;
  --label: #33506e;         /* small spaced labels */
  --info-bg: #f2f8fc;
  --line: #c9d6e3;
  --line-2: #d0dce8;
  --link: #005a9c;
  --font: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #ffffff; color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
a { color: var(--link); }
img { display: block; }

/* ---------- a screen = exactly one phone screen ---------- */
.screen {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  overflow: hidden; background: #ffffff;
}
.screen > .body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 12px;
}

/* ---------- navy banner with gold rule ---------- */
.banner {
  flex: none;
  background: linear-gradient(180deg, var(--navy-top), var(--navy) 55%, var(--navy-bottom));
  border-bottom: 4px solid var(--gold);
  color: #ffffff;
  padding: 18px 20px 16px;
  padding-top: max(18px, env(safe-area-inset-top));
}
.banner .kicker { color: var(--gold); font-size: 11px; font-weight: bold; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 6px; }
.banner h1 { font-size: 25px; line-height: 1.15; font-weight: bold; }
.banner h2 { font-size: 20px; line-height: 1.2; font-weight: bold; }
.banner .rule { display: block; width: 44px; height: 3px; background: var(--gold); margin: 12px 0 10px; }
.banner .sub { font-size: 15px; color: #e3ecf6; }
.banner.small { padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: 12px; }
.banner.cover { padding-bottom: 6px; }
.banner .art { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto 12px; }

/* ---------- shared bits ---------- */
.spaced { font-size: 11px; font-weight: bold; letter-spacing: .2em; text-transform: uppercase; color: var(--label); }
.muted { color: var(--label); font-size: 14px; }
.section-label { margin-top: 4px; }

.infobox {
  background: var(--info-bg); border-left: 7px solid var(--gold); border-radius: 0 6px 6px 0;
  padding: 12px 14px;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px;
}
.infobox dt { font-weight: bold; color: var(--ink); }
.infobox.slim { display: block; }
.infobox.slim .spaced { margin-bottom: 4px; }
.infobox.slim a { font-weight: bold; color: var(--ink); }

.btn {
  display: block; width: 100%; min-height: 48px; border: 0; border-radius: 6px;
  background: var(--navy); color: #ffffff; font: bold 17px/48px var(--font); text-align: center; text-decoration: none;
  cursor: pointer; border-bottom: 3px solid var(--gold);
}
.btn:disabled { opacity: .6; }
.link { background: none; border: 0; padding: 6px 0; color: var(--link); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; }

/* ---------- logo strip (same place on sign-in, cover and venue) ---------- */
.logos {
  flex: none; display: flex; align-items: flex-start; justify-content: center; gap: 14px;
  border-top: 1px solid var(--line); margin: 0 20px; padding: 10px 0 12px;
}
.logos-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.logos-col .spaced { font-size: 9px; letter-spacing: .24em; }
.logos-row { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.logos .vr { width: 1px; height: 34px; background: var(--line); }
.logos-divider { width: 1px; align-self: stretch; background: var(--line); }

/* ---------- pager (Previous / count / Next) ---------- */
.pager {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line-2); background: #ffffff;
  padding: 0 8px; padding-bottom: env(safe-area-inset-bottom); min-height: 52px;
}
.pager .pg { min-width: 104px; min-height: 48px; display: flex; align-items: center; padding: 0 10px; font-weight: bold; color: var(--ink); text-decoration: none; font-size: 15px; }
.pager .next { justify-content: flex-end; }
.pager .count { font-size: 13px; color: var(--label); }

/* ---------- sign-in ---------- */
.login .body { justify-content: center; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card[hidden] { display: none; }
.lead { font-size: 17px; color: var(--ink); line-height: 1.4; }
input[type=email], input[type=text] {
  width: 100%; min-height: 50px; padding: 10px 14px; font: 18px var(--font); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; background: #ffffff;
}
input:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--navy); }
.code-input { letter-spacing: .5em; text-align: center; font-size: 24px !important; font-weight: bold; }
.note { font-size: 14px; color: var(--label); text-align: center; }
.links { text-align: center; color: var(--label); }
.message { background: var(--info-bg); border-left: 7px solid var(--gold); padding: 12px 14px; font-size: 15px; color: var(--ink); border-radius: 0 6px 6px 0; }
.message.ok { border-left-color: #2e7d32; }

/* ---------- programme deck: swipe left / right between screens ---------- */
html:has(.deck), html:has(.deck) body { overflow: hidden; }
.deck {
  display: flex; width: 100%; height: 100vh; height: 100dvh;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }
.deck > .screen { flex: 0 0 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
@media (prefers-reduced-motion: reduce) { .deck { scroll-behavior: auto; } }

/* agenda */
.agenda { list-style: none; padding: 0; }
.agenda li { border-bottom: 1px dotted var(--line); }
.agenda li > a, .agenda li > div { display: flex; align-items: center; gap: 10px; padding: 7px 0; text-decoration: none; color: inherit; }
.agenda .t { flex: 0 0 66px; font-size: 12.5px; line-height: 1.2; color: var(--label); text-align: right; }
.agenda .what { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.agenda .lbl { font-size: 10px; font-weight: bold; letter-spacing: .14em; text-transform: uppercase; color: #2f8fcf; }
.agenda .ttl { font-size: 14.5px; color: var(--ink); line-height: 1.25; }
.agenda .session .ttl { font-weight: bold; }
.agenda .session .t { font-weight: bold; color: var(--ink); }
.agenda .break .ttl { font-size: 11px; font-weight: bold; letter-spacing: .1em; text-transform: uppercase; color: #9a7b00; }
/* Sessions are the only tappable rows: a light card with a gold edge and a round arrow.
   The negative margin keeps their times lined up with the plain rows. */
.agenda li.session { border-bottom: 0; margin: 3px 0; }
.agenda .session a {
  background: var(--info-bg); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
  margin-left: -9px; padding-left: 6px; padding-right: 8px;
  box-shadow: 0 1px 2px rgba(0, 34, 68, .12);
  -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.agenda .session a:active { background: #dfeaf5; }
.agenda .session .chev, .speakers .chev { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #ffffff; font-size: 17px; line-height: 22px; text-align: center; padding: 0; }
.chev { flex: none; font-size: 22px; color: var(--gold); font-weight: bold; padding-right: 4px; }
.hint { font-size: 12.5px; color: var(--label); text-align: center; }
.hint .chev-mini { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; line-height: 15px; font-weight: bold; vertical-align: -2px; }

/* session */
.session-title { font-size: 21px; line-height: 1.25; color: var(--ink); }
.desc { font-size: 16px; }
.speakers { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.speakers a { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line-2); border-radius: 8px; text-decoration: none; color: inherit; }
.speakers a > span:not(.chev):not(.av) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.av { flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; object-fit: cover; }
.av svg, .photo svg { width: 100%; height: 100%; display: block; }
.nm { font-weight: bold; color: var(--ink); }
.rl { font-size: 14px; color: var(--label); }
.back { margin-top: auto; padding-top: 4px; }
.back a { font-weight: bold; color: var(--ink); text-decoration: none; }

/* speaker */
.speaker { align-items: center; text-align: center; }
.speaker .photo { width: 132px; height: 132px; border-radius: 50%; overflow: hidden; object-fit: cover; border: 3px solid var(--gold); flex: none; }
.speaker h3 { font-size: 22px; color: var(--ink); }
.speaker .job { color: var(--label); font-size: 15px; }
.speaker .job strong { color: var(--ink); }
.speaker .bio { text-align: left; font-size: 15.5px; }
.speaker .infobox { width: 100%; text-align: left; }

/* venue */
.address { font-size: 17px; color: var(--ink); }
.contact { font-size: 16px; line-height: 1.6; }
.signout { text-align: center; margin-top: auto; }


/* ---------- session notes (kept on the phone) ---------- */
.notes-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px;
  border: 1.5px solid var(--navy); border-radius: 6px; background: #ffffff; color: var(--navy);
  font: bold 15px var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.notes-btn svg, .notes-row svg { width: 18px; height: 18px; flex: none; }
.notes-btn.has-notes { background: var(--info-bg); border-color: var(--gold); }
.notes-btn:active { background: #dfeaf5; }

.notes-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.notes-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  background: var(--info-bg); border: 0; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
  padding: 7px 10px; font: inherit; color: var(--navy); -webkit-tap-highlight-color: transparent;
}
.notes-row:active { background: #dfeaf5; }
.nr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notes-row .lbl { font-size: 10px; font-weight: bold; letter-spacing: .14em; text-transform: uppercase; color: #2f8fcf; }
.notes-row .ttl { font-size: 14px; font-weight: bold; color: var(--ink); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-preview { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-preview.empty { color: var(--label); font-style: italic; }

.notes-sheet {
  position: fixed; inset: 0; z-index: 10; background: #ffffff;
  display: flex; flex-direction: column; height: 100vh; height: 100dvh;
}
.notes-sheet[hidden] { display: none; }
.notes-head { display: flex; align-items: center; gap: 8px; padding-left: 6px; padding-right: 6px; }
.nh-mid { flex: 1; min-width: 0; text-align: center; }
.nh-mid .kicker { margin-bottom: 2px; }
.nh-mid h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nh-btn { flex: none; min-width: 64px; min-height: 44px; border: 0; background: none; color: var(--gold); font: bold 15px var(--font); cursor: pointer; }
#notes-text {
  flex: 1; min-height: 0; width: 100%; resize: none; border: 0; outline: 0;
  padding: 16px 20px; font: 17px/1.5 var(--font); color: var(--text); background: #ffffff;
}
.notes-status { flex: none; padding: 8px 20px; padding-bottom: max(8px, env(safe-area-inset-bottom)); font-size: 13px; color: var(--label); border-top: 1px solid var(--line-2); text-align: center; }

/* small phones (360 x 640 and below) */
@media (max-height: 680px) {
  .banner h1 { font-size: 22px; }
  .banner .art { max-width: 280px; margin-bottom: 6px; }
  .banner .rule { margin: 8px 0 6px; }
  .screen > .body { padding: 12px 16px; gap: 10px; }
  .infobox { font-size: 14px; padding: 10px 12px; gap: 4px 12px; }
  .agenda li > a, .agenda li > div { padding: 3px 0; gap: 8px; }
  .agenda li.session { margin: 2px 0; }
  .agenda .session a { padding-right: 6px; }
  .agenda .session .chev { width: 20px; height: 20px; font-size: 14px; line-height: 19px; }
  .agenda .ttl { font-size: 13.5px; line-height: 1.2; }
  .agenda .lbl { font-size: 9.5px; }
  .banner.small { padding-top: 10px; padding-bottom: 9px; }
  .banner.small h2 { font-size: 18px; }
  #agenda .body { gap: 6px; }
  .hint { display: none; }
  .speaker .photo { width: 104px; height: 104px; }
  .notes-row { padding: 5px 10px; }
  .notes-list { gap: 4px; }
}
@media (max-width: 360px) {
  .logos { gap: 10px; margin: 0 12px; }
}
