/* Church Planter Support, Ember look (Luke picked option C, 11-06). Load order on every app page:
   app.css, theme/themes/app-neutral.css, theme/themes/base.css, theme/themes/c.css, then this file.
   The three theme files are byte copies of relicops.com/cps-branding/themes/ (app-neutral.css regenerated from this
   app.css by _build/neutralize.py and checked identical). This file holds the app-only pieces. */

/* The option marks are not shipped. */
:root { --mark-l: none; --mark-d: none; }

/* EMBLEM SLOT. Markup: <span class="brand-emblem" data-emblem-slot aria-hidden="true">✚</span> in the top bar
   (common.js) and on the sign-in pages. Until an emblem is set it shows the old ✚ mark, the same size as before
   (30px tile, 15px glyph in the top bar; 44px tile, 22px glyph on sign-in), in the Ember accent.
   THE ONE HOOK: set --emblem, e.g.
     :root { --emblem: url(/assets/theme/emblem.svg); }
     :root:where([data-theme="dark"]) { --emblem: url(/assets/theme/emblem-dark.svg); }
   and the emblem covers the ✚ completely; no markup or other CSS edit. How: ::after paints the emblem over a solid
   page-colour layer. While --emblem is not defined, var(--emblem) makes that whole background declaration invalid,
   so ::after falls back to no background at all and the ✚ shows. Do not give --emblem a default value. */
/* The emblem is e5 (Luke 11-10): a steeple on a gable, door below. Byte copies of relicops.com/cps-branding/marks/. */
:root { --emblem: url(/assets/theme/marks/e5-mark.svg?v=23bac0fb53); }
:root:where([data-theme="dark"]) { --emblem: url(/assets/theme/marks/e5-mark-dark.svg?v=34b9ab44ce); }
.brand-emblem {
  position: relative; display: grid; place-items: center; flex: none; box-sizing: border-box;
  width: 30px; height: 30px; border-radius: 7px; font-size: 15px; line-height: 1;
  background: var(--accent); color: var(--accent-fg);
}
.auth-brand .brand-emblem { width: 44px; height: 44px; font-size: 22px; margin: 0 auto 8px; }
.brand-emblem::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--emblem) center / contain no-repeat, var(--bg);
}

/* Filled states the theme files do not reach. app.css paints these with a token background and white text; in the
   dark theme the token turns light (--deep is the page text colour, the accent is a light orange), so the text follows
   the token: --bg on --fg fills, --accent-fg on accent fills, and the solid danger red for the red fills. */
.side a[aria-current=page], .tab-menu a[aria-current=page], .channels button[aria-pressed=true],
.wf-navbtn.is-on, .wf-navbtn[aria-current=page], .btn.wf-act.is-on, .btn.wf-act[aria-pressed=true],
.fu-chip[aria-pressed=true] { color: var(--bg); }
.side a[aria-current=page] .nav-count { background: var(--bg); color: var(--fg); }
.nav-count, .tag-feedback, .chip.custom { color: var(--accent-fg); }
.btn.accent:hover, .btn.wf-adv.is-on:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.wf-navbtn.wf-back { color: var(--accent-fg); }
.wf-navbtn.wf-back:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-fg); }
.overdue-banner { background: var(--danger); color: var(--danger-fg); }
.overdue-banner:hover, .overdue-banner:focus-visible { background: #991B1B; color: var(--danger-fg); }
.fu-chip.bad[aria-pressed=true] { background: var(--danger); border-color: var(--danger); color: var(--danger-fg); }
/* dark theme: chosen in the user menu (html[data-theme=dark]), not the OS setting */
  :where([data-theme="dark"]) .btn.is-done, :where([data-theme="dark"]) .btn.is-done:disabled { color: var(--bg) !important; }

/* admin Scripts preview: admin.js sets a fixed light background inline; follow the theme instead */
pre[style*="background:#f8fafc"] { background: var(--muted-bg) !important; color: var(--fg); }
/* Proposal Builder: the "No picture yet" tile has a fixed light background (proposal-builder.css loads later) */
body .pb-thumb.none { background: var(--muted-bg); }

/* Declined stays soft red (Luke 11-03: "the soft red Declined column"); the round 3 theme files make every column
   neutral, so this puts his cue back, on tokens in the dark theme. Delete this block to go fully neutral. */
.kb-declined-col, .kl-group.kl-declined { background: #FDF2F2; border-color: #F0C9CB; }
.kb-declined-col .kb-card { border-color: #F2D4D6; }
.kb-declined-col .kb-title, .kl-group.kl-declined .kb-title { color: var(--danger-text); }
/* dark theme: chosen in the user menu (html[data-theme=dark]), not the OS setting */
  :where([data-theme="dark"]) .kb-declined-col, :where([data-theme="dark"]) .kl-group.kl-declined { background: var(--bad-s); border-color: #4A2323; }
  :where([data-theme="dark"]) .kb-declined-col .kb-card { border-color: #4A2323; }


/* Reports tab (canonical only, the Milestone Report): the on-screen progress bars follow the theme like the
   dashboard meter (track --track, fill --accent). report.css loads later, hence "body". The printed report
   (.rp-page) keeps its own fixed print colours. */
body .rp-bar { background: var(--track); }
body .rp-bar > div { background: var(--accent); }

/* Appearance in the user menu (common.js): Light (default) / Dark; the current choice is marked */
.acct-appearance { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.acct-appearance button { text-align: left; }
.acct-appearance button[aria-pressed=true] { font-weight: 600; }
.acct-appearance button[aria-pressed=true]::after { content: " \2713"; color: var(--accent-text); }

/* 11-24 (Luke 09:46, for Clay): a card fades the longer it goes untouched, in steps (data-fade 1..3, decided on the server,
   functions/api/_touch.js), and is full brightness again the moment it is touched. The SURFACE and BORDER melt into the
   column and the name ink softens; the words never drop below WCAG AA (tokens in base.css, checked by a test). Nothing hides. */
.kb-card[data-fade="1"], .kl-item[data-fade="1"] { background: var(--fade-bg-1); border-color: var(--fade-line-1); }
.kb-card[data-fade="2"], .kl-item[data-fade="2"] { background: var(--fade-bg-2); border-color: var(--fade-line-2); box-shadow: none; }
.kb-card[data-fade="3"], .kl-item[data-fade="3"] { background: var(--fade-bg-3); border-color: var(--fade-line-3); box-shadow: none; }
[data-fade="1"] > .kb-name, [data-fade="1"] .kl-main > .kb-name, tr[data-fade="1"] .ct-name { color: var(--fade-ink-1); }
[data-fade="2"] > .kb-name, [data-fade="2"] .kl-main > .kb-name, tr[data-fade="2"] .ct-name { color: var(--fade-ink-2); }
[data-fade="3"] > .kb-name, [data-fade="3"] .kl-main > .kb-name, tr[data-fade="3"] .ct-name { color: var(--fade-ink-3); }
.kb-declined-col .kb-card[data-fade] { border-color: var(--border); }
/* "Last touched N days ago": read by screen readers always (aria-describedby on the name), shown on hover and keyboard focus */
.kb-card, .kl-item, td.ct-name-cell { position: relative; }
.touch-note { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.kb-card:hover > .touch-note, .kb-card:focus-within > .touch-note, .kl-item:hover .touch-note, .kl-item:focus-within .touch-note,
tr:hover .ct-name-cell .touch-note, tr:focus-within .ct-name-cell .touch-note, tr:focus .ct-name-cell .touch-note {
  width: auto; height: auto; margin: 0; clip: auto; overflow: visible; left: 8px; bottom: calc(100% + 4px); z-index: 5; pointer-events: none;
  background: var(--fg); color: var(--bg); font-size: 12px; line-height: 1.4; padding: 3px 8px; border-radius: 6px; box-shadow: var(--shadow-lg); }
/* the Undo toast: a little above the plain toast's spot; Undo is a real button */
.undo-toast { display: flex; align-items: center; gap: 12px; bottom: 20px; }
.undo-toast .undo-btn { background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 6px; font: inherit; font-weight: 600; padding: 4px 12px; min-height: 32px; cursor: pointer; }
.undo-toast .undo-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.reach-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; }
.fu-row .fu-reach { white-space: nowrap; }
.fu-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.fu-row input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
.fu-restarted { font-size: 12px; color: var(--muted-fg); }
.yearly-line { margin: 4px 0 0; }
.fu-row.fu-reachable { grid-template-columns: 24px 150px minmax(0, 1.4fr) minmax(0, 1fr) 80px auto; }
.fu-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.fu-restarted { display: block; font-weight: 400; }
@media (max-width: 640px) {
  .fu-row.fu-reachable { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .fu-reachable .fu-sel { grid-column: 1; grid-row: 1 / span 2; }
  .fu-reachable .fu-name { grid-column: 2; grid-row: 1; }
  .fu-reachable .fu-date { grid-column: 3; grid-row: 1; }
  .fu-reachable .fu-step { grid-column: 2; grid-row: 2; }
  .fu-reachable .fu-ch { grid-column: 3; grid-row: 2; }
  .fu-reachable .fu-end { grid-column: 2 / -1; grid-row: 3; justify-content: flex-start; }
  .fu-end { grid-column: 1 / -1; justify-content: flex-start; }
}
/* 11-24 (Luke 09:49) the Funding section (funding.js): four calm pieces, 2 x 2, one column on a phone. Thin marks, one axis,
   hairline axis and goal, text in text colors only; the series hue and the estimate gray are base.css tokens per theme. */
.fd { margin-top: 16px; }
.fd-h { margin: 0 0 8px; }
.fd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .fd-grid { grid-template-columns: minmax(0, 1fr); } }
.fd-piece { padding: 14px 16px; min-width: 0; }
.fd-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); margin: 0 0 2px; }
.fd-headline { margin: 0 0 10px; color: var(--fg); }
.fd-plot { position: relative; }
.fd-svg { display: block; width: 100%; height: auto; overflow: visible; }
.fd-bars .fd-svg, .fd-meter .fd-svg { height: 24px; }
.fd-row { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; font-size: .9rem; }
.fd-name { color: var(--fg); }
/* links here stay in the text color (underlined): the light accent IS the series hue, and text never wears it */
a.fd-name, .fd-go, .fd-table summary { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.fd-fig { color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.fd-meter, .fd-barrow { display: block; margin: 0 0 8px; }
.fd-track { fill: var(--track); }
.fd-fill { fill: var(--fd-series); }
.fd-fill.fd-est { fill: var(--fd-est); }
.fd-hit { fill: transparent; }
.fd-mark { cursor: default; outline: none; }
.fd-mark:focus-visible .fd-hit { stroke: var(--accent); stroke-width: 2px; }
.fd-mark.on .fd-fill, .fd-mark.on .fd-dot { filter: brightness(1.12); }
.fd-stroke { fill: none; stroke: var(--fd-series); stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; }
.fd-axis { stroke: var(--border); stroke-width: 1px; }
.fd-goal { stroke: var(--muted-fg); stroke-width: 1px; }
.fd-dot { fill: var(--fd-series); stroke: var(--card); stroke-width: 2px; }
.fd-dot.fd-hollow { fill: var(--card); stroke: var(--fd-series); stroke-width: 2px; }
.fd-tick, .fd-note { fill: var(--muted-fg); font-size: 11px; font-variant-numeric: tabular-nums; }
.fd-tip { position: absolute; z-index: 6; pointer-events: none; background: var(--fg); color: var(--bg); border-radius: 6px; padding: 4px 8px; font-size: 12px; line-height: 1.35; max-width: 260px; box-shadow: var(--shadow-lg); }
.fd-tip b { display: block; }
.fd-foot { margin: 6px 0 0; }
.fd-table { margin-top: 6px; font-size: .85rem; }
.fd-table summary { cursor: pointer; }
.fd-go { display: inline-block; margin-top: 6px; }
.fd-grid > .fd-piece { margin: 0; }
.undo-toast > span { flex: 1 1 auto; min-width: 0; }
.undo-toast .undo-btn { flex: none; white-space: nowrap; }
.undo-toast { width: max-content; max-width: min(560px, calc(100vw - 32px)); }
