/* Nightbird Ministries: site styles. No inline styles anywhere (the security policy forbids them),
   so everything the templates need is a class here. To change brand colors, edit the :root block. */
:root {
  --ink: #1b2340;
  --night: #121a33;
  --night-2: #1e2850;
  --gold: #e3a92b;
  --gold-soft: #f7d060;
  --gold-deep: #9a6b00;
  --paper: #f6f7fb;
  --card: #ffffff;
  --line: #dde1ee;
  --text: #1f2540;
  --muted: #5a6280;
  --ok: #1d6b45;
  --ok-bg: #e5f4ec;
  --err: #a12a2a;
  --err-bg: #fbeaea;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --info-bg: #e8edfb;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--text); background: var(--paper); }
img, video { max-width: 100%; height: auto; }
a { color: #24408f; text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ink); margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin-top: 1.6em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin: 0.35em 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--gold); color: var(--ink); padding: 0.6em 1em; border-radius: 6px; }
[hidden] { display: none !important; }

.container { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 40rem); margin-inline: auto; }
.medium { width: min(100% - 2rem, 52rem); margin-inline: auto; }
.section { padding: 2.5rem 0; }
.page-head { padding: 2.2rem 0 0.6rem; }
.page-head p { color: var(--muted); max-width: 40rem; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.inline { display: inline; margin: 0; }
.prose { max-width: 42rem; font-family: var(--serif); font-size: 1.12rem; line-height: 1.75; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.5em; }

/* Header */
.site-header { background: var(--night); color: #fff; position: sticky; top: 0; z-index: 30; border-bottom: 3px solid var(--gold); }
.site-header .bar { display: flex; align-items: center; gap: 1rem; padding: 0.55rem 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; margin-right: auto; }
.brand:hover { color: var(--gold-soft); }
.primary-nav { display: flex; gap: 0.2rem; flex-wrap: wrap; }
.primary-nav a, .account-nav a { color: #e8ebf7; text-decoration: none; padding: 0.4rem 0.7rem; border-radius: 6px; font-size: 0.97rem; }
.primary-nav a:hover, .account-nav a:hover { background: var(--night-2); color: #fff; }
.primary-nav a[aria-current="page"] { background: var(--night-2); box-shadow: inset 0 -2px 0 var(--gold); }
.account-nav { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.nav-toggle { display: none; background: transparent; color: #fff; border: 1px solid #5b6590; border-radius: 6px; padding: 0.4rem 0.8rem; font: inherit; }
.link-button { background: none; border: 0; padding: 0.4rem 0.6rem; color: #e8ebf7; font: inherit; text-decoration: underline; cursor: pointer; }
.admin .link-button, main .link-button { color: #24408f; }
.site-header .link-button { color: #e8ebf7; }
@media (max-width: 62rem) {
  .nav-toggle { display: inline-block; }
  .primary-nav { display: none; width: 100%; flex-direction: column; order: 5; }
  .primary-nav.open { display: flex; }
  .account-nav { order: 4; }
}

.announcement { background: var(--gold); color: var(--ink); padding: 0.55rem 0; text-align: center; font-weight: 600; }
.announcement.warn { background: var(--warn-bg); color: var(--warn); font-weight: 500; }
.flashes { padding-top: 1rem; }

/* Buttons and forms */
.btn { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; padding: 0.65rem 1.2rem; border-radius: 8px; border: 2px solid var(--ink); background: transparent; color: var(--ink); line-height: 1.2; }
.btn:hover { background: var(--ink); color: #fff; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); }
.btn-danger { border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-small { padding: 0.35rem 0.8rem; font-size: 0.92rem; }
.btn-block { display: block; width: 100%; }
.btn[disabled], .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.field { margin-bottom: 1.1rem; }
.field label, .label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.hint { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="datetime-local"], input[type="number"], input[type="tel"], input[type="url"], input[type="search"], input[type="file"], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff; border: 1.5px solid #aab1cc; border-radius: 8px; padding: 0.6rem 0.75rem; }
textarea { min-height: 7rem; resize: vertical; }
textarea.tall { min-height: 16rem; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.8rem; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.25rem; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 1.2rem; background: #fff; }
legend { font-weight: 700; padding: 0 0.4rem; }
.form-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.2rem; }

/* Cards, alerts, badges, tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card h3 { margin-top: 0; }
.card.gold { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.card.soon { background: #eef0f8; border-style: dashed; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--ink); }
.alert { padding: 0.85rem 1rem; border-radius: 8px; border: 1px solid; margin: 0 0 1rem; }
.alert-success { background: var(--ok-bg); border-color: #9ccfb4; color: #124a2e; }
.alert-error { background: var(--err-bg); border-color: #e3a6a6; color: #7c1d1d; }
.alert-warn { background: var(--warn-bg); border-color: #e6c372; color: #5e3d00; }
.alert-info { background: var(--info-bg); border-color: #b5c3ee; color: #1b2a63; }
.alert ul { margin: 0.3rem 0 0 1.1rem; padding: 0; }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 99px; background: #e8ebf7; color: var(--ink); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.gold { background: #fdeebc; color: var(--gold-deep); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eef0f8; font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.price { font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius); background: #fff; }

/* Home */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #2c3a78 0%, transparent 60%), var(--night); color: #fff; padding: 3.5rem 0 4rem; position: relative; overflow: hidden; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero p { color: #d3d9f0; max-width: 36rem; font-size: 1.15rem; }
.hero .big-star { position: absolute; right: -2rem; top: 1.5rem; width: min(46vw, 22rem); opacity: 0.95; }
.hero .row { margin-top: 1.4rem; }
.hero .btn { border-color: #fff; color: #fff; }
.hero .btn:hover { background: #fff; color: var(--ink); }
.hero .btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.hero .btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); }
@media (max-width: 40rem) { .hero .big-star { opacity: 0.22; } }
.feature-band { background: var(--night-2); color: #fff; padding: 2.5rem 0; }
.feature-band h2, .feature-band h3 { color: #fff; margin-top: 0; }
.feature-band blockquote { color: #fdf3d3; }
.feature-band a { color: var(--gold-soft); }
.quote { font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; border-left: 4px solid var(--gold); margin: 1.2rem 0; padding: 0.2rem 0 0.2rem 1.1rem; }
.quote cite { display: block; font-family: var(--sans); font-size: 0.9rem; font-style: normal; color: var(--muted); margin-top: 0.4rem; }
.feature-band .quote cite { color: #c3cbea; }
.soon-tag { font-size: 0.8rem; font-weight: 700; color: var(--gold-deep); }

/* Footer */
.site-footer { background: var(--night); color: #cdd3ec; margin-top: 4rem; padding: 2.5rem 0 1.5rem; }
.site-footer a { color: #e8ebf7; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; color: #fff; margin: 0 0 0.4rem; }
.footer-head { font-weight: 700; color: #fff; margin: 0 0 0.5rem; }
.fine { margin-top: 2rem; font-size: 0.88rem; color: #98a1c8; }

/* Aurora guide */
.aurora { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; }
.aurora-fab { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--gold); color: var(--ink); border: 0; border-radius: 99px; padding: 0.7rem 1.1rem; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(18, 26, 51, 0.35); }
.aurora-fab:hover { background: var(--gold-soft); }
.aurora-panel { position: absolute; right: 0; bottom: 3.6rem; width: min(92vw, 22rem); background: #fff; border: 2px solid var(--gold); border-radius: 14px; box-shadow: 0 10px 34px rgba(18, 26, 51, 0.35); overflow: hidden; }
.aurora-panel header { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.6rem 0.9rem; background: var(--night); color: #fff; }
.aurora-panel header strong { color: var(--gold-soft); font-family: var(--serif); font-size: 1.1rem; }
.aurora-panel header .muted { color: #b7c0e6; font-size: 0.85rem; }
.aurora-close { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.aurora-log { max-height: 18rem; overflow-y: auto; padding: 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; }
.msg-a, .msg-u { padding: 0.55rem 0.8rem; border-radius: 12px; max-width: 92%; font-size: 0.97rem; }
.msg-a { background: #eef0f8; align-self: flex-start; }
.msg-a.safety { background: var(--err-bg); border: 1px solid #e3a6a6; }
.msg-u { background: var(--ink); color: #fff; align-self: flex-end; }
.msg-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.msg-links a, .chip { display: inline-block; border: 1.5px solid var(--ink); color: var(--ink); background: #fff; padding: 0.2rem 0.7rem; border-radius: 99px; font-size: 0.88rem; text-decoration: none; cursor: pointer; font-family: inherit; }
.msg-links a:hover, .chip:hover { background: var(--ink); color: #fff; }
.aurora-form { display: flex; gap: 0.4rem; padding: 0 0.8rem 0.5rem; }
.aurora-form input { flex: 1; }
.aurora-note { font-size: 0.78rem; color: var(--muted); margin: 0; padding: 0 0.8rem 0.7rem; }
@media (max-width: 40rem) { .aurora-fab span { display: none; } }

/* Services and booking */
.service-card .price { margin: 0.5rem 0; }
.slot-list { display: grid; gap: 0.5rem; }
.slot { display: flex; gap: 0.6rem; align-items: center; padding: 0.6rem 0.8rem; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.slot input { width: 1.1rem; height: 1.1rem; }
.slot:has(input:checked) { border-color: var(--ink); background: #fbf4dd; }
.privacy-box { background: #eef0f8; border-radius: var(--radius); padding: 0.9rem 1rem; font-size: 0.95rem; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; padding-left: 2.6rem; position: relative; margin-bottom: 1rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--ink); color: #fff; text-align: center; line-height: 1.9rem; font-weight: 700; }

/* Newsletter */
.issue-head { background: var(--night); color: #fff; padding: 2.5rem 0; }
.issue-head h1 { color: #fff; margin-bottom: 0.3rem; }
.issue-head p { color: #d3d9f0; max-width: 40rem; }
.figure { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.figure:last-child { border-bottom: 0; }
.figure img { border-radius: var(--radius); }
.figure-years { color: var(--muted); font-size: 0.95rem; }

/* Store */
.book { display: flex; flex-direction: column; gap: 0.5rem; }
.book .cover { aspect-ratio: 3 / 4; background: linear-gradient(160deg, var(--night), var(--night-2)); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--gold-soft); font-family: var(--serif); padding: 1rem; text-align: center; overflow: hidden; }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.qty { width: 5rem; }
.totals { max-width: 22rem; margin-left: auto; }
.totals div { display: flex; justify-content: space-between; padding: 0.3rem 0; }
.totals .grand { font-weight: 700; border-top: 2px solid var(--ink); margin-top: 0.4rem; padding-top: 0.6rem; font-size: 1.15rem; }

/* Chat */
.chat-shell { display: grid; grid-template-rows: auto 1fr auto; height: calc(100vh - 9rem); min-height: 28rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-top { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); background: #eef0f8; display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.chat-top select { width: auto; }
.chat-log { overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem; background: #fbfbfe; }
.cmsg { max-width: min(100%, 34rem); padding: 0.55rem 0.85rem; border-radius: 12px; background: #eef0f8; align-self: flex-start; overflow-wrap: anywhere; }
.cmsg.mine { background: #fbf0cc; align-self: flex-end; }
.cmsg .who { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.cmsg .when { font-weight: 400; margin-left: 0.4rem; }
.cmsg .text { white-space: pre-wrap; }
.cmsg .translated { margin-top: 0.35rem; padding-top: 0.35rem; border-top: 1px dashed #aab1cc; color: #24408f; white-space: pre-wrap; }
.cmsg .tools { margin-top: 0.3rem; display: flex; gap: 0.8rem; }
.tool-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 0.85rem; color: #24408f; text-decoration: underline; cursor: pointer; }
.chat-form { display: flex; gap: 0.6rem; padding: 0.7rem; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 2.8rem; height: 2.8rem; flex: 1; }
.chat-notice { font-size: 0.85rem; color: var(--muted); padding: 0 0.8rem 0.6rem; }
.rules { font-size: 0.92rem; }

/* Barter, games, leaderboard */
.post-card .meta { color: var(--muted); font-size: 0.9rem; }
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { padding: 0.4rem 0.9rem; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.answers { display: grid; gap: 0.6rem; }
.answer { text-align: left; font: inherit; padding: 0.8rem 1rem; border-radius: 8px; border: 2px solid var(--line); background: #fff; cursor: pointer; }
.answer:hover:not(:disabled) { border-color: var(--ink); }
.answer.right { border-color: var(--ok); background: var(--ok-bg); }
.answer.wrong { border-color: var(--err); background: var(--err-bg); }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--gold); width: 0; transition: width 0.3s; }
.progress > span[data-w="10"] { width: 10%; } .progress > span[data-w="20"] { width: 20%; } .progress > span[data-w="30"] { width: 30%; }
.progress > span[data-w="40"] { width: 40%; } .progress > span[data-w="50"] { width: 50%; } .progress > span[data-w="60"] { width: 60%; }
.progress > span[data-w="70"] { width: 70%; } .progress > span[data-w="80"] { width: 80%; } .progress > span[data-w="90"] { width: 90%; } .progress > span[data-w="100"] { width: 100%; }

/* Pray Now */
.timer { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--err); }
.waiver { max-height: 26rem; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.safety-box { background: var(--err-bg); border: 2px solid #e3a6a6; border-radius: var(--radius); padding: 0.9rem 1rem; }
.safety-box strong { color: var(--err); }

/* Staff, time clock */
.clock-card { text-align: center; padding: 2rem 1rem; }
.clock-time { font-family: var(--serif); font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.policy-box { background: #fdf7e3; border: 1px solid #ecd48a; border-radius: var(--radius); padding: 0.9rem 1rem; font-size: 0.96rem; }

/* Admin */
.admin-shell { display: grid; grid-template-columns: 15rem 1fr; gap: 2rem; padding: 1.5rem 0 3rem; }
.admin-side { font-size: 0.95rem; }
.side-head { font-weight: 700; margin: 1.2rem 0 0.3rem; color: var(--muted); }
.side-head:first-child { margin-top: 0; }
.admin-side a { display: block; text-decoration: none; padding: 0.3rem 0.6rem; border-radius: 6px; color: var(--ink); }
.admin-side a:hover { background: #e3e7f5; }
.admin-side a[aria-current="page"] { background: var(--ink); color: #fff; }
.admin-main { min-width: 0; }
.admin-main h1 { font-size: 1.9rem; }
.kpis { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; }
.kpi .n { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1; }
.kpi.high { border-color: #e3a6a6; background: #fff7f7; }
.checklist li { padding: 0.4rem 0; display: flex; gap: 0.6rem; align-items: baseline; }
.dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--err); }
@media (max-width: 52rem) { .admin-shell { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .aurora, .admin-side, .btn { display: none !important; } }
