/* ==========================================================================
   Kathisma: black, white and grays. System font, hairlines, no ornament.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --fg: #000000;
  --fg-2: #6e6e73;
  --tile: #f5f5f7;
  --hairline: #d2d2d7;
  --btn-bg: #000000;
  --btn-bg-hover: #333336;
  --btn-fg: #ffffff;
  --underline: rgba(0, 0, 0, .3);
  --selection: rgba(0, 0, 0, .12);
  --focus: #000000;
  --seg-track: rgba(118, 118, 128, .12);
  --surface-2: #ffffff;
  --img-outline: rgba(0, 0, 0, .1);
  --shadow-border:
    0 0 0 1px rgba(0, 0, 0, .06),
    0 1px 2px -1px rgba(0, 0, 0, .06),
    0 2px 4px 0 rgba(0, 0, 0, .04);
  --shadow-border-hover:
    0 0 0 1px rgba(0, 0, 0, .08),
    0 1px 2px -1px rgba(0, 0, 0, .08),
    0 2px 4px 0 rgba(0, 0, 0, .06);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-tile: 20px;
  --radius-control: 12px;
  --radius-inline: 6px;

  --gutter: 16px;
  --measure: 680px;
  --section-space: clamp(64px, 10vw, 96px);
  --page-top: clamp(48px, 8vw, 80px);
}
@media (min-width: 768px) {
  :root { --gutter: 22px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
    --fg-2: #a1a1a6;
    --tile: #1c1c1e;
    --hairline: #38383a;
    --btn-bg: #ffffff;
    --btn-bg-hover: #e8e8ed;
    --btn-fg: #000000;
    --underline: rgba(255, 255, 255, .35);
    --selection: rgba(255, 255, 255, .24);
    --focus: #ffffff;
    --seg-track: rgba(118, 118, 128, .24);
    --surface-2: #2c2c2e;
    --img-outline: rgba(255, 255, 255, .1);
    --shadow-border: 0 0 0 1px rgba(255, 255, 255, .08);
    --shadow-border-hover: 0 0 0 1px rgba(255, 255, 255, .13);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.022em;
}
main { flex: 1 0 auto; }
::selection { background: var(--selection); }

h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
b, strong { font-weight: 600; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--underline);
  text-underline-offset: .2em;
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  a:hover { text-decoration-color: currentColor; }
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header: wordmark + a two-segment control (Analogion | Thyra) ---------- */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 16px;
  min-height: 60px; padding-top: 6px; padding-bottom: 6px;
}
.wordmark, .partner-page .brand {
  margin: 0;
  font-size: 19px; font-weight: 600; line-height: 1.21; letter-spacing: -.012em;
}
.wordmark { justify-self: start; }
.wordmark a, .partner-page .brand a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none;
}
.site-header .segmented { grid-column: 2; }
/* Below ~480px the three columns can't hold the wordmark beside a centred control: stack both, centred. */
@media (max-width: 479px) {
  .site-header .wrap { grid-template-columns: 1fr; justify-items: center; padding-bottom: 10px; }
  .wordmark, .site-header .segmented { grid-column: 1; justify-self: center; }
}

/* Segmented control: a pill track; the selected segment is filled like a button, the other is plain. Two equal
   segments, 36px tall in a 2px track (pill radii, so the corners stay concentric); each link's hit area is 44px. */
.segmented ul, .segmented[role="tablist"] {
  list-style: none; margin: 0; padding: 2px;
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: 999px;
  background: var(--seg-track);
}
.segmented li { display: flex; }
.segmented a, .segmented [role="tab"] {
  position: relative; flex: 1;
  display: flex; align-items: center; justify-content: center;
  min-width: 104px; height: 36px; margin: 0; padding: 0 18px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--fg-2);
  font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1; letter-spacing: -.016em;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.segmented a::after, .segmented [role="tab"]::after { content: ""; position: absolute; inset: -4px 0; }
.segmented a:focus-visible, .segmented [role="tab"]:focus-visible { outline-offset: 2px; }
.segmented a[aria-current="page"], .segmented [role="tab"][aria-selected="true"] {
  background: var(--btn-bg); color: var(--btn-fg); cursor: default;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; max-width: 100%;
  margin: 0; padding: 12px 22px;
  border: 0; border-radius: var(--radius-control);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: inherit; font-size: 17px; font-weight: 500; line-height: 20px; letter-spacing: -.016em;
  text-align: center; text-decoration: none; text-wrap: balance;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.button:focus-visible { outline-offset: 3px; }
.button.is-disabled, .button:disabled {
  background: transparent; color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  cursor: default;
}
@media (hover: hover) {
  .button:not(.is-disabled, :disabled):hover { background: var(--btn-bg-hover); }
  .segmented a:not([aria-current]):hover, .segmented [role="tab"][aria-selected="false"]:hover, .site-footer a:hover { color: var(--fg); }
}

/* Press feedback: a slight scale where motion is welcome, a dim where it isn't. */
@media (prefers-reduced-motion: no-preference) {
  .button {
    transition-property: background-color, transform;
    transition-duration: 150ms;
    transition-timing-function: ease-out;
  }
  .button:not(.is-disabled, :disabled):active { transform: scale(.96); }
  a { transition: text-decoration-color 150ms ease-out; }
  .site-footer a { transition: color 150ms ease-out; }
  .segmented a, .segmented [role="tab"] {
    transition-property: color, background-color, transform;
    transition-duration: 150ms;
    transition-timing-function: ease-out;
  }
  .segmented a:not([aria-current]):active, .segmented [role="tab"][aria-selected="false"]:active { transform: scale(.96); }
}
@media (prefers-reduced-motion: reduce) {
  .button:not(.is-disabled, :disabled):active { opacity: .7; }
}
.site-footer a:active, .wordmark a:active { opacity: .6; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--section-space);
  border-top: 1px solid var(--hairline);
  padding: 24px 0 40px;
  font-size: 13px; line-height: 1.38; letter-spacing: -.01em; color: var(--fg-2);
}
.site-footer .wrap { display: grid; gap: 12px; }
.site-footer p { margin: 0; }
.site-footer .free { color: var(--fg); font-size: 15px; font-weight: 500; letter-spacing: -.016em; }
.site-footer ul {
  list-style: none; margin: -12px -10px; padding: 0;
  display: flex; flex-wrap: wrap;
}
.site-footer a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  border-radius: 8px;
  color: var(--fg-2); text-decoration: none;
}
.site-footer a:focus-visible { outline-offset: -2px; }
.site-footer a[aria-current="page"] { color: var(--fg); }
@media (min-width: 768px) {
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
  .site-footer .credit { grid-column: 1 / -1; }
}

/* ---------- Content pages ---------- */
.page { padding: var(--page-top) 0 0; max-width: var(--measure); }
.page h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 56px); font-weight: 700; line-height: 1.07; letter-spacing: -.005em;
}
.page h1 .greek { font-weight: 400; color: var(--fg-2); }
.lede {
  margin: 16px 0 0;
  font-size: clamp(19px, 2.4vw, 22px); line-height: 1.33; letter-spacing: -.012em;
  color: var(--fg-2);
}
.page h2, .section h2 {
  margin: 48px 0 0;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; line-height: 1.14; letter-spacing: .004em;
}
.page h3, .section h3 { margin: 32px 0 0; font-size: 21px; font-weight: 600; line-height: 1.24; letter-spacing: -.012em; }
.page h4, .section h4 { margin: 24px 0 0; font-size: 17px; font-weight: 600; line-height: 1.29; }
.page p, .page ul, .page ol, .section p, .section ul, .section ol { margin: 16px 0 0; }
:is(.page, .section) :is(h2, h3) + :is(p, ul, ol, pre) { margin-top: 12px; }
:is(.page, .section) h4 + :is(p, ul, ol) { margin-top: 8px; }
:is(.page, .section) :is(ul, ol) { padding-left: 1.3em; }
:is(.page, .section) li + li { margin-top: 8px; }
:is(.page, .section) li::marker { color: var(--fg-2); }
.page .actions, .section .actions { margin-top: 32px; }
.fine, .page .fine, .section .fine { margin: 12px 0 0; font-size: 14px; line-height: 1.43; letter-spacing: -.016em; color: var(--fg-2); }
.verse { font-style: italic; color: var(--fg-2); hanging-punctuation: first; }
.verse cite { font-style: normal; white-space: nowrap; }

/* Major sections on a long page: separated by a hairline, headed like a page. */
.section {
  margin-top: clamp(48px, 7vw, 72px);
  padding-top: clamp(40px, 6vw, 56px);
  border-top: 1px solid var(--hairline);
  scroll-margin-top: 8px;
}
.section > * { max-width: var(--measure); }
.section > h2:first-child {
  margin: 0;
  font-size: clamp(32px, 5vw, 40px); line-height: 1.1; letter-spacing: 0;
}
.section > h2:first-child + .lede { margin-top: 12px; }
.section.is-wide > * { max-width: none; }
/* The first section on a page opens it: no rule above, page-title type. */
.section.is-lead { margin-top: 0; padding-top: var(--page-top); border-top: 0; }
.section.is-lead > h1:first-child {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 56px); font-weight: 700; line-height: 1.07; letter-spacing: -.005em;
}
.section.is-lead > h1:first-child + .lede { margin-top: 12px; }

/* App identity: icon beside the name, the way app pages show it. The placeholder icon already carries the macOS
   rounded-rect shape; the mask keeps a future full-bleed icon in the same shape (macOS corner ≈ 22.37%). */
.app-id { display: flex; align-items: center; gap: 20px; }
.app-icon {
  flex: none; display: block; width: 96px; height: 96px;
  border-radius: 22.37%; object-fit: cover;
}
.app-id h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 56px); font-weight: 700; line-height: 1.07; letter-spacing: -.005em;
}
.app-id .lede { margin: 6px 0 0; }
@media (max-width: 479px) { .app-id { gap: 16px; } .app-icon { width: 80px; height: 80px; } }

pre, code { font-family: var(--font-mono); letter-spacing: 0; }
code { font-size: .88em; }
pre {
  margin: 16px 0 0; padding: 16px;
  background: var(--tile); border-radius: var(--radius-control);
  font-size: 15px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2;
}
pre code { font-size: inherit; }
:not(pre) > code {
  padding: .1em .35em;
  background: var(--tile); border-radius: var(--radius-inline);
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- Platform downloads (Thyra) ---------- */
.section .platforms {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
@media (min-width: 768px) { .section .platforms { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
/* Two platforms (Mac, iPhone): stay a pair within the text measure at every width. */
@media (min-width: 768px) { .section .platforms.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.platform {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 24px 20px 20px;
  background: var(--tile);
  border-radius: var(--radius-tile);
}
@media (min-width: 768px) { .platform { padding: 28px 24px 24px; } }
.platform-glyph { display: block; width: 40px; height: 40px; color: var(--fg); }
.section .platforms li + li { margin-top: 0; }
.section .platform :is(h2, h3) { margin: 16px 0 0; font-family: var(--font); font-size: 21px; font-weight: 600; line-height: 1.24; letter-spacing: -.012em; }
.section .platform p { margin: 4px 0 0; font-size: 14px; line-height: 1.43; letter-spacing: -.016em; color: var(--fg-2); }
.platform .button { margin-top: auto; padding-inline: 14px; font-size: 15px; white-space: nowrap; }
@media (min-width: 768px) { .platform .button { padding-inline: 18px; } }
.section .platform p:last-of-type { margin-bottom: 20px; }

/* ---------- Thyra: platform toggle (Apple | Windows / Android | Linux) and its panels ---------- */
/* Same pill track as the site nav, three segments. On a phone the segments size to their labels so
   "Windows / Android" fits at 375px; from 600px they're equal, like a native segmented control. */
.segmented.platform-switch {
  display: grid; grid-template-columns: repeat(3, auto);
  width: fit-content; max-width: 100%;
  margin: clamp(32px, 5vw, 44px) auto 0; padding: 2px;
  border-radius: 999px;
  background: var(--seg-track);
  scroll-margin-top: 16px;
}
@media (min-width: 600px) {
  .segmented.platform-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 480px; }
}
.segmented.platform-switch a { min-width: 0; padding: 0 14px; }
.segmented.platform-switch [role="tab"][aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); cursor: default; }
.segmented.platform-switch [role="tab"][aria-selected="true"]:active { transform: none; }

.platform-panel[hidden] { display: none; }
.platform-panel:focus-visible { outline-offset: 8px; border-radius: 4px; }
/* The panel's first section sits right under the toggle: no rule above it. Without JavaScript the later
   panels keep their rule, so the stacked page still reads as separate sections. */
.platform-panel:first-of-type > .section:first-child,
.platform-tabs.is-enhanced .platform-panel > .section:first-child {
  margin-top: clamp(32px, 5vw, 44px); padding-top: 0; border-top: 0;
}
.section > .visually-hidden:first-child + .platforms { margin-top: 0; }

/* Setup guides: placeholders until the step-by-step guides land. */
.setup-guide, .section .soon-list li { scroll-margin-top: 8px; }
.setup-placeholder {
  margin-top: 12px; padding: 20px;
  background: var(--tile); border-radius: var(--radius-tile);
}
.section .setup-placeholder p { margin: 0; font-size: 15px; line-height: 1.4; letter-spacing: -.016em; color: var(--fg-2); }
.section .setup-placeholder .setup-placeholder-title { font-size: 17px; font-weight: 600; line-height: 1.29; letter-spacing: -.022em; color: var(--fg); }
.section .setup-placeholder p + p { margin-top: 4px; }

/* Coming-soon panels (Windows / Android, Linux). */
.soon-card {
  padding: 36px 24px 32px;
  background: var(--tile); border-radius: var(--radius-tile);
  text-align: center;
}
@media (min-width: 768px) { .soon-card { padding: 48px 40px 44px; } }
.soon-glyphs { display: flex; justify-content: center; gap: 20px; }
.section .soon-badge {
  display: inline-flex; align-items: center; min-height: 28px;
  margin: 20px 0 0; padding: 0 12px;
  border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: -.004em; color: var(--fg-2);
}
.section .soon-card h2 { margin: 12px 0 0; font-size: clamp(28px, 4.5vw, 36px); line-height: 1.1; letter-spacing: 0; }
.section .soon-card .lede { margin: 10px auto 0; max-width: 30em; }
.section .soon-list {
  list-style: none; padding: 0;
  display: grid; column-gap: 32px;
}
@media (min-width: 600px) { .section .soon-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.section .soon-list li { margin: 0; padding: 16px 0; border-top: 1px solid var(--hairline); }
.section .soon-list h4 { margin: 0; }
.section .soon-list p { margin: 4px 0 0; font-size: 15px; line-height: 1.4; letter-spacing: -.016em; color: var(--fg-2); }
.section .soon-mirror { margin-top: 8px; }

/* A panel chosen from the toggle fades up once (opacity + 12px). No blur: the Apple panel is a long
   page, and blurring a surface that tall costs more than it adds. Never on first load. */
@media (prefers-reduced-motion: no-preference) {
  .platform-panel.is-entering { animation: panel-enter 300ms cubic-bezier(.2, 0, 0, 1) both; }
}
@keyframes panel-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Partner pages (served by the Worker) ---------- */
.partner-page { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 var(--gutter) 64px; }
.partner-page > :not(.brand) { max-width: 560px; }
.partner-page .brand {
  display: flex; align-items: center; min-height: 52px;
  margin: 0 0 var(--page-top); padding: 4px 0;
  /* Full-bleed hairline matching the site header, without extra markup. */
  border-bottom: 1px solid var(--hairline);
  border-image: linear-gradient(var(--hairline), var(--hairline)) 0 0 1 0 / 0 0 1px 0 / 0 100vw;
}
.partner-page h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: 0;
}
.partner-page p { margin: 16px 0 0; }
.partner-page form { margin-top: 32px; }

/* ==========================================================================
   Analogion: the Orthodox day (home page). Grouped surfaces on the tile colour.
   ========================================================================== */
.dash { padding-top: clamp(20px, 4vw, 40px); }
.dash-intro { margin: 0 0 16px; font-size: 15px; line-height: 1.33; letter-spacing: -.016em; color: var(--fg-2); text-wrap: pretty; }
.dash-status { margin: 0; font-size: 15px; color: var(--fg-2); text-align: center; }
.dash-status:not(:empty) { padding: 48px 0; }
.dash-body.has-error-banner .dash-status:not(:empty) { padding: 0 0 8px; text-align: left; }
.dash-retry { margin: 0; text-align: center; }
.dash-body.has-error-banner .dash-retry { margin-bottom: 16px; text-align: left; }

.dash-grid { display: grid; gap: 16px; }
.dash-grid + .dash-grid { margin-top: 16px; }
@media (min-width: 900px) {
  .dash-grid { gap: 20px; }
  .dash-grid + .dash-grid { margin-top: 20px; }
  .dash-top { grid-template-columns: minmax(0, 1fr) 300px; align-items: stretch; }
  .dash-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .card.is-collapsed { align-self: start; }
}

.dash-content { transition: opacity 150ms ease-out; }
.dash-content[aria-busy="true"] { opacity: .5; }

/* Cards: 20px radius, 20-24px padding; inner controls are pills/circles or 12px (≈ concentric with the padding). */
.card {
  min-width: 0;
  display: flex; flex-direction: column;
  padding: 20px;
  background: var(--tile);
  border-radius: var(--radius-tile);
}
@media (min-width: 768px) { .card { padding: 24px; } }
.card-head { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: -4px 0 0; }
.card-head h2, .card-head .card-date {
  flex: 1; min-width: 0; margin: 0;
  font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.017em;
}
.card-head .card-date { font-size: 15px; font-weight: 500; letter-spacing: -.016em; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.card-body { margin-top: 12px; }
.card-body[hidden] { display: none; }

/* Round icon buttons (day, saint, collapse): 36px visible, 44px hit area. */
.icon-button {
  position: relative; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin: 0; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--fg);
  box-shadow: var(--shadow-border);
  font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-button::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button:disabled { opacity: .4; cursor: default; box-shadow: none; }
.collapse-button svg { transform: rotate(0deg); }
.card.is-collapsed .collapse-button svg { transform: rotate(-90deg); }
@media (hover: hover) {
  .icon-button:not(:disabled):hover { box-shadow: var(--shadow-border-hover); }
  .text-button:hover { text-decoration-color: currentColor; }
}
@media (prefers-reduced-motion: no-preference) {
  .icon-button { transition-property: box-shadow, transform; transition-duration: 150ms; transition-timing-function: ease-out; }
  .icon-button:not(:disabled):active { transform: scale(.96); }
  .collapse-button svg { transition: transform 200ms cubic-bezier(.2, 0, 0, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .icon-button:not(:disabled):active { opacity: .7; }
}

.text-button {
  display: inline-flex; align-items: center; min-height: 44px;
  margin: 0; padding: 0;
  border: 0; border-radius: 4px; background: none; color: var(--fg);
  font: inherit; font-size: 15px; letter-spacing: -.016em;
  text-decoration-line: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--underline); text-underline-offset: .2em;
  cursor: pointer;
}
.text-button[hidden] { display: none; }

/* ---------- The day ---------- */
.day-title-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; margin-top: 8px; }
.day-title-row .icon-button { justify-self: center; }
.day-title {
  margin: 0; text-align: center;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 32px); font-weight: 700; line-height: 1.15; letter-spacing: -.01em;
  text-wrap: balance; overflow-wrap: anywhere;
}
.day-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 16px; min-height: 44px; }
.day-tone { margin: 0; font-size: 15px; color: var(--fg-2); }
.day-tone:empty { display: none; }

.rule { height: 1px; margin: 16px 0; border: 0; background: var(--hairline); }
.label { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.38; letter-spacing: -.004em; color: var(--fg-2); }
.feasts { margin: 4px 0 0; font-size: 19px; font-weight: 600; line-height: 1.32; letter-spacing: -.012em; text-wrap: pretty; }
.feasts p { margin: 0; }
.feasts p + p { margin-top: 4px; }
.feasts .is-ordinary { font-weight: 400; color: var(--fg-2); }

/* Saint of the day */
.saint { margin-top: 20px; }
.saint-layout { display: grid; gap: 16px; }
@media (min-width: 560px) { .saint-layout { grid-template-columns: 136px minmax(0, 1fr); gap: 20px; align-items: start; } }
.saint-figure { display: grid; justify-items: center; gap: 8px; }
.saint-frame {
  width: 136px; aspect-ratio: 4 / 5;
  border-radius: 12px; overflow: hidden;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.saint-frame img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border-radius: 12px;
  outline: 1px solid var(--img-outline); outline-offset: -1px;
}
.saint-placeholder { font-size: 44px; line-height: 1; color: var(--fg-2); }
.saint-cycler { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.saint-credit { margin: 0; font-size: 12px; line-height: 1.33; color: var(--fg-2); text-align: center; }
.saint-credit a { display: inline-flex; align-items: center; min-height: 32px; }
.saint-name { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.26; letter-spacing: -.012em; text-wrap: balance; }
.life { margin-top: 8px; font-size: 16px; line-height: 1.5; letter-spacing: -.014em; }
.life p { margin: 0; }
.life p + p { margin-top: 10px; }
.life.is-clamped {
  max-height: 12em; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.empty-note { margin: 0; font-size: 15px; color: var(--fg-2); }

/* ---------- Fasting ---------- */
.fast { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 4px; text-align: center; }
@media (min-width: 900px) { #card-fast .card-body { flex: 1; display: flex; flex-direction: column; } #card-fast .fast { flex: 1; justify-content: center; } }
.fast-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--btn-bg); color: var(--btn-fg);
}
.fast-icon svg { width: 38px; height: 38px; }
.fast-name { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.27; letter-spacing: -.017em; text-wrap: balance; }
.fast-detail { margin: 2px 0 0; font-size: 15px; line-height: 1.33; color: var(--fg-2); text-wrap: pretty; }
.next-fast { min-height: 92px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); text-align: center; }
.next-fast:empty { min-height: 0; padding-top: 0; border-top: 0; }
.next-when { margin: 2px 0 0; font-size: 17px; font-weight: 600; line-height: 1.29; font-variant-numeric: tabular-nums; }
.next-when.is-waiting { font-weight: 400; color: var(--fg-2); }
.next-type { margin: 4px 0 0; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 14px; line-height: 1.43; color: var(--fg-2); text-wrap: pretty; }
.next-type svg { flex: none; width: 16px; height: 16px; color: var(--fg); }

/* ---------- Readings and prayers ---------- */
@media (min-width: 900px) {
  .scroll-region { max-height: 68vh; overflow-y: auto; overscroll-behavior: contain; margin-right: -8px; padding-right: 8px; border-radius: 4px; }
  .scroll-region:focus-visible { outline-offset: 4px; }
}
.reading + .reading { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.reading-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.reading-kind {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px;
  border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg);
  font-size: 13px; font-weight: 600; letter-spacing: -.004em;
}
.reading-ref { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.017em; }
.passage p { margin: 0; }
.passage p + p { margin-top: 10px; }
.verse-num { margin-right: 3px; font-size: 11px; line-height: 0; vertical-align: super; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.card-note { margin: 20px 0 0; font-size: 14px; line-height: 1.43; letter-spacing: -.016em; color: var(--fg-2); text-wrap: pretty; }

.segmented.prayer-tabs { margin-bottom: 20px; }
.prayer-tabs [role="tab"] { min-width: 0; padding: 0 12px; }
.prayer-block[hidden] { display: none; }
.prayer + .prayer { margin-top: 24px; }
.prayer h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.29; letter-spacing: -.022em; }
.prayer p { margin: 0; }
.prayer p + p { margin-top: 10px; }
.rubric { font-style: italic; color: var(--fg-2); font-size: 15px; }

.dash-closing { margin-top: clamp(40px, 6vw, 56px); text-align: center; }
.dash-closing .prayer-line { margin: 0; font-size: 19px; line-height: 1.37; letter-spacing: -.012em; text-wrap: balance; }
.dash-closing .cross { margin: 4px 0 0; color: var(--fg-2); }
.dash-credits { margin: 16px 0 0; font-size: 13px; line-height: 1.38; color: var(--fg-2); text-wrap: balance; }

/* First appearance of the day's cards: split by card, ~100ms apart. Only once, only where motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .dash-content.is-entering .card { animation: card-enter 400ms cubic-bezier(.2, 0, 0, 1) both; }
  .dash-content.is-entering .dash-top .card:nth-child(2) { animation-delay: 100ms; }
  .dash-content.is-entering .dash-main .card:nth-child(1) { animation-delay: 200ms; }
  .dash-content.is-entering .dash-main .card:nth-child(2) { animation-delay: 300ms; }
}
@keyframes card-enter {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-content { transition: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* App icons in the segmented nav */
.segmented picture { display: contents; }
.seg-icon { width: 22px; height: 22px; margin-right: 8px; flex: none; }
