/* 1765 Regina — The Church in the Home. Scoped under .rk-tool--church-in-the-home (and its sheets, .cih-sheet).
   Kit tokens only; both themes come from kit.css. Motion: transform/opacity only. */
.rk-tool--church-in-the-home { max-width: 760px; margin: 0 auto; }
.rk-tool--church-in-the-home[data-mode="web"] { padding-top: 28px; }
/* web page: hold the tool's place while it loads, so the article below never jumps (CLS) */
#rg-tool[data-tool="church-in-the-home"] { min-height: 100vh; min-height: 100svh; }
.rk-tool--church-in-the-home .cih-head { margin: 0 0 6px; }
.cih-household { font-size: 16px; line-height: 1.5; color: var(--rk-ink-dim); margin: -6px 0 14px; }
.cih-warn { color: var(--rk-alert); }
.cih-meta { font-size: 15px; color: var(--rk-ink-mute); margin: 0 0 10px; line-height: 1.45; }
.cih-center { text-align: center; }
.cih-src { font-size: 13.5px; line-height: 1.45; color: var(--rk-ink-mute); margin: 8px 0 0; }
.cih-src a, .cih-link { color: var(--rk-blue-text); text-decoration: underline; text-underline-offset: 2px; }
.cih-link { background: none; border: 0; padding: 8px 0; font: inherit; cursor: pointer; min-height: 44px; }
.cih-cue { font-style: italic; color: var(--rk-ink-mute); }
.cih-rubric { color: var(--rk-ink); font-style: italic; }
.cih-special { color: var(--rk-ink); border-left: 2px solid var(--rk-gold); padding-left: 12px; }
.cih-lit { font: 600 11px/1.4 var(--rk-f-inscr); letter-spacing: 0.18em; text-transform: uppercase; color: var(--rk-alert); margin: 0 0 10px; }
.cih-plain { list-style: none; padding: 0; margin: 0 0 8px; }
.cih-plain li { padding: 6px 0; line-height: 1.5; font-size: 16.5px; color: var(--rk-ink-dim); border-bottom: 1px solid var(--rk-line); }
.cih-plain li:last-child { border-bottom: 0; }
.cih-plain strong { color: var(--rk-ink); font-weight: 600; }

/* tabs: a scrolling row of quiet pills (no native controls) */
.cih-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 16px; padding: 2px; position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, var(--rk-bg) 80%, transparent); }
.cih-tabs::-webkit-scrollbar { display: none; }
.cih-tab { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rk-line-2); background: transparent; color: var(--rk-ink-dim);
  font: 600 11px/1 var(--rk-f-inscr); letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; transition: transform 90ms var(--rk-ease); touch-action: manipulation; }
.cih-tab.is-on { border-color: var(--rk-gold); color: var(--rk-gold-bright); background: color-mix(in srgb, var(--rk-gold) 12%, transparent); }
.cih-tab.is-pressed { transform: scale(0.96); }

/* kept panels: a hidden panel keeps its rendering state, so coming back to it costs nothing */
.cih-panel.is-off { content-visibility: hidden; }
/* a panel being laid out ahead of time: same width as the shown one, invisible, out of the flow */
.cih-panels { position: relative; }
.cih-panel.is-warming { position: absolute; top: 0; left: 0; right: 0; visibility: hidden; pointer-events: none; }
@supports not (content-visibility: hidden) { .cih-panel.is-off { display: none; } }
.cih-loading { min-height: 220px; }

/* tonight */
.cih-tonight__title { font: 600 clamp(26px, 6vw, 34px)/1.12 var(--rk-f-display); margin: 0 0 8px; color: var(--rk-ink); }
.cih-dial { display: flex; gap: 8px; margin: 14px 0 12px; }
.cih-dial .rk-chip, .cih-bless-chips .rk-chip { min-height: 44px; padding: 0 18px; }
.cih-kept { display: flex; align-items: center; gap: 8px; color: var(--rk-gold-bright); font-size: 17px; margin: 10px 0 12px; }
.cih-tonight .rk-btn--ghost { margin-top: 8px; }
.cih-week { margin: 4px 0 18px; }
.cih-week__label { font: 600 10.5px/1.4 var(--rk-f-inscr); letter-spacing: 0.2em; text-transform: uppercase; color: var(--rk-ink-mute); margin: 0 0 8px; }
.cih-week__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 420px; }
.cih-week__d { display: grid; justify-items: center; gap: 6px; }
.cih-week__l { font: 600 9.5px/1 var(--rk-f-inscr); letter-spacing: 0.08em; text-transform: uppercase; color: var(--rk-ink-mute); white-space: nowrap; }
.cih-week__n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 500 15px/1 var(--rk-f-body); font-variant-numeric: lining-nums;
  color: var(--rk-ink-dim); border: 1px solid var(--rk-line-2); }
.cih-week__d.is-on .cih-week__n { background: var(--rk-btn-bg); color: var(--rk-btn-ink); border-color: transparent; font-weight: 600; }
.cih-week__d.is-today .cih-week__l { color: var(--rk-gold-bright); }
.cih-week__d.is-today .cih-week__n { box-shadow: 0 0 0 2px var(--rk-bg), 0 0 0 3px var(--rk-gold-bright); }

/* the guided prayer: a steady sheet; the pager sits at its foot and never moves */
.rk-sheet.cih-sheet { height: min(92vh, calc(100dvh - 24px)); }
.cih-sheet .rk-sheet__body { flex: 1; }
.cih-g__count { font: 600 11px/1.4 var(--rk-f-inscr); letter-spacing: 0.2em; text-transform: uppercase; color: var(--rk-ink-mute); margin: 0 0 12px; }
.cih-g__title { font: 600 26px/1.15 var(--rk-f-display); margin: 0 0 12px; color: var(--rk-gold-bright); }
.cih-g__page .rk-text { font-size: 18.5px; color: var(--rk-ink); }
.cih-g__pager { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 22px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--rk-line); }
.cih-g__pager .rk-btn--primary { justify-self: end; }
.cih-done { text-align: center; padding-top: 10px; }
.cih-g__num { font: 600 72px/1 var(--rk-f-display); font-variant-numeric: lining-nums; color: var(--rk-gold-bright); margin: 18px 0 6px; }
.cih-g__numl { font: 600 11px/1.4 var(--rk-f-inscr); letter-spacing: 0.22em; text-transform: uppercase; color: var(--rk-ink-mute); margin: 0 0 18px; }
.cih-done .rk-text { font-size: 18px; }
.cih-ref { font: 600 11px/1.4 var(--rk-f-inscr); letter-spacing: 0.18em; text-transform: uppercase; color: var(--rk-ink-mute); margin: 0 0 10px; }
.cih-scripture { margin: 0 0 14px; padding: 0 0 0 16px; border-left: 2px solid var(--rk-gold); font: italic 500 21px/1.55 var(--rk-f-display); color: var(--rk-ink); }
.cih-scripture cite { display: block; margin-top: 8px; font: 600 10.5px/1.4 var(--rk-f-inscr); letter-spacing: 0.18em; text-transform: uppercase; font-style: normal; color: var(--rk-ink-mute); }
.cih-ask { font-size: 18px; line-height: 1.55; margin: 0 0 12px; color: var(--rk-ink-dim); }
.cih-ask strong { color: var(--rk-ink); }
.cih-prayer { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--rk-r2); background: var(--rk-raised); border: 1px solid var(--rk-line); }
.cih-prayer__label { font: 600 10.5px/1.4 var(--rk-f-inscr); letter-spacing: 0.2em; text-transform: uppercase; color: var(--rk-gold); margin: 0 0 6px; }
.cih-prayer__text { font-size: 18px; line-height: 1.6; color: var(--rk-ink); margin: 0; }
.cih-g__page > .cih-prayer__text { margin: 0 0 12px; }
.cih-bless { display: flex; gap: 12px; width: 100%; min-height: 52px; align-items: center; padding: 0 16px; margin: 0 0 8px; border-radius: var(--rk-r2); border: 1px solid var(--rk-line-2);
  background: var(--rk-surface); color: var(--rk-ink); font: 500 18px/1.2 var(--rk-f-body); cursor: pointer; text-align: left; transition: transform 90ms var(--rk-ease); touch-action: manipulation; }
.cih-bless .rk-icon { flex: none; width: 26px; height: 26px; padding: 4px; border-radius: 50%; border: 1px solid var(--rk-line-gold-2); color: transparent; box-sizing: border-box; }
.cih-bless.is-on { border-color: var(--rk-gold); color: var(--rk-gold-bright); background: color-mix(in srgb, var(--rk-gold) 10%, var(--rk-surface)); }
.cih-bless.is-on .rk-icon { background: var(--rk-btn-bg); color: var(--rk-btn-ink); border-color: transparent; }
.cih-bless.is-pressed { transform: scale(0.985); }

/* house rule */
.cih-rule__row { gap: 14px; align-items: flex-start; padding-top: 12px; padding-bottom: 8px; }
.cih-rule__row .rk-item__title { font-size: 18px; }
.cih-rule__row .rk-item__sub { font-size: 15px; line-height: 1.45; }
.cih-rule__pray { display: inline-flex; align-items: center; font-size: 15px; }
.cih-tick { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rk-line-gold-2); background: transparent; color: transparent; display: grid; place-items: center; cursor: pointer; transition: transform 90ms var(--rk-ease); touch-action: manipulation; }
.cih-tick.is-on { background: var(--rk-btn-bg); color: var(--rk-btn-ink); border-color: transparent; }
.cih-tick.is-pressed { transform: scale(0.92); }
.cih-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cih-grid th, .cih-grid td { padding: 7px 0; text-align: center; border-bottom: 1px solid var(--rk-line); color: var(--rk-ink-mute); font-weight: 500; vertical-align: middle; }
.cih-grid tr:last-child th, .cih-grid tr:last-child td { border-bottom: 0; }
.cih-grid .cih-grid__what { width: 38%; }
.cih-grid th[scope="row"] { text-align: left; color: var(--rk-ink-dim); font: 500 15px/1.3 var(--rk-f-body); padding-right: 8px; }
.cih-grid thead th { padding-bottom: 8px; }
.cih-grid__dow { display: block; font: 600 10px/1 var(--rk-f-inscr); letter-spacing: 0.08em; color: var(--rk-ink-mute); }
.cih-grid__dn { display: block; margin-top: 4px; font: 500 13px/1 var(--rk-f-body); font-variant-numeric: lining-nums; color: var(--rk-ink-dim); }
.cih-grid thead th.is-today .cih-grid__dow, .cih-grid thead th.is-today .cih-grid__dn { color: var(--rk-gold-bright); }
.cih-grid__mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--rk-line-2); color: var(--rk-btn-ink); vertical-align: middle; }
.cih-grid td.is-on .cih-grid__mark { background: var(--rk-btn-bg); border-color: transparent; }
.cih-grid td.is-today:not(.is-on):not(.is-na) .cih-grid__mark { border-color: var(--rk-line-gold-2); }
.cih-grid__na { color: var(--rk-ink-mute); }

/* two quiet buttons side by side when there is room */
.cih-row2 { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 6px 0 16px; }
.cih-row2 .rk-btn { width: 100%; justify-content: center; }
@media (min-width: 560px) { .cih-row2 { grid-template-columns: 1fr 1fr; } }

/* checklists (prayer corner, rule editor) */
.cih-checks { display: grid; gap: 8px; margin: 0 0 16px; }
.cih-check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; text-align: left; width: 100%; min-height: 52px; padding: 12px 14px;
  border-radius: var(--rk-r2); border: 1px solid var(--rk-line-2); background: var(--rk-surface); color: var(--rk-ink); font: 400 16.5px/1.4 var(--rk-f-body); cursor: pointer; transition: transform 90ms var(--rk-ease); touch-action: manipulation; }
.cih-check strong { display: block; font-weight: 600; font-size: 17px; }
.cih-check__sub { display: block; color: var(--rk-ink-mute); font-size: 15px; margin-top: 2px; }
.cih-check__box { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--rk-line-gold-2); display: grid; place-items: center; color: transparent; margin-top: 1px; }
.cih-check.is-on { border-color: var(--rk-gold); background: color-mix(in srgb, var(--rk-gold) 8%, var(--rk-surface)); }
.cih-check.is-on .cih-check__box { background: var(--rk-btn-bg); border-color: transparent; color: var(--rk-btn-ink); }
.cih-check.is-pressed { transform: scale(0.985); }
.cih-season { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--rk-ink-dim); margin: 0 0 14px; }
.cih-swatch { width: 18px; height: 18px; border-radius: 4px; background: var(--cih-season, var(--rk-gold)); border: 1px solid var(--rk-line-2); flex: none; }

/* children */
.cih-child__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cih-child__name { font: 600 24px/1.2 var(--rk-f-display); margin: 0 0 2px; }
.cih-days { margin-top: 6px; }
.cih-sac { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.cih-sac__row { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 10px; padding: 8px 10px; border-radius: var(--rk-r2); background: var(--rk-surface); border: 1px solid var(--rk-line); font-size: 15px; line-height: 1.4; }
.cih-sac__label { font-weight: 600; color: var(--rk-ink); }
.cih-sac__st { color: var(--rk-ink-mute); }
.cih-sac__row.is-done .cih-sac__st, .cih-sac__row.is-planned .cih-sac__st { color: var(--rk-gold-bright); }
.cih-sac__row.is-now, .cih-sac__row.is-soon { border-color: var(--rk-line-gold-2); }
.cih-sac__row.is-now .cih-sac__st, .cih-sac__row.is-soon .cih-sac__st { color: var(--rk-ink); }
.cih-blessing .rk-chips { margin: 10px 0 4px; }
.cih-finder { margin: 4px 0 14px; }
.cih-finder .rk-chip { min-height: 44px; }
.cih-remove { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rk-line); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cih-remembered li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 0; }
.cih-safe { border-left: 2px solid var(--rk-line-gold-2); padding-left: 12px; margin: 12px 0 0; }
.cih-safe .rk-text { margin: 0; }

/* blessings + library */
.cih-chalk { font: 600 clamp(26px, 7vw, 40px)/1.1 var(--rk-f-inscr); letter-spacing: 0.08em; color: var(--rk-gold-bright); text-align: center; margin: 6px 0 10px; padding: 14px 6px; border-top: 1px solid var(--rk-line-gold); border-bottom: 1px solid var(--rk-line-gold); font-variant-numeric: lining-nums; }
.cih-steps { margin: 0 0 14px; padding-left: 22px; font-size: 16.5px; line-height: 1.55; color: var(--rk-ink-dim); }
.cih-steps li { margin: 0 0 6px; }
.cih-teach h3 { font: 600 20px/1.25 var(--rk-f-display); margin: 14px 0 4px; }
.cih-teach:first-of-type h3 { margin-top: 0; }
.cih-pool { border-top: 1px solid var(--rk-line); padding: 4px 0; }
.cih-pool summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font: 600 11.5px/1 var(--rk-f-inscr); letter-spacing: 0.16em; text-transform: uppercase; color: var(--rk-gold); }

.rk-tool--church-in-the-home .rk-calendar { max-width: 440px; }

/* foot */
.cih-foot { margin-top: 24px; }
.cih-hard { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px; margin: 4px 0 8px; border-radius: var(--rk-r2);
  border: 1px dashed var(--rk-line-2); background: transparent; color: var(--rk-ink-dim); font: 400 16px/1.35 var(--rk-f-body); text-align: left; cursor: pointer; touch-action: manipulation; }
.cih-hard .rk-icon { color: var(--rk-alert); flex: none; }
.cih-hard.is-pressed { transform: scale(0.99); }
.cih-sheet .rk-crisis { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) {
  .cih-tab, .cih-tick, .cih-check, .cih-bless, .cih-hard { transition: none !important; transform: none !important; }
}
