/* RSVP Sorted: one stylesheet for the platform, the guest pages and the marketing page.
   Colours: only the nine Sorted colours below. Type: Antonio for headlines, Lato for everything else. */

@font-face { font-family: 'Lato'; src: url('../fonts/Lato-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../fonts/Lato-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../fonts/Lato-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Antonio'; src: url('../fonts/Antonio-var.ttf') format('truetype'); font-weight: 100 700; font-display: swap; }

:root {
  --darker: #021623;
  --navy: #002142;
  --red: #EF0035;
  --sky: #95B2C9;
  --beige: #EAE3D8;
  --light: #F1F1E9;
  --yellow: #FFD000;
  --green: #00EB63;
  --lilac: #AC7FDC;

  --ink: var(--darker);
  --ink-soft: color-mix(in srgb, var(--darker) 68%, var(--light));
  --line: color-mix(in srgb, var(--darker) 14%, transparent);
  --line-strong: color-mix(in srgb, var(--darker) 28%, transparent);
  --page: var(--beige);
  --surface: var(--light);

  --display: 'Antonio', 'Arial Narrow', sans-serif;
  --body: 'Lato', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 18px;
  --dock-space: 112px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.55 var(--body); }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── Type ─────────────────────────────────────────────────────────── */
h1, h2, h3, .display { font-family: var(--display); font-weight: 700; line-height: .95; letter-spacing: -.01em; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(38px, 5vw, 68px); text-transform: uppercase; }
h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 600; }
h3 { font-size: 22px; font-weight: 600; }
p { margin: 0 0 1em; }
.eyebrow { font: 700 11px/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 8px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }

/* ── App frame ────────────────────────────────────────────────────── */
.topbar { background: var(--darker); color: var(--light); }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 16px; }
.brand { font: 700 22px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; text-decoration: none; color: var(--light); display: inline-flex; align-items: baseline; gap: 6px; }
.brand b { color: var(--red); font-weight: 700; }
.brand:hover { color: var(--light); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: color-mix(in srgb, var(--darker) 70%, transparent); margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs span::before { content: '/'; margin-right: 8px; opacity: .5; }
.crumbs span:first-child::before { content: none; }
.topbar .who { margin-left: auto; font-size: 13px; color: color-mix(in srgb, var(--light) 75%, transparent); text-align: right; }
.topbar .who strong { color: var(--light); display: block; }
.bell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 100px; color: var(--light); text-decoration: none; }
.bell-btn:hover, .bell-btn.on { background: color-mix(in srgb, var(--light) 12%, transparent); }
.bell-btn svg { width: 18px; height: 18px; }
.bell-btn .badge-count { position: absolute; top: 0; right: 0; background: var(--red); color: #fff; font: 700 10px/1 var(--body); border-radius: 100px; padding: 2px 5px; min-width: 15px; text-align: center; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px calc(var(--dock-space) + 24px); }
.wrap.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Dock (from sorteddesign.co.za) ───────────────────────────────── */
.dock { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 16px); }
.dock-row {
  list-style: none; margin: 0; display: flex; align-items: flex-end; gap: clamp(6px, .9vw, 14px);
  padding: 11px clamp(12px, 1.5vw, 20px);
  background: color-mix(in srgb, var(--darker) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--light) 16%, transparent); border-radius: 30px;
  backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: 0 26px 70px -22px rgba(2, 22, 35, .7), inset 0 1px 0 color-mix(in srgb, var(--light) 14%, transparent);
}
.dock-row::-webkit-scrollbar { display: none; }
.dock-item { position: relative; display: flex; flex-direction: column; align-items: center; flex: none; }
.dock-item.current::after { content: ''; position: absolute; bottom: -7px; width: 5px; height: 5px; border-radius: 50%; background: var(--light); }
.dock-tile {
  width: clamp(42px, 3.7vw, 54px); height: clamp(42px, 3.7vw, 54px); border-radius: 50%;
  display: grid; place-items: center; background: var(--c); color: var(--ic, var(--darker));
  text-decoration: none; transform-origin: bottom center;
  transition: transform .18s var(--ease), filter .2s var(--ease);
  box-shadow: 0 8px 20px -10px rgba(2, 22, 35, .6);
}
button.dock-tile { border: 0; cursor: pointer; padding: 0; }
.dock-item form { margin: 0; }
.dock-tile svg { width: 46%; height: 46%; }
.dock-tile:hover, .dock-tile:focus-visible { transform: translateY(-8px) scale(1.18); filter: brightness(1.06); color: var(--ic, var(--darker)); }
.dock-name {
  position: absolute; bottom: calc(100% + 16px); left: 50%; transform: translateX(-50%) translateY(6px);
  white-space: nowrap; font: 700 11px/1 var(--body); letter-spacing: .13em; text-transform: uppercase;
  color: var(--light); background: var(--darker); padding: 6px 11px; border-radius: 7px;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.dock-item:hover .dock-name, .dock-tile:focus-visible + .dock-name { opacity: 1; transform: translateX(-50%) translateY(0); }
.dock-sep { width: 1px; align-self: stretch; margin: 4px 2px; background: color-mix(in srgb, var(--light) 18%, transparent); flex: none; }
.c-red { --c: var(--red); --ic: var(--light); }
.c-green { --c: var(--green); }
.c-yellow { --c: var(--yellow); }
.c-sky { --c: var(--sky); }
.c-lilac { --c: var(--lilac); }
.c-paper { --c: var(--light); }
.c-navy { --c: var(--navy); --ic: var(--light); }
@media (max-width: 640px) { .dock { bottom: 10px; } .dock-name { display: none; } .dock-row { overflow-x: auto; scrollbar-width: none; } .dock-tile:hover { transform: none; } }

/* ── Marquee (from sorteddesign.co.za) ────────────────────────────── */
.marquee { max-width: 100%; background: var(--red); color: var(--darker); overflow: hidden; padding: 9px 0; border-block: 1px solid color-mix(in srgb, var(--darker) 20%, transparent); }
.marquee-track { display: flex; align-items: center; width: max-content; animation: marquee 44s linear infinite; }
@media (hover: hover) { .marquee:hover .marquee-track { animation-play-state: paused; } }
.mq-item { font: 600 clamp(14px, 1.5vw, 21px)/1 var(--display); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; padding: 6px clamp(14px, 1.6vw, 26px); border-radius: 100px; transition: background .28s var(--ease), color .28s var(--ease), transform .28s var(--ease); }
.mq-item:hover { background: var(--darker); color: var(--light); transform: scale(1.1) rotate(-1.5deg); }
.mq-star { flex: none; width: clamp(11px, 1vw, 16px); height: clamp(11px, 1vw, 16px); color: var(--darker); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ── Surfaces ─────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .pr-grid > .card + .card { margin-top: 0; } /* cards in a grid line up; the gap spaces them */
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.dark { background: var(--darker); color: var(--light); border-color: transparent; }
.card.dark .muted, .card.dark .eyebrow { color: color-mix(in srgb, var(--light) 70%, transparent); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* Numbers on dashboards */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .n { font: 700 clamp(34px, 4vw, 52px)/1 var(--display); display: block; font-variant-numeric: tabular-nums; }
.stat .l { font: 700 11px/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.stat.red { background: var(--red); color: var(--light); border-color: transparent; }
.stat.red .l { color: color-mix(in srgb, var(--light) 80%, transparent); }
.stat.green { background: var(--green); border-color: transparent; }
.stat.yellow { background: var(--yellow); border-color: transparent; }
.stat.sky { background: var(--sky); border-color: transparent; }
.stat.lilac { background: var(--lilac); border-color: transparent; }
.stat.navy { background: var(--navy); color: var(--light); border-color: transparent; }
.stat.navy .l { color: color-mix(in srgb, var(--light) 75%, transparent); }
.stat.green .l, .stat.yellow .l, .stat.sky .l, .stat.lilac .l { color: var(--darker); }
.meter { height: 8px; border-radius: 8px; background: color-mix(in srgb, var(--darker) 10%, transparent); overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; background: var(--red); border-radius: 8px; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 13px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  padding: 13px 20px; border-radius: 100px; border: 2px solid var(--darker);
  background: var(--darker); color: var(--light); cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--red); border-color: var(--red); color: var(--light); }
.btn:active { transform: translateY(1px); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: var(--darker); border-color: var(--darker); }
.btn.ghost { background: transparent; color: var(--darker); }
.btn.ghost:hover { background: var(--darker); color: var(--light); border-color: var(--darker); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--darker); }
.btn.green { background: var(--green); border-color: var(--green); color: var(--darker); }
.btn.small { padding: 9px 14px; font-size: 11px; }
.btn.link { background: none; border: 0; color: var(--darker); padding: 4px 0; text-decoration: underline; text-decoration-color: var(--red); letter-spacing: .06em; }
.btn.link:hover { color: var(--red); }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn .ill { height: 20px; width: auto; margin: -4px 0; }
.btn-go { display: inline-flex; align-items: center; gap: 10px; }
.btn-go img { height: 26px; width: auto; transition: transform .2s var(--ease); }
.btn-go:hover img { transform: translateX(4px); }

/* ── Forms ────────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 16px; }
.field > span, .field > .label { display: block; font: 700 12px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.field .req::after { content: ' *'; color: var(--red); }
.field .hint, .field > span.hint { display: block; font: 400 13px/1.45 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink-soft); margin: 2px 0 6px; }
.field .error { display: block; font-size: 13px; color: var(--red); font-weight: 700; margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url],
input[type=date], input[type=datetime-local], input[type=time], input[type=search], select, textarea {
  width: 100%; font: 400 16px/1.4 var(--body); color: var(--ink);
  background: var(--light); border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 11px 13px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--darker); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 30%, transparent); }
textarea { min-height: 110px; resize: vertical; }
input[type=file] { font: 400 14px var(--body); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); margin-top: 1px; flex: none; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.code-input { font: 700 30px/1 var(--display) !important; letter-spacing: .4em; text-align: center; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; margin: 0 0 16px; }
legend { font: 700 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; padding: 0 6px; }

/* Switch (per-person permissions) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 24px; background: color-mix(in srgb, var(--darker) 22%, transparent); position: relative; cursor: pointer; transition: background .2s var(--ease); margin: 0; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--light); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:disabled { opacity: .4; cursor: not-allowed; }

/* ── Tables ───────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font: 700 11px/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: color-mix(in srgb, var(--beige) 50%, var(--light)); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--yellow) 12%, var(--light)); }
.table td.actions { text-align: right; white-space: nowrap; }
.table a.rowlink { font-weight: 700; text-decoration: none; }
.table a.rowlink:hover { text-decoration: underline; }

/* ── Badges ───────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; font: 700 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 100px; background: color-mix(in srgb, var(--darker) 10%, transparent); color: var(--darker); white-space: nowrap; }
.badge.red { background: var(--red); color: var(--light); }
.badge.green { background: var(--green); }
.badge.yellow { background: var(--yellow); }
.badge.sky { background: var(--sky); }
.badge.lilac { background: var(--lilac); }
.badge.navy { background: var(--navy); color: var(--light); }
.badge.outline { background: transparent; border: 1.5px solid var(--line-strong); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--c, var(--sky)); }

/* ── Tabs (event screen) ──────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 22px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a { font: 700 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; padding: 10px 14px; border-radius: 100px; white-space: nowrap; }
.tabs a:hover { background: color-mix(in srgb, var(--yellow) 40%, transparent); color: var(--darker); }
.tabs a.on { background: var(--darker); color: var(--light); }

/* ── Messages ─────────────────────────────────────────────────────── */
.flash { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 700; background: var(--green); }
.flash.error { background: var(--red); color: var(--light); }
.flash.warn { background: var(--yellow); }
.flash .ill { width: 34px; height: 34px; flex: none; }
.notice { padding: 14px 18px; border-radius: var(--radius); border: 1.5px dashed var(--line-strong); background: color-mix(in srgb, var(--light) 60%, transparent); }
.notice.warn { border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 18%, var(--light)); }

/* Empty states with a brand illustration */
.empty { text-align: center; padding: 48px 20px; }
.empty .ill { width: 150px; height: auto; margin: 0 auto 14px; display: block; }
.empty h2 { margin-bottom: 8px; }
.empty p { max-width: 46ch; margin: 0 auto 18px; color: var(--ink-soft); }

/* Card lists (events, clients) */
.tile { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); position: relative; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(2, 22, 35, .55); border-color: var(--darker); color: var(--ink); }
.tile h3 { margin-bottom: 6px; }
.tile .meta { font-size: 14px; color: var(--ink-soft); }
.tile .corner { position: absolute; top: 16px; right: 16px; }

/* Timeline (guest record, audit) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); margin-left: 5px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--sky)); }
.timeline .when { font-size: 13px; color: var(--ink-soft); }

/* ── Auth screens ─────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); overflow-x: clip; background: var(--darker); color: var(--light); }
.auth-top { padding: 22px 28px; }
.auth-main { display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(440px, 100%); background: var(--light); color: var(--ink); border-radius: 24px; padding: 34px 30px; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8); }
.auth-card .ill-top { width: 72px; height: auto; display: block; margin-bottom: 14px; }
.auth-card h1 { font-size: clamp(34px, 5vw, 46px); }
.auth-foot { font-size: 12px; text-align: center; padding: 14px; color: color-mix(in srgb, var(--light) 55%, transparent); }

/* ── Utility ──────────────────────────────────────────────────────── */
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
kbd, code { font: 600 13px/1.4 ui-monospace, Menlo, monospace; background: color-mix(in srgb, var(--darker) 8%, transparent); padding: 2px 6px; border-radius: 6px; }
details summary { cursor: pointer; font-weight: 700; }

/* Bar widths in 5% steps (inline styles are blocked by the security policy): class="w-35" */
.w-0{width:0%} .w-5{width:5%} .w-10{width:10%} .w-15{width:15%} .w-20{width:20%} .w-25{width:25%} .w-30{width:30%} .w-35{width:35%} .w-40{width:40%} .w-45{width:45%} .w-50{width:50%} .w-55{width:55%} .w-60{width:60%} .w-65{width:65%} .w-70{width:70%} .w-75{width:75%} .w-80{width:80%} .w-85{width:85%} .w-90{width:90%} .w-95{width:95%} .w-100{width:100%}

/* Tooltips (tips.js): navy bubble, the same as Sorted+ */
.tips-switch { margin-left: auto; font: 700 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--light); background: transparent; border: 1px solid color-mix(in srgb, var(--light) 35%, transparent); border-radius: 100px; padding: 7px 12px; cursor: pointer; }
.tips-switch[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--darker); }
.tips-switch:hover { border-color: var(--yellow); }
.tips-switch:not([hidden]) + .who { margin-left: 0; }
.tip-bubble { position: fixed; top: 0; left: 0; z-index: 99999; pointer-events: none; visibility: hidden; opacity: 0; max-width: 260px; padding: 7px 11px; border-radius: 8px; background: var(--navy); color: #fff; font: 500 12px/1.4 var(--body); box-shadow: 0 4px 12px rgba(0,0,0,.2); text-align: left; transition: opacity .12s var(--ease); }
.tip-bubble.is-on { visibility: visible; opacity: 1; }
.tip-arrow { position: absolute; width: 8px; height: 8px; background: var(--navy); transform: rotate(45deg); }
.tip-bubble.at-bottom .tip-arrow { top: -4px; left: calc(50% - 4px); }
.tip-bubble.at-top .tip-arrow { bottom: -4px; left: calc(50% - 4px); }
.tip-bubble.at-right .tip-arrow { left: -4px; top: calc(50% - 4px); }
.tip-bubble.at-left .tip-arrow { right: -4px; top: calc(50% - 4px); }
@media (prefers-reduced-motion: reduce) { .tip-bubble { transition: none; } }

/* When the event tabs wrap onto several rows (phones), a full pill shape clips the corner tabs */
@media (max-width: 760px) {
  .tabs { border-radius: 24px; }
}

/* Phones: all nine dock tiles fit the width instead of the last ones scrolling out of sight */
@media (max-width: 640px) {
  .dock-row { gap: 4px; padding: 8px; }
  .dock-sep { margin: 4px 0; }
  .dock-tile { width: min(44px, calc((100vw - 16px - 18px - 8 * 4px - 5px) / 9)); height: min(44px, calc((100vw - 16px - 18px - 8 * 4px - 5px) / 9)); }
}
/* Long links (a guest's private RSVP link) break onto the next line instead of widening the page */
code { overflow-wrap: anywhere; }

/* Logo in the top bar and on the sign-in pages */
.brand img { display: block; height: 40px; width: auto; }
@media (max-width: 640px) { .brand img { height: 32px; } }

/* One or two lines under a page title explaining what the screen is for */
.page-intro { max-width: 70ch; margin: -6px 0 22px; color: var(--ink-soft); font-size: 15px; }
.page-intro a { color: var(--ink); font-weight: 700; }

/* Small round copy button, e.g. next to the event picker on the retention screen */
.copy-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.copy-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.copy-btn:hover { background: var(--yellow); border-color: var(--yellow); }
.copy-btn.is-copied { background: var(--green); border-color: var(--green); }

/* Clients screen: events companies with their clients underneath, joined by a connector line */
.org-tree { display: flex; flex-direction: column; gap: 22px; }
.org-node { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s var(--ease), transform .15s var(--ease); }
.org-node:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.org-node .org-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.org-node strong { font: 700 20px/1.15 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.org-node.is-company strong { font-size: 24px; }
.org-node .meta { font-size: 14px; color: var(--ink-soft); }
.org-children { list-style: none; margin: 0; padding: 12px 0 0 26px; display: flex; flex-direction: column; gap: 12px; }
.org-children li { position: relative; padding-left: 30px; }
.org-children li::before { content: ''; position: absolute; left: 0; top: -12px; height: calc(50% + 12px); width: 22px; border-left: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong); border-bottom-left-radius: 12px; }
.org-children li:not(:last-child)::after { content: ''; position: absolute; left: 0; top: 50%; bottom: -12px; border-left: 2px solid var(--line-strong); }
.org-group-label { margin: 0 0 10px; }
.org-flat { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; }

/* Retention accounts table: clients indented under their events company */
.tree-cell { display: flex; flex-direction: column; gap: 2px; }
.tree-cell .tree-name { font-weight: 700; }
.tree-cell.is-child { position: relative; padding-left: 44px; }
.tree-cell.is-child::before { content: ''; position: absolute; left: 20px; top: -12px; height: 26px; width: 16px; border-left: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong); border-bottom-left-radius: 10px; }

/* First-event checklist panel on the event overview */
.checklist-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist-items li { padding: 10px 0; border-top: 1px solid var(--line); }
.checklist-items li:first-child { border-top: none; padding-top: 0; }
.checklist-label { flex: 1; min-width: 0; }

/* Guide steps (help pages, public and in-app) */
.guide-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.guide-steps > li { counter-increment: step; padding-left: 44px; position: relative; scroll-margin-top: 90px; }
.guide-steps > li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 100px; background: var(--yellow); color: var(--darker); font: 700 15px/30px var(--display); text-align: center; }
.guide-steps h2 { margin: 0 0 6px; font-size: 20px; text-align: left; }
.guide-tips { margin: 8px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 14px; }

/* Sign-up honeypot: off screen for people, still in the form for bots. */
.hp { position: absolute; left: -9999px; }

/* Small forms that sit inside a line, like "Take out" in a household list. */
.inline-form { display: inline; }
