/* ---------- self-hosted variable fonts ----------
   Subset to latin, served from this origin. No third-party request on load,
   which is one less thing between a first-time visitor and the service times.
   Fraunces & Karla are SIL Open Font License 1.1 — see fonts/OFL.txt.        */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("fonts/karla.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("fonts/karla-italic.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: italic; font-display: swap;
}

/* ==========================================================================
   THE HOUSE CHURCH — unofficial redesign
   Palette : limestone / spruce / moss / brass
   Type    : Fraunces (display, wonky old-style) + Karla (humanist grotesque)
   Motif   : the arch — a doorway, because the whole church is named "the house"
   ========================================================================== */

/* ---------- theme tokens ----------
   Two themes off the same six ideas: a page, a card, ink, a dark block, brass,
   and a hairline. Swap the values, everything downstream follows.            */
:root {
  /* surfaces */
  --limestone: #F1F0E8;   /* page */
  --paper:     #FBFAF4;   /* cards */
  --ink-bg:    #14261D;   /* dark bands, footer, filled buttons */
  --ink-fg:    #F1F0E8;   /* text on those */
  --ink-fg-rgb: 241 240 232;
  --page-rgb:   241 240 232;
  --edge-rgb:   20 38 29;

  /* text + accent */
  --spruce:    #14261D;   /* body ink */
  --moss:      #2E4A3A;   /* button hover */
  --brass:     #A9762F;   /* accent fills, large type */
  --brass-ink: #7E5A1C;   /* small brass text, needs the contrast */
  --brass-lt:  #C99A4E;
  --muted:     #5C6B62;

  /* derived */
  --line:      rgb(var(--edge-rgb) / .16);
  --line-soft: rgb(var(--edge-rgb) / .08);
  --line-dark: rgb(var(--ink-fg-rgb) / .18);

  /* paper tooth */
  --grain-blend: multiply;
  --grain-opacity: .5;

  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body:    "Karla", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --shell: 1160px;
  --gut: clamp(20px, 5vw, 56px);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* Dark: not black. A deep spruce, the same green the light theme uses for its
   dark bands, dropped a few stops. Brass lifts so it still reads as brass.   */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --limestone: #16221B;   /* page: lifted off black, easier on the eyes */
    --paper:     #1E2D24;   /* cards and alternating bands, one step up */
    --ink-bg:    #0B1310;   /* heavy blocks and filled buttons, one step down */
    --ink-fg:    #EDEBE1;
    --ink-fg-rgb: 237 235 225;
    --page-rgb:   22 34 27;
    --edge-rgb:   237 235 225;

    --spruce:    #E9E7DC;
    --moss:      #2C4536;
    --brass:     #D2A05A;
    --brass-ink: #D9AC69;
    --brass-lt:  #E7C68E;
    --muted:     #9AAA9F;

    --line:      rgb(var(--edge-rgb) / .16);
    --line-soft: rgb(var(--edge-rgb) / .09);
    --line-dark: rgb(var(--ink-fg-rgb) / .14);

    --grain-blend: overlay;
    --grain-opacity: .22;
  }
}

:root[data-theme="dark"] {
  --limestone: #16221B;   /* page: lifted off black, easier on the eyes */
  --paper:     #1E2D24;   /* cards and alternating bands, one step up */
  --ink-bg:    #0B1310;   /* heavy blocks and filled buttons, one step down */
  --ink-fg:    #EDEBE1;
  --ink-fg-rgb: 237 235 225;
  --page-rgb:   22 34 27;
  --edge-rgb:   237 235 225;

  --spruce:    #E9E7DC;
  --moss:      #2C4536;
  --brass:     #D2A05A;
  --brass-ink: #D9AC69;
  --brass-lt:  #E7C68E;
  --muted:     #9AAA9F;

  --line:      rgb(var(--edge-rgb) / .16);
  --line-soft: rgb(var(--edge-rgb) / .09);
  --line-dark: rgb(var(--ink-fg-rgb) / .14);

  --grain-blend: overlay;
  --grain-opacity: .22;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--limestone);
  color: var(--spruce);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* paper tooth — keeps the flat limestone from reading as a wash */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 999;
  opacity: var(--grain-opacity); mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

/* ---------- type scale ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 60;
  line-height: 1.03;
  letter-spacing: -.018em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.9rem, 8vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); line-height: 1.14; }
h4 { font-size: 1.06rem; line-height: 1.25; }
p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brass-ink);
  margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: .7rem;
}
.eyebrow::after {
  content: ""; height: 1px; flex: 1;
  background: currentColor; opacity: .35;
}
.lede { font-size: clamp(1.08rem, 1.9vw, 1.3rem); color: var(--muted); max-width: 56ch; }
.small { font-size: .87rem; color: var(--muted); }

/* ---------- layout ---------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gut); }
.band { padding-block: clamp(56px, 9vw, 112px); }
.band--tight { padding-block: clamp(40px, 6vw, 72px); }
.band--dark { background: var(--ink-bg); color: var(--ink-fg); }
.band--dark .lede,
.band--dark .small { color: rgb(var(--ink-fg-rgb) / .7); }
.band--dark .eyebrow { color: var(--brass-lt); }
.band--paper { background: var(--paper); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.grid { display: grid; gap: clamp(24px, 4vw, 52px); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); align-items: start; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--body); font-size: .84rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  padding: .95rem 1.6rem;
  border-radius: 999px 999px 999px 999px;
  border: 1px solid var(--spruce);
  background: var(--ink-bg); color: var(--ink-fg);
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: var(--moss); border-color: var(--moss); }
.btn--ghost { background: transparent; color: var(--spruce); border-color: var(--spruce); }
.btn--ghost:hover { background: var(--ink-bg); color: var(--ink-fg); }
.btn--brass { background: var(--brass); border-color: var(--brass); color: #FFF8EC; }
.btn--brass:hover { background: var(--brass-lt); border-color: var(--brass-lt); color: var(--spruce); }
.band--dark .btn--ghost { color: var(--ink-fg); border-color: rgb(var(--ink-fg-rgb) / .5); }
.band--dark .btn--ghost:hover { background: var(--ink-fg); color: var(--ink-bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

.textlink {
  font-weight: 700; font-size: .84rem; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--brass-ink);
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.textlink:hover { color: var(--spruce); }
.band--dark .textlink:hover { color: #fff; }

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  border-radius: 3px;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--ink-bg); color: var(--ink-fg);
  padding: .8rem 1.2rem; text-decoration: none;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgb(var(--page-rgb) / .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.masthead__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: .85rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--spruce);
}
.wordmark__arch { width: 20px; height: 26px; flex: none; }
.wordmark__txt {
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 20;
  font-size: 1.16rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1;
}
.wordmark__txt span { display: block; font-family: var(--body); font-size: .55rem; font-weight: 700; letter-spacing: .24em; color: var(--brass); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.9rem); }
.nav a {
  font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  text-decoration: none; color: var(--spruce); opacity: .72;
  transition: opacity .2s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"] { color: var(--brass); }
.nav .btn { padding: .7rem 1.15rem; font-size: .74rem; opacity: 1; color: var(--ink-fg); }
.navtoggle { display: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: .55rem .95rem; font: inherit; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; color: var(--spruce); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 92px) clamp(48px, 7vw, 84px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 em {
  font-style: italic;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 100;
  color: var(--brass);
}
.hero__sub { margin-top: 1.4rem; }
.hero .btn-row { margin-top: 2rem; }

/* the arch: doorway, window, and the one shape everything else borrows */
.arch {
  position: relative;
  border-radius: 50% 50% 10px 10px / 42% 42% 10px 10px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(120% 85% at 50% 8%, #F6EBD5 0%, #E3DCC5 42%, #6E7F62 78%, #2E4A3A 100%);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -40px rgb(var(--edge-rgb) / .55);
}
.arch::after {
  content: "";
  position: absolute; inset: 14px;
  border: 1px solid rgba(255, 250, 235, .35);
  border-radius: 50% 50% 6px 6px / 42% 42% 6px 6px;
  pointer-events: none;
}
.arch--photo { background-size: cover; background-position: center; }
.arch__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.4rem 1.4rem 1.2rem;
  background: linear-gradient(to top, rgb(var(--edge-rgb) / .82), transparent);
  color: #F6F3E9; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
}

/* ---------- next gathering (functional signature) ---------- */
.next {
  background: var(--ink-bg); color: var(--ink-fg);
  border-radius: 22px; padding: 1.5rem 1.6rem;
  display: grid; gap: .35rem;
}
.next__label { font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--brass-lt); }
.next__title { font-family: var(--display); font-size: 1.55rem; font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 40; line-height: 1.1; }
.next__when { font-size: .95rem; color: rgb(var(--ink-fg-rgb) / .78); }
.next__pip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brass-lt); margin-right: .5rem; vertical-align: middle; }
.next.is-live .next__pip { background: #7BD389; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- weekly timetable ---------- */
.week { border-top: 1px solid var(--line); }
.week__row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  gap: 1.2rem; align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.week__day { font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--brass-ink); }
.week__what { font-family: var(--display); font-size: 1.2rem; font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 30; }
.week__what small { display: block; font-family: var(--body); font-size: .84rem; color: var(--muted); letter-spacing: 0; text-transform: none; margin-top: .25rem; }
.week__time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .95rem; white-space: nowrap; }
.week__row.is-now { background: rgba(169, 118, 47, .1); box-shadow: inset 3px 0 0 var(--brass); padding-inline: .9rem; }

/* ---------- cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 20px 20px 20px 20px;
  padding: 1.7rem 1.6rem;
  display: flex; flex-direction: column; gap: .7rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -32px rgb(var(--edge-rgb) / .5); }
.card__no {
  font-family: var(--display); font-size: 2.1rem; color: var(--brass);
  font-variation-settings: "SOFT" 50, "WONK" 1, "opsz" 60; line-height: 1;
}
.card p { color: var(--muted); font-size: .96rem; }
.band--dark .card { background: rgb(var(--ink-fg-rgb) / .05); border-color: var(--line-dark); }
.band--dark .card p { color: rgb(var(--ink-fg-rgb) / .72); }

/* concentric scale — home → city → nations */
.scale { display: grid; gap: clamp(20px, 3vw, 34px); grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: none; }
.scale__item { position: relative; padding-top: 4.6rem; }
.scale__ring {
  position: absolute; top: 0; left: 0;
  width: 3.4rem; height: 3.4rem; border-radius: 50%;
  border: 1px solid var(--brass); display: grid; place-items: center;
}
.scale__ring i { display: block; border-radius: 50%; background: var(--brass); }
.scale__item:nth-child(1) .scale__ring i { width: 8px; height: 8px; }
.scale__item:nth-child(2) .scale__ring i { width: 20px; height: 20px; opacity: .7; }
.scale__item:nth-child(3) .scale__ring i { width: 34px; height: 34px; opacity: .45; }
.scale ul { margin: .8rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .95rem; }
.scale li { margin-bottom: .35rem; }

/* ---------- messages ---------- */
.msg {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  gap: 1.2rem; align-items: baseline;
  padding: 1.2rem 0; border-bottom: 1px solid var(--line-dark);
  text-decoration: none; color: inherit;
  transition: padding-left .25s var(--ease);
}
.msg:hover { padding-left: .6rem; }
.msg__date { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass-lt); font-weight: 700; }
.msg__title { font-family: var(--display); font-size: 1.15rem; font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 30; }
.msg__by { font-size: .84rem; color: rgb(var(--ink-fg-rgb) / .6); white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 1.35rem 2.5rem 1.35rem 0; position: relative;
  font-family: var(--display); font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 40;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--brass); font-family: var(--body); font-weight: 400;
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__body { padding: 0 2.5rem 1.6rem 0; color: var(--muted); max-width: 72ch; }
.faq__body a { color: var(--brass-ink); }

/* ---------- callout / disclaimer ---------- */
.callout {
  border-left: 3px solid var(--brass);
  padding: .3rem 0 .3rem 1.2rem;
  color: var(--muted); font-size: .96rem;
}

/* ---------- footer ---------- */
.foot { background: var(--ink-bg); color: var(--ink-fg); padding-block: clamp(48px, 6vw, 76px) 2rem; }
.foot a { color: rgb(var(--ink-fg-rgb) / .78); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot__top { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.foot h4 { font-family: var(--body); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass-lt); margin-bottom: .9rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .95rem; }
.foot__addr { font-size: 1rem; line-height: 1.7; color: rgb(var(--ink-fg-rgb) / .8); }
.disclaimer {
  margin-top: clamp(32px, 5vw, 56px); padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  font-size: .8rem; line-height: 1.7; color: rgb(var(--ink-fg-rgb) / .62);
}
.disclaimer strong { color: rgb(var(--ink-fg-rgb) / .92); font-weight: 700; }
.disclaimer a { color: var(--brass-lt); text-decoration: underline; }

/* ---------- reveal ---------- */
.rise { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 340px; margin-inline: auto; order: -1; }
  .g-3, .g-4, .split, .scale, .foot__top { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--limestone); border-bottom: 1px solid var(--line);
    padding: 1.4rem var(--gut) 1.8rem;
  }
  .navtoggle { display: block; }
  .masthead__in { position: relative; }
}
@media (max-width: 640px) {
  .g-2, .g-4 { grid-template-columns: 1fr; }
  .week__row { grid-template-columns: 1fr auto; }
  .week__day { grid-column: 1 / -1; }
  .msg { grid-template-columns: 1fr; gap: .3rem; }
  .msg__by { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .rise { opacity: 1; transform: none; }
}

@media print {
  .masthead, .hero__art, .btn { display: none; }
  body { background: #fff; }
}

/* ---------- context fixes ---------- */
.msg--light { border-bottom-color: var(--line); }
.msg--light .msg__date { color: var(--brass-ink); }
.msg--light .msg__by { color: var(--muted); }

.week__now {
  display: inline-block !important;
  margin-top: .3rem;
  font-family: var(--body); font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brass-ink);
}

.band--dark .week,
.band--dark .week__row,
.band--dark .faq,
.band--dark .faq details { border-color: var(--line-dark); }
.band--dark .week__what small,
.band--dark .faq__body { color: rgb(var(--ink-fg-rgb) / .74); }
.band--dark .week__day { color: var(--brass-lt); }
.band--dark .faq__body a,
.band--dark .callout { color: var(--brass-lt); }
.band--dark .row-now { color: inherit; }

/* ---------- theme toggle ---------- */
.themetoggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--brass);
  cursor: pointer; padding: 0;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.themetoggle:hover { background: var(--ink-bg); color: var(--brass-lt); border-color: var(--ink-bg); }
.themetoggle svg { width: 17px; height: 17px; }
.themetoggle .moon { display: none; }
:root[data-theme="dark"] .themetoggle .sun { display: none; }
:root[data-theme="dark"] .themetoggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themetoggle .sun { display: none; }
  :root:not([data-theme="light"]) .themetoggle .moon { display: block; }
}
.masthead__actions { display: flex; align-items: center; gap: .6rem; }

/* Dark-theme adjustments that aren't just a token swap */
:root[data-theme="dark"] .arch,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] a.card:hover { box-shadow: none; }
:root[data-theme="dark"] .arch {
  background: radial-gradient(120% 85% at 50% 8%, #E8DCC0 0%, #C6C1A6 40%, #4E6152 76%, #1E3227 100%);
}
:root[data-theme="dark"] .band--dark .card { background: rgb(var(--ink-fg-rgb) / .045); }
:root[data-theme="dark"] .week__row.is-now { background: rgb(210 160 90 / .12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .arch,
  :root:not([data-theme="light"]) .card,
  :root:not([data-theme="light"]) a.card:hover { box-shadow: none; }
  :root:not([data-theme="light"]) .arch {
    background: radial-gradient(120% 85% at 50% 8%, #E8DCC0 0%, #C6C1A6 40%, #4E6152 76%, #1E3227 100%);
  }
  :root:not([data-theme="light"]) .band--dark .card { background: rgb(var(--ink-fg-rgb) / .045); }
  :root:not([data-theme="light"]) .week__row.is-now { background: rgb(210 160 90 / .12); }
}

@media (max-width: 900px) {
  .masthead__actions { order: 3; }
}

/* Muted grey is a page-background colour; inside a dark band it needs the
   on-ink ramp instead, or the bullet lists drop to ~2.8:1. */
.band--dark .scale ul,
.band--dark .scale li,
.band--dark p.small,
.band--dark .week__time { color: rgb(var(--ink-fg-rgb) / .72); }

/* ---------- contrast corrections ----------
   Brass is a fill colour first and a text colour second. Anywhere it sets
   small type it uses the darker --brass-ink on light surfaces, and the
   lighter --brass-lt on dark ones. */
.wordmark__txt span { color: var(--brass-ink); }
.foot .wordmark__txt span { color: var(--brass-lt); }
.nav a[aria-current="page"] { color: var(--brass-ink); }
.band--dark .textlink { color: var(--brass-lt); }
.band--dark .textlink:hover { color: var(--ink-fg); }

/* Filled brass buttons: dark type on brass beats cream on brass in both
   themes, and by a wide margin once brass lightens for dark mode. */
.btn--brass { color: var(--ink-bg); }
.btn--brass:hover { color: var(--ink-bg); }

/* Brass fill lifted one stop so dark type on it clears 4.5:1 at button size
   in both themes. Hover brightens rather than swapping colours, which keeps
   the ratio stable. */
.btn--brass,
.btn--brass:hover {
  background: var(--brass-lt);
  border-color: var(--brass-lt);
  color: var(--ink-bg);
}
.btn--brass:hover { filter: brightness(1.08); }
