/* walkthrough.css — the Confession Walkthrough surface (entry page, preface,
   and the six flow pages).

   Two things on this surface are load-bearing in a way nothing else in the
   product is, and both drive the decisions here:

   · The reader is holding the phone in a dark, cramped confessional, probably
     kneeling, one-handed. So: prayer cards take the largest type on the page
     and the highest-contrast surface the system has (`--stained-glass`, the
     reverent surface prayers and psalms are read on), the forward/back footer
     is pinned within thumb reach rather than parked at the end of the scroll,
     and every target clears 44px at every width.
   · The warning that no app can forgive sins owns the top of the preface. It
     takes the deep ground and display type — not danger red, which this
     surface reserves for `Skip to` and for the destructive exit, and not fine
     print, which is what it was.

   Every value is a token from styles.css. Nothing here re-derives a colour.
   ========================================================================== */

/* ---------- the reading column ------------------------------------------- */

/* `100% - 2 * gutter`, as `.wrap` has it: `100%` alone overrode `.wrap`'s own
   width, so on a phone every page of the flow ran to the glass edge. */
.wt-col {
  width: min(44rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- close ✕ -------------------------------------------------------
   Present on the entry page, the preface and every flow page. On Absolution it
   is guarded by a confirmation, which is a behaviour, not a different button. */

.wt-x {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: color 200ms, box-shadow 200ms, background 200ms;
}
.wt-x:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline-2); background: var(--paper-2); }

/* ---------- 0. entry page ------------------------------------------------- */

/* The article reader's body type, lifted verbatim from grow.css for the reason
   `.article-card` below is — this page does not load that whole sheet. The two
   copies are asserted equal by content.test.mjs, so the lift cannot drift.

   `.wt-entry__body` used to set its OWN type here: 1.02rem against the reader's
   inherited size, `--ink-2` against `--ink-1`. It was the last of the three
   screens that introduce a flow to be reading in its own voice (ADR-111), and it
   now keeps only the space above it. */
.reader__body { margin-top: 1.6rem; display: grid; gap: 1.05rem; }
.reader__body p { line-height: 1.75; color: var(--ink-1); font-weight: 300; }

.wt-entry__body {
  margin-top: clamp(1.4rem, 3.5vw, 2rem);
}

.wt-entry__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: 1.6rem;
}

.wt-learn {
  margin-top: clamp(2.2rem, 5vw, 3rem);
  padding-top: clamp(1.6rem, 3.5vw, 2.2rem);
  border-top: 1px solid var(--hairline);
}

.wt-learn__h {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.wt-arts { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.1rem; }

/* ---------- the article card ---------------------------------------------
   The Learn card, lifted verbatim from grow.css so the walkthrough doesn't have
   to load that whole sheet. Every non-inline article link uses it: entry page,
   Advice & Penance, anywhere later. */

.article-card {
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 1.6rem 1.6rem 1.4rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  position: relative;
  overflow: hidden;
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), border-color 300ms;
}
.article-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms var(--ease-out);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--hairline-2); }
.article-card:hover::before { transform: scaleX(1); }
.article-card .meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.article-card .cat {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-ink);
}
.article-card .min { font-size: 0.72rem; color: var(--ink-3); }
.article-card h3 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; color: var(--ink); }
.article-card p { font-size: 0.88rem; color: var(--ink-2); line-height: 1.6; font-weight: 300; }
.article-card .rd {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--purple-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.article-card:hover .arrow { transform: translateX(3px); }

/* ---------- checkbox row ------------------------------------------------- */

.wt-check {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding-right: 0.3rem;
  font-size: 0.88rem;
  color: var(--ink-2);
  text-align: left;
}
.wt-check:hover { color: var(--ink); }
.wt-check .fc-check svg { opacity: 0; transition: opacity 160ms; }
.wt-check[aria-pressed="true"] .fc-check { background: var(--purple-fill); border-color: var(--purple-fill); }
.wt-check[aria-pressed="true"] .fc-check svg { opacity: 1; }

/* ---------- the flow shell ----------------------------------------------- */

/* The site header is fixed, and in flow mode there is no page-hero to clear it
   — so the flow does. It also puts the stage indicator's natural position
   exactly at its sticky offset, which is what stops it sliding down over the
   first page at scroll 0. */
.wt-flow { padding-top: var(--hdr); padding-bottom: clamp(3rem, 7vw, 5rem); }

/* ---------- the three-stage indicator ------------------------------------
   Chrome, not a page element: it sits above the pages and stays put while they
   change under it. Three bays, each with its name and a rule; the rule of a
   past stage is filled, the current stage's fills to its own progress, and the
   ones ahead are hairline. No circles — the reader is meant to read how much is
   left, which is a length, not a count of dots. */

.wt-stages {
  position: sticky;
  top: var(--hdr);
  z-index: 60;
  background: color-mix(in oklab, var(--paper) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
  padding-block: 0.85rem 0.9rem;
}

.wt-stages__in {
  display: grid;
  /* The reference has three stages; a client whose corpus carries a different
     number sets --wt-stage-count and the indicator follows. Hardcoding three
     silently drops the last stage, and a walkthrough that says the reader is
     finished while a page remains is the worst place in the product to be
     wrong. */
  grid-template-columns: repeat(var(--wt-stage-count, 3), minmax(0, 1fr));
  gap: 0.55rem;
  align-items: end;
}

.wt-stage { display: grid; gap: 0.55rem; }

.wt-stage__n {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color 260ms;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wt-stage__r {
  height: 3px;
  border-radius: 999px;
  background: var(--paper-3);
  overflow: hidden;
}
.wt-stage__r > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), color-mix(in oklab, var(--purple) 60%, var(--blue)));
  transition: width 520ms var(--ease-out);
}

.wt-stage.is-past .wt-stage__n { color: var(--ink-2); }
.wt-stage.is-past .wt-stage__r > i { width: 100%; }

/* The current stage is the only one that names itself in the page's own voice
   — serif, ink, a step up in size. That is the "circle grows" of the iOS
   indicator said in type instead of geometry. */
.wt-stage.is-now .wt-stage__n {
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--purple);
}

.wt-stages__side {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  justify-content: space-between;
}

.wt-stages__where { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* Reading in the dark is a functional requirement here, so the prayer type has
   a control of its own rather than a settings trip. */
.wt-aa {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: color 200ms, box-shadow 200ms, background 200ms;
}
.wt-aa:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline-2); }
.wt-aa[aria-pressed="true"] { color: var(--purple); background: var(--purple-mist); box-shadow: inset 0 0 0 1px var(--hairline-2); }
.wt-aa b { font-family: var(--serif); font-weight: 600; font-size: 0.95rem; }

/* ---------- a page ------------------------------------------------------- */

.wt-page { padding-top: clamp(1.8rem, 4.5vw, 2.8rem); animation: wt-in 420ms var(--ease-out); }

@keyframes wt-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.wt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.wt-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 4.6vw, 2.55rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
}

.wt-body {
  font-size: 1.01rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-2);
  text-wrap: pretty;
}
.wt-body + .wt-body { margin-top: 0.9rem; }
.wt-body strong { font-weight: 500; color: var(--ink); }

/* A lead-in that hands off to a prayer card or a list gets the smaller,
   quieter setting: it is an instruction, and the thing under it is the point. */
.wt-lead {
  margin-top: clamp(1.6rem, 3.5vw, 2.2rem);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------- the spoken blocks ---------------------------------------------
   Every word the reader or the priest says aloud is on the devotion card
   (styles.css `.dv-card`, ADR-142) — the stained-glass `.pc` it replaced is
   retired. The card carries only the voice caption here (ADR-114), in the
   scripture face at the reader's own prayer text size.

   The spoken blocks sit further apart than the flat text around them
   (confess.md, 9.2.0): each is a padded surface with a shadow, and at the
   step's own rhythm the absolution and the "Amen" answering it read as one
   slab with a seam across it. The gap grows with the surfaces. */

.wt-col > .dv-card { margin-top: 1.1rem; }
.wt-col > .dv-card + .dv-card { margin-top: 2rem; }

/* WHOSE words these are (ADR-114) is carried by the caption's words, not its
   ink: both voices take the card's brand eyebrow (devotion-card.md), as the
   reference does. */

/* ---------- tip block ---------------------------------------------------- */

.wt-tip {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.4rem;
  padding: 1rem 1.15rem;
  border-radius: var(--r-md);
  background: color-mix(in oklab, var(--orange) 10%, var(--tint));
  border: 1px solid color-mix(in oklab, var(--orange) 22%, transparent);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.wt-tip::before { content: "✦"; color: var(--orange); font-size: 0.78rem; line-height: 1.9; flex-shrink: 0; }

/* ---------- the warning (preface) ---------------------------------------
   The single most load-bearing sentence in the product. It owns the top of the
   preface: deep ground, display type, nothing above it. Not red — red on this
   surface means "skip" and "destroy" — and not a footnote, which is what it
   was. */

.wt-warn {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--purple-night);
  color: var(--moon);
  padding: clamp(1.6rem, 4.5vw, 2.6rem);
  box-shadow: var(--shadow-md);
}

.wt-warn::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -14%;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  background: radial-gradient(circle,
    color-mix(in oklab, var(--purple) 42%, transparent) 0%, transparent 62%);
  pointer-events: none;
}

.wt-warn__k {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--moon) 62%, var(--purple-night));
  margin-bottom: 1rem;
}
.wt-warn__k::before { content: ""; width: 1.6rem; height: 1px; background: color-mix(in oklab, var(--moon) 40%, transparent); }

.wt-warn__t {
  position: relative;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--moon);
  text-wrap: pretty;
}

.wt-warn__s {
  position: relative;
  margin-top: 0.85rem;
  max-width: 32rem;
  font-size: 0.96rem;
  font-weight: 300;
  line-height: 1.65;
  color: color-mix(in oklab, var(--moon) 76%, var(--purple-night));
  text-wrap: pretty;
}

.wt-intro {
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
  font-size: 1.01rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ---------- preface stage rows ------------------------------------------ */

.wt-steps { display: grid; gap: 0.6rem; margin-top: 1.3rem; }

.wt-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1.05rem, 2.4vw, 1.4rem);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
}

.wt-step__m {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px 12px 12px 12px;
  background: color-mix(in oklab, var(--purple) 9%, var(--tint));
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--purple);
}

.wt-step__b { min-width: 0; flex: 1; }

.wt-step__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
}

.wt-step__k { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; line-height: 1.3; }

.wt-skip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  padding-inline: 0.3rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--danger-ink);
  border-radius: 6px;
}
.wt-skip:hover { text-decoration: underline; text-underline-offset: 3px; }

.wt-step__d { margin-top: 0.35rem; font-size: 0.92rem; line-height: 1.6; color: var(--ink-2); }

/* The one inline link in the preface copy. Danger red, as shipped. */
.wt-inline { color: var(--danger-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.wt-inline:hover { color: var(--danger-ink); text-decoration-thickness: 2px; }

/* ---------- Preparation: the three option cards -------------------------- */

.wt-opts { display: grid; gap: 0.65rem; margin-top: clamp(1.5rem, 3.5vw, 2rem); }

.wt-opt {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 200ms;
}
.wt-opt:hover { border-color: var(--hairline-2); }

.wt-opt__hd {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 64px;
  padding: 1rem clamp(1.05rem, 2.4vw, 1.35rem);
  text-align: left;
  color: inherit;
  text-decoration: none;
}

.wt-opt__b { display: grid; gap: 0.12rem; min-width: 0; flex: 1; }
.wt-opt__k { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.wt-opt__d { font-size: 0.86rem; line-height: 1.5; color: var(--ink-3); }

.wt-opt__go { flex-shrink: 0; color: var(--purple); transition: transform 240ms var(--ease-out); }
.wt-opt:hover .wt-opt__go { transform: translateX(2px); }
.wt-opt.is-open .wt-opt__go { transform: rotate(180deg); }
.wt-opt.is-open { border-color: var(--hairline-2); background: var(--surface); }

/* Skip is legitimate, not encouraged: no card ground, no serif, quietest ink.
   It is still a 64px target. */
.wt-opt--quiet { background: transparent; border-color: transparent; }
.wt-opt--quiet:hover { border-color: var(--hairline); background: var(--surface); }
.wt-opt--quiet .wt-opt__k { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; color: var(--ink-2); }
.wt-opt--quiet .wt-opt__go { color: var(--ink-3); }

.wt-opt__body {
  padding: 0 clamp(1.05rem, 2.4vw, 1.35rem) clamp(1.15rem, 2.6vw, 1.4rem);
  border-top: 1px solid var(--hairline);
  padding-top: 1.15rem;
}

.wt-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.7rem;
}

/* ---------- date-range selector ----------------------------------------- */

.wt-range { display: grid; gap: 0.4rem; }

.wt-rangerow {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  width: 100%;
  min-height: 56px;
  padding: 0.8rem 0.95rem;
  text-align: left;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color 200ms, background 200ms;
}
.wt-rangerow:hover { border-color: var(--hairline-2); }
.wt-rangerow[aria-checked="true"] { border-color: var(--purple); background: var(--purple-mist); }

.wt-radio {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin-top: 0.22rem;
  border-radius: 999px;
  border: 1.5px solid var(--hairline-2);
  display: grid;
  place-items: center;
  transition: border-color 200ms;
}
.wt-radio::after {
  content: "";
  width: 9px; height: 9px;
  border-radius: 999px;
  background: var(--purple);
  transform: scale(0);
  transition: transform 200ms var(--ease-out);
}
.wt-rangerow[aria-checked="true"] .wt-radio { border-color: var(--purple); }
.wt-rangerow[aria-checked="true"] .wt-radio::after { transform: scale(1); }

.wt-rangerow__b { display: grid; gap: 0.1rem; min-width: 0; }
.wt-rangerow__k { font-size: 0.94rem; font-weight: 500; color: var(--ink); }
.wt-rangerow__d { font-size: 0.82rem; line-height: 1.5; color: var(--ink-3); }

/* An option the app cannot honour is disabled outright rather than shown with
   a guess in it: the reader never named the day, so nothing may be drawn as
   though they had. */
.wt-rangerow[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.wt-rangerow[aria-disabled="true"]:hover { border-color: var(--hairline); }

.wt-dates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.6rem;
  margin-top: 0.55rem;
  padding-left: 2.4rem;
}
.wt-date { display: grid; gap: 0.3rem; }
.wt-date > span { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }

.wt-fine {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-3);
}

.wt-optactions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.wt-optactions .btn--primary { margin-left: auto; }

/* Biometric auth can fail, and the message belongs here rather than in a
   toast the reader may already have dismissed. */
.wt-err {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--r-sm);
  background: color-mix(in oklab, var(--danger) 10%, var(--tint));
  border: 1px solid color-mix(in oklab, var(--danger) 26%, transparent);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--danger-ink);
}
.wt-err svg { flex-shrink: 0; margin-top: 0.22rem; color: var(--danger); }

/* ---------- Confess Sins: what to include ------------------------------- */

.wt-inc { display: grid; gap: 0.5rem; margin-top: 1.1rem; }

.wt-inc__i {
  display: grid;
  gap: 0.2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--hairline-2);
}
.wt-inc__k { font-family: var(--sans); font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.wt-inc__d { font-size: 0.88rem; line-height: 1.6; color: var(--ink-2); }
.wt-inc__d em { font-family: var(--serif); font-style: italic; color: var(--ink); }

/* ---------- Confess Sins: the list -------------------------------------- */

.wt-listhd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  flex-wrap: wrap;
  margin-top: clamp(1.6rem, 3.5vw, 2.2rem);
  padding-top: clamp(1.4rem, 3vw, 1.8rem);
  border-top: 1px solid var(--hairline);
}

.wt-listhd__k {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Hairlines, not boxes: the list is one thing the reader reads down, and
   twenty-six cards is twenty-six boxes to look past. */
.wt-sins { margin-top: 0.9rem; }

.wt-sin {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--hairline);
}
.wt-sin:last-child { border-bottom: 1px solid var(--hairline); }

.wt-sin__b { flex: 1; min-width: 0; }
.wt-sin__s { font-size: 0.98rem; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.wt-sin__q { font-family: var(--serif); font-style: italic; font-size: 0.98rem; line-height: 1.55; color: var(--ink); }
.wt-sin__c { margin-top: 0.18rem; }

.wt-badge {
  flex-shrink: 0;
  min-width: 26px;
  height: 26px;
  margin-top: 0.15rem;
  padding-inline: 0.4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--purple-fill);
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wt-sin__x {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -0.55rem -0.6rem -0.55rem 0;
  border-radius: 999px;
  color: var(--ink-3);
  transition: color 180ms, background 180ms;
}
.wt-sin__x:hover { color: var(--danger); background: color-mix(in oklab, var(--danger) 9%, transparent); }

.wt-sincount { font-size: 0.78rem; color: var(--ink-3); margin-top: 0.8rem; }

/* An empty list is a different composition, not this one with nothing in it. */
.wt-noexam {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: clamp(1.6rem, 3.5vw, 2.2rem);
  padding: clamp(1.2rem, 3vw, 1.6rem);
  border: 1px dashed var(--hairline-2);
  border-radius: var(--r-md);
  background: var(--paper-2);
}
.wt-noexam svg { flex-shrink: 0; margin-top: 0.2rem; color: var(--ink-3); }
.wt-noexam__k { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; color: var(--ink-2); }
.wt-noexam__d { margin-top: 0.2rem; font-size: 0.9rem; line-height: 1.6; color: var(--ink-3); }

/* ---------- Advice & Penance -------------------------------------------- */

/* The penance is the one thing the reader has to carry out of the confessional,
   so it gets a card of its own rather than a bare field. */
.wt-pen {
  margin-top: clamp(1.6rem, 3.5vw, 2.2rem);
  padding: clamp(1.2rem, 3vw, 1.5rem);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.wt-pen__h { display: flex; align-items: flex-start; gap: 0.85rem; }
.wt-pen__i {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--purple) 10%, transparent);
  color: var(--purple);
}
.wt-pen__hb { min-width: 0; }
.wt-pen__k { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.wt-pen__d { margin-top: 0.2rem; font-size: 0.88rem; line-height: 1.55; color: var(--ink-3); text-wrap: pretty; }

.wt-pen__lbl {
  display: block;
  margin: 1.1rem 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.wt-pen textarea { min-height: 7rem; }
.wt-pen__saved { font-size: 0.78rem; color: var(--ink-3); margin-top: 0.5rem; min-height: 1.2em; }

.wt-pen__f {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}
.wt-pen__fd { font-size: 0.78rem; line-height: 1.5; color: var(--ink-3); }
.wt-pen__set {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--purple);
}
@media (max-width: 480px) {
  .wt-pen__f > .btn { width: 100%; justify-content: center; }
}

.wt-artcard { margin-top: clamp(1.2rem, 3vw, 1.6rem); }

/* ---------- Absolution -------------------------------------------------- */

.wt-remind { margin-top: clamp(1.5rem, 3.5vw, 2rem); }

/* ---------- the pinned footer ------------------------------------------- */

.wt-foot {
  position: sticky;
  bottom: 0;
  z-index: 55;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-block: 0.9rem calc(0.9rem + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--hairline);
}

.wt-foot__in { display: flex; align-items: center; gap: 0.7rem; }
.wt-foot__in .btn--primary { margin-left: auto; }

/* The caption is doing real work — it tells the reader that this press is what
   records the day — so it sits with the button, not in a paragraph above it. */
.wt-finish { display: grid; justify-items: end; gap: 0.35rem; margin-left: auto; }
.wt-finish__cap { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- the reminder dialog ----------------------------------------- */

.wt-dlg-lbl { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 1.2rem 0 0.5rem; }
.ic-dialog .btn--danger { color: var(--danger-ink); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--danger) 40%, transparent); }
.ic-dialog .btn--danger:hover { background: color-mix(in oklab, var(--danger) 10%, transparent); box-shadow: inset 0 0 0 1.5px var(--danger); }
.wt-dlg-end { margin-left: auto; }

/* ---------- the demo strip ---------------------------------------------
   Scaffolding, like `.nib`: it reaches the states a running flow cannot be
   clicked into (a long loaded list, a skipped examination, a failed unlock).
   Drawn deliberately unlike the design so it is never mistaken for it. */

.wt-demo {
  position: fixed;
  bottom: 0.9rem;
  left: 0.9rem;
  z-index: 400;
  font-family: var(--sans);
  max-width: min(24rem, calc(100vw - 1.8rem));
}

.wt-demo__t {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: #150B26;
  color: #CFC7DE;
  border: 1px dashed rgba(201, 182, 232, 0.34);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.wt-demo__t:hover { color: #F3EFFA; }

.wt-demo__p {
  margin-top: 0.5rem;
  padding: 0.8rem 0.9rem 0.9rem;
  border-radius: 14px;
  background: #150B26;
  border: 1px dashed rgba(201, 182, 232, 0.34);
  color: #CFC7DE;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 0.7rem;
}
.wt-demo__p[hidden] { display: none; }

.wt-demo__g { display: grid; gap: 0.3rem; }
.wt-demo__g > b { font-size: 0.55rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: #6E6482; }
.wt-demo__r { display: flex; flex-wrap: wrap; gap: 0.25rem; }

.wt-demo button.d {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.34rem 0.6rem;
  font-size: 0.72rem;
  color: #CFC7DE;
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.wt-demo button.d:hover { background: rgba(201, 182, 232, 0.1); color: #F3EFFA; }
.wt-demo button.d[aria-pressed="true"] { background: #6A1BD8; color: #fff; }

/* ---------- mobile -------------------------------------------------------
   The reader is one-handed and possibly kneeling. Nothing here shrinks a
   target; the column narrows and the footer keeps both buttons side by side
   within thumb reach rather than stacking Next out of the corner. */

@media (max-width: 760px) {
  .wt-stages { padding-block: 0.7rem 0.75rem; }
  .wt-stages__in { gap: 0.4rem; }
  .wt-stage__n { font-size: 0.6rem; letter-spacing: 0.1em; }
  .wt-stage.is-now .wt-stage__n { font-size: 0.92rem; }

  .wt-entry__actions .btn--primary { width: 100%; justify-content: center; }

  .wt-dates { padding-left: 0; }
  .wt-optactions .btn { flex: 1 1 10rem; justify-content: center; }
  .wt-optactions .btn--primary { margin-left: 0; }

  .wt-foot__in { align-items: flex-start; }
  .wt-foot__in .btn { flex: 1 1 auto; justify-content: center; }
  .wt-foot__in .btn--ghost { flex: 0 1 7.5rem; }
  .wt-finish { flex: 1 1 auto; justify-items: stretch; }
  .wt-finish .btn { width: 100%; justify-content: center; }
  .wt-finish__cap { text-align: center; }
}

@media (max-width: 420px) {
  .wt-stage.is-now .wt-stage__n { font-size: 0.85rem; }
  .wt-step { gap: 0.8rem; padding: 1rem; }
  .wt-step__m { width: 34px; height: 34px; font-size: 0.94rem; }
}

/* ---------- the chooser (ADR-103) -------------------------------------------
   What the walkthrough carries: live marks, saved examinations over the period
   Stats uses, a new examination, or none. One stack of cards; the saved
   examinations card opens in place to hold the period control. */

.wt-title--chooser { white-space: pre-line; }
.wt-choices { display: grid; gap: 0.75rem; margin-top: clamp(1.4rem, 3vw, 2rem); }
.wt-choice {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color 180ms, box-shadow 180ms var(--ease-out);
}
.wt-choice:hover, .wt-choice.is-open { border-color: color-mix(in oklab, var(--purple) 34%, var(--hairline)); }
.wt-choice.is-open { box-shadow: var(--shadow-sm); }
.wt-choice__hd, .wt-choice--link {
  display: grid; gap: 0.25rem;
  width: 100%;
  min-height: 44px;
  padding: 1rem 1.15rem;
  text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  text-decoration: none;
}
.wt-choice__hd { background: none; border: 0; }
.wt-choice__t { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ink); }
.wt-choice__s { font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }
.wt-choice__body { display: grid; gap: 0.9rem; padding: 0 1.15rem 1.15rem; justify-items: start; }
.wt-choice__body[hidden] { display: none; }
.wt-choice__lead { font-size: 0.86rem; color: var(--ink-2); }
.wt-choice__sum { font-size: 0.84rem; line-height: 1.55; color: var(--ink-3); }
.wt-choice__body > #periodBlock { justify-self: stretch; }
.wt-choice__body .period-range { margin-top: 0.6rem; }

/* The list step's quiet way into the chooser — beside the list, never in front. */
.wt-source { margin-top: 0.4rem; }
.wt-source__btn {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px;
  background: none; border: 0; padding: 0; font: inherit; font-size: 0.86rem;
  color: var(--purple-ink); cursor: pointer;
}
.wt-source__btn:hover { text-decoration: underline; text-underline-offset: 3px; }
