/* Kindred Care public pages. Each church sets --brand, --accent, --display and --body. */
/* Defaults sit on html so the church's :root theme (inlined in the page) always wins. */
html {
  --brand: #1d2d3f; --accent: #00947b;
  --display: "Playfair Display", Georgia, serif; --body: "Poppins", "Segoe UI", Arial, sans-serif;
}
:root {
  --ink: #222a31; --muted: #5d6873; --line: #d8dde1; --mist: #f1f3f4; --white: #fff; --err: #b0362b;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --brand-soft: color-mix(in srgb, var(--brand) 8%, white);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--white); color: var(--ink); font: 17px/1.6 var(--body); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; line-height: 1.15; color: var(--brand); text-wrap: balance; }
button, input, select, textarea { font: inherit; }
.muted { color: var(--muted); }
.in { max-width: 1120px; margin: 0 auto; }
.loading { padding: 60px 16px; text-align: center; color: var(--muted); }

.topbar { padding: 12px 16px; border-bottom: 1px solid var(--mist); }
.topbar .in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { text-decoration: none; display: block; }
.logo { display: block; height: 52px; width: auto; max-width: 62vw; object-fit: contain; }
.logo-text { font-family: var(--display); font-size: 1.45rem; color: var(--brand); }
.topbar-link { font-size: .9rem; color: var(--brand); text-decoration: none; white-space: nowrap; }

.hero { position: relative; background: var(--brand); color: #fff; padding: 40px 16px 56px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(110% 90% at 85% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%); }
.hero .in { position: relative; display: grid; gap: 12px; }
.eyebrow { margin: 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; opacity: .8; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 7vw, 3.4rem); }
.hero h1 em { font-style: italic; color: color-mix(in srgb, var(--accent) 45%, white); }
.intro { margin: 0; max-width: 62ch; color: rgba(255,255,255,.88); }

.mine { background: var(--accent-soft); border-bottom: 1px solid var(--line); padding: 12px 16px; }
.mine .in { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-weight: 500; }

.wrap { padding: 28px 16px 80px; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .wrap { grid-template-columns: 320px minmax(0, 1fr); align-items: start; } .place { position: sticky; top: 20px; order: 0 !important; } }
.place { order: 2; background: var(--brand); color: rgba(255,255,255,.9); border-top: 5px solid var(--accent); border-radius: 4px; padding: 22px 20px; display: grid; gap: 14px; align-content: start; }
.place h2 { color: #fff; font-size: 1.35rem; }
.place p { margin: 0; }
.place .label { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.place a { color: #fff; }
.place ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .94rem; }
.place .big { font-size: 1.5rem; font-family: var(--display); color: #fff; }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.section-head h2 { font-size: 1.6rem; }
.rules { margin: 0; font-size: .92rem; color: var(--muted); }

.weeks { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 18px; scrollbar-width: thin; }
.chip { flex: 0 0 auto; text-align: left; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--brand); background: #fff; color: var(--brand); cursor: pointer; display: grid; gap: 1px; min-width: 128px; }
.chip b { font-weight: 600; font-size: .95rem; }
.chip span { font-size: .78rem; color: var(--accent); font-weight: 500; }
.chip.none span { color: var(--muted); }
.chip:hover { background: var(--brand-soft); }
.chip[aria-pressed="true"] { background: var(--brand); color: #fff; }
.chip[aria-pressed="true"] span { color: rgba(255,255,255,.8); }

.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-bottom: 22px; }
.day { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; display: grid; gap: 2px; color: var(--ink); }
.day b { font-size: 1rem; }
.day span { font-size: .82rem; color: var(--accent); font-weight: 500; }
.day.full { background: var(--mist); cursor: default; }
.day.full span { color: var(--muted); }
.day[aria-pressed="true"] { border: 2px solid var(--brand); padding: 11px; background: var(--brand-soft); }
.day:not(.full):hover { border-color: var(--brand); }

.slots-head { font-size: 1.25rem; margin-bottom: 10px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.slot { padding: 14px 10px; border-radius: 10px; border: 1px solid var(--accent); background: #fff; color: var(--brand); font-weight: 600; cursor: pointer; }
.slot:hover { background: var(--accent-soft); }
.slot:disabled { border-color: var(--line); color: #a3abb2; background: var(--mist); cursor: default; text-decoration: line-through; font-weight: 400; }
.empty { padding: 22px; background: var(--mist); border-radius: 10px; color: var(--muted); }

/* Meal train list */
.meals { display: grid; gap: 10px; }
.meal-week { font-family: var(--display); font-size: 1.15rem; color: var(--brand); margin: 14px 0 2px; }
.meal { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.meal .date { text-align: center; line-height: 1.15; }
.meal .date b { display: block; font-size: 1.5rem; font-family: var(--display); color: var(--brand); }
.meal .date span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.meal .who { font-size: .95rem; }
.meal .who .open { color: var(--accent); font-weight: 600; }
.meal.taken { background: var(--mist); }
@media (max-width: 520px) { .meal { grid-template-columns: 60px minmax(0, 1fr); } .meal .btn { grid-column: 1 / -1; } }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--brand); background: #fff; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: none; min-height: 48px; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 85%, black); }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 6px; }

.sheet-bg { position: fixed; inset: 0; background: rgba(15, 22, 30, .55); display: grid; place-items: end center; z-index: 10; padding: 0; }
@media (min-width: 640px) { .sheet-bg { place-items: center; padding: 16px; } }
.sheet { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .sheet { border-radius: 16px; } }
.sheet h2 { font-size: 1.6rem; margin-bottom: 4px; }
.picked { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; }
.picked .label { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.picked b { font-size: 1.1rem; color: var(--brand); }
.picked span { font-size: .9rem; color: var(--muted); }
form.f { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; }
.field label { font-weight: 600; font-size: .95rem; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid #b9c1c7; border-radius: 10px; background: #fff; color: var(--ink); font-size: 17px; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.hint { font-size: .85rem; color: var(--muted); margin: 0; }
.err { color: var(--err); font-weight: 500; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 10px 0; }
.done .check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 2rem; }
.done b { font-size: 1.2rem; color: var(--brand); }
.found-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.taken-list { margin: 0; padding-left: 18px; font-size: .92rem; color: var(--muted); }

.foot { border-top: 1px solid var(--mist); padding: 26px 16px 40px; color: var(--muted); font-size: .92rem; }
.foot p { margin: 0 0 6px; }
.foot .made { font-size: .8rem; opacity: .8; }

/* Church home */
.home { padding: 30px 16px 60px; }
.home { display: grid; gap: 34px; align-items: start; }
@media (min-width: 760px) { .home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }
.home > .empty { grid-column: 1 / -1; }
.home-col h2 { font-size: 1.6rem; margin-bottom: 12px; }
.page-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hero-split { display: grid; gap: 22px; }
.hero-text { display: grid; gap: 12px; }
@media (min-width: 860px) { .hero-split { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; } }
.hero-cta { display: grid; gap: 4px; max-width: 320px; padding: 18px 22px; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35); color: #fff; text-decoration: none; transition: background .15s; }
.hero-cta:hover { background: rgba(255,255,255,.18); }
.hero-cta span { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.hero-cta b { font-family: var(--display); font-weight: 500; font-size: 1.25rem; line-height: 1.25; }
.card-link { display: grid; gap: 4px; align-content: start; padding: 20px; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 10px; text-decoration: none; color: var(--ink); }
.card-link:hover { border-color: var(--brand); }
.card-link b { font-family: var(--display); font-weight: 500; font-size: 1.35rem; color: var(--brand); }
.card-link .kind { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.nf { padding: 80px 16px; text-align: center; }
.landing { background: #1d2d3f; color: #fff; min-height: 100vh; }
.landing h1 { color: #fff; font-size: 3rem; margin-bottom: 10px; }
.intro-dark { color: rgba(255,255,255,.85); margin: 0 0 24px; }

/* Building maintenance */
.report-bar { justify-content: flex-start; margin: 0 0 16px; }
.ritems { display: grid; gap: 12px; }
.ritem { display: grid; gap: 6px; justify-items: start; padding: 16px; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 10px; }
.ritem.urgent { border-left-color: var(--err); }
.ritem.low { border-left-color: var(--line); }
.ritem > b { font-family: var(--display); font-weight: 500; font-size: 1.3rem; color: var(--brand); line-height: 1.2; }
.ritem-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: .82rem; }
.ritem .urg { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.ritem .urg.urgent { color: var(--err); }
.ritem .urg.low { color: var(--muted); }
.ritem .where { color: var(--muted); }
.ritem .details { margin: 0; font-size: .95rem; color: var(--muted); white-space: pre-line; }
.ritem .work { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--brand); }
.fixed-head { margin-top: 26px; }
.hours-list { list-style: none; padding: 0 !important; gap: 2px !important; }
.hours-list li { display: flex; justify-content: space-between; gap: 12px; }
.cols2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { margin-top: 5px; width: 18px; height: 18px; }
.card-link.repair { border-left-color: var(--brand); }
.ritem .urg.lead { color: var(--brand); background: var(--brand-soft); padding: 1px 8px; border-radius: 99px; }
.ritem .oversight { margin: 0; font-size: .9rem; padding: 8px 12px; background: var(--brand-soft); border-radius: 8px; }
