/* Daily Life Doc, round 11 (docs/build/r11/PLAN.md 1 and 2.5; the page "Themes and Documents", Part 9): the
   document read as an article (section headings, Listen at the top) and its quiet live blocks: Breathing and Timer
   (js/docs/doc-breathe.js), Chart (js/docs/doc-chart.js), Quiz (js/docs/doc-quiz.js), Before and after
   (js/docs/doc-compare.js), Ask (js/docs/doc-ask.js), Listen (js/docs/doc-listen.js) and the line "About: <document>"
   over a message in the chat. Tokens and the one type scale of css/base.css only; tinted, never boxed; nothing
   blinks; with reduce motion nothing moves (the block scripts set the end state at once). */

/* ---- The article ---- */
.dk-sec { margin: 10px 0 -6px; font-size: var(--t-l); font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; color: var(--ink); text-wrap: balance; }
.dk-sec:first-of-type { margin-top: 0; }
.doc.dk-doc > .dk-sec + .dk-text h3 { margin-top: 0; }

/* Listen: one quiet row at the top, the round play button with the length. */
.dkl { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: -4px 0 -2px; }
.dkl .vn { flex: 1 1 auto; max-width: 320px; min-height: 40px; }
.dkl .vn-w { min-width: 48px; }
.dkl-w { flex: none; font-size: var(--t-s); font-weight: 600; white-space: nowrap; color: var(--ink); cursor: pointer; padding: 10px 2px; } /* FR2: a tap plays */
.dkl-w.is-fail { font-weight: 500; color: var(--ink2); cursor: default; }
.dkl .quiet.link { min-height: 36px; font-size: var(--t-sm); }

/* ---- A live block: a soft panel, real padding, the block's small heading ---- */
/* Round 12: the Ask block is gone. */
.dk-run, .dk-chart, .dk-quiz, .dk-cmp { padding: 14px 16px 16px; border-radius: 18px; background: var(--soft); }
.dk-run .dk-h, .dk-chart .dk-h, .dk-quiz .dk-h, .dk-cmp .dk-h { margin-bottom: 10px; color: var(--ink); font-size: var(--t-s); }
.dk-run.is-still, .dk-quiz.is-still, .dk-cmp.is-still, .dk-note.is-still { padding-bottom: 12px; }
.dk-run.is-still { justify-items: start; text-align: left; }
.dk-run.is-still .dkr-sub { margin: 0; }

/* Breathing and Timer: the drawing centred, one word with the seconds, Start · Stop. */
.dk-run { display: grid; justify-items: center; text-align: center; }
.dk-run .dk-h { justify-self: start; }
.dkr-face { position: relative; display: grid; place-items: center; width: 152px; height: 152px; margin: 2px 0 6px; }
.dkr-word { margin: 0; min-height: 26px; font-size: var(--t-l); font-weight: 600; line-height: 26px; color: var(--ink); font-variant-numeric: tabular-nums; }
.dkr-word:empty { min-height: 0; }
/* Review RF2 (P3): a finished run reads "Done" with the tick of a done action. */
.dkr-word.is-fin { display: inline-flex; align-items: center; gap: 8px; animation: dkr-fin .3s cubic-bezier(0.23, 1, 0.32, 1); }
.dkr-word.is-fin::before { content: '\2713'; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: var(--t-s); color: #fff; background: var(--done, var(--good)); }
@keyframes dkr-fin { from { opacity: 0; transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) { .dkr-word.is-fin { animation: none; } }
.dkr-sub { margin: 2px 0 12px; font-size: var(--t-sm); line-height: 1.45; color: var(--ink2); font-variant-numeric: tabular-nums; }
.dkr-btns { display: flex; gap: 8px; justify-content: center; }
.dkr-btns .btn { min-width: 112px; }
.dkr-done { margin-top: 10px; font-size: var(--t-xs); color: var(--ink3); }

.dkb-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; }
.dkb-c { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--good-bg), color-mix(in srgb, var(--good) 34%, var(--good-bg))); transform: scale(.55); will-change: transform; }
.dk-breathing.is-on .dkb-c { box-shadow: 0 0 0 6px color-mix(in srgb, var(--good-bg) 55%, transparent); }

.dkt-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.dkt-bg { fill: none; stroke: var(--line); stroke-width: 4; }
.dkt-fg { fill: none; stroke: var(--good); stroke-width: 4; stroke-linecap: round; transition: stroke .3s ease; }
.dk-timer.is-rest .dkt-fg { stroke: var(--ink3); }
.dkt-num { position: relative; font-size: var(--t-xxl); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }

/* ---- Chart ---- */
.dch { display: grid; }
.dch-plot { position: relative; min-height: 18px; }
.dch-svg { display: block; overflow: visible; }
.dch-hit { position: absolute; inset: -6px 0; display: flex; }
.dch-hit button { flex: 1; min-width: 0; border-radius: 6px; }
.dch-hit button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.dch-since { fill: var(--surface); opacity: .7; }
.dch-lvl { stroke: var(--ink3); stroke-width: 1.25; stroke-dasharray: 3 4; opacity: .8; }
.dch-path { fill: none; stroke: var(--ink2); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.dch-pt { fill: var(--surface); stroke: var(--ink); stroke-width: 2; transition: r var(--m-step) var(--ease-out); }
.dch-pt.on { fill: var(--ink); }
.dch-pick { stroke: var(--ink3); stroke-width: 1; opacity: .45; }
.dch-dot { fill: none; stroke: var(--ink3); stroke-width: 1.5; }
.dch-dot.y { fill: var(--good); stroke: var(--good); }
.dch-axis { position: relative; height: 18px; margin-top: 4px; font-size: var(--t-2xs); color: var(--ink3); }
.dch-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.dch-axis span:first-child { transform: none; }
.dch-axis span:last-child:not(:first-child) { transform: translateX(-100%); }
.dch-day { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 22px; margin: 8px 0 0; font-size: var(--t-sm); line-height: 1.45; color: var(--ink2); }
.dch-day b { font-weight: 600; color: var(--ink); }
.dch-day .dch-d { font-weight: 600; color: var(--ink); }
.dch-day i { flex-basis: 100%; font-style: normal; color: var(--ink2); }
.dch-day i::before { content: '“'; } .dch-day i::after { content: '”'; }
.dch-day.dch-in { animation: dd-fade 260ms ease both; }
.dch-avg { margin: 4px 0 0; font-size: var(--t-xs); color: var(--ink3); }

/* ---- Quiz: a question, its answers as quiet rows, the reason after the first tap ---- */
.dkq-list { display: grid; gap: 16px; }
.dkq-q { margin: 0 0 8px; font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.dkq-os { display: grid; gap: 6px; }
.dkq-o { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 14px; border-radius: 13px; background: var(--surface); text-align: left; font-size: var(--t-s); line-height: 1.4; color: var(--ink);
  transition: background-color var(--m-step) ease, color var(--m-step) ease, transform var(--m-press) var(--ease-out); }
.dkq-o:not([disabled]):active { transform: scale(.985); }
.dkq-o span { flex: 1; }
.dkq-o i { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--good); color: #fff; }
.dkq-o i svg { width: 12px; height: 12px; }
.dkq-o[disabled] { cursor: default; }
.dkq-o.right { background: var(--good-bg); }
.dkq-o.wrong { background: var(--bad-bg); }
.dkq-why { margin-top: 8px; padding: 0 2px; }
.dkq-why b { font-size: var(--t-sm); font-weight: 600; }
.dkq-why b.ok { color: var(--good-d); }
.dkq-why b.no { color: var(--bad-d); }
.dkq-why p { margin: 2px 0 0; font-size: var(--t-sm); line-height: 1.5; color: var(--ink); }
.dkq-why small { display: block; margin-top: 4px; font-size: var(--t-xs); color: var(--ink3); }
.dkq-score { display: block; margin-top: 12px; font-size: var(--t-xs); color: var(--ink2); }
.dk-quiz.is-still .dkq-why { margin-top: 6px; }

/* ---- Before and after: the later photo below, the earlier clipped over it from the left, one slider ---- */
.dkc-box { --at: 50%; position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface); }
.dkc-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 320ms ease; }
.dkc-box img.in { opacity: 1; }
.dkc-a { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--at)) 0 0); }
.dkc-bar { position: absolute; top: 0; bottom: 0; left: var(--at); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); pointer-events: none; }
.dkc-bar::after { content: ''; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.dkc-in { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.dkc-days { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: var(--t-xs); color: var(--ink2); font-variant-numeric: tabular-nums; }
.dk-cmp.is-one .dkc-a, .dk-cmp.is-one .dkc-bar { display: none; }

/* ---- Quiz: the score of a finished try, the earlier tries, Take again (round 12, zone DP) ---- */
.dkq-foot { display: grid; justify-items: start; gap: 10px; margin-top: 16px; }
.dkq-foot[hidden] { display: none; }
.dkq-res { margin: 0; display: grid; gap: 2px; }
.dkq-res b { font-size: var(--t-m); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.dkq-res small { font-size: var(--t-xs); line-height: 1.45; color: var(--ink2); font-variant-numeric: tabular-nums; }
.dkq-res .nw { white-space: nowrap; }
.dkq-foot .dkq-score { margin-top: 0; }
.dk-quiz .dkq-again { background: var(--surface); color: var(--ink); }

/* ---- Note: a few lines in the patient's own words; a tinted field with no border (round 12, zone DP) ---- */
.dk-note { padding: 14px 16px 16px; border-radius: 18px; background: var(--soft); }
.dk-note .dk-h { margin-bottom: 10px; color: var(--ink); font-size: var(--t-s); }
.dkn-ta { display: block; width: 100%; min-height: 84px; max-height: 320px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--surface); resize: none; font: inherit; font-size: 15px; line-height: 1.5; color: var(--ink); }
.dkn-ta:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink3); }
.dkn-read { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.dkn-read.is-empty { font-size: var(--t-sm); color: var(--ink3); }
.dkn-day { display: block; margin-top: 6px; }

/* ---- The chat: "About: Pelvic tilts" over a message sent with Ask about this (js/docs/doc-about.js) ---- */
.rc-about { margin: -2px 12px 4px; font-size: var(--t-xs); font-weight: 500; color: var(--ink3); cursor: pointer; }
.rc-m.me .rc-about { text-align: right; }

@media (prefers-reduced-motion: reduce) {
  .dkq-o, .dkc-box img, .dkt-fg, .dch-pt { transition: none; }
  .dch-day.dch-in { animation: none; }
}

/* DF2 (DESIGN-1 20): a block that opens a section with a heading does not repeat its own label under it ("Check",
   then "Quiz"); the section's heading already names it. A second block of the section keeps its label. */
.dk-doc > .dk-sec + .dk > .dk-h:first-child { display: none; }
