/* ==========================================================================
   Convoy — "bold & friendly" theme
   Light is the default. Dark applies when the OS prefers it (unless the user picked Light),
   or when the user picked Dark. The pick is a cookie the server turns into
   <html data-theme="light|dark">, so the right theme paints first time.
   ========================================================================== */

:root {
  color-scheme: light;
  --page: #f6f4fc;
  --surface: #ffffff;
  --surface-2: #f3f0fc;
  --surface-3: #e9e4fa;
  --ink: #15121f;
  --ink-2: #4a4560;
  --muted: #706a86;
  --line: #e6e1f2;
  --ring: rgba(76, 52, 180, 0.10);

  --brand: #6a45ff;          /* buttons, highlights (white text on it: 4.9:1) */
  --brand-hover: #5a35ef;
  --brand-ink: #4f2ee0;      /* brand-coloured text and links on surfaces */
  --brand-soft: #efeaff;
  --on-brand: #ffffff;
  --brand-grad: linear-gradient(135deg, #5532e8 0%, #8a2fd6 58%, #c4306f 100%);
  --text-grad: var(--brand-grad);
  --glow-1: rgba(106, 69, 255, 0.12);
  --glow-2: rgba(255, 92, 138, 0.09);

  --accent: var(--brand);
  --accent-ink: var(--brand-ink);

  --good: #0a7d0a;
  --good-bg: #e5f5e7;
  --warn-bg: #fff3d6;
  --warn-ink: #7a5200;
  --bad: #c43535;
  --bad-bg: #fdecec;

  /* arrival groups: categorical slots 1-3 of the validated palette */
  --g-drive: #2a78d6;
  --g-lift: #eb6834;
  --g-own: #1baf7a;

  --radius: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30, 20, 70, 0.05), 0 10px 30px -12px rgba(30, 20, 70, 0.12);
  --shadow-btn: 0 8px 18px -8px rgba(106, 69, 255, 0.55);
  --header-bg: rgba(255, 255, 255, 0.78);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0b14;
    --surface: #17141f;
    --surface-2: #211d2e;
    --surface-3: #2b2640;
    --ink: #f4f2fb;
    --ink-2: #c6c0da;
    --muted: #958eab;
    --line: #2d2842;
    --ring: rgba(255, 255, 255, 0.07);
    --brand: #7a56ff;
    --brand-hover: #8a6aff;
    --brand-ink: #b6a3ff;
    --brand-soft: #2a2152;
    --on-brand: #ffffff;
    --brand-grad: linear-gradient(135deg, #4a2bd0 0%, #7a28c0 58%, #a82a62 100%);
  --text-grad: linear-gradient(135deg, #a993ff 0%, #d488ff 55%, #ff86b0 100%); /* lighter: it sits on the dark page, not under white text */
    --glow-1: rgba(122, 86, 255, 0.20);
    --glow-2: rgba(230, 74, 123, 0.11);
    --good: #4cd04c;
    --good-bg: #13290f;
    --warn-bg: #2f2510;
    --warn-ink: #f2c45a;
    --bad: #f07272;
    --bad-bg: #351818;
    --g-drive: #3987e5;
    --g-lift: #d95926;
    --g-own: #199e70;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 30px -14px rgba(0, 0, 0, 0.6);
    --shadow-btn: 0 8px 20px -8px rgba(122, 86, 255, 0.6);
    --header-bg: rgba(23, 20, 31, 0.78);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0b14;
  --surface: #17141f;
  --surface-2: #211d2e;
  --surface-3: #2b2640;
  --ink: #f4f2fb;
  --ink-2: #c6c0da;
  --muted: #958eab;
  --line: #2d2842;
  --ring: rgba(255, 255, 255, 0.07);
  --brand: #7a56ff;
  --brand-hover: #8a6aff;
  --brand-ink: #b6a3ff;
  --brand-soft: #2a2152;
  --on-brand: #ffffff;
  --brand-grad: linear-gradient(135deg, #4a2bd0 0%, #7a28c0 58%, #a82a62 100%);
  --text-grad: linear-gradient(135deg, #a993ff 0%, #d488ff 55%, #ff86b0 100%); /* lighter: it sits on the dark page, not under white text */
  --glow-1: rgba(122, 86, 255, 0.20);
  --glow-2: rgba(230, 74, 123, 0.11);
  --good: #4cd04c;
  --good-bg: #13290f;
  --warn-bg: #2f2510;
  --warn-ink: #f2c45a;
  --bad: #f07272;
  --bad-bg: #351818;
  --g-drive: #3987e5;
  --g-lift: #d95926;
  --g-own: #199e70;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 30px -14px rgba(0, 0, 0, 0.6);
  --shadow-btn: 0 8px 20px -8px rgba(122, 86, 255, 0.6);
  --header-bg: rgba(23, 20, 31, 0.78);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--page);
  background-image:
    radial-gradient(1100px 520px at 0% -8%, var(--glow-1), transparent 62%),
    radial-gradient(900px 460px at 100% -4%, var(--glow-2), transparent 60%);
  background-repeat: no-repeat;
  font: 16px/1.55 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--brand-ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
h2 { font-size: 1.2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .75rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-soft); }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 460px; }
.medium { max-width: 740px; }

/* ---------- header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 8px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; font-size: 1.2rem; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; filter: drop-shadow(0 4px 10px rgba(106, 69, 255, .35)); }
.site-nav { margin-left: auto; display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.site-nav a:not(.btn), .site-nav button:not(.btn):not(.theme-toggle) {
  color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: 999px;
  font: inherit; font-size: .95rem; font-weight: 550; background: none; border: 0; cursor: pointer;
}
.site-nav a:not(.btn):hover, .site-nav button:not(.btn):not(.theme-toggle):hover { background: var(--surface-2); color: var(--ink); }
.site-nav form { display: inline; margin: 0; }
.site-nav .btn { margin-left: 6px; }
.site-header .brand { margin-right: auto; }
.site-menu { display: none; }
@media (max-width: 719px) {
  .site-nav { display: none; }
  .site-menu { display: block; }
}

/* ---------- drop-down menus (<details class="menu">) ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.icon-btn svg { width: 20px; height: 20px; }
.menu[open] > .icon-btn { background: var(--surface-2); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px; max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; padding: 6px; gap: 2px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 18px 40px -12px rgba(20, 10, 50, .35);
}
.menu-panel a, .menu-panel button {
  display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font: inherit; font-size: .95rem; font-weight: 550; background: none; border: 0; cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); }
.menu-panel form { margin: 0; }
.menu-panel a.btn { margin: 4px 0 0; text-align: center; color: var(--on-brand); background: var(--brand); }
.menu-note { font-size: .78rem; color: var(--muted); padding: 8px 12px 4px; margin: 0; border-top: 1px solid var(--line); }

.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; display: none; }
:root[data-theme-pref="system"] .theme-toggle .i-system,
:root[data-theme-pref="light"] .theme-toggle .i-light,
:root[data-theme-pref="dark"] .theme-toggle .i-dark { display: block; }

.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0; color: var(--muted); font-size: .875rem; background: var(--surface); }
.site-footer .container { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- layout helpers ---------- */
.page { padding-top: 28px; padding-bottom: 28px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.row > .grow, input.grow, select.grow { flex: 1; min-width: 140px; width: auto; }
.right { text-align: right; }
.pad-head { padding: 20px 20px 0; }
.pad-body { padding: 0 20px 20px; }
.flash-wrap { padding-top: 18px; }
.flash-wrap .alert { margin: 0 0 8px; }
.desc { margin: 14px 0 10px; white-space: pre-line; }
.me-eta { margin: 12px 0 0; }
.grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-main { grid-template-columns: minmax(0, 1fr) 350px; align-items: start; }
  /* Event page: your card top-right, board on the left, tools under your card. On phones: you, board, tools. */
  .event-grid { grid-template-columns: minmax(0, 1fr) 350px; grid-template-rows: auto 1fr; align-items: start; }
  .event-grid .me-col { grid-column: 2; grid-row: 1; }
  .event-grid .board-col { grid-column: 1; grid-row: 1 / span 2; }
  .event-grid .tools-col { grid-column: 2; grid-row: 2; }
}
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.tabular { font-variant-numeric: tabular-nums; }
.grad-text { background: var(--text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; font-size: .95rem;
  text-decoration: none; cursor: pointer; min-height: 42px; line-height: 1.2;
  transition: background .15s, transform .1s, box-shadow .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); border-color: transparent; box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--brand-hover); border-color: transparent; }
.btn-accent { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-btn); }
.btn-accent:hover { filter: brightness(1.08); background: var(--brand-grad); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--bad); border-color: var(--line); }
.btn-danger:hover { background: var(--bad-bg); border-color: transparent; }
.btn-sm { padding: 6px 13px; min-height: 34px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled=true] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.inline-form { display: inline; margin: 0; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-weight: 650; font-size: .9rem; }
.field .hint, .hint { font-size: .8rem; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface-2);
  border: 1.5px solid transparent; border-radius: var(--radius-sm); padding: 10px 13px; min-height: 46px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 120px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--surface-3); }
input:focus, select:focus, textarea:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.field-row > .field { min-width: 0; }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; min-height: 40px;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: .92rem; text-decoration: none;
}
.chip:hover { background: var(--surface-3); }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-radio span {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 13px; min-height: 40px; border-radius: 999px;
  background: var(--surface-2); border: 1.5px solid transparent; font-size: .9rem; font-weight: 600; color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s;
}
.chip-radio:hover span { border-color: var(--surface-3); }
.chip-radio input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 700; }
.chip-radio input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.lift-hint { margin: -6px 0 14px; }
details.more-inline { margin: 0 0 16px; }
details.more-inline > summary { cursor: pointer; font-size: .9rem; font-weight: 650; color: var(--brand-ink); width: max-content; max-width: 100%; }
details.more-inline[open] > summary { margin-bottom: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-bottom: 14px; }
.check input { width: 19px; height: 19px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.field-validation-error, .validation-summary-errors, .error { color: var(--bad); font-size: .85rem; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.input-validation-error { border-color: var(--bad) !important; }

/* ---------- alerts ---------- */
.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: .92rem; border: 1px solid transparent; }
.alert-ok { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert-err { background: var(--bad-bg); color: var(--bad); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-accent { background: var(--brand-soft); color: var(--brand-ink); }

/* ---------- landing ---------- */
.hero { padding-top: 64px; padding-bottom: 28px; text-align: center; }
.hero.hero-sm { padding-top: 28px; padding-bottom: 8px; }
.hero h1 { font-size: clamp(2.2rem, 6.5vw, 3.6rem); max-width: 820px; margin: 0 auto 16px; letter-spacing: -0.035em; }
.hero p { font-size: 1.15rem; color: var(--ink-2); max-width: 620px; margin: 0 auto 26px; }
.hero .eyebrow { display: inline-block; margin-bottom: 18px; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature .icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft); font-size: 1.35rem; }
.feature h3 { margin-top: 12px; }
.feature p { color: var(--ink-2); font-size: .93rem; margin: 0; }
.mock { max-width: 540px; margin: 36px auto 0; text-align: left; }

/* ---------- pricing ---------- */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow), 0 20px 40px -24px rgba(106, 69, 255, .55); }
.plan .price { font-size: 2.4rem; font-weight: 850; letter-spacing: -0.03em; margin: 6px 0 2px; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; }
.plan li { padding: 6px 0 6px 28px; position: relative; font-size: .93rem; }
.plan li::before {
  content: "✓"; position: absolute; left: 0; top: 7px; width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; font-size: .7rem; font-weight: 800; background: var(--brand-soft); color: var(--brand-ink);
}
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "–"; background: var(--surface-2); color: var(--muted); }

/* ---------- event list (dashboard) ---------- */
.event-list { list-style: none; margin: 0; padding: 6px; }
.event-link { display: flex; gap: 14px; align-items: center; padding: 12px 14px; text-decoration: none; color: var(--ink); border-radius: var(--radius-md); transition: background .15s; }
.event-link:hover { background: var(--surface-2); }
.date-chip { flex: none; width: 54px; text-align: center; border-radius: 14px; background: var(--brand-soft); padding: 7px 0; line-height: 1.1; }
.date-chip .m { display: block; font-size: .68rem; text-transform: uppercase; font-weight: 800; letter-spacing: .06em; color: var(--brand-ink); }
.date-chip .d { display: block; font-size: 1.35rem; font-weight: 850; }
.event-link .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.event-link .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) {
  .event-link { align-items: flex-start; }
  .event-link .title { white-space: normal; overflow-wrap: anywhere; }
}
progress.usage { appearance: none; width: 100%; height: 8px; margin-top: 12px; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: block; }
progress.usage::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress.usage::-webkit-progress-value { background: var(--brand-grad); border-radius: 999px; }
progress.usage::-moz-progress-bar { background: var(--brand); border-radius: 999px; }

/* ---------- event header (gradient hero) ---------- */
.event-head { background: var(--brand-grad); color: #fff; border: 0; padding: 22px; position: relative; overflow: visible; }
.event-head::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(320px 320px at calc(100% + 40px) calc(100% + 60px), rgba(255, 255, 255, .18), transparent 65%);
}
.event-head > * { position: relative; z-index: 1; }
.event-head > .event-actions { z-index: 2; }
.event-head h1 { margin-bottom: 8px; overflow-wrap: anywhere; color: #fff; }
.event-head a { color: #fff; }
.event-head .desc { color: rgba(255, 255, 255, .92); }
.event-head .muted { color: rgba(255, 255, 255, .78); }
.event-head .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .32); color: #fff; box-shadow: none; }
.event-head .btn svg { width: 16px; height: 16px; }
.event-head .menu-panel a, .event-head .menu-panel button { color: var(--ink); }
.event-head .menu-panel { left: 0; right: auto; }
.event-head .desc { margin: 12px 0 0; font-size: .95rem; }
.event-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 16px; }
.host-line { font-size: .78rem; color: rgba(255, 255, 255, .8); flex: 1; min-width: 0; text-align: right; }
.event-actions .live { color: rgba(255, 255, 255, .85); }
.event-head .btn:hover { background: rgba(255, 255, 255, .26); }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px; color: rgba(255, 255, 255, .95); font-size: .9rem; }
.event-meta > * { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 3px 11px; }
.event-meta a { text-decoration: none; }
.event-meta a:hover { background: rgba(255, 255, 255, .24); }
.countdown { font-weight: 750; background: rgba(255, 255, 255, .26) !important; }
.countdown:empty { display: none !important; }

/* ---------- summary row ---------- */
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 14px 6px; }
.sum { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.sum + .sum { border-left: 1px solid var(--line); }
.sum .v { font-size: 1.3rem; font-weight: 850; line-height: 1.15; letter-spacing: -0.02em; }
.sum .k { font-size: .72rem; color: var(--muted); font-weight: 650; white-space: nowrap; }
.sum-note { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 0; }

/* ---------- board tabs (radio inputs + labels, so no JS is needed) ---------- */
.board-col > * + * { margin-top: 14px; }
.tab-radio { position: absolute; opacity: 0; pointer-events: none; }
.tab-bar { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; border: 1px solid var(--ring); }
.tab-bar label {
  flex: 1; text-align: center; padding: 8px 6px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font-size: .88rem; font-weight: 700; color: var(--ink-2); transition: background .15s, color .15s;
}
.tab-bar .count { font-size: .75rem; font-weight: 750; color: var(--muted); margin-left: 2px; }
.tab-panel { display: none; margin-top: 14px; }
.tab-panel > * + * { margin-top: 14px; }
#tab-cars:checked ~ .panel-cars, #tab-people:checked ~ .panel-people, #tab-times:checked ~ .panel-times { display: block; }
#tab-cars:checked ~ .tab-bar label[for=tab-cars],
#tab-people:checked ~ .tab-bar label[for=tab-people],
#tab-times:checked ~ .tab-bar label[for=tab-times] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 10, 50, .12); }
#tab-cars:focus-visible ~ .tab-bar label[for=tab-cars],
#tab-people:focus-visible ~ .tab-bar label[for=tab-people],
#tab-times:focus-visible ~ .tab-bar label[for=tab-times] { outline: 3px solid var(--brand); outline-offset: 1px; }
.empty { margin: 0; }

/* ---------- arrival timeline (lane chart, SVG so it needs no inline styles) ---------- */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.swatch.g-drive { background: var(--g-drive); }
.swatch.g-lift { background: var(--g-lift); }
.swatch.g-own { background: var(--g-own); }
.legend-rule { display: inline-block; width: 0; height: 12px; border-left: 1px dashed var(--muted); }
.legend-rule.avg { border-left: 2px solid var(--ink); }
.timeline { margin-top: 14px; }
.tl-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; }
.tl-name { font-size: .85rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; color: var(--ink-2); }
.tl-rows { position: relative; }
.tl-ticks { width: 100%; height: 16px; overflow: visible; display: block; }
.tl-ticks text { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.tl-track { width: 100%; height: 32px; display: block; overflow: visible; border-top: 1px solid var(--line); }
.tl-row:last-of-type .tl-track { border-bottom: 1px solid var(--line); }
.tl-track:focus { outline: none; }
.tl-track:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tl-hit { fill: transparent; }
.tl-dot { stroke: var(--surface); stroke-width: 2; }
.tl-dot.g-drive { fill: var(--g-drive); }
.tl-dot.g-lift { fill: var(--g-lift); }
.tl-dot.g-own { fill: var(--g-own); }
.tl-ring { fill: none; stroke-width: 2; }
.tl-ring.g-drive { stroke: var(--g-drive); }
.tl-ring.g-lift { stroke: var(--g-lift); }
.tl-ring.g-own { stroke: var(--g-own); }
.tl-track:hover .tl-dot, .tl-track:focus-visible .tl-dot { stroke-width: 3; }
.tl-time { font-size: 12px; fill: var(--ink-2); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.tl-overlay { position: absolute; top: 0; bottom: 0; left: 92px; width: calc(100% - 92px); height: 100%; pointer-events: none; overflow: visible; }
.rule-start { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; }
.rule-avg { stroke: var(--ink); stroke-width: 2; }
.tl-unknown { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }

/* ---------- people ---------- */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: .78rem; font-weight: 800; letter-spacing: .02em; background: var(--surface-2); color: var(--ink);
}
.avatar.g-drive { background: color-mix(in srgb, var(--g-drive) 18%, var(--surface)); box-shadow: inset 0 0 0 2px var(--g-drive); }
.avatar.g-lift { background: color-mix(in srgb, var(--g-lift) 18%, var(--surface)); box-shadow: inset 0 0 0 2px var(--g-lift); }
.avatar.g-own { background: color-mix(in srgb, var(--g-own) 18%, var(--surface)); box-shadow: inset 0 0 0 2px var(--g-own); }
.people { list-style: none; padding: 0; margin: 0; }
.people > li { display: flex; gap: 12px; align-items: center; padding: 11px 0; }
.people > li + li { border-top: 1px solid var(--line); }
.people .who { flex: 1; min-width: 0; }
.people .name { font-weight: 650; overflow-wrap: anywhere; }
.people .meta { font-size: .83rem; color: var(--muted); }
.people .eta { text-align: right; font-variant-numeric: tabular-nums; font-weight: 750; }
.people-sub { font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 0 4px !important; }
.people > li.dim { opacity: .7; }
.you { display: inline-block; font-size: .64rem; font-weight: 800; color: var(--brand-ink); background: var(--brand-soft); text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }

/* ---------- cars ---------- */
.cars { display: grid; gap: 14px; }
@media (min-width: 640px) { .cars { grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); } }
.car { padding: 16px; }
.car-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.car-head .grow { flex: 1; min-width: 0; }
.seats { display: flex; gap: 5px; margin: 6px 0 12px; }
.seat { width: 24px; height: 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seat.taken { background: var(--g-lift); border-color: var(--g-lift); }
.stops { list-style: none; padding: 0; margin: 0; }
.stops > li { border-top: 1px dashed var(--line); font-size: .93rem; }
.stop-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 9px 0; min-height: 44px; }
.mock .stops li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 9px 0; }
details.stop > summary { list-style: none; cursor: pointer; }
details.stop > summary::-webkit-details-marker { display: none; }
details.stop > summary:hover { background: var(--surface-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }
.chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin-right: 4px; transition: transform .15s; }
details.stop[open] .chev { transform: rotate(45deg); }
.stops .t { font-weight: 800; font-variant-numeric: tabular-nums; }
.stops .done { text-decoration: line-through; color: var(--muted); }
.stops li.arrive { color: var(--ink-2); }
.stops li.arrive .t { color: var(--brand-ink); }
.stop-edit { display: flex; flex-direction: column; gap: 8px; padding: 2px 0 12px; }
.stop-edit .row { gap: 6px; }
.stop-edit input[type=time], .time-sm { width: 116px; flex: none; min-height: 36px; padding: 4px 10px; }
.stop-edit .stop-loc { flex: 1; min-width: 100px; width: auto; min-height: 36px; padding: 4px 10px; }
.car-actions { margin-top: 12px; gap: 6px; }
.car details.more { margin-top: 12px; }

/* ---------- status buttons ---------- */
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.seg button {
  font: inherit; font-size: .88rem; font-weight: 650; padding: 11px 8px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; transition: background .15s, transform .1s;
}
.seg button:hover { background: var(--surface-3); }
.seg button:active { transform: translateY(1px); }
.seg button[aria-pressed=true] { background: var(--brand); color: var(--on-brand); border-color: transparent; box-shadow: var(--shadow-btn); }

/* ---------- details / disclosure ---------- */
details.more { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
details.more > summary { cursor: pointer; font-weight: 650; font-size: .92rem; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 6px; }
details.more > summary:hover { color: var(--ink); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
details.more[open] > summary::before { transform: rotate(45deg); }
details.more[open] > summary { margin-bottom: 14px; }

/* ---------- tables ---------- */
table.simple { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
@media (min-width: 520px) { table.simple { display: table; } }
table.simple th, table.simple td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.simple th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 750; }
table.simple tbody tr:hover td { background: var(--surface-2); }

/* ---------- misc ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 30px; }
.prose li { margin-bottom: 6px; }
.code-box { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .85rem; background: var(--surface-2); padding: 11px 13px; border-radius: var(--radius-sm); overflow-wrap: anywhere; border: 1px dashed var(--surface-3); }
.qr img { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 12px; display: block; margin: 8px 0; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 10px); background: var(--ink); color: var(--page); padding: 11px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600; z-index: 50; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; }
.live.on::before { background: #5df05d; opacity: 1; box-shadow: 0 0 0 3px rgba(93, 240, 93, .25); }

/* ---------- ads (free plan) ---------- */
.ad-slot { border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.ad-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.ad-slot ins.adsbygoogle { display: block; min-height: 100px; }
.ad-placeholder { display: grid; place-items: center; text-align: center; min-height: 120px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: .9rem; padding: 12px; }
.ad-upsell { display: inline-block; margin-top: 8px; color: var(--muted); }
/* Live ads: no border, label or upsell until Google actually fills the slot, and gone entirely if it has nothing
   to show, so the page never has an empty "Advertisement" box. The <ins> keeps its width so Google can still measure it. */
.ad-slot.live { border-color: transparent; background: transparent; padding: 0; }
.ad-slot.live:not(:has(ins[data-ad-status="filled"])) { margin-top: 0; }
.ad-slot.live .ad-label, .ad-slot.live .ad-upsell { display: none; }
.ad-slot.live ins.adsbygoogle { min-height: 0; }
.ad-slot.live:has(ins[data-ad-status="filled"]) { border-color: var(--line); background: var(--surface); padding: 12px 14px; }
.ad-slot.live:has(ins[data-ad-status="filled"]) .ad-label { display: block; }
.ad-slot.live:has(ins[data-ad-status="filled"]) .ad-upsell { display: inline-block; }
.ad-slot.live:has(ins[data-ad-status="unfilled"]) { display: none; }

/* ---------- claiming / saving entries ---------- */
.claim-card { border: 2px solid var(--brand); box-shadow: var(--shadow), 0 18px 40px -24px rgba(106, 69, 255, .6); }
.save-account { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; background: var(--brand-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin: 16px 0 0; }
.guest-note { margin: 14px 0 0; }
.on-list .chips { margin: 0 0 14px; }
.or-new { margin: 0 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.join-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.join-foot { margin: 10px 0 0; text-align: center; }
.me-line { margin: -6px 0 14px; }
.me-card .seg { margin-bottom: 4px; }
.warn-text { color: var(--warn-ink); font-weight: 650; }
.leave-form { margin: 14px 0 0; text-align: center; }
details.more.first { border-top: 0; padding-top: 0; margin-top: 0; }
.claim-link {
  display: inline-block; font-size: .72rem; font-weight: 750; white-space: nowrap; text-decoration: none;
  color: var(--brand-ink); background: var(--brand-soft); padding: 2px 9px; border-radius: 999px; margin-left: 6px; vertical-align: 1px;
}
.claim-link:hover { background: var(--surface-3); }

/* keep anchored sections (#claim, #me, #cars) clear of the sticky header */
[id] { scroll-margin-top: 80px; }

@media (max-width: 480px) {
  .page { padding-top: 16px; }
  .card { padding: 16px; }
  .event-head { padding: 18px; }
  .event-head h1 { font-size: 1.6rem; }
  .stack > * + * { margin-top: 14px; }
  .host-line { flex-basis: 100%; order: 3; text-align: left; }
  .site-footer { margin-top: 32px; padding: 20px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (forced-colors: active) { .swatch, .seat.taken, .tl-dot { forced-color-adjust: none; } .event-head { border: 1px solid CanvasText; } }
@media print {
  .site-header, .site-footer, form, .btn, .ad-slot, .make-own { display: none !important; }
  body { background: #fff; }
  .event-head { background: none; color: #000; }
}
.center-text { text-align: center; }

/* "make your own" invitation for guests at the foot of an event */
.make-own {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px;
  padding: 14px 18px; border: 1px dashed var(--line); border-radius: var(--radius-md);
  color: var(--muted); font-size: .9rem; text-align: center;
}

/* contact form honeypot: off-screen for people, still in the form for bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- admin ---------- */
.admin-bar { padding: 10px 14px; background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); }
.filter-select { width: auto; min-width: 180px; }
input.reason-sm, .reason-sm { width: 140px; flex: none; min-height: 34px; padding: 4px 10px; }

/* ---------- landing pages (/for/…) ---------- */
.use-plan { margin: 0; text-align: center; color: var(--ink-2); }
.use-faq h2 { margin-bottom: 12px; }
.use-faq details { padding: 0; }
.use-faq details + details { margin-top: 10px; }
.use-faq summary { cursor: pointer; padding: 16px 20px; font-weight: 650; }
.use-faq details p { margin: 0; padding: 0 20px 16px; color: var(--ink-2); }
.use-cta { text-align: center; padding: 28px 20px; }
.use-cta p { max-width: 520px; margin: 6px auto 18px; }
.use-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.home-uses { margin-top: 28px; }
/* four cards: 2×2 on mid-size screens, one row on wide ones (never 3 + 1) */
@media (min-width: 560px) { .features-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .features-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ad measurement consent: only for visitors who arrived from a Google ad */
.measure-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 460px; margin-left: auto; padding: 16px 18px;
}
.measure-banner p { margin: 0 0 8px; }
.measure-banner form { margin-top: 10px; gap: 8px; }
.measure-banner .btn { flex: 1; }
@media print { .measure-banner { display: none !important; } }

/* ---------- venue poll ---------- */
.poll-rule { margin: -6px 0 12px; }
.poll-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.poll-opt { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface); transition: border-color .15s, background .15s; }
.poll-opt > label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.poll-opt input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--brand); }
.poll-opt:has(input:checked), .poll-opt.mine { border-color: var(--brand); background: var(--brand-soft); }
.poll-opt.won { border-color: var(--good); }
.poll-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.poll-name { font-weight: 700; overflow-wrap: anywhere; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.poll-addr { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.poll-count { font-weight: 850; font-size: 1.1rem; min-width: 1.5em; text-align: right; }
progress.poll-bar { appearance: none; display: block; width: 100%; height: 6px; margin: 8px 0 0; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
progress.poll-bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress.poll-bar::-webkit-progress-value { background: var(--brand-grad); border-radius: 999px; }
progress.poll-bar::-moz-progress-bar { background: var(--brand); border-radius: 999px; }
.poll-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; min-height: 0; }
.poll-voters { font-size: .78rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.poll-pick { flex: none; color: var(--brand-ink); min-height: 30px; padding: 4px 10px; }
.poll-actions { margin-top: 14px; }
.poll-host { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.poll-join { margin: 12px 0 0; }
.poll-decided { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.poll .more { margin-top: 12px; }
.poll-add { margin-top: 16px; }
