/* Booking system styles. --brand and --accent come from Settings. */
:root {
  --brand: #14425c;
  --accent: #e0662b;
  --ink: #17232b;
  --muted: #5d6b75;
  --line: #e2e7eb;
  --soft: #f4f6f8;
  --card: #fff;
  --ok: #1f7a4a;
  --warn: #a35f00;
  --bad: #b3261e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 44, .06), 0 4px 16px rgba(16, 32, 44, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pre { white-space: pre-wrap; }
.error-text { color: var(--bad); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow-wrap { max-width: 760px; }
.section { padding: 48px 20px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #c9d2d8; background: #fafbfc; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.06); }
.btn-light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-light:hover { background: rgba(255, 255, 255, .2); border-color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 16.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }
form.inline { display: inline; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13.5px; font-weight: 600; color: #34444f; }
.field input, .field select, .field textarea, .person-row input, .promo input, textarea.code {
  width: 100%; padding: 10px 12px; border: 1px solid #cfd8de; border-radius: 9px;
  font: inherit; font-size: 15.5px; color: var(--ink); background: #fff;
}
.field input[type="color"] { padding: 3px; height: 42px; }
.field textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.hint { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input, .radio input { margin-top: 4px; width: 17px; height: 17px; flex: none; accent-color: var(--brand); }
.check .hint { display: block; }
.stack > * + * { margin-top: 14px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.align-start { align-items: start; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
textarea.code { font: 13px/1.4 ui-monospace, Menlo, monospace; }

/* Flash messages and badges */
.flash { padding: 12px 16px; border-radius: 10px; margin: 16px 0; font-weight: 500; background: #e8f5ee; color: #14532d; border: 1px solid #bfe3cf; }
.flash-error { background: #fdecea; color: #7f1d1d; border-color: #f5c2bd; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.badge-green { background: #e3f4ea; color: #166534; }
.badge-blue { background: #e4eef8; color: #1e4f80; }
.badge-amber { background: #fdf0d9; color: #8a4b00; }
.badge-red { background: #fde4e1; color: #9b1c1c; }
.badge-grey { background: #eceff1; color: #4b5860; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #e6f1ec; color: #1f6b44; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-low { background: #fdf0d9; color: #8a4b00; }
.pill-full { background: #fde4e1; color: #9b1c1c; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--brand)); margin-right: 8px; vertical-align: 1px; }
.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c, var(--brand)); margin-bottom: 6px; }
.price { font-size: 1.15rem; font-weight: 700; }

/* ---------- Public site ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { font-weight: 800; color: var(--brand); text-decoration: none; font-size: 17px; }
.brand img { max-height: 44px; display: block; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--brand); }
.site-nav a.main-site { color: var(--muted); font-weight: 500; }
@media (max-width: 760px) { .site-nav a.main-site { display: none; } }
.hero { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000)); color: #fff; padding: 72px 0 80px; }
.hero h1 { max-width: 760px; font-size: clamp(2rem, 4.4vw, 3.1rem); }
.hero .lead { max-width: 640px; color: rgba(255, 255, 255, .86); }
.lead { font-size: 1.15rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.course-card {
  display: flex; flex-direction: column; padding: 22px; border-radius: 14px; border: 1px solid var(--line);
  border-top: 5px solid var(--c); text-decoration: none; color: inherit; background: #fff; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16, 32, 44, .1); }
.course-card h3 { font-size: 1.2rem; }
.course-card p { color: var(--muted); flex: 1; }
.course-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.course-meta span::before { content: "\2022"; margin-right: 6px; color: var(--c); }
.course-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.date-list { display: flex; flex-direction: column; gap: 12px; }
.date-card {
  display: grid; grid-template-columns: 230px 1fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius); background: #fff;
}
.date-card-when { display: flex; flex-direction: column; }
.date-card-when span, .date-card-what span { font-size: 14px; }
.date-card-what { display: flex; flex-direction: column; min-width: 0; }
.course-name { font-weight: 600; }
.date-card-book { display: flex; align-items: center; gap: 14px; }
.date-list.compact .date-card { grid-template-columns: 1fr; gap: 8px; }
.date-list.compact .date-card-what .course-name { display: none; }
.date-list.compact .date-card-book { justify-content: space-between; flex-wrap: wrap; }
.band { background: var(--soft); border-top: 1px solid var(--line); padding: 48px 0; }
.band-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.band-inner p { max-width: 640px; color: var(--muted); margin: 0; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; margin-top: 40px; font-size: 14.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.crumb { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; font-size: 14px; }
.course-hero { background: var(--brand); color: #fff; padding: 36px 0 40px; border-bottom: 6px solid var(--c); }
.course-hero .crumb { color: rgba(255, 255, 255, .8); }
.course-hero .eyebrow { color: rgba(255, 255, 255, .75); }
.course-hero .lead { color: rgba(255, 255, 255, .88); max-width: 720px; }
.hero-price strong { font-size: 1.6rem; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; padding-top: 36px; padding-bottom: 40px; align-items: start; }
.prose p { font-size: 16.5px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 20px 0 26px; }
.facts > div { background: var(--soft); border-radius: 10px; padding: 10px 14px; }
.facts dt { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; font-weight: 500; }
ul.ticks { list-style: none; padding: 0; margin: 0 0 22px; }
ul.ticks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
ul.ticks li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.book-box { position: sticky; top: 86px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.book-box-alt { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.book-box-alt p { color: var(--muted); font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.card.narrow { max-width: 620px; margin: 24px auto; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }

/* Calendar */
.cal-nav { display: flex; align-items: center; gap: 14px; margin: 10px 0 14px; }
.cal-nav h2 { margin: 0; min-width: 190px; text-align: center; font-size: 1.35rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; background: #fff; }
.filter.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.cal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 8px 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--soft); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 116px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: #fafbfc; }
.cal-day.other .cal-num { color: #b3bec6; }
.cal-num { font-size: 13px; font-weight: 600; color: var(--muted); padding: 2px 4px; text-decoration: none; align-self: flex-start; border-radius: 6px; }
a.cal-num:hover { background: var(--soft); color: var(--brand); }
.cal-day.today .cal-num { background: var(--brand); color: #fff; }
.chip {
  display: block; padding: 5px 7px; border-radius: 7px; border-left: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 11%, #fff); color: var(--ink); text-decoration: none;
  font-size: 13px; font-weight: 600; line-height: 1.25; overflow: hidden;
}
.chip:hover { background: color-mix(in srgb, var(--c) 20%, #fff); }
.chip em { font-style: normal; font-weight: 500; color: var(--muted); }
.chip small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-past, .chip-cancelled { opacity: .55; }
.chip-cancelled { text-decoration: line-through; }
.chip-private { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, .035) 6px 12px); }
.cal-agenda { display: none; list-style: none; padding: 0; margin: 12px 0 0; }
.cal-agenda li a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; margin-bottom: 10px; text-decoration: none; color: var(--ink); }

/* Booking form */
.book-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; margin-top: 12px; }
.book-main fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 22px; margin: 0 0 18px; }
.book-main fieldset > * + * { margin-top: 14px; }
.book-main legend { font-weight: 700; font-size: 1.08rem; padding: 0 8px; margin-left: -8px; display: flex; align-items: center; gap: 10px; }
.book-main legend span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; }
.qty-field { max-width: 160px; }
.person-row { display: grid; grid-template-columns: 26px 1fr 1fr 1.3fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.person-num { font-weight: 700; color: var(--muted); text-align: center; }
.policy { background: var(--soft); border-radius: 10px; padding: 14px 16px; font-size: 14.5px; }
.policy h4 { margin: 0 0 4px; font-size: 14px; }
.waiver { max-height: 160px; overflow: auto; white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.book-summary { position: sticky; top: 86px; }
.summary-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: #fff; box-shadow: var(--shadow); }
.summary-course { font-weight: 700; font-size: 1.1rem; border-left: 5px solid var(--c); padding-left: 10px; margin-bottom: 12px; }
.summary-card dl { margin: 0 0 14px; }
.summary-card dl div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary-card dt { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.summary-card dd { margin: 0; }
.promo { display: flex; gap: 8px; }
.promo-msg { min-height: 1.2em; margin: 6px 0 0; }
.promo-msg.ok { color: var(--ok); }
.promo-msg.bad { color: var(--bad); }
.totals { margin: 12px 0 16px; }
.totals > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 15px; }
.totals .grand { font-weight: 700; font-size: 1.12rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.status-head { border-radius: 14px; padding: 22px 24px; margin-bottom: 20px; }
.status-head h1 { margin: 0 0 4px; }
.status-head p { margin: 0; font-weight: 600; opacity: .8; }
.status-ok { background: #e3f4ea; color: #14532d; }
.status-warn { background: #fdf0d9; color: #6b3d00; }
.status-muted { background: #eceff1; color: #36434b; }
.course-title { border-left: 5px solid var(--c); padding-left: 12px; }
.test-pay { text-align: left; }
.big-amount { font-size: 2.4rem; font-weight: 800; margin: 8px 0; }

/* Embed: keep the month grid in narrower website columns (down to 600px) before switching to a list. */
body.embed { background: transparent; }
body.embed .wrap { padding: 8px; }
@media (min-width: 600px) and (max-width: 760px) {
  body.embed .cal { display: block; }
  body.embed .cal-head { display: grid; }
  body.embed .cal-agenda { display: none; }
  body.embed .cal-day { min-height: 92px; padding: 4px; }
  body.embed .chip { font-size: 12px; padding: 4px 5px; }
}

/* ---------- Admin ---------- */
body.admin { background: var(--soft); }
.nav-toggle { display: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; background: var(--brand); color: #fff; display: flex; flex-direction: column; z-index: 20; }
.sidebar-brand { padding: 20px 20px 14px; }
.sidebar-brand a { color: #fff; font-weight: 800; font-size: 19px; text-decoration: none; display: block; }
.sidebar-brand span { font-size: 12px; opacity: .65; text-transform: uppercase; letter-spacing: .1em; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 10px; }
.sidebar-nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 8px; color: rgba(255, 255, 255, .82); text-decoration: none; font-size: 14.5px; font-weight: 500; margin-bottom: 1px; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar-nav a.active { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; }
.nav-badge { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11.5px; padding: 1px 7px; font-weight: 700; }
.sidebar-foot { padding: 14px 20px 20px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.sidebar-foot a, .sidebar-foot .linklike { color: rgba(255, 255, 255, .8); }
.admin-main { margin-left: 236px; min-height: 100vh; }
.admin-top { display: flex; align-items: center; gap: 14px; padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.admin-top h1 { font-size: 1.4rem; margin: 0; flex: 1; min-width: 200px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.head-badges { margin-right: 6px; }
.burger { display: none; font-size: 22px; cursor: pointer; }
.mode-banner { display: block; background: #fdf0d9; color: #6b3d00; padding: 8px 28px; font-size: 13.5px; font-weight: 600; text-decoration: none; border-bottom: 1px solid #f3dcb0; }
.admin-main > .flash { margin: 16px 28px 0; }
.admin-body { padding: 24px 28px 60px; max-width: 1280px; }
.admin .card { box-shadow: 0 1px 2px rgba(16, 32, 44, .04); }
.card.flush { padding: 0; overflow-x: auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head.pad { padding: 16px 20px 4px; }
.card.notice { border-left: 4px solid var(--accent); }
.checklist { border-left: 4px solid var(--accent); }
.checklist h2 span { font-size: 14px; font-weight: 500; margin-left: 8px; }
.checklist ul { margin: 0; padding-left: 20px; }
.checklist li { margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 1.9rem; line-height: 1.15; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 12.5px; min-height: 1em; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fbfcfd; white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcfd; }
.table a { font-weight: 600; text-decoration: none; }
.table.small td { padding: 6px 0; }
.card:not(.flush) .table td:first-child, .card:not(.flush) .table th:first-child { padding-left: 0; }
.roster td { vertical-align: middle; }
.roster input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ok); cursor: pointer; }
.seats { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seats-track { position: relative; width: 110px; height: 8px; background: #e3e8ec; border-radius: 6px; }
.seats-track b { position: absolute; inset: 0 auto 0 0; background: var(--ok); border-radius: 6px; }
.seats-low .seats-track b { background: #d98b14; }
.min-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .35; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--brand); border-color: var(--brand); }
.filter-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar .field { min-width: 220px; }
.session-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-left: 5px solid var(--c); padding-left: 16px; margin-bottom: 14px; }
.session-head p { margin: 0 0 2px; }
.session-numbers { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.session-numbers .seats-track { width: 200px; height: 10px; }
details > summary { cursor: pointer; font-weight: 600; padding: 8px 0; color: var(--brand); }
details[open] > summary { margin-bottom: 10px; }
.danger-zone summary { color: var(--bad); }
.radios { display: flex; flex-direction: column; gap: 8px; }
.aud { display: none; }
.aud.on { display: block; }
.aud > * + * { margin-top: 12px; }
.recipient-count { font-weight: 600; color: var(--brand); min-height: 1.3em; margin: 6px 0 0; }
.tags { columns: 2; padding-left: 18px; font-size: 13.5px; }
.tags li { margin-bottom: 4px; break-inside: avoid; }
.email-preview { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--radius); background: #f3f5f7; }
.auto-rule.off { opacity: .6; }
.auto-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.inline-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.inline-card p { margin: 0; }
.inline-field { display: inline-flex; }
.inline-field > span:empty { display: none; }
.inline-field select { padding: 5px 8px; font-size: 13.5px; }

/* Login / setup */
body.bare { background: var(--soft); display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.bare-card { background: #fff; width: 100%; max-width: 420px; padding: 32px; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.bare-brand { font-weight: 800; color: var(--brand); margin-bottom: 20px; }

/* Print sign-in sheet */
.print-sheet { padding: 24px; }
.print-sheet table { width: 100%; border-collapse: collapse; }
.print-sheet th, .print-sheet td { border: 1px solid #999; padding: 10px 8px; text-align: left; font-size: 14px; }
.print-sheet td:last-child { width: 30%; }

/* Responsive */
@media (max-width: 1000px) {
  .course-layout, .book-layout { grid-template-columns: 1fr; }
  .book-box, .book-summary { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .nav-toggle:checked ~ .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .admin-main { margin-left: 0; }
  .burger { display: block; }
  .admin-body { padding: 18px 16px 60px; }
  .admin-top { padding: 12px 16px; }
  .admin .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 14px; }
  .header-inner { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .hero { padding: 48px 0 56px; }
  .date-card { grid-template-columns: 1fr; gap: 8px; }
  .date-card-book { justify-content: space-between; flex-wrap: wrap; }
  .band-inner { flex-direction: column; align-items: flex-start; }
  .cal, .cal-head { display: none; }
  .cal-agenda { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .person-row { grid-template-columns: 22px 1fr 1fr; }
  .person-row input[type="email"] { grid-column: 2 / 4; }
  .stats { grid-template-columns: 1fr 1fr; }
  .tags { columns: 1; }
  .section { padding: 32px 16px; }
  .wrap { padding: 0 16px; }
}
@media print {
  .sidebar, .admin-top, .mode-banner, .site-header, .site-footer { display: none; }
  .admin-main { margin: 0; }
}
