/* Universal Office -- parish pages (rector dashboard, admin, approval, privacy). Plain CSS, no build
   step. No inline styles anywhere (the page CSP forbids them): everything is a class here. */
/* Night is the default; light is chosen by parish/theme.js (the same Auto / Light / Dark choice the app
   keeps). Colours match the app's own tokens (css/office-shell.css): night ground #08070c with gold
   #c9a84c, day ground #f2ebdf with bronze #846522. */
:root {
  --bg: #08070c; --panel: rgba(13, 11, 21, .78); --panel2: rgba(31, 25, 43, .62); --ink: #eadfc6; --muted: #b9ae95;
  --gold: #c9a84c; --line: rgba(201, 168, 76, .26); --ok: #86c586; --bad: #e8806f; --warn: #e6b94e;
  --focus: #f0d27a; --on-gold: #1a1408; --halo: rgba(201, 168, 76, .24); --horizon: rgba(8, 7, 12, .72);
  --scene: url('/images/rood-screen.webp'); --scene-filter: blur(3px) saturate(.7) brightness(.5); --scene-opacity: .62;
  --glass: rgba(10, 8, 17, .72); --shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
html[data-theme="light"] {
  --bg: #f2ebdf; --panel: rgba(251, 246, 236, .86); --panel2: rgba(240, 231, 214, .72); --ink: #2a2118; --muted: #5a4c3d;
  --gold: #7d5f1d; --line: rgba(103, 58, 31, .26); --ok: #2c6a2c; --bad: #a3392b; --warn: #85560a;
  --focus: #7d5f1d; --on-gold: #fffdf7; --halo: rgba(255, 244, 214, .85); --horizon: rgba(242, 235, 223, .75);
  --scene: url('/images/chartres-rose.webp'); --scene-filter: blur(9px) saturate(.45) brightness(.8); --scene-opacity: .5;
  --glass: rgba(246, 239, 226, .8); --shadow: 0 10px 34px rgba(80, 55, 25, .18);
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body { margin: 0; padding: 0 0 48px; background: var(--bg); color: var(--ink);
       font: 18px/1.5 Georgia, "Cormorant Garamond", "Times New Roman", serif; }
a { color: var(--gold); }
.topbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
          padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.topbar .who { color: var(--muted); font-size: 15px; }
.topbar nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
main { max-width: 640px; margin: 24px auto 0; padding: 0 16px; }
main.wide { max-width: 1100px; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 24px 20px; margin-bottom: 20px; }
.kicker { font: 600 12px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 0; }
h1 { font-size: 30px; line-height: 1.15; margin: 8px 0 16px; font-weight: 600; }
h2 { font-size: 22px; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 18px; margin: 20px 0 8px; font-weight: 600; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.card { border: 1px solid var(--line); padding: 14px 16px; margin: 16px 0; }
.card dt { font: 600 12px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.card dt:first-child { margin-top: 0; }
.card dd { margin: 4px 0 0; }
label { display: block; margin: 14px 0 4px; font-weight: 600; }
input[type=text], input[type=email], input[type=number], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; min-height: 44px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 0; }
textarea { min-height: 88px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.field-hint { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.counter { text-align: right; color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.counter.warn { color: var(--warn); }
.radio { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-weight: 400; }
.radio input { margin-top: 6px; }
button { font: inherit; padding: 10px 18px; border: 1px solid var(--gold); background: transparent; color: var(--ink); cursor: pointer; min-height: 44px; }
button.primary { background: var(--gold); color: var(--on-gold); font-weight: 600; }
button.danger { border-color: var(--bad); color: var(--bad); }
button.danger.solid { background: var(--bad); color: #fff; }
button.linklike { border: 0; background: none; color: var(--gold); text-decoration: underline; padding: 4px 2px; min-height: 0; }
button.small { padding: 6px 12px; min-height: 36px; font-size: 16px; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.row.end { justify-content: flex-end; }
.grow { flex: 1 1 220px; }
.status { margin: 16px 0 0; padding: 12px 14px; border-left: 4px solid var(--line); background: var(--panel2); }
.status.ok { border-color: var(--ok); }
.status.bad { border-color: var(--bad); }
.reminder { border: 1px solid var(--gold); background: var(--panel2); padding: 12px 14px; margin: 12px 0; font-size: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 20px; flex-wrap: wrap; }
.tabs button { border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.tabs button[aria-selected=true] { border-color: var(--line); background: var(--panel); color: var(--gold); font-weight: 600; }
.items { list-style: none; margin: 0; padding: 0; }
.item { border: 1px solid var(--line); background: var(--panel2); padding: 14px 16px; margin: 0 0 12px; }
.item.expired { opacity: .85; border-style: dashed; }
.item-head { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; }
.item-text { margin: 0 0 8px; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
.chip { font: 600 11px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 4px 8px; }
.badge { font-size: 15px; color: var(--muted); }
.badge.soon { color: var(--warn); font-weight: 600; }
.badge.gone { color: var(--bad); font-weight: 600; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.item-actions .label { color: var(--muted); font-size: 15px; }
.codebox { font: 600 26px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; padding: 12px 14px; border: 1px solid var(--line); display: inline-block; background: var(--bg); }
.danger-zone { border: 1px solid var(--bad); padding: 16px; margin-top: 24px; }
.danger-zone h2 { color: var(--bad); }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
dialog.dlg { max-width: 520px; width: calc(100% - 32px); color: var(--ink); background: var(--panel); border: 1px solid var(--gold); padding: 20px; }
dialog.dlg::backdrop { background: rgba(0, 0, 0, .6); }
.table-wrap { width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-size: 16px; }
table.data th, table.data td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
table.data .email { overflow-wrap: anywhere; }
table.data th { white-space: nowrap; font: 600 12px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pill { display: inline-block; white-space: nowrap; font: 600 12px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--line); }
.pill.pending { color: var(--warn); border-color: var(--warn); }
.pill.approved { color: var(--ok); border-color: var(--ok); }
.pill.suspended { color: var(--bad); border-color: var(--bad); }
.fieldset { border: 0; padding: 0; margin: 16px 0 0; }
.fieldset legend { font-weight: 600; padding: 0; }
.section-gap { margin-top: 32px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Headings receive focus from script (so screen readers announce the new view); a ring around
   plain text just looks like a stray box, so hide it there only. Buttons and fields keep theirs. */
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
@media (max-width: 720px) {
  main { margin-top: 16px; }
  .panel { padding: 20px 14px; }
  table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border: 1px solid var(--line); margin-bottom: 12px; padding: 8px; background: var(--panel2); }
  table.data td { border: 0; padding: 4px 0; }
  table.data td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 14px; }
}

/* Parish home page and diocesan page (2026-10-06) */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.plain li:last-child { border-bottom: 0; }
.item.pinned { border-left: 4px solid var(--gold); }
.item.pinned .item-text { font-size: 19px; }
.feature { border: 1px solid var(--gold); background: var(--panel2); padding: 16px; margin: 12px 0; }
.feature h3 { margin-top: 0; }

/* ==========================================================================================
   Appearance (2026-10-06): the parish pages wear the app's own look -- the same veiled cathedral
   imagery behind the page (rood screen by night, the Chartres rose by day), Cinzel for titles,
   Cormorant Garamond for reading, gold hairlines, and a soft light coming down from above.
   Heaven brought down to earth. Self-hosted fonts and same-site images only (the page CSP).
   ========================================================================================== */
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../assets/fonts/Cinzel-latin.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/CormorantGaramond-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/CormorantGaramond-Italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../assets/fonts/CormorantGaramond-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/IBMPlexMono-Regular.woff2') format('woff2'); }

:root { --display: 'Cinzel', Georgia, serif; --prayed: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
        --machine: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace; }

body { position: relative; z-index: 0; background: transparent; font-family: var(--prayed); font-size: 21px; line-height: 1.55; min-height: 100vh; }
body::before { content: ''; position: fixed; inset: -14px; z-index: -2; pointer-events: none;
  background: var(--scene) center center / cover no-repeat; filter: var(--scene-filter); opacity: var(--scene-opacity); }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 85% 60% at 50% -12%, var(--halo), transparent 72%),
              linear-gradient(to bottom, transparent 45%, var(--horizon)); }

a { color: var(--gold); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

.topbar { position: sticky; top: 0; z-index: 5; background: var(--glass); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.kicker { font-family: var(--machine); font-weight: 400; font-size: 12px; letter-spacing: .24em; color: var(--gold); text-decoration: none; }
a.kicker:hover { color: var(--ink); }
.topbar nav a { font-family: var(--display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.topbar nav a:hover { text-decoration: underline; }
.topbar .who { font-family: var(--prayed); }

.theme-control { display: inline-flex; border: 1px solid var(--line); }
.theme-btn { min-height: 0; padding: 5px 10px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted);
  font-family: var(--machine); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.theme-btn:last-child { border-right: 0; }
.theme-btn[aria-pressed="true"] { color: var(--gold); background: var(--panel2); }

main { margin-top: 36px; }
.panel { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 28px 26px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); position: relative; }
.panel::before { content: ''; position: absolute; left: 14px; right: 14px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .8; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ink); }
h1 { font-size: clamp(27px, 4.6vw, 40px); letter-spacing: .05em; text-transform: uppercase; line-height: 1.14; }
h2 { font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line); }
h3 { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.muted, .field-hint { color: var(--muted); }
.small { font-size: 17px; }

.hero { text-align: center; padding: 40px 26px 34px; }
.hero h1 { margin: 10px 0 4px; }
.hero .kicker { font-size: 12px; letter-spacing: .26em; }
.hero p { margin-left: auto; margin-right: auto; }
.hero .row { justify-content: center; }
.hero .status { text-align: left; }
.orn { display: flex; align-items: center; justify-content: center; gap: 16px; max-width: 360px; margin: 14px auto 12px; }
.orn::before, .orn::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.orn::after { transform: scaleX(-1); }
.orn i { display: block; width: 9px; height: 9px; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 12px var(--gold); }

button, .button { font-family: var(--display); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; border: 1px solid var(--gold);
  background: transparent; color: var(--ink); transition: background .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
button:hover:not(:disabled) { background: var(--panel2); box-shadow: 0 0 18px -4px var(--gold); }
button.primary { background: var(--gold); color: var(--on-gold); font-weight: 600; box-shadow: 0 0 22px -6px var(--gold); }
button.primary:hover:not(:disabled) { background: var(--gold); filter: brightness(1.1); }
button.small { font-size: 11px; letter-spacing: .12em; }
button.linklike { font-family: var(--prayed); font-size: inherit; letter-spacing: 0; text-transform: none; border: 0; box-shadow: none; }
button.danger { border-color: var(--bad); color: var(--bad); }
.tabs button { font-size: 12px; }
.tabs button[aria-selected=true] { background: var(--panel); box-shadow: none; }

input[type=text], input[type=email], input[type=number], input[type=date], input[type=time], select, textarea {
  font-family: var(--prayed); font-size: 20px; background: var(--panel2); color: var(--ink); border-color: var(--line); }
label { font-family: var(--display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
label.radio { font-family: var(--prayed); font-size: inherit; letter-spacing: 0; text-transform: none; color: var(--ink); }
.status { background: var(--panel2); font-size: 19px; }
.chip, .pill, table.data th { font-family: var(--machine); font-weight: 400; }
.codebox { font-family: var(--machine); font-weight: 400; background: var(--panel2); }

.item { background: var(--panel2); }
.item.pinned { border-left: 3px solid var(--gold); box-shadow: -6px 0 22px -10px var(--gold); }
.item.pinned .item-text { font-size: 22px; }
.items .item .item-head strong { font-family: var(--display); font-size: 15px; letter-spacing: .08em; font-weight: 400; }
.plain li { border-bottom: 1px solid var(--line); padding: 8px 0; }
.plain li.day { font-family: var(--display); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  border-bottom: 0; padding: 14px 0 2px; }
.plain li.day:first-child { padding-top: 0; }
.plain li.svc { display: grid; grid-template-columns: 6.6em 1fr; gap: 4px 16px; align-items: baseline; }
.plain li.svc .svc-time { font-family: var(--machine); font-size: 15px; letter-spacing: .04em; color: var(--gold); white-space: nowrap; }
.plain li.svc .svc-what { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .plain li.svc { grid-template-columns: 1fr; gap: 0; } }
.feature { background: var(--panel2); border-color: var(--line); box-shadow: inset 0 0 30px -14px var(--gold); }
dl.card { border-color: var(--line); }
dl.card dt { font-family: var(--machine); }

dialog.dlg { background: var(--panel); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
table.data th, table.data td { border-color: var(--line); }

@media (max-width: 720px) {
  body { font-size: 20px; }
  .panel { padding: 22px 16px; }
  .hero { padding: 30px 16px 26px; }
  .topbar { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
@media print { body::before, body::after { display: none; } .panel { box-shadow: none; background: #fff; } }
html[data-theme="light"] .feature { box-shadow: none; }
.item-actions a.small { display: inline-block; padding: 6px 12px; border: 1px solid var(--gold); font-family: var(--display); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.item-actions a.small:hover { background: var(--panel2); box-shadow: 0 0 18px -4px var(--gold); }
.alt-signin { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--line); background: var(--panel2); }
.alt-signin summary { cursor: pointer; font-family: var(--display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.alt-signin[open] summary { margin-bottom: 8px; }
