/* ============================================================
   Canada Investment Summit 2026 — private livestream
   Palette and type from Canada_Investment_Summit_ColorsTypo.pdf
   Committed single-theme (dark). No external requests: fonts are
   self-hosted so the page loads with only same-origin assets.
   ============================================================ */

@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/literata-400.woff2") format("woff2");
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/literata-500.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --ink:       #1d090b;  /* PMS 5045 — page ground   */
  --ink-2:     #2a0d10;  /* mid ground               */
  --ink-3:     #3a0f13;  /* PMS 490 — panels         */
  --bone:      #e5e2d1;  /* PMS 7534 — primary type  */
  --bone-dim:  #a9a495;
  --bone-faint:#948f7e;
  --red:       #e6312f;  /* PMS 1795                 */
  --red-lt:    #f2726c;
  --gold:      #9b7b51;  /* PMS 871                  */
  --gold-lt:   #ab8a5e;
  --green-lt:  #6bb392;
  --rule:      rgba(229,226,209,.16);
  --rule-soft: rgba(229,226,209,.09);

  /* Neue Haas Grotesk is the brand's secondary face. Helvetica Neue is
     its direct descendant and ships on macOS/iOS, so this resolves with
     zero network requests — the point on a locked-down network. */
  --sans: "Neue Haas Grotesk Display Pro", "Neue Haas Grotesk Text Pro",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Literata", ui-serif, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(1.1rem, 3.5vw, 2.5rem);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--bone); text-decoration-color: rgba(229,226,209,.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-lt); margin: 0; font-weight: 500;
}

.logo { display: block; height: auto; }
.logo--lg { width: min(310px, 74vw); }
.logo--sm { width: 178px; }
@media (max-width: 520px) { .logo--sm { width: 140px; } }

/* ---------- language toggle ---------- */
.langtog {
  display: inline-flex; border: 1px solid var(--rule); border-radius: 2px;
  overflow: hidden; font-size: .72rem; letter-spacing: .1em; font-weight: 500;
}
.langtog a, .langtog button {
  appearance: none; background: transparent; border: 0; color: var(--bone-dim);
  font: inherit; letter-spacing: inherit; padding: .38rem .6rem; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.langtog a + a, .langtog button + button { border-left: 1px solid var(--rule); }
.langtog [aria-current="true"], .langtog [aria-pressed="true"] { background: var(--bone); color: var(--ink); }

/* ============================================================
   GATE
   ============================================================ */
.gate {
  min-height: 100svh; display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr); background: var(--ink);
}
.gate__panel {
  padding: var(--pad); display: flex; flex-direction: column;
  justify-content: center; gap: 1.6rem; max-width: 620px;
  justify-self: end; width: 100%;
}
.gate__media {
  background-image:
    linear-gradient(90deg, var(--ink) 0%, rgba(29,9,11,.72) 20%, rgba(29,9,11,.12) 58%, rgba(29,9,11,.34) 100%),
    url("/assets/bg-leaf.jpg");
  background-size: cover, cover; background-position: center, 46% center;
}
@media (max-width: 900px) {
  .gate { grid-template-columns: 1fr; }
  .gate__media { display: none; }
  .gate__panel { justify-self: stretch; max-width: none; min-height: 100svh; }
}
.gate__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.gate h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 5.4vw, 3.3rem); line-height: 1.03;
  letter-spacing: -.015em; margin: .55rem 0 0; text-wrap: balance;
}
.gate .lede { color: var(--bone-dim); margin: 0; max-width: 42ch; }

.field { display: flex; gap: .5rem; flex-wrap: wrap; }
.field label {
  display: block; width: 100%; font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-lt); margin-bottom: .5rem; font-weight: 500;
}
input[type="password"] {
  flex: 1 1 12rem; min-width: 0;
  background: rgba(229,226,209,.05); border: 1px solid var(--rule);
  border-radius: 2px; color: var(--bone); font: inherit;
  padding: .78rem .9rem; letter-spacing: .06em;
}
input::placeholder { color: var(--bone-faint); letter-spacing: normal; }
input:focus { border-color: var(--bone-dim); background: rgba(229,226,209,.08); }

.btn {
  appearance: none; border: 0; border-radius: 2px; cursor: pointer;
  font: inherit; font-weight: 500; letter-spacing: .03em;
  padding: .78rem 1.5rem; background: var(--bone); color: var(--ink);
  transition: background .15s ease; text-decoration: none; display: inline-block;
}
.btn:hover { background: #fff; }
.btn--ghost {
  background: transparent; color: var(--bone); border: 1px solid var(--rule);
  padding: .5rem 1rem; font-size: .82rem;
}
.btn--ghost:hover { background: rgba(229,226,209,.08); }

.error { margin: .85rem 0 0; font-size: .88rem; color: var(--red-lt); display: flex; gap: .5rem; align-items: baseline; }
.fineprint { font-size: .82rem; color: var(--bone-faint); margin: 0; max-width: 46ch; }

/* ============================================================
   STAGE
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .7rem var(--pad);
  background: rgba(29,9,11,.94); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.topbar__spacer { flex: 1 1 auto; }
.topbar__tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  padding: .3rem .6rem; border-radius: 2px; border: 1px solid var(--rule); color: var(--bone-dim);
}
.pill--live { color: var(--bone); border-color: rgba(230,49,47,.55); background: rgba(230,49,47,.12); }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--bone-faint); flex: none; }
.pill--live .dot { background: var(--red); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .pill--live .dot { animation: none; } }

main { max-width: var(--maxw); margin: 0 auto; padding: clamp(1rem,3vw,2rem) var(--pad) 3rem; }

.now { margin-bottom: .9rem; }
.now h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.45rem, 3.2vw, 2rem);
  line-height: 1.16; letter-spacing: -.01em; margin: .3rem 0 0; text-wrap: balance;
}
.now .who { color: var(--bone-dim); font-size: .9rem; margin: .35rem 0 0; }

.video {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background: #000; border: 1px solid var(--rule-soft); border-radius: 3px; overflow: hidden;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

.standby {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2rem;
  background-image: linear-gradient(rgba(29,9,11,.82), rgba(29,9,11,.92)), url("/assets/bg-leaf.jpg");
  background-size: cover; background-position: center;
}
.standby .eyebrow { margin-bottom: .8rem; }
.clock {
  font-family: var(--serif); font-size: clamp(1.9rem, 6.4vw, 3.2rem); line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 0;
}
.clock__units { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-lt); margin-top: .8rem; }
.standby__when { font-size: .85rem; color: var(--bone-dim); margin: 1.1rem 0 0; }

.panel { background: var(--ink-2); border: 1px solid var(--rule-soft); border-radius: 3px; margin-top: 1.1rem; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap; padding: .7rem .95rem; border-bottom: 1px solid var(--rule-soft);
}
.panel__title {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-lt); font-weight: 500; margin: 0;
}
.panel__note { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-faint); }
.panel__body { padding: .95rem; }

.capwrap { resize: vertical; overflow: auto; min-height: 140px; height: 226px; background: var(--ink-3); }
.capwrap iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--ink-3); }
.dubframe { width: 100%; height: 62px; border: 0; border-radius: 2px; display: block; background: var(--ink); }

.cols { display: grid; gap: 1.1rem; margin-top: 1.1rem; grid-template-columns: 1.15fr 1fr; align-items: start; }
@media (max-width: 880px) { .cols { grid-template-columns: 1fr; } }
.cols .panel { margin-top: 0; }
.cols .panel + .panel { margin-top: 1.1rem; }

.linklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .9rem; }
.linklist a { display: inline-flex; gap: .5rem; align-items: baseline; }
.linklist .arrow { color: var(--red-lt); }
.helptext { font-size: .84rem; color: var(--bone-faint); margin: .8rem 0 0; }
.contact { font-size: .88rem; margin: .9rem 0 0; padding-top: .8rem; border-top: 1px solid var(--rule-soft); }
.contact strong { display: block; font-weight: 500; color: var(--bone); }
.contact span { color: var(--bone-faint); font-size: .82rem; }

.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: .05rem; }
.agenda li {
  display: grid; grid-template-columns: 4.6rem 1fr; gap: .8rem;
  padding: .55rem 0; border-top: 1px solid var(--rule-soft); align-items: baseline;
}
.agenda li:first-child { border-top: 0; }
.agenda time { color: var(--gold-lt); font-variant-numeric: tabular-nums; font-size: .8rem; letter-spacing: .04em; }
.agenda .t { font-size: .92rem; color: var(--bone-dim); }
.agenda .w { font-size: .8rem; color: var(--bone-faint); display: block; margin-top: .15rem; }
.agenda li.is-now { background: rgba(230,49,47,.08); margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; }
.agenda li.is-now .t { color: var(--bone); }
.agenda li.is-now time { color: var(--red-lt); }
.agenda li.is-past .t, .agenda li.is-past time { opacity: .5; }

.sitefoot {
  border-top: 1px solid var(--rule-soft); padding: 1.5rem var(--pad) 3rem;
  max-width: var(--maxw); margin: 0 auto; font-size: .8rem; color: var(--bone-faint);
}
.sitefoot p { margin: 0; max-width: 62ch; }

/* ============================================================
   NETWORK CHECK
   ============================================================ */
.doc { max-width: 900px; margin: 0 auto; padding: clamp(2rem,5vw,3.5rem) var(--pad) 5rem; }
.doc h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem,4.6vw,2.7rem);
  line-height: 1.08; letter-spacing: -.015em; margin: .7rem 0 .6rem; text-wrap: balance;
}
.doc h2 {
  font-family: var(--serif); font-weight: 400; font-size: 1.3rem;
  margin: 2.6rem 0 .5rem; letter-spacing: -.01em;
}
.doc p { max-width: 68ch; color: var(--bone-dim); }
.doc p.tight { margin-top: .4rem; }
.doc header { border-bottom: 1px solid var(--rule); padding-bottom: 1.4rem; margin-bottom: 2rem; }
.doc header .logo { margin-bottom: 1.4rem; }

.summary {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--ink-2); border: 1px solid var(--rule-soft); border-left: 3px solid var(--gold);
  border-radius: 3px; padding: 1rem 1.15rem; margin: 1.4rem 0;
}
.summary.is-pass { border-left-color: var(--green-lt); }
.summary.is-fail { border-left-color: var(--red); }
.summary__text { flex: 1 1 16rem; margin: 0; color: var(--bone); font-size: .95rem; }
.summary__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.checks { list-style: none; margin: 1.2rem 0 0; padding: 0; border: 1px solid var(--rule-soft); border-radius: 3px; overflow: hidden; }
.checks li {
  display: grid; grid-template-columns: 6.4rem 1fr; gap: 1rem;
  padding: .75rem .95rem; border-top: 1px solid var(--rule-soft); align-items: start;
  background: var(--ink-2);
}
.checks li:first-child { border-top: 0; }
.checks .host { font-family: var(--mono); font-size: .82rem; color: var(--bone); overflow-wrap: anywhere; }
.checks .what { font-size: .82rem; color: var(--bone-faint); display: block; margin-top: .2rem; }

.status {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .18rem .45rem; border-radius: 2px; white-space: nowrap; text-align: center;
  border: 1px solid var(--rule); color: var(--bone-faint);
}
.status.is-pass { color: var(--green-lt); border-color: rgba(107,179,146,.5); background: rgba(107,179,146,.1); }
.status.is-fail { color: var(--red-lt); border-color: rgba(230,49,47,.5); background: rgba(230,49,47,.12); }
.status.is-warn { color: var(--gold-lt); border-color: rgba(155,123,81,.5); background: rgba(155,123,81,.12); }

.probe { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; }

.playtest { margin: 1.2rem 0 0; max-width: 520px; }
.playtest .video { aspect-ratio: 16/9; }

table.hosts { border-collapse: collapse; width: 100%; font-size: .86rem; min-width: 560px; }
.scroller { overflow-x: auto; border: 1px solid var(--rule-soft); border-radius: 3px; margin: 1.1rem 0; }
table.hosts th, table.hosts td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
table.hosts thead th {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bone-faint); font-weight: 400; background: var(--ink-3); white-space: nowrap;
}
table.hosts tbody tr:last-child td { border-bottom: 0; }
table.hosts td.h { font-family: var(--mono); font-size: .8rem; white-space: nowrap; }

/* ============================================================
   CREW CONSOLE — rendered only when ?crew=1 is on the URL.
   Attendees never see this.
   ============================================================ */
.crewbar {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  background: var(--ink-3); border: 1px solid var(--gold); border-radius: 3px;
  max-width: min(22rem, calc(100vw - 2rem)); box-shadow: 0 12px 40px -12px #000;
}
.crewbar summary {
  cursor: pointer; padding: .5rem .75rem; list-style: none;
  letter-spacing: .14em; text-transform: uppercase; font-size: .68rem;
  color: var(--gold-lt); font-weight: 500;
}
.crewbar summary::-webkit-details-marker { display: none; }
.crewbar[open] summary { border-bottom: 1px solid var(--rule-soft); }
.crewbar__body { padding: .75rem; display: grid; gap: .55rem; }
.crewbar__clock, .crewbar__state {
  margin: 0; font-family: var(--mono); font-size: .74rem; color: var(--bone);
  font-variant-numeric: tabular-nums;
}
.crewbar__state { color: var(--gold-lt); }
.crewbar__label {
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bone-faint); margin-top: .3rem;
}
.crewbar__row { display: flex; gap: .4rem; flex-wrap: wrap; }
.crewbar__row .btn--ghost { font-size: .74rem; padding: .34rem .6rem; }
.crewbar__note { margin: .3rem 0 0; font-size: .7rem; color: var(--bone-faint); line-height: 1.45; }
.crewbar select {
  appearance: none; width: 100%; font: inherit; font-size: .76rem; color: var(--bone);
  background: rgba(229,226,209,.05); border: 1px solid var(--rule); border-radius: 2px;
  padding: .42rem 1.9rem .42rem .6rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--bone-dim) 50%),
                    linear-gradient(135deg, var(--bone-dim) 50%, transparent 50%);
  background-position: calc(100% - 1.05rem) .92rem, calc(100% - .72rem) .92rem;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.crewbar select option { background: var(--ink-3); color: var(--bone); }
