:root {
  --accent: #2f7d6d;
  --on-accent: #ffffff;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1d2733;
  --muted: #5b6876;
  --line: #dde3e9;
  --ok: #1e7a46;
  --warn: #a35b00;
  --bad: #b3261e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 120px; }
.wide { max-width: 1100px; }

#site-header { background: var(--accent); color: var(--on-accent); padding: 14px 16px; }
#site-header .brand { color: var(--on-accent); text-decoration: none; display: flex; align-items: center; gap: 12px; max-width: 1100px; margin: 0 auto; }
#site-header img { height: 40px; width: auto; border-radius: 6px; background: #fff; }
#site-header span { font-weight: 700; font-size: 18px; line-height: 1.15; }
#site-header small { display: block; font-weight: 400; opacity: .85; font-size: 13px; }

h1 { font-size: 26px; line-height: 1.2; margin: 24px 0 8px; }
h2 { font-size: 19px; margin: 28px 0 10px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.05); border: 1px solid var(--line); }
.stack > * + * { margin-top: 12px; }

/* Event list */
.event-card { display: block; text-decoration: none; color: inherit; transition: transform .08s; }
.event-card:active { transform: scale(.99); }
.event-card h3 { margin: 0 0 4px; font-size: 19px; color: var(--accent); }
.event-card .meta { color: var(--muted); font-size: 15px; }
.badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: #e7f4ec; color: var(--ok); }
.badge.full { background: #f1f1f1; color: var(--muted); }
.badge.draft { background: #fff3e0; color: var(--warn); }

/* Slots */
.day-heading { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 26px 0 8px; font-weight: 700; }
.slot { position: relative; display: flex; gap: 14px; align-items: flex-start; cursor: pointer; user-select: none; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot .tick {
  flex: 0 0 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line); margin-top: 2px;
  display: grid; place-items: center; color: #fff; font-weight: 700; background: #fff;
}
.slot.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.slot.selected .tick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.slot.selected .tick::after { content: "✓"; }
.slot.disabled { cursor: default; opacity: .62; }
.slot .body { flex: 1; min-width: 0; }
.slot .time { font-weight: 700; }
.slot .title { font-weight: 600; font-size: 17px; }
.slot .details { color: var(--muted); font-size: 15px; margin-top: 2px; }
.slot .fill { font-size: 14px; margin-top: 6px; color: var(--muted); }
.names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.names span { background: #eef2f6; border-radius: 99px; padding: 1px 9px; font-size: 13px; color: var(--muted); }
.bar { height: 6px; border-radius: 99px; background: #eef2f6; overflow: hidden; margin-top: 6px; max-width: 220px; }
.bar i { display: block; height: 100%; background: var(--ok); }

/* Sticky action bar */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: none; z-index: 20;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.actionbar.show { display: block; }
.actionbar .inner { max-width: 760px; margin: 0 auto; display: flex; gap: 12px; align-items: center; justify-content: space-between; }

/* Forms */
label { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=number], textarea, select {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #c8d1da; border-radius: 10px; background: #fff; color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row > div > label { margin-top: 14px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 20px; height: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
  padding: 12px 20px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  cursor: pointer; text-decoration: none; min-height: 48px;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: #fff; color: var(--accent); }
.btn.danger { background: #fff; color: var(--bad); border-color: #e7b6b2; }
.btn.danger.confirm { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.link { background: none; border: none; color: var(--accent); padding: 4px; min-height: 0; text-decoration: underline; }

.error { background: #fdecea; color: var(--bad); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.notice { background: #fff8e6; color: #6b4b00; border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.success { background: #e7f4ec; color: #14532d; border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.center { text-align: center; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* Bottom sheet for sign-up form */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 32, .45); z-index: 30; display: none; }
.sheet-backdrop.show { display: block; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; background: #fff; border-radius: 18px 18px 0 0;
  max-height: 92vh; overflow-y: auto; padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .22s ease-out; max-width: 640px; margin: 0 auto;
}
.sheet.show { transform: none; }
.sheet h2 { margin-top: 4px; }
.sheet .close { position: absolute; right: 12px; top: 10px; font-size: 26px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 10px; }
.picked { background: #f4f8fb; border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.picked div + div { margin-top: 4px; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 40px); opacity: 0; background: #1d2733; color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 50; transition: all .2s; pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }

/* Admin */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .spacer { flex: 1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 14px; }
.tabs button { font: inherit; font-weight: 600; background: none; border: none; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
table.list { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafbfc; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #f7fafc; }
.slot-edit { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.slot-edit .grid { display: grid; grid-template-columns: 2fr 1.3fr 1fr 1fr .8fr; gap: 10px; }
.slot-edit .grid label { margin-top: 0; font-size: 13px; color: var(--muted); }
.slot-edit .grid input { padding: 9px 10px; }
.slot-edit textarea { min-height: 54px; margin-top: 8px; padding: 9px 10px; }
.slot-edit .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 14px; }
.roster td { font-size: 15px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,32,.45); z-index: 40; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 16px; padding: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal h2 { margin-top: 0; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.stat { display: inline-block; margin-right: 18px; }
.stat b { font-size: 20px; display: block; }

@media (max-width: 720px) {
  .slot-edit .grid { grid-template-columns: 1fr 1fr; }
  .slot-edit .grid .task { grid-column: 1 / -1; }
  table.list .hide-sm { display: none; }
}
@media (max-width: 420px) {
  .row { grid-template-columns: 1fr; gap: 0; }
  h1 { font-size: 23px; }
}

.wide .actionbar .inner { max-width: 1100px; }

/* Items to bring */
.bringing { list-style: none; padding: 0; margin: 8px 0 0; font-size: 15px; }
.bringing li { padding: 3px 0; }
.diet { display: inline-block; font-size: 12px; background: #e7f4ec; color: var(--ok); border-radius: 99px; padding: 0 8px; margin-left: 4px; }
.item-block { background: #f4f8fb; border-radius: 12px; padding: 4px 14px 12px; margin-bottom: 8px; }
.item-block > label { margin-top: 10px; }
.diet-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
label.chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; font-size: 14px; background: #fff; border: 1px solid #c8d1da; border-radius: 99px; padding: 6px 12px; cursor: pointer; }
label.chip input { width: 16px; height: 16px; margin: 0; }
label.chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); }
.slot-edit.item { border-left: 4px solid var(--accent); }
.slot-edit .grid.item-grid { grid-template-columns: 3fr 1fr; }
.kind-tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-bottom: 6px; }
.card.donate { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; background: #fffaf0; border-color: #f1e3c4; }
.card.donate .btn { flex: 0 0 auto; }

/* ---------- HelperHub additions ---------- */
#site-header .wrapline { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#site-header .nav a { color: var(--on-accent); text-decoration: none; font-weight: 600; font-size: 15px; margin-left: 14px; opacity: .92; }
#site-header .nav a:hover { opacity: 1; text-decoration: underline; }
.hh-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.18); font-size: 20px; }
footer.site { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 16px 40px; }
footer.site a { color: var(--muted); }
.hero { padding: 36px 0 10px; }
.hero h1 { font-size: 34px; margin: 0 0 10px; }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 22px; max-width: 620px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 30px; }
.features .card h3 { margin: 0 0 6px; font-size: 17px; }
.features .card p { margin: 0; color: var(--muted); font-size: 15px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 14px 44px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; }
.slug-preview { font-size: 14px; color: var(--muted); margin-top: 6px; }
.slug-preview .ok { color: var(--ok); font-weight: 600; }
.slug-preview .bad { color: var(--bad); font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches button.on { box-shadow: 0 0 0 3px var(--text); }
.swatches input[type=color] { width: 44px; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.logo-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.logo-box img { height: 64px; max-width: 160px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 4px; }
.preview-bar { border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 700; margin-top: 10px; }
.preview-bar img { height: 32px; border-radius: 6px; background: #fff; }
.prose h2 { margin-top: 26px; }
.prose p, .prose li { color: #2b3642; }
.group-switch { margin: 0 0 8px; }
table.list td.actions { white-space: nowrap; text-align: right; }
#site-header .wrapline .brand { margin: 0; max-width: none; min-width: 0; }
#site-header .wrapline .brand span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { #site-header .nav a { margin-left: 10px; font-size: 14px; } #site-header .wrapline { flex-wrap: wrap; } }
