:root {
  /* Taken from the parish crest: the blue of Our Lady's heart. */
  --bg: #f3f6f9;
  --surface: #ffffff;
  --ink: #14202b;
  --ink-soft: #55677a;
  --line: #dbe3ea;
  --brand: #04537c;
  --brand-dark: #033d5c;
  --brand-soft: #e7f0f6;
  --accent: #0d6ea8;
  --ok: #2f6b47;
  --warn: #8a5a00;
  --warn-soft: #fdf3dd;
  --danger: #9b2226;
  --radius: 10px;
  --tint: #f5f8fb;
  --shadow: 0 1px 2px rgba(4, 45, 70, .06), 0 4px 16px rgba(4, 45, 70, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ---------- layout ---------- */

.masthead {
  background: var(--brand);
  color: #fff;
  padding: 14px 24px;
}
.masthead-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
/* The crest and the title are one link back to where you started. */
.masthead .brand {
  display: flex; align-items: center; gap: 16px;
  color: #fff; text-decoration: none;
  padding: 4px 10px 4px 4px; margin-left: -4px; border-radius: 8px;
  border: 1px solid transparent;
}
.masthead .brand:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.masthead .brand:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.masthead h1 { font-size: 1.05rem; margin: 0; font-weight: 600; letter-spacing: .01em; }
.masthead .sub { font-size: .8rem; opacity: .8; margin: 2px 0 0; }
.masthead .spacer { flex: 1; }
.masthead select {
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px; padding: 5px 8px; font-size: .85rem;
  width: auto; flex: 0 0 auto;
}
.masthead select option { color: var(--ink); }
.masthead .who { font-size: .82rem; opacity: .9; }
.masthead button.link { color: #fff; opacity: .9; }

nav.tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
nav.tabs .inner {
  max-width: 1180px; margin: 0 auto; display: flex; gap: 2px; overflow-x: auto; padding: 0 16px;
}
nav.tabs a {
  padding: 12px 14px; text-decoration: none; color: var(--ink-soft);
  font-size: .92rem; font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
nav.tabs a:hover { color: var(--ink); }
nav.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }

main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 72px; }

h2 { font-size: 1.35rem; margin: 0 0 4px; }
h3 { font-size: 1.02rem; margin: 0 0 12px; color: var(--ink); }
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .spacer { flex: 1; }
.muted { color: var(--ink-soft); font-size: .88rem; }

/* ---------- cards ---------- */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.card > h3 {
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 16px;
  color: var(--brand); font-size: .95rem; text-transform: uppercase; letter-spacing: .05em;
}
.note {
  background: var(--brand-soft); border-left: 3px solid var(--brand);
  padding: 10px 14px; border-radius: 4px; font-size: .88rem; margin-bottom: 18px;
}
.legal { font-size: .85rem; color: var(--ink-soft); background: var(--tint);
  border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin-bottom: 14px; }

/* ---------- stats ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .n { font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat .l { font-size: .82rem; color: var(--ink-soft); margin-top: 4px; }
.stat.warn { background: var(--warn-soft); border-color: #ecd9a8; }
.stat.warn .n { color: var(--warn); }

/* ---------- forms ---------- */

.grid { display: grid; gap: 14px 18px; grid-template-columns: repeat(12, 1fr); }
.f { display: flex; flex-direction: column; gap: 5px; }
.f.c2 { grid-column: span 2; } .f.c3 { grid-column: span 3; }
.f.c4 { grid-column: span 4; } .f.c5 { grid-column: span 5; }
.f.c6 { grid-column: span 6; } .f.c8 { grid-column: span 8; }
.f.c9 { grid-column: span 9; } .f.c12 { grid-column: span 12; }

label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
label .req { color: var(--danger); }
.hint { font-size: .78rem; color: var(--ink-soft); font-weight: 400; }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=tel], select, textarea {
  font: inherit; font-size: .93rem; padding: 8px 10px; border: 1px solid #c3cedb;
  border-radius: 6px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); }

.check { flex-direction: row; align-items: flex-start; gap: 9px; }
.check label { font-weight: 500; font-size: .9rem; color: var(--ink); cursor: pointer; }
.radios { display: flex; gap: 20px; flex-wrap: wrap; }
.radios span { display: flex; align-items: center; gap: 7px; }
.radios label { font-weight: 500; color: var(--ink); font-size: .9rem; }

/* ---------- buttons ---------- */

button {
  font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer;
  border-radius: 6px; border: 1px solid transparent; padding: 8px 16px;
}
button.primary { background: var(--brand); color: #fff; }
button.primary:hover { background: var(--brand-dark); }
button.ghost { background: #fff; border-color: #c3cedb; color: var(--ink); }
button.ghost:hover { border-color: var(--ink-soft); }
button.danger { background: #fff; border-color: #e0b6b6; color: var(--danger); }
button.danger:hover { background: #fdf1f1; }
button.link { background: none; border: none; color: var(--accent); padding: 2px 4px; text-decoration: underline; }
button:disabled { opacity: .55; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

/* ---------- tables ---------- */

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); background: var(--tint); }
tbody tr:hover { background: var(--tint); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.pill {
  display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; background: #eee; color: var(--ink-soft); white-space: nowrap;
}
.pill.received { background: #e2f0e7; color: var(--ok); }
.pill.prep { background: #e3edf3; color: var(--accent); }
.pill.none { background: #eef2f6; color: var(--ink-soft); }
.pill.na { background: #eef2f6; color: #9a9a9a; }
.pill.community { background: var(--brand-soft); color: var(--brand); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=text] { max-width: 320px; }
.toolbar select { width: auto; }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(31,36,48,.45); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal { background: var(--surface); border-radius: var(--radius); max-width: 720px; width: 100%; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal h3 { color: var(--brand); }

/* ---------- login ---------- */

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.15rem; margin: 0 0 2px; color: var(--brand); }
.login-card .parish { font-size: .85rem; color: var(--ink-soft); margin: 0 0 22px; }
.login-card .lang { display: flex; gap: 6px; margin-bottom: 20px; }
.login-card .lang button { flex: 1; font-size: .8rem; padding: 6px; }
.login-card .lang button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.alert { padding: 10px 12px; border-radius: 6px; font-size: .88rem; margin-bottom: 14px; }
.alert.error { background: #fdf1f1; color: var(--danger); border: 1px solid #e8c4c4; }
.alert.ok { background: #eaf4ee; color: var(--ok); border: 1px solid #bfdcc9; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: .88rem; z-index: 100; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* ---------- translations editor ---------- */

.tr-row { display: grid; grid-template-columns: 1.1fr 1.4fr 1.4fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.tr-row .k { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; color: var(--ink-soft); word-break: break-all; }
.tr-row .k .def { display: block; font-family: inherit; font-size: .84rem; color: var(--ink); margin-top: 3px; }

@media (max-width: 760px) {
  .f.c2, .f.c3, .f.c4, .f.c5, .f.c6, .f.c8, .f.c9 { grid-column: span 12; }
  .tr-row { grid-template-columns: 1fr; }
  main { padding: 16px 12px 60px; }
}

/* ----------------------------------------------------------------- setup */

.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.subtab {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: .88rem; color: var(--ink-soft); cursor: pointer;
}
.subtab:hover { border-color: var(--brand); color: var(--brand); }
.subtab.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.card.sub { padding: 16px 18px; margin-bottom: 12px; }

.grid-table { width: 100%; border-collapse: collapse; }
.grid-table th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-soft); font-weight: 600; padding: 0 8px 8px; white-space: nowrap;
}
.grid-table td { padding: 4px 8px; vertical-align: middle; border-top: 1px solid var(--line); }
.grid-table td input[type="text"], .grid-table td input[type="number"] { width: 100%; }
.grid-table code { font-size: .8rem; color: var(--ink-soft); }

button.small { padding: 5px 12px; font-size: .82rem; }
.right { text-align: right; }
.muted.small { font-size: .8rem; margin-right: 10px; }
.danger-link { color: var(--danger); }

.inline-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .86rem; color: var(--ink-soft); white-space: nowrap;
}
.inline-check input { width: auto; margin: 0; }

.alert.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid #ecd9a8; }
.alert.banner { display: flex; align-items: center; gap: 14px; }
.alert.banner > div { flex: 1; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

@media print {
  nav.tabs, .toolbar, .subtabs, button, .masthead select { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ------------------------------------------------------------ parish crest */

/* The crest is blue on blue, so it sits on a white disc to read at all. */
.masthead .crest {
  height: 40px; width: 40px; flex: 0 0 auto;
  object-fit: contain; background: #fff; border-radius: 50%;
  padding: 5px; box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.login-crest { display: block; height: 110px; width: auto; margin: 0 auto 14px; }
.portal-crest { height: 76px; width: auto; flex: 0 0 auto; }
.card.centred { text-align: center; }
.card.centred .portal-crest { margin: 0 auto 12px; }

@media (max-width: 640px) {
  .masthead .crest { height: 34px; width: 34px; padding: 4px; }
  .login-crest { height: 84px; }
  .portal-crest { height: 60px; }
}
@media print {
  .masthead .crest { height: 36px; width: 36px; box-shadow: none; }
}

/* The name in the header is the way to your own account. */
.masthead .who {
  display: flex; flex-direction: column; line-height: 1.25;
  color: #fff; text-decoration: none; padding: 4px 10px; border-radius: 6px;
  border: 1px solid transparent;
}
.masthead .who:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.masthead .who-name { font-size: .85rem; font-weight: 600; }
.masthead .who-role { font-size: .74rem; opacity: .8; }

/* ---------------------------------------------------------- signing in */

.sso-button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px; margin-bottom: 4px;
  border: 1px solid #c3cedb; border-radius: 6px; background: #fff;
  color: var(--ink); font-size: .93rem; font-weight: 600; text-decoration: none;
}
.sso-button:hover { border-color: var(--ink-soft); background: var(--tint); }

.or-line { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--ink-soft); font-size: .8rem; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.grouplist { list-style: none; margin: 0; padding: 0; }
.grouplist li { display: flex; align-items: center; gap: 8px; padding: 2px 0; font-size: .84rem; }
.grouplist code { font-size: .8rem; }

/* --------------------------------------------------- the permissions grid */

.perm-table th.num, .perm-table td.num { text-align: center; width: 108px; }
.perm-table td.perm-name { max-width: 460px; }
.perm-table td.perm-name .muted { font-size: .82rem; margin-top: 2px; }
.perm-table input[type=checkbox] { width: 18px; height: 18px; }
.perm-table input[type=checkbox]:disabled { opacity: .45; }

.perm-group td {
  background: var(--tint); font-weight: 600; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft);
}

/* =========================================================================
   Appointments: the parts that are this application's own
   ========================================================================= */

/* ---------------------------------------------------------- small pieces */

.pill.pending    { background: var(--warn-soft); color: var(--warn); }
.pill.confirmed  { background: #e2f0e7; color: var(--ok); }
.pill.declined   { background: #fdf1f1; color: var(--danger); }
.pill.cancelled  { background: #eef2f6; color: var(--ink-soft); text-decoration: line-through; }
.pill.completed  { background: #e3edf3; color: var(--accent); }
.pill.no_show    { background: #f3ece4; color: #7a5230; }
.pill.ok         { background: #e2f0e7; color: var(--ok); }
.pill.error      { background: #fdf1f1; color: var(--danger); }
.pill.new        { background: #eef2f6; color: var(--ink-soft); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; background: var(--tint);
  border: 1px solid var(--line); font-size: .8rem; color: var(--ink-soft);
}
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }

.empty {
  text-align: center; padding: 34px 20px; color: var(--ink-soft);
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface);
}
.empty p { margin: 0 0 12px; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.nowrap { white-space: nowrap; }
h4 { margin: 0 0 6px; font-size: .95rem; }

/* -------------------------------------------------------- the week, edited */

.weekday-block {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px; background: var(--surface);
}
.weekday-block.is-empty { background: var(--tint); }
.weekday-block > header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.weekday-block > header .name { font-weight: 600; font-size: .92rem; min-width: 108px; }
.weekday-block > header .spacer { flex: 1; }
.weekday-block .none { color: var(--ink-soft); font-size: .86rem; }

.hours-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.hours-row input[type=time] {
  font: inherit; font-size: .9rem; padding: 6px 8px; width: auto;
  border: 1px solid #c3cedb; border-radius: 6px; background: #fff; color: var(--ink);
}
.hours-row select { width: auto; font-size: .85rem; padding: 5px 8px; }
.hours-row .dash { color: var(--ink-soft); }

/* ------------------------------------------------------------ month grid */

.month {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.month .head {
  text-align: center; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-soft); padding: 6px 0; font-weight: 600;
}
.month-day {
  aspect-ratio: 1 / 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: .92rem; color: var(--ink); cursor: pointer; padding: 0;
}
.month-day .n { line-height: 1; }
.month-day .count { font-size: .66rem; color: var(--ink-soft); }
.month-day:hover:not(:disabled) { border-color: var(--brand); }
.month-day:disabled { background: var(--tint); color: #b6c2ce; cursor: default; }
.month-day.blank { border: none; background: transparent; cursor: default; }
.month-day.has { border-color: #a9cdb8; background: #f2f9f4; font-weight: 600; }
.month-day.has .count { color: var(--ok); }
.month-day.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.month-day.on .count { color: rgba(255,255,255,.85); }
.month-day.today { box-shadow: inset 0 0 0 2px var(--brand-soft); }

.month-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.month-nav .label { font-weight: 600; flex: 1; text-align: center; }
.month-nav button { padding: 6px 12px; }

/* -------------------------------------------------------------- the slots */

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot {
  padding: 10px 8px; border: 1px solid #c3cedb; border-radius: 8px;
  background: #fff; font-size: .92rem; font-variant-numeric: tabular-nums;
  color: var(--ink); cursor: pointer; text-align: center;
}
.slot:hover { border-color: var(--brand); color: var(--brand); }
.slot.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.slot-day-head {
  font-size: .82rem; font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 8px;
}

/* --------------------------------------------------------------- the diary */

.diary-day {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 12px 14px; margin-bottom: 10px;
}
.diary-day > header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.diary-day > header .d { font-weight: 600; }
.diary-day > header .free { margin-left: auto; font-size: .82rem; color: var(--ok); }
.diary-day.closed { background: var(--tint); }
.diary-day.closed > header .free { color: var(--ink-soft); }

.taken {
  display: flex; align-items: baseline; gap: 10px; font-size: .86rem;
  padding: 5px 0; border-top: 1px dashed var(--line);
}
.taken .t { font-variant-numeric: tabular-nums; color: var(--ink-soft); min-width: 118px; }
.taken .why { color: var(--ink-soft); font-size: .8rem; }
.taken.booking .t { color: var(--brand); }

.slot-preview { display: flex; flex-wrap: wrap; gap: 5px; }
.slot-preview span {
  font-size: .78rem; padding: 2px 7px; border-radius: 5px;
  background: #f2f9f4; color: var(--ok); font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- rule building */

.rule-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.rule-card.off { opacity: .62; }
.rule-card > header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rule-card > header .name { font-weight: 600; }
.rule-card > header .spacer { flex: 1; }
.rule-card .sentence {
  font-size: .9rem; color: var(--ink); background: var(--tint);
  border-left: 3px solid var(--brand); padding: 8px 12px; border-radius: 4px; margin: 8px 0;
}

.condition-row {
  display: grid; grid-template-columns: 1.1fr 1.2fr 1.6fr auto;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.condition-row select, .condition-row input { width: 100%; font-size: .88rem; padding: 6px 8px; }
.condition-row button.small { padding: 5px 9px; }
@media (max-width: 700px) {
  .condition-row { grid-template-columns: 1fr 1fr; }
  .condition-row button { grid-column: span 2; justify-self: start; }
}

.preview-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; }
.preview-list li {
  list-style: none; display: flex; gap: 12px; align-items: baseline;
  padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: .86rem;
}
.preview-list li:last-child { border-bottom: none; }
.preview-list .t { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ----------------------------------------------------------- appointments */

.booking-row { cursor: pointer; }
.booking-row td .who { font-weight: 600; }
.booking-row td .sub { font-size: .8rem; color: var(--ink-soft); }

.agenda-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.agenda-item:first-child { border-top: none; }
.agenda-item .when {
  min-width: 148px; font-size: .85rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.agenda-item .when strong { display: block; color: var(--ink); font-size: .92rem; }
.agenda-item .what { flex: 1; }
.agenda-item .what .name { font-weight: 600; }
.agenda-item .what .sub { font-size: .84rem; color: var(--ink-soft); }

.kv-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2px 24px; }
.kv-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.kv-line span { color: var(--ink-soft); }

/* =========================================================================
   The public booking pages
   ========================================================================= */

body.site { background: var(--bg); }

.site-head { background: var(--brand); color: #fff; padding: 16px 20px; }
.site-head-inner {
  max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.site-head .crest {
  height: 46px; width: 46px; flex: 0 0 auto; object-fit: contain;
  background: #fff; border-radius: 50%; padding: 5px;
}
.site-head h1 { font-size: 1.1rem; margin: 0; font-weight: 600; }
.site-head p { margin: 2px 0 0; font-size: .82rem; opacity: .85; }
.site-head .spacer { flex: 1; }
.site-head .lang { display: flex; gap: 5px; }
.site-head .lang button {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.32);
  color: #fff; font-size: .78rem; padding: 5px 11px;
}
.site-head .lang button.on { background: #fff; color: var(--brand); border-color: #fff; font-weight: 600; }

.site-main { max-width: 900px; margin: 0 auto; padding: 26px 18px 70px; }
.site-foot {
  max-width: 900px; margin: 0 auto; padding: 0 18px 40px;
  font-size: .8rem; color: var(--ink-soft); text-align: center;
}

.steps { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.steps .s {
  display: flex; align-items: center; gap: 7px; font-size: .82rem;
  color: var(--ink-soft); padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.steps .s .n {
  width: 20px; height: 20px; border-radius: 50%; background: var(--line);
  color: var(--surface); display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
}
.steps .s.on { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.steps .s.on .n { background: var(--brand); }
.steps .s.done .n { background: var(--ok); }

.person-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.person-card {
  display: block; text-decoration: none; color: inherit; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); cursor: pointer; width: 100%; font: inherit;
}
.person-card:hover { border-color: var(--brand); }
.person-card .name { font-weight: 600; font-size: 1rem; }
.person-card .role { font-size: .85rem; color: var(--brand); margin-top: 1px; }
.person-card .bio { font-size: .86rem; color: var(--ink-soft); margin-top: 8px; }
.person-card .count { font-size: .8rem; color: var(--ink-soft); margin-top: 10px; }
.person-card.closed { opacity: .65; }

.type-list { display: grid; gap: 10px; }
.type-card {
  display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; font: inherit;
  background: var(--surface); border: 1px solid var(--line); border-left-width: 4px;
  border-radius: var(--radius); padding: 16px 18px; cursor: pointer;
}
.type-card:hover { border-color: var(--brand); border-left-color: var(--brand); }
.type-card .body { flex: 1; }
.type-card .name { font-weight: 600; }
.type-card .meta { font-size: .84rem; color: var(--ink-soft); margin-top: 4px; }
.type-card .desc { font-size: .87rem; color: var(--ink-soft); margin-top: 8px; }

.summary-box {
  background: var(--brand-soft); border: 1px solid #cfe0ec; border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 18px;
}
.summary-box .line { display: flex; gap: 10px; font-size: .92rem; padding: 3px 0; }
.summary-box .line b { min-width: 92px; color: var(--brand); font-weight: 600; }

.big-ok {
  text-align: center; padding: 10px 0 4px;
}
.big-ok .tick {
  width: 56px; height: 56px; border-radius: 50%; background: #e2f0e7; color: var(--ok);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
  font-size: 1.7rem; font-weight: 700;
}
.big-ok h2 { margin-bottom: 8px; }
.reference-badge {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.15rem; letter-spacing: .08em; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 18px; margin: 10px 0 4px;
}

@media (max-width: 560px) {
  .slots { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .agenda-item { flex-direction: column; gap: 4px; }
  .agenda-item .when { min-width: 0; }
  .summary-box .line { flex-direction: column; gap: 0; }
}
