:root {
  --brand: #00517e;
  --accent: #e0a33a;
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6b6b70;
  --line: #e4e2dd;
  --good: #2f7d4f;
  --bad: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55; font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  background: var(--brand); color: #fff; border: 0; border-radius: 999px;
  padding: .8em 1.4em; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .05s, opacity .15s; min-height: 48px;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.btn.subtle { background: transparent; color: var(--muted); padding-left: .6em; padding-right: .6em; }
.btn.accent { background: var(--accent); color: #1d1d1f; }
.btn.danger { background: var(--bad); }
.btn.sm { padding: .4em .9em; min-height: 34px; font-size: .9rem; }
.btn.block { width: 100%; }
label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 .3em; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=search], textarea, select {
  width: 100%; font: inherit; padding: .7em .85em; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 1em; }
.row { display: flex; gap: .75em; }
.row > * { flex: 1; min-width: 0; }
.error { color: var(--bad); font-size: .92rem; margin: .5em 0; }

/* ---------- guest class ---------- */
.class-shell { max-width: 680px; margin: 0 auto; padding: 0 16px 120px; }
.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--bg);
  padding: 12px 16px 10px; max-width: 680px; margin: 0 auto;
}
.brandline { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .95rem; }
.brandline img { height: 32px; width: auto; max-width: 140px; object-fit: contain; }
.progress { height: 6px; background: var(--line); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .3s; }
.steplabel { font-size: .8rem; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 12px 0; }
.hero { text-align: center; padding: 36px 24px; background: var(--brand); color: #fff; border-radius: var(--radius); margin: 12px 0; }
.hero h1 { font-size: 2rem; }
.hero img.logo { max-height: 64px; max-width: 220px; margin-bottom: 16px; }
.hero p { opacity: .92; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--accent); margin-bottom: .4em; }
.video { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; margin: 0 0 1.2em; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.scripture { border-left: 4px solid var(--accent); padding: .6em 1em; margin: 0 0 1.2em; background: color-mix(in srgb, var(--accent) 10%, #fff); border-radius: 0 10px 10px 0; }
.scripture q { quotes: none; font-style: italic; display: block; }
.scripture cite { display: block; font-style: normal; font-weight: 700; font-size: .85rem; margin-top: .3em; color: var(--muted); }
.body ul, .body ol { padding-left: 1.2em; margin: 0 0 1em; }
.navbar {
  position: fixed; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-top: 1px solid var(--line); z-index: 20;
}
.navbar .inner { max-width: 680px; margin: 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.navbar .btn { flex: 1; }
.navbar .btn.subtle { flex: 0 0 auto; }

.values-list { display: grid; gap: 12px; }
.value { padding: 16px 18px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 6%, #fff); }
.value h3 { color: var(--brand); margin-bottom: .2em; }
.value p { margin: 0; }

/* assessment */
.q { padding: 16px 0; border-bottom: 1px solid var(--line); }
.q:last-child { border-bottom: 0; }
.q-text { font-weight: 600; margin-bottom: 10px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button {
  font: inherit; font-size: .78rem; line-height: 1.2; padding: 10px 2px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--text); min-height: 52px;
}
.scale button b { display: block; font-size: 1.05rem; }
.scale button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.bars { display: grid; gap: 8px; margin-top: 8px; }
.bar { display: grid; grid-template-columns: 9.5em 1fr 2.5em; gap: 8px; align-items: center; font-size: .9rem; }
.bar .track { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--brand); border-radius: 99px; }
.bar.top .fill { background: var(--accent); }
.bar .num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.gift-top { padding: 16px 18px; border-radius: 12px; border: 2px solid var(--accent); margin-bottom: 10px; }
.gift-top .rank { font-size: .75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }

/* serve */
.team { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.team.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.team .name { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 25%, #fff); color: #5a3d00; white-space: nowrap; }
.badge.gray { background: var(--line); color: var(--muted); }
.badge.green { background: #dff0e5; color: var(--good); }
.badge.red { background: #f7dcda; color: var(--bad); }
.badge.blue { background: color-mix(in srgb, var(--brand) 14%, #fff); color: var(--brand); }
.team .desc { font-size: .92rem; color: var(--muted); margin-top: 2px; }
.steps { display: grid; gap: 10px; }
.step { padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 6%, #fff); }
.step h3 { margin-bottom: .2em; }
.step p { margin: 0; font-size: .95rem; }
.done-check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; font-size: 32px; }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; font-size: 15px; }
.admin .side { background: var(--brand); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin .side .brandline { color: #fff; margin-bottom: 20px; padding: 0 8px; }
.admin .side img { background: #fff; border-radius: 6px; padding: 2px; }
.admin nav a { display: block; color: #fff; text-decoration: none; padding: 9px 12px; border-radius: 8px; opacity: .85; font-weight: 500; }
.admin nav a:hover { background: rgba(255,255,255,.1); opacity: 1; }
.admin nav a.on { background: rgba(255,255,255,.18); opacity: 1; font-weight: 700; }
.admin .side .foot { margin-top: 24px; padding: 0 8px; font-size: .85rem; }
.admin .side .foot a { color: #fff; opacity: .8; }
.admin main { padding: 28px 32px 80px; max-width: 1150px; width: 100%; }
.admin .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.admin .head h1 { font-size: 1.6rem; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .85rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: #fff; border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel h2 { font-size: 1.1rem; margin-bottom: .8em; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #faf9f6; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 180px; padding: .5em .75em; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.list-item.dragging { opacity: .4; }
.list-item.off { opacity: .55; }
.list-item .grip { cursor: grab; color: var(--muted); font-size: 1.2rem; user-select: none; padding: 0 4px; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .t { font-weight: 600; }
.list-item .s { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 99px; border: 1.5px solid var(--line); cursor: pointer; font-size: .85rem; background: #fff; user-select: none; }
.chip input { display: none; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 51; overflow-y: auto; padding: 24px; box-shadow: -8px 0 24px rgba(0,0,0,.15); }
.drawer .close { position: absolute; top: 14px; right: 14px; }
.kv { display: grid; grid-template-columns: 8em 1fr; gap: 6px 12px; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1d1d1f; color: #fff; padding: 10px 18px; border-radius: 99px; z-index: 100; font-size: .92rem; }
.login { max-width: 380px; margin: 12vh auto; padding: 0 16px; }
.swatch { width: 48px; height: 40px; padding: 2px; border-radius: 8px; border: 1.5px solid var(--line); cursor: pointer; }
.mini-bars .bar { grid-template-columns: 10em 1fr 2.5em; }
.week-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.week-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: .72rem; color: var(--muted); }
.week-chart .stack { width: 100%; max-width: 36px; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 0 0; overflow: hidden; }
.week-chart .stack div { width: 100%; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; background: var(--c); vertical-align: -1px; }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.mobile-nav { display: none; }

@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .admin .side { display: none; }
  .mobile-nav { display: flex; overflow-x: auto; gap: 4px; background: var(--brand); padding: 8px; position: sticky; top: 0; z-index: 30; }
  .mobile-nav a { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px; white-space: nowrap; font-size: .9rem; opacity: .85; }
  .mobile-nav a.on { background: rgba(255,255,255,.2); opacity: 1; font-weight: 700; }
  .admin main { padding: 18px 16px 80px; }
  .grid2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 420px) {
  .scale button { font-size: .68rem; }
  .bar { grid-template-columns: 7.5em 1fr 2.2em; }
  .card { padding: 18px; }
}

/* print (run kit) */
@media print {
  body { background: #fff; }
  .no-print, .admin .side, .mobile-nav { display: none !important; }
  .admin { display: block; }
  .admin main { padding: 0; max-width: none; }
  .panel { box-shadow: none; }
  .print-page { page-break-after: always; }
}
.team .tick { display: inline-block; width: 1.3em; color: var(--brand); font-weight: 800; }
.team:not(.on) .tick { width: 0; }
