/* Staff shell: the top bar, sidebar and page heading shared by the staff dashboard and the editor.
   Self-contained so the editor (which doesn't load site.css) looks identical. See docs/UI-STANDARD.md. */
:root {
  --s-blue: #3a5ba0; --s-teal: #1f3b4d; --s-teal-deep: #13252f; --s-mint: #f2c879;
  --s-blue-tint: color-mix(in srgb, var(--s-blue) 8%, #fff); --s-line: #dfe5e8; --s-ink: #1c1c1c; --s-charcoal: #424342;
  --s-nav-w: 260px;
}
.staff-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 28px; background: var(--s-teal-deep); color: #d7e3e8; border-bottom: 4px solid var(--s-blue);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
.staff-brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.staff-brand img { height: 44px; width: auto; }
.mark-on-dark { filter: brightness(0) invert(1); }  /* any church's mark, shown white on the dark bar */
.staff-brand > span { display: flex; flex-direction: column; line-height: 1.15; }
.staff-brand-name { font-family: Alatsi, Inter, sans-serif; font-size: 26px; color: #fff; }
.staff-brand-sub { font-size: 13px; color: var(--s-mint); }
.staff-user { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.staff-who { margin-right: 6px; }
.staff-who strong { color: #fff; font-weight: 600; }
.staff-top .inline-form { display: inline; margin: 0; }
.staff-top .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid #fff; background: transparent; color: #fff; text-decoration: none;
  font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; text-transform: none; letter-spacing: 0; }
.staff-top .btn:hover { background: #fff; color: var(--s-teal); }
.staff-top { position: relative; }
.staff-top .staff-back { position: absolute; left: 50%; transform: translateX(-50%); background: var(--s-mint); border-color: var(--s-mint); color: var(--s-teal-deep); }
.staff-top .staff-back:hover { background: color-mix(in srgb, var(--s-mint) 70%, #fff); border-color: color-mix(in srgb, var(--s-mint) 70%, #fff); color: var(--s-teal-deep); }
.staff-top a:focus-visible, .staff-top button:focus-visible, .staff-nav a:focus-visible { outline: 3px solid var(--s-mint); outline-offset: 2px; }

.staff-layout { display: flex; align-items: stretch; min-height: calc(100vh - 76px); }
.staff-nav { flex: 0 0 var(--s-nav-w); width: var(--s-nav-w); padding: 24px 16px 40px; background: var(--s-blue-tint);
  border-right: 1px solid var(--s-line); font-family: Inter, system-ui, sans-serif; }
.staff-top, .staff-top *, .staff-nav, .staff-nav * { box-sizing: border-box; }
.staff-nav ul { list-style: none; margin: 0 0 8px; padding: 0; }
.staff-nav li { list-style: none; margin: 0; padding: 0; }
.staff-nav-heading { margin: 20px 4px 6px; padding: 14px 8px 0; border-top: 1px solid color-mix(in srgb, var(--s-blue) 22%, #fff); line-height: 1.2;
  font-family: Alatsi, Inter, system-ui, sans-serif; font-size: 18px; font-weight: 400; letter-spacing: -0.01em; color: var(--s-teal-deep);
  display: flex; align-items: center; gap: 8px; }
.staff-nav-heading::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--s-blue); flex: none; }
.staff-nav ul:first-child + .staff-nav-heading, .staff-nav > .staff-nav-heading:first-child { border-top: 0; }
.staff-nav ul a { padding-left: 24px; }
.staff-nav ul:first-of-type a { padding-left: 12px; }
.staff-nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--s-teal); text-decoration: none;
  font-size: 15px; font-weight: 500; line-height: 1.3; }
.staff-nav a:hover { background: #fff; color: var(--s-blue); }
.staff-nav a[aria-current="page"] { background: var(--s-teal); color: #fff; font-weight: 600; }
.staff-main { flex: 1 1 auto; min-width: 0; padding: 32px 40px 64px; background: #fff; }
.staff-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.staff-head h1.h { font-size: 40px; line-height: 1.1; color: var(--s-teal); margin: 0; }
.staff-head .lead { margin-top: 8px; }
.staff-head .actions { margin-top: 0; }
.staff-main .messages { margin: -8px 0 24px; }
.staff-main .messages li { border-radius: 12px; text-align: left; padding: 12px 18px; }

.staff-menu-toggle { display: none; }
.staff-menu-toggle .alert-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: #d93025; color: #fff; font: 700 12px/1 Inter, sans-serif; }
@media (max-width: 900px) {
  .staff-top { padding: 12px 16px; }
  .staff-who { display: none; }
  .staff-top .staff-back { position: static; transform: none; order: 3; }
  .staff-layout { flex-direction: column; }
  /* Phones: a "Menu" bar showing the current page; tapping it opens the full grouped list. */
  .staff-menu-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 20px; border: 0;
    border-bottom: 1px solid var(--s-line); background: var(--s-blue-tint); color: var(--s-teal); font: 700 17px Inter, sans-serif; cursor: pointer; text-align: left; }
  .staff-menu-here { font-weight: 500; color: var(--s-charcoal); }
  .staff-menu-here::before { content: "\00b7"; margin-right: 10px; color: var(--s-blue); font-weight: 700; }
  .staff-menu-toggle .alert-dot { margin-left: auto; }
  .staff-menu-icon, .staff-menu-icon::before, .staff-menu-icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
  .staff-menu-icon { position: relative; }
  .staff-menu-icon::before, .staff-menu-icon::after { content: ""; position: absolute; left: 0; }
  .staff-menu-icon::before { top: -6px; } .staff-menu-icon::after { top: 6px; }
  .staff-menu-toggle[aria-expanded="true"] .staff-menu-icon { background: transparent; }
  .staff-menu-toggle[aria-expanded="true"] .staff-menu-icon::before { top: 0; transform: rotate(45deg); }
  .staff-menu-toggle[aria-expanded="true"] .staff-menu-icon::after { top: 0; transform: rotate(-45deg); }
  .staff-nav { width: auto; flex-basis: auto; padding: 8px 16px 16px; border-right: 0; border-bottom: 1px solid var(--s-line); }
  .staff-nav.can-collapse:not(.open) { display: none; }
  .staff-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; }
  .staff-nav ul:first-of-type a { padding-left: 12px; }
  .staff-main { padding: 24px 20px 48px; }
  .staff-head h1.h { font-size: 32px; }
}

.staff-nav .alert-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  margin-left: 8px; border-radius: 999px; background: #d93025; color: #fff; font: 700 12px/1 Inter, sans-serif; box-sizing: border-box; }

/* Guides */
.guide-search { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 16px; align-items: end; max-width: 920px; }
.guide-search .actions { margin: 0; }
.guide-group { margin-top: 36px; }
.guide-list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); max-width: 920px; }
.guide-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.guide-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.guide-link .h { color: var(--teal); }
.guide-link:hover .h { text-decoration: underline; }
.guide-body { max-width: 760px; font-size: 17px; }
.guide-body ol, .guide-body ul { padding-left: 1.4em; }
.guide-body li { margin: 6px 0; }
.guide-figure { margin: 24px 0 0; }
.guide-figure img { max-width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.guide-figure figcaption { margin-top: 6px; color: var(--charcoal); font-size: 15px; }
.image-row { align-items: end; }
.image-row .thumb { width: 120px; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.field.narrow { max-width: 260px; }
@media (max-width: 760px) { .guide-search { grid-template-columns: 1fr; } }
@media print {
  .staff-top, .staff-nav, .no-print, .page-head .actions, [data-print] { display: none !important; }
  .staff-main { padding: 0 !important; margin: 0 !important; }
  .staff-panel { border: 0; box-shadow: none; padding: 0; }
}

/* Website health (Server updates page) */
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.health-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; border-left-width: 6px; }
.health-card .label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: 14px; color: var(--charcoal); }
.health-card .h { margin: 6px 0 0; }
.health-card .muted { margin: 4px 0 0; font-size: 14px; }
.health-dot { width: 10px; height: 10px; border-radius: 50%; background: #127a3a; }
.health-card.is-ok { border-left-color: #127a3a; }
.health-card.is-warn { border-left-color: #b98900; } .is-warn .health-dot { background: #b98900; }
.health-card.is-bad { border-left-color: #d93025; background: #fff8f7; } .is-bad .health-dot { background: #d93025; }

/* Performance chart */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar-fill { display: block; width: 100%; min-height: 2px; background: var(--blue); border-radius: 3px 3px 0 0; }
.bar:hover .bar-fill { background: var(--teal); }
.bar-0 { height: 0%; }
.bar-1 { height: 1%; }
.bar-2 { height: 2%; }
.bar-3 { height: 3%; }
.bar-4 { height: 4%; }
.bar-5 { height: 5%; }
.bar-6 { height: 6%; }
.bar-7 { height: 7%; }
.bar-8 { height: 8%; }
.bar-9 { height: 9%; }
.bar-10 { height: 10%; }
.bar-11 { height: 11%; }
.bar-12 { height: 12%; }
.bar-13 { height: 13%; }
.bar-14 { height: 14%; }
.bar-15 { height: 15%; }
.bar-16 { height: 16%; }
.bar-17 { height: 17%; }
.bar-18 { height: 18%; }
.bar-19 { height: 19%; }
.bar-20 { height: 20%; }
.bar-21 { height: 21%; }
.bar-22 { height: 22%; }
.bar-23 { height: 23%; }
.bar-24 { height: 24%; }
.bar-25 { height: 25%; }
.bar-26 { height: 26%; }
.bar-27 { height: 27%; }
.bar-28 { height: 28%; }
.bar-29 { height: 29%; }
.bar-30 { height: 30%; }
.bar-31 { height: 31%; }
.bar-32 { height: 32%; }
.bar-33 { height: 33%; }
.bar-34 { height: 34%; }
.bar-35 { height: 35%; }
.bar-36 { height: 36%; }
.bar-37 { height: 37%; }
.bar-38 { height: 38%; }
.bar-39 { height: 39%; }
.bar-40 { height: 40%; }
.bar-41 { height: 41%; }
.bar-42 { height: 42%; }
.bar-43 { height: 43%; }
.bar-44 { height: 44%; }
.bar-45 { height: 45%; }
.bar-46 { height: 46%; }
.bar-47 { height: 47%; }
.bar-48 { height: 48%; }
.bar-49 { height: 49%; }
.bar-50 { height: 50%; }
.bar-51 { height: 51%; }
.bar-52 { height: 52%; }
.bar-53 { height: 53%; }
.bar-54 { height: 54%; }
.bar-55 { height: 55%; }
.bar-56 { height: 56%; }
.bar-57 { height: 57%; }
.bar-58 { height: 58%; }
.bar-59 { height: 59%; }
.bar-60 { height: 60%; }
.bar-61 { height: 61%; }
.bar-62 { height: 62%; }
.bar-63 { height: 63%; }
.bar-64 { height: 64%; }
.bar-65 { height: 65%; }
.bar-66 { height: 66%; }
.bar-67 { height: 67%; }
.bar-68 { height: 68%; }
.bar-69 { height: 69%; }
.bar-70 { height: 70%; }
.bar-71 { height: 71%; }
.bar-72 { height: 72%; }
.bar-73 { height: 73%; }
.bar-74 { height: 74%; }
.bar-75 { height: 75%; }
.bar-76 { height: 76%; }
.bar-77 { height: 77%; }
.bar-78 { height: 78%; }
.bar-79 { height: 79%; }
.bar-80 { height: 80%; }
.bar-81 { height: 81%; }
.bar-82 { height: 82%; }
.bar-83 { height: 83%; }
.bar-84 { height: 84%; }
.bar-85 { height: 85%; }
.bar-86 { height: 86%; }
.bar-87 { height: 87%; }
.bar-88 { height: 88%; }
.bar-89 { height: 89%; }
.bar-90 { height: 90%; }
.bar-91 { height: 91%; }
.bar-92 { height: 92%; }
.bar-93 { height: 93%; }
.bar-94 { height: 94%; }
.bar-95 { height: 95%; }
.bar-96 { height: 96%; }
.bar-97 { height: 97%; }
.bar-98 { height: 98%; }
.bar-99 { height: 99%; }
.bar-100 { height: 100%; }
.card-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0 0; font-size: 15px; }
.card-facts dt { font-weight: 600; color: var(--charcoal); }
.card-facts dd { margin: 0; }

/* Missing text checklist */
.missing-total { margin: 0 0 8px; font-size: 18px; }
.missing-group { margin-top: 32px; max-width: 980px; }
.missing-group h2 { display: flex; align-items: center; gap: 10px; }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--s-blue-tint); color: var(--s-teal); font-family: Inter, system-ui, sans-serif; font-size: 14px; font-weight: 600; }
.missing-list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.missing-list li { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.missing-list .actions { margin: 0; flex: none; }
.missing-what { margin: 0; }
.missing-text .meta, .missing-text .hint { margin: 2px 0 0; }
.tag-bad { background: #fde7e5; color: #8c1d18; }
@media (max-width: 760px) { .missing-list li { flex-direction: column; align-items: flex-start; } }

/* Sync status box (YouTube page) */
.sync-status { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; max-width: 820px; margin-bottom: 24px; padding: 18px 22px; border: 1px solid var(--line); border-left-width: 6px; border-radius: var(--radius-sm); background: #fff; }
.sync-status.is-ok { border-left-color: #127a3a; }
.sync-status.is-bad { border-left-color: #d93025; background: #fff8f7; }
.sync-status p { margin: 4px 0 0; }
.sync-status .h { margin: 0; }
.sync-status form { flex: none; }

/* Security page */
.sec-section { margin-top: 40px; max-width: 1040px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.plain-list { margin: 10px 0 0; padding-left: 1.2em; }
.plain-list li { margin: 4px 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--s-teal); }
.health-card .muted { margin-top: 6px; }

/* Needs attention: each problem with the button that fixes it */
.attention-list { list-style: none; margin: 12px 0 0; padding: 0; }
.attention-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #f3d4d0; }
.attention-list li:first-child { border-top: 0; }
.attention-text { flex: 1; }
.attention-list .is-urgent .attention-text, .attention-list li.is-urgent .attention-text { font-weight: 600; color: #8c1d18; }
.attention-list .btn { flex: none; }
/* A link to a specific job or section briefly highlights it */
.job-row:target, .sec-section:target, .sync-status:target, [id]:target > .h { scroll-margin-top: 24px; }
.job-row:target { outline: 3px solid var(--s-blue); outline-offset: 4px; border-radius: 10px; animation: target-flash 2s ease-out; }
@keyframes target-flash { from { background: color-mix(in srgb, var(--s-blue) 12%, #fff); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .job-row:target { animation: none; } }
@media (max-width: 640px) { .attention-list li { flex-wrap: wrap; } }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; background: var(--s-blue-tint); padding: 2px 6px; border-radius: 6px; }
.secret-key { margin: 10px 0 0; padding: 16px 18px; border: 2px dashed var(--s-teal); border-radius: var(--radius-sm); background: #fff; font-family: ui-monospace, Consolas, monospace; font-size: 15px; word-break: break-all; }
@media print { .secret-key { border: 2px solid #000; } }
.staff-version { margin: 28px 0 0; padding: 14px 12px 0; border-top: 1px solid color-mix(in srgb, var(--s-blue) 25%, #fff); font-size: 13px; line-height: 1.5; color: #424342; }
.staff-nav .staff-version a { display: inline; padding: 0; margin: 0; background: none; color: var(--s-teal); font-weight: 600; text-decoration: underline; }
/* Users and positions */
.access-summary { margin-top: 16px; padding: 16px 20px; border-radius: 12px; background: color-mix(in srgb, var(--s-mint) 25%, #fff); }
.access-summary p { margin: 4px 0; font-size: 15px; }
.team-box { margin-top: 16px; padding: 20px; border: 1px solid #d7e0e8; border-radius: 12px; }
.team-box-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.position-warning { margin: 6px 0 0; font-size: 14px; color: #6b4e00; }
.team-section-card { margin-top: 28px; padding: 20px; border: 1px solid #d7e0e8; border-radius: 12px; }
.team-section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.team-section-head h2 { margin: 0; }
.sort-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sort-form select { border: 1px solid #8a979d; border-radius: 10px; padding: 8px 12px; font: inherit; }
.order-btns { display: inline-flex; gap: 6px; }
.order-btns form { display: inline; }
.nav-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 8px; border-radius: 999px; background: var(--blue, var(--s-blue)); color: #fff; font-size: 12px; font-weight: 700; }
.tabs-row { margin: 0 0 24px; }
/* Tabs: folder tabs joined to a line, for sibling pages of one topic (Social media). Not buttons. */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 32px; padding: 0 4px; border-bottom: 2px solid var(--s-teal); }
.tabs .tab { position: relative; bottom: -2px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
  font-weight: 600; font-size: 16px; color: var(--s-teal); text-decoration: none; background: var(--s-blue-tint);
  border: 2px solid color-mix(in srgb, var(--s-blue) 25%, #fff); border-bottom-color: var(--s-teal); border-radius: 10px 10px 0 0; }
.tabs .tab:hover { background: color-mix(in srgb, var(--s-blue) 14%, #fff); }
.tabs .tab[aria-current="page"] { background: #fff; color: var(--s-ink); border-color: var(--s-teal);
  border-bottom-color: #fff; box-shadow: inset 0 4px 0 var(--s-blue); }
.tabs .tab:focus-visible { outline: 3px solid var(--s-blue); outline-offset: 2px; }
.attention-list li.is-urgent .btn-blue { color: #fff; }
.positions-table .tag { display: inline-block; margin: 4px 0 0; white-space: nowrap; }
.positions-table td:first-child .tag { display: table; margin-left: 0; }

/* Page layout (Pages > Page layout): one row per section, segmented Show / Short / Hide choices. */
.phone-length { background: var(--s-blue-tint); border-left: 4px solid var(--s-blue); border-radius: 10px; padding: 14px 18px; margin: 0 0 20px; font-size: 15px; }
.sec-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sec-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; background: #fff;
  border: 1px solid color-mix(in srgb, var(--s-blue) 18%, #fff); border-radius: 14px; padding: 14px 18px; scroll-margin-top: 20px; }
.sec-row:target { box-shadow: 0 0 0 3px var(--s-blue); }
.sec-text h2 { margin: 0; font-size: 19px; color: var(--s-teal); }
.sec-text .hint { margin: 2px 0 0; }
.sec-row .order-btns { display: flex; flex-direction: column; gap: 6px; }
.sec-row .order-btns .btn { min-width: 40px; min-height: 40px; padding: 0; }
.order-fixed { display: block; width: 40px; }
.sec-ctl { display: grid; grid-template-columns: auto auto; gap: 8px 12px; align-items: center; justify-items: start; }
.sec-ctl .dev { display: contents; border: 0; margin: 0; padding: 0; }
.sec-ctl .dev-label { display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: 14px; font-weight: 600; color: var(--s-charcoal); }
.seg { display: inline-flex; border: 2px solid var(--s-teal); border-radius: 999px; overflow: hidden; }
.seg-opt { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 600;
  color: var(--s-teal); background: #fff; cursor: pointer; }
.seg-opt + .seg-opt { border-left: 1px solid var(--s-teal); }
.seg-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg-opt:has(input:checked) { background: var(--s-teal); color: #fff; }
.seg-opt.seg-hide:has(input:checked) { background: #8c1d18; }
.seg-opt:has(input:focus-visible) { outline: 3px solid var(--s-blue); outline-offset: 2px; z-index: 1; }
.short-note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--s-charcoal); max-width: 360px; }
.short-note .mini { font-size: 16px; min-height: 40px; padding: 4px 8px; margin: 0 4px; border-radius: 8px; border: 1px solid #8a979d; background: #fff; }
.sec-ctl .always { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--s-charcoal); }
@media (max-width: 900px) {
  .sec-row { grid-template-columns: auto minmax(0, 1fr); }
  .sec-ctl { grid-column: 1 / -1; }
}

/* Church settings tabs (Brand, Service times, What we believe) */
.form-card { background: #fff; border: 1px solid var(--s-line, #e3e6e8); border-radius: 14px; padding: 20px 22px; margin: 0 0 18px; }
.form-card h2 { margin: 0 0 4px; font-size: 20px; color: var(--s-teal); }
.form-card > .hint { margin: 0 0 16px; }
.up-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.up { border: 1px dashed color-mix(in srgb, var(--s-blue) 45%, #fff); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.up .thumb { width: 100%; height: 96px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #f4f6f7; overflow: hidden; }
.up .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.up .thumb.photo img { width: 100%; height: 100%; object-fit: cover; }
.up .thumb.dark { background: var(--s-teal-deep); }
.up b { font-size: 15px; } .up small { font-size: 13px; color: #424342; }
.up .file-name { font-size: 13px; color: #424342; word-break: break-all; }
.up input[type=file] { font-size: 16px; max-width: 100%; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.sw { display: flex; flex-direction: column; gap: 6px; }
.sw .chip-row { display: flex; gap: 8px; align-items: center; }
.sw input[type=color] { font-size: 16px; width: 48px; height: 44px; padding: 2px; border: 1px solid #8a979d; border-radius: 8px; background: #fff; }
.sw input[type=text] { font-size: 16px; padding: 8px; border: 1px solid #8a979d; border-radius: 8px; width: 110px; min-height: 44px; }
.sw b { font-size: 15px; } .sw small { font-size: 13px; color: #424342; }
.read-ok { color: #1d6b3a; font-weight: 600; font-size: 13px; } .read-bad { color: var(--danger, #8c1d18); font-weight: 600; font-size: 13px; }
.fontrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.font-opt { border: 2px solid color-mix(in srgb, var(--s-blue) 18%, #fff); border-radius: 12px; padding: 10px 14px; min-width: 160px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.font-opt:has(input:checked) { border-color: var(--s-teal); background: var(--s-blue-tint); }
.font-opt input { margin-top: 6px; width: 20px; height: 20px; }
.font-opt .d { font-size: 22px; color: var(--s-teal); line-height: 1.2; } .font-opt .t { font-size: 13px; color: #424342; }
.preview { --pv-main: var(--s-blue); --pv-dark: var(--s-teal); --pv-darkest: var(--s-teal-deep); --pv-hi: var(--s-mint); --pv-display: var(--display, Inter, sans-serif);
  border-radius: 12px; overflow: hidden; border: 1px solid #e3e6e8; }
.pv-hero { background: var(--pv-dark); color: #fff; padding: 22px; }
.pv-hero h3 { font-family: var(--pv-display); font-size: 28px; margin: 0; }
.pv-hero p { margin: 6px 0 12px; color: var(--pv-hi); }
.pv-btn { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--pv-hi); color: var(--pv-darkest); font-weight: 600; font-size: 14px; }
.pv-card { background: var(--pv-main); color: #fff; padding: 14px 22px; font-weight: 600; }
.pv-foot { background: var(--pv-darkest); color: #fff; padding: 12px 22px; font-size: 14px; }
table.svc { width: 100%; border-collapse: collapse; }
table.svc th { text-align: left; font-size: 13px; color: #424342; padding: 6px 8px; border-bottom: 1px solid #e3e6e8; }
table.svc td { padding: 8px; border-bottom: 1px solid #eef1f6; vertical-align: middle; font-size: 15px; }
table.svc input:not([type=checkbox]):not([type=radio]), table.svc select { font-size: 16px; padding: 6px 8px; border: 1px solid #8a979d; border-radius: 8px; min-height: 44px; background: #fff; max-width: 100%; }
table.svc input[type=radio], table.svc input[type=checkbox] { width: 22px; height: 22px; }
table.svc input.num { width: 90px; }
table.svc th { white-space: nowrap; }
.belief-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.belief-list li { display: flex; gap: 8px; align-items: center; background: #f8fafd; border: 1px solid #e3e9f5; border-radius: 10px; padding: 8px 10px; }
.belief-list li .n { width: 24px; color: #424342; font-size: 13px; flex: none; }
.belief-list li input[type=text] { flex: 1; min-width: 0; font-size: 16px; padding: 6px 8px; border: 1px solid #c5cfdf; border-radius: 8px; min-height: 44px; }
.belief-list li .remove { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.belief-list li .remove input { width: 20px; height: 20px; }
.set-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
@media (max-width: 760px) {
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .up-grid { grid-template-columns: 1fr; gap: 10px; }
  .up { display: grid; grid-template-columns: 104px 1fr; column-gap: 12px; row-gap: 6px; align-items: start; padding: 10px; }
  .up .thumb { grid-row: span 6; height: 80px; }
  .up > *:not(.thumb) { grid-column: 2; justify-self: start; }
  .fontrow { grid-template-columns: 1fr; }
  .font-opt { min-width: 0; }
  .form-card { padding: 16px 14px; }
  table.svc thead { display: none; }
  table.svc tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid #e3e6e8; }
  table.svc td { border: 0; padding: 0; }
  table.svc td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; color: #424342; margin-bottom: 2px; }
  table.svc td.svc-name { grid-column: 1 / -1; }
  table.svc input:not([type=checkbox]):not([type=radio]), table.svc select { width: 100%; }
}
.field-error { margin: 0; color: var(--danger, #8c1d18); font-size: 14px; font-weight: 600; }
.font-opt .t { display: block; }

.ff-inter { font-family: Inter, system-ui, sans-serif; } .ff-alatsi { font-family: Alatsi, Inter, sans-serif; }
.ff-merriweather { font-family: Merriweather, Georgia, serif; } .ff-montserrat { font-family: Montserrat, system-ui, sans-serif; }
.ff-lora { font-family: Lora, Georgia, serif; }

/* Pages (Staff dashboard > Pages): one box per page, one compact row per part */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; max-width: 1000px; }
.pcard { background: #fff; border: 1px solid #e3e6e8; border-radius: 12px; overflow: hidden; }
.pcard-head { display: flex; align-items: baseline; gap: 10px; padding: 9px 14px; background: var(--s-blue-tint); border-bottom: 1px solid color-mix(in srgb, var(--s-blue) 12%, #fff); }
.pcard-head h2 { margin: 0; font-size: 18px; color: var(--s-teal); font-family: var(--display); }
.pcard-view { margin-left: auto; font-size: 13px; color: var(--s-teal); font-weight: 600; }
.pp-list { list-style: none; margin: 0; padding: 0; }
.pp { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid #eef1f6; min-height: 44px; }
.pp:last-child { border-bottom: 0; }
.pp-text { flex: 1; min-width: 0; font-size: 15px; line-height: 1.3; }
.pp-text b { font-weight: 600; color: #1c1c1c; }
.pp-text small { color: #424342; font-size: 13px; margin-left: 8px; }
.pp-count { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--s-blue-tint); color: var(--s-teal); font-size: 12px; font-weight: 700; }
.pp-where { font-size: 12px; color: var(--s-blue); font-weight: 600; margin-left: 4px; }
.pp-edit { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--s-teal); color: var(--s-teal); font-weight: 600; font-size: 13px; text-decoration: none; flex: none; }
.pp-edit:hover, .pp-edit:focus-visible { background: var(--s-teal); color: #fff; }
.pp-edit.is-disabled { box-shadow: inset 0 0 0 2px #b8c2c6; color: #6b7478; }
@media (max-width: 900px) {
  .pgrid { grid-template-columns: 1fr; }
  .pp { padding: 4px 12px; }
  .pp-text small { display: block; margin-left: 0; }
  .pcard-view { min-height: 40px; display: inline-flex; align-items: center; }
  .pp-edit { min-height: 40px; }
}
.sec-off { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--s-blue); }

/* Modules (Staff dashboard > Modules): one row per module with Set up and an On/Off switch */
.mrow { display: flex; align-items: center; gap: 12px; padding: 7px 14px; border-bottom: 1px solid #eef1f6; min-height: 48px; }
.mrow:last-child { border-bottom: 0; }
.mtext { flex: 1; min-width: 0; line-height: 1.3; }
.mtext b { font-size: 15px; font-weight: 600; color: #1c1c1c; display: block; }
.mtext small { font-size: 13px; color: #424342; display: block; }
.mtext .mnote { color: var(--s-blue); font-weight: 600; }
.mrow.is-off .mtext b, .mrow.is-off .mtext small:not(.mnote) { color: #5d6669; }
.switch-form { margin: 0; flex: none; }
.switch { display: inline-flex; align-items: center; gap: 6px; width: 72px; min-height: 40px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.switch span { width: 40px; height: 24px; border-radius: 999px; background: #8a979d; position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.is-on span { background: var(--s-teal); }
.switch.is-on span::after { left: 19px; }
.switch b { font-size: 13px; color: #424342; font-weight: 600; }
.switch:focus-visible { outline: 3px solid var(--s-blue); outline-offset: 2px; border-radius: 8px; }
.sw-lock { flex: none; width: 150px; font-size: 13px; color: #5d6669; text-align: right; line-height: 1.25; }
.always-on { max-width: 1000px; margin-top: 14px; background: #f4f6f7; border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.always-on summary { font-weight: 600; color: var(--s-teal); cursor: pointer; min-height: 40px; display: flex; align-items: center; }
@media (max-width: 900px) { .sw-lock { width: 100px; } .mrow { padding: 6px 12px; } }
@media (prefers-reduced-motion: reduce) { .switch span, .switch span::after { transition: none; } }

/* Set up your website (first sign-in steps) and the dashboard's Finish setting up card */
.finish-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid #e3e6e8; border-left: 6px solid var(--s-blue); border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; max-width: 760px; }
.finish-card h2 { margin: 0; color: var(--s-teal); font-size: 22px; }
.finish-card p { margin: 2px 0 0; font-size: 15px; }
.finish-card .btn { margin-left: auto; }
.steps-bar { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-width: 1080px; }
.steps-bar a, .steps-bar span.st { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 6px; border-radius: 999px; background: #f4f6f7; font-size: 14px; color: #424342; text-decoration: none; }
.steps-bar .dot { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid #8a979d; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.steps-bar .done .dot { background: var(--s-teal); border-color: var(--s-teal); color: #fff; }
.steps-bar [aria-current] { background: var(--s-blue-tint); color: var(--s-teal); font-weight: 600; }
.steps-bar [aria-current] .dot { border-color: var(--s-blue); color: var(--s-blue); }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 18px; max-width: 1080px; align-items: start; }
.setup-grid.one { grid-template-columns: minmax(0, 760px); }
.row-up { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef1f6; }
.row-up .thumb { width: 96px; height: 62px; border-radius: 8px; background: #f4f6f7; display: grid; place-items: center; overflow: hidden; flex: none; }
.row-up .thumb.dark { background: var(--s-teal-deep); }
.row-up .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.row-up .thumb.photo img { width: 100%; height: 100%; object-fit: cover; }
.row-up b { display: block; font-size: 15px; }
.row-up small { display: block; font-size: 13px; color: #424342; margin-bottom: 4px; }
.setup-mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.setup-mods h3 { grid-column: 1 / -1; margin: 12px 0 2px; font-size: 16px; color: var(--s-teal); }
.setup-mods label { display: flex; gap: 10px; align-items: flex-start; min-height: 40px; padding: 4px 0; font-size: 15px; }
.setup-mods input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.setup-mods small { display: block; color: #424342; font-size: 13px; }
.belief-sets label { display: flex; gap: 10px; align-items: center; min-height: 40px; font-size: 16px; }
.belief-sets input { width: 20px; height: 20px; }
.pv-aside { position: sticky; top: 12px; }
@media (max-width: 900px) {
  .setup-grid { grid-template-columns: 1fr; }
  .pv-aside { position: static; }
  .setup-mods { grid-template-columns: 1fr; }
  .steps-bar a:not([aria-current]) { gap: 0; padding: 4px; }
  .steps-bar a:not([aria-current]) .st-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.setup-grid .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Menu and footer (Staff dashboard > Pages > Menu and footer): rows of links with live previews */
.pgrid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; max-width: 1040px; margin-bottom: 16px; }
.pcard-sub { margin-left: auto; font-size: 13px; color: #424342; }
.mlist { list-style: none; margin: 0; padding: 0; }
.ml { display: flex; align-items: center; gap: 8px; padding: 5px 14px; border-bottom: 1px solid #eef1f6; min-height: 44px; }
.ml .ml-name { flex: 1; font-size: 15px; color: #1c1c1c; }
.ml-src { font-size: 12px; color: #4f585b; background: #f4f6f7; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ml input[type=text] { font-size: 16px; padding: 6px 8px; border: 1px solid #8a979d; border-radius: 8px; min-height: 40px; min-width: 0; flex: 1; }
.ml .rm { font-size: 13px; display: flex; gap: 4px; align-items: center; white-space: nowrap; min-height: 40px; }
.ml .rm input { width: 18px; height: 18px; }
.new-tag { font-size: 12px; color: #4f585b; }
.mlist + .col, .pv-foot2 + .col { border-top: 0; }
.col { margin: 0; padding: 10px 14px 4px; font-size: 15px; color: var(--s-teal); background: #fafbfc; border-bottom: 1px solid #eef1f6; }
.pad { padding: 8px 14px; margin: 0; }
.pv-menu { padding: 12px 14px; border-bottom: 1px solid #eef1f6; background: #fafbfc; position: relative; }
.pv-tag { position: absolute; top: 6px; right: 10px; font-size: 12px; font-weight: 700; color: #4f585b; }
.pv-tag.light { color: #dfe9ec; }
.pv-bar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e3e6e8; border-radius: 10px; padding: 8px 10px; margin-top: 12px; }
.pv-bar img { height: 24px; width: auto; }
.pv-bar b { font-size: 13px; color: var(--s-teal); white-space: nowrap; }
.pv-bar nav { margin-left: auto; display: flex; gap: 9px; align-items: center; font-size: 12px; color: #1c1c1c; flex-wrap: wrap; justify-content: flex-end; }
.pv-bar .give { background: var(--s-blue); color: #fff; border-radius: 999px; padding: 3px 9px; font-weight: 600; }
.pv-menu .yours, .pv-foot2 .yours { outline: 2px solid var(--s-mint); outline-offset: 2px; border-radius: 4px; }
.pv-note { margin: 6px 0 0; font-size: 13px; color: #4f585b; }
.pv-foot2 { background: var(--s-teal-deep); color: #fff; padding: 26px 14px 12px; position: relative; }
.pv-foot2 .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; font-size: 12px; }
.pv-foot2 b { display: block; font-size: 12px; margin-bottom: 4px; color: var(--s-mint); }
.pv-foot2 span { display: block; line-height: 1.6; color: #e8eef0; }
@media (max-width: 900px) { .pgrid2 { grid-template-columns: 1fr; } .pv-foot2 .cols { grid-template-columns: repeat(2, 1fr); } .ml { flex-wrap: wrap; } }

/* Website visits */
.chg { font-weight: 600; }
.chg.rise { color: #1a7f37; }
.chg.fall { color: #b42318; }
.toplist { list-style: none; margin: 0; padding: 0; }
.toplist li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.toplist li > span:last-child { font-variant-numeric: tabular-nums; color: #424342; }
.toplist small { display: block; color: #5c5d5c; font-size: 13px; }
.bar-chart.spark { align-self: stretch; width: 100%; box-sizing: border-box; height: 56px; padding: 6px; gap: 2px; margin: 6px 0 10px; }

/* License revoked or paused (apps/core/license_gate.py) */
.license-banner { background: #fdecea; border: 1px solid #e3a59f; color: #7a1d14; border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; }
