:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b616b;
  --line: #d9d5cc;
  --brand: #2d4a7a;
  --brand-ink: #ffffff;
  --brand-soft: #e6ecf6;
  --accent: #8a5a12;
  --danger: #a32020;
  --ok-bg: #e5f3e8; --ok-ink: #1d5a2b;
  --info-bg: #e6eef9; --info-ink: #1e3f73;
  --err-bg: #fbeaea; --err-ink: #8a1c1c;
  --tag-communication: #1e5f8a;
  --tag-visit: #2c6e3f;
  --tag-counseling: #6b3d8a;
  --radius: 10px;
  --focus: #e0a100;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #15171b; --surface: #1e2127; --text: #e9e7e2; --muted: #a8adb6; --line: #383d46;
    --brand: #8fb0e8; --brand-ink: #10141b; --brand-soft: #24324a; --accent: #e0b265; --danger: #f08080;
    --ok-bg: #1d3524; --ok-ink: #a8e0b4; --info-bg: #1d2a40; --info-ink: #b4ccf0; --err-bg: #3a1f1f; --err-ink: #f4b4b4;
    --tag-communication: #6cb4e6; --tag-visit: #79c78f; --tag-counseling: #c39be0;
    color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #15171b; --surface: #1e2127; --text: #e9e7e2; --muted: #a8adb6; --line: #383d46;
    --brand: #8fb0e8; --brand-ink: #10141b; --brand-soft: #24324a; --accent: #e0b265; --danger: #f08080;
    --ok-bg: #1d3524; --ok-ink: #a8e0b4; --info-bg: #1d2a40; --info-ink: #b4ccf0; --err-bg: #3a1f1f; --err-ink: #f4b4b4;
    --tag-communication: #6cb4e6; --tag-visit: #79c78f; --tag-counseling: #c39be0;
    color-scheme: dark; }


* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.8rem; margin: .4em 0 .5em; }
h2 { font-size: 1.3rem; margin: 1.4em 0 .5em; }
h3 { font-size: 1.08rem; margin: .2em 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
main { padding-bottom: 32px; }
main:focus { outline: none; }

/* Header */
.topbar { background: var(--brand); color: var(--brand-ink); }
.topbar a, .topbar .linklike { color: var(--brand-ink); }
.topbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.brand-sub { font-weight: 400; opacity: .85; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; list-style: none; margin: 0; padding: 0; }
.nav a, .nav .linklike { display: inline-block; padding: 8px 10px; border-radius: 6px; text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.18); font-weight: 600; text-decoration: underline; }
.nav a:hover, .nav .linklike:hover { background: rgba(255,255,255,.12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav a[aria-current="page"] { background: rgba(0,0,0,.18); }
}
:root[data-theme="dark"] .nav a[aria-current="page"] { background: rgba(0,0,0,.18); }

.linklike { background: none; border: 0; font: inherit; cursor: pointer; }
form.inline { display: inline; margin: 0; }

.footer { color: var(--muted); font-size: .9rem; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); }

/* Buttons */
.button {
  display: inline-block; background: var(--brand); color: var(--brand-ink); border: 2px solid var(--brand);
  border-radius: 8px; padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  min-height: 44px; line-height: 1.3; text-align: center;
}
.button:hover { filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--brand); }
.button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.button.small { padding: 6px 12px; min-height: 36px; font-size: .95rem; }
.button.big { padding: 14px 18px; width: 100%; }
.button:disabled { opacity: .6; cursor: wait; }

/* Layout pieces */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.panel, .danger-zone, .card, .person-card, .entry > article {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.panel { margin: 16px 0; }
.panel > h2:first-child { margin-top: 0; }
.danger-zone { margin: 32px 0 16px; border-color: var(--danger); }
.danger-zone h2 { margin-top: 0; color: var(--danger); }
.two-col { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } .two-col > .panel { margin: 0; } }
.crumbs { margin: 16px 0 0; }

.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 2.1rem; max-width: 22ch; }
.lead { font-size: 1.15rem; max-width: 60ch; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.cards { list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.quick-add { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* Flash + errors */
.flashes { margin-top: 16px; }
.flash { padding: 12px 16px; border-radius: 8px; margin: 8px 0; overflow-wrap: anywhere; }
.flash-success { background: var(--ok-bg); color: var(--ok-ink); }
.flash-info { background: var(--info-bg); color: var(--info-ink); }
.flash-error { background: var(--err-bg); color: var(--err-ink); }
.errors { background: var(--err-bg); color: var(--err-ink); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.errors h2 { font-size: 1.05rem; margin: 0 0 4px; }
.errors ul { margin: 0; padding-left: 20px; }

/* Forms */
.form { max-width: 760px; }
.form.narrow { max-width: 460px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px 4px; margin: 0 0 16px; background: var(--surface); }
legend { font-weight: 700; padding: 0 6px; }
.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.hint { color: var(--muted); font-size: .92rem; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date],
input[type=datetime-local], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1.5px solid #8a8f98; border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; }
.radios { display: flex; flex-wrap: wrap; gap: 6px 10px; padding-bottom: 12px; }
.radio { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 500; }
.radio:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.radio input, .check input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { flex: none; margin-top: 3px; }
.grid2, .grid3 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 2fr 1fr 1fr; } }
.form-actions, .loc-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.hp { position: absolute; left: -9999px; }
.filters { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; margin-bottom: 8px; }
.filters .field { flex: 1 1 200px; }
.filters .button { margin-bottom: 14px; }

/* People */
.people-list { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.person-card p { margin: 4px 0; }
.person-name { font-size: 1.1rem; margin: 0 0 2px; }
.meta { color: var(--muted); font-size: .93rem; margin: 2px 0; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.details dt { font-weight: 600; }
.details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .details { grid-template-columns: 1fr; } .details dd { margin-bottom: 6px; } }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tabs a { padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }

/* Entries */
.entries { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.entry > article { border-left: 5px solid var(--line); }
.entry-communication > article { border-left-color: var(--tag-communication); }
.entry-visit > article { border-left-color: var(--tag-visit); }
.entry-counseling > article { border-left-color: var(--tag-counseling); }
.entry p { margin: 6px 0; }
.entry h4 { margin: 10px 0 2px; font-size: .95rem; }
.entry-h { font-size: 1.05rem; }
.summary { font-weight: 500; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1.5px solid currentColor; margin-right: 6px; vertical-align: 2px; color: var(--muted); }
.tag-communication { color: var(--tag-communication); }
.tag-visit { color: var(--tag-visit); }
.tag-counseling { color: var(--tag-counseling); }
details summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: 4px 0; }
.followup { font-weight: 600; color: var(--accent); }
.followup.done { color: var(--muted); font-weight: 400; text-decoration: line-through; }
.actions { margin-top: 8px !important; }

.simple-list { list-style: none; padding: 0; margin: 0; }
.simple-list > li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.simple-list > li p { margin: 0 0 4px; }
.simple-list > li.overdue { border-left: 5px solid var(--danger); }

.stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; min-width: 150px; flex: 1 1 150px; }
.stat-num { display: block; font-size: 1.9rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.stat-label { color: var(--muted); }

/* Admin table */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--brand-soft); }

@media print {
  .topbar, .footer, .button, form, .skip, .tabs { display: none !important; }
  body { background: #fff; color: #000; }
  details > *:not(summary) { display: block; }
}

/* Import */
.import-col { padding-bottom: 0; }
.import-col .field { margin-bottom: 12px; }
.preview-list > li { margin-bottom: 10px; }
.preview-list ul { margin: 4px 0 0; padding-left: 20px; color: var(--muted); }
.dates { margin-bottom: 16px; }

/* Module navigation */
.nav a[aria-current="true"] { background: rgba(255,255,255,.12); font-weight: 600; }
.subnav { background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.subnav-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 6px; padding-bottom: 6px; }
.subnav-title { font-weight: 700; color: var(--text); font-size: .95rem; }
.subnav ul { display: flex; flex-wrap: wrap; gap: 2px 4px; list-style: none; margin: 0; padding: 0; }
.subnav a { display: inline-block; padding: 6px 10px; border-radius: 6px; color: var(--brand); text-decoration: none; }
.subnav a:hover { text-decoration: underline; }
.subnav a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); font-weight: 600; }

/* Toolbox home */
.modules { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .modules { grid-template-columns: 1fr 1fr; } }
.module { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--brand); border-radius: var(--radius); padding: 16px 20px; }
.module h2 { margin-top: 0; }
.module-facts { padding-left: 20px; }
.module .quick-add { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* Series colors: --sc is the strong color, --sc-bg the row tint. */
.sc-blue   { --sc: #1f5fbf; --sc-bg: #e3edfb; }
.sc-green  { --sc: #237a3b; --sc-bg: #e2f3e6; }
.sc-purple { --sc: #6c3fb0; --sc-bg: #eee6f9; }
.sc-orange { --sc: #c25a00; --sc-bg: #fdeedd; }
.sc-red    { --sc: #b3261e; --sc-bg: #fbe5e3; }
.sc-teal   { --sc: #0b7a7a; --sc-bg: #def3f2; }
.sc-gold   { --sc: #9a7400; --sc-bg: #fbf2d3; }
.sc-pink   { --sc: #b5326f; --sc-bg: #fbe4ef; }
.sc-brown  { --sc: #7a4a26; --sc-bg: #f2e7dd; }
.sc-navy   { --sc: #1b2f6b; --sc-bg: #e2e6f3; }
.sc-olive  { --sc: #5f6b12; --sc-bg: #eef0d9; }
.sc-gray   { --sc: #5b616b; --sc-bg: #ebecee; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sc-blue { --sc: #7fb0f5; --sc-bg: #1c2a40; }
  :root:not([data-theme="light"]) .sc-green { --sc: #79c78f; --sc-bg: #1b3022; }
  :root:not([data-theme="light"]) .sc-purple { --sc: #b79af0; --sc-bg: #2a2140; }
  :root:not([data-theme="light"]) .sc-orange { --sc: #f3a35c; --sc-bg: #3a2814; }
  :root:not([data-theme="light"]) .sc-red { --sc: #f08a82; --sc-bg: #3d1e1c; }
  :root:not([data-theme="light"]) .sc-teal { --sc: #6fd0cc; --sc-bg: #14322f; }
  :root:not([data-theme="light"]) .sc-gold { --sc: #e3c25a; --sc-bg: #352d12; }
  :root:not([data-theme="light"]) .sc-pink { --sc: #f08cbb; --sc-bg: #3a1c2b; }
  :root:not([data-theme="light"]) .sc-brown { --sc: #d4a47c; --sc-bg: #33251a; }
  :root:not([data-theme="light"]) .sc-navy { --sc: #9bb0ea; --sc-bg: #1b2238; }
  :root:not([data-theme="light"]) .sc-olive { --sc: #c3cf6a; --sc-bg: #2a2e13; }
  :root:not([data-theme="light"]) .sc-gray { --sc: #b3b8c0; --sc-bg: #2a2d33; }
}
:root[data-theme="dark"] .sc-blue { --sc: #7fb0f5; --sc-bg: #1c2a40; }
  :root[data-theme="dark"] .sc-green { --sc: #79c78f; --sc-bg: #1b3022; }
  :root[data-theme="dark"] .sc-purple { --sc: #b79af0; --sc-bg: #2a2140; }
  :root[data-theme="dark"] .sc-orange { --sc: #f3a35c; --sc-bg: #3a2814; }
  :root[data-theme="dark"] .sc-red { --sc: #f08a82; --sc-bg: #3d1e1c; }
  :root[data-theme="dark"] .sc-teal { --sc: #6fd0cc; --sc-bg: #14322f; }
  :root[data-theme="dark"] .sc-gold { --sc: #e3c25a; --sc-bg: #352d12; }
  :root[data-theme="dark"] .sc-pink { --sc: #f08cbb; --sc-bg: #3a1c2b; }
  :root[data-theme="dark"] .sc-brown { --sc: #d4a47c; --sc-bg: #33251a; }
  :root[data-theme="dark"] .sc-navy { --sc: #9bb0ea; --sc-bg: #1b2238; }
  :root[data-theme="dark"] .sc-olive { --sc: #c3cf6a; --sc-bg: #2a2e13; }
  :root[data-theme="dark"] .sc-gray { --sc: #b3b8c0; --sc-bg: #2a2d33; }

.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: var(--sc, var(--line)); margin-right: 6px; vertical-align: -1px; }
.swatch.big { width: 22px; height: 22px; vertical-align: -3px; }

/* Yearly planner */
.year-nav, .month-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.month-jump a { padding: 4px 10px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; }
.legend ul { list-style: none; padding: 0; margin: 4px 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.legend-h { font-size: 1rem; margin: 12px 0 0; }
.planner-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.planner { min-width: 1000px; font-size: .95rem; }
.planner th, .planner td { padding: 8px 10px; }
.planner thead th { position: sticky; top: 0; z-index: 1; }
.planner .c-date { white-space: nowrap; font-weight: 600; min-width: 140px; }
.planner .c-title { font-weight: 600; min-width: 180px; }
.planner td { overflow-wrap: anywhere; }
.plan-row[class*="sc-"] > * { background: var(--sc-bg); }
.plan-row[class*="sc-"] > .c-date { box-shadow: inset 6px 0 0 var(--sc); }
.plan-row.past { opacity: .82; }
.plan-row.this-sunday > .c-date { box-shadow: inset 6px 0 0 var(--focus); }
.plan-row.empty .plan-link { font-weight: 400; color: var(--muted); }
.month-row th { background: var(--brand); color: var(--brand-ink); font-size: 1rem; letter-spacing: .02em; }
.observance { display: block; font-weight: 500; font-size: .82rem; color: var(--accent); white-space: normal; }
.observance-note { color: var(--accent); font-weight: 600; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; margin-left: 4px; border-radius: 999px; background: var(--focus); color: #1f2328; }

/* Phones: each planner row becomes a card. Explicit ARIA roles keep it a table for screen readers. */
@media (max-width: 760px) {
  .planner-wrap { overflow: visible; border: 0; background: none; }
  .planner { min-width: 0; display: block; background: none; }
  .planner thead { display: none; }
  .planner tbody { display: block; }
  .planner tr { display: block; margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
  .planner th, .planner td { display: block; border: 0; padding: 4px 14px; }
  .planner td:empty { display: none; }
  .planner td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
  .planner .c-title::before { content: none !important; }
  .planner .c-date { padding-top: 10px; }
  .planner tr > :last-child { padding-bottom: 10px; }
  .plan-row[class*="sc-"] { border-left: 6px solid var(--sc); }
  .plan-row[class*="sc-"] > .c-date, .plan-row.this-sunday > .c-date { box-shadow: none; }
  .plan-row.this-sunday { outline: 3px solid var(--focus); }
  .month-row { border: 0 !important; margin-top: 18px !important; }
  .month-row th { border-radius: 8px; padding: 8px 14px; }
}

/* Series + documents */
.series-list { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.series-list li { background: var(--sc-bg); border: 1px solid var(--line); border-left: 6px solid var(--sc); border-radius: var(--radius); padding: 12px 16px; }
.series-list h2 { font-size: 1.1rem; margin: 0 0 4px; }
.series-list p { margin: 4px 0; }
.file-list { list-style: none; padding: 0; margin: 0 0 12px; }
.file-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.inline-check { display: inline-flex; gap: 6px; align-items: center; margin-left: 10px; font-weight: 400; }
.inline-check input { width: 18px; height: 18px; }

@media print {
  .subnav, .year-nav, .month-jump, .page-head .head-actions { display: none !important; }
  .planner { min-width: 0; font-size: 9pt; }
  .planner-wrap { overflow: visible; border: 0; }
  .plan-row > * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Letters & Certificates */
.template-list { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.template-list h3 { margin-top: 0; }
.shortcodes { list-style: none; padding: 0; display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.shortcodes li { display: flex; align-items: center; gap: 8px; }
.shortcodes .button { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; min-width: 150px; text-align: left; }
textarea.letter-body { font-family: Georgia, 'Times New Roman', serif; line-height: 1.5; }
.recipient-list { list-style: none; margin: 0 0 12px; padding: 8px 12px; max-height: 360px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); columns: 260px; }
.recipient-list li { break-inside: avoid; padding: 3px 0; }
.recipient-list label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.recipient-list input { width: 20px; height: 20px; accent-color: var(--brand); }
.logo-thumb { max-height: 90px; max-width: 260px; background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: 6px; }
.add-from-dir { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: flex-end; }
.add-from-dir .field { flex: 1 1 260px; }
.add-from-dir .button { margin-bottom: 14px; }
.cert-types .button.big { text-align: left; }
details.panel > summary { font-size: 1.05rem; }

@page cert { size: letter landscape; margin: 0; }
@media print {
  @page { margin: 0; }
  .no-print, .flashes, .crumbs, .subnav { display: none !important; }
  main.wrap { max-width: none; padding: 0; }
  .screen-preview .cert { page: cert; }
}
.subnav-tagline { font-weight: 400; color: var(--muted); }
@media (min-width: 1100px) { .modules { grid-template-columns: repeat(3, 1fr); } }

/* Dashboard */
.sermon-card h2 { margin-top: 0; margin-bottom: 2px; }
.sermon-plan { border-left: 5px solid var(--sc, var(--line)); padding: 4px 0 4px 12px; margin: 10px 0; }
.sermon-plan h3 { font-size: 1.15rem; margin: 0 0 6px; }
.data-table caption { text-align: left; color: var(--muted); padding: 0 0 6px; font-size: .92rem; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody th { font-weight: 500; }
.data-table tr.total th, .data-table tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.data-table tr.extra th, .data-table tr.extra td { color: var(--muted); }
.tools { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.report-list { list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.report-list h3 { margin-top: 0; }
@media (max-width: 480px) { .stats-table th, .stats-table td { padding: 6px 5px; font-size: .92rem; } }

/* Admin dashboard */
.admin-stats li a { display: block; text-decoration: none; color: inherit; }
.admin-stats li.attention { border-color: var(--danger); border-width: 2px; }
.admin-stats li.attention .stat-num { color: var(--danger); }

/* =====================================================================
   Visual refresh (Oct 2026): logo header, Poppins headings, soft cards,
   gold accent, icons. Overrides the earlier rules above.
   ===================================================================== */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/Poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/Poppins-700.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/Poppins-800.woff2') format('woff2'); }

:root {
  --bg: #f7f6f2;
  --line: #e3ded3;
  --brand: #1f3a68;
  --brand-soft: #e9eef7;
  --heading: #17284a;
  --gold: #c8962e;
  --gold-soft: #fbf3e2;
  --gold-ink: #6b4c0e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 40, 74, .05), 0 6px 20px rgba(23, 40, 74, .07);
  --shadow-hover: 0 2px 4px rgba(23, 40, 74, .06), 0 12px 28px rgba(23, 40, 74, .12);
  --heading-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #12151a; --surface: #1b2028; --line: #2f3642; --brand: #8fb0e8; --brand-ink: #10141b; --brand-soft: #222c3d;
    --heading: #f0f2f7; --gold: #e0b265; --gold-soft: #2d2617; --gold-ink: #f0cf8e;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-hover: 0 4px 16px rgba(0,0,0,.45); }
}
:root[data-theme="dark"] { --bg: #12151a; --surface: #1b2028; --line: #2f3642; --brand: #8fb0e8; --brand-ink: #10141b; --brand-soft: #222c3d;
    --heading: #f0f2f7; --gold: #e0b265; --gold-soft: #2d2617; --gold-ink: #f0cf8e;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-hover: 0 4px 16px rgba(0,0,0,.45); }


h1, h2, h3, .stat-num, .brand-word { font-family: var(--heading-font); color: var(--heading); letter-spacing: -0.01em; }
h1 { font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.15rem); }
h2 { font-weight: 700; }
h3 { font-weight: 600; }
.icon { width: 1.15em; height: 1.15em; vertical-align: -0.18em; flex: none; }

/* Header: white, so the black-frame logo stands out */
.topbar { background: var(--surface); color: var(--text); box-shadow: 0 1px 0 var(--line), 0 4px 18px rgba(23, 40, 74, .06); position: relative; z-index: 2; }
.topbar a, .topbar .linklike { color: var(--text); }
.topbar-inner { padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; height: 58px; width: auto; }
@media (max-width: 480px) { .brand img { height: 48px; } }
.brand-word { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--gold-ink); background: var(--gold-soft); border: 1.5px solid var(--gold); border-radius: 999px; padding: 3px 10px 2px; }
.nav a, .nav .linklike { font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav .linklike:hover { background: var(--brand-soft); }
.nav a[aria-current="page"], .nav a[aria-current="true"] { background: none; color: var(--brand); font-weight: 700; text-decoration: none; box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav a[aria-current="page"], :root:not([data-theme="light"]) .nav a[aria-current="true"] { background: none; color: #fff; }
}
:root[data-theme="dark"] .nav a[aria-current="page"], :root[data-theme="dark"] .nav a[aria-current="true"] { background: none; color: #fff; }

.subnav { background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.subnav-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--heading-font); font-weight: 600; color: var(--heading); }
.subnav-title .icon { color: var(--gold); }
.subnav a[aria-current="page"] { border-radius: 8px; }

/* Cards and panels: soft shadows instead of hard borders */
.panel, .card, .person-card, .entry > article, .simple-list > li, .stats li, .module, .series-list li, .danger-zone, fieldset, .planner-wrap, table:not(.planner):not(.rp-table) {
  border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
table:not(.planner):not(.rp-table) { overflow: hidden; }
.card, .person-card, .module { transition: box-shadow .15s ease, transform .15s ease; }
.card:hover, .person-card:hover, .module:hover { box-shadow: var(--shadow-hover); }
fieldset { box-shadow: none; }
.module { border-top: 0; padding: 20px 22px; }
.stats li { padding: 14px 18px; }
.stat-num { font-weight: 800; }

/* Buttons */
.button { border-radius: 10px; box-shadow: 0 1px 2px rgba(23, 40, 74, .12); transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(23, 40, 74, .18); filter: none; }
.button.secondary { background: var(--surface); box-shadow: none; }
.button.secondary:hover { background: var(--brand-soft); }
.button.gold { background: var(--gold); border-color: var(--gold); color: #1e1606; }
.button.large { padding: 14px 26px; font-size: 1.08rem; }
@media (prefers-reduced-motion: reduce) { .button, .card, .module { transition: none; } .button:hover { transform: none; } }

/* Footer */
.footer { margin-top: 48px; padding: 0; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 22px; padding-bottom: 26px; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin: 0; }
.footer-brand .icon { color: var(--gold); }
.footer-links { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.footer-note { width: 100%; margin: 0; font-size: .85rem; }

/* Section headings with an icon badge */
.icon-badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex: none; }
.icon-badge .icon { width: 24px; height: 24px; }
.icon-badge.gold { background: var(--gold-soft); color: var(--gold-ink); }
.heading-with-icon { display: flex; align-items: center; gap: 12px; }
.heading-with-icon h2, .heading-with-icon h1 { margin: 0; }

/* ---------- Public home page ---------- */
main.full { padding-bottom: 0; }
.band { padding: 56px 0; }
.band.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-head { max-width: 760px; margin-bottom: 26px; }
.band-head .heading-with-icon { margin-bottom: 10px; }
.band-head p { font-size: 1.1rem; color: var(--muted); margin: 0; }
.eyebrow { display: inline-block; font-family: var(--heading-font); font-weight: 600; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold-soft); border-radius: 999px; padding: 5px 12px; margin: 0 0 14px; }

.hero-band { padding: 56px 0 64px; background: radial-gradient(1200px 500px at 85% -10%, rgba(200, 150, 46, .16), transparent 60%), linear-gradient(180deg, var(--brand-soft), var(--bg)); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 920px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.hero-band h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.12; margin: 0 0 16px; max-width: 16ch; }
.hero-band .lead { font-size: 1.18rem; color: var(--text); opacity: .85; max-width: 52ch; }
.hero-band .cta { margin: 22px 0 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 14px 0 0; color: var(--muted); font-size: .95rem; }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .icon { color: var(--gold); }

/* Product preview drawn with HTML (no screenshot needed) */
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(23, 40, 74, .35), var(--shadow); overflow: hidden; transform: rotate(-0.6deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #d6d2c8; }
.mock-bar span:nth-child(1) { background: #e8776b; } .mock-bar span:nth-child(2) { background: #e9c25a; } .mock-bar span:nth-child(3) { background: #7cc47f; }
.mock-bar em { margin-left: 10px; font-style: normal; font-size: .8rem; color: var(--muted); }
.mock-body { padding: 16px; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.mock-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); }
.mock-card.wide { grid-column: 1 / -1; }
.mock-label { font-family: var(--heading-font); font-weight: 600; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.mock-title { font-family: var(--heading-font); font-weight: 700; color: var(--heading); margin: 0; line-height: 1.25; }
.mock-sub { font-size: .85rem; color: var(--muted); margin: 2px 0 0; }
.mock-series { border-left: 4px solid #6c3fb0; padding-left: 10px; }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .88rem; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.mock-row:last-child { border-bottom: 0; }
.mock-pill { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); white-space: nowrap; }
.mock-pill.red { background: #fbe5e3; color: #9b2c22; }
.mock-bars { display: flex; align-items: flex-end; gap: 10px; height: 70px; margin-top: 6px; }
.mock-bars div { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--brand); opacity: .85; }
.mock-bars div:nth-child(2n) { background: var(--gold); }
.mock-legend { display: flex; gap: 10px; font-size: .72rem; color: var(--muted); margin-top: 6px; }
.mock-legend span { flex: 1; text-align: center; }

.tool-strip { list-style: none; padding: 0; margin: -36px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); position: relative; }
.tool-strip a { display: flex; gap: 12px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: box-shadow .15s ease, transform .15s ease; }
.tool-strip a:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tool-strip strong { display: block; font-family: var(--heading-font); color: var(--heading); }
.tool-strip small { color: var(--muted); }

.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.feature-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.band.alt .feature-grid li { background: var(--bg); box-shadow: none; }
.feature-grid h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.05rem; }
.feature-grid h3 .icon { color: var(--gold); width: 22px; height: 22px; }
.feature-grid p { margin: 0; color: var(--muted); }

.split { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 920px) { .split { grid-template-columns: 1fr 1fr; } }
.sample-cert { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 24px 50px -18px rgba(23, 40, 74, .45); transform: rotate(1.2deg); background: #fbf7ee; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon { color: var(--gold); margin-top: 3px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.steps li { position: relative; padding: 22px 20px 20px 74px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-family: var(--heading-font); font-weight: 800; }
.steps h3 { margin: 0 0 4px; }
.steps p { margin: 0; color: var(--muted); }

.privacy-band { background: linear-gradient(135deg, #1f3a68, #17284a); color: #e9eef8; }
.privacy-band h2, .privacy-band h3 { color: #fff; }
.privacy-band .icon-badge { background: rgba(255, 255, 255, .12); color: var(--gold); }
.privacy-band .band-head p { color: #c9d4ea; }
.privacy-band .feature-grid li { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); box-shadow: none; }
.privacy-band .feature-grid p { color: #c9d4ea; }
.privacy-band a { color: #fff; }

.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 8px; }
.cta-band p { color: var(--muted); font-size: 1.1rem; margin: 0 auto 20px; max-width: 46ch; }
.cta-band .cta { justify-content: center; }

/* ---------- Signed-in dashboard ---------- */
.dash-tiles { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.dash-tiles li { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.dash-tiles .stat-num { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--brand); }
.dash-tiles .stat-label { color: var(--muted); font-size: .9rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 32px 0 12px; }
.section-head .heading-with-icon h2 { font-size: 1.25rem; }
.section-head .icon-badge { width: 38px; height: 38px; border-radius: 10px; }
.section-head .icon-badge .icon { width: 20px; height: 20px; }
.sermon-card .heading-with-icon { margin-bottom: 4px; }
.tool-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tool-cards a { display: flex; gap: 12px; align-items: center; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.tool-cards a:hover { box-shadow: var(--shadow-hover); }
.tool-cards strong { display: block; font-family: var(--heading-font); color: var(--heading); }
.tool-cards small { color: var(--muted); }
.mock-bars .b1 { height: 80%; } .mock-bars .b2 { height: 55%; } .mock-bars .b3 { height: 40%; } .mock-bars .b4 { height: 25%; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .steps li::before { color: #10141b; }
  :root:not([data-theme="light"]) .mock-bars div { opacity: 1; }
}
:root[data-theme="dark"] .steps li::before { color: #10141b; }
  :root[data-theme="dark"] .mock-bars div { opacity: 1; }


/* Theme toggle, logo per theme, and fixes */
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .9rem; color: var(--text); cursor: pointer; min-height: 38px; }
.theme-toggle:hover { background: var(--brand-soft); }
.brand img { height: 56px; }
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
  :root:not([data-theme="light"]) .button.secondary { color: #e9eef8; border-color: #8fb0e8; background: transparent; }
}
:root[data-theme="dark"] .button.secondary { color: #e9eef8; border-color: #8fb0e8; background: transparent; }

/* Prayer list */
.prayer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.prayer-item > article { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.prayer-item.answered > article { border-left-color: var(--tag-visit); }
.prayer-who { font-size: 1.05rem; margin: 0 0 4px; }
.prayer-text { margin: 0 0 6px; font-size: 1.05rem; }
.prayer-answer { display: flex; gap: 8px; align-items: flex-start; background: var(--gold-soft); color: var(--text); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.prayer-answer .icon { color: var(--gold); margin-top: 3px; }
.prayer-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-top: 8px; }
.prayer-actions details { flex: 1 1 100%; }
.prayer-actions details[open] { background: var(--bg); border-radius: 10px; padding: 10px; }
.prayer-actions summary.button { list-style: none; display: inline-block; }
.prayer-actions summary::-webkit-details-marker { display: none; }
.dash-tiles .tile-link { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }

/* Two-step sign-in */
.mfa-banner { position: sticky; bottom: 0; z-index: 5; background: var(--surface); border-top: 3px solid var(--gold); box-shadow: 0 -8px 24px rgba(23, 40, 74, .12); }
.mfa-banner-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 14px; padding-bottom: 14px; }
.mfa-banner-text { flex: 1 1 320px; }
.mfa-banner-text h2 { font-size: 1.05rem; margin: 0 0 2px; }
.mfa-banner-text p { margin: 0; color: var(--muted); }
.mfa-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.passkey-signin { max-width: 460px; margin-top: 18px; }
.passkey-signin .button { width: 100%; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 0 0 14px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.narrow-panel { max-width: 560px; }
.narrow-panel h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.narrow-check { max-width: 560px; }
.code-input { font-size: 1.5rem !important; letter-spacing: .3em; max-width: 220px; font-variant-numeric: tabular-nums; }
/* An email reminder link lands on the follow-up it is about. */
.entry:target > article, .entry.focused > article { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Private vault */
.recovery-panel { border: 2px solid var(--gold); background: var(--gold-soft); }
.recovery-panel h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.recovery-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: clamp(1.1rem, 3.4vw, 1.6rem); font-weight: 700; letter-spacing: .08em; background: var(--surface); border: 1.5px dashed var(--gold); border-radius: 10px; padding: 14px 16px; overflow-wrap: anywhere; color: var(--heading); }
.recovery-input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
@media print { .recovery-panel { display: block !important; } .recovery-panel .button { display: none !important; } }

/* Add to calendar menu */
.cal-menu { display: inline-block; position: relative; margin: 6px 0; }
.cal-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cal-menu > summary::-webkit-details-marker { display: none; }
.cal-menu ul { list-style: none; margin: 6px 0 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-hover); min-width: 260px; }
.cal-menu li a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; }
.cal-menu li a:hover, .cal-menu li a:focus { background: var(--brand-soft); }
.feed-url { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; overflow-wrap: anywhere; background: var(--bg); border: 1.5px dashed var(--line); border-radius: 8px; padding: 10px 12px; }

/* FAQ */
.faq-title { margin-top: 8px; }
.faq-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.faq-topics a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 500; }
.faq-topics a:hover { background: var(--brand-soft); }
.faq-topics .icon { color: var(--gold); }
.faq-group { margin-top: 34px; scroll-margin-top: 16px; }
.faq-group .heading-with-icon { margin-bottom: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; box-shadow: var(--shadow); }
.band.alt .faq-item { background: var(--bg); box-shadow: none; }
.faq-item > summary { cursor: pointer; list-style: none; padding: 14px 48px 14px 18px; font-family: var(--heading-font); font-weight: 600; color: var(--heading); position: relative; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+" / ""; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--gold); }
.faq-item[open] > summary::after { content: "−" / ""; }
.faq-item[open] > summary { border-bottom: 1px solid var(--line); }
.faq-answer { padding: 4px 18px 10px; }
.faq-answer p, .faq-answer ul { margin: 10px 0; }
.faq-short { max-width: 860px; margin-bottom: 16px; }
.faq-more { margin-top: 36px; }
.pk-vault { margin: 2px 0 6px; color: var(--muted); }
.pk-vault.on { display: flex; align-items: center; gap: 6px; color: var(--tag-visit); font-weight: 600; }

/* One-tap quick log on the People list, and its confirmation */
.quicklog { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.quicklog-done { margin: 10px 0 0; }
.quicklog-done p { margin: 0 0 8px; }
.quicklog-done form { margin: 0; }
/* In the hospital, on a person's page */
.hospital-status { border-left: 4px solid var(--danger); }

/* ---------- iPhone app: bottom tool bar instead of the header menu ---------- */
.in-app .topbar { padding-top: env(safe-area-inset-top); }
.in-app .topbar-inner { padding-top: 6px; padding-bottom: 6px; }
.in-app.has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.tabbar ul { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0; padding: 0; max-width: 640px; margin-inline: auto; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; }
.tabbar a .icon { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--brand); }
.tabbar a[aria-current="page"] span { text-decoration: underline; text-underline-offset: 3px; }
.more-list { list-style: none; margin: 0 0 20px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.more-list li + li { border-top: 1px solid var(--line); }
.more-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 48px; text-decoration: none; color: inherit; font-weight: 600; }
/* A solid strip behind the iPhone's clock and battery, so scrolled text never shows through. */
.in-app::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--surface); z-index: 60; }

/* Demo account: always says the data is made up */
.demo-banner { margin: 0; padding: 10px 16px; text-align: center; background: var(--accent); color: #1b1b1b; font-weight: 500; }
.demo-banner a { color: #1b1b1b; }
