/* rohibrowser.com: the app's own palette and fonts (packages/ui tokens): warm paper,
   Literata for display, Hanken Grotesk for text. One reading column; legal pages are long-form. */
:root {
  --bg: #faf7f2; --card: #ffffff; --ink: #2b2620; --muted: #6d6253; --line: #ece5d9;
  --church: #61a3e6; --missions: #2f7d47; --missions-soft: #e4f2e7; --draft: #8a5a12; --draft-soft: #fbefd6;
  --display: "Literata", Georgia, "Times New Roman", serif;
  --text: "Hanken Grotesk", -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #221f1b; --card: #26221e; --ink: #efe8dc; --muted: #a59a8a; --line: #332d27;
    --missions: #7cc48e; --missions-soft: #1f3324; --draft: #e6b45e; --draft-soft: #3a2d16; color-scheme: dark; }
}
* { box-sizing: border-box; }
/* Owner rule: reading text 15pt or larger, which is 20px on a desktop screen. Sizes below are
   in rem, so they scale from this. */
html { -webkit-text-size-adjust: 100%; font-size: 20px; }
@media (max-width: 600px) { html { font-size: 18px; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 1rem; line-height: 1.6; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--church); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right)); }
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px; }
.brand { font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; font-size: 1.3rem; text-decoration: none; display: flex; align-items: center; gap: 10px; }
/* Rohi for Churches: a thin divider, then the sub-brand. */
.brand .sub { font-family: var(--text); font-weight: 600; font-size: .95rem; letter-spacing: 0; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; margin-left: 0; }
/* The Rohi mark, "Crook r": the crook in the text color, the dot always blue. */
.mark { width: 24px; height: 30px; flex: none; }
.mark path { fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.mark circle { fill: #61a3e6; }
nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.95rem; }
nav a { text-decoration: none; color: var(--muted); }
nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
main { padding-block: 48px 72px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6vw, 3rem); margin: 0 0 16px; }
h2 { font-size: 1.5rem; margin: 40px 0 10px; }
h3 { font-size: 1.15rem; margin: 26px 0 6px; }
p, li { max-width: 65ch; }
.lede { font-size: 1.2rem; color: var(--muted); }
.draft { background: var(--draft-soft); color: var(--draft); border-radius: 12px; padding: 14px 18px; font-size: 0.95rem; margin-bottom: 28px; }
.updated { color: var(--muted); font-size: 0.95rem; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 32px; }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.pillar h3 { margin-top: 0; }
.pillar p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.soon, .btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; }
.soon.outline, .btn.outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding: 10.5px 20.5px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.eyebrow { color: var(--muted); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 10px; }
.wrap.wide { max-width: 1080px; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 2px 4px rgba(60,40,10,.06), 0 14px 36px rgba(60,40,10,.12); }
.shot figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.hero-shot { margin-top: 40px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 28px; margin-top: 40px; }
.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 8px; }
.note { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--church); border-radius: 14px; padding: 6px 22px 10px; margin-top: 32px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: center; margin-top: 44px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; }
.feature img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.feature-text { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 0.95rem; }
.feature-text .eyebrow { margin: 0; }
.feature-title { font-family: var(--display); font-size: 1.35rem; color: var(--ink); line-height: 1.25; }
.feature:hover { border-color: var(--muted); }
@media (max-width: 640px) { .feature { grid-template-columns: 1fr; } }
@media (max-width: 440px) { .shots { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
.table { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; }
.table table { min-width: 520px; }
footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
footer.site .wrap { padding-block: 24px 40px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
address { font-style: normal; line-height: 1.6; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
button.btn { font: inherit; border: 0; cursor: pointer; }
button.btn.outline { border: 1.5px solid var(--ink); }
.form { display: grid; gap: 16px; margin-top: 28px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form input, .form select { font: inherit; font-weight: 400; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 52px; width: 100%; }
.form textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 84px; resize: vertical; }
.form fieldset.day { border: 1px solid var(--line); border-left: 5px solid var(--church); border-radius: 14px; padding: 12px 18px 16px; margin: 0; display: grid; gap: 12px; background: var(--card); }
.form fieldset.day legend { font-weight: 600; padding: 0 6px; }
.form label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; align-self: end; min-height: 52px; }
.form label.check input { width: 22px; height: 22px; min-height: 0; padding: 0; }
.form .hint { font-weight: 400; color: var(--muted); font-size: 0.85em; margin: 0; }
.form .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.qr { margin-top: 18px; }
.qr img { display: block; width: 240px; height: auto; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--line); image-rendering: pixelated; }
/* Colours live here, not in style="" attributes: the site's Content-Security-Policy blocks inline styles. */
.dot-church { background: var(--church); }
.dot-ink { background: var(--ink); }
.dot-missions { background: var(--missions); }
.note-missions { border-left-color: var(--missions); }
/* Your privacy: promises as a calm checklist. */
.promises { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.promises li { position: relative; padding: 14px 18px 14px 52px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.promises li::before { content: ""; position: absolute; left: 18px; top: 19px; width: 18px; height: 10px; border-left: 3px solid var(--church); border-bottom: 3px solid var(--church); transform: rotate(-45deg); }
.pillars.three { grid-template-columns: 1fr; }
@media (min-width: 760px) { .pillars.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Tables become stacked cards on phones: each cell says which column it's from. */
@media (max-width: 600px) {
  .table { overflow: visible; background: none; border: 0; }
  .table table, .table thead, .table tbody, .table tr, .table td { display: block; width: 100%; min-width: 0; }
  .table thead { position: absolute; left: -9999px; }
  .table tr { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 4px; margin-bottom: 12px; }
  .table td { border: 0; padding: 6px 14px; }
  .table td::before { content: attr(data-label); display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
  .table td[data-label=""]::before { content: none; }
}
@media (max-width: 600px) {
  .table td:first-child { font-weight: 600; font-size: 1.05rem; }
  .table td:first-child::before { content: none; }
}

/* Church page: small groups to confirm. */
.group-row h3 { margin: 0; }
.group-status { font-weight: 600; margin: 6px 0 0; }
.group-status.pending { color: #8a5a00; }
.group-status.approved { color: #2f6b45; }
.group-status.denied { color: #9a4b3c; }
.group-row .cta { margin-top: 10px; }

/* /church: "Your church's Rohi" live preview */
.th-preview { margin-top: 18px; }
.th-hero { border-radius: 18px; padding: 18px 22px; background: var(--card); border: 1px solid var(--line); }
.th-hero.plain { background: linear-gradient(120deg, #f6ead8, #f8efe2); color: #2b2620; }
.th-brand { display: flex; gap: 12px; align-items: center; }
.th-brand b { display: block; font-size: 1.1rem; }
.th-brand small { opacity: 0.8; }
.th-logo { width: 42px; height: 42px; border-radius: 11px; overflow: hidden; flex: none; }
.th-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-welcome { margin: 12px 0 0; font-weight: 600; }
.th-hi { margin: 2px 0 0; font-family: var(--display, Georgia, serif); font-size: 1.8rem; }
.th-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.th-chip { background: rgba(255, 255, 255, 0.92); color: #2b2620; border-radius: 999px; padding: 4px 12px; font-size: 0.95rem; }
.th-chip.strong { font-weight: 600; }
.form .th-link { grid-template-columns: 1fr 2fr auto; }

/* /church: church prayers review */
.pr-head { margin: 18px 0 6px; font-size: 1.05rem; }
.pr-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pr-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.pr-item textarea { font: inherit; width: 100%; min-height: 80px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 8px; }
.pr-who { margin: 0; color: var(--muted); font-size: 0.9rem; }
.pr-text { margin: 4px 0 0; }
.pr-crisis { margin: 8px 0 0; background: #fde3dc; color: #6b2a1c; border-radius: 10px; padding: 8px 10px; font-size: 0.95rem; }
.proj-photo-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.proj-photo { width: 220px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }


/* Church news (church.html) */
.news-list { margin-top: 12px; border: 1px solid var(--line, #e4ded3); border-radius: 14px; background: var(--card, #fff); padding: 4px 18px; }
.news-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line, #eee); }
.news-item:last-child { border-bottom: 0; }
.news-item .hint { margin: 2px 0 0; }
.news-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.news-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.news-preview { width: min(760px, 94vw); max-height: 90vh; padding: 0; border: 0; border-radius: 18px; }
.news-preview::backdrop { background: rgba(20, 20, 20, 0.45); }
.np-top { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: #1f2b2a; color: #fff; }
.news-preview article { padding: 24px 28px 36px; }
.news-preview h1 { font-size: 36px; line-height: 1.15; margin: 6px 0 8px; }
.np-topic { text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; margin: 0; opacity: 0.75; }
.news-preview img { width: 100%; max-height: 340px; object-fit: cover; border-radius: 14px; margin: 16px 0 4px; }
.np-body p { font-size: 20px; line-height: 1.65; margin: 16px 0; }
.np-body h3 { font-size: 24px; margin: 26px 0 4px; }
.np-body blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 4px solid #e7c873; font-size: 21px; line-height: 1.5; font-style: italic; }
.np-top .btn { background: #e7c873; color: #1d2b2a; }
/* Buttons and rows hidden from script stay hidden, whatever their display. */
[hidden] { display: none !important; }

/* The church dashboard's boxes (church.js buildTools) */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 22px 0 30px; }
.tool { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; text-align: left; padding: 16px; border: 1px solid var(--line, #e4ded3); border-radius: 16px; background: var(--card, #fff); font: inherit; color: inherit; cursor: pointer; }
.tool:hover, .tool:focus-visible { border-color: #1f5c5a; box-shadow: 0 0 0 1px #1f5c5a; }
.tool b { display: block; font-size: 18px; }
.tool small { display: block; margin-top: 4px; font-size: 15px; line-height: 1.45; opacity: 0.75; }
.tool-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: #f1ece2; }
.tool-back { margin: 14px 0 6px; }
.tool[hidden] { display: none; }

/* Sermon import (church.html, Latest sermon) */
.sf-box { margin: 10px 0 16px; padding: 14px 16px; border: 1px solid var(--line, #e4ded3); border-radius: 14px; background: var(--card, #fff); }
.sf-row { display: flex; gap: 10px; margin-top: 8px; }
.sf-row input { flex: 1; }

/* Serving teams (church.html) */
.sv-team { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.sv-team input { flex: 1; min-width: 200px; }
.sv-code { font-weight: 600; letter-spacing: 0.05em; }
.sv-card { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line, #e4ded3); border-radius: 14px; background: var(--card, #fff); }
.sv-card h3 { margin: 0 0 4px; }
.sv-people { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; }
.sv-slot { display: grid; grid-template-columns: 1fr 180px 130px auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line, #eee); }
.sv-slot.need span:first-child { font-weight: 600; }
.sv-state.sub, .sv-state.open { color: #9a5b12; font-weight: 600; }
.sv-state.yes { color: #2f7a4c; }
.sv-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sv-add input[type=text], .sv-add input:not([type]) { flex: 1; min-width: 160px; }

/* Boxes inside a box (church.js, Serving teams) */
.sub-tools { margin-top: 12px; }
.tool.alert { border-color: #c98a2b; box-shadow: 0 0 0 1px #c98a2b; }
.sub-title { font-size: 22px; margin: 8px 0 6px; }
.sv-form { max-width: 560px; }

/* Giving projects: one line each until "Edit" (church.js projectBox) */
.proj-sum { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.proj:not(.open) > :not(legend):not(.proj-sum) { display: none !important; }
.proj:not(.open) > legend { display: none; }
.proj.open .proj-sum { padding-bottom: 8px; border-bottom: 1px solid var(--line, #eee); margin-bottom: 6px; }
.sv-slot select { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line, #d8d0c2); border-radius: 10px; background: var(--card, #fff); }

/* The pastor's view above the boxes (church.js loadOverview) */
.overview { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
@media (max-width: 860px) { .overview { grid-template-columns: 1fr; } }
.ov-card { background: var(--card, #fff); border: 1px solid var(--line, #e4ded3); border-radius: 16px; padding: 16px 18px; }
.ov-over { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.ov-sum { margin: 6px 0 4px; font-size: 20px; font-weight: 600; }
.ov-sum.ok { color: #2f7a4c; } .ov-sum.warn { color: #9a5b12; }
.ov-lines { margin-top: 6px; }
.ov-line { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line, #eee); font-size: 16px; }
button.ov-line { cursor: pointer; }
button.ov-line:hover .ov-text, button.ov-line:focus-visible .ov-text { text-decoration: underline; }
.ov-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: #b8afa2; }
.ov-line.ok .ov-mark { background: #2f7a4c; } .ov-line.warn .ov-mark { background: #c98a2b; } .ov-line.info .ov-mark { background: #3f6e8c; }
.ov-go { font-size: 15px; font-weight: 600; color: #24497a; }
.ov-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 10px 0 6px; }
.ov-stat b { display: block; font-family: Literata, Georgia, serif; font-size: 30px; font-weight: 500; }
.ov-stat span { font-size: 15px; opacity: 0.75; }

/* Worship planning (church.js) */
.wp-form { max-width: 760px; }
.wp-items { display: grid; gap: 8px; }
.wp-item { display: grid; grid-template-columns: 30px 120px 1fr 70px 1.1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line, #e4ded3); border-radius: 12px; background: var(--card, #fff); }
.wp-item:not(.song) { grid-template-columns: 30px 120px 1fr 0 0 auto; }
.wp-item input { min-height: 44px !important; padding: 8px 10px !important; }
.wp-kind { font-weight: 600; font-size: 15px; }
.wp-tools { display: flex; gap: 4px; }
.wp-tools .btn { padding: 6px 10px; min-height: 36px; }
.wp-adds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.wp-row { grid-template-columns: 1fr 1fr 110px auto !important; }
@media (max-width: 760px) { .wp-item, .wp-item:not(.song) { grid-template-columns: 1fr; } }

.wp-grip { all: unset; cursor: grab; display: grid; place-items: center; width: 28px; height: 40px; border-radius: 8px; color: #5b5348; font-size: 22px; font-weight: 700; letter-spacing: -4px; user-select: none; }
.wp-grip:hover, .wp-grip:focus-visible { background: #f1ece2; color: #2b2620; outline: 2px solid transparent; box-shadow: 0 0 0 2px #1f5c5a; }
.wp-item.dragging { opacity: 0.45; }
.wp-item.drop-before { box-shadow: 0 -3px 0 0 #1f5c5a; }
.wp-item.drop-after { box-shadow: 0 3px 0 0 #1f5c5a; }

/* Sermon week: just each day's reference unless "Show verse text and thoughts" (church.js) */
#w-days.lean .w-extra { display: none; }
#w-days.lean fieldset.day { padding-top: 6px; padding-bottom: 6px; }

/* Church sign-up and review (/church-signup, /church-review). */
.pick-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.pick-list button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pick-list button:hover, .pick-list button:focus-visible { border-color: var(--church); box-shadow: 0 0 0 1px var(--church); }
.pick-list small { display: block; color: var(--muted); font-size: 0.85rem; }
.linkish { all: unset; cursor: pointer; color: #24497a; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.claim { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-top: 14px; }
.claim h3 { margin: 0 0 4px; }
.claim p { margin: 6px 0 0; }
.claim .ok { color: #2f7a4c; font-weight: 600; }
.claim .warn { color: #9a5b12; font-weight: 600; }
.claim .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.claim textarea, .claim input { font: inherit; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.claim .done { background: #f6f1e9; border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.claim .done code { display: block; font: inherit; background: none; border: 0; padding: 0; margin: 8px 0 12px; word-break: break-all; white-space: pre-wrap; }
