/* Where to go after signing in (app-chooser.js, 20 November 2026). Carried byte for byte by every Doctorpedia app.
   The row sits in the sign-in form in the form's own ink; the dialog takes the colours of the page it opens over (the script
   sets --dpch-ink and --dpch-surface), so the same file is right in BiteSized, Ask Doctorpedia, Dose and One, light or dark.
   Monochrome: the marks in the ink, large; the one chosen carries a ring and a tick. Option rows are rounded rectangles, the
   one button word is a pill. It arrives with a fade and a short rise (220 ms), leaves softer; under reduced motion it only
   fades. Nothing turns, nothing follows the pointer. */

/* ── the row in the form ── */
.dpch { display: grid; gap: 8px; margin: 12px 0 4px; }
.dpch[hidden] { display: none; }
.dpch-k { font-size: 13px; line-height: 1.3; color: inherit; opacity: .72; }
.dpch-row {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  width: 100%; min-height: 56px; padding: 10px 10px 10px 14px; margin: 0;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent); border-radius: 16px;
  background: color-mix(in srgb, currentColor 2.5%, transparent); color: inherit; font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition-property: background-color, border-color, scale; transition-duration: .16s; transition-timing-function: cubic-bezier(.2, 0, 0, 1);
}
.dpch-row:hover { background: color-mix(in srgb, currentColor 5%, transparent); border-color: color-mix(in srgb, currentColor 24%, transparent); }
.dpch-row:active { scale: .99; }
.dpch-row:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.dpch-row-mk { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, currentColor 5%, transparent); }
.dpch-row-mk .bsm-ink, .dpch-tile .dpch-mk--ink .bsm-ink, .dpch-going-mk .bsm-ink { fill: currentColor; }
.dpch-row-mk svg, .dpch-tile-mk svg, .dpch-going-mk svg { display: block; overflow: visible; }
.dpch-one circle { fill: currentColor; }
.dpch-one path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.dpch-one--line circle { fill: none; stroke: currentColor; stroke-width: var(--bsm-line, 1.3px); vector-effect: non-scaling-stroke; }
.dpch-one--line path { stroke-width: var(--bsm-line, 1.3px); vector-effect: non-scaling-stroke; }
.dpch-row-t { display: grid; min-width: 0; }
.dpch-row-t b { font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -.005em; }
.dpch-row-c {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 500; background: color-mix(in srgb, currentColor 6%, transparent);
}
.dpch-row.is-new .dpch-row-mk, .dpch-row.is-new .dpch-row-t { animation: dpch-in .24s cubic-bezier(.2, 0, 0, 1) both; }
@keyframes dpch-in { from { opacity: 0; translate: 0 4px; filter: blur(2px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }

/* ── the dialog: a stage. The app in view stands large over the pixel field, its name in the serif and one line; the four sit
      beneath as a quiet row of outlined marks, the chosen one filled. On a phone a sheet from the foot, the four two by two ── */
.dpch-layer {
  --dpch-line: color-mix(in srgb, var(--dpch-ink) 12%, transparent);
  --dpch-soft: color-mix(in srgb, var(--dpch-ink) 4%, var(--dpch-surface));
  --dpch-shadow: 0 0 0 1px color-mix(in srgb, var(--dpch-ink) 6%, transparent), 0 6px 16px -6px rgba(0, 0, 0, .12), 0 32px 72px -20px rgba(0, 0, 0, .28);
  position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 24px;
  color: var(--dpch-ink); -webkit-font-smoothing: antialiased;
}
.dpch-layer.is-dark { --dpch-soft: color-mix(in srgb, var(--dpch-ink) 6%, var(--dpch-surface)); --dpch-shadow: 0 0 0 1px color-mix(in srgb, var(--dpch-ink) 12%, transparent), 0 32px 72px -20px rgba(0, 0, 0, .7); }
.dpch-veil {
  position: absolute; inset: 0; background: color-mix(in srgb, var(--dpch-surface) 64%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .2s ease-out; touch-action: none;
}
.dpch-panel {
  position: relative; width: min(660px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  padding: 30px 30px 26px; border-radius: 28px; background: var(--dpch-surface); box-shadow: var(--dpch-shadow); outline: none;
  opacity: 0; translate: 0 10px; transition: opacity .22s ease-out, translate .22s cubic-bezier(.2, 0, 0, 1);
}
.dpch-layer.is-open .dpch-veil { opacity: 1; }
.dpch-layer.is-open .dpch-panel { opacity: 1; translate: 0 0; }
.dpch-layer.is-leaving .dpch-veil, .dpch-layer.is-leaving .dpch-panel { opacity: 0; translate: 0 4px; transition-duration: .16s; }
.dpch-grip { display: none; }
.dpch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dpch-t {
  margin: 2px 0 24px; font-family: var(--cl-serif, var(--ds-serif, var(--l-serif, "Hedvig Letters Serif", Georgia, serif)));
  font-size: 28px; font-weight: 400; line-height: 1.15; letter-spacing: -.015em; text-wrap: balance;
}
.dpch-x {
  position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -6px 0 0; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; opacity: .7;
  transition-property: background-color, opacity; transition-duration: .15s;
}
.dpch-x::after { content: ""; position: absolute; inset: -4px; }
.dpch-x:hover { background: var(--dpch-soft); opacity: 1; }
.dpch-x:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; opacity: 1; }

/* the stage, over the family's pixel field (still dots of the ink on a 6 px grid, fading from the centre: the only texture) */
.dpch-stage { position: relative; height: 270px; margin-bottom: 14px; border-radius: 22px; background: var(--dpch-soft); overflow: hidden; isolation: isolate; }
.dpch-stage-px {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--dpch-ink) 24%, transparent) .85px, transparent 1.15px);
  background-size: 6px 6px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 34%, #000 0%, rgba(0, 0, 0, .3) 50%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 34%, #000 0%, rgba(0, 0, 0, .3) 50%, transparent 78%);
}
.dpch-st { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 0 24px; text-align: center; opacity: 0; translate: 0 6px; transition: opacity .3s ease-out, translate .3s ease-out; }
.dpch-stage[data-show="ask"] [data-app="ask"], .dpch-stage[data-show="bitesized"] [data-app="bitesized"],
.dpch-stage[data-show="dose"] [data-app="dose"], .dpch-stage[data-show="one"] [data-app="one"] { opacity: 1; translate: 0 0; }
.dpch-st b { font-family: var(--cl-serif, var(--ds-serif, var(--l-serif, "Hedvig Letters Serif", Georgia, serif))); font-size: 28px; font-weight: 400; letter-spacing: -.01em; }
.dpch-st small { font-size: 15px; opacity: .66; }
/* the stage's mark (app-chooser.js loop): its outline; a short light travels once around it; the shape fills; it holds, empties
   again, and the light comes round once more (on a mark of two shapes, one light on each). Chosen, it stays filled. The light is
   the ink itself, so dark on light, white on dark */
.dpch-sm { display: block; width: 72px; height: 72px; margin: 0 0 18px; overflow: visible; }
.dpch-sm-line, .dpch-sm-glow, .dpch-sm-core { fill: none; stroke: var(--dpch-ink); stroke-linecap: round; stroke-linejoin: round; }
.dpch-sm-line { opacity: .42; transition: opacity .45s ease-out; }
.dpch-sm-glow { opacity: 0; stroke-dasharray: 18 82; filter: blur(3px); }
.dpch-sm-core { opacity: 0; stroke-dasharray: 12 88; }
.dpch-sm-fill { fill: var(--dpch-ink); opacity: 0; transition: opacity .45s ease-out; }
.dpch-sm-fill path[stroke] { fill: none; stroke: var(--dpch-ink); }
.dpch-sm, .dpch-sm-fill { color: var(--dpch-ink); }
.dpch-sm.is-full .dpch-sm-fill { opacity: 1; }
.dpch-sm.is-full .dpch-sm-line { opacity: 0; }

/* the four beneath: outlined marks, the chosen one filled (a 280 ms cross-fade) with the ring */
.dpch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dpch-tile {
  position: relative; display: grid; justify-items: center; gap: 10px; padding: 16px 6px 14px; margin: 0;
  border: 1px solid var(--dpch-line); border-radius: 16px; background: var(--dpch-surface);
  color: inherit; font: inherit; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition-property: background-color, border-color, box-shadow, scale, opacity, translate; transition-duration: .16s; transition-timing-function: cubic-bezier(.2, 0, 0, 1);
}
.dpch-layer:not(.is-still) .dpch-tile { opacity: 0; translate: 0 6px; transition-duration: .16s, .16s, .16s, .16s, .24s, .24s; transition-delay: 0s, 0s, 0s, 0s, calc(60ms + var(--i) * 40ms), calc(60ms + var(--i) * 40ms); }
.dpch-layer.is-open .dpch-tile { opacity: 1; translate: 0 0; }
.dpch-layer.is-open .dpch-tile:is(:hover, :active, :focus-visible, [aria-checked="true"]) { transition-delay: 0s; }
.dpch-tile:hover { background: var(--dpch-soft); border-color: color-mix(in srgb, var(--dpch-ink) 22%, transparent); }
.dpch-tile:active { scale: .98; }
.dpch-tile:focus-visible { outline: 2px solid color-mix(in srgb, var(--dpch-ink) 38%, transparent); outline-offset: 3px; }
.dpch-tile[aria-checked="true"] { border-color: var(--dpch-ink); box-shadow: inset 0 0 0 1px var(--dpch-ink); }
.dpch-tile-mk { display: grid; place-items: center; height: 30px; --bsm-line: 1.3px; }
.dpch-mk { grid-area: 1 / 1; display: block; transition: opacity .28s ease-out, filter .28s ease-out, color .16s ease-out; }
.dpch-mk--line { color: color-mix(in srgb, var(--dpch-ink) 58%, transparent); }
.dpch-tile .dpch-mk--line .bsm-ink { fill: none; stroke: currentColor; }
.dpch-tile .dpch-mk--ink .bsm-ink { fill: currentColor; }
.dpch-mk--ink { opacity: 0; filter: blur(3px); }
.dpch-tile:hover .dpch-mk--line { color: color-mix(in srgb, var(--dpch-ink) 82%, transparent); }
.dpch-tile[aria-checked="true"] .dpch-mk--line { opacity: 0; filter: blur(2px); }
.dpch-tile[aria-checked="true"] .dpch-mk--ink { opacity: 1; filter: blur(0); }
.dpch-tile-t b { font-size: 13.5px; font-weight: 500; line-height: 1.25; }
/* the tick of the chosen one, small in the tile's corner; it scales in */
.dpch-tile-tick { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 999px; color: var(--dpch-surface); background: var(--dpch-ink); opacity: 0; scale: .6; transition: opacity .2s ease-out, scale .2s cubic-bezier(.2, 0, 0, 1); }
.dpch-tile-tick svg { width: 10px; height: 10px; }
.dpch-tile[aria-checked="true"] .dpch-tile-tick { opacity: 1; scale: 1; }

/* a phone: a sheet from the foot; the four two by two, so every word stays at 15 px (the family's rule) */
.dpch-layer.is-sheet { place-items: end stretch; padding: 0; }
.dpch-layer.is-sheet .dpch-panel { width: 100%; max-height: calc(100dvh - 24px); padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; translate: 0 24px; }
.dpch-layer.is-sheet.is-open .dpch-panel { translate: 0 0; }
.dpch-layer.is-sheet.is-leaving .dpch-panel { translate: 0 12px; }
.dpch-layer.is-sheet .dpch-grip { display: block; width: 36px; height: 4px; margin: 0 auto 14px; border-radius: 999px; background: var(--dpch-line); }
.dpch-layer.is-sheet .dpch-t { margin-bottom: 18px; font-size: 24px; }
.dpch-layer.is-sheet .dpch-stage { height: 190px; }
.dpch-layer.is-sheet .dpch-st b { font-size: 24px; }
.dpch-layer.is-sheet .dpch-sm { width: 56px; height: 56px; margin-bottom: 12px; }
@media (max-width: 599.98px) {
  .dpch-k, .dpch-row-c { font-size: 15px; }
  .dpch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dpch-tile-t b { font-size: 15px; }
}

/* ── on the way to the other app ── */
.dpch-going {
  position: fixed; inset: 0; z-index: 1510; display: grid; place-items: center; padding: 24px;
  background: var(--dpch-surface); color: var(--dpch-ink); opacity: 0; transition: opacity .2s ease-out; -webkit-font-smoothing: antialiased;
}
.dpch-going.is-open { opacity: 1; }
.dpch-going-in { display: grid; justify-items: center; gap: 10px; text-align: center; translate: 0 8px; transition: translate .24s cubic-bezier(.2, 0, 0, 1); }
.dpch-going.is-open .dpch-going-in { translate: 0 0; }
.dpch-going-mk { margin-bottom: 8px; }
.dpch-going b { font-family: var(--cl-serif, var(--ds-serif, var(--l-serif, "Hedvig Letters Serif", Georgia, serif))); font-size: 26px; font-weight: 400; letter-spacing: -.01em; }
.dpch-going small { font-size: 14px; opacity: .68; }

/* ── less motion: it appears and leaves without moving ── */
.dpch-layer.is-still .dpch-panel, .dpch-layer.is-still .dpch-tile, .dpch-going.is-still .dpch-going-in { translate: none !important; transition-delay: 0s !important; }
.dpch-layer.is-still :is(.dpch-mk, .dpch-st, .dpch-sm-fill, .dpch-sm-line) { transition: none; translate: none; }
@media (prefers-reduced-motion: reduce) {
  .dpch-panel, .dpch-tile, .dpch-going-in { translate: none !important; transition-delay: 0s !important; }
  .dpch-mk, .dpch-st, .dpch-sm-fill, .dpch-sm-line, .dpch-tile-tick { transition: none !important; translate: none !important; }
  .dpch-row.is-new .dpch-row-mk, .dpch-row.is-new .dpch-row-t { animation: none; }
}
html.a11y-reduce-motion .dpch-row.is-new :is(.dpch-row-mk, .dpch-row-t), html[data-motion="reduced"] .dpch-row.is-new :is(.dpch-row-mk, .dpch-row-t) { animation: none; }
