/* Ignatius at Home: a modern book of hours.
   Warm paper and ink, rubrics in red, gold leaf for what's prayed, and color taken from
   each day's painting (--day-deep, --day-accent, --day-light, set from js/look.js).
   Sections: tokens · base type · layout · controls · library · new retreat · retreat ·
   research · talk · about · costs and build log · praying · motion · small screens. */

/* ================================================================ tokens */
:root {
  --bg: #f4eee2;          /* paper */
  --page: #f8f3e8;        /* a page lying on the paper */
  --field: #fbf8f1;
  --ink: #1c1712;
  --muted: #6b5d4c;
  --line: #d9ccb0;
  --line-strong: #bfae88;
  --rubric: #a32a1c;
  --rubric-hover: #7d1f14;
  --gold: linear-gradient(115deg, #8d6a22 0%, #d8b45a 22%, #f3e1a0 38%, #b98f33 55%, #e9cd7c 72%, #8d6a22 100%);
  --gold-flat: #c9a042;
  --gold-ink: #2b1d08;
  --ok: #3b6a3a;
  --bad: #a32a1c;
  --work: #8a6516;
  --stage: #0d0b09;
  --stage-ink: #efe4cf;
  --stage-rubric: #e0806a;
  --paper-shadow: 0 1px 0 var(--line), 0 14px 32px rgb(60 40 15 / 0.12);
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* Night: candlelit paper. */
    --bg: #110f0c;
    --page: #1b1814;
    --field: #221e19;
    --ink: #efe4cf;
    --muted: #b9a887;
    --line: #3a3226;
    --line-strong: #5a4c38;
    --rubric: #e0806a;
    --rubric-hover: #f0a08b;
    --ok: #8cc59a;
    --bad: #f08a80;
    --work: #e2c070;
    --paper-shadow: 0 1px 0 var(--line), 0 16px 36px rgb(0 0 0 / 0.45);
    color-scheme: dark;
  }
}

/* ================================================================ base type */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.55 var(--serif);
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -0.005em; }
h1 { font-size: 2.6rem; margin: 8px 0 12px; }
h2 { font-size: 1.75rem; margin: 0 0 10px; }
h3 { font-size: 1.3rem; margin: 0 0 6px; }
p { margin: 0 0 10px; }
a { color: var(--rubric); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--rubric-hover); }
code { font: 0.82em var(--mono); }
:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }

/* Small capitals for labels, eyebrows, running heads and navigation. */
.rubric, .sc, .running-head, .topnav, .tabs [role="tab"], .quiet-row .link, legend, .cover-sub {
  font-variant-caps: all-small-caps; letter-spacing: 0.09em;
}
.rubric { color: var(--rubric); font-size: 1rem; margin: 0; line-height: 1.35; }
.rubric.small { font-size: 0.88rem; }
.rubric-inline { color: var(--rubric); font-style: normal; font-variant-caps: all-small-caps; letter-spacing: 0.08em; }
.lede { font-size: 1.12rem; line-height: 1.6; }
.hint, .meta { color: var(--muted); font-size: 0.95rem; }
.quiet-note { color: var(--muted); font-size: 0.95rem; margin: 4px 0 12px; }
.status.ok { color: var(--ok); } .status.bad { color: var(--bad); } .status.working { color: var(--work); }

/* ================================================================ layout */
main { max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }
.view { padding-top: 6px; }
.view:not([hidden]) { animation: fade 0.45s var(--ease) both; }
#view-new, #view-me, #view-talk, #view-about, #view-costs, #view-signin, #view-research { max-width: 780px; margin: 0 auto; }

.topbar {
  max-width: 1120px; margin: 0 auto; padding: 18px 20px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { font-family: var(--display); font-weight: 600; font-size: 1.45rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.brand:hover { color: var(--ink); }
.brand-mark { color: var(--rubric); display: inline-flex; }
.topnav { display: flex; gap: 18px; align-items: center; font-size: 1.02rem; flex-wrap: wrap; }
.topnav a { text-decoration: none; }
#account { display: inline-flex; gap: 10px; align-items: center; }
#account .meta { font-variant-caps: normal; letter-spacing: 0; }
.banner { max-width: 1080px; margin: 8px auto; padding: 10px 14px; border-radius: 2px; border: 1px solid var(--line); background: var(--page); }
.banner.bad { border-color: var(--bad); color: var(--bad); }
.back { display: inline-block; margin: 6px 0 6px; font-size: 1rem; text-decoration: none; font-variant-caps: all-small-caps; letter-spacing: 0.08em; }
.card { background: var(--page); border: 1px solid var(--line); border-radius: 3px; padding: 24px; margin: 18px 0; box-shadow: var(--paper-shadow); }
.foot-links { font-size: 0.98rem; margin: 18px 0 6px; }
.foot-links a, .foot-links .link { color: var(--muted); }
.site-foot { max-width: 1120px; margin: 24px auto 32px; padding: 0 20px; font-size: 0.95rem; text-align: right; }
.site-foot a { color: var(--muted); }
@media (max-width: 700px) { .desktop-only { display: none !important; } }

/* ================================================================ controls */
form { display: grid; gap: 14px; }
label { display: grid; gap: 5px; font-weight: 500; font-size: 1rem; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; accent-color: var(--rubric); }
input[type="email"], input[type="url"], input[type="text"], input[type="date"], select, textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 2px;
  background: var(--field); color: var(--ink); width: 100%; max-width: 100%; min-height: 44px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rubric); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rubric) 18%, transparent); }
textarea { font: 1rem/1.55 var(--serif); resize: vertical; }

button, .button {
  font: 600 1.08rem var(--display); letter-spacing: 0.01em; padding: 10px 20px; min-height: 44px; border: 0; border-radius: 3px;
  background: var(--ink); color: var(--bg); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; justify-self: start;
  transition: transform 0.15s var(--ease), background-color 0.2s, box-shadow 0.2s;
}
button:hover, .button:hover { color: var(--bg); }
button:active, .button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: progress; }
/* Gold leaf for the one thing to do: pray. */
.gold, button.gold, .button.gold {
  background: var(--gold); background-size: 260% 100%; color: var(--gold-ink);
  box-shadow: inset 0 0 0 1px rgb(90 60 10 / 0.35), 0 6px 16px rgb(140 100 30 / 0.22);
  position: relative; overflow: hidden; isolation: isolate;
}
.gold::after, button.gold::after, .button.gold::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgb(255 250 228 / 0.38) 48%, rgb(255 250 228 / 0.1) 56%, transparent 70%);
  transform: translateX(-120%); animation: gold-sweep 9s cubic-bezier(0.45, 0, 0.25, 1) infinite; will-change: transform;
}
@keyframes gold-sweep { 0%, 62% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.gold:hover, button.gold:hover, .button.gold:hover { color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgb(90 60 10 / 0.45), 0 8px 20px rgb(140 100 30 / 0.3); }
.button-note { font: 400 0.95rem var(--serif); }
button.secondary, .button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
button.secondary:hover, .button.secondary:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
button.link { background: none; color: var(--rubric); padding: 0; min-height: 0; font: inherit; font-size: 1rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; border-radius: 0; }
button.link:hover { color: var(--rubric-hover); }
button.link.danger { color: var(--muted); font-size: 0.92rem; }
button.link.danger:hover { color: var(--bad); }
.with-icon { display: inline-flex; align-items: center; gap: 6px; }
button.big, .button.big { font-size: 1.3rem; padding: 13px 28px; min-height: 54px; }
.icon-button { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); padding: 0; width: 44px; height: 44px; border-radius: 3px; }
.icon-button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.icon-wrap, [data-icon] { display: inline-flex; line-height: 0; }
.quiet-link { font-variant-caps: all-small-caps; letter-spacing: 0.08em; text-decoration: none; font-size: 1.05rem; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 220px; width: auto; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.row-buttons { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
fieldset { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 4px; margin: 0; display: grid; gap: 12px; min-width: 0; }
legend { font-family: var(--serif); color: var(--rubric); font-size: 1.05rem; padding: 0 8px 0 0; }
summary { cursor: pointer; color: var(--rubric); }
.prompt-box { border-top: 1px solid var(--line); padding: 10px 0; }
.prompt-box[open] { display: grid; gap: 10px; }
.prompt-box textarea { font: 0.85rem/1.5 var(--mono); }
.preset-row { margin: 0; font-size: 0.95rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.guide-fields { display: grid; gap: 10px; }
.advanced { display: grid; gap: 16px; }
.estimate { margin: 8px 0 0; padding: 10px 14px; border-left: 2px solid var(--rubric); background: var(--field); font-size: 0.98rem; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-top: 6px; }
.tabs [role="tab"] { background: none; color: var(--muted); padding: 8px 0; min-height: 44px; border-radius: 0; font: 1.1rem var(--serif); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--rubric); }
#new-form { margin-top: 14px; }

/* ================================================================ sign-in */
.hero { padding: 16px 0 0; }
.guest-box { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }

/* ================================================================ library: Today, and the retreats as covers */
.today-card {
  position: relative; display: grid; gap: 0; margin: 10px 0 34px; background: var(--page); border: 1px solid var(--line);
  border-radius: 3px; box-shadow: var(--paper-shadow); overflow: hidden;
}
.today-card.mood-dawn::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 55% at 50% 0%, rgb(233 196 120 / 0.38), transparent 70%); animation: dawnlight 8s ease-in-out infinite;
}
.today-art { margin: 0; position: relative; }
.today-art .frame { height: 340px; overflow: hidden; background: var(--field); }
.today-art img, .page-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* At night a candle seems to light the painting. */
.today-card.mood-night .today-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(70% 55% at 60% 55%, rgb(236 170 80 / 0.42), transparent 70%); animation: flicker 3.4s ease-in-out infinite;
}
.today-text { position: relative; z-index: 2; padding: 22px 26px 24px; display: grid; gap: 8px; align-content: start; }
.today-title { font-size: 2.8rem; margin: 2px 0 0; }
.today-grace { font-style: italic; font-size: 1.12rem; line-height: 1.45; margin: 4px 0 2px; }
.today-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.today-card.making .today-text { padding: 26px; }
@media (min-width: 900px) {
  .today-card:not(.making):not(.no-art) { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .today-art .frame { height: 100%; min-height: 420px; }
  .today-text { padding: 40px 44px; align-content: center; }
  .today-title { font-size: 3.2rem; }
}

.library-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 22px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.library-head h2 { margin: 0; font-size: 2.2rem; }
.empty { text-align: center; display: grid; justify-items: center; }
.examples { margin-top: 38px; }
.examples h2 { font-size: 2rem; border-bottom: 1px solid var(--line); padding-bottom: 8px; }

.shelf { display: grid; gap: 30px 26px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 22px; }
.series-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.series-head h3 { margin: 0; }
.cover-wrap { display: grid; gap: 6px; animation: settle 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.cover {
  --cover-bg: #2a2219; --cover-ring: #c8a049; --cover-ink: #f3e8cf;
  display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; text-decoration: none;
  background: var(--cover-bg); color: var(--cover-ink); border-radius: 3px 8px 8px 3px;
  box-shadow: inset 9px 0 0 rgb(0 0 0 / 0.24), 0 14px 30px rgb(40 25 10 / 0.24);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.6s;
}
.shelf > .cover { animation: settle 0.8s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
.cover:hover { color: var(--cover-ink); transform: translateY(-5px) rotate(-0.4deg); box-shadow: inset 9px 0 0 rgb(0 0 0 / 0.24), 0 22px 40px rgb(40 25 10 / 0.32); }
.arch { height: 230px; border-radius: 120px 120px 2px 2px; overflow: hidden; box-shadow: 0 0 0 2px var(--cover-ring); display: block; background: rgb(0 0 0 / 0.2); }
.arch img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 9s var(--ease); }
.cover:hover .arch img { transform: scale(1.07); }
.arch-empty { display: block; height: 100%; background: radial-gradient(circle at 50% 35%, rgb(255 255 255 / 0.12), transparent 60%); }
.cover-sub { font-size: 0.95rem; opacity: 0.88; }
.cover-title { font: 600 1.7rem/1.05 var(--display); }
.cover-note { font-size: 0.92rem; opacity: 0.85; }
.cover-days { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.cover-days i { width: 14px; height: 17px; border-radius: 1px; border: 1px solid color-mix(in srgb, var(--cover-ink) 45%, transparent); }
.cover-days i.prayed { background: var(--gold); border-color: transparent; }
.cover-days i.started { background: linear-gradient(to top, #d8b45a 50%, transparent 50%); }
.cover-days i.missed { border-style: dashed; }
.cover-days i.making { opacity: 0.45; border-style: dotted; }
.cover-days i.ready { border-color: var(--cover-ring); }
.cover-actions { display: flex; justify-content: flex-end; }
.new-cover { background: transparent; color: var(--ink); border: 1.5px dashed var(--line-strong); box-shadow: none; align-items: center; justify-content: center; text-align: center; min-height: 360px; }
.new-cover:hover { color: var(--ink); box-shadow: none; background: var(--page); }
.new-cover .icon-wrap { color: var(--rubric); }
.new-cover .cover-title { font-size: 1.6rem; }

/* ================================================================ new retreat */
.drop {
  position: relative; border: 1.5px dashed var(--line-strong); border-radius: 3px; padding: 28px 24px; text-align: center; cursor: pointer;
  display: grid; gap: 6px; justify-items: center; font-weight: 400; background: var(--field); transition: border-color 0.2s, background-color 0.2s;
}
.drop:hover, .drop.over { border-color: var(--rubric); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--rubric); outline-offset: 2px; }
.drop-icon { color: var(--rubric); }
.drop-title { font: 600 1.4rem var(--display); color: var(--ink); }
.drop.chosen { border-style: solid; border-color: var(--rubric); }
.small-drop { padding: 14px; }
.series-box { border-top: 1px solid var(--line); padding: 10px 0; }
.series-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.paste-box textarea { width: 100%; margin-top: 8px; }
.what-happens { border-left: 2px solid var(--rubric); padding: 4px 0 4px 18px; }
.what-happens ol { padding-left: 20px; display: grid; gap: 8px; margin: 10px 0; }
.what-happens ol li::marker { color: var(--rubric); font-family: var(--display); font-weight: 700; }
.example-picker .or { display: flex; align-items: center; gap: 12px; color: var(--rubric); font-variant-caps: all-small-caps; letter-spacing: 0.09em; margin: 6px 0 4px; }
.example-picker .or::before, .example-picker .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.example-docs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.example-doc { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); }
.example-doc.chosen { border-color: var(--rubric); box-shadow: 0 0 0 1px var(--rubric); }
.example-doc img { width: 96px; height: 124px; object-fit: cover; border-radius: 48px 48px 2px 2px; }
.example-doc-body { display: grid; gap: 4px; align-content: start; }
.example-doc-body strong { font: 600 1.3rem var(--display); }
.example-doc .row-buttons { margin-top: 4px; align-items: center; }

/* ================================================================ retreat */
.retreat-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; position: relative; z-index: 5; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px; }
.retreat-head h1 { margin-bottom: 2px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.progress h2 { margin-bottom: 4px; }
.progress-days { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.progress-days li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.progress-days .mark { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 0.8rem; }
.progress-days .done .mark { background: var(--gold); border-color: transparent; color: var(--gold-ink); animation: pop 0.45s var(--ease) both; }
.progress-days .now .mark { border-color: var(--rubric); border-top-color: transparent; animation: spin 1s linear infinite; }
.progress-days .failed .mark { border-color: var(--bad); color: var(--bad); }
.progress-days .detail { display: block; color: var(--muted); font-size: 0.92rem; }

/* Days as small squares: prayed in gold, today outlined in red, the chosen one ringed. */
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 4px 14px; scrollbar-width: thin; align-items: flex-start; }
.chip {
  width: 50px; height: 56px; min-height: 0; padding: 4px 0; border-radius: 2px; border: 1px solid var(--line); background: var(--page);
  color: var(--ink); display: grid; justify-items: center; align-content: center; gap: 0; position: relative; flex: none;
  font: 600 1.25rem var(--display); transition: box-shadow 0.25s, border-color 0.25s, transform 0.2s;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip span, .chip small { display: block; line-height: 1.1; }
.chip small { font: 400 0.72rem var(--serif); color: var(--muted); font-variant-caps: all-small-caps; letter-spacing: 0.06em; }
.chip[aria-selected="true"] { box-shadow: 0 0 0 2px var(--day-accent, var(--ink)); border-color: transparent; }
.chip.prayed { background: var(--gold); border-color: transparent; color: var(--gold-ink); }
.chip.prayed small { color: var(--gold-ink); }
.chip.started { background: linear-gradient(to top, color-mix(in srgb, #d8b45a 55%, var(--page)) 45%, var(--page) 45%); }
.chip.missed { border-style: dashed; border-color: var(--line-strong); }
.chip.today { border: 1.5px solid var(--rubric); }
.chip.making { opacity: 0.55; }
.chip.failed { color: var(--bad); }

/* The day as a two-page spread (on a wide screen): painting left, words right. */
.day-panel {
  position: relative; background: var(--page); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--paper-shadow);
  display: grid; margin: 4px 0 18px;
}
.page-art { margin: 0; padding: 16px 16px 0; display: grid; gap: 8px; }
.page-art .frame { height: 320px; overflow: hidden; background: var(--field); box-shadow: 0 1px 0 var(--line); }
.page-art figcaption { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-style: italic; font-size: 0.95rem; color: var(--muted); }
.page-text { padding: 20px 22px 24px; display: grid; gap: 12px; align-content: start; }
.running-head { font-size: 0.98rem; color: var(--muted); margin: 0; }
.day-title { font-size: 2.6rem; margin: 2px 0 0; }
.source-ref { margin: 0; }
.grace { font-style: italic; font-size: 1.14rem; line-height: 1.45; margin: 4px 0 0; }
.fleuron { text-align: center; color: var(--rubric); font-size: 1.3rem; margin: 2px 0 0; line-height: 1; }
.passage { font-size: 1.16rem; line-height: 1.75; white-space: pre-line; margin: 0; }
.passage::first-letter { float: left; font: 700 4.6em/0.78 var(--display); padding: 6px 10px 0 0; color: var(--day-deep, var(--rubric)); }
@media (prefers-color-scheme: dark) { .passage::first-letter { color: var(--day-accent, var(--rubric)); } }
.state-line { font-size: 0.98rem; color: var(--muted); margin: 0; font-style: italic; }
.state-line.missed { color: var(--rubric); }
.pray-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.quiet-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.quiet-row .link, .quiet-row a.link { font-size: 1.02rem; text-decoration: none; }
.menu { position: relative; }
.menu-list { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; background: var(--page); border: 1px solid var(--line); border-radius: 2px; padding: 6px; display: grid; min-width: 250px; box-shadow: var(--paper-shadow); }
.menu-list button { background: none; color: var(--ink); justify-content: flex-start; padding: 8px 10px; font: 1rem var(--serif); justify-self: stretch; }
.menu-list button:hover { background: var(--field); color: var(--ink); }
.journal { border-left: 2px solid var(--gold-flat); padding: 6px 0 6px 16px; }
.journal p { margin: 0 0 4px; }
.parts { border-top: 1px solid var(--line); padding-top: 10px; }
.track { padding: 10px 0; border-bottom: 1px solid var(--line); }
.track:last-child { border-bottom: 0; }
.track h4 { margin: 0 0 6px; font: 600 1.15rem var(--display); }
.track audio { width: 100%; }
.script { white-space: pre-wrap; font-size: 1rem; }
.sources { font-size: 0.9rem; color: var(--muted); padding-left: 18px; overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .day-panel:not(.no-art) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .day-panel:not(.no-art)::after {
    content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 64px; transform: translateX(-50%); pointer-events: none;
    background: linear-gradient(90deg, transparent, rgb(80 55 20 / 0.13) 50%, transparent);
  }
  .page-art { padding: 34px 40px 30px; position: sticky; top: 12px; align-self: start; }
  .page-art .frame { height: min(72vh, 660px); }
  .page-text { padding: 40px 60px 34px 64px; }
  .day-title { font-size: 3.4rem; }
}

/* ================================================================ research notes */
.research-toc { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 1.5rem; }
.research-toc a { padding: 0.25rem 0.7rem; border: 1px solid var(--line); border-radius: 2px; text-decoration: none; }
.research-day { margin-bottom: 1.5rem; }
.research-day h2 { margin-top: 0; }
.research-day h3 { font-size: 1.15rem; margin: 1.2rem 0 0.4rem; color: var(--rubric); }
.research-day .passage { max-height: 14rem; overflow: auto; }
.research-day .passage::first-letter { float: none; font: inherit; padding: 0; color: inherit; }
.research-results { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.research-results li { border-left: 2px solid var(--line); padding: 0.2rem 0 0.2rem 0.75rem; }
.research-results li.cited { border-left-color: var(--rubric); }
.research-results .snippet { font-size: 0.92rem; color: var(--muted); margin: 0.2rem 0 0; white-space: pre-wrap; }
.research-results .service { font-size: 0.8rem; font-variant-caps: all-small-caps; letter-spacing: 0.08em; color: var(--muted); margin-left: 0.4rem; }
.research-queries { padding-left: 1.2rem; }

/* ================================================================ talk it over */
.talk-card { display: grid; gap: 12px; }
.talk-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.talk-voice-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 0; }
.talk-fields { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.talk-prompt { margin-top: 12px; }
.talk-prompt summary { color: var(--muted); font-size: 0.98rem; }
.talk-prompt textarea { width: 100%; font: 0.84rem/1.5 var(--mono); }
.talk-transcript { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; }
.talk-transcript li { padding: 8px 12px; border-radius: 2px; max-width: 90%; }
.talk-transcript .you { background: var(--field); border: 1px solid var(--line); justify-self: end; }
.talk-transcript .companion { border-left: 2px solid var(--gold-flat); font-family: var(--display); font-size: 1.15rem; }
.talk-history { padding-left: 20px; display: grid; gap: 8px; font-size: 0.98rem; }
.talk-history details { margin-top: 4px; }
.talk-history pre { white-space: pre-wrap; font: 0.95rem/1.5 var(--serif); margin: 6px 0 0; }
#me-summary-note { color: var(--work); border-color: var(--work); }

/* The orb: ivory while listening, candle gold while the companion speaks, breathing between. */
.talk-orb {
  --level: 0; position: relative; width: 108px; height: 108px; margin: 18px auto; border-radius: 50%; justify-self: center;
  background: radial-gradient(circle at 35% 30%, #fffaf0, #efe0bf 50%, #c9a55d 100%);
  transform: scale(calc(1 + var(--level) * 0.26));
  box-shadow: 0 0 34px 4px rgb(216 180 90 / 0.4); will-change: transform;
  transition: transform 0.09s linear, background 0.6s ease;
}
.talk-orb::before, .talk-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.talk-orb::before { inset: -10px; border: 1px solid rgb(201 160 66 / 0.45); animation: orb-breathe 4.5s ease-in-out infinite; }
.talk-orb::after { background: conic-gradient(from 0deg, transparent 0 20%, rgb(255 246 220 / 0.55) 30%, transparent 45% 70%, rgb(255 246 220 / 0.35) 80%, transparent 90%); opacity: 0; transition: opacity 0.4s ease; animation: orb-turn 6s linear infinite; mix-blend-mode: soft-light; }
.talk-orb.speaking { background: radial-gradient(circle at 35% 30%, #fff6e3, #f3cf7a 42%, #c9942f 78%, #8d6a22 100%); box-shadow: 0 0 48px 10px rgb(232 180 90 / 0.5); }
.talk-orb.speaking::after { opacity: 1; }
.talk-orb.speaking::before { animation-duration: 1.6s; }
.talk-orb.listening { background: radial-gradient(circle at 35% 30%, #ffffff, #f6eedd 55%, #d9c7a0 100%); box-shadow: 0 0 30px 4px rgb(150 120 70 / 0.3); }

/* "Talk it over": an inked button with a moving voice, and a paper note that explains it. */
.talk-cta { position: relative; display: inline-flex; }
.talk-button { background: transparent; color: var(--ink); border: 1px solid var(--ink); gap: 10px; }
.talk-button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.talk-wave { display: inline-flex; gap: 3px; align-items: center; height: 16px; color: var(--rubric); }
.talk-wave i { width: 2.5px; height: 16px; border-radius: 1px; background: currentColor; transform: scaleY(0.35); animation: talk-wave 1.2s ease-in-out infinite; }
.talk-wave i:nth-child(2) { animation-delay: 0.15s; } .talk-wave i:nth-child(3) { animation-delay: 0.3s; } .talk-wave i:nth-child(4) { animation-delay: 0.45s; }
.talk-cta.arrive .talk-button { animation: talk-arrive 0.7s var(--ease) both; }
.talk-tip {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 30; width: min(330px, 84vw); padding: 14px 16px;
  background: var(--page); color: var(--ink); border: 1px solid var(--line); border-radius: 2px; font-size: 1rem; line-height: 1.45;
  box-shadow: var(--paper-shadow); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
}
.talk-tip strong { display: block; margin-bottom: 4px; font: 600 1.2rem var(--display); color: var(--rubric); }
.talk-cta:hover .talk-tip, .talk-cta:focus-within .talk-tip, .talk-cta.intro .talk-tip { opacity: 1; transform: none; }

/* ================================================================ about */
.about h2 { margin-top: 30px; }
.about > .lede::first-letter { float: left; font: 700 4.2em/0.8 var(--display); padding: 6px 10px 0 0; color: var(--rubric); }
.links { padding-left: 20px; display: grid; gap: 6px; font-size: 1rem; }
.day-shape { padding-left: 22px; display: grid; gap: 6px; }
.voice-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin: 0.8rem 0 1.4rem; }
.voice-sample { margin: 0; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 2px; background: var(--page); }
.voice-sample figcaption { margin-bottom: 0.4rem; }
.voice-sample audio { width: 100%; height: 36px; }
.services dt { font: 600 1.2rem var(--display); margin-top: 0.8rem; }
.services dd { margin: 0.2rem 0 0; }

/* ================================================================ dialogs, toasts */
.settings-dialog { border: 1px solid var(--line); border-radius: 3px; padding: 0; width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--page); color: var(--ink); box-shadow: var(--paper-shadow); }
.settings-dialog::backdrop { background: rgb(20 14 8 / 0.5); }
.dialog-inner { padding: 22px; display: grid; gap: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 2px; z-index: 60; max-width: calc(100vw - 32px); animation: toast-in 0.4s var(--ease) both; }
.toast.leaving { animation: toast-out 0.35s var(--ease) both; }
@keyframes toast-out { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, 8px); } }

/* ================================================================ costs, build log */
.cost-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; margin: 6px 0 12px; }
.cost-table th, .cost-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cost-table th { font-weight: 400; color: var(--rubric); font-variant-caps: all-small-caps; letter-spacing: 0.08em; }
.cost-retreat h3 { font-size: 1.15rem; margin: 14px 0 2px; }

.log-card { margin: 12px 0; border-radius: 3px; overflow: hidden; border: 1px solid #2c2419; background: #16120e; box-shadow: var(--paper-shadow); }
.terminal-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #211b15; color: #c2b39c; font: 12px var(--mono); }
.terminal-bar .dots { display: flex; gap: 6px; }
.terminal-bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; background: #5b4f44; }
.terminal-bar .dots i:nth-child(1) { background: #c0584a; } .terminal-bar .dots i:nth-child(2) { background: #c99a45; } .terminal-bar .dots i:nth-child(3) { background: #7b9a62; }
.terminal-title { flex: 1; }
.terminal-actions .link { color: #d8c3a9; font-size: 12px; margin-left: 10px; }
.terminal { height: 420px; overflow-y: auto; padding: 12px 14px; color: #eadfcb; font: 12.5px/1.55 var(--mono); }
.terminal pre { white-space: pre-wrap; word-break: break-word; margin: 4px 0 8px 18px; padding: 8px 10px; background: #1e1913; border-left: 2px solid #3a3025; font: inherit; max-height: 320px; overflow-y: auto; }
.terminal summary { cursor: pointer; list-style: none; color: inherit; }
.terminal summary::-webkit-details-marker { display: none; }
.t-time { color: #857661; } .t-step { color: #b9d39a; margin: 2px 0; } .t-call { color: #e6b877; } .t-dim { color: #8f8069; }
.t-bad { color: #ef8f82; } .t-sent { color: #d3c6b2; } .t-got { color: #c9d6c4; }
.t-entry > summary { padding: 1px 0; }
.t-section { margin: 2px 0 2px 18px; }
.t-section > summary { font-size: 11.5px; }
.t-section pre { margin-left: 0; max-height: 480px; }
.t-copy { color: #d8c3a9; font-size: 11.5px; margin: 2px 0 8px 18px; }
@media (max-width: 700px) { .terminal { height: 340px; font-size: 11.5px; } }

/* ================================================================ praying: full screen */
.pray {
  position: fixed; inset: 0; z-index: 30; color: var(--stage-ink);
  background: color-mix(in srgb, var(--day-deep, #0d0b09) 34%, #0a0806);
  display: grid; grid-template-rows: 1fr auto;
}
body.praying { overflow: hidden; }
.stage { position: relative; overflow: hidden; min-height: 0; }
.stage-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 2.4s ease; }
.stage-img.shown { opacity: 1; animation: drift-long 36s ease-in-out infinite alternate; transform-origin: 50% 45%; }
.stage-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; }
.stage-title { font: 600 2.2rem var(--display); margin: 0 0 12px; }
.stage-grace { font-style: italic; font-size: 1.2rem; opacity: 0.9; max-width: 32ch; margin: 0 auto; }
.stage-caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 48px 20px 16px; font-style: italic; font-size: 1.15rem; text-align: center; background: linear-gradient(transparent, rgb(0 0 0 / 0.75)); }
.pray-close {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 3;
  background: rgb(13 11 9 / 0.55); color: #f0dcb2; border: 1px solid rgb(240 220 178 / 0.35); border-radius: 50%; width: 44px; height: 44px; padding: 0;
}
.pray-close:hover { color: #fff; }

/* The words on screen: said, being said (a gold line grows under it), and still to come. */
.stage-text {
  position: absolute; inset: 0; overflow-y: auto; display: none;
  padding: calc(64px + env(safe-area-inset-top)) max(22px, calc((100% - 36rem) / 2)) 40vh;
  font: 500 1.5rem/1.5 var(--display); color: var(--stage-ink); scrollbar-width: none;
}
.stage-text::-webkit-scrollbar { display: none; }
.stage-text p { margin: 0 0 1em; }
.stage-text span { opacity: 0.45; transition: opacity 0.25s, color 0.25s; }
.stage-text span.said { opacity: 0.94; }
.stage-text span.now {
  opacity: 1; color: #fff3d2; background-image: linear-gradient(90deg, #e8c46e, #f6e3a6); background-repeat: no-repeat;
  background-position: 0 100%; background-size: 100% 2px; animation: underline 0.6s ease-out both;
}
.stage-text.still span { opacity: 0.85; }
.pray.view-text .stage-img { display: none; }
.pray.view-text .stage-text { display: block; }
.pray.view-both .stage-img { height: 44%; }
.pray.view-both .stage-text {
  display: block; top: 44%; padding-top: 18px; padding-bottom: 30vh;
  -webkit-mask-image: linear-gradient(transparent, #000 28px, #000 85%, transparent); mask-image: linear-gradient(transparent, #000 28px, #000 85%, transparent);
}

/* The silence: the painting and words step back and a candle burns down to the bell. */
.pray.in-silence .stage-img { opacity: 0 !important; }
.pray.in-silence .stage-text, .pray.in-silence .stage-caption, .pray.in-silence .stage-empty { opacity: 0; pointer-events: none; }
.stage-text, .stage-empty { transition: opacity 1.2s ease; }
.stage-candle {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: calc(40px + env(safe-area-inset-top)) 24px 20px;
  background: radial-gradient(80% 55% at 50% 64%, rgb(42 29 16 / 0.85), transparent 72%); animation: fade 1.2s ease both;
}
.stage-candle .bell { position: relative; width: 60px; height: 60px; display: grid; place-items: center; color: #e8c46e; }
.stage-candle .ring { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; border-radius: 50%; border: 1px solid rgb(240 220 178 / 0.5); transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
.stage-candle .bell.ringing .ring { animation: ring 3s ease-out 1 both; }
.stage-candle .bell.ringing .ring.b { animation-delay: 0.7s; }
.candle-label { color: var(--stage-rubric); font-variant-caps: all-small-caps; letter-spacing: 0.09em; margin: 10px 0 0; }
.candle-words { margin: 10px 0 0; text-align: center; font: italic 500 1.7rem/1.3 var(--display); color: #f2e6cf; }
.candle { position: relative; margin-top: auto; display: flex; flex-direction: column; align-items: center; }
.candle .halo { position: absolute; left: 50%; bottom: 150px; width: 260px; height: 260px; border-radius: 50%; transform: translate(-50%, 50%); background: radial-gradient(circle, rgb(246 196 110 / 0.42), transparent 65%); animation: halo 3.2s ease-in-out infinite; }
.candle .wick { position: relative; width: 14px; height: 58px; }
.candle .wick::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 2px; height: 12px; background: #3a2a1a; transform: translateX(-50%); }
.candle .flame { position: absolute; left: 50%; bottom: 8px; width: 22px; height: 46px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(circle at 50% 72%, #fffbe9 0 16%, #ffd67a 34%, #f08a2b 68%, rgb(200 70 40 / 0) 100%); transform-origin: 50% 100%; animation: flame 2.2s ease-in-out infinite; }
.stage-candle { --wax-h: 190px; }
.candle .wax { width: 64px; height: var(--wax-h); transform-origin: 50% 100%; will-change: transform; border-radius: 5px 5px 2px 2px; background: linear-gradient(90deg, #d9c9a8, #f4ead3 40%, #e6d8b8 70%, #c9b690); }
.candle .holder { width: 112px; height: 12px; border-radius: 50%; background: #3a2d1d; box-shadow: 0 6px 18px rgb(0 0 0 / 0.6); }
.candle-time { font: 500 1.4rem var(--display); color: #e9dcc1; margin: 14px 0 0; min-height: 1.4em; }

/* The dock: the part being prayed, the beads, the controls. */
.dock {
  background: rgb(13 11 9 / 0.94); border-top: 1px solid rgb(232 196 110 / 0.18); color: var(--stage-ink);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); display: grid; gap: 10px;
}
.dock-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dock-labels { min-width: 0; flex: 1; }
.now-part { margin: 0; color: var(--stage-rubric); font-variant-caps: all-small-caps; letter-spacing: 0.09em; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-meta { margin: 0; font-size: 0.9rem; color: #b9a887; }
.dock-expand, .view-toggle { background: none; color: var(--stage-ink); border: 1px solid rgb(240 220 178 / 0.25); border-radius: 3px; width: 44px; height: 44px; padding: 0; }
.dock-expand:hover, .view-toggle:hover { color: #fff; }
.dock-expand[aria-expanded="true"] { transform: rotate(180deg); }
/* A string of beads, one per part: prayed ones gold, the one being prayed glowing. */
.beads { position: relative; display: flex; justify-content: space-between; align-items: center; height: 30px; padding: 0 4px; }
.beads::before, .beads::after { content: ""; position: absolute; left: 10px; top: 50%; height: 1px; }
.beads::before { right: 10px; background: rgb(232 196 110 / 0.3); }
.beads::after { right: 10px; background: rgb(232 196 110 / 0.85); transform: scaleX(var(--p, 0)); transform-origin: left center; transition: transform 0.4s linear; }
.bead {
  position: relative; z-index: 1; width: 12px; height: 12px; min-height: 0; padding: 0; border-radius: 50%;
  border: 1px solid rgb(232 196 110 / 0.65); background: #0d0b09; transition: transform 0.3s var(--ease);
}
.bead::before { content: ""; position: absolute; inset: -16px -8px; } /* a comfortable place to tap */
.bead:hover { transform: scale(1.25); background: #0d0b09; }
.bead.done { background: linear-gradient(135deg, #b98f33, #f3e1a0 45%, #c9a042); border-color: transparent; }
.bead.now { width: 18px; height: 18px; background: #f3e1a0; border-color: transparent; }
.bead.now::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgb(232 196 110 / 0.55) 0 38%, rgb(232 196 110 / 0.18) 55%, transparent 70%);
  animation: bead-breathe 2.6s ease-in-out infinite; will-change: transform, opacity; }
.controls { display: flex; justify-content: center; align-items: center; gap: 30px; }
.ctl { background: none; color: var(--stage-ink); width: 48px; height: 48px; padding: 0; border-radius: 50%; }
.ctl:hover { color: #fff; }
.ctl.play { width: 68px; height: 68px; background: radial-gradient(circle at 35% 30%, #fff4d2, #e2bd62 60%, #a77c26); color: var(--gold-ink); box-shadow: 0 0 28px rgb(232 196 110 / 0.3); }
.ctl.play:hover { color: var(--gold-ink); }
.dock-more { display: grid; gap: 10px; max-height: 40vh; overflow-y: auto; padding-top: 4px; }
.pause-text { font-style: italic; margin: 0; }
.part-list { margin: 0; padding-left: 20px; font-size: 1rem; display: grid; gap: 2px; }
.part-list li { cursor: pointer; }
.part-list .now { color: #f3e1a0; }
.part-list .done { opacity: 0.55; }
.dock-more .secondary { color: var(--stage-ink); border-color: var(--stage-ink); }

/* After praying: the day's first letter illuminated, and the week's initials. */
.after { position: absolute; inset: 0; background: rgb(12 10 8 / 0.82); display: grid; place-items: center; padding: 16px; z-index: 4; overflow-y: auto; }
.after-card { background: var(--bg); color: var(--ink); border-radius: 3px; padding: 26px 26px 22px; width: min(460px, 100%); display: grid; gap: 12px; justify-items: stretch; box-shadow: var(--paper-shadow); animation: settle 0.6s var(--ease) both; }
.after-card .rubric { text-align: center; }
.after-card h2 { text-align: center; margin: 0; font-size: 2.1rem; }
.illumination { position: relative; width: 172px; height: 187px; justify-self: center; display: grid; place-items: center; }
.illum-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.illum-frame .vine { stroke-dasharray: 900; stroke-dashoffset: 900; }
.illumination.gilding .vine { animation: draw 3.6s ease-out 0.3s forwards; }
.illum-letter {
  position: relative; font: 700 136px/1 var(--display); color: transparent;
  background: linear-gradient(100deg, #8d6a22 0%, #c9a042 30%, #fff1bd 45%, #d6b04f 55%, #8d6a22 80%); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 1px rgb(0 0 0 / 0.35));
}
.illumination.gilding .illum-letter { animation: gild 4s ease-in-out infinite alternate; }
.week-initials { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.week-initials .initial { width: 32px; height: 38px; display: flex; align-items: center; justify-content: center; font: 600 1.25rem var(--display); border: 1px solid var(--line); color: var(--muted); border-radius: 1px; }
.week-initials .initial.prayed { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.week-initials .initial.now { box-shadow: 0 0 0 2px var(--rubric); }

/* Wide screens: the painting beside a column for the player. */
@media (min-width: 900px) {
  .pray { grid-template-columns: 1fr 380px; grid-template-rows: 1fr; }
  .dock { border-top: 0; border-left: 1px solid rgb(232 196 110 / 0.18); align-content: end; padding: 28px; }
  .dock-expand { display: none; }
  .dock-more { display: grid !important; max-height: none; }
  .now-part { white-space: normal; font-size: 1.2rem; }
  .pray.view-both .stage-img { height: 100%; width: 50%; }
  .pray.view-both .stage-text { top: 0; left: 50%; padding: 64px 36px 40vh; -webkit-mask-image: none; mask-image: none; }
}

/* ================================================================ motion
   Slow, and mostly the paintings: they drift the way light moves across a wall. Moving
   around the app fades gently; covers settle in one after another. All of it stops for
   people who ask their device for less motion. */
.drift { animation: drift 34s ease-in-out infinite alternate; transform-origin: 45% 40%; will-change: transform; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.1) translate(-1%, 0.8%); } }
@keyframes drift-long { from { transform: scale(1); } to { transform: scale(1.12) translate(-1.2%, -1%); } }
@keyframes sheen { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dawnlight { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }
@keyframes flicker { 0%, 100% { opacity: 0.62; } 18% { opacity: 0.78; } 33% { opacity: 0.58; } 52% { opacity: 0.86; } 70% { opacity: 0.66; } 86% { opacity: 0.8; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(0.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes underline { from { background-size: 0% 2px; } to { background-size: 100% 2px; } }
@keyframes bead-breathe { 0%, 100% { transform: scale(0.8); opacity: 0.55; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes bead-glow { 0%, 100% { box-shadow: 0 0 0 0 rgb(232 196 110 / 0.55), 0 0 10px rgb(232 196 110 / 0.6); } 50% { box-shadow: 0 0 0 7px rgb(232 196 110 / 0), 0 0 18px rgb(232 196 110 / 0.9); } }
@keyframes burn { from { transform: scaleY(1); } to { transform: scaleY(0.242); } }
@keyframes burn-drop { from { transform: translateY(0); } to { transform: translateY(calc(var(--wax-h, 190px) * 0.758)); } }
@keyframes flame { 0%, 100% { transform: translateX(-50%) scale(1, 1) rotate(-1deg); } 25% { transform: translateX(-50%) scale(0.96, 1.06) rotate(2deg); } 50% { transform: translateX(-50%) scale(1.03, 0.95) rotate(-2deg); } 75% { transform: translateX(-50%) scale(0.98, 1.04) rotate(1deg); } }
@keyframes halo { 0%, 100% { opacity: 0.55; } 50% { opacity: 0.85; } }
@keyframes ring { 0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.7; } 100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; } }
@keyframes gild { 0% { background-position: 120% 0; } 100% { background-position: -20% 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes talk-wave { 0%, 100% { transform: scaleY(0.32); opacity: 0.7; } 50% { transform: scaleY(1); opacity: 1; } }
@keyframes talk-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes orb-breathe { 0%, 100% { transform: scale(0.96); opacity: 0.45; } 50% { transform: scale(1.06); opacity: 0.9; } }
@keyframes orb-turn { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
::view-transition-old(root) { animation: 0.2s ease both fade reverse; }
::view-transition-new(root) { animation: 0.35s ease both fade; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .drift, .stage-img.shown, .candle .flame, .gold { animation: none !important; }
  .candle .wax, .candle .wick { animation: none !important; }
  .gold::after, .bead.now::after { animation: none !important; display: none; }
  .talk-wave i { animation: none !important; transform: scaleY(0.6); }
  .illum-frame .vine { stroke-dashoffset: 0; }
  .talk-orb { transform: none; }
}

/* ================================================================ small screens */
@media (max-width: 560px) {
  body { font-size: 17.5px; }
  h1 { font-size: 2.1rem; }
  main { padding: 0 16px 70px; }
  .topbar { padding: 14px 16px 6px; }
  .card { padding: 18px; }
  .today-art .frame { height: 300px; }
  .today-text { padding: 18px 20px 20px; }
  .today-title { font-size: 2.5rem; }
  .shelf { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 22px 14px; }
  .arch { height: 170px; }
  .cover { padding: 14px 13px 13px; }
  .cover-title { font-size: 1.4rem; }
  .new-cover { min-height: 280px; }
  .day-title { font-size: 2.3rem; }
  .page-art .frame { height: 280px; }
  .stage-candle { --wax-h: 150px; }
  .candle-words { font-size: 1.5rem; }
}

/* ================================================================ the build, as a bar */
.build-bar { display: flex; gap: 4px; height: 12px; margin: 14px 0 6px; }
.build-bar .seg { flex: 1 1 0; background: color-mix(in srgb, var(--line) 70%, transparent); border-radius: 1px; overflow: hidden; position: relative; }
.build-bar .seg i { display: block; height: 100%; width: 100%; background: var(--gold); background-size: 300% 100%; transform: scaleX(var(--fill, 0)); transform-origin: left center; transition: transform 1.2s var(--ease); }
.build-bar .seg.now i { animation: sheen 2.4s ease-in-out infinite alternate; }
.build-bar .seg.now { box-shadow: 0 0 0 1px var(--gold-flat); }
.build-bar .seg.failed { background: color-mix(in srgb, var(--rubric) 25%, transparent); }
.build-bar .seg.failed i { background: var(--rubric); }
.build-bar.compact { height: 8px; margin: 8px 0 12px; max-width: 420px; }
.build-step { margin: 0 0 4px; color: var(--muted); font-variant-caps: all-small-caps; letter-spacing: 0.08em; font-size: 1rem; }
@media (prefers-reduced-motion: reduce) { .build-bar .seg.now i { animation: none; } }

/* On phones the links sit on their own row under the name; the account is on the About me page. */
.me-account { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 18px; }
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; row-gap: 2px; }
  .brand { font-size: 1.25rem; white-space: nowrap; }
  .topnav { flex-basis: 100%; flex-wrap: wrap; gap: 4px 16px; font-size: 1rem; }
  #account { display: none !important; }
}

#progress-days:empty { display: none; }

/* ---------------------------------------------------------------- exercise days */
.exercise-text { font-size: 1.16rem; line-height: 1.7; white-space: pre-line; margin: 6px 0 4px; padding: 14px 18px; border-left: 2px solid var(--rubric); background: color-mix(in srgb, var(--page) 70%, var(--paper)); }
.page-text.exercise .rubric { margin: 0; }
.state-line.done { color: var(--gold-ink); font-style: normal; font-variant-caps: all-small-caps; letter-spacing: 0.08em; font-size: 1.05rem; }
.today-note { margin: 4px 0 2px; font-style: italic; color: var(--muted); }

/* The reading's reference above the text on the prayer screen (shown, not read aloud). */
.stage-text .text-ref { font-variant-caps: all-small-caps; letter-spacing: .09em; font-size: .95rem; color: var(--rubric-night, #e0806a); opacity: .9; margin-bottom: .6em; }

/* "Pray without the browser" (iPhone): how to add the app to the Home Screen. */
.tip-steps { padding-left: 1.2em; display: grid; gap: 8px; margin: 4px 0 8px; }
.tip-steps .icon-wrap { vertical-align: -4px; }

.status .error-code { font-size: 0.75em; opacity: 0.6; }

/* ---------------------------------------------------------------- prayer practice */
.practice-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 18px 0; }
.practice-card { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 3px; background: var(--page, var(--card)); text-decoration: none; color: inherit; transition: transform .25s ease, box-shadow .25s ease; }
.practice-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(60 40 15 / .12); }
.practice-card strong { font-family: var(--display, var(--serif)); font-size: 1.5rem; font-weight: 600; }
.practice-voice-choice { max-width: 360px; }
.practice-journal { list-style: none; padding: 0; display: grid; gap: 14px; }
.practice-journal p { margin: 4px 0 0; white-space: pre-wrap; }
.practice-run { max-width: 640px; margin: 0 auto; padding-top: 12px; }
.practice-progress { height: 3px; background: var(--line); margin: 6px 0 22px; position: relative; overflow: hidden; }
.practice-progress i { position: absolute; inset: 0; background: linear-gradient(90deg, #b98f33, #e9cd7c); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .6s ease; }
.practice-words { font-family: var(--display, var(--serif)); font-size: 1.55rem; line-height: 1.45; animation: rise .6s ease both; }
.practice-question { font-family: var(--display, var(--serif)); font-style: italic; font-size: 1.45rem; line-height: 1.35; }
.practice-clock { --p: 0; width: 132px; height: 132px; border-radius: 50%; margin: 18px auto; display: grid; place-items: center; font-family: var(--display, var(--serif)); font-size: 2rem;
  background: conic-gradient(#c9a042 calc(var(--p) * 360deg), var(--line) 0); position: relative; }
.practice-clock::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg); }
.practice-body.journal .practice-clock { width: 88px; height: 88px; font-size: 1.3rem; margin: 10px 0; }
.practice-clock { isolation: isolate; } .practice-clock::before { z-index: -1; }
.practice-body textarea { width: 100%; min-height: 200px; font-size: 1.05rem; line-height: 1.5; }
.practice-prompts { color: var(--muted); font-size: .92rem; padding-left: 1.1em; }
.practice-week { margin-top: 14px; display: grid; gap: 10px; max-height: 40vh; overflow-y: auto; padding: 12px; border: 1px solid var(--line); }
.practice-week p { margin: 2px 0 0; white-space: pre-wrap; }
.practice-controls { display: flex; gap: 10px; justify-content: center; margin: 22px 0 8px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.my-examen { margin: 22px 0; display: grid; gap: 10px; }
.my-examen h2 { margin: 0; }
.my-examen #my-examen-form { display: grid; gap: 10px; }
.my-examen textarea { width: 100%; }
.my-examen .practice-card { background: var(--bg); }
/* The Examen's stage: a painting drifting slowly, with a candle */
.practice-stage { position: relative; height: min(46vh, 440px); overflow: hidden; border-radius: 3px; background: #0e0b08; margin-bottom: 6px; box-shadow: 0 18px 40px rgb(20 12 4 / .25); }
.practice-stage.compact { height: 150px; }
.stage-art { position: absolute; inset: 0; opacity: 0; transition: opacity 2.4s ease; }
.stage-art.shown { opacity: 1; }
.stage-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-fill { object-fit: cover; filter: blur(22px) brightness(.45); transform: scale(1.15); }
.stage-painting { object-fit: contain; opacity: .95; animation: stage-drift 48s ease-in-out infinite alternate; }
.practice-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgb(10 6 2 / .55)); }
@keyframes stage-drift { from { transform: scale(1); } to { transform: scale(1.05); } }
.candle { position: absolute; z-index: 1; left: 50%; bottom: 0; width: 46px; transform: translateX(-50%); }
.practice-stage.mode-painting .candle { left: auto; right: 18px; transform: none; width: 34px; }
.practice-stage.mode-candle .candle { width: 70px; bottom: -20px; }
.practice-stage.compact.mode-candle .candle { width: 40px; }
.candle svg { display: block; width: 100%; overflow: visible; }
.candle .flame { transform-origin: 40px 80px; animation: flicker 2.8s ease-in-out infinite; }
.candle .flame.core { animation-duration: 3.4s; }
.candle .glow { transform-origin: 40px 60px; animation: glow 4s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) skewX(0); } 22% { transform: scale(.96, 1.05) skewX(1.5deg); } 48% { transform: scale(1.03, .96) skewX(-1deg); } 71% { transform: scale(.98, 1.03) skewX(.8deg); } }
@keyframes glow { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.art-caption { font-style: italic; font-size: .85rem; color: var(--muted); margin: 0 0 14px; }
.practice-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .stage-painting, .candle .flame, .candle .glow { animation: none; } }
.practice-advanced { margin: 14px 0; display: grid; gap: 8px; } .practice-advanced label { display: grid; gap: 4px; max-width: 360px; }
/* While the server wakes up */
.waking { min-height: 60vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 24px; animation: waking-in .8s ease 1.2s both; }
@keyframes waking-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.waking-stuck { opacity: 0; animation: waking-in .8s ease 20s both; }
.waking p { margin: 0; max-width: 34ch; }
#waking-phrase { font-family: var(--display, var(--serif)); font-size: 1.35rem; }
.breath-circle { width: 150px; height: 150px; margin-bottom: 18px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display, var(--serif)); font-style: italic; font-size: 1.05rem; color: #6b4a14;
  background: radial-gradient(circle, #fff4c8 0%, #f3d98f 55%, #e2b85a 100%); box-shadow: 0 0 40px 12px rgb(233 196 120 / .35); animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0% { transform: scale(.62); } 40% { transform: scale(1); } 100% { transform: scale(.62); } }
.waking-time { font-variant-numeric: tabular-nums; }
.paste-link { margin-top: 14px; }
.paste-link summary { cursor: pointer; color: var(--accent, #a32a1c); }
.topnav a { white-space: nowrap; }
/* Keep the controls in reach under the painting */
.practice-stage { height: min(34vh, 440px); }
.practice-stage:not([hidden]) ~ .practice-body .practice-clock { width: 96px; height: 96px; font-size: 1.5rem; margin: 10px auto; }
/* The player's controls stay pinned to the bottom of the screen while a session runs. */
.practice-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 22px 16px calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) calc(100% - 20px), transparent); }
.practice-dock .practice-controls, .practice-dock .practice-foot { max-width: 640px; margin: 0 auto; }
.practice-dock .practice-controls { margin-top: 0; margin-bottom: 4px; }
.practice-dock .practice-foot { margin-bottom: 0; }
.practice-run { padding-bottom: 150px; }
.idea-box textarea { width: 100%; }
.idea-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; margin-top: 8px; }
.idea-row label { display: grid; gap: 4px; }
.idea-photo input { max-width: 100%; }
.practice-body { padding-bottom: 24px; }
.paste-step { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); animation: rise .5s ease both; }
.paste-step h3 { margin: 0 0 4px; }
.me-gdoc { margin: 10px 0 16px; } .me-gdoc label { flex-basis: 100%; }
/* The live "what's happening now" line while a retreat is made */
.build-now { margin: 10px 0 2px; font-family: var(--display, var(--serif)); font-style: italic; font-size: 1.2rem; min-height: 1.5em; }
.build-now.changed { animation: rise .6s ease both; }
/* Words to wait with */
.quote { margin: 18px auto 6px; max-width: 34em; text-align: center; opacity: 0; transition: opacity .6s ease; }
.quote.shown { opacity: 1; }
.quote blockquote { margin: 0; font-family: var(--display, var(--serif)); font-style: italic; font-size: 1.2rem; line-height: 1.45; }
.quote blockquote::before { content: "“"; } .quote blockquote::after { content: "”"; }
.quote figcaption { margin-top: 6px; font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--muted); font-size: .95rem; }
.build-quote-wrap, #build-quote { border-top: 1px solid var(--line); padding-top: 14px; }
/* The code for signing in on the Home Screen app */
.handoff-code { font-family: var(--display, var(--serif)); font-size: 2.6rem; letter-spacing: .12em; margin: 6px 0; font-variant-numeric: tabular-nums; user-select: all; }
#signin-code { font-size: 1.4rem; letter-spacing: .1em; width: 11em; max-width: 100%; }
/* The part's name ("Opening: asking for the grace") fits the dock instead of widening the
   whole prayer screen: its box may shrink, so the name wraps on a phone. */
.dock-labels { min-width: 0; flex: 1 1 auto; }
.dock-top .now-part { white-space: normal; }
#view-pray, .dock, .stage { max-width: 100vw; }
#view-pray { overflow-x: hidden; }
/* iPhone browsers zoom into a text box whose text is under 16px, and may stay zoomed. */
input, select, textarea { font-size: max(16px, 1em); }
.debug-badge { border: 1px solid currentColor; border-radius: 3px; padding: 0 6px; font-size: .85em; }
.practice-section { margin: 22px 0 6px; } .practice-section h2 { font-size: 1.45rem; margin-bottom: 4px; } .practice-section .practice-list { margin-top: 10px; }
.heart-voice { border: 0; padding: 0; margin: 14px 0 6px; } .heart-voice legend { font-family: var(--display); font-size: 1.15rem; margin-bottom: 4px; } .heart-voice .check { margin: 4px 0; }
.toast { width: max-content; text-align: center; }
/* Talk it over, taking turns */
.talk-brain { display: grid; gap: 4px; margin-top: 10px; }
.talk-turns { display: grid; justify-items: center; gap: 10px; margin: 14px 0; }
.talk-turns #talk-turn { min-width: 12em; }
.talk-turns #talk-turn.listening { box-shadow: 0 0 0 4px color-mix(in srgb, var(--rubric) 30%, transparent); }
.talk-turns #talk-heard { min-height: 1.5em; font-style: italic; text-align: center; }
.talk-turns form { width: 100%; max-width: 32em; }
.gdoc-examples { margin-top: 8px; } .gdoc-examples ul { margin: 6px 0 0; padding-left: 1.2em; } #retreat-gdoc { width: 100%; }
.handoff-row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.handoff-qr { width: 170px; height: 170px; background: #fff; padding: 6px; border-radius: 4px; flex: none; }
.handoff-qr svg { width: 100%; height: 100%; display: block; }
.handoff-row > div:last-child { flex: 1 1 260px; }
/* "Talk now" on the home page */
.talk-now { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
.talk-now-button { display: inline-flex; align-items: center; gap: 10px; }
@media (max-width: 560px) { .talk-now { flex-direction: column; align-items: stretch; text-align: center; } .talk-now-button { justify-content: center; width: 100%; min-height: 56px; font-size: 1.25rem; } }
.site-foot a + a { margin-left: 22px; }
.card > .me-account { margin: 0; }
.service-links { display: inline-block; margin-top: 4px; font-size: 0.92em; color: var(--muted); }

/* ---------------------------------------------------------------- agents */
.agents .agent-group { margin-top: 28px; }
.agent-card { display: grid; gap: 10px; margin: 14px 0; min-width: 0; }
.agent-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.agent-head h3 { margin: 0; }
.agent-badge { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); padding: 2px 8px; border-radius: 3px; }
.agent-badge.mine { color: var(--rubric); border-color: var(--rubric); }
.agent-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 0.95rem; }
.agent-facts dt { color: var(--muted); }
.agent-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.agent-model { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.agent-model select { max-width: 100%; }
.agent-prompt { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; font-size: 0.85rem; line-height: 1.45; background: var(--page); border: 1px solid var(--line); padding: 12px; border-radius: 4px; }
.agent-editor textarea { width: 100%; font-family: var(--mono); font-size: 16px; line-height: 1.45; }
.agent-fixed summary { cursor: pointer; }
@media (max-width: 560px) { .agent-facts { grid-template-columns: 1fr; } .agent-facts dt { margin-top: 6px; } }

/* ---------------------------------------------------------------- how the voices talk (About) */
.pipelines { display: grid; gap: 14px; margin: 18px 0 8px; }
.pipeline { background: var(--page); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; min-width: 0; }
.pipeline.live { border-top: 4px solid var(--gold); }
.pipeline.turns { border-top: 4px solid var(--rubric); }
.pipeline h3 { margin: 0 0 10px; font-size: 1.3rem; }
.pipeline h3 span { font-family: var(--serif); font-size: 0.9rem; color: var(--muted); font-weight: 400; margin-left: 8px; }
.pipeline .flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pipeline .node { background: var(--field); border: 1px solid var(--line-strong); border-radius: 4px; padding: 7px 10px; font-size: 0.98rem; line-height: 1.25; }
.pipeline .node.you { border-radius: 999px; }
.pipeline .node.model { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 25%, transparent); }
.pipeline .node small { display: block; color: var(--muted); font-size: 0.82rem; }
.pipeline .link { color: var(--muted); font-size: 0.95rem; }
.pipeline p { margin: 10px 0 0; }

/* ---------------------------------------------------------------- the silence notice (live calls) */
.talk-still { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--gold-flat); border-left-width: 5px; border-radius: 6px; background: var(--page); }
.talk-still p { margin: 0 0 8px; }
.talk-still .row-buttons { margin: 0; align-items: center; }

/* ---------------------------------------------------------------- eval analysis (?evals) */
.evals { max-width: 1060px; }
.ev-tracks { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 8px 0; }
.ev-tracks button { background: var(--page); color: var(--ink); border: 1px solid var(--line-strong); padding: 6px 14px; font-size: 1rem; }
.ev-tracks button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ev-section { margin-top: 34px; }
.ev-section > h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.ev-figure { margin: 16px 0; padding: 16px 18px; min-width: 0; }
.ev-figure h3 { margin: 0 0 10px; font-size: 1.3rem; }
.ev-figure figcaption { margin-top: 10px; line-height: 1.45; }
.ev-svg { width: 100%; height: auto; display: block; font-family: var(--serif); }
.ev-svg text { fill: var(--ink); }
.ev-row-label { font-size: 13px; }
.ev-row-label.bold { font-weight: 700; }
.ev-row-value { font-size: 13px; font-weight: 600; }
.ev-row-note, .ev-tick, .ev-axis-label, .ev-band-label, .ev-mini-tick { font-size: 11px; fill: var(--muted) !important; }
.ev-in-bar { font-size: 11px; fill: #1c1712 !important; pointer-events: none; }
.ev-guide { stroke: var(--line); stroke-dasharray: 2 3; }
.ev-grid { stroke: var(--line); }
.ev-zero { stroke: var(--muted); stroke-width: 1; }
.ev-band.good { fill: color-mix(in srgb, var(--ok) 16%, transparent); }
.ev-band.fair { fill: color-mix(in srgb, var(--gold-flat) 18%, transparent); }
.ev-span { stroke: var(--line-strong); stroke-width: 2; }
.ev-pt.raw { fill: var(--page); stroke: var(--muted); stroke-width: 1.6; }
.ev-pt.std { fill: var(--ink); }
.ev-pt.icc { fill: var(--rubric); }
.ev-pt.diff { fill: var(--line-strong); }
.ev-pt.diff.clear { fill: var(--ink); }
.ev-ci { stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; }
.ev-ci.clear { stroke: var(--ink); }
.ev-bar { fill: var(--line-strong); }
.ev-bar.sig { fill: var(--ink); }
.ev-null { stroke: var(--rubric); stroke-width: 2; }
.ev-mean-line { stroke: var(--ink); stroke-width: 1.2; }
.ev-model-dot { stroke: var(--page); stroke-width: 2; }
.ev-heat-label { font-size: 12px; }
.ev-heat-value { font-size: 9px; fill: #1c1712 !important; pointer-events: none; }
.ev-heat-value.light { fill: #fff !important; }
.ev-heat { max-width: 760px; }
.ev-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 0.92rem; color: var(--muted); }
.ev-key { display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.ev-key.dot { border-radius: 50%; }
.ev-key.ring { border-radius: 50%; background: transparent; border: 1.6px solid var(--muted); }
.ev-key.diamond { transform: rotate(45deg) scale(0.85); background: var(--c); }
.ev-key.tick { width: 3px; height: 12px; }
.ev-multiples { display: grid; grid-template-columns: 170px repeat(var(--cols), minmax(120px, 1fr)); gap: 2px 10px; align-items: center; min-width: 560px; }
.ev-col-head { font-weight: 600; font-size: 0.95rem; padding-bottom: 4px; }
.ev-row-head { font-size: 0.95rem; line-height: 1.15; }
.ev-row-head small { color: var(--muted); display: block; font-size: 0.78rem; }
.ev-cell { border-bottom: 1px solid var(--line); }
.ev-scroll { overflow-x: auto; }
.ev-table-wrap { overflow-x: auto; }
.ev-table { border-collapse: collapse; width: 100%; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.ev-table th, .ev-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ev-table thead th { font-weight: 600; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.02em; }
.ev-table td.ok { color: var(--ok); font-weight: 700; }
.ev-judgments td:nth-child(5), .ev-judgments td:nth-child(6) { min-width: 240px; font-size: 0.9rem; }
.ev-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.82rem; margin-right: 4px; border: 1px solid currentColor; }
.ev-chip.good { color: var(--ok); } .ev-chip.fair { color: var(--work); } .ev-chip.poor, .ev-chip.none { color: var(--bad); }
.ev-findings li { margin: 6px 0; line-height: 1.45; }
.ev-multiples { grid-template-columns: 170px repeat(var(--cols), minmax(110px, 190px)); }
.ev-mini { max-width: 190px; }

/* ---------------------------------------------------------------- talking: modes, chat and composer */
.talk-modes { border: 0; padding: 0; margin: 14px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.talk-modes legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.talk-mode { display: grid; gap: 2px; padding: 10px 12px 10px 38px; position: relative; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field); cursor: pointer; }
.talk-mode input { position: absolute; left: 12px; top: 13px; }
.talk-mode strong { font-family: var(--display); font-size: 1.15rem; }
.talk-mode span { color: var(--muted); font-size: 0.92rem; line-height: 1.3; }
.talk-mode:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--page); }
.talk-mode:has(input:disabled) { opacity: 0.55; cursor: default; }
.talk-switch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; font-size: 0.95rem; }
.talk-switch button { padding: 4px 12px; font-size: 0.95rem; background: var(--page); color: var(--ink); border: 1px solid var(--line-strong); }
.talk-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.talk-new { margin-left: 8px; }
.talk-compose { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.talk-compose textarea { flex: 1; min-width: 0; resize: none; font: inherit; font-size: 16px; line-height: 1.4; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field); color: var(--ink); max-height: 30vh; }
.talk-transcript.chat { max-height: 60vh; }
.talk-transcript .earlier { opacity: 0.62; }
.talk-transcript .mode-note { justify-self: center; font-size: 0.85rem; color: var(--muted); border: 0; padding: 2px 8px; letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- waiting animations */
.talk-transcript .companion.waiting { display: flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--serif); font-size: 1rem; color: var(--muted); }
.wait-note { font-style: italic; font-size: 0.95rem; color: var(--muted); }
.wait-dots { display: inline-flex; gap: 4px; }
.wait-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-flat); animation: wait-dot 1.6s ease-in-out infinite; }
.wait-dots i:nth-child(2) { animation-delay: 0.2s; } .wait-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes wait-dot { 0%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* 1. the highlighter: a marker stroke, slightly uneven, swept left to right */
mark.hl { color: inherit; padding: 0 1px; border-radius: 3px 8px 5px 9px / 9px 4px 8px 5px;
  background-color: transparent;
  background-image: linear-gradient(100deg, rgb(245 200 90 / 0) 0%, rgb(240 196 84 / 0.55) 4%, rgb(246 212 120 / 0.42) 60%, rgb(236 188 72 / 0.58) 96%, rgb(245 200 90 / 0) 100%);
  background-repeat: no-repeat; background-size: 0% 72%; background-position: 0 80%; transition: background-size 0.65s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.6s; }
mark.hl.on { background-size: 100% 72%; }
mark.hl.fade { opacity: 1; background-image: linear-gradient(100deg, rgb(255 222 96 / 0) 0%, rgb(255 214 80 / 0.25) 3%, rgb(255 226 110 / 0.2) 97%, rgb(255 222 96 / 0) 100%); }
mark.hl.still { transition: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) mark.hl { color: #1c1712; } }

/* 2. the quill */
.wait-quill { width: 170px; height: 44px; overflow: visible; }
.wait-quill .ink { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 420; animation: quill-ink 3.4s cubic-bezier(0.45, 0.05, 0.4, 1) infinite; }
.wait-quill .blot { fill: var(--ink); offset-rotate: 0deg; animation: quill-move 3.4s cubic-bezier(0.45, 0.05, 0.4, 1) infinite; }
.wait-quill .feather { fill: var(--gold-flat); stroke: var(--gold-ink); stroke-width: 0.5; offset-rotate: 0deg; animation: quill-move 3.4s cubic-bezier(0.45, 0.05, 0.4, 1) infinite; }
@keyframes quill-ink { 0% { stroke-dashoffset: 420; opacity: 1; } 78% { stroke-dashoffset: 0; opacity: 1; } 92%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes quill-move { 0% { offset-distance: 0%; opacity: 1; } 78% { offset-distance: 100%; opacity: 1; } 90%, 100% { offset-distance: 100%; opacity: 0; } }
.wait-quill.still .ink { animation: none; stroke-dashoffset: 0; } .wait-quill.still .blot, .wait-quill.still .feather { display: none; }

/* 3. the candle */
.wait-candle { width: 54px; height: 54px; }
.wait-candle .halo { fill: rgb(255 210 120 / 0.28); transform-origin: 30px 20px; animation: candle-halo 3.2s ease-in-out infinite; }
.wait-candle .wax { fill: #efe5cf; stroke: #cdbf9e; stroke-width: 0.6; }
.wait-candle .wick { stroke: #3a2a1a; stroke-width: 1.2; }
.wait-candle .flame { fill: #f3a13d; transform-origin: 30px 27px; animation: candle-flame 2.6s ease-in-out infinite; }
.wait-candle .core { fill: #fff2c2; transform-origin: 30px 27px; animation: candle-flame 2.6s ease-in-out infinite reverse; }
@keyframes candle-flame { 0%, 100% { transform: scale(1, 1) rotate(-1deg); } 30% { transform: scale(0.94, 1.07) rotate(2deg); } 60% { transform: scale(1.04, 0.95) rotate(-2deg); } }
@keyframes candle-halo { 0%, 100% { transform: scale(0.9); opacity: 0.6; } 50% { transform: scale(1.12); opacity: 1; } }

/* 4. still water */
.wait-water { width: 120px; height: 44px; }
.wait-water .ring { fill: none; stroke: var(--gold-flat); stroke-width: 1; transform-origin: 60px 22px; animation: water-ring 4.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; opacity: 0; }
.wait-water .r2 { animation-delay: 1.4s; } .wait-water .r3 { animation-delay: 2.8s; }
.wait-water .drop { fill: var(--gold-flat); animation: water-drop 4.2s ease-in-out infinite; }
@keyframes water-ring { 0% { transform: scale(0.3); opacity: 0.9; } 100% { transform: scale(8.5); opacity: 0; } }
@keyframes water-drop { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.35; } }

/* 5. gold leaf */
.wait-gold { position: relative; width: 52px; height: 52px; flex: none; }
.wait-gold svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wait-gold .frame { fill: color-mix(in srgb, var(--rubric) 10%, var(--page)); stroke: var(--gold-flat); stroke-width: 1.2; }
.wait-gold .vine { fill: none; stroke: #4e7d4a; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 190; stroke-dashoffset: 190; animation: gold-vine 4.5s ease-in-out infinite; }
.wait-gold .bud { fill: var(--rubric); opacity: 0; animation: gold-bud 4.5s ease-in-out infinite; }
.wait-gold b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 30px/1 var(--display);
  background: linear-gradient(115deg, #8d6a22 0%, #d8b45a 30%, #fff4c8 45%, #b98f33 60%, #e9cd7c 80%, #8d6a22 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: gild 3s ease-in-out infinite alternate; }
@keyframes gold-vine { 0% { stroke-dashoffset: 190; } 55%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -190; } }
@keyframes gold-bud { 0%, 45% { opacity: 0; } 60%, 80% { opacity: 1; } 100% { opacity: 0; } }
.wait-gold.still .vine { animation: none; stroke-dashoffset: 0; } .wait-gold.still .bud { animation: none; opacity: 1; } .wait-gold.still b { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .wait-dots i, .wait-candle .halo, .wait-candle .flame, .wait-candle .core, .wait-water .ring, .wait-water .drop { animation: none; }
  .wait-water .r1 { opacity: 0.6; transform: scale(3); }
}

/* the Settings preview of all five */
.wait-previews { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 10px; }
.wait-preview { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field); cursor: pointer; }
.wait-preview.chosen { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.wait-preview-head { display: flex; gap: 8px; align-items: center; }
.wait-preview .talk-transcript { max-height: none; }
.wait-preview .talk-transcript li { max-width: 100%; font-size: 0.95rem; }
.ev-band.worse { fill: color-mix(in srgb, var(--bad) 7%, transparent); }
.ev-note { font-size: 12px; fill: var(--muted) !important; }
.ev-note.strong { fill: var(--ink) !important; font-weight: 600; }
.ev-note.end { text-anchor: end; } .ev-note.mid, .ev-band-label.mid { text-anchor: middle; } .ev-note.endish { text-anchor: end; }
.ev-leader { stroke: var(--muted); stroke-width: 1; fill: none; }
.ev-leader.thin { stroke-dasharray: 2 2; }
.ev-arrowhead { fill: var(--muted); }
.ev-callout { font-size: 12px; font-style: italic; }
.ev-callout.raw { fill: var(--muted) !important; } .ev-callout.std { fill: var(--ink) !important; } .ev-callout.icc { fill: var(--rubric) !important; }
.ev-piece { margin: 12px 0; padding: 14px 16px; }
.ev-piece header { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 10px; }
.ev-piece-model { font-weight: 600; }
.ev-verdicts { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .ev-verdicts { grid-template-columns: 1fr; } }
.ev-verdict { border-top: 2px solid var(--line); padding-top: 8px; font-size: 0.95rem; line-height: 1.4; }
.ev-verdict-head { display: flex; align-items: center; gap: 2px; font-weight: 600; margin-bottom: 4px; }
.ev-verdict-score { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; }
.ev-plus b { color: var(--ok); } .ev-minus b { color: var(--bad); }
.ev-plus, .ev-minus { margin: 4px 0; }
mark.ev-shared { background: color-mix(in srgb, var(--gold-flat) 35%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.ev-raw { margin-top: 10px; }
.ev-raw summary { cursor: pointer; color: var(--rubric); }
.ev-raw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
@media (max-width: 760px) { .ev-raw-grid { grid-template-columns: 1fr; } }
.ev-raw-grid h5 { margin: 0 0 6px; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.ev-raw-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; font-size: 0.85rem; line-height: 1.45; background: var(--page); border: 1px solid var(--line); padding: 10px; border-radius: 4px; margin: 0; }
.ev-raw-text.prose { font-family: var(--serif); font-size: 0.98rem; }
.ev-conv { max-height: 420px; }
.ev-has-tip { cursor: help; }
text.ev-has-tip:hover, text.ev-has-tip:focus { fill: var(--rubric) !important; text-decoration: underline dotted; outline: none; }
span.ev-has-tip:hover, span.ev-has-tip:focus { color: var(--rubric); outline: none; text-decoration: underline dotted; }
.ev-tip { position: absolute; z-index: 20; background: var(--page); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 6px; padding: 10px 12px; box-shadow: 0 10px 28px rgb(40 25 10 / 0.22); font-size: 0.95rem; line-height: 1.4; pointer-events: none; }
.ev-tip strong { font-family: var(--display); font-size: 1.15rem; margin-right: 8px; }
.ev-tip p { margin: 6px 0 0; }
.ev-tip-chip { font-size: 0.8rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px; }
.ev-pt.kappa { fill: var(--gold-flat); stroke: var(--gold-ink); stroke-width: 0.6; }
.ev-pt.ac2 { fill: #2e6f9e; }
.ev-callout.kappa { fill: #8a6516 !important; } .ev-callout.ac2 { fill: #2e6f9e !important; }
.ev-measure { display: inline-flex; gap: 8px; align-items: center; margin: 4px 0 6px; font-size: 1rem; }
.ev-measure select { font-size: 1rem; max-width: 100%; }
.ev-scores td.ev-score { background: color-mix(in srgb, var(--c) 45%, transparent); text-align: center; font-weight: 600; min-width: 48px; }
.ev-scores th { white-space: nowrap; }
.ev-tip-lines { margin: 6px 0 0; padding-left: 18px; font-size: 0.9rem; }
.ev-fit-cell { text-align: center; font-variant-numeric: tabular-nums; }
.ev-fit-cell.total { font-weight: 700; }
.ev-fit-plots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.ev-fit-plot h4 { margin: 0 0 4px; font-size: 1.05rem; }
.ev-frontier { fill: none; stroke: var(--rubric); stroke-width: 1.5; stroke-dasharray: 5 4; }
.ev-model-dot.front { stroke: var(--rubric); stroke-width: 2.5; }
.ev-share { display: flex; height: 26px; border-radius: 4px; overflow: hidden; margin: 10px 0 4px; font-size: 0.85rem; }
.ev-share span { background: var(--c); color: #fff; display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden; }
.ev-grid-key { font-size: 0.82rem; color: var(--muted); line-height: 1.3; }
.ev-scales th .hint { display: block; font-weight: normal; font-size: 0.8rem; max-width: 22rem; }
.ev-scales td.ev-good, .ev-scales td.ev-fair, .ev-scales td.ev-poor { color: #1c1712; }
.ev-scales td.ev-good { background: #92c5de; }
.ev-scales td.ev-fair { background: #e8e0cf; }
.ev-scales td.ev-poor { background: #f4c3b5; }
.ev-scales tr.ev-current th strong::after { content: " · current"; color: var(--accent, #a32a1c); font-weight: normal; }
.ev-mini { width: 120px; height: 46px; }
.ev-mini-bar { fill: #6b5d4b; }

/* the first look at a chosen file (new-retreat.js previewFile) */
#drop-hint .wait-dots { margin-left: 0.5rem; vertical-align: middle; }
.drop.previewed .drop-title { font-size: 1.6rem; }
.drop-description { display: block; color: var(--ink); font-size: 1.02rem; line-height: 1.45; max-width: 38rem; margin: 0.2rem auto 0.4rem; }
.drop-file { display: block; font-size: 0.85rem; color: var(--muted); }

/* Settings → Server start-up (about-me.js bootChart) */
.boot-svg { width: 100%; height: auto; display: block; }
.boot-grid { stroke: var(--line); stroke-width: 1; }
.boot-tick, .boot-note { font-size: 12px; fill: var(--muted); }
.boot-note.strong { fill: var(--ink); font-weight: 600; }
.boot-axis { font-size: 12px; fill: var(--muted); }
.boot-cold { fill: var(--rubric); }
.boot-whisker { stroke: var(--rubric); stroke-width: 1.5; opacity: 0.6; }
.boot-warm { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.boot-probe { fill: var(--gold-flat); stroke: var(--ink); stroke-width: 0.8; }
.boot-typical { stroke: var(--rubric); stroke-dasharray: 5 4; stroke-width: 1.2; }

/* highlights (highlights.js) */
mark.user-hl { background: color-mix(in srgb, var(--gold-flat) 45%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
/* A highlight on the prayer screen: one soft stroke of warm gold under the lower half of the
   letters (no boxes), and the words themselves a little warmer. */
.stage-text mark.user-hl { background: linear-gradient(transparent 58%, rgb(232 196 110 / 0.22) 58%, rgb(232 196 110 / 0.22) 92%, transparent 92%);
  color: inherit; padding: 0; border-radius: 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.stage-text mark.user-hl span, .stage-text span mark.user-hl { color: #f3e1b0; }
.hl-button { position: fixed; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--page); border: 0; font: 600 1rem var(--serif); box-shadow: 0 6px 20px rgb(0 0 0 / 0.25); }
.hl-swatch { width: 14px; height: 14px; border-radius: 3px; background: var(--gold-flat); }
.hl-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 14px; max-height: 60vh; overflow-y: auto; }
.hl-item blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--gold-flat); font-style: italic; }
.hl-item .meta { margin: 4px 0 0 15px; }
.hl-item button { margin-left: 15px; }
#me-highlights .check .meta { display: block; margin-top: 2px; }

/* the handout's front matter before Day 1 (retreat.js renderIntroduction) */
.retreat-intro { margin: 0 0 18px; }
.retreat-intro summary { cursor: pointer; font: 600 1.15rem var(--display, var(--serif)); }
.intro-text p { margin: 0.8em 0 0; line-height: 1.6; }
.intro-text .grace { font-style: italic; }

/* Continue, or start from the beginning (pray.js offerResume) */
.resume-choice { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; gap: 14px; padding: 24px;
  background: color-mix(in srgb, #14100b 78%, transparent); color: #f8f1e2; text-align: center; }
.resume-title { font: 600 1.5rem var(--display, var(--serif)); margin: 0; }
.resume-when { margin: 0 0 8px; opacity: 0.8; }
.resume-btn { display: flex; align-items: center; gap: 14px; min-width: min(320px, 80vw); padding: 14px 20px; border-radius: 14px;
  border: 1px solid rgb(255 255 255 / 0.35); background: rgb(255 255 255 / 0.08); color: inherit; text-align: left; font: inherit; }
.resume-btn.gold { background: linear-gradient(135deg, #f3dca0, #c9942f); color: #2a1d0c; border: 0; }
.resume-btn strong { display: block; font-size: 1.15rem; }
.resume-btn small { display: block; opacity: 0.85; }

/* "Last prayed …" at the top of a day (retreat.js lastPrayedLine) */
.last-prayed { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; }
.last-prayed svg { color: var(--rubric); }
.cal-steps { padding-left: 1.3em; display: grid; gap: 10px; margin: 0 0 8px; }
#me-cal-url { width: 100%; font-size: 0.85rem; }

/* Apple Health (health.js) */
.health-steps { padding-left: 1.3em; display: grid; gap: 8px; }
.health-heart { color: #ff2d55; }
.health-button.sent { opacity: 0.7; pointer-events: none; }
.after-health:empty { display: none; }
.after-health { margin: 10px 0; }

/* Small pictures (look.js): never stretched past about 1.6 times their own size */
.frame.lowres-host { position: relative; display: grid; place-items: center; background: #15110c; }
.frame.lowres-host::before { content: ""; position: absolute; inset: -40px; background: var(--lowres-bg) center / cover no-repeat;
  filter: blur(26px) saturate(1.1) brightness(0.55); }
.frame img.lowres { position: relative; z-index: 1; width: auto !important; height: auto !important; object-fit: contain !important;
  max-width: min(86%, calc(var(--nw) * 1.6px)); max-height: 86%; min-width: min(60%, calc(var(--nw) * 1px)); animation: none !important;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.45); border-radius: 2px; }
.stage-img.lowres { inset: 0 !important; margin: auto; width: min(88%, calc(var(--nw) * 1.6px)) !important; height: auto !important;
  max-height: 78%; box-shadow: 0 14px 40px rgb(0 0 0 / 0.5); }

/* The practice screen: a header pinned below the status bar, and the spoken word underlined */
.practice-head { position: sticky; top: 0; z-index: 3; margin: 0 -16px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 2px;
  background: linear-gradient(var(--bg) 82%, transparent); }
.practice-head .practice-progress { margin-bottom: 14px; }
.practice-words.following span { opacity: 0.5; transition: opacity 0.25s, color 0.25s; }
.practice-words.following span.said { opacity: 0.95; }
.practice-words.following span.now { opacity: 1; background-image: linear-gradient(90deg, #e8c46e, #f6e3a6); background-repeat: no-repeat;
  background-position: 0 100%; background-size: 100% 2px; animation: underline 0.6s ease-out both; }

/* Sleep with prayer: a dim, quiet screen */
.practice-run.sleep .practice-stage, .practice-run.sleep .art-caption { opacity: 0.35; transition: opacity 2s; }
.practice-run.sleep .practice-words.following span { opacity: 0.35; }
.practice-run.sleep .practice-words.following span.said, .practice-run.sleep .practice-words.following span.now { opacity: 0.75; }
.practice-rest { text-align: center; font-style: italic; color: var(--muted); opacity: 0.6; margin: 18vh 0; }

/* During a sleep prayer the whole screen is the candlelit night palette, whatever the phone's setting. */
html.sleeping { --bg: #0d0b09; --page: #15120f; --field: #1b1814; --ink: #d9ccb4; --muted: #8f8269; --line: #2c261d;
  --line-strong: #4a3f2f; --rubric: #c47a66; color-scheme: dark; }
html.sleeping body { background: var(--bg); color: var(--ink); }

/* A small picture with the words (both): it stays in the picture's band above the text. */
.pray.view-both .stage-img.lowres { top: calc(env(safe-area-inset-top) + 64px) !important; bottom: 56% !important; left: 0 !important; right: 0 !important;
  height: auto !important; max-height: calc(44% - env(safe-area-inset-top) - 80px); margin: auto; }
@media (min-width: 900px) {
  .pray.view-both .stage-img.lowres { bottom: 0 !important; right: 50% !important; max-height: 70%; width: min(40%, calc(var(--nw) * 1.6px)) !important; }
}
.sleep-sound { display: grid; gap: 4px; max-width: 26rem; margin: 6px 0 14px; }

/* A photo of your page (retreat.js pageNotesBox) */
.page-notes { margin: 14px 0 6px; display: grid; gap: 12px; }
.page-note { border-left: 2px solid var(--gold-flat); padding: 4px 0 4px 16px; display: grid; gap: 6px; }
.page-note-head { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.page-note ul { margin: 2px 0 0; padding-left: 1.1em; display: grid; gap: 4px; }
.page-note .ink { font-family: "Segoe Print", "Bradley Hand", "Noteworthy", cursive; font-size: 1.05rem; color: var(--ink); }
.page-note .marked li.in-app span:first-child { background: linear-gradient(transparent 58%, rgb(232 196 110 / 0.35) 58%, rgb(232 196 110 / 0.35) 92%, transparent 92%); }
.page-photo { justify-self: start; display: inline-flex; align-items: center; gap: 8px; }
.page-photo .wait-dots { margin-left: 8px; }
