/* ==========================================================================
   Legatum Events Platform v2
   Shared stylesheet for all four stages plus the organiser editor.
   Mobile first. Breakpoints at 600 / 900 / 1200px.
   ========================================================================== */

:root {
  --ink: #10131a;
  --paper: #ffffff;
  --accent: #b8912f;
  --accent-dark: #8f6f22;
  --muted: #5c6472;
  --line: rgba(16, 19, 26, .12);
  --ok: #1f7a4d;
  --bad: #b3261e;
  --radius: 14px;
  --shadow: 0 18px 44px rgba(0, 0, 0, .30);

  --gutter: clamp(1rem, 5vw, 3.5rem);
  --card-pad: clamp(1.1rem, 4vw, 1.9rem);
  --stack: clamp(.9rem, 3vw, 1.3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  overflow-x: hidden;
}

/* The page colour lives on <html> ONLY.
   .bg-media sits at z-index:-1, and a negative-z-index layer is painted BEFORE
   the backgrounds of block-level descendants. So if <body> also had a colour it
   would paint straight over the video and the gradient, hiding them completely
   while still looking like a normal dark page. Leave body transparent. */
html { background: #0d1017; }
body { background: transparent; }

img, video, iframe { max-width: 100%; }
a { color: var(--accent-dark); }

/* --------------------------------------------------------------------------
   Background: gradient base, optional image, optional video on top
   -------------------------------------------------------------------------- */
.bg-media {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background-color: #0d1017;
  background-size: cover;
  background-position: center;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 15%, rgba(58, 47, 26, .55), transparent 60%),
    radial-gradient(ellipse 70% 55% at 85% 30%, rgba(27, 39, 64, .60), transparent 62%),
    radial-gradient(ellipse 90% 70% at 50% 95%, rgba(184, 145, 47, .18), transparent 65%),
    linear-gradient(160deg, #0b0e14 0%, #131a28 45%, #0b0e14 100%);
}
.bg-media::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 30% 40%, rgba(184, 145, 47, .10), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(60, 90, 150, .12), transparent 45%);
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.12); }
}
.bg-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.bg-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,10,16,.42), rgba(8,10,16,.62)); }
.bg-overlay.strong { background: linear-gradient(180deg, rgba(8,10,16,.58), rgba(8,10,16,.78)); }

@media (max-width: 599px) {
  .bg-overlay { background: linear-gradient(180deg, rgba(8,10,16,.52), rgba(8,10,16,.74)); }
  .bg-overlay.strong { background: linear-gradient(180deg, rgba(8,10,16,.66), rgba(8,10,16,.86)); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-media::before { animation: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Cover layout (invitation, declined, not-eligible, not-found)
   -------------------------------------------------------------------------- */
.cover-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.cover {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(2rem, 8vh, 6rem) var(--gutter);
  color: #fff;
}
.cover h1 {
  font-size: clamp(1.9rem, 8vw, 4.4rem);
  margin: .2em 0;
  font-weight: 300;
  letter-spacing: .02em;
  line-height: 1.1;
  text-wrap: balance;
}
.cover .lede { font-size: clamp(1rem, 3.6vw, 1.15rem); opacity: .92; max-width: 48ch; }
.cover .meta {
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: clamp(.7rem, 2.6vw, .78rem);
  opacity: .85;
  margin-bottom: 2rem;
  max-width: 40ch;
}
.cover-footer { text-align: center; padding: 1.2rem; }
.fineprint { color: rgba(255,255,255,.72); font-size: .82rem; max-width: 42ch; margin-top: 1.4rem; }

.eyebrow {
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: clamp(.62rem, 2.4vw, .72rem);
  color: var(--accent);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .75rem 1.4rem;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.08);
  text-decoration: none;
  font-size: .95rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  backdrop-filter: blur(4px);
}
.btn:hover { background: rgba(255,255,255,.18); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #12141a; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btnrow { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }

.card .btn, .sheet .card .btn { color: var(--ink); border-color: var(--line); background: rgba(0,0,0,.04); backdrop-filter: none; }
.card .btn:hover { background: rgba(0,0,0,.09); }
.card .btn-primary { color: #12141a; background: var(--accent); border-color: var(--accent); }
.btn-quiet { background: none; border-color: var(--line); }
.btn-danger { color: var(--bad); border-color: rgba(179,38,30,.4); }

.link {
  color: #fff;
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
  font-size: .85rem;
  font-family: inherit;
  padding: .5rem;
}

@media (max-width: 599px) {
  .cover .btn-primary { width: 100%; max-width: 22rem; }
}

/* --------------------------------------------------------------------------
   Signed-in shell
   -------------------------------------------------------------------------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .9rem var(--gutter);
  color: #fff;
}
.topbar .brand {
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: clamp(.7rem, 2.8vw, .8rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55vw;
}
.topbar nav { display: flex; align-items: center; gap: .5rem; }
.who { font-size: .85rem; opacity: .85; }
@media (max-width: 560px) { .who { display: none; } }

.sheet {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto clamp(2rem, 8vh, 5rem);
  padding: 0 var(--gutter);
}

.hero { color: #fff; text-align: center; padding: clamp(1.5rem, 5vh, 3.5rem) 0 clamp(1rem, 3vh, 2rem); }
.hero h1 {
  font-size: clamp(1.7rem, 7vw, 3.4rem);
  font-weight: 300;
  margin: .2em 0;
  line-height: 1.12;
  text-wrap: balance;
}
.hero .lede { opacity: .92; font-size: clamp(.98rem, 3.4vw, 1.1rem); }

.chips { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: center; margin-top: 1.2rem; }
.chip {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: .38rem .85rem;
  font-size: clamp(.74rem, 2.9vw, .82rem);
  color: #fff;
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--card-pad);
  margin-bottom: var(--stack);
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: clamp(.92rem, 3.2vw, 1.05rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 0 0 .8rem;
}
.card h3 { font-size: 1rem; margin: 1.4rem 0 .5rem; }
.card > :last-child { margin-bottom: 0; }

.grid { display: grid; grid-template-columns: 1fr; gap: var(--stack); }
@media (min-width: 900px) { .grid { grid-template-columns: 1fr 1fr; } }

.muted { color: var(--muted); font-size: .92rem; }
.strongline { font-weight: 600; margin-bottom: .2rem; }
.wrap-any { overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   Hub: sticky section navigation
   -------------------------------------------------------------------------- */
.hubnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: .3rem;
  overflow-x: auto;
  padding: .6rem 0;
  margin-bottom: var(--stack);
  scrollbar-width: none;
  background: linear-gradient(180deg, rgba(11,14,20,.96), rgba(11,14,20,.72));
  backdrop-filter: blur(8px);
}
.hubnav::-webkit-scrollbar { display: none; }
.hubnav a {
  flex: none;
  padding: .5rem .9rem;
  border-radius: 999px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: .85rem;
  white-space: nowrap;
  border: 1px solid transparent;
}
.hubnav a:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.hubnav a.active { color: #12141a; background: var(--accent); font-weight: 600; }

/* --------------------------------------------------------------------------
   Hub: day tabs
   -------------------------------------------------------------------------- */
.daytabs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  margin-bottom: 1.2rem;
  scrollbar-width: thin;
}
.daytab {
  flex: none;
  min-width: 8.5rem;
  text-align: left;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.daytab:hover { border-color: var(--accent); transform: translateY(-1px); }
.daytab .d-label {
  display: block;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 700;
}
.daytab .d-date { display: block; font-size: .95rem; font-weight: 600; margin-top: .15rem; }
.daytab .d-title { display: block; font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.daytab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #12141a;
}
.daytab[aria-selected="true"] .d-label,
.daytab[aria-selected="true"] .d-title { color: rgba(18,20,26,.75); }

.dayhead { margin-bottom: 1rem; }
.dayhead h3 { margin: 0; font-size: 1.15rem; }
.dayhead p { margin: .2rem 0 0; }

/* --------------------------------------------------------------------------
   Hub: session timeline
   -------------------------------------------------------------------------- */
.sessions { list-style: none; margin: 0; padding: 0; }
.session {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: .2rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.session:first-child { border-top: 0; padding-top: .2rem; }
.session .s-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: .95rem;
  white-space: nowrap;
}
.session .s-body { min-width: 0; }
.session .s-title { font-weight: 600; margin: 0 0 .15rem; }
.session .s-meta { color: var(--muted); font-size: .86rem; margin: 0 0 .4rem; }
.session .s-desc { margin: .3rem 0 0; font-size: .94rem; }

@media (max-width: 520px) {
  .session { grid-template-columns: 1fr; gap: .15rem; }
  .session .s-time { font-size: .85rem; }
}

/* --------------------------------------------------------------------------
   Speakers: small thumbnail that expands to a bio card
   -------------------------------------------------------------------------- */
.speaker-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }

.speaker-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .8rem .25rem .25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: .85rem;
  color: var(--ink);
  text-align: left;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.speaker-chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.speaker-chip img,
.speaker-chip .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: linear-gradient(140deg, #2b3446, #131a28);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.speaker-chip .s-name { font-weight: 600; }
.speaker-chip .s-role { color: var(--muted); font-size: .8rem; }

/* Speaker grid, used in the "who you'll meet" section */
.speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.speaker-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem .8rem;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.speaker-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.speaker-card img,
.speaker-card .avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto .6rem;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #2b3446, #131a28);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
}
.speaker-card .s-name { display: block; font-weight: 600; font-size: .95rem; }
.speaker-card .s-role { display: block; color: var(--muted); font-size: .82rem; margin-top: .1rem; }

/* The expanded bio. It grows from the thumbnail and shrinks back into it. */
.bio-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 10, 16, .72);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .28s ease;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}
.bio-backdrop.open { opacity: 1; }
.bio-backdrop[hidden] { display: none; }

.bio-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 16px;
  padding: clamp(1.3rem, 4vw, 2rem);
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
  transform-origin: top left;
  will-change: transform, opacity;
}
.bio-panel img.bio-photo,
.bio-panel .avatar.bio-photo {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: .9rem;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #2b3446, #131a28);
  color: #fff;
  font-size: 1.9rem;
  font-weight: 600;
}
.bio-panel h3 { margin: 0; font-size: 1.35rem; font-weight: 600; }
.bio-panel .bio-role { color: var(--accent-dark); font-weight: 600; margin: .15rem 0 .1rem; }
.bio-panel .bio-org { color: var(--muted); margin: 0 0 1rem; }
.bio-panel .bio-text p { margin: 0 0 .8rem; }
.bio-close { margin-top: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  .bio-backdrop, .bio-panel { transition: none !important; animation: none !important; }
}

/* --------------------------------------------------------------------------
   Lists used across the hub
   -------------------------------------------------------------------------- */
.downloads { list-style: none; padding: 0; margin: 0; }
.downloads li { border-top: 1px solid var(--line); }
.downloads li:first-child { border-top: 0; }
.downloads a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  min-height: 46px;
  padding: .7rem 0;
  color: var(--ink);
  text-decoration: none;
}
.downloads a::after { content: "\2193"; color: var(--accent); flex: none; font-weight: 700; }
.downloads a:hover { color: var(--accent-dark); }
.downloads .dl-note { color: var(--muted); font-size: .82rem; display: block; font-weight: 400; }

.deflist { margin: 0; }
.deflist dt { font-weight: 600; margin-top: .9rem; }
.deflist dt:first-child { margin-top: 0; }
.deflist dd { margin: .15rem 0 0; color: var(--muted); }

.factgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; }
.fact { border-left: 3px solid var(--accent); padding-left: .7rem; }
.fact .f-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fact .f-value { font-weight: 600; }

.mapwrap { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); margin-top: .8rem; }
.mapwrap iframe { width: 100%; height: clamp(190px, 34vw, 300px); border: 0; display: block; }

details.faq { border-top: 1px solid var(--line); padding: .2rem 0; }
details.faq:first-of-type { border-top: 0; }
details.faq summary {
  cursor: pointer;
  padding: .75rem 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; flex: none; }
details.faq[open] summary::after { content: "\2013"; }
details.faq .faq-body { padding: 0 0 .9rem; color: var(--muted); }

.update { border-left: 3px solid var(--accent); padding: .1rem 0 .1rem .8rem; margin-bottom: 1rem; }
.update .u-date { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* --------------------------------------------------------------------------
   Forms (RSVP and admin)
   -------------------------------------------------------------------------- */
fieldset.choices { border: 0; padding: 0; margin: 0 0 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.choice {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 52px;
  flex: 1 1 12rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .6rem 1.1rem;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); background: rgba(184,145,47,.12); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); flex: none; }
.choice .c-text { font-weight: 600; }
@media (max-width: 479px) { .choice { flex: 1 1 100%; } }

.check { display: flex; align-items: center; gap: .55rem; min-height: 44px; margin: .3rem 0 .7rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); flex: none; }

/* Speaker picker on the Agenda tab --------------------------------------- */
.pick { display: flex; flex-wrap: wrap; gap: .5rem; margin: .1rem 0 .55rem; }
.pick-opt {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .45rem .8rem .45rem .6rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: .92rem; line-height: 1.2;
  cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s;
}
.pick-opt:hover { border-color: #b9c0cc; background: #fbfbfc; }
.pick-opt input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); flex: none; margin: 0; }
.pick-opt .pick-name { white-space: nowrap; }
.pick-opt.is-on {
  border-color: var(--accent);
  background: rgba(184,145,47,.14);
  box-shadow: inset 0 0 0 1px var(--accent);
  font-weight: 600;
}
.pick-opt.is-on .pick-name::after { content: ' \2713'; color: var(--accent); font-weight: 700; }
.pick-opt:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-summary { margin: 0 0 .2rem; font-size: .85rem; color: var(--muted); }
.pick-summary strong { color: var(--ink); font-weight: 600; }
.pick-summary.none { font-style: italic; }
@media (max-width: 479px) {
  .pick-opt { flex: 1 1 100%; justify-content: flex-start; border-radius: 10px; }
  .pick-opt .pick-name { white-space: normal; }
}

.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]),
.field textarea, .field select {
  width: 100%;
  padding: .75rem .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field .check { margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 620px) { .field-row.two { grid-template-columns: 1fr 1fr; } }

.status { margin-top: .9rem; font-size: .92rem; font-weight: 600; min-height: 1.4em; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.hidden { display: none !important; }

@media (max-width: 599px) { form .btn-primary { width: 100%; } }

/* --------------------------------------------------------------------------
   Admin editor
   -------------------------------------------------------------------------- */
.admin-page { background: #eef1f6; color: var(--ink); min-height: 100vh; }
.admin-page .bg-media { display: none; }
.admin-shell { max-width: 1000px; margin: 0 auto; padding: 0 var(--gutter) 4rem; }
.admin-bar {
  background: #11151f;
  color: #fff;
  padding: .9rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 30;
}
.admin-bar .brand { letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.admin-bar .btn { min-height: 38px; padding: .4rem 1rem; font-size: .86rem; }

.admin-page .card { box-shadow: 0 2px 10px rgba(16,19,26,.08); border: 1px solid rgba(16,19,26,.08); }
.admin-tabs { display: flex; gap: .3rem; overflow-x: auto; margin: 1.2rem 0; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  flex: none;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: .88rem;
  color: var(--ink);
  white-space: nowrap;
}
.admin-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

.repeat-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: .9rem;
  background: #fbfcfe;
}
.repeat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .7rem;
}
.repeat-head strong { font-size: .9rem; }
.repeat-actions { display: flex; gap: .35rem; }
.mini {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  min-width: 34px;
  height: 34px;
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  color: var(--muted);
}
.mini:hover { border-color: var(--accent); color: var(--ink); }
.mini.danger:hover { border-color: var(--bad); color: var(--bad); }

.savebar {
  position: sticky;
  bottom: 0;
  background: rgba(238,241,246,.95);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  padding: .9rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .8rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .8rem; text-align: center; }
.stat .n { font-size: 1.6rem; font-weight: 700; display: block; line-height: 1.1; }
.stat .l { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th, table.data td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
table.data th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tablewrap { overflow-x: auto; }

.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.pill.yes { background: rgba(31,122,77,.14); color: var(--ok); }
.pill.no { background: rgba(179,38,30,.12); color: var(--bad); }

.helpbox {
  background: rgba(184,145,47,.10);
  border-left: 3px solid var(--accent);
  padding: .8rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: .9rem;
  margin-bottom: 1.2rem;
}
.helpbox p { margin: 0 0 .4rem; }
.helpbox p:last-child { margin: 0; }

.filedrop {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 1.6rem 1rem;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  background: #fbfcfe;
}
.filedrop.over { border-color: var(--accent); background: rgba(184,145,47,.08); color: var(--ink); }

/* --------------------------------------------------------------------------
   Notched phones and print
   -------------------------------------------------------------------------- */
@supports (padding: max(0px)) {
  .topbar, .sheet, .cover, .admin-shell, .admin-bar {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
}

@media print {
  .bg-media, .topbar, .hubnav, .daytabs, .btnrow, .mapwrap, .bio-backdrop { display: none !important; }
  body { background: #fff; }
  .hero, .hero h1 { color: #000; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .session { break-inside: avoid; }
}

/* Back to top ------------------------------------------------------------ */
.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 60;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: rgba(13, 16, 23, .82);
  color: var(--accent);
  font-size: 1.15rem; line-height: 1;
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s, background .18s;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: #10131a; }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media print { .to-top { display: none; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
