/* Reg4Events client dashboard (uses the reg4events theme's tokens) */
.r4e-dashboard .site-main { padding-top: 1.5rem; }
.r4e-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.r4e-top h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
.r4e-top p { margin: .15rem 0 0; color: var(--muted); }
.r4e-crumb { font-size: .9rem; margin: 0 0 .35rem; }
.r4e-crumb a { color: var(--muted); text-decoration: none; }
.r4e-crumb a:hover { color: var(--text); }
.r4e-subnav { display: flex; flex-wrap: wrap; column-gap: .25rem; border-bottom: 1px solid var(--border); margin: 0 0 1.5rem; }
/* Every tab always shows: a narrow screen wraps them onto more lines rather than hiding some to scroll to */
.r4e-subnav a { flex: none; padding: .7rem .65rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.r4e-subnav a:hover { color: var(--text); }
.r4e-subnav a.is-active { color: var(--text); border-bottom-color: var(--accent); }
.r4e-subnav a .r4e-count { margin-left: .3rem; }
.r4e-inprogress__row { display: flex; gap: .75rem; align-items: center; justify-content: space-between; padding: .5rem 0; border-top: 1px solid var(--border); margin: 0; }
.r4e-inprogress__row:first-of-type { border-top: 0; }
.r4e-inprogress__row span { display: flex; flex-direction: column; }
.r4e-inprogress__row small { color: var(--muted); }
.r4e-email-preview__subject { margin: 0 0 .6rem; font-size: .95rem; }
.r4e-email-preview__frame { width: 100%; min-height: 420px; border: 1px solid var(--border); border-radius: 10px; background: var(--subtle, #f4f6fa); }
@media (max-width: 720px) { .r4e-subnav a { padding: .55rem .65rem; font-size: .9rem; } }

.r4e-pill { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .12rem .6rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; background: #eef1f6; color: #3d4757; }
.r4e-pill.is-ok, .r4e-pill.is-open, .r4e-pill.is-registered { background: #dcf5e7; color: #14532d; }
.r4e-pill.is-warn, .r4e-pill.is-draft, .r4e-pill.is-pending, .r4e-pill.is-waitlist { background: #fdecc8; color: #7a4b00; }
.r4e-pill.is-bad, .r4e-pill.is-cancelled { background: #fde2e2; color: #8a1c1c; }
.r4e-pill.is-invited, .r4e-pill.is-unconfirmed { background: #e3edfd; color: #1e3a8a; }
.r4e-pill.is-test { background: #f1e8ff; color: #5b21b6; }
.r4e-count { display: inline-block; min-width: 1.4rem; text-align: center; border-radius: 999px; background: var(--track, #eef1f6); color: var(--muted); font-size: .75rem; padding: 0 .4rem; font-weight: 700; }

.r4e-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem 1.5rem; margin: 0 0 1.25rem; }
.r4e-card > h2:first-child, .r4e-card__head h2 { font-size: 1.3rem; margin: 0 0 .5rem; }
.r4e-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.r4e-card__head h2 { margin: 0; }
.r4e-card__head p { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }
.r4e-card--flush { padding: 0; overflow: hidden; }
.r4e-card--dark { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.r4e-card--dark h2 { color: #fff; }
.r4e-card--dark p { color: var(--ink-muted); }
.r4e-card--accent { border: 2px solid var(--accent); }
.r4e-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.r4e-empty { background: var(--surface); border: 1px dashed var(--line-strong, #c4cdd9); border-radius: var(--radius); padding: 2rem 1.5rem; color: var(--muted); text-align: center; }
.r4e-empty h2 { color: var(--text); font-size: 1.35rem; margin: 0 0 .4rem; }
.r4e-reuse form:has(.r4e-reuse__empty) { display: flex; flex-direction: column; }
.r4e-reuse__empty { background: var(--bg); flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 1.25rem; }
.r4e-reuse__empty-title { color: var(--text); font-weight: 600; margin: 0 0 .3rem; }
.r4e-grid { display: grid; gap: 1.25rem; }
/* Check-in tab: the staff app and kiosk cards side by side, the same height; badges across the bottom */
.r4e-checkin-grid { display: grid; gap: 0 1.25rem; }
.r4e-checkin-grid > div { display: flex; flex-direction: column; }
.r4e-checkin-grid > div > .r4e-card { flex: 1; }
@media (min-width: 960px) { .r4e-checkin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .r4e-checkin-grid__wide { grid-column: 1 / -1; } }
@media (min-width: 960px) { .r4e-grid--2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } .r4e-grid--side { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.r4e-grid > .r4e-card { margin: 0; }
.r4e-help { color: var(--muted); font-size: .88rem; margin: .25rem 0 0; }
.r4e-muted { color: var(--muted); }
.r4e-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
.r4e-copy { display: flex; gap: .5rem; align-items: center; }
.r4e-copy input { flex: 1; min-width: 0; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: .88rem; background: var(--subtle, #f8fafc); color: var(--text); }

/* event list */
.r4e-events { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.r4e-ev { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.r4e-ev:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.r4e-ev__band { height: 8px; }
.r4e-ev__body { padding: 1.1rem 1.25rem 1.2rem; display: grid; gap: .35rem; }
.r4e-ev__body h2 { font-size: 1.25rem; margin: 0; }
.r4e-ev__body h2 a { color: var(--text); text-decoration: none; }
.r4e-ev__body h2 a::after { content: ""; position: absolute; inset: 0; }
.r4e-ev__meta { color: var(--muted); font-size: .9rem; margin: 0; }
.r4e-ev__nums { display: flex; gap: 1.25rem; margin-top: .4rem; font-size: .85rem; color: var(--muted); }
.r4e-ev__nums b { display: block; font-size: 1.3rem; color: var(--text); font-variant-numeric: tabular-nums; }
.r4e-ev--new { border-style: dashed; align-items: center; justify-content: center; min-height: 170px; text-decoration: none; color: var(--muted); font-weight: 700; gap: .4rem; }
.r4e-ev--new:hover { color: var(--text); }

/* KPIs and charts */
.r4e-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.r4e-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .85rem 1rem; text-decoration: none; color: inherit; }
a.r4e-kpi:hover { border-color: var(--muted); }
.r4e-kpi b { display: block; font-size: 1.7rem; font-family: var(--display); font-weight: 400; font-variant-numeric: tabular-nums; line-height: 1.2; }
.r4e-kpi span { font-size: .82rem; color: var(--muted); }
.r4e-meter { height: .55rem; border-radius: 999px; background: var(--track, #e8ecf2); overflow: hidden; margin-top: .45rem; }
.r4e-meter i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.r4e-chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; border-bottom: 1px solid var(--border); }
.r4e-chart span { flex: 1 1 0; min-width: 0; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.r4e-chart span.is-zero { background: var(--track, #e8ecf2); opacity: 1; }
.r4e-chart__axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: .3rem; }
.r4e-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.r4e-checklist li a, .r4e-checklist li span { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.r4e-checklist li::marker { content: none; }
.r4e-checklist i { flex: none; width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 2px solid var(--line-strong, #c4cdd9); display: grid; place-items: center; }
.r4e-checklist .is-done i { background: var(--ok); border-color: var(--ok); }
.r4e-checklist .is-done i::after { content: ""; width: .35rem; height: .6rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.r4e-checklist .is-done a, .r4e-checklist .is-done span { color: var(--muted); text-decoration: line-through; }

/* tables */
.r4e-table-wrap { overflow-x: auto; }
.r4e-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.r4e-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: .6rem .7rem; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--subtle, #fafbfd); }
.r4e-table td { padding: .6rem .7rem; border-bottom: 1px solid var(--line-soft, #eef1f5); vertical-align: top; }
.r4e-table tr:last-child td { border-bottom: 0; }
.r4e-table tbody tr:hover td { background: var(--subtle, #fafbfd); }
.r4e-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.r4e-table a { color: var(--text); font-weight: 600; text-decoration: none; }
.r4e-table a:hover { text-decoration: underline; }
.r4e-table .r4e-sub { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; }
.r4e-table input[type=checkbox] { width: 1.05rem; height: 1.05rem; }
.r4e-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .9rem 1rem; border-bottom: 1px solid var(--border); }
.r4e-filters input[type=search] { flex: 1 1 14rem; min-width: 0; }
.r4e-filters select, .r4e-filters input { padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: .9rem; background: var(--surface); }
.r4e-bulkbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .7rem 1rem; background: var(--subtle, #fafbfd); border-top: 1px solid var(--border); font-size: .9rem; }
.r4e-bulkbar select { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: .9rem; }
.r4e-pager { display: flex; gap: .35rem; justify-content: center; padding: .9rem; }
.r4e-pager a, .r4e-pager span { padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text); font-size: .88rem; }
.r4e-pager span { background: var(--select, var(--ink)); color: var(--select-text, #fff); border-color: var(--select, var(--ink)); }

/* forms */
.r4e-form { display: grid; gap: .25rem; }
.r4e-fields { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.r4e-fields--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 115px), 1fr)); }
.r4e-form > *, .r4e-fields > * { min-width: 0; } /* a long option in a select must not widen the form past a phone screen */
.r4e-fields__wide { grid-column: 1 / -1; }
.r4e-form .form-group { margin-bottom: .9rem; }
.r4e-form textarea.form-input { min-height: 6rem; }
.r4e-form .form-input, .r4e-card .form-input { width: 100%; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: var(--surface); color: var(--text); }
.r4e-card select.form-input { padding-right: 2rem; }
.r4e-check { display: flex; gap: .55rem; align-items: flex-start; margin: .35rem 0 .7rem; cursor: pointer; }
.r4e-check input { margin-top: .3rem; width: 1rem; height: 1rem; flex: none; }
.r4e-check small { display: block; color: var(--muted); }
.r4e-section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; margin: 1.5rem 0 .75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.r4e-section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.r4e-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: .5rem; align-items: center; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(6px); padding: .8rem 0; margin-top: .5rem; border-top: 1px solid var(--border); }
.r4e-savebar .r4e-help { margin: 0 auto 0 0; }
.r4e-repeat { display: grid; gap: .75rem; }
.r4e-repeat__item { border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; position: relative; background: var(--subtle, #fbfcfe); }
.r4e-repeat__item .r4e-remove { position: absolute; top: .55rem; right: .6rem; }
.r4e-types-table input { width: 100%; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
form:not([data-rc]) .r4e-rc-only, [data-rc] .r4e-uk-only { display: none; }
.r4e-fields__check { display: block; margin-top: .3rem; color: var(--muted); font-size: .8rem; }
.r4e-fields__check.is-ok { color: #15803d; }
.r4e-fields__note { margin: 0 0 1rem; padding: .6rem .8rem; border-radius: 8px; background: var(--subtle, #f1f5f9); font-size: .875rem; }
.req { color: var(--bad); }
.r4e-agree { display: flex; gap: .5rem; align-items: flex-start; margin-top: .25rem; }
.r4e-swatch { display: inline-flex; align-items: center; gap: .6rem; }
.r4e-swatch input[type=color] { width: 3rem; height: 2.5rem; border: 1px solid var(--border); border-radius: 10px; padding: .15rem; background: var(--surface); cursor: pointer; }
.r4e-imgpick { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.r4e-imgpick img { max-height: 70px; max-width: 220px; border: 1px solid var(--border); border-radius: 10px; padding: .3rem; background: #fff; }
.r4e-imgpick--hero img { max-height: 110px; max-width: 100%; padding: 0; }
.r4e-preview-frame { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.r4e-options-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.r4e-option-card { position: relative; display: block; cursor: pointer; }
.r4e-option-card input { position: absolute; opacity: 0; }
.r4e-option-card span { display: block; border: 2px solid var(--border); border-radius: 12px; padding: .75rem .9rem; font-weight: 600; }
.r4e-option-card small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.r4e-option-card input:checked + span { border-color: var(--select, var(--ink)); background: var(--subtle, #f6f8fb); }
.r4e-option-card input:focus-visible + span { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

/* the form builder */
.r4e-builder { display: grid; gap: 1.25rem; }
@media (min-width: 1080px) { .r4e-builder { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.r4e-builder__side { display: grid; gap: 1rem; }
@media (min-width: 1080px) { .r4e-builder__side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; } }
.r4e-step-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; }
.r4e-step-card__head { display: flex; gap: .5rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border); background: var(--subtle, #fafbfd); border-radius: var(--radius) var(--radius) 0 0; }
.r4e-step-card__head input { flex: 1; font: inherit; font-weight: 700; font-size: 1.05rem; border: 1px solid transparent; background: transparent; padding: .3rem .45rem; border-radius: 8px; min-width: 0; }
.r4e-step-card__head input:hover, .r4e-step-card__head input:focus { border-color: var(--border); background: var(--surface); }
.r4e-step-card__num { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ink); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; }
.r4e-flist { list-style: none; margin: 0; padding: .5rem; min-height: 3rem; display: grid; gap: .35rem; }
.r4e-flist:empty::before { content: "Drag questions here, or add one from the right."; color: var(--muted); font-size: .9rem; padding: .75rem; text-align: center; border: 1px dashed var(--border); border-radius: 10px; }
.r4e-fitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem; background: var(--surface); cursor: pointer; }
.r4e-fitem:hover { border-color: #b8c2d1; }
.r4e-fitem.is-open { border-color: var(--select, var(--ink)); box-shadow: 0 0 0 3px rgba(10, 17, 32, .06); cursor: default; }
.r4e-fitem.is-dragging { opacity: .4; }
.r4e-fitem__grip { cursor: grab; color: #9aa4b5; padding: .2rem; font-size: 1.1rem; line-height: 1; user-select: none; border: 0; background: none; }
.r4e-fitem__title { min-width: 0; }
.r4e-fitem__title b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r4e-fitem__title small { color: var(--muted); font-size: .8rem; }
.r4e-fitem__tags { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.r4e-fedit { grid-column: 1 / -1; border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .75rem; display: grid; gap: .6rem; cursor: default; }
.r4e-fedit label { font-size: .82rem; font-weight: 700; display: block; margin-bottom: .2rem; }
.r4e-fedit input[type=text], .r4e-fedit textarea, .r4e-fedit select { width: 100%; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: .92rem; }
.r4e-fedit__row { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.r4e-fedit__checks { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; }
.r4e-fedit__checks label { font-weight: 500; font-size: .9rem; display: inline-flex; gap: .35rem; align-items: center; margin: 0; }
.r4e-opts { display: grid; gap: .3rem; }
.r4e-opt { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem auto; gap: .35rem; align-items: center; }
.r4e-opt input { padding: .35rem .5rem !important; }
.r4e-palette { display: grid; gap: .35rem; }
.r4e-palette button { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 10px; padding: .5rem .7rem; background: var(--surface); font: inherit; font-size: .9rem; cursor: pointer; }
.r4e-palette button:hover { border-color: var(--select, var(--ink)); }
.r4e-palette button small { margin-left: auto; color: var(--muted); font-size: .78rem; }
.r4e-palette--types { grid-template-columns: 1fr 1fr; }
.r4e-palette--types button { font-size: .82rem; padding: .45rem .55rem; }
.r4e-builder__status { font-size: .88rem; color: var(--muted); }
.r4e-builder__status.is-dirty { color: var(--warn); font-weight: 600; }

/* report */
.r4e-report__summaries { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-bottom: 1.25rem; }
.r4e-report__summaries .r4e-card { margin: 0; }
.r4e-report__summaries h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .6rem; font-family: var(--font); font-weight: 800; }
.r4e-tally { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .75rem; font-size: .92rem; }
.r4e-tally b { font-variant-numeric: tabular-nums; text-align: right; }
.r4e-report h3.r4e-table-title { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
.r4e-report-list { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.r4e-report-list a { display: block; border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; text-decoration: none; color: var(--text); background: var(--surface); }
.r4e-report-list a:hover, .r4e-report-list a.is-active { border-color: var(--select, var(--ink)); }
.r4e-report-list a.is-active { box-shadow: 0 0 0 3px rgba(10, 17, 32, .07); }
.r4e-report-list b { display: block; }
.r4e-report-list small { color: var(--muted); }
.r4e-colpick { display: grid; gap: .25rem .75rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); font-size: .9rem; max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: .7rem .9rem; }
.r4e-colpick label { display: flex; gap: .4rem; align-items: center; }

/* messages */
.r4e-msglist { display: grid; gap: .6rem; }
.r4e-msg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; background: var(--surface); text-decoration: none; color: inherit; }
a.r4e-msg:hover { border-color: var(--muted); }
.r4e-msg b { display: block; }
.r4e-msg small { color: var(--muted); }
.r4e-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.r4e-tags button { border: 1px solid var(--border); background: var(--subtle, #f8fafc); color: var(--text); border-radius: 6px; padding: .15rem .45rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; cursor: pointer; }
.r4e-tags button:hover { border-color: var(--select, var(--ink)); }

/* check-in settings */
.r4e-qrbox { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1rem; align-items: center; }
.r4e-qrbox svg { width: 120px; height: 120px; display: block; border: 1px solid var(--border); border-radius: 10px; }
.r4e-qrpop > summary { list-style: none; cursor: pointer; }
.r4e-qrpop > summary::-webkit-details-marker { display: none; }
.r4e-qrpop__box { display: grid; gap: .4rem; justify-items: center; margin-top: .4rem; padding: .6rem; background: #fff; color: #0f172a; border: 1px solid var(--border); border-radius: 12px; width: 180px; font-size: .78rem; text-align: center; white-space: normal; }
.r4e-qrpop__box svg { width: 156px; height: 156px; display: block; }

/* billing choice */
.r4e-plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.r4e-plans > .r4e-card { align-content: start; }
.r4e-bands { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); margin: .75rem 0; }
.r4e-bands .r4e-option-card span b { display: block; font-size: 1.3rem; font-family: var(--display); font-weight: 400; }
.r4e-total { display: flex; justify-content: space-between; align-items: baseline; padding: .8rem 0; border-top: 1px solid var(--border); margin-top: .5rem; font-size: 1.05rem; }
.r4e-total b { font-size: 1.3rem; }
.r4e-ledger td:nth-child(2) { font-variant-numeric: tabular-nums; text-align: right; }

/* the verify screen */
.r4e-verify__resend { margin: 0 0 1rem; }
/* invoice */
.r4e-invoice { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; max-width: 52rem; }
.r4e-invoice__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.r4e-invoice__brand { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-size: 1.2rem; margin: 0 0 1rem; }
.r4e-invoice h1 { font-size: 1.8rem; margin: 0 0 .75rem; }
.r4e-invoice dl { margin: 0; display: grid; gap: .2rem; }
.r4e-invoice dl div { display: flex; gap: .75rem; }
.r4e-invoice dt { color: var(--muted); min-width: 8rem; }
.r4e-invoice dd { margin: 0; font-weight: 600; }
.r4e-invoice__seller { text-align: right; font-size: .92rem; line-height: 1.5; }
.r4e-invoice__buyer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .3rem; font-family: var(--font); font-weight: 700; }
.r4e-invoice__lines { margin: 1.5rem 0; }
.r4e-invoice__lines tfoot td { font-weight: 600; }
.r4e-invoice__note { font-size: .9rem; padding: .75rem 1rem; border-left: 3px solid var(--text); background: var(--subtle, #f8fafc); margin: 0 0 1.25rem; }
.r4e-invoice__total td { font-size: 1.1rem; border-top: 2px solid var(--text); }
@media print {
  .site-head, .site-foot, .r4e-noprint { display: none !important; }
  .site-main { padding: 0; }
  .r4e-invoice { border: 0; padding: 0; }
}

/* ------------------------------------------------------------ the Help centre (/help) */
.r4e-helpdesk .site-main { padding-top: 0; }
.help-hero { background: radial-gradient(700px 300px at 85% 0%, rgba(255, 122, 89, .18), transparent 70%), var(--ink); color: var(--ink-text); padding: 2.5rem 0 2.75rem; margin-bottom: 2rem; }
.help-hero--slim { padding: 1.1rem 0; }
.help-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 2.8rem); margin: 0 0 1.1rem; }
.help-search { display: flex; gap: .5rem; max-width: 40rem; }
.help-search input { flex: 1; min-width: 0; border: 0; border-radius: 999px; padding: .8rem 1.2rem; font: inherit; font-size: 1.02rem; background: #fff; color: var(--text); }
.help-search input:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.help-layout { display: grid; gap: 2rem; align-items: start; padding-bottom: 2rem; }
@media (min-width: 960px) { .help-layout:has(.help-nav) { grid-template-columns: 250px minmax(0, 1fr); } }
.help-nav { display: grid; gap: .2rem; font-size: .95rem; }
@media (min-width: 960px) { .help-nav { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; } }
.help-nav__home { font-weight: 600; text-decoration: none; color: var(--muted); margin-bottom: .5rem; }
.help-nav summary { cursor: pointer; font-weight: 700; padding: .4rem 0; }
.help-nav ul { list-style: none; margin: 0 0 .4rem; padding: 0 0 0 .6rem; border-left: 2px solid var(--border); }
.help-nav li a { display: block; padding: .3rem .6rem; text-decoration: none; color: var(--text); border-radius: 8px; }
.help-nav li a:hover { background: var(--subtle, #e9eef5); }
.help-nav li a[aria-current="page"] { background: var(--select, var(--ink)); color: var(--select-text, #fff); }
.help-main { min-width: 0; }
.help-title { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin: 0 0 .5rem; }
.help-summary { font-size: 1.12rem; color: var(--muted); margin: 0 0 1.25rem; }
.help-crumb { font-size: .9rem; margin: 0 0 .4rem; color: var(--muted); }
.help-crumb a { color: var(--muted); text-decoration: none; }
.help-crumb a:hover { color: var(--text); }
.help-article { max-width: 50rem; }
.help-toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.2rem; margin: 0 0 1.5rem; font-size: .95rem; }
.help-toc ul { margin: .4rem 0 0; padding-left: 1.1rem; display: grid; gap: .15rem; }
.help-body { font-size: 1.02rem; line-height: 1.7; }
.help-body h2 { font-size: 1.45rem; margin: 2.2rem 0 .6rem; scroll-margin-top: 90px; }
.help-body h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; scroll-margin-top: 90px; font-family: var(--font); font-weight: 700; }
.help-body ol, .help-body ul { padding-left: 1.4rem; }
.help-body li { margin: .25rem 0; }
.help-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; font-size: .86em; background: var(--code, #eef1f6); border: 1px solid var(--line-soft, #dfe4ec); border-radius: 6px; padding: .08rem .35rem; color: #1b2433; }
.help-code { margin: 1.2rem 0 1.4rem; border-radius: 12px; background: #0d1526; border: 1px solid #1f2a3d; overflow: hidden; box-shadow: var(--shadow); }
.help-code__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .4rem .5rem .4rem 1rem; background: #131d31; border-bottom: 1px solid #1f2a3d; }
.help-code__bar span { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8ea0bd; }
.help-code__copy { font: inherit; font-size: .78rem; font-weight: 600; color: #d6deeb; background: transparent; border: 1px solid #33415a; border-radius: 999px; padding: .2rem .75rem; cursor: pointer; }
.help-code__copy:hover, .help-code__copy:focus-visible { background: #1f2a3d; color: #fff; }
.help-code pre { margin: 0; padding: .95rem 1.1rem 1.05rem; overflow-x: auto; tab-size: 4; }
.help-code pre code { display: block; font-size: .85rem; line-height: 1.65; color: #e3e9f3; background: none; border: 0; padding: 0; white-space: pre; }
.help-body kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 0 .35rem; font-size: .85em; background: var(--surface); }
.help-shot { margin: 1.4rem 0; }
.help-shot img { display: block; margin: 0 auto; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); background: #fff; }
.help-shot figcaption { color: var(--muted); font-size: .88rem; margin-top: .5rem; text-align: center; }
.help-table { overflow-x: auto; margin: 1.2rem 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.help-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.help-table th { text-align: left; background: var(--subtle, #fafbfd); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.help-table th, .help-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line-soft, #eef1f5); vertical-align: top; }
.help-table tr:last-child td { border-bottom: 0; }
.help-callout { margin: 1.3rem 0; padding: .9rem 1.1rem; border-radius: 12px; border-left: 4px solid #2563eb; background: #eef4fe; }
.help-callout p { margin: 0 0 .4rem; }
.help-callout p:last-child { margin: 0; }
.help-callout__title { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.help-callout--tip { border-color: var(--ok); background: #ecf8f1; }
.help-callout--warning { border-color: var(--warn); background: #fff4dc; }
.help-callout--important { border-color: var(--accent-strong); background: #fff0eb; }
.help-related { margin: 2rem 0 0; padding: 1rem 1.2rem; border: 1px dashed var(--line-strong, #c4cdd9); border-radius: var(--radius); }
.help-related ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.help-pager { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.help-pager a { display: grid; text-decoration: none; color: var(--text); font-weight: 700; max-width: 48%; }
.help-pager small { color: var(--muted); font-weight: 500; }
.help-pager__next { text-align: right; margin-left: auto; }
.help-foot { color: var(--muted); font-size: .9rem; }
.help-sections { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.help-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem 1.4rem; scroll-margin-top: 90px; }
.help-section h2 { font-size: 1.25rem; margin: .4rem 0 .3rem; }
.help-section p { color: var(--muted); margin: 0 0 .6rem; font-size: .95rem; }
.help-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.help-section li a { text-decoration: none; font-weight: 600; }
.help-section li a:hover { text-decoration: underline; }
.help-hit { display: grid; gap: .15rem; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); margin-bottom: .6rem; }
.help-hit:hover { border-color: var(--select, var(--ink)); }
.help-hit small { color: var(--accent-strong); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.help-hit span { color: var(--muted); font-size: .92rem; }
.r4e-helplink { display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.r4e-helplink:hover { color: var(--text); }
.r4e-helplink svg { width: 1rem; height: 1rem; }

/* Voucher box (checkout forms) */
.r4e-voucher { margin: 1rem 0 .25rem; max-width: 30rem; }
.r4e-voucher__row { display: flex; gap: .5rem; align-items: center; }
.r4e-voucher__row .form-input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.r4e-voucher__row .form-input::placeholder { text-transform: none; letter-spacing: 0; }
.r4e-voucher__msg { margin: .4rem 0 0; font-size: .88rem; color: var(--muted); }
.r4e-voucher__msg.is-ok { color: #15803d; }
.r4e-voucher__msg.is-bad { color: #b91c1c; }
.r4e-price { font-style: normal; }
.r4e-price s { color: var(--muted); font-weight: 400; margin-right: .2rem; }
.r4e-option-card small.r4e-voucher__tag { color: #15803d; }
.r4e-option-card small.r4e-voucher__tag[hidden] { display: none; }

/* Team: invitations on the events list, the team table, roles */
.r4e-invite { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; background: #fff4ef; border: 1px solid #ffd2c2; border-radius: var(--radius); padding: .9rem 1.1rem; margin: 0 0 1rem; }
.r4e-invite strong { display: block; }
.r4e-invite span { color: var(--muted); font-size: .92rem; }
.r4e-table tr.is-muted td { opacity: .6; }
.r4e-inline-form { margin: 0; }
.form-input.form-input--sm { padding: .35rem .55rem; font-size: .88rem; width: auto; }
.r4e-roles { border: 0; padding: 0; margin: 0 0 1rem; }
.r4e-roles .r4e-check small { display: block; color: var(--muted); font-weight: 400; }
.r4e-dl { margin: 0; font-size: .92rem; }
.r4e-dl dt { font-weight: 700; }
.r4e-dl dd { margin: 0 0 .55rem; color: var(--muted); }

/* Yearly plan */
.r4e-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.r4e-ticks li { padding-left: 1.5rem; position: relative; }
.r4e-ticks li::before { content: '✓'; position: absolute; left: 0; color: #15803d; font-weight: 700; }
.r4e-history { list-style: none; padding: 0; margin: 0 0 .75rem; font-size: .92rem; }
.r4e-history li { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.r4e-history time { color: var(--muted); display: inline-block; min-width: 6.5rem; }
.r4e-bands.r4e-bands--plans { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.r4e-bands--plans .r4e-option-card small { display: block; }

/* Embed code */
.r4e-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; background: var(--subtle, #f8fafc); color: var(--text); }

/* The email editor (Quill) */
.r4e-editor { margin-bottom: .5rem; }
.r4e-editor .ql-toolbar.ql-snow { border: 1px solid var(--border); border-radius: 10px 10px 0 0; background: var(--subtle, #fafbfd); font-family: inherit; }
.r4e-editor .ql-container.ql-snow { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; font: inherit; font-size: 1rem; }
.r4e-editor .ql-editor { min-height: 16rem; line-height: 1.6; }
.r4e-editor .ql-editor p { margin: 0 0 .9em; }
.r4e-editor .ql-editor h2, .r4e-editor .ql-editor h3 { margin: .6em 0 .4em; }
.r4e-editor .ql-snow .ql-tooltip { z-index: 5; }
.r4e-editor .ql-snow .ql-tooltip input[type=text] { width: 16rem; }

/* Limit by email address (Details tab) */
.r4e-details { margin: .25rem 0 1rem; border: 1px solid var(--border); border-radius: 10px; padding: .6rem .85rem; }
.r4e-details > summary { cursor: pointer; font-weight: 700; font-size: .92rem; }
.r4e-details[open] > summary { margin-bottom: .6rem; }

/* Settings in sections (the Details tab): a menu beside the sections, one shown at a time */
.r4e-settings { display: grid; gap: 1.25rem; align-items: start; }
.r4e-settings__nav { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: .25rem; }
.r4e-settings__nav a { flex: 0 0 auto; display: block; padding: .55rem .8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: inherit; text-decoration: none; }
.r4e-settings__nav a b { display: block; font-size: .9rem; }
.r4e-settings__nav a small { display: block; color: var(--muted); font-size: .76rem; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r4e-settings__nav a:hover { border-color: color-mix(in srgb, var(--accent, #ff7a59) 50%, var(--border)); }
.r4e-settings__nav a.is-active { border-color: var(--accent, #ff7a59); box-shadow: inset 3px 0 0 var(--accent, #ff7a59); background: color-mix(in srgb, var(--accent, #ff7a59) 6%, var(--surface)); }
.r4e-settings__panels { min-width: 0; }
.r4e-settings.is-js .r4e-panel[hidden] { display: none; }
.r4e-panel { margin-bottom: 1rem; }
.r4e-panel__title { font-size: 1.25rem; margin: 0 0 .9rem; }
.r4e-panel__title:focus { outline: none; }
.r4e-panel__intro { margin: -.5rem 0 1rem; }
.r4e-panel__sub { font-size: 1rem; margin: 1.4rem 0 .6rem; padding-top: 1rem; border-top: 1px solid var(--border); }
@media (min-width: 900px) {
  .r4e-settings { grid-template-columns: 15rem minmax(0, 1fr); }
  .r4e-settings__nav { flex-direction: column; overflow: visible; position: sticky; top: 84px; }
  .r4e-settings__nav a small { max-width: none; }
}

/* A report table's heading with its Copy to paste button */
.r4e-table-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.r4e-table-head .r4e-table-title { margin-right: auto; }

/* Form builder: the ready-made questions picker */
.r4e-picker { width: min(36rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem 1.5rem; background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(10, 17, 32, .25); }
.r4e-picker::backdrop { background: rgba(10, 17, 32, .45); }
.r4e-picker h2 { font-size: 1.3rem; margin: 0 0 .35rem; }
.r4e-picker__bulk { display: flex; gap: .4rem; margin: .75rem 0 .5rem; }
.r4e-picker__list { display: grid; gap: .1rem; max-height: 46vh; overflow-y: auto; padding: .25rem .1rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.r4e-picker__list .r4e-check { margin: .25rem 0; }
.r4e-picker__list .r4e-check small { display: block; color: var(--muted); font-weight: 400; }
.r4e-picker__list .r4e-check.is-done { opacity: .55; }
.r4e-picker__step { margin: 1rem 0 0; }
.r4e-picker__actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.r4e-fitem.is-new { animation: r4e-new 2.4s ease-out 1; }
@keyframes r4e-new { 0%, 40% { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .r4e-fitem.is-new { animation: none; outline: 2px solid var(--accent); } }
/* File pickers: the browser's button, in the dashboard's style */
input[type=file] { font: inherit; font-size: .88rem; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: .9rem; margin-right: .8rem; padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
input[type=file]::file-selector-button:hover { border-color: var(--accent); background: var(--accent-soft); }
input[type=file]:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; border-radius: 999px; }

/* Design tab: sponsors - a row each, and a drop zone for adding several at once */
.r4e-sponsors { display: grid; gap: .55rem; margin: 0 0 .8rem; }
.r4e-sponsor { display: grid; grid-template-columns: 6rem minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: .6rem .8rem; background: var(--surface); }
.r4e-sponsor > img { width: 6rem; height: 3.3rem; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--border); padding: .25rem; }
.r4e-sponsor__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .4rem .8rem; min-width: 0; }
.r4e-sponsor__field { display: grid; gap: .2rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.r4e-sponsor__field i { font-style: normal; font-weight: 400; }
.r4e-sponsor__field .form-input { padding: .45rem .6rem; font-size: .9rem; }
.r4e-sponsor__remove { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.r4e-sponsor.is-removing { opacity: .5; border-style: dashed; }
.r4e-sponsor--new { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface)); }
@media (max-width: 620px) { .r4e-sponsor { grid-template-columns: 4.5rem minmax(0, 1fr); } .r4e-sponsor > img { width: 4.5rem; } .r4e-sponsor > :last-child { grid-column: 1 / -1; justify-self: start; } }
.r4e-dropzone { position: relative; display: flex; align-items: center; gap: .9rem; border: 2px dashed color-mix(in srgb, var(--accent) 55%, var(--border)); border-radius: 12px; padding: .9rem 1rem; cursor: pointer; background: var(--surface); transition: background .15s, border-color .15s; }
.r4e-dropzone:hover, .r4e-dropzone.is-over, .r4e-dropzone:focus-within { background: var(--accent-soft); border-color: var(--accent); }
.r4e-dropzone[hidden] { display: none; }
.r4e-dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.r4e-dropzone__plus { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.r4e-dropzone b { display: block; }
.r4e-dropzone small { display: block; color: var(--muted); font-size: .82rem; }

/* Unsaved changes: a dot and a word until the form is saved */
.r4e-dirty { display: inline-flex; align-items: center; gap: .45rem; color: var(--warn); font-weight: 600; font-size: .9rem; margin-right: auto; }
.r4e-dirty::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.r4e-dirty[hidden] { display: none; }
form.is-dirty .r4e-savebar .btn--primary, form.is-dirty > div > .btn--primary { box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------------------------------------------------------------- The guided demo (/demo, r4e-demo.js) */
.demo-hero { background: radial-gradient(700px 300px at 85% 0%, rgba(255, 122, 89, .18), transparent 70%), var(--ink); color: var(--ink-text); padding: 1.8rem 0 1.9rem; margin-bottom: 1.5rem; }
.demo-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 2.7rem); margin: 0 0 .7rem; max-width: 40rem; }
.demo-hero__lead { max-width: 46rem; margin: 0; color: var(--ink-text); opacity: .9; font-size: 1.05rem; }
.demo { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-bottom: 2.5rem; }
.demo > * { min-width: 0; }
.demo__panel { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .9rem; }
.demo__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.demo__steps button { width: 100%; display: flex; align-items: center; gap: .65rem; text-align: left; background: none; border: 0; border-radius: 10px; padding: .4rem .55rem; font: inherit; font-size: .95rem; color: var(--muted); cursor: pointer; }
.demo__steps button:hover { background: var(--surface); color: var(--text); }
.demo__num { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; border: 2px solid var(--border); background: var(--surface); color: var(--muted); }
.demo__steps .is-now button { color: var(--text); font-weight: 700; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.demo__steps .is-now .demo__num { border-color: var(--accent); background: var(--accent); color: #fff; }
.demo__steps .is-done .demo__num { border-color: #16a34a; background: #16a34a; color: #fff; font-size: 0; }
.demo__steps .is-done .demo__num::after { content: "\2713"; font-size: .85rem; }
.demo__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.25rem; box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .35); }
.demo__card h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
.demo__text p { margin: 0 0 .7rem; font-size: .97rem; line-height: 1.55; }
.demo__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.demo__actions:empty { display: none; }
.demo__badge { margin-top: .9rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.demo__badge iframe { display: block; width: 100%; height: 330px; border: 0; transform-origin: 0 0; }
.demo__note { display: flex; gap: .5rem; align-items: flex-start; margin: 0; font-size: .85rem; color: var(--muted); }
.demo__note svg { flex: none; width: 1.1rem; height: 1.1rem; margin-top: .1rem; color: #16a34a; }
.demo__browser { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px -30px rgba(15, 23, 42, .45); }
.demo__chrome { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; background: var(--subtle, #eef2f7); border-bottom: 1px solid var(--border); }
.demo__dots { display: inline-flex; gap: .35rem; }
.demo__dots i { width: .7rem; height: .7rem; border-radius: 50%; background: #cbd5e1; }
.demo__url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; color: var(--muted); }
.demo__nav { flex: none; display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 .6rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
.demo__nav svg { width: 1rem; height: 1rem; }
.demo__frame { display: block; width: 100%; height: min(78vh, 820px); min-height: 560px; border: 0; background: #fff; }
.demo-cta { background: var(--surface); border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; text-align: center; }
.demo-cta h2 { margin: 0 0 .5rem; }
.demo-cta p { color: var(--muted); max-width: 38rem; margin: 0 auto 1rem; }
.demo-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
@media (max-width: 900px) {
  .demo { grid-template-columns: 1fr; }
  .demo__panel { position: static; }
  .demo__steps { display: flex; overflow-x: auto; gap: .3rem; padding-bottom: .2rem; }
  .demo__steps li { flex: none; }
  .demo__steps button { white-space: nowrap; }
  .demo__frame { height: 75vh; min-height: 480px; }
}
.help-hero__demo { margin: .9rem 0 0; color: var(--ink-text); opacity: .9; }
.help-hero__demo a { color: #fff; font-weight: 600; }
.demo__mbar { display: none; }
@media (max-width: 900px) {
  .demo__mbar { display: flex; align-items: center; gap: .6rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, .4); }
  .demo__mbar-step { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; font-size: .95rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
  .demo__mbar-step::after { content: " \2191"; color: var(--muted); font-weight: 400; }
  body.r4e-demo { padding-bottom: 4.5rem; }
}

/* ---------------------------------------------------------------- The badge builder (Badges tab) */
.r4e-badgebuilder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 1.25rem; align-items: start; }
.r4e-badgebuilder > * { min-width: 0; }
.r4e-badgebuilder .r4e-card { margin-bottom: 1rem; }
.r4e-badgepreview { position: sticky; top: 5.25rem; }
.r4e-badgepreview__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.r4e-badgepreview__frame { display: block; width: 100%; height: 640px; border: 1px solid var(--border); border-radius: 10px; background: #f3f4f6; }
.r4e-colour-input { height: 2.6rem; padding: .25rem; cursor: pointer; }
/* Design tab: the logos for light and dark backgrounds, each shown on its background */
.r4e-logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; margin-bottom: .6rem; }
.r4e-logos__one { min-width: 0; }
.r4e-logos__show { height: 96px; border-radius: 10px; border: 1px solid var(--border); display: grid; place-items: center; padding: .7rem; margin-bottom: .5rem; }
.r4e-logos__show img { max-height: 100%; max-width: 100%; object-fit: contain; }
.r4e-logos__show span { font-size: .85rem; opacity: .6; }
.r4e-logos__show--light { background: #fff; color: #111827; }
.r4e-logos__show--dark { background: #111827; color: #fff; border-color: #111827; }
.r4e-colour-input:disabled { opacity: .35; cursor: not-allowed; }
.r4e-subhead { font-size: .95rem; margin: 1rem 0 .5rem; }
.r4e-badge-type { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.r4e-badge-type .r4e-colour-input { width: 4.5rem; flex: none; }
.r4e-options-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
@media (max-width: 1100px) { .r4e-badgebuilder { grid-template-columns: 1fr; } .r4e-badgepreview { position: static; order: -1; } .r4e-badgepreview__frame { height: 460px; } }

/* The Kiosk tab: the look on the left, the real kiosk in a tablet on the right */
.r4e-kioskbuilder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.25rem; align-items: start; }
.r4e-kioskbuilder > * { min-width: 0; }
.r4e-kioskbuilder .r4e-card { margin-bottom: 1rem; }
.r4e-kioskpreview { position: sticky; top: 5.25rem; }
.r4e-kioskpreview__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.r4e-kioskpreview__turn { display: inline-flex; }
.r4e-kioskpreview__turn .btn { border-radius: 0; }
.r4e-kioskpreview__turn .btn:first-child { border-radius: 8px 0 0 8px; }
.r4e-kioskpreview__turn .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.r4e-kioskpreview__turn .btn[aria-pressed="true"], .r4e-kioskpreview__screens button[aria-pressed="true"] { background: var(--select, var(--ink)); border-color: var(--select, var(--ink)); color: var(--select-text, #fff); }
.r4e-kioskpreview__screens { display: flex; flex-wrap: wrap; gap: .35rem; margin: .8rem 0; }
.r4e-kioskpreview__screens button { border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 999px; padding: .3rem .8rem; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.r4e-tablet { background: #1b1f27; border-radius: 22px; padding: 14px; box-shadow: 0 12px 30px -16px rgba(15,20,28,.55); }
.r4e-tablet.is-portrait { width: fit-content; max-width: 100%; margin: 0 auto; }
.r4e-tablet__screen { position: relative; overflow: hidden; border-radius: 8px; background: #0f141c; margin: 0 auto; }
.r4e-tablet__screen iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; display: block; }
.r4e-tablet__keys { position: absolute; left: 0; right: 0; bottom: 0; background: #d5d8de; display: grid; grid-template-rows: repeat(4, 1fr); row-gap: 7px; padding: 10px 3%; }
.r4e-tablet__keys[hidden] { display: none; }
.r4e-tablet__row { display: flex; justify-content: center; gap: 1.2%; }
.r4e-tablet__row i { flex: 0 1 8.4%; background: #fff; border-radius: 4px; box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.r4e-tablet__row i.is-space { flex-basis: 40%; }
@media (max-width: 1100px) { .r4e-kioskbuilder { grid-template-columns: 1fr; } .r4e-kioskpreview { position: static; order: -1; } }

/* Your sending address: how it works, before an address is entered */
.r4e-steps { margin: 0 0 .6rem; padding-left: 1.35rem; display: grid; gap: .35rem; font-size: .92rem; color: var(--muted); }
.r4e-steps b { color: var(--text); }
.r4e-sender { border-top: 1px solid var(--border); padding: .9rem 0; }
.r4e-sender:first-of-type { border-top: 0; padding-top: 0; }
.r4e-sender__head { margin: 0 0 .35rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.r4e-sender .r4e-actions form { display: inline; margin: 0; }

/* Dark mode (the theme's switch): the coloured pills, callouts and boxes, and the email editor's toolbar */
[data-theme="dark"] .r4e-pill.is-warn, [data-theme="dark"] .r4e-pill.is-draft, [data-theme="dark"] .r4e-pill.is-pending, [data-theme="dark"] .r4e-pill.is-waitlist { background: #3a2a10; color: #f5d9a0; }
[data-theme="dark"] .r4e-pill.is-bad, [data-theme="dark"] .r4e-pill.is-cancelled { background: #3a1a1d; color: #f5b4b4; }
[data-theme="dark"] .r4e-pill.is-invited, [data-theme="dark"] .r4e-pill.is-unconfirmed { background: #172a4d; color: #bcd0f7; }
[data-theme="dark"] .r4e-pill { background: var(--track); color: var(--text); }
[data-theme="dark"] .r4e-pill.is-ok, [data-theme="dark"] .r4e-pill.is-open, [data-theme="dark"] .r4e-pill.is-registered { background: #12301f; color: #b9ecd0; }
[data-theme="dark"] .r4e-pill.is-test { background: #2a1d47; color: #d6c2fb; }
[data-theme="dark"] .help-callout { background: #14263f; }
[data-theme="dark"] .help-callout--tip { background: #12301f; }
[data-theme="dark"] .help-callout--warning { background: #3a2a10; }
[data-theme="dark"] .help-callout--important { background: #3a1f17; }
[data-theme="dark"] .r4e-invite { background: #2e1d17; border-color: #5c3324; }
[data-theme="dark"] .r4e-email-preview__frame, [data-theme="dark"] .r4e-badgepreview__frame { background: #e9edf3; }
[data-theme="dark"] .r4e-editor .ql-snow .ql-stroke { stroke: var(--text); }
[data-theme="dark"] .r4e-editor .ql-snow .ql-fill { fill: var(--text); }
[data-theme="dark"] .r4e-editor .ql-snow .ql-picker { color: var(--text); }
[data-theme="dark"] .r4e-editor .ql-snow .ql-picker-options { background: var(--surface); }
[data-theme="dark"] .r4e-editor .ql-container.ql-snow { border-color: var(--border); }

/* A picked image, shown before it's saved (r4e-ui.js) */
.r4e-unsaved { display: inline-block; margin: .35rem 0 0; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--accent-soft, rgba(255, 122, 89, .16)); color: var(--accent-strong, #b4380f); }

/* Notifications tab: a phone-style preview of the notification */
.r4e-notice-preview { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .9rem; border-radius: 14px; background: var(--subtle, #f4f4f5); border: 1px solid var(--border); max-width: 24rem; }
.r4e-notice-preview__icon { width: 2.2rem; height: 2.2rem; flex: none; border-radius: 9px; background: var(--surface, #fff); border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.r4e-notice-preview__icon img { max-width: 85%; max-height: 85%; object-fit: contain; }
.r4e-notice-preview > span:last-child { display: grid; gap: .1rem; min-width: 0; font-size: .9rem; line-height: 1.35; }
.r4e-notice-preview b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r4e-notice-preview b + span { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* The setup guide's step bar (partials/r4e-guide, Guide) */
.r4e-guide { border: 1px solid var(--accent, #ff7a59); border-left-width: 4px; border-radius: 12px; background: var(--surface); padding: .9rem 1.1rem 1rem; margin: 0 0 1.5rem; }
.r4e-guide__head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .35rem; }
.r4e-guide__badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent, #ff7a59); }
.r4e-guide__count { font-size: .85rem; color: var(--muted); }
.r4e-guide__tick { color: var(--ok); font-weight: 600; }
.r4e-guide__bar { flex: 1 1 6rem; min-width: 4rem; height: 6px; border-radius: 3px; background: var(--track, #e6ebf1); overflow: hidden; }
.r4e-guide__bar i { display: block; height: 100%; background: var(--accent, #ff7a59); }
.r4e-guide__off { margin-left: auto; }
.r4e-guide__title { font-size: 1.15rem; margin: 0 0 .25rem; }
.r4e-guide__text { margin: 0 0 .75rem; color: var(--text); max-width: 52rem; }
.r4e-guide__nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.r4e-guide__all { margin-left: auto; font-size: .9rem; }
.r4e-guide__all summary { cursor: pointer; color: var(--muted); }
.r4e-guide__all ol { margin: .5rem 0 0; padding-left: 1.3rem; display: grid; gap: .2rem; }
.r4e-guide__all li.is-done a { color: var(--muted); text-decoration: line-through; }
.r4e-guide__all li.is-here a { font-weight: 700; color: var(--text); }
@media (max-width: 720px) { .r4e-guide__all { margin-left: 0; width: 100%; } .r4e-guide__off { margin-left: 0; } }

/* "Is this event ready to go live?" (partials/r4e-ready, Readiness) */
.r4e-ready.is-blocked { border-color: var(--warn, #d97706); }
.r4e-ready.is-ready { border-color: var(--ok); }
.r4e-ready .r4e-ready__h { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .9rem 0 .45rem; }
.r4e-checklist--detail li a { align-items: flex-start; }
.r4e-checklist--detail li a i { margin-top: .1rem; }
.r4e-checklist.r4e-checklist--detail li a > span { display: grid; gap: .15rem; }
.r4e-checklist.r4e-checklist--detail { gap: .65rem; }
.r4e-checklist--detail small { color: var(--muted); font-weight: 400; }
.r4e-ready.is-blocked .r4e-checklist--detail:first-of-type i { border-color: var(--warn, #d97706); }
.r4e-ready__done { margin-top: .9rem; font-size: .9rem; }
.r4e-ready__done summary { cursor: pointer; color: var(--muted); }
.r4e-ready__done ul { margin-top: .5rem; }
