/* Word & Worship v4 shell and screens: the phone tab bar, the desktop header,
   /welcome, the You hub, /philip, the 404 and /support. Loaded only when the
   request is v4 (app/layout.tsx), after every other stylesheet. Colors, type,
   radius and motion come from the dayspring tokens in /ww4.css; spacing comes
   from the shared --space-* scale. Selectors set their own type and colors so
   older page styles cannot leak into them. */

html[data-ui="v4"] { --size-tab-bar-height: 84px; --v4-gutter: 20px; --v4-bar: color-mix(in srgb, var(--ds-surface) 94%, transparent); }
@media (max-width: 899.98px) { html[data-ui="v4"] { --ww-dock-space: 96px !important; } }
@media (min-width: 900px) { html[data-ui="v4"] { --size-tab-bar-height: 76px; --v4-gutter: 24px; } }
@media (min-width: 1200px) { html[data-ui="v4"] { --v4-gutter: 64px; } }

.v4-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.v4-skip {
  position: fixed; left: 16px; top: 8px; z-index: 1000; padding: 12px 16px; border-radius: var(--ds-radius-button);
  background: var(--ds-raised); color: var(--ds-ink); font: 650 16px/1.45 var(--ds-font-interface); text-decoration: none; transform: translateY(-200%);
}
.v4-skip:focus { transform: none; }
#v4-content { display: block; height: 0; outline: none; scroll-margin-top: var(--size-tab-bar-height); }
.v4-header *, .v4-tabs *, .v4-philip-panel *, .v4-page *, .v4-welcome *, .v4-reader, .v4-reader *, .v4-way, .v4-way *, .v4-vsheet, .v4-vsheet * { box-sizing: border-box; }
:is(.v4-header, .v4-tabs, .v4-philip-panel, .v4-page, .v4-welcome, .v4-skip, .v4-reader, .v4-way, .v4-vsheet) :focus-visible, .v4-skip:focus-visible {
  outline: 2px solid var(--c-focus); outline-offset: 2px;
}

/* Phone tab bar: five slots, 84px, a 3px gold bar over the active tab. */
.v4-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--layer-tab-bar);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--v4-bar); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--ds-line); color: var(--ds-ink);
  font-family: var(--ds-font-interface); letter-spacing: normal;
}
.v4-tabs ul { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; height: 84px; display: grid; grid-template-columns: repeat(5, 1fr); }
.v4-tabs li { margin: 0; padding: 0; }
.v4-tab {
  position: relative; height: 100%; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--ds-tab-off); text-decoration: none; font: 600 12.5px/1.2 var(--ds-font-interface);
}
html[data-text="large"] .v4-tab, html[data-text="larger"] .v4-tab { font-size: 14px; }
.v4-tab svg { display: block; width: 24px; height: 24px; }
.v4-tab[aria-current="page"] { color: var(--ds-ink); }
.v4-tab[aria-current="page"]::before {
  content: ""; position: absolute; top: -1px; left: 50%; width: 40px; height: 3px; margin-left: -20px; border-radius: 0 0 3px 3px; background: var(--ds-gline);
}
.v4-tab-lancet {
  flex: none; width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: var(--ds-radius-button); background: var(--ds-lancet-glass); border: 1px solid var(--ds-lancet-lead);
}
.v4-tab-lancet svg { width: 30px; height: 36px; }
@media (min-width: 900px) { .v4-tabs { display: none; } }

/* Desktop header: 76px, wordmark, centered nav, tools. */
.v4-header { display: none; }
@media (min-width: 900px) {
  .v4-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: var(--layer-tab-bar); height: 76px; padding: 0 var(--v4-gutter);
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
    background: var(--v4-bar); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ds-line); color: var(--ds-ink);
    font-family: var(--ds-font-interface); letter-spacing: normal;
    /* Clear over the Today sky, then the mode's own bar: a color fade only, and
       no longer than 160ms for a reader who asked for reduced motion. */
    transition: background-color var(--ds-dur-quick) var(--ds-ease-out), border-color var(--ds-dur-quick) var(--ds-ease-out), color var(--ds-dur-quick) var(--ds-ease-out);
  }
  .v4-header-nav a, .v4-wordmark i, .v4-header .v4-tool { transition: color var(--ds-dur-quick) var(--ds-ease-out), border-color var(--ds-dur-quick) var(--ds-ease-out); }
}
.v4-wordmark { justify-self: start; display: inline-flex; align-items: center; gap: 0.22em; min-height: 44px; color: inherit; text-decoration: none; white-space: nowrap; font: 600 22px/1 var(--ds-font-display); letter-spacing: -0.01em; }
.v4-wordmark i { font-style: italic; font-weight: 500; color: var(--ds-gold-ink); }
.v4-header-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; height: auto; }
.v4-header-nav li { margin: 0; padding: 0; }
.v4-header-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  color: var(--ds-tab-off); text-decoration: none; font: 600 15px/1 var(--ds-font-interface);
}
.v4-header-nav a:hover { color: var(--ds-ink); }
.v4-header-nav a[aria-current="page"] { color: var(--ds-ink); }
.v4-header-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--ds-gline); }
.v4-header-tools { justify-self: end; display: flex; align-items: center; gap: 8px; min-width: 0; }
.v4-tool {
  flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0;
  border: 1px solid var(--ds-line); border-radius: var(--ds-radius-button); background: transparent; color: inherit;
  font: 600 16px/1 var(--ds-font-display); text-decoration: none; cursor: pointer;
}
.v4-tool svg { width: 20px; height: 20px; }
.v4-philip-bar {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; width: 220px; height: 44px; margin: 0; padding: 0 12px 0 16px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-radius-button); background: var(--ds-raised); color: var(--ds-ink-2);
  font: 550 15px/1 var(--ds-font-interface); text-align: left; white-space: nowrap; cursor: pointer;
}
.v4-philip-bar kbd { padding: 4px 6px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-chip); background: var(--ds-surface); color: var(--ds-ink-2); font: 600 12.5px/1 var(--ds-font-interface); }
@media (max-width: 1199.98px) {
  .v4-philip-bar { width: auto; }
  /* Between 900 and 1200 the three header groups must fit side by side. */
  .v4-header { gap: 12px; }
  .v4-header-nav ul { gap: 0; }
  .v4-header-nav a { padding: 0 10px; }
  .v4-header-nav a[aria-current="page"]::after { left: 10px; right: 10px; }
  .v4-philip-bar kbd { display: none; }
}
.v4-textsize { position: relative; }
.v4-popover {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: var(--layer-sheet); width: 300px; padding: 16px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-radius-sheet); background: var(--ds-surface); color: var(--ds-ink); box-shadow: var(--ds-shadow);
}
.v4-popover[hidden] { display: none; }
/* Over the Today sky the header is clear and its text is white. The server
   renders data-over-sky on Today, so this is the first paint too. It applies
   only while the page has the sky to sit on: never white text on the paper. */
body:has(.v4-hero-sky) .v4-header[data-over-sky] { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent; color: #FFFFFF; }
body:has(.v4-hero-sky) .v4-header[data-over-sky] .v4-header-nav a, body:has(.v4-hero-sky) .v4-header[data-over-sky] .v4-wordmark i { color: #FFFFFF; }
body:has(.v4-hero-sky) .v4-header[data-over-sky] .v4-header-nav a[aria-current="page"]::after { background: #FFFFFF; }
body:has(.v4-hero-sky) .v4-header[data-over-sky] .v4-tool { border-color: rgba(255, 255, 255, 0.6); }

/* The docked Philip panel: 444px on the right, under the header. */
.v4-philip-panel {
  position: fixed; top: 76px; right: 0; bottom: 0; z-index: var(--layer-tab-bar); width: min(444px, 100vw); padding: 24px; overflow: auto;
  display: grid; align-content: start; gap: 16px;
  background: var(--ds-surface); color: var(--ds-ink); border-left: 1px solid var(--ds-line); box-shadow: var(--ds-shadow);
  font-family: var(--ds-font-interface);
}
.v4-philip-panel[hidden] { display: none; }
@media (max-width: 899.98px) { .v4-philip-panel { display: none; } }
.v4-philip-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.v4-philip-panel h2 { margin: 0; color: inherit; font: 600 24px/1.2 var(--ds-font-display); letter-spacing: 0; }

/* Shared pieces */
.v4-display { margin: 0; color: var(--ds-ink); font: 600 46px/1 var(--ds-font-display); letter-spacing: -1.6px; outline: none; }
.v4-display em { font-style: italic; font-weight: 500; color: var(--ds-gold-ink); }
.v4-title { margin: 0; color: var(--ds-ink); font: 600 34px/1.05 var(--ds-font-display); letter-spacing: 0; }
.v4-heading { margin: 0; color: var(--ds-ink); font: 600 19px/1.2 var(--ds-font-display); letter-spacing: 0; }
.v4-body { margin: 0; color: var(--ds-ink-2); font: 400 17px/1.5 var(--ds-font-interface); }
.v4-meta { margin: 0; color: var(--ds-ink-3); font: 550 13.5px/1.45 var(--ds-font-interface); }
.v4-overline { margin: 0; color: var(--ds-ink-3); font: 650 12.5px/1.45 var(--ds-font-interface); letter-spacing: 0.12em; text-transform: uppercase; }
@media (min-width: 900px) {
  .v4-display { font-size: 64px; letter-spacing: -2.2px; }
  .v4-title { font-size: 40px; }
  .v4-heading { font-size: 24px; }
}
.v4-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; margin: 0; padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--ds-radius-button); background: transparent; color: var(--ds-ink);
  font: 650 16px/1.45 var(--ds-font-interface); text-decoration: none; text-align: center; cursor: pointer;
  transition: opacity var(--ds-dur-instant) var(--ds-ease-out);
}
.v4-btn:hover { opacity: 0.9; }
.v4-btn[data-block] { display: flex; width: 100%; }
.v4-btn[data-kind="gold"] { background: var(--ds-gold); color: var(--c-lamp-ink); }
.v4-btn[data-kind="outline"] { border-color: var(--ds-ink-3); }
.v4-link {
  display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0 4px; border: 0; background: transparent;
  color: var(--ds-green); font: 650 16px/1.45 var(--ds-font-interface); text-decoration: none; cursor: pointer;
}
.v4-link:hover { text-decoration: underline; }
.v4-card { margin: 0; padding: 20px; border: var(--ds-edge); border-radius: var(--ds-radius-card); background: var(--ds-surface); color: var(--ds-ink); box-shadow: var(--ds-shadow); }
.v4-stack { display: grid; gap: 20px; }
.v4-verse { margin: 0; display: grid; gap: 8px; }
.v4-verse blockquote { margin: 0; padding: 0; border: 0; color: var(--ds-ink); font: 400 19.5px/1.42 var(--ds-font-scripture); font-style: normal; quotes: none; }
.v4-verse figcaption { color: var(--ds-ink-3); font: 550 13.5px/1.45 var(--ds-font-interface); }
@media (min-width: 900px) { .v4-verse blockquote { font-size: 24px; line-height: 1.5; } }

/* Segmented control */
.v4-segment { min-width: 0; margin: 0; padding: 0; border: 0; }
.v4-segment-legend { margin: 0 0 8px; padding: 0; color: var(--ds-ink); font: 650 16px/1.45 var(--ds-font-interface); }
.v4-segment-row { display: flex; gap: 4px; padding: 4px; border-radius: var(--ds-radius-button); background: var(--ds-raised); }
.v4-segment-option { position: relative; flex: 1 1 0; min-width: 0; margin: 0; cursor: pointer; }
.v4-segment-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.v4-segment-option span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 4px 6px; border-radius: var(--ds-radius-media);
  color: var(--ds-ink-2); font: 600 14px/1.2 var(--ds-font-interface); text-align: center;
}
.v4-segment-option small { color: inherit; font: 550 12.5px/1.2 var(--ds-font-interface); }
.v4-segment-option input:checked + span { background: var(--ds-surface); color: var(--ds-ink); box-shadow: inset 0 0 0 2px var(--ds-gline); }
.v4-segment-option input:focus-visible + span { outline: 2px solid var(--c-focus); outline-offset: 2px; }

/* Pages inside the shell: the You hub, Philip, the 404 and /support. */
.v4-page {
  width: 100%; max-width: 720px; min-height: 100dvh; margin: 0 auto;
  padding: 32px var(--v4-gutter) calc(84px + 48px + env(safe-area-inset-bottom));
  display: grid; align-content: start; gap: 24px;
  background: var(--ds-ground); color: var(--ds-ink); font-family: var(--ds-font-interface); letter-spacing: normal; text-align: left;
}
.v4-page[data-wide] { max-width: 1120px; }
@media (min-width: 900px) { .v4-page { padding: calc(76px + 48px) 24px 64px; } }
/* On routes still in the older frame, the page pads itself. */
html[data-ui="v4"] body:has(> .v4-page), html[data-ui="v4"] body:has(.v4-page), html[data-ui="v4"] body:has(.v4-reader), html[data-ui="v4"] body:has(.v4-way) { padding-top: 0; padding-bottom: 0; background: var(--ds-ground); }
.v4-rows { list-style: none; margin: 0; padding: 0; border: var(--ds-edge); border-radius: var(--ds-radius-card); background: var(--ds-surface); box-shadow: var(--ds-shadow); overflow: hidden; }
.v4-rows li { margin: 0; padding: 0; }
.v4-rows li + li { border-top: 1px solid var(--ds-line); }
.v4-row { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 10px 20px; color: var(--ds-ink); text-decoration: none; }
a.v4-row:hover { background: var(--ds-raised); }
.v4-row[data-soon] { color: var(--ds-ink-2); }
.v4-row svg { flex: none; width: 20px; height: 20px; color: var(--ds-ink-3); }
.v4-row-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.v4-row-text strong { color: inherit; font: 600 17px/1.3 var(--ds-font-interface); }
.v4-row-text small { color: var(--ds-ink-3); font: 550 13.5px/1.45 var(--ds-font-interface); }
.v4-section { display: grid; gap: 16px; scroll-margin-top: calc(var(--size-tab-bar-height) + 16px); }
.v4-section .v2-you-section { padding-top: 0; }
.v4-foot { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.v4-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ds-ink-2); font: 550 15px/1.45 var(--ds-font-interface); }
.v4-back { margin: 8px 0 0; }
.v4-support { min-width: 0; }

/* /welcome: a sky, then the words. Side by side on a wide screen. */
.v4-welcome { min-height: 100dvh; background: var(--ds-ground); color: var(--ds-ink); font-family: var(--ds-font-interface); letter-spacing: normal; }
.v4-welcome-sky {
  position: relative; height: 200px; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 100%, var(--ds-sky-glow) 0%, transparent 60%),
    linear-gradient(to bottom, var(--ds-sky-1) 0%, var(--ds-sky-2) 38%, var(--ds-sky-3) 72%, var(--ds-sky-4) 100%);
}
.v4-welcome[data-step="two"] .v4-welcome-sky { height: 96px; }
.v4-welcome-lancet { width: 56px; height: 68px; }
.v4-welcome[data-step="two"] .v4-welcome-lancet { width: 36px; height: 44px; }
.v4-lancet-glow { display: grid; place-items: center; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--ds-lancet-gold-1) 70%, transparent) 0%, transparent 100%); }
.v4-lancet-glow svg { width: 72px; height: 88px; filter: drop-shadow(0 0 18px var(--ds-lancet-gold-2)); }
.v4-welcome-main { width: 100%; max-width: 560px; margin: 0 auto; padding: 16px var(--v4-gutter) calc(40px + env(safe-area-inset-bottom)); display: grid; align-content: start; gap: 20px; }
.v4-welcome-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.v4-choices { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.v4-choices legend { margin: 0 0 4px; padding: 0; color: var(--ds-ink); font: 600 19px/1.2 var(--ds-font-display); }
.v4-choice { position: relative; display: block; margin: 0; cursor: pointer; }
.v4-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.v4-choice span {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 56px; padding: 16px 20px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-radius-card); background: var(--ds-surface); color: var(--ds-ink);
}
.v4-choice strong { font: 600 17px/1.3 var(--ds-font-interface); }
.v4-choice small { color: var(--ds-ink-3); font: 550 13.5px/1.45 var(--ds-font-interface); }
.v4-choice input:checked + span { border-color: var(--ds-gline); box-shadow: inset 0 0 0 1px var(--ds-gline); }
.v4-choice input:focus-visible + span { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.v4-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.v4-chips li { margin: 0; padding: 6px 10px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-chip); color: var(--ds-ink-2); font: 550 13.5px/1.45 var(--ds-font-interface); }
.v4-preview { display: grid; gap: 8px; padding: 16px; border-radius: var(--ds-radius-panel); background: var(--ds-raised); }
.v4-preview-verse { margin: 0; color: var(--ds-ink); font-family: var(--ds-font-scripture); line-height: 1.5; }
.v4-preview-meta { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--ds-ink-3); font: 550 13.5px/1.45 var(--ds-font-interface); }
.v4-preview-aa { color: var(--ds-ink); font-family: var(--ds-font-display); font-weight: 600; line-height: 1; }
.v4-philip-card { display: flex; align-items: flex-start; gap: 16px; }
.v4-philip-card > div { display: grid; gap: 4px; min-width: 0; }
.v4-lock { display: flex; align-items: flex-start; gap: 8px; }
.v4-lock svg { flex: none; margin-top: 2px; }
@media (min-width: 900px) {
  .v4-welcome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .v4-welcome .v4-welcome-sky, .v4-welcome[data-step="two"] .v4-welcome-sky { position: sticky; top: 0; height: 100dvh; }
  .v4-welcome .v4-welcome-lancet, .v4-welcome[data-step="two"] .v4-welcome-lancet { width: 96px; height: 116px; }
  .v4-welcome-main { align-self: center; padding: 48px var(--v4-gutter); }
}

/* Philip: the read-only chat on his own screen and in the docked panel, the
   care panel, and the daily limit sheet. */
html[data-ui="v4"] { --v4-cite-line: #E2C995; }
html[data-ui="v4"][data-mode="night"] { --v4-cite-line: #4A3E26; }
.v4-ph { width: 100%; min-width: 0; display: grid; gap: 20px; color: var(--ds-ink); font-family: var(--ds-font-interface); letter-spacing: normal; text-align: left; }
.v4-ph * { box-sizing: border-box; }
.v4-ph p, .v4-ph ul, .v4-ph h1, .v4-ph h2, .v4-ph h3 { margin: 0; }
.v4-ph ul { list-style: none; padding: 0; }
.v4-ph-home { display: grid; gap: 16px; }
.v4-ph-context { display: flex; align-items: center; gap: 10px; color: var(--ds-ink-2); font: 650 14px/1.45 var(--ds-font-interface); }
.v4-ph-mark { flex: none; width: 30px; height: 36px; }
.v4-philip-panel .v4-ph-greeting { font-size: 28px; }
.v4-ph-suggestions { display: grid; gap: 8px; }
.v4-ph-suggestions button {
  display: flex; align-items: center; width: 100%; min-height: 56px; margin: 0; padding: 12px 16px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-card);
  background: var(--ds-surface); color: var(--ds-ink); font: 550 16px/1.4 var(--ds-font-interface); text-align: left; cursor: pointer;
}
.v4-ph-suggestions button:hover { background: var(--ds-raised); }
html[data-text="large"] .v4-ph-suggestions button, .v4-ph[data-large] .v4-ph-suggestions button { min-height: 68px; font-size: 21px; }
html[data-text="larger"] .v4-ph-suggestions button { min-height: 76px; font-size: 25px; }

.v4-ph-turns { display: grid; gap: 20px; }
.v4-ph-turn { display: grid; gap: 8px; }
.v4-ph-msg { max-width: 100%; padding: 12px 16px; border-radius: var(--ds-radius-card); color: var(--ds-ink); font: 400 17px/1.5 var(--ds-font-interface); overflow-wrap: anywhere; white-space: pre-wrap; }
.v4-ph-msg[data-role="user"] { justify-self: end; max-width: 88%; background: var(--ds-raised); }
.v4-ph-msg[data-role="assistant"] { display: grid; gap: 12px; border: 1px solid var(--ds-line); background: var(--ds-surface); }
.v4-ph-msg[data-crisis] { border-color: var(--ds-ink-3); }
html[data-text="large"] .v4-ph-msg, .v4-ph[data-large] .v4-ph-msg { font-size: 21px; }
html[data-text="larger"] .v4-ph-msg { font-size: 25px; }
.v4-ph-cites { display: flex; flex-wrap: wrap; gap: 8px; }
.v4-ph-cite {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--v4-cite-line); border-radius: var(--ds-radius-chip);
  background: transparent; color: var(--ds-gold-ink); font: 650 15px/1.2 var(--ds-font-interface); text-decoration: none; white-space: nowrap;
}
.v4-ph-cite:hover { text-decoration: underline; }
.v4-ph-doctrine { color: var(--ds-ink-3); font: 550 13.5px/1.45 var(--ds-font-interface); white-space: normal; }
.v4-ph-error { display: grid; gap: 8px; justify-items: start; }
.v4-ph-error .v4-meta { color: var(--ds-ink); }

.v4-ph-form { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border: 1px solid var(--ds-ink-3); border-radius: var(--ds-radius-card); background: var(--ds-surface); }
.v4-ph-form textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 160px; margin: 0; padding: 10px 8px; border: 0; background: transparent; color: var(--ds-ink);
  font: 400 17px/1.4 var(--ds-font-interface); resize: none; field-sizing: content;
}
.v4-ph-form textarea::placeholder { color: var(--ds-ink-3); opacity: 1; }
.v4-ph-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: var(--ds-radius-button); background: var(--ds-gold); color: var(--c-lamp-ink); cursor: pointer; }
.v4-ph-send:disabled { background: var(--ds-raised); color: var(--ds-ink-3); cursor: default; }
.v4-ph-send svg { width: 20px; height: 20px; }
.v4-ph-hold { display: none; gap: 8px; justify-items: start; }
html[data-text="large"] .v4-ph-hold, html[data-text="larger"] .v4-ph-hold, .v4-ph[data-large] .v4-ph-hold { display: grid; }
.v4-ph-hold .v4-btn { min-height: 64px; font-size: 19px; touch-action: none; user-select: none; -webkit-user-select: none; }
.v4-ph-hold .v4-btn[aria-pressed="true"] { border-color: var(--ds-gline); box-shadow: inset 0 0 0 1px var(--ds-gline); }

/* Help from a person. Always on screen, never limited. */
.v4-ph-care { border: 1px solid var(--ds-line); border-radius: var(--ds-radius-card); background: var(--ds-surface); }
.v4-ph-care[open] { border-color: var(--ds-ink-3); }
.v4-ph-care summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; color: var(--ds-ink); font: 650 15px/1.45 var(--ds-font-interface); cursor: pointer; list-style: none; }
.v4-ph-care summary::-webkit-details-marker { display: none; }
.v4-ph-care summary svg { flex: none; width: 20px; height: 20px; }
.v4-ph-care-body { display: grid; gap: 12px; padding: 4px 16px 16px; }
.v4-ph-988 { display: grid; gap: 4px; min-height: 64px; padding: 14px 16px; border-radius: var(--ds-radius-button); background: var(--ds-ink); color: var(--ds-ground); text-decoration: none; }
.v4-ph-988 strong { font: 650 20px/1.2 var(--ds-font-interface); }
.v4-ph-988 small { font: 550 13.5px/1.45 var(--ds-font-interface); }
.v4-ph-care-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.v4-ph-danger { color: var(--ds-ink); font: 650 16px/1.45 var(--ds-font-interface); }
.v4-ph-care-verse blockquote, .v4-philip-panel .v4-ph-care-verse blockquote { font-size: 19.5px; line-height: 1.42; }

/* The daily limit sheet. Inside Philip only; it does not cover the composer. */
.v4-ph-limit {
  display: grid; gap: 12px; justify-items: start; padding: 20px; border: 1px solid var(--ds-line); border-top: 3px solid var(--ds-gline);
  border-radius: var(--ds-radius-sheet); background: var(--ds-surface); box-shadow: var(--ds-shadow); animation: v4-ph-rise var(--ds-dur-quick) var(--ds-ease-out);
}
@keyframes v4-ph-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.v4-ph-limit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; width: 100%; }
.v4-ph-limit-head h2 { outline: none; font-size: 24px; }
.v4-ph-limit .v4-body { color: var(--ds-ink); }
.v4-ph-limit .v4-link { padding: 0; }
.v4-ph-offer, .v4-ph-packs { display: grid; gap: 12px; justify-items: start; width: 100%; padding-top: 16px; border-top: 1px solid var(--ds-line); }
.v4-ph-packs-title { color: var(--ds-ink); font: 650 16px/1.45 var(--ds-font-interface); }
.v4-ph-packs ul { display: grid; gap: 8px; width: 100%; }
.v4-ph-packs li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 6px 6px 6px 16px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-card); color: var(--ds-ink); font: 600 16px/1.4 var(--ds-font-interface); }
.v4-ph-packs li .v4-btn { min-height: 44px; padding: 0 20px; }
.v4-ph-packs .v4-btn:disabled { opacity: 0.6; cursor: default; }
.v4-ph-terms { white-space: pre-line; }

/* On his own screen a phone keeps the composer above the tab bar. */
.v4-philip { justify-items: stretch; }
.v4-philip-panel .v4-ph { gap: 16px; }

.v4-philip-ctx { color: var(--ds-ink) !important; font-weight: 600 !important; }
.v4-cite { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-chip); color: var(--ds-ink-2); font: 550 13.5px/1.45 var(--ds-font-interface); text-decoration: none; }
a.v4-cite { min-height: 44px; color: var(--ds-green); text-decoration: underline; }
.v4-philip-standard { color: var(--ds-ink-3); font: 550 12.5px/1.45 var(--ds-font-interface); }

/* The Printed Word: the v4 reader (/bible/{book}/{n}). A chapter set like a
   printed Bible: a running head, an opening, justified Literata with a drop
   cap, and nothing on the verse text but the text. */
.v4-reader {
  --v4-reader-dock: 0px; --v4-reader-foot: calc(84px + env(safe-area-inset-bottom));
  width: 100%; max-width: 760px; min-height: 100dvh; margin: 0 auto;
  padding: 0 var(--v4-gutter) calc(var(--v4-reader-foot) + var(--v4-reader-dock) + 112px);
  background: var(--ds-ground); color: var(--ds-ink); font-family: var(--ds-font-interface); letter-spacing: normal; text-align: left;
}
.v4-reader:has(.v4-reader-dock) { --v4-reader-dock: 84px; }
.v4-reader[data-listen] { --v4-reader-dock: 152px; }
.v4-reader[data-listen]:has(.v4-listen[data-large]) { --v4-reader-dock: 192px; }
@media (min-width: 900px) {
  .v4-reader { --v4-reader-foot: 0px; max-width: 768px; padding-top: 76px; padding-left: 24px; padding-right: 24px; }
}
.v4-reader-bar {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 8px; min-height: 60px; margin: 0 calc(-1 * var(--v4-gutter)); padding: 8px var(--v4-gutter);
  background: var(--v4-bar); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--ds-line);
}
@media (min-width: 900px) { .v4-reader-bar { top: 76px; margin: 0 -24px; padding: 8px 24px; } }
.v4-reader-back, .v4-reader-listen {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; border-radius: var(--ds-radius-button);
  color: var(--ds-ink); text-decoration: none; font: 600 15px/1 var(--ds-font-interface);
}
.v4-reader-back svg, .v4-reader-listen svg, .v4-reader-place svg { width: 20px; height: 20px; flex: none; }
.v4-reader-listen { border: 1px solid var(--ds-line); padding: 0 12px; }
.v4-reader-place {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; margin: 0; padding: 0 4px;
  border: 0; background: transparent; color: var(--ds-ink); font: 600 17px/1.2 var(--ds-font-display); cursor: pointer;
}
.v4-reader-place span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-reader-size { width: auto; display: flex; align-items: center; gap: 12px; padding: 12px; }
.v4-reader-size[hidden] { display: none; }
.v4-reader-size output { min-width: 40px; text-align: center; color: var(--ds-ink); font: 650 17px/1 var(--ds-font-interface); }
.v4-reader-size .v4-tool:disabled { opacity: 0.45; cursor: default; }
.v4-running-head { margin: 20px 0 0; text-align: center; color: var(--ds-ink-3); font: 650 12.5px/1.45 var(--ds-font-interface); letter-spacing: 0.16em; text-transform: uppercase; }
.v4-opening { display: grid; justify-items: center; gap: 4px; padding: 28px 0 36px; text-align: center; }
.v4-opening-title { margin: 0; display: grid; justify-items: center; color: var(--ds-ink); font: 600 34px/1.1 var(--ds-font-display); letter-spacing: 0; }
.v4-opening-numeral { display: block; margin: 4px 0 0; color: var(--ds-gold-ink); font: 300 104px/1 var(--ds-font-display); letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.v4-opening-section { margin: 8px 0 0; color: var(--ds-ink); font: italic 500 22px/1.3 var(--ds-font-display); }
.v4-opening-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 12px; margin-top: 4px; }
.v4-opening-meta .v4-link { font-size: 13.5px; font-weight: 600; }

.v4-scripture {
  position: relative; max-width: 720px; margin: 0 auto; color: var(--ds-ink);
  font: 400 var(--v4-reader-size, 19px)/1.68 var(--ds-font-scripture); letter-spacing: 0;
  text-align: justify; -webkit-hyphens: auto; hyphens: auto; hanging-punctuation: first; overflow-wrap: break-word;
}
/* A #vN link lands the verse below the sticky reader bar (60px + 1px border),
   plus 16px of air. This adds to the html scroll-padding-top that already clears
   the 76px desktop header. */
.v4-scripture [id^="v"] { scroll-margin-top: calc(61px + 16px); }
.v4-scripture p { margin: 0 0 1em; }
.v4-scripture .v2-blk-q, .v4-scripture .v2-blk-qr, .v4-scripture .v2-blk-pc { text-align: left; -webkit-hyphens: manual; hyphens: manual; }
.v4-scripture .v2-blk-qr { text-align: right; }
.v4-scripture .v2-blk-pc { text-align: center; }
.v4-scripture .v2-blk-heading { margin: 1.6em 0 0.6em; color: var(--ds-ink); font: italic 500 0.95em/1.3 var(--ds-font-display); text-align: left; }
.v4-scripture .v2-vnum {
  margin-right: 4px; color: var(--ds-gold-ink); font: 700 12.5px/0 var(--ds-font-interface); font-variant-numeric: oldstyle-nums; letter-spacing: 0; vertical-align: 0.5em;
}
.v4-scripture .v2-verse[data-noted="true"] .v2-vnum { color: var(--ds-green); text-decoration: underline; }
/* The opening: a drop cap and a small-caps first line. The chapter numeral above
   stands in for the first verse's number, as in a printed Bible. An opening
   quotation mark hangs with the capital. */
.v4-scripture > p:first-of-type:not(.v2-blk-q)::first-letter {
  float: left; margin: 0.04em 0.08em 0 0; color: var(--ds-gold-ink); font: 600 3.7em/0.8 var(--ds-font-display);
}
.v4-scripture > p:first-of-type:not(.v2-blk-q)::first-line { font-variant-caps: small-caps; letter-spacing: 0.04em; }
.v4-scripture > p:first-of-type:not(.v2-blk-q) > .v2-verse:first-child .v2-vnum { display: none; }
.v4-scripture .v2-verse { cursor: pointer; border-radius: 3px; }
.v4-scripture .v2-verse[data-selected="true"] { text-decoration: none; background: color-mix(in srgb, var(--ds-gold) 24%, transparent); }
.v4-scripture .v2-verse[data-highlighted="true"] .v2-verse-text { background-image: none; }
.v4-scripture .v2-verse[data-hl] .v2-verse-text { background-color: var(--v4-hl); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
[data-hl="gold"] { --v4-hl: color-mix(in srgb, #E9A93A 40%, transparent); --v4-hl-solid: #E9A93A; }
[data-hl="rose"] { --v4-hl: color-mix(in srgb, #D9637A 32%, transparent); --v4-hl-solid: #E58FA0; }
[data-hl="sky"] { --v4-hl: color-mix(in srgb, #4F9BD9 32%, transparent); --v4-hl-solid: #86BBE8; }
[data-hl="leaf"] { --v4-hl: color-mix(in srgb, #4FA36B 34%, transparent); --v4-hl-solid: #86C79B; }
/* Today's verse: a gold rule in the margin beside the reading, and a gold
   underline on the verse it opens with. */
.v4-today-rule { position: absolute; left: -12px; width: 3px; border-radius: 3px; background: var(--ds-gline); pointer-events: none; }
.v4-scripture .v2-verse[data-today-verse] .v2-verse-text {
  text-decoration: underline; text-decoration-color: var(--ds-gline); text-decoration-thickness: 2px; text-underline-offset: 0.22em;
}
.v4-reader .v2-chapter-guide { max-width: 720px; margin: 32px auto 0; }
.v4-reader-done { max-width: 720px; margin: 40px auto 0; }
.v4-reader-nav { max-width: 720px; margin: 24px auto 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.v4-reader-nav .v4-btn svg { width: 20px; height: 20px; flex: none; }
.v4-reader-attrib { max-width: 720px; margin: 24px auto 0; }
/* The text fades out above the dock and the tab bar, so no verse sits under them. */
.v4-reader-fade {
  position: fixed; left: 0; right: 0; bottom: var(--v4-reader-foot); z-index: 4; height: calc(var(--v4-reader-dock) + 72px); pointer-events: none;
  background: linear-gradient(to bottom, transparent 0, var(--ds-ground) 72px);
}
.v4-reader-dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--v4-reader-foot) + 12px); z-index: 5; min-height: 60px; padding: 8px 8px 8px 16px;
  display: flex; align-items: center; border: 1px solid var(--ds-gline); border-radius: var(--ds-radius-card); background: var(--ds-surface); box-shadow: var(--ds-shadow);
}
.v4-reader-dock p { flex: 1; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ds-ink); font: 550 14px/1.35 var(--ds-font-interface); }
.v4-reader-dock .v4-link { flex: none; gap: 2px; padding: 0 8px; font-size: 15px; }
.v4-reader-dock .v4-link svg { width: 18px; height: 18px; }
/* Philip's docked panel sits beside the text, never over it: the page moves left to make room. */
@media (min-width: 900px) {
  html[data-ui="v4"] body:has(.v4-philip-panel:not([hidden])) .v4-reader { margin-right: 444px; }
  html[data-ui="v4"] body:has(.v4-philip-panel:not([hidden])) .v4-reader-dock { left: calc((100vw - 444px) / 2); width: min(720px, calc(100vw - 444px - 48px)); }
  html[data-ui="v4"] body:has(.v4-philip-panel:not([hidden])) :is(.v4-reader-fade, .v4-listen-controls) { right: 444px; }
}
@media (min-width: 900px) { .v4-reader-dock { left: 50%; right: auto; width: min(720px, calc(100vw - 48px)); transform: translateX(-50%); bottom: 12px; } }

/* The verse sheet */
.v4-vsheet { display: grid; gap: 16px; color: var(--ds-ink); font-family: var(--ds-font-interface); letter-spacing: normal; text-align: left; }
.v4-vsheet-verse { margin: 0; padding: 0; border: 0; max-height: 9em; overflow: auto; color: var(--ds-ink); font: 400 19px/1.5 var(--ds-font-scripture); font-style: normal; quotes: none; }
.v4-swatches { display: flex; gap: 12px; }
.v4-swatch { width: 48px; height: 48px; margin: 0; padding: 0; display: grid; place-items: center; border: 2px solid var(--ds-line); border-radius: 50%; background: var(--v4-hl-solid); color: #14110D; cursor: pointer; }
.v4-swatch[aria-pressed="true"] { border-color: var(--ds-ink); }
.v4-swatch svg { width: 22px; height: 22px; }
.v4-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.v4-tiles li { margin: 0; padding: 0; }
.v4-tile {
  width: 100%; min-height: 76px; margin: 0; padding: 8px 4px; display: grid; justify-items: center; align-content: center; gap: 6px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-radius-card); background: var(--ds-raised); color: var(--ds-ink); font: 600 14px/1.2 var(--ds-font-interface); cursor: pointer;
}
.v4-tile svg { width: 22px; height: 22px; }
.v4-philip-chip {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 12px;
  border: 1px solid var(--ds-gline); border-radius: 999px; background: var(--ds-surface); color: var(--ds-ink); text-decoration: none; font: 600 15px/1.2 var(--ds-font-interface);
}
.v4-philip-chip svg { flex: none; width: 20px; height: 24px; }
.v4-vsheet-form { display: grid; gap: 12px; justify-items: start; }
.v4-vsheet-label { color: var(--ds-ink); font: 650 16px/1.45 var(--ds-font-interface); }
.v4-textarea { width: 100%; min-height: 120px; margin: 0; padding: 12px; border: 1px solid var(--ds-ink-3); border-radius: var(--ds-radius-button); background: var(--ds-surface); color: var(--ds-ink); font: 400 17px/1.5 var(--ds-font-interface); resize: vertical; }
.v4-btn:disabled { opacity: 0.5; cursor: default; }
.v4-vsheet-status:empty { display: none; }

/* Listen (?listen=1). With Large or Larger text it is Listen large. */
.v4-listen { max-width: 720px; margin: 0 auto; padding-top: 24px; }
.v4-listen-head { display: grid; gap: 4px; }
.v4-listen-title { margin: 0; color: var(--ds-ink); font: 600 24px/1.2 var(--ds-font-display); letter-spacing: 0; }
.v4-listen-text { margin-top: 24px; color: var(--ds-ink-2); font: 400 var(--v4-reader-size, 19px)/1.6 var(--ds-font-scripture); letter-spacing: 0; }
.v4-listen[data-large] .v4-listen-text { font-size: 28px; line-height: 1.5; }
.v4-listen[data-large] .v4-listen-title { font-size: 30px; }
.v4-listen-verse { margin: 0 0 0.8em; border-radius: 6px; }
.v4-listen-verse[data-current] { color: var(--ds-ink); }
.v4-listen-verse[data-verse-level] { background: color-mix(in srgb, var(--ds-gold) 22%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ds-gold) 22%, transparent); }
.v4-listen-verse span[data-read] { color: var(--ds-gold-ink); }
.v4-listen-vnum {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; margin: 0 2px 0 -8px; padding: 0; vertical-align: middle;
  border: 0; border-radius: var(--ds-radius-button); background: transparent; color: var(--ds-gold-ink); font: 700 14px/1 var(--ds-font-interface); cursor: pointer;
}
.v4-listen-controls {
  position: fixed; left: 0; right: 0; bottom: var(--v4-reader-foot); z-index: 5; padding: 12px 16px; display: grid; justify-items: center; gap: 10px;
  background: var(--v4-bar); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--ds-line);
}
.v4-listen-row { display: flex; align-items: center; justify-content: center; gap: 20px; }
.v4-listen-play { width: 72px; height: 72px; margin: 0; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ds-gold); color: var(--c-lamp-ink); cursor: pointer; }
.v4-listen-play svg { width: 32px; height: 32px; }
.v4-listen[data-large] .v4-listen-play { width: 112px; height: 112px; }
.v4-listen[data-large] .v4-listen-play svg { width: 48px; height: 48px; }
.v4-listen-side {
  min-width: 72px; min-height: 64px; margin: 0; padding: 6px 10px; display: grid; justify-items: center; align-content: center; gap: 2px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-radius-button); background: var(--ds-surface); color: var(--ds-ink); font: 700 18px/1.1 var(--ds-font-interface); cursor: pointer;
}
.v4-listen-side small { color: var(--ds-ink-2); font: 550 12.5px/1.2 var(--ds-font-interface); }
.v4-listen-chip { min-height: 44px; margin: 0; padding: 0 16px; border: 1px solid var(--ds-ink-3); border-radius: 999px; background: transparent; color: var(--ds-ink); font: 600 14px/1.2 var(--ds-font-interface); cursor: pointer; }
.v4-listen-chip[aria-pressed="true"] { border-color: var(--ds-gline); background: var(--ds-raised); box-shadow: inset 0 0 0 1px var(--ds-gline); }
.v4-listen :disabled { opacity: 0.5; cursor: default; }

/* The Way (/bible): an illuminated map, vellum by day and lapis by night.
   These page rules are for the screen itself (main.v4-way). Today's "Your way"
   card is an aside with the same class; it must not take the page's full-height
   box or its two-column grid, which pushed "Today's light" off the card. */
main.v4-way {
  width: 100%; max-width: 760px; min-height: 100dvh; margin: 0 auto; padding: 32px var(--v4-gutter) calc(84px + 48px + env(safe-area-inset-bottom));
  display: grid; align-content: start; gap: 24px; background: var(--ds-ground); color: var(--ds-ink); font-family: var(--ds-font-interface); letter-spacing: normal; text-align: left;
}
.v4-way-head { display: grid; gap: 8px; justify-items: start; }
.v4-way-map { display: block; width: 100%; height: auto; --way-ground: #F1E5C9; --way-edge: #BFA974; --way-road: #A9966A; --way-dim: #5E5546; }
html[data-mode="night"] .v4-way-map { --way-ground: #101B45; --way-edge: #3A4A94; --way-road: #4A5BA6; --way-dim: #B4BEE2; }
.v4-way-vellum { fill: var(--way-ground); stroke: var(--way-edge); stroke-width: 2; }
.v4-way-border { fill: none; stroke: var(--way-edge); stroke-width: 1.5; stroke-dasharray: 2 7; }
.v4-way-road { fill: none; stroke-width: 12; stroke-linecap: round; }
.v4-way-road:not([data-lit]) { stroke: var(--way-road); stroke-width: 8; stroke-dasharray: 1 18; }
.v4-way-region circle:first-child { stroke: #9A5E0E; stroke-width: 2; }
.v4-way-region:not([data-lit]) circle:first-child { fill: var(--way-ground); stroke: var(--way-edge); }
.v4-way-ring { fill: none; stroke: rgba(42, 26, 2, 0.45); stroke-width: 1.5; }
.v4-way-region:not([data-lit]) .v4-way-ring { stroke: var(--way-edge); stroke-dasharray: 2 5; }
.v4-way-initial { fill: #2A1A02; font: 600 44px var(--ds-font-display); }
.v4-way-region:not([data-lit]) .v4-way-initial { fill: var(--way-dim); }
.v4-way-name { fill: var(--ds-ink); font: 600 28px var(--ds-font-display); }
.v4-way-panel { display: grid; gap: 20px; min-width: 0; }
.v4-way-group { display: grid; gap: 4px; }
.v4-way-group h3 { margin: 0; color: var(--ds-ink-3); font: 650 12.5px/1.45 var(--ds-font-interface); letter-spacing: 0.12em; text-transform: uppercase; }
.v4-way-group ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.v4-way-group li { margin: 0; padding: 0; }
.v4-way-group a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--ds-line); color: var(--ds-ink); text-decoration: none; font: 550 16px/1.3 var(--ds-font-interface); }
.v4-way-group a:hover { color: var(--ds-green); }
.v4-way-group a svg { flex: none; width: 18px; height: 18px; color: var(--ds-gline); }
@media (min-width: 900px) {
  main.v4-way { max-width: 1180px; padding: calc(76px + 48px) 24px 64px; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); column-gap: 56px; }
  .v4-way-head { grid-column: 1 / -1; }
  .v4-way-map { position: sticky; top: 100px; align-self: start; }
  .v4-way-group ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.v4-way-mini { display: flex; align-items: center; min-height: 44px; }
.v4-way-mini svg { display: block; width: 100%; max-width: 320px; height: auto; }
.v4-way-mini-road:not([data-lit]) { fill: var(--ds-line); }
.v4-way-mini-dot { stroke: #9A5E0E; stroke-width: 1.5; }
.v4-way-mini-dot:not([data-lit]) { fill: var(--ds-raised); stroke: var(--ds-ink-3); }

@media (prefers-reduced-motion: reduce) {
  .v4-btn { transition-duration: 160ms; }
  .v4-ph-limit { animation: v4-ph-fade 160ms linear; }
}
@keyframes v4-ph-fade { from { opacity: 0; } to { opacity: 1; } }
@media print {
  .v4-header, .v4-tabs, .v4-philip-panel, .v4-skip, .v4-reader-bar, .v4-reader-fade, .v4-reader-dock, .v4-listen-controls { display: none !important; }
}

/* Nothing that is scrolled to or focused lands under the pinned header or the
   phone tab bar (WCAG 2.4.11, focus not obscured). */
html[data-ui="v4"] { scroll-padding-bottom: calc(84px + 16px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { html[data-ui="v4"] { scroll-padding-top: calc(76px + 16px); scroll-padding-bottom: 16px; } }

/* ---- v4 03: Today (Living Dawn, Gathering Light), the session, Finish and Share ---- */
.v4-today *, .v4-session *, .v4-sheet * { box-sizing: border-box; }
:is(.v4-today, .v4-session, .v4-sheet) :focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.v4-hero :focus-visible { outline-color: #FFFFFF; }
.v4-wide { display: none; }
@media (min-width: 900px) { .v4-wide { display: inline; } .v4-phone { display: none; } }
.v4-btn:disabled { opacity: 0.6; cursor: default; }
.v4-btn svg { flex: none; width: 20px; height: 20px; }
.v4-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.v4-field { display: grid; gap: 8px; color: var(--ds-ink); font: 650 16px/1.45 var(--ds-font-interface); }
.v4-input {
  width: 100%; min-height: 52px; margin: 0; padding: 0 16px; border: 1px solid var(--ds-ink-3); border-radius: var(--ds-radius-button);
  background: var(--ds-surface); color: var(--ds-ink); font: 400 17px/1.45 var(--ds-font-interface);
}
.v4-input::placeholder { color: var(--ds-ink-3); opacity: 1; }
.v4-textarea { min-height: 148px; padding: 14px 16px; resize: vertical; }
.v4-inline-link { color: var(--ds-green); text-decoration: underline; }

/* The sky. Its colors are the dayspring sky tokens, set on the SVG itself. */
.v4-sky { position: absolute; inset: 0; overflow: hidden; background: var(--ds-sky-1); }
.v4-sky-air { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.v4-sky-clouds { position: absolute; left: 0; top: 4%; display: block; max-width: none; animation: v4-drift 720s linear infinite; }
/* 1440px in 720s: clouds drift 2px a second. */
@keyframes v4-drift { to { transform: translateX(-1440px); } }
.v4-sky[data-still] .v4-sky-clouds { animation: none; }

/* Today on a phone: the hero, then Your way. */
.v4-today {
  min-height: 100dvh; padding-bottom: calc(84px + 32px + env(safe-area-inset-bottom));
  background: var(--ds-ground); color: var(--ds-ink); font-family: var(--ds-font-interface); letter-spacing: normal; text-align: left;
}
html[data-ui="v4"] body:has(.v4-today) { padding-top: 0; padding-bottom: 0; background: var(--ds-ground); }
.v4-today-grid { position: relative; }
.v4-hero { position: relative; isolation: isolate; min-height: 428px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; color: #FFFFFF; }
.v4-today[data-hero="first"] .v4-hero { min-height: 486px; }
.v4-today[data-hero="large"] .v4-hero { min-height: 340px; }
/* White text sits over a scrim that reaches full strength before the first line. */
.v4-hero-inner {
  position: relative; z-index: 1; display: grid; gap: 20px; padding: 72px var(--v4-gutter) 24px;
  background: linear-gradient(to bottom, rgba(6, 9, 18, 0) 0, rgba(6, 9, 18, 0.62) 64px);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.v4-hero-text { display: grid; gap: 12px; min-width: 0; }
.v4-hero-overline { margin: 0; color: #FFFFFF; font: 650 12.5px/1.45 var(--ds-font-interface); letter-spacing: 0.12em; text-transform: uppercase; }
.v4-hero-title { margin: 0; color: #FFFFFF; font: 600 46px/1 var(--ds-font-display); letter-spacing: -1.6px; }
.v4-hero-title em { font-style: italic; font-weight: 500; color: #F7CF7E; }
.v4-hero-verse { margin: 0; display: grid; gap: 8px; }
.v4-hero-verse blockquote { margin: 0; padding: 0; border: 0; color: #FFFFFF; font: 400 19.5px/1.42 var(--ds-font-scripture); font-style: normal; quotes: none; }
.v4-hero-verse figcaption { color: #FFFFFF; font: 550 13.5px/1.45 var(--ds-font-interface); }
html[data-text="large"] .v4-hero-verse blockquote { font-size: 21px; }
html[data-text="larger"] .v4-hero-verse blockquote { font-size: 25px; }
.v4-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.v4-today[data-state="first"] .v4-hero-begin { flex-basis: 100%; }
/* Until the page's scripts have read this device, the server sends the new
   reader's Today to anyone it cannot tell from one (data-guess), so a first
   visit is laid out once. A returning reader is marked before first paint
   (html[data-returning], lib/v2/returning.ts) and keeps the everyday layout. */
.v4-guess-back { display: none; }
html[data-returning] .v4-today[data-guess] .v4-guess-new,
html[data-returning] .v4-today[data-guess] .v4-first-start,
html[data-returning] .v4-today[data-guess] .v4-pane-order { display: none; }
html[data-returning] .v4-today[data-guess] .v4-guess-back { display: contents; }
html[data-returning] .v4-today[data-guess] .v4-hero-begin { flex-basis: auto; }
@media not all and (min-width: 900px) {
  html[data-returning] .v4-today[data-guess] .v4-hero { min-height: 428px; }
}
.v4-hero-actions .v4-btn { text-shadow: none; padding: 0 16px; }
.v4-hero-begin { flex: 1 1 auto; min-width: 0; }
.v4-btn[data-kind="sky"] { border-color: rgba(255, 255, 255, 0.72); background: rgba(255, 255, 255, 0.1); color: #FFFFFF; }
.v4-hero-share { flex: none; width: 52px; padding: 0; }
.v4-hero-anywhere { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: #FFFFFF; font: 650 16px/1.45 var(--ds-font-interface); text-decoration: underline; text-underline-offset: 3px; }
.v4-stage-area { display: none; }

.v4-today .v4-way { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; padding: 24px var(--v4-gutter) 0; }
.v4-way-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v4-way-light { display: grid; gap: 12px; }
.v4-way h3.v4-overline { margin: 0; }
.v4-way-slot:empty { display: none; }
.v4-first-start, .v4-week { color: var(--ds-ink); font-weight: 600; }
.v4-month { display: grid; gap: 12px; }
.v4-facts { margin: 0; display: grid; gap: 8px; }
.v4-facts div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
.v4-facts dt { margin: 0; color: var(--ds-ink-3); font: 650 13.5px/1.45 var(--ds-font-interface); }
.v4-facts dd { margin: 0; color: var(--ds-ink); font: 400 15px/1.45 var(--ds-font-interface); }
/* The recap "Your window" card: plain counts, read-only. */
.v4-window { display: grid; gap: 12px; }
.v4-window-period { margin: 0; color: var(--ds-ink-3); }
.v4-window-empty { margin: 0; }
.v4-window-facts { margin: 0; display: grid; gap: 8px; }
.v4-window-facts div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; }
.v4-window-facts dt { margin: 0; color: var(--ds-ink-3); font: 650 13.5px/1.45 var(--ds-font-interface); }
.v4-window-facts dd { margin: 0; color: var(--ds-ink); font: 650 17px/1.45 var(--ds-font-interface); font-variant-numeric: tabular-nums; }
.v4-way-rows .v4-row > svg:first-child { color: var(--ds-gline); width: 24px; height: 24px; }
.v4-today-more { padding: 8px var(--v4-gutter) 0; }

/* Today's light: three lancet panes. Gold rises from the sill. */
.v4-light { display: grid; gap: 12px; }
.v4-panes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v4-pane { margin: 0; padding: 0; display: grid; justify-items: center; gap: 8px; }
.v4-pane-glass { display: block; width: 64px; height: 77px; overflow: visible; transition: filter var(--ds-dur-slow) var(--ds-ease-out); }
.v4-pane-fill { transition: transform var(--ds-dur-settle) var(--ds-ease-arrive); }
.v4-pane-glint { opacity: 0; transform: skewX(-18deg); animation: v4-glint 400ms var(--ds-ease-out) both; }
@keyframes v4-glint { 0% { opacity: 0; transform: translateX(0) skewX(-18deg); } 20% { opacity: 0.85; } 100% { opacity: 0; transform: translateX(64px) skewX(-18deg); } }
.v4-pane-label { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ds-ink-2); font: 600 14px/1.3 var(--ds-font-interface); }
.v4-pane[data-lit] .v4-pane-label { color: var(--ds-ink); }
.v4-pane-order { color: var(--ds-ink-3); font: 650 12.5px/1.3 var(--ds-font-interface); letter-spacing: 0.08em; }
.v4-light[data-glow] .v4-pane-glass { filter: drop-shadow(0 0 12px var(--ds-lancet-gold-2)); }
.v4-light[data-compact] .v4-panes { display: flex; gap: 6px; }
.v4-light[data-compact] .v4-pane-glass { width: 24px; height: 29px; }
.v4-light[data-compact] .v4-pane-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Today on a wide screen: the hero and its stage on the left, Your way on the right. */
@media (min-width: 900px) {
  .v4-today { padding-bottom: 64px; }
  .v4-today-grid {
    display: grid; grid-template-columns: minmax(0, 836fr) minmax(0, 444fr); gap: 32px; align-items: start;
    padding: calc(76px + 48px) max(var(--v4-gutter), calc((100% - 1312px) / 2)) 64px;
  }
  .v4-hero, .v4-today[data-hero] .v4-hero { position: static; isolation: auto; min-height: 0; display: block; overflow: visible; }
  /* The sky spans both columns, under one even scrim, so the header and the
     left column read in white over any sky. The stage shows it undimmed. */
  .v4-hero-sky::after { content: ""; position: absolute; inset: 0; background: rgba(6, 9, 18, 0.62); }
  .v4-hero-inner { padding: 0; gap: 32px; background: none; }
  .v4-hero-text { gap: 24px; }
  .v4-hero-overline { display: flex; align-items: center; gap: 16px; }
  .v4-hero-overline::before { content: ""; flex: none; width: 48px; height: 2px; background: #F7CF7E; }
  .v4-hero-title { font-size: 92px; line-height: 0.98; letter-spacing: -3px; }
  .v4-hero-verse blockquote { font-size: 24px; line-height: 1.5; max-width: 36em; }
  html[data-text="large"] .v4-hero-verse blockquote { font-size: 26px; }
  html[data-text="larger"] .v4-hero-verse blockquote { font-size: 30px; }
  .v4-hero-actions { gap: 12px; flex-wrap: wrap; }
  .v4-hero-actions .v4-btn { padding: 0 24px; }
  .v4-hero-begin { flex: none; }
  .v4-hero-share { width: auto; }
  .v4-stage-area { display: grid; gap: 16px; text-shadow: none; }
  .v4-stage-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
  .v4-stage-tab {
    display: grid; gap: 2px; align-content: center; min-height: 64px; margin: 0 0 -1px; padding: 8px 12px 10px; border: 0; border-bottom: 3px solid transparent;
    background: transparent; color: #FFFFFF; text-align: left; cursor: pointer;
  }
  .v4-stage-tab strong { font: 650 16px/1.3 var(--ds-font-interface); }
  .v4-stage-tab small { font: 550 13.5px/1.4 var(--ds-font-interface); }
  .v4-stage-tab[aria-selected="true"] { border-bottom-color: #F7CF7E; }
  .v4-stage {
    position: relative; width: 100%; max-width: 836px; aspect-ratio: 836 / 340; overflow: hidden; border-radius: var(--ds-radius-sheet);
    border: 1px solid rgba(255, 255, 255, 0.4); background: #060912; color: #FFFFFF;
  }
  .v4-stage-film { display: block; width: 100%; height: 100%; object-fit: cover; }
  .v4-stage-words { margin: 0; height: 100%; padding: 28px 32px; overflow: auto; color: #C3C9D6; font: 400 22px/1.5 var(--ds-font-scripture); }
  .v4-stage-words span[data-lit] { color: #F7CF7E; }
  .v4-stage-share { height: 100%; padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .v4-stage-share .v4-share-card { max-height: 100%; overflow: hidden; }
  .v4-today .v4-way {
    padding: 24px; border: var(--ds-edge); border-radius: var(--ds-radius-sheet); background: var(--ds-surface); box-shadow: var(--ds-shadow);
  }
  .v4-way-title { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
  .v4-way .v4-rows, .v4-way .v4-card { box-shadow: none; border: 1px solid var(--ds-line); }
  .v4-today-more { max-width: 1440px; margin: 0 auto; padding: 16px max(var(--v4-gutter), calc((100% - 1312px) / 2)) 0; }
}

/* The session: Read, Reflect, Pray, Finish. */
.v4-session-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.v4-session .v4-display { font-size: 40px; letter-spacing: -1.2px; }
.v4-session .v4-question { font-size: 30px; line-height: 1.15; letter-spacing: -0.6px; }
.v4-note { display: grid; gap: 4px; padding: 16px; border-radius: var(--ds-radius-panel); background: var(--ds-raised); }
.v4-passage { display: grid; gap: 12px; }
.v4-passage p:first-child { margin: 0; color: var(--ds-ink); font: 400 var(--scripture-size, 19px)/1.68 var(--ds-font-scripture); }
.v4-passage sup { margin-right: 4px; color: var(--ds-ink-3); font: 650 0.62em/1 var(--ds-font-interface); }
.v4-prayer { margin: 0; color: var(--ds-ink); font: 400 21px/1.5 var(--ds-font-display); }
.v4-prayer-own { padding-left: 16px; border-left: 3px solid var(--ds-gline); }
.v4-tomorrow { color: var(--ds-ink-2); }
.v4-finish-slot:empty { display: none; }
.v4-toast { position: fixed; left: 0; right: 0; bottom: calc(84px + 16px + env(safe-area-inset-bottom)); z-index: var(--layer-toast, 60); display: grid; justify-items: center; pointer-events: none; }
.v4-toast p {
  margin: 0; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 20px; border-radius: var(--ds-radius-button);
  background: var(--ds-ink); color: var(--ds-ground); font: 650 16px/1.45 var(--ds-font-interface); pointer-events: auto;
}
.v4-toast .v4-link { padding: 0 12px; color: var(--ds-ground); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) {
  .v4-session .v4-display { font-size: 56px; letter-spacing: -2px; }
  .v4-session .v4-question { font-size: 40px; letter-spacing: -1px; }
  .v4-toast { bottom: 32px; }
}

/* The share composer: a sheet from the bottom on a phone, a panel on a wide screen. */
.v4-sheet {
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 0; border: 0; border-radius: var(--ds-radius-sheet) var(--ds-radius-sheet) 0 0;
  background: var(--ds-surface); color: var(--ds-ink); font-family: var(--ds-font-interface); letter-spacing: normal; text-align: left; overflow: auto;
}
.v4-sheet::backdrop { background: rgba(6, 9, 18, 0.62); }
.v4-sheet-body { display: grid; gap: 16px; padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
.v4-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.v4-share-stage { display: grid; place-items: center; padding: 16px 12px; overflow: hidden; }
.v4-share-card {
  width: 100%; max-width: 400px; margin: 0; padding: 24px; display: grid; gap: 12px; border-radius: var(--ds-radius-card);
  box-shadow: 0 16px 32px -16px rgba(20, 17, 13, 0.5); text-shadow: none;
}
.v4-share-card[data-style="plain"], .v4-share-card[data-style="vellum"] { border: 1px solid var(--ds-line); }
.v4-share-card blockquote { margin: 0; padding: 0; border: 0; color: inherit; font: 400 19px/1.42 var(--ds-font-scripture); font-style: normal; quotes: none; }
.v4-share-card figcaption { color: var(--v4-share-accent); font: 650 13.5px/1.45 var(--ds-font-interface); }
.v4-share-line, .v4-share-name { margin: 0; color: inherit; font: 400 15px/1.45 var(--ds-font-interface); }
.v4-share-name { font-weight: 650; }
.v4-toggles { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.v4-toggles li { margin: 0; padding: 0; display: grid; gap: 8px; }
.v4-toggle { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0; color: var(--ds-ink); font: 600 16px/1.45 var(--ds-font-interface); cursor: pointer; }
.v4-toggle input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ds-green); }
.v4-toggle small { margin-left: auto; color: var(--ds-ink-3); font: 550 13.5px/1.45 var(--ds-font-interface); }
.v4-share-actions { display: grid; gap: 8px; }
.v4-share-foot { color: var(--ds-ink-2); }
@media (min-width: 900px) {
  .v4-sheet { width: 560px; margin: auto; border-radius: var(--ds-radius-sheet); border: var(--ds-edge); }
  .v4-sheet-body { padding: 24px; }
  .v4-share-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .v4-sky-clouds { animation: none; }
  .v4-pane-fill, .v4-pane-glass { transition-duration: 160ms; }
  .v4-pane-glint { animation: none; }
}

/* v4.1 hooks. Each is behind its own flag, and every flag is off. */
.v4-rows button.v4-row { width: 100%; margin: 0; border: 0; border-radius: 0; background: none; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.v4-rows button.v4-row:hover { background: var(--ds-raised); }
.v4-rows button.v4-row:focus-visible { outline: 2px solid var(--c-focus); outline-offset: -2px; }
.v4-toast p[data-plain] { min-height: 48px; padding: 0 20px; }
.v4-share-kinds { display: flex; gap: 4px; padding: 4px; border-radius: var(--ds-radius-button); background: var(--ds-raised); overflow-x: auto; }
.v4-share-kind {
  flex: 1 0 auto; min-height: 44px; margin: 0; padding: 0 12px; border: 0; border-radius: calc(var(--ds-radius-button) - 4px); background: none;
  color: var(--ds-ink-2); font: 650 14px/1.2 var(--ds-font-interface); letter-spacing: normal; white-space: nowrap; cursor: pointer;
}
.v4-share-kind[aria-selected="true"] { background: var(--ds-surface); color: var(--ds-ink); box-shadow: inset 0 0 0 2px var(--ds-gline); }
.v4-share-kind:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.v4-share-more { display: none; }
.v4-post-finish-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.v4-post-finish-bar .v4-overline { margin: 0; }
.v4-post-finish-bar .v4-link { min-height: 44px; padding: 0 4px; }
.v4-post-finish-how { margin: 0; }
.v4-post-finish-how .v4-link { display: inline-flex; align-items: center; min-height: 44px; }
.v4-setting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.v4-setting .v4-body { margin: 0; }
.v4-search-form { display: grid; gap: 8px; }
.v4-search-row { display: flex; gap: 8px; }
.v4-search-row .v4-input { flex: 1; min-width: 0; }
.v4-result { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.v4-result-text { color: var(--ds-ink); font: 400 17px/1.5 var(--ds-font-scripture); }
.v4-result-text b { font-weight: 700; color: var(--ds-ink); background: none; }
.v4-trace-save { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.v4-trace-save .v4-meta { margin: 0; }
.v4-trace-start { margin: 0; }
.v4-trace-start .v4-link { display: inline-flex; align-items: center; min-height: 44px; }
.v4-landing .v4-btn { margin-top: 8px; }
@media (min-width: 900px) {
  .v4-share-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .v4-share-actions[data-pair] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* gap-01: one chrome and legal links. The shell footer, the quiet way back on
   screens still in the older frame, and their legal footer in v4 tokens. */
.v4-shell-foot, .v4-welcome-foot { box-sizing: border-box; align-items: center; color: var(--ds-ink-2); font: 550 13.5px/1.45 var(--ds-font-interface); letter-spacing: normal; }
.v4-shell-foot { width: 100%; max-width: 720px; margin: 0 auto; padding: 8px var(--v4-gutter) calc(84px + 24px + env(safe-area-inset-bottom)); }
.v4-shell-foot span { flex: 1 1 100%; }
.v4-shell-foot a, .v4-welcome-foot a { text-decoration: none; }
.v4-shell-foot a:hover, .v4-welcome-foot a:hover { text-decoration: underline; }
.v4-shell-foot a:focus-visible, .v4-crumb a:focus-visible, html[data-ui="v4"] .product-legal-footer a:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: 4px; }
@media (min-width: 900px) { .v4-shell-foot { padding-bottom: 40px; } .v4-shell-foot span { flex: 0 1 auto; margin-right: auto; } }
/* Screens still in the older frame: room for the header, then one quiet way back to the tab. */
@media (min-width: 900px) { html[data-ui="v4"] body:has(.product-route-start) { padding-top: 76px; } }
.v4-crumb { box-sizing: border-box; max-width: var(--page-width, 1240px); margin: 0 auto; padding: 8px var(--page-gutter, var(--size-page-gutter)) 0; }
.v4-crumb .v4-link { gap: 4px; padding: 0; color: var(--ds-ink-2); font: 550 15px/1.45 var(--ds-font-interface); text-decoration: none; }
.v4-crumb .v4-link:hover { text-decoration: underline; }
/* The classic legal footer, in v4 type and colour. */
html[data-ui="v4"] .product-legal-footer { box-sizing: border-box; max-width: var(--page-width, 1240px); margin: 0 auto; gap: 4px 20px; padding-top: 24px; color: var(--ds-ink-2); font: 550 13.5px/1.45 var(--ds-font-interface); letter-spacing: normal; }
html[data-ui="v4"] .product-legal-footer .plain-button { min-height: 44px; padding: 0; color: var(--ds-ink-2); font: 550 15px/1.45 var(--ds-font-interface); text-decoration: none; }
html[data-ui="v4"] .product-legal-footer .plain-button:hover { text-decoration: underline; }
html[data-ui="v4"] .product-legal-footer span { flex: 1 1 100%; }
@media (min-width: 900px) { html[data-ui="v4"] .product-legal-footer span { flex: 0 1 auto; margin-right: auto; } }
@media print { .v4-shell-foot, .v4-crumb { display: none !important; } }
