/* Daily Office — dailyofficeapp.com
   The app's own "Original" theme: the same four colours, light and dark.
   (Paper's browns were tried first; Brandon, 2026-09-26: "Too murky".) */

:root {
  --paper: #FFFFFF;
  --paper-deep: #EDEDF0;
  --ink: #1C1C1E;
  --quiet: #6E6E73;
  --rubric: #B3261E;
  --rule: rgba(28, 28, 30, 0.12);
  --card: #F6F6F8;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 12px 32px rgba(0,0,0,.08);
  --serif: "EB Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --measure: 68rem;
  color-scheme: light;
}
/* Dark follows the device — unless the visitor has pressed the header's
   switch, which sets data-theme on <html> and is remembered. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #000000;
    --paper-deep: #141416;
    --ink: #E8E8EA;
    --quiet: #98989D;
    --rubric: #FF6B5E;
    --rule: rgba(232, 232, 234, 0.14);
    --card: #1C1C1E;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #000000;
  --paper-deep: #141416;
  --ink: #E8E8EA;
  --quiet: #98989D;
  --rubric: #FF6B5E;
  --rule: rgba(232, 232, 234, 0.14);
  --card: #1C1C1E;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.6 var(--serif);
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rubric); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 44rem; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font-size: 1.25rem; font-weight: 500; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { margin-left: auto; display: flex; gap: 22px; font-family: var(--sans); font-size: .875rem; }
.nav a { color: var(--quiet); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Type ---------- */
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.6rem, 5.2vw, 4rem); text-wrap: balance; }
h2 { text-wrap: balance; }
[id] { scroll-margin-top: 76px; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; }
.eyebrow { font: 600 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--rubric); margin: 0 0 14px; }
.lede { font-size: 1.35rem; color: var(--quiet); line-height: 1.5; }
.rubric { color: var(--rubric); font-style: italic; }
.smallcaps { font-variant: small-caps; letter-spacing: .04em; }
.quiet { color: var(--quiet); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 28px; }
.hero h1 { margin-bottom: 18px; }
.hero .lede { margin: 0 0 30px; max-width: 32rem; }
.status { display: inline-flex; align-items: center; gap: 10px; font: 500 .875rem/1 var(--sans);
  padding: 11px 16px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rubric); }
.platform-line { margin-top: 18px; font: .875rem/1.5 var(--sans); color: var(--quiet); }

/* The page, set in type — the Prayer Book's own words, BCP p. 80.
   It carries its own paper, inks and face, which the theme tiles below it
   change: the same six themes as the app, with the app's own colours. */
/* THE SHEET holds the theme's colours, so both the page and the leaf beneath
   it take them. The leaf is its own element: as the page's ::before it drew
   OVER the page's paper whenever the page was tilted (a transform makes a new
   stacking context, and z-index: -1 then sits above the page's background). */
.sheet {
  --paper: var(--card);
  --face: "Iowan Old Style", "Palatino Linotype", Palatino, "EB Garamond", serif;
  position: relative;
}
.sheet .leaf {
  position: absolute; inset: 8px -8px -8px 8px; border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 86%, var(--ink));
  transform: rotate(-1.4deg); transition: background-color .3s;
}
.page {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face);
  border-radius: 14px;
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  padding: 44px 44px 36px;
  position: relative;
  transition: background-color .3s, color .3s;
  /* A FIXED HEIGHT, as the app's pages have. Each theme sets the page in its
     own face, and the same words took more lines in one than another — so the
     page grew and shrank, and the hero, centred beside it, jumped with every
     tile (Brandon, 2026-09-26, with a recording). Now a face changes only what
     fits; what does not fades at the foot, the way a page runs on. */
  height: 600px;
  transform: rotate(0.6deg);
}
.page * { transition: color .3s; }
.page::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px;
  border-radius: 0 0 14px 14px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--paper)); transition: background .3s; }
/* The words are clipped here, not on .page, so nothing outside the page is. */
.page .body { height: 100%; overflow: hidden; }

/* Try a theme */
.tryout-label { display: flex; justify-content: space-between; align-items: center;
  margin: 30px 0 12px; font: 600 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--quiet); }
.scheme { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; }
.scheme button { font: 500 .75rem/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--quiet);
  background: none; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.scheme button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.tile { cursor: pointer; border: 0; background: none; padding: 0; color: var(--quiet); font: .75rem/1.3 var(--sans); text-align: center; }
.tile .swatch { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; font-size: 1.35rem;
  box-shadow: 0 0 0 1px var(--rule); margin-bottom: 7px; transition: box-shadow .15s, transform .15s; }
.tile .swatch i { font-style: normal; }
.tile .swatch b { display: block; width: 14px; height: 2px; border-radius: 1px; margin: 3px auto 0; }
.tile:hover .swatch { transform: translateY(-2px); }
.tile[aria-pressed="true"] { color: var(--ink); }
.tile[aria-pressed="true"] .swatch { box-shadow: 0 0 0 2px var(--rubric); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .swatch { box-shadow: 0 0 0 3px var(--rubric); }
.page h2 { font-size: 1.85rem; margin-bottom: 4px; }
.page h2.office-title { font-size: 2.3rem; }
.page .date { color: var(--quiet); margin: 0 0 26px; font-size: 1.05rem; }
.page .rite + .date { margin-top: 0; }
.page .row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 10px; margin: 0 0 8px; }
.page .who { font-variant: small-caps; letter-spacing: .06em; color: var(--quiet); font-size: .95rem; padding-top: 2px; }
.page .head-row { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 0 10px; }
.page .head-row h3 { font-size: 1.45rem; }
.page .ref { color: var(--quiet); font-style: italic; font-size: .95rem; white-space: nowrap; margin-left: 16px; }
.page .rubric { margin: 14px 0 6px; }
.page .para { margin: 0 0 12px; }
.page .lines { margin: 0 0 12px; }
.page .cite { margin: -10px 0 18px; color: var(--quiet); font-size: .85rem; }
.page .rite { margin: 2px 0 0; color: var(--quiet); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.page .head-row h3 + .ref, .page .head-row .ref { margin-left: 16px; }
.page .foot { text-align: right; color: var(--quiet); font-size: .85rem; margin-top: 22px; font-variant-numeric: oldstyle-nums; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section + section { border-top: 1px solid var(--rule); }
.section-head { max-width: 40rem; margin-bottom: 48px; }
.section-head p { color: var(--quiet); font-size: 1.2rem; margin: 14px 0 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 44px; }
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; color: var(--quiet); font-size: 1.08rem; }
.feature .mark { display: block; color: var(--rubric); font-size: 1.1rem; margin-bottom: 10px; }

/* Platforms */
.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.platform { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 26px 24px; }
.platform svg { width: 34px; height: 34px; color: var(--rubric); margin-bottom: 14px; }
.platform h3 { font-size: 1.3rem; margin-bottom: 6px; }
.platform .req { font: 500 .8125rem/1.4 var(--sans); color: var(--ink); margin: 0 0 10px; }
.platform p { margin: 0; color: var(--quiet); font-size: 1rem; line-height: 1.5; }

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font-size: 1.3rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 1.6rem; color: var(--rubric); font-weight: 300; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 24px; color: var(--quiet); max-width: 44rem; }
.faq details > div p { margin: 0 0 12px; }

/* Closing band */
.band { text-align: center; }
.band img { width: 72px; height: 72px; border-radius: 16px; box-shadow: var(--shadow); }
.band h2 { margin: 22px 0 12px; }
.band p { color: var(--quiet); margin: 0 auto; max-width: 34rem; }
.band .quote { font-size: 1.6rem; color: var(--ink); font-style: italic; margin-bottom: 8px; }

/* ---------- Document pages ---------- */
.doc { padding: 64px 0 96px; }
.doc h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); margin-bottom: 10px; }
.doc .updated { font: .875rem/1.4 var(--sans); color: var(--quiet); margin: 0 0 40px; }
.doc h2 { font-size: 1.7rem; margin: 48px 0 12px; }
.doc h3 { margin: 28px 0 8px; }
.doc p, .doc li { max-width: 44rem; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.callout { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 26px 28px; margin: 28px 0; max-width: 44rem; }
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.button { display: inline-block; font: 600 .9375rem/1 var(--sans); padding: 14px 20px; border-radius: 999px;
  background: var(--rubric); color: var(--paper); text-decoration: none; }
.button:hover { filter: brightness(1.08); }
table.keys { border-collapse: collapse; width: 100%; max-width: 44rem; font-size: 1.05rem; }
table.keys td { border-bottom: 1px solid var(--rule); padding: 10px 12px 10px 0; vertical-align: top; }
table.keys td:first-child { font-family: var(--sans); font-size: .9rem; white-space: nowrap; color: var(--ink); width: 9rem; }
.toc { font: .9rem/1.8 var(--sans); columns: 2; max-width: 36rem; padding-left: 1.2em; color: var(--quiet); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 40px 0 56px; font: .8125rem/1.6 var(--sans); color: var(--quiet); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--quiet); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { flex-basis: 100%; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .platforms { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 1.125rem; }
  .wrap { padding: 0 16px; }
  .nav { gap: 14px; }
  .nav .hide-sm { display: none; }
  .hero { padding: 44px 0 64px; }
  section { padding: 64px 0; }
  .features, .platforms { grid-template-columns: 1fr; }
  .page { padding: 30px 22px 24px; height: 520px; transform: none; }
  .sheet .leaf { display: none; }
  .tiles { gap: 6px; }
  .tile { font-size: .6875rem; }
  .tile .swatch { font-size: 1.05rem; border-radius: 10px; }
  .page .row { grid-template-columns: 5.6rem 1fr; }
  .page h2 { font-size: 1.9rem; }
  .toc { columns: 1; }
}

/* The light / dark switch in the header */
.nav { align-items: center; }
.mode { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; margin: 0 -3px 0 -4px;
  border: 0; background: none; color: var(--quiet); cursor: pointer; }
.mode:hover { color: var(--ink); }
.mode svg { width: 16px; height: 16px; display: block; }
.mode .moon { display: none; }
:root[data-theme="dark"] .mode .sun { display: none; }
:root[data-theme="dark"] .mode .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mode .sun { display: none; }
  :root:not([data-theme="light"]) .mode .moon { display: block; }
}
