/* Summit Live in Destination Cape Breton colours: Cape Breton Island navy and blue,
   slate text, the logo's green for highlights. Cabin for headings, Lato for reading.
   Layout: a single phone-first column, max 680px, sticky header with tabs. */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #edf0f2;
  --ink: #303e48;
  --ink-soft: #5c6b75;
  --line: #d9dfe3;
  --navy: #002347;
  --navy-ink: #ffffff;
  --accent: #004a98;
  --accent-ink: #ffffff;
  --accent-soft: #e2edf8;
  --hl: #00866c;
  --hl-soft: #e0f4ef;
  --sky: #54c8e8;
  --good: #00866c;
  --bad: #b03a2e;
  --display: "Cabin", "Segoe UI", system-ui, sans-serif;
  --body: "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #001426;
    --surface: #0a2440;
    --surface-2: #10304f;
    --ink: #eaf0f5;
    --ink-soft: #a3b4c2;
    --line: #1c3d5e;
    --navy: #0a2c52;
    --navy-ink: #ffffff;
    --accent: #54c8e8;
    --accent-ink: #001a33;
    --accent-soft: #0f3554;
    --hl: #2fd1ad;
    --hl-soft: #0b3a35;
    --sky: #54c8e8;
    --good: #2fd1ad;
    --bad: #ef7d70;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.brand { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block: 14px 8px; }
.logo { height: 30px; width: auto; display: block; }
.brand .lockup { display: grid; gap: 4px; min-width: 0; }
.brand h1 { font-family: var(--display); font-size: 1.15rem; line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.brand .where { font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto;
  border: 0;
  background: transparent;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.tab[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

main.wrap { padding-block: 18px 64px; display: grid; gap: 18px; }

/* Now card */
.now {
  background: var(--navy);
  color: var(--navy-ink);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  gap: 4px;
}
.eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; opacity: 0.75; }
.now h2 { font-family: var(--display); font-size: 1.35rem; line-height: 1.2; margin: 0; text-wrap: balance; }
.now .who { font-size: 0.92rem; opacity: 0.85; }
.now .next { font-size: 0.85rem; opacity: 0.7; margin-top: 6px; }

h2.section { font-family: var(--display); font-size: 1.5rem; line-height: 1.15; margin: 0; text-wrap: balance; }
.lede { color: var(--ink-soft); margin: 4px 0 0; }

/* Forms */
.compose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
label.small { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }
textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 1rem;
}
textarea { min-height: 88px; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 160px; min-width: 0; }
.btn {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn.small { padding: 6px 11px; font-size: 0.85rem; border-radius: 8px; }
.count { font-size: 0.8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.msg { font-size: 0.92rem; padding: 10px 12px; border-radius: 10px; }
.msg.ok { background: var(--accent-soft); }
.msg.err { background: var(--hl-soft); color: var(--ink); }

/* Segmented picker */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Lists of posts */
.posts { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.post {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px 12px 14px;
}
.post .text { min-width: 0; overflow-wrap: anywhere; }
.post .meta { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }
.post.starred { border-color: var(--hl); box-shadow: inset 4px 0 0 var(--hl); }
.post.answered .text { color: var(--ink-soft); }
.tag { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); margin-right: 6px; }
.tag.star { background: var(--hl-soft); color: var(--hl); }
.vote {
  display: grid;
  justify-items: center;
  gap: 0;
  min-width: 52px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vote svg { width: 16px; height: 16px; }
.vote[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.empty { color: var(--ink-soft); text-align: center; padding: 22px 12px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Agenda */
.agenda { list-style: none; margin: 0; padding: 0; display: grid; }
.agenda li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.agenda .t { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); padding-top: 2px; }
.agenda .what { min-width: 0; }
.agenda .title { font-weight: 700; }
.agenda .who { font-size: 0.9rem; color: var(--ink-soft); }
.agenda li.break .title { font-weight: 400; color: var(--ink-soft); }
.agenda li.current { background: var(--accent-soft); border-radius: 10px; border-bottom-color: transparent; padding-inline: 10px; margin-inline: -10px; }
.agenda li.current .t { color: var(--accent); }
.agenda li.past { opacity: 0.55; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); margin-right: 6px; vertical-align: 1px; }

/* Trail */
.progress { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.progress .big { font-family: var(--display); font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s; }
.stops { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.stops li { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; font-size: 0.95rem; }
.stops li span { min-width: 0; overflow-wrap: anywhere; }
.stops .tick { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.stops li.done { border-color: var(--accent); }
.stops li.done .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stops .tick svg { width: 13px; height: 13px; }

.note { font-size: 0.85rem; color: var(--ink-soft); }
.foot { font-size: 0.8rem; color: var(--ink-soft); text-align: center; padding-bottom: 24px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
