/* Services, inside a group's Membergate pages: the Portico look (onyx and grey on paper, one signal blue, Geist),
   with the group's own --brand and --accent. One memorable thing per screen — on a service, the group's seats filling. */
:root {
  --paper: #F6F6F7; --surface: #FFFFFF; --sunk: #EFEFF1; --line: #E4E4E7; --line-2: #D4D4D8; --line-strong: #8E8E97;
  --ink: #0A0A0B; --ink-2: #5C5C66; --ink-3: #6B6B75;
  --signal: #3651D4; --signal-soft: #E8ECFB;
  --ok: #17784A; --ok-soft: #E3F2EA; --warn: #95590A; --warn-soft: #F8EEDD; --bad: #B3261E; --bad-soft: #FAE6E4;
  --brand: #0A0A0B; --accent: var(--signal);
  --radius: 14px; --radius-sm: 9px;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0 0 .45em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.15rem); letter-spacing: -.03em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: .86rem; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 14px; }

/* ---------- Top bar: the group first ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.org { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.org .logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.org b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.org span { color: var(--ink-3); font-size: .86rem; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button { white-space: nowrap; text-decoration: none; padding: 7px 11px; border-radius: 8px; color: var(--ink-2); font-size: .92rem; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--sunk); color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--sunk); }
.bell { position: relative; }
.bell i { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font: 600 10px/16px var(--sans); text-align: center; font-style: normal; padding: 0 4px; }
@media (max-width: 720px) { .top .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; } .nav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; } .org b { max-width: 22ch; } }

main { padding: 28px 0 64px; }
.head { margin-bottom: 22px; }
.head p { color: var(--ink-2); max-width: 64ch; margin: 0; }
.crumb { font-size: .86rem; color: var(--ink-3); margin-bottom: 8px; }
.crumb a { color: var(--ink-3); }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.tight { padding: 14px 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > .tile + .tile { margin-top: 0; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.note { background: var(--sunk); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--ink-2); font-size: .92rem; }
.note.warn { background: var(--warn-soft); color: #5e3906; }
.note.ok { background: var(--ok-soft); color: #0f4d30; }
.note.bad { background: var(--bad-soft); color: #7a1a14; }
.flash { margin-bottom: 18px; }

/* ---------- Buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font: 500 .94rem var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #2A2A2E; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn.signal { background: var(--signal); border-color: var(--signal); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: #e7b7b2; }
.btn.small { padding: 6px 11px; font-size: .86rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: .82rem; color: var(--ink-3); margin-top: 4px; }
.field .error { font-size: .82rem; color: var(--bad); margin-top: 4px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); background: #fffafa; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=datetime-local], input[type=time], input[type=number], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; min-height: 40px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
input.caps { text-transform: uppercase; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--ink); }
.inline { display: inline; }
fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- Data ---------- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: .82rem; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.table-wrap { overflow-x: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.signal { background: var(--signal-soft); color: var(--signal); }
dl.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 8px 16px; margin: 0; font-size: .93rem; }
dl.kv dt { color: var(--ink-3); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.stat b { display: block; font-size: 1.6rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-3); font-size: .86rem; }
.money-lines { width: 100%; }
.money-lines td { padding: 8px 0; }
.money-lines td.r { padding-left: 14px; white-space: nowrap; }
.money-lines tr.total td { font-weight: 600; border-top: 1px solid var(--ink); border-bottom: 0; padding-top: 10px; }
.money-lines .who { color: var(--ink-3); font-size: .82rem; display: block; }

/* ---------- The group's seats: the threshold, as a roll that fills ---------- */
.seats { display: grid; grid-template-columns: repeat(10, minmax(0, 44px)); gap: 8px; margin: 16px 0 12px; }
@media (max-width: 600px) { .seats { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; } }
.seat { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--line-strong); position: relative; display: grid; place-items: center; font: 600 11px var(--sans); color: var(--ink-3); }
.seat.filled { border: 0; background: var(--brand); color: #fff; }
.seat.filled.paid { background: var(--ok); }
.seat.me { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.seats-more { font: 600 .9rem var(--sans); color: var(--ink-2); }
.meter-line { font-size: 1.05rem; }
.meter-line b { font-size: 2.6rem; letter-spacing: -.04em; font-weight: 600; font-variant-numeric: tabular-nums; vertical-align: -6px; margin-right: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .seat.filled.fresh { animation: seat-in .5s cubic-bezier(.2,.8,.2,1.2) both; animation-delay: calc(var(--i) * 45ms); }
  @keyframes seat-in { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- Steps of an application ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 0 0 18px 34px; color: var(--ink-3); }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font: 600 11px var(--sans); background: var(--surface); }
.steps li::after { content: ''; position: absolute; left: 11px; top: 24px; bottom: 2px; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { content: '✓'; background: var(--ink); border-color: var(--ink); color: #fff; }
.steps li.now { color: var(--ink); font-weight: 500; }
.steps li.now::before { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--signal-soft); }
.steps small { display: block; font-weight: 400; color: var(--ink-3); }

/* ---------- Service tiles and console items ---------- */
.tile { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: inherit; }
a.tile:hover { border-color: var(--ink); }
.tile .kind { display: flex; align-items: center; gap: 10px; }
.glyph { width: 38px; height: 38px; border-radius: 10px; background: var(--sunk); display: grid; place-items: center; flex: none; }
.glyph svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { margin: 0; }
.tile p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.tile .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-3); }
.bar { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.item b { display: block; font-weight: 500; }
.item .sub { color: var(--ink-3); font-size: .86rem; }
a.item:hover b { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.empty { text-align: left; padding: 22px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-2); }
.empty h3 { color: var(--ink); }
.policy-card { background: var(--brand); color: #fff; border-radius: 18px; padding: 22px; position: relative; overflow: hidden; }
.policy-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 28px solid rgba(255,255,255,.07); }
.policy-card .label { color: rgba(255,255,255,.66); font-size: .82rem; }
.policy-card .big { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.policy-card .mono { color: #fff; }
.policy-card dl.kv dt { color: rgba(255,255,255,.62); }

/* ---------- The application form, laid out like the paper form ---------- */
.formsheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.formsheet header { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: center; }
.formsheet header .seal { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font: 700 11px var(--sans); flex: none; }
.formsheet header h2 { margin: 0; }
.formsheet section { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.formsheet section:last-of-type { border-bottom: 0; }
.formsheet section > h3 { color: var(--ink-2); font-weight: 500; margin-bottom: 12px; }
.formsheet .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
@media (max-width: 640px) { .formsheet .pair { grid-template-columns: 1fr; } }
.sticky-side { position: sticky; top: 76px; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; background: conic-gradient(var(--ink) calc(var(--p) * 1%), var(--sunk) 0); display: grid; place-items: center; flex: none; }
.ring span { width: 66px; height: 66px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 600 1.1rem var(--sans); font-variant-numeric: tabular-nums; }
.ring.sm { width: 44px; height: 44px; }
.ring.sm span { width: 34px; height: 34px; font-size: .68rem; }
.missing-list { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: .88rem; }
.photo-drop { display: flex; gap: 14px; align-items: center; }
.photo-drop .ph { width: 84px; height: 104px; border-radius: 8px; border: 1px dashed var(--line-strong); background: var(--sunk) center/cover no-repeat; flex: none; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 12px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }

footer.foot { border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--ink-3); font-size: .84rem; }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media print { .top, footer.foot, .no-print { display: none !important; } body { background: #fff; } }

/* ================= Events ================= */
/* The event page: the date, big, in the group's colour. */
.hero { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 28px; align-items: start; margin: 8px 0 28px; }
.datebox { background: var(--brand); color: #fff; border-radius: 18px; padding: 16px 0 14px; text-align: center; }
.datebox .m { font-size: .82rem; letter-spacing: .04em; opacity: .8; }
.datebox .d { font-size: 3.2rem; font-weight: 600; line-height: 1; letter-spacing: -.04em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.datebox .y { font-size: .82rem; opacity: .8; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -.035em; margin-bottom: 10px; }
.hero .meta { color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 640px) { .hero { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; } .datebox .d { font-size: 2.2rem; } }
.tickets .tk { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; }
.tickets .tk + .tk { margin-top: 8px; }
.tickets .tk:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.tickets .tk input { accent-color: var(--ink); width: 18px; height: 18px; }
.tickets .tk.off { opacity: .5; cursor: not-allowed; }
.code-box { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 14px; }
.sponsor-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sponsor-wall .sw { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); text-align: center; min-height: 86px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.sponsor-wall img { max-height: 40px; margin: 0 auto; object-fit: contain; }
.agenda .slot { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.agenda .slot:last-child { border-bottom: 0; }
.agenda time { font-variant-numeric: tabular-nums; font-weight: 600; }

/* The pass: a ticket stub with a perforation; QR above, the 8-digit code below for phones without a camera. */
.pass { max-width: 420px; margin: 0 auto; background: var(--surface); border-radius: 22px; border: 1px solid var(--line); overflow: hidden; }
.pass .band { background: var(--brand); color: #fff; padding: 18px 22px 20px; }
.pass .band .who { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.pass .band .what { opacity: .82; font-size: .92rem; }
.pass .qr { padding: 22px 22px 10px; display: grid; place-items: center; }
.pass .qr svg { width: 230px; height: 230px; }
.pass .perf { position: relative; border-top: 2px dashed var(--line-2); margin: 10px 0; }
.pass .perf::before, .pass .perf::after { content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.pass .perf::before { left: -12px; } .pass .perf::after { right: -12px; }
.pass .entry { text-align: center; padding: 8px 22px 22px; }
.pass .entry .digits { font: 600 2.4rem/1 var(--mono); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.pass .entry .lbl { color: var(--ink-3); font-size: .84rem; margin-top: 6px; }
.pass .stamp { margin: 0 22px 18px; padding: 10px 12px; border-radius: 10px; text-align: center; font-weight: 600; }
.pass .stamp.in { background: var(--ok-soft); color: var(--ok); }
.pass .stamp.due { background: var(--warn-soft); color: var(--warn); }

/* Sponsor pipeline */
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pipe .col { background: var(--sunk); border-radius: 14px; padding: 10px; min-height: 120px; }
.pipe .col h3 { font-size: .86rem; color: var(--ink-2); margin: 2px 4px 10px; display: flex; justify-content: space-between; }
.pipe .sc { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: inherit; }
.pipe .sc + .sc { margin-top: 8px; }
.pipe .sc:hover { border-color: var(--ink); }
.pipe .sc b { display: block; font-weight: 500; }
.pipe .sc .sub { display: block; color: var(--ink-3); font-size: .82rem; }
@media (max-width: 900px) { .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rate td.r { white-space: nowrap; }
.slots { display: inline-flex; gap: 3px; vertical-align: middle; }
.slots i { width: 9px; height: 9px; border-radius: 2px; background: var(--line-2); }
.slots i.sold { background: var(--brand); }

/* Door */
.scanner { position: relative; aspect-ratio: 1; max-width: 420px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #0A0A0B; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame { position: absolute; inset: 18%; border-radius: 18px; box-shadow: 0 0 0 999px rgba(10,10,11,.45); outline: 2px solid rgba(255,255,255,.85); }
.keypad input { font: 600 1.6rem var(--mono); letter-spacing: .12em; text-align: center; min-height: 56px; }
.big-count { font-size: 3rem; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }

/* Small bar chart of registrations by day */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 64px; }
.spark i { flex: 1; background: var(--brand); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.alert:last-child { border-bottom: 0; }
.alert .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); margin-top: 7px; flex: none; }
.alert.warn .dot { background: var(--warn); } .alert.bad .dot { background: var(--bad); }
.builder .opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; font-weight: 400; margin: 0; }
.builder .opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.builder .opt input { margin-top: 3px; accent-color: var(--ink); }
.builder .opt b { display: block; font-weight: 500; }
.builder .opt span span { color: var(--ink-3); font-size: .86rem; }

/* Builders */
.builders-grid .pick { text-decoration: none; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.builders-grid .pick:hover { border-color: var(--ink); }
.kv.sizing dt { color: var(--ink-3); }
.vendor-cat { border-top: 1px solid var(--line); padding: 10px 0; }
.vendor-cat summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.vendor-cat summary::-webkit-details-marker { display: none; }
.vendor-cat[open] summary { margin-bottom: 8px; }

/* Escrow, pledges, deck, landing */
.escrow-booking { border-top: 1px solid var(--line); padding: 12px 0; }
.escrow-booking details summary::-webkit-details-marker { display: none; }
.bar { height: 10px; border-radius: 6px; background: var(--sunk); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok, #1f8a5a); border-radius: 6px; }
.deck-cover { padding: 28px 0 18px; }
.deck-cover h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 6px 0; letter-spacing: -.02em; }
.deck-when { color: var(--ink-2); margin: 0 0 18px; }
.deck-stats > div { border-top: 2px solid var(--ink); padding-top: 8px; }
.deck-stats b { display: block; font-size: 1.6rem; }
.deck-stats span { color: var(--ink-3); font-size: .86rem; }
.deck section { margin-top: 16px; }
.deck-pkg h3 { margin: 0; }
.deck-price { font-size: 1.3rem; font-weight: 600; margin: 4px 0 10px; }
.deck-pkg ul { margin: 0 0 10px; padding-left: 18px; }
.landing { padding: 36px 0 8px; max-width: 720px; }
.landing h1 { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.02em; margin: 0 0 12px; }
.landing .lead { font-size: 1.1rem; color: var(--ink-2); margin: 0 0 20px; }
@media print { .top, .foot, .tabs, .crumb, .no-print, .flash, nav { display: none !important; } body { background: #fff; } .card { break-inside: avoid; border-color: #ccc; } .deck-cover { padding-top: 0; } }
.item .grow .sub { display: block; }
@media (max-width: 640px) {
  .item.stack-sm { flex-wrap: wrap; }
  .item.stack-sm .grow { flex-basis: 100%; }
  .item.stack-sm form.row { flex: 1; }
}

/* The planning room */
.room-head { display: grid; gap: 12px; }
.room-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.room-facts > div { display: grid; gap: 2px; }
.room-facts b { font-size: 1.6rem; font-weight: 600; letter-spacing: -.03em; }
.room-theme { margin: 0; font-weight: 600; font-size: 1.05rem; }
@media (max-width: 720px) { .room-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.room-nav { display: flex; gap: 6px; overflow-x: auto; margin: 16px 0; padding-bottom: 2px; }
.room-nav a { flex: none; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; font-size: .88rem; background: var(--surface); }
.room-nav a:hover { border-color: var(--ink); }
section.card { scroll-margin-top: 16px; }
.room-sub { margin: 20px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.room-add { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); align-items: end; }
.room-add .field { margin-bottom: 0; }
.item b.done { text-decoration: line-through; color: var(--ink-3); }
.item .sub, .sub.block { display: block; color: var(--ink-3); font-size: .86rem; font-weight: 400; }
input.slim { min-height: 30px; padding: 4px 8px; }
.lead { font-size: 1.02rem; color: var(--ink-2); max-width: 70ch; }
details.doc { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 8px; background: var(--surface); }
details.doc > summary { cursor: pointer; padding: 10px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-weight: 500; }
.doc-body { padding: 0 14px 14px; white-space: pre-wrap; max-width: 75ch; color: var(--ink-2); font-size: .93rem; }
details.doc-edit { padding: 0 14px 12px; } details.doc-edit > summary { cursor: pointer; }
.pill.as-btn { border: 0; cursor: pointer; font: inherit; font-size: .78rem; }
.scroll { overflow-x: auto; }
tr.total td { font-weight: 600; border-top: 2px solid var(--ink); }
.strips { display: grid; gap: 4px; }
.strip { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.strip > span:first-child { font-family: var(--mono); font-size: .86rem; color: var(--ink-2); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--sunk); }
.gallery figcaption { padding: 10px 12px; display: grid; gap: 2px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-3); text-decoration: underline; cursor: pointer; font: inherit; font-size: .82rem; justify-self: start; }
.team-col { display: grid; gap: 0; align-content: start; }
.person { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.person-acts { grid-column: 1 / -1; gap: 6px; }
.engine { border-color: var(--ink); }
.draft { margin-top: 18px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--paper); }
.draft h4 { margin: 12px 0 4px; font-size: .9rem; }
.draft ul { margin: 0; padding-left: 18px; font-size: .9rem; }
.apply { margin-top: 14px; display: grid; gap: 10px; }
.apply legend { font-weight: 600; margin-bottom: 6px; }
@media (max-width: 640px) {
  #actions .item, #gates .item { flex-wrap: wrap; }
  #actions .item > .grow, #gates .item > .grow { flex: 1 1 calc(100% - 60px); }
  #actions .item > form.row, #actions .item > span.faint { flex-basis: 100%; padding-left: 52px; }
  #actions .item > form.row input.slim { flex: 1; min-width: 0; width: auto !important; }
}

/* Back link: always visible above the header, so phones don't lose it at the end of the menu strip. */
.backbar { border-bottom: 1px solid var(--line); background: var(--sunk); }
.backbar .wrap { min-height: 0 !important; padding-top: 7px; padding-bottom: 7px; }
.backbar a { text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.backbar a:hover { text-decoration: underline; }

/* Add to calendar menu, invitations and the "need help planning" prompt */
.calmenu { position: relative; display: inline-block; }
.calmenu > summary { list-style: none; cursor: pointer; }
.calmenu > summary::-webkit-details-marker { display: none; }
.calmenu-list { position: absolute; z-index: 20; margin-top: 6px; min-width: 260px; background: var(--surface, #fff); border: 1px solid var(--line, #E4E4E7); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.08); padding: 6px; display: flex; flex-direction: column; }
.calmenu-list a { padding: 9px 12px; border-radius: 8px; text-decoration: none; color: inherit; }
.calmenu-list a:hover { background: rgba(0,0,0,.05); }
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rsvp label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border: 1px solid var(--line, #E4E4E7); border-radius: 12px; cursor: pointer; font-weight: 500; }
.rsvp input:checked + span { text-decoration: underline; }
.rsvp label:has(input:checked) { border-color: var(--brand, #0A0A0B); box-shadow: inset 0 0 0 1px var(--brand, #0A0A0B); }
.signin-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.google { background: #fff; color: #1f1f1f; border: 1px solid #DADCE0; }
.welcome-from { border-left: 3px solid var(--brand, #0A0A0B); }
