/* Existing response composition, with only sequence navigation and source details. */
#answer.tap-reading{background:transparent;}
body.tap-reading-pointer:has(#answer.tap-reading){cursor:pointer;}
.tap-encounter{width:100%;min-width:0;margin:auto;}
#answer .tap-encounter .text-work :is(h1,h2,h3,h4,h5,h6,p,blockquote,ul,ol){font:inherit;letter-spacing:inherit;margin:0;}
#answer .tap-encounter .text-work>*+*{margin-top:1.5em;}
#answer .tap-encounter .text-work blockquote{margin-inline:0;}
#answer .tap-encounter .text-work :is(ul,ol){padding-left:1.2em;}
#answer .tap-encounter .text-work li+li{margin-top:.6em;}
#answer .tap-encounter .text-work a{color:inherit;text-decoration:none;}
#answer .tap-encounter .text-work sup{font-size:.65em;line-height:0;}
#answer .tap-encounter .text-work sup a{min-height:0;}
.tap-reading-sources,.tap-image-credit{width:min(440px,86vw);margin:0 auto;font-size:11px;line-height:1.65;text-align:left;text-transform:none;font-weight:400;}
.tap-reading-sources>summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;list-style:none;cursor:pointer;}
.tap-reading-sources>summary::-webkit-details-marker{display:none;}
.tap-reading-sources p{margin:1.2em 0 0;}
.tap-reading-sources a,.tap-image-credit a{color:inherit;}
.tap-image-frame{display:flex;flex-direction:column;align-items:center;gap:16px;padding:0;}
#answer .tap-image-frame img{object-fit:contain;max-height:min(80dvh,max(1px,calc(100dvh - var(--image-footer-clearance) - var(--image-footer-clearance))));}
.tap-image-credit{text-align:center;}
#response-actions.tap-reading-actions{padding:0;left:12px;right:12px;transform:none;width:auto;max-width:none;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;grid-template-rows:44px;align-items:center;align-self:end;height:44px;min-height:44px;}
.tap-reading-actions>button{width:44px;}
.tap-reading-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.tap-reading-return{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:4px;}
.tap-reading-return :is(a,button){font-size:12px;}
.tap-reading :is(a,summary):focus-visible{outline:1px solid currentColor;outline-offset:2px;}
/* The response stage owns its viewport and footer, as it does on the homepage. */
body:has(#answer.tap-reading){display:block;padding:0;row-gap:0;}
:root[data-atmosphere-renderer="tone"] #response-actions.tap-reading-actions{width:calc(100% - 24px);max-width:none;}
#answer .tap-encounter .text-work>:is(h1,h2,h3,h4,h5,h6,p,blockquote,ul,ol)+:is(h1,h2,h3,h4,h5,h6,p,blockquote,ul,ol){margin-top:1.5em;}
/* Three independent footer positions. Center the complete middle group,
 * including Sources and Save, rather than centering one label within it. */
.tap-reading-return{position:relative;justify-self:center;width:max-content;max-width:100%;}
.tap-reading-sources ul{list-style:none;padding:0;margin:0;}
.tap-reading-sources li{margin:1.2em 0 0;}


/* Captions share the available content row with their image. They must not
 * grow a fitting viewport merely by adding their height beneath a tall image. */
:root[data-atmosphere-renderer="tone"] #answer .tap-image-frame img{max-height:min(80dvh,max(1px,calc(100dvh - var(--image-footer-clearance) - var(--image-footer-clearance))),max(1px,calc(100dvh - max(56px,calc(env(safe-area-inset-top) + 48px)) - max(8px,env(safe-area-inset-bottom)) - 44px - 24px - var(--tap-image-credit-space,0px))));}

/* Opt-in editorial emphasis for an intact quotation and its attribution. */
#answer .tap-encounter .text-work[data-reading-emphasis="quote"]{width:min(620px,calc(100vw - 56px));font-size:clamp(22px,3.3vw,38px);font-weight:700;line-height:1.3;text-align:left;text-align-last:auto;text-transform:none;letter-spacing:-.015em;word-spacing:normal;white-space:normal;}
#answer .tap-encounter .text-work[data-reading-emphasis="quote"]>p:not(:first-child){font-size:12px;font-weight:400;line-height:1.6;letter-spacing:normal;margin-top:1.5em;}
#answer .tap-encounter .text-work a[data-reading-tool]{display:inline-block;text-align:left;text-align-last:auto;white-space:nowrap;text-decoration:underline;text-underline-offset:.2em;}

/* A fixed progress rail; markers never reflow or shift when the passage changes. */
#answer.tap-reading{padding-top:max(104px,calc(env(safe-area-inset-top) + 96px))}
.tap-reading-progress{position:fixed;z-index:12;top:max(52px,calc(env(safe-area-inset-top) + 44px));left:50%;transform:translateX(-50%);width:min(calc(100vw - 48px),calc(var(--tap-count) * 18px + 32px));height:44px;display:flex;align-items:center;touch-action:manipulation;user-select:none}
.tap-reading-markers>span{width:3px;height:3px;border-radius:50%;background:currentColor;opacity:.25;pointer-events:none}
.tap-reading-markers>span[data-current]{width:5px;height:5px;opacity:.8}
.tap-reading-markers:focus-visible{outline:1px solid color-mix(in srgb,currentColor 35%,transparent);outline-offset:-6px;border-radius:8px}
:root[data-paths-tool] #answer.tap-reading{padding-top:64px}
:root[data-paths-tool] .tap-reading-progress{top:4px}

.tap-reading-markers{flex:1;min-width:0;height:44px;display:grid;grid-template-columns:repeat(var(--tap-count),minmax(0,1fr));align-items:center;justify-items:center;cursor:pointer}
#answer .tap-reading-menu{display:grid;place-items:center;flex:none;width:32px;min-width:32px;height:44px;min-height:44px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}
.tap-reading-menu>span{width:4px;height:4px;background:currentColor;opacity:.4;pointer-events:none}
.tap-reading-menu:hover>span,.tap-reading-menu:focus-visible>span{opacity:.8}
