/* The 3-D stage supplies the paper's physical size and position. */
.mr-paper, .mr-chapter {
  color: var(--ink);
  font-family: var(--font-ui);
  text-align: right;
}

.mr-paper *, .mr-chapter * { box-sizing: border-box; }
.mr-paper :is(h2,h3,p,figure), .mr-chapter :is(h2,h3,p,figure,ol) { margin: 0; }
.mr-paper button, .mr-chapter button {
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}
.mr-paper :is(a,button):focus-visible, .mr-chapter :is(a,button):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.mr-paper {
  container-type: size;
  width: 100%;
  height: 100%;
  background-color: var(--surface);
  background-image: linear-gradient(113deg,var(--surface),var(--bg) 55%,var(--surface-alt) 110%);
  overflow: hidden;
}
.mr-chapter button svg {width:1em;height:1em;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.6}
.mr-learn-course i{width:.34em;height:.34em;border-radius:50%;background:var(--accent-ink);display:inline-block;flex:none}

.mr-chapter {
  width: min(100%, 780px);
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  text-shadow: none;
  margin-inline: auto;
  background: linear-gradient(112deg,var(--surface),var(--bg));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  padding: clamp(14px, 2.8vw, 32px);
  scrollbar-color: var(--border) var(--bg);
}
.mr-chapter-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
  font-size: clamp(12px, 1.6vw, 14px);
  color: var(--muted);
}
.mr-chapter-head button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px;
  border: 1px solid var(--border); background: transparent; padding: 4px 10px;
  border-radius: 3px; font-weight: 650;
}
.mr-chapter-head button:hover { background: var(--surface-alt); }
.mr-chapter h2 { margin: .45em 0 .5em; font-size: clamp(26px, 4.6vw, 50px); line-height: 1.32;  }
.mr-chapter h3 { font-size: clamp(19px, 2.9vw, 29px); line-height: 1.45;  }
.mr-chapter-copy p { font-size: clamp(15px, 1.9vw, 19px); line-height: 1.9; }
.mr-sample { color: var(--accent-ink); font-size: 13px; font-weight: 680; }
.mr-study {
  display: grid; grid-template-columns: 30% minmax(0,1fr); gap: clamp(16px,3vw,32px);
  align-items: center; padding: 1rem 0;
}
.mr-study-data {
  display: flex; gap: 0 .35em; align-items: baseline; justify-content: center;
  direction: rtl; color: var(--accent-ink); border-inline-end: 1px solid var(--line);
}
.mr-study-data strong { font-size: clamp(52px,9vw,96px); line-height: 1.24; font-variant-numeric: tabular-nums; }
.mr-study-data span { font-weight: 750; }
.mr-study p { margin-top: .45em; }
.mr-study-time { display: flex; align-items: center; gap: 1em; color: var(--accent-ink); font-size: 14px; font-weight: 680; margin: 1.2em 0; }
.mr-study-time i { position: relative; flex: 1; height: 1px; background: var(--accent-ink); }
.mr-study-time i::before, .mr-study-time i::after {
  content: ""; position: absolute; top: -3px; left: 0;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-ink);
}
.mr-study-time i::after { left: auto; right: 0; }
.mr-chapter .mr-study-cite { font-size: 13px; display: flex; flex-wrap: wrap; gap: .5em 1.2em; border-top: 1px solid var(--line); padding-top: .9em; }
.mr-study-cite a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.mr-prisma { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(12px,3vw,32px); }
.mr-prisma-chart ol { list-style: none; padding: 0; display: grid; justify-items: center; }
.mr-prisma-node { width: calc(100% - var(--node) * 5%); display: grid; justify-items: center; }
.mr-prisma-node:not(:last-child)::after {
  content: "↓"; color: var(--muted); line-height: 1; font-size: 18px;
}
.mr-prisma-node button {
  width: 100%; border: 1px solid var(--border); border-radius: 3px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0 6px; padding: 7px 11px; min-height: 38px;
  color: var(--muted); background: var(--surface-alt);
}
.mr-prisma-node button span { font-weight: 700; font-size: clamp(12px,1.6vw,15px); }
.mr-prisma-node button strong { font-weight: 750; font-size: clamp(16px,2.1vw,24px); }
.mr-prisma-node--active button { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: var(--shadow-1); }
.mr-prisma-node--active button strong { color: var(--on-accent); }
.mr-prisma-node--future button { border-style: dashed; background: transparent; color: var(--muted); }
.mr-prisma-node button:hover { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.mr-prisma-chart figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: .7em; }
.mr-prisma-value { display: block; color: var(--accent-ink); font-size: clamp(40px,6.6vw,72px); font-weight: 800; line-height: 1.35;  }
.mr-prisma-story p { margin-top: .65em; }
.mr-learn h3 { margin: .3em 0; }
.mr-learn-options { display: grid; margin: .8em 0; gap: .5em; }
.mr-learn-options button {
  width: 100%; padding: .65em .9em;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  font-size: clamp(15px,1.9vw,18px); line-height: 1.65;
}
.mr-learn-options button:hover { border-color: var(--accent-ink); }
.mr-learn-options button[aria-pressed=true] { background: var(--selected-bg); border-color: var(--accent-ink); box-shadow: inset -3px 0 var(--accent-ink); }
.mr-learn-feedback { color: var(--accent-ink); }
.mr-chapter-copy .mr-learn-course { display: flex; flex-wrap: wrap; align-items: center; gap: .65em; border-top: 1px solid var(--line); margin-top: .85em; padding-top: .7em; font-size: 13px; color: var(--muted); }
@media (max-width: 540px) {
  .mr-prisma { grid-template-columns: 1fr; gap: 12px; }
  .mr-prisma-chart { order: 2; }
  .mr-prisma-story { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 12px; }
  .mr-prisma-value { margin: 0; grid-column: 1; }
  .mr-prisma-story .mr-sample, .mr-prisma-story p { grid-column: 1 / -1; }
  .mr-prisma-story p { margin-top: .1em; }
  .mr-study { display: block; padding: 0; }
  .mr-study-data { justify-content: start; border: 0; }
}
@media (max-height: 560px) and (min-width: 541px) {
  .mr-chapter { padding: 13px 20px; }
  .mr-chapter h2 { font-size: 28px; margin: .25em 0; }
  .mr-chapter h3 { font-size: 20px; }
  .mr-chapter-copy p { font-size: 14px; line-height: 1.65; }
  .mr-prisma-node button { min-height: 30px; padding: 3px 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .mr-prisma-node--active button { animation: mr-prisma-arrive .5s ease-out both; }
  @keyframes mr-prisma-arrive { from { transform: translateY(-6px); background-color: var(--band-bg); } to { transform: translateY(0); } }
}
#readingPage > .mr-chapter { width: 100%; border: 0; box-shadow: none; }
.mr-prisma-proportion { margin-top: .85em !important; grid-column: 1 / -1; }
.mr-prisma-proportion > div { height: 8px; overflow: hidden; position: relative; background: var(--surface-alt); border-radius: 1px; }
.mr-prisma-proportion > div::before, .mr-prisma-proportion i {
  content: ""; position: absolute; inset: 0; transform-origin: right;
}
.mr-prisma-proportion > div::before {
  transform: scaleX(var(--previous));
  background: repeating-linear-gradient(135deg,var(--band-bg) 0 2px,var(--case-bg) 2px 5px);
}
.mr-prisma-proportion i { transform: scaleX(var(--retained)); background: var(--accent); }
.mr-prisma-proportion figcaption { margin-top: .35em; color: var(--muted); font-size: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .mr-prisma-proportion i { animation: mr-prisma-filter .8s cubic-bezier(.17,.69,.25,1) both; }
  @keyframes mr-prisma-filter { from { transform: scaleX(var(--previous)); } to { transform: scaleX(var(--retained)); } }
}
/* A bound journal on the tabletop. The same printed plates are projected onto
   the sheet in Sara's hands. Container units keep the type set in paper space. */
.sg-manuscript .sg-sheet{background:var(--surface-alt);border-color:var(--border)}
.sg-manuscript .sg-sheet-third{background:var(--bg)}
.sg-manuscript .sg-paper-screen{background:var(--surface);scrollbar-color:var(--border) transparent}

.jr-sheet {
  position:relative;
  isolation:isolate;
  color:var(--ink);
  background:linear-gradient(90deg,var(--surface),var(--bg) 78%,color-mix(in srgb,var(--bg) 86%,var(--border)) 98.5%,var(--line));
}
.jr-layout {
  height:100%;padding:4.1cqw 6.1cqw 2.75cqw;
  display:grid;grid-template-rows:auto minmax(0,1fr) auto;
  font-size:2.67cqw;line-height:1.65;
}
.jr-mast{display:flex;align-items:center;gap:1.3cqw;border-bottom:.34cqw solid var(--ink);padding-bottom:1.45cqw}
.jr-lockup{display:block;flex:0 0 auto;width:40cqw;height:auto}
.jr-mast .jr-section-title{margin-left:auto;color:var(--muted);font-size:2.18cqw;font-weight:700}
.jr-copy{overflow:auto;min-height:0;padding:2.4cqw .3cqw 2cqw;scrollbar-width:thin;scrollbar-color:var(--border) transparent;overscroll-behavior:contain;user-select:text}
.jr-sheet .jr-copy h2{color:var(--heading-accent);font-size:5.8cqw;line-height:1.32;margin:0 0 1.65cqw;font-weight:900;text-wrap:pretty}
.jr-copy .jr-lead{font-size:2.95cqw;line-height:1.72;color:var(--ink);margin:0 0 2.25cqw}
.jr-entries{margin:0;padding:0;border-top:1px solid var(--border)}
.jr-entry{display:grid;grid-template-columns:minmax(0,27%) minmax(0,1fr);gap:1.8cqw;padding:1.62cqw .4cqw;border-bottom:1px solid var(--line);align-items:start}
.jr-entry:last-child{border-bottom:0}
.jr-entry dt{color:var(--accent-ink);font-size:2.68cqw;line-height:1.6;font-weight:700;overflow-wrap:anywhere}
.jr-entry dd{margin:0;line-height:1.7;font-size:2.63cqw;white-space:pre-line;overflow-wrap:anywhere}
.jr-entry [lang=en]{text-align:left;font-family:var(--font-en);letter-spacing:.01em}
.jr-bibliography .jr-entry{grid-template-columns:34% minmax(0,1fr)}
.jr-bibliography .jr-entry dd[lang=en]{font-size:2.8cqw;line-height:1.35}
.jr-source-link{color:var(--accent-ink);text-underline-offset:.22em;text-decoration-thickness:1px}
.mr-paper ::selection,.mr-chapter ::selection{color:var(--selected-ink);background:var(--selected-bg)}
.mr-study-cite [lang=en]{font-family:var(--font-en)}
.jr-source-link span{font-family:var(--font-en);font-size:.85em;padding-inline-start:.25em}
.jr-copy .jr-note{border-inline-start:.52cqw solid var(--accent-ink);margin:1.7cqw 0 0;padding:.85cqw 1.8cqw;background:var(--tint);color:var(--ink);font-size:2.4cqw;line-height:1.65;overflow-wrap:anywhere}
.jr-page-start .jr-lockup,.jr-page-next .jr-lockup{width:53cqw}
.jr-page-start .jr-copy h2{font-size:7.35cqw;margin:1.2cqw 0 1.4cqw}
.jr-page-start .jr-lead{color:var(--muted);margin:0 0 1.9cqw}
.jr-page-start .jr-entry{padding:1.25cqw .4cqw}
.jr-cover-figure{margin-top:1.85cqw;display:grid;grid-template-columns:7cqw auto 1fr;gap:1.6cqw;align-items:center}
.jr-cover-figure p{font-size:2.15cqw;line-height:1.4;color:var(--muted)}
.jr-cover-figure aside{justify-self:end;padding:0 .8cqw;border-bottom:.24cqw solid var(--brand-signal);color:var(--feature-ink);background:var(--feature-bg);font-size:2.75cqw;font-weight:650;transform:rotate(-4deg)}
.jr-ink-chart{display:grid;justify-items:center;gap:.45cqw}.jr-ink-chart i{width:100%;background:var(--accent-ink);height:.95cqw}.jr-ink-chart i:nth-child(2){width:75%}.jr-ink-chart i:nth-child(3){width:50%}.jr-ink-chart i:nth-child(4){width:25%;background:var(--brand-signal)}
.jr-page-next .jr-copy{display:flex;flex-direction:column;justify-content:safe center}
.jr-sheet.jr-page-next h2{font-size:7cqw}
.jr-partners{display:flex;align-items:center;gap:2.6cqw;margin-top:2cqw;min-height:6cqw}
.jr-partners img{display:block;width:auto;height:6.1cqw;max-width:34cqw;object-fit:contain;background:var(--screen-bg);border-radius:var(--radius-sm);padding:.6cqw}
.jr-footer{display:flex;align-items:center;justify-content:space-between;min-height:7.3cqw;border-top:.28cqw solid var(--border);padding-top:1.15cqw;gap:1.3cqw;background:transparent}
.jr-page-controls{display:flex;align-items:center;gap:.5cqw}
.jr-footer button,.jr-contents button{cursor:pointer;font:inherit;color:inherit;transition:background var(--duration-fast) var(--ease)}
.jr-footer button{border:1px solid var(--border);border-radius:.7cqw;background:transparent;display:inline-flex;align-items:center;justify-content:center;padding:.38cqw 1.1cqw;gap:.7cqw;min-height:6.1cqw;line-height:1.3;font-size:2.35cqw;font-weight:700}
.jr-footer .jr-turn{height:6.1cqw;width:6.1cqw;padding:1.1cqw}
.jr-footer button:hover:not(:disabled),.jr-contents button:hover{background:var(--selected-bg)}
.jr-footer button:disabled{opacity:.27;cursor:default}
.jr-footer svg{width:3.1cqw;height:3.1cqw;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.jr-turn-back svg{transform:rotate(180deg)}
.jr-footer .jr-toc-toggle{padding-inline:1.45cqw;gap:1.4cqw;border-color:transparent}
.jr-toc-toggle > span:last-child{color:var(--accent-ink);border-inline-start:1px solid var(--line);padding-inline-start:1.3cqw}
.jr-folio{font-variant-numeric:tabular-nums;white-space:nowrap}
.jr-folio small{font-size:92%;font-weight:400;color:var(--muted)}
.jr-footer .jr-scene{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.jr-footer .jr-scene:hover:not(:disabled){background:color-mix(in srgb,var(--accent) 90%,var(--on-accent))}
.jr-print-footer{font-size:2.15cqw;color:var(--muted)}
.jr-print-footer [lang=en]{font-family:var(--font-en);font-size:1.83cqw}
.jr-contents{position:absolute;z-index:5;inset:3.7cqw;display:flex;flex-direction:column;background:linear-gradient(90deg,var(--surface),var(--bg));padding:2.8cqw 3.8cqw 3.5cqw;border:.18cqw solid var(--border);box-shadow:var(--shadow-2);overflow:hidden}
.jr-contents header{display:flex;align-items:center;justify-content:space-between;border-bottom:.28cqw solid var(--ink);padding-bottom:1.4cqw}
.jr-contents header strong{font-size:4.4cqw}
.jr-contents header button{border:.15cqw solid var(--line);border-radius:3px;padding:.3cqw 1.2cqw;font-size:2.6cqw;background:transparent;color:var(--accent-ink)}
.jr-toc-scroll{overflow:auto;min-height:0;overscroll-behavior:contain;padding:.7cqw .7cqw 2cqw;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
.jr-toc-scroll h3{font-size:2.9cqw;font-weight:800;color:var(--accent-ink);margin:1.8cqw 0 0}
.jr-toc-scroll button{display:flex;align-items:baseline;gap:1.2cqw;padding:.8cqw .5cqw;width:100%;border:0;background:transparent;text-align:right;color:var(--ink);font-size:2.7cqw}
.jr-toc-scroll button[aria-current=page]{background:var(--selected-bg);color:var(--selected-ink);box-shadow:inset -3px 0 var(--focus);font-weight:700}
.jr-toc-scroll i{flex:1;border-bottom:1px dotted var(--line)}.jr-toc-scroll b{font-weight:500;font-variant-numeric:tabular-nums}
[data-paper-turning]{overflow:visible}
.jr-page-motion{position:absolute;inset:0;z-index:4;pointer-events:none;direction:ltr;perspective:1650px;perspective-origin:50% 60%;clip-path:inset(-15% -1.5% -15% -10%)}
.jr-page-motion[data-direction=backward]{clip-path:inset(-15% -10% -15% -1.5%)}
.jr-curl-mesh{position:absolute;inset:0;transform-style:preserve-3d}
.jr-curl-face{position:absolute;inset:0;transform-origin:0 0;backface-visibility:visible;will-change:transform}
.jr-curl-face>.jr-sheet{width:100%;height:100%}
.jr-curl-face::before,.jr-curl-face::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none}
.jr-curl-face::before{background:var(--bg);opacity:var(--verso-opacity,0)}
.jr-curl-face::after{background:var(--border);opacity:var(--bend-opacity,0)}
.jr-curl-shadow{position:absolute;top:-12%;left:0;height:124%;background:linear-gradient(90deg,transparent,var(--scrim) 45%,var(--scrim) 60%,transparent);filter:blur(4px);transform-origin:center center;pointer-events:none}
@container (max-width:480px){
  .jr-layout{padding:4.3cqw 4.7cqw 2.9cqw}
  .jr-entry dt,.jr-entry dd{font-size:2.95cqw}.jr-copy .jr-lead{font-size:3.15cqw}
  .jr-copy .jr-note{font-size:2.72cqw}.jr-entry{padding-block:1.65cqw}
  .jr-footer button{min-height:7.1cqw;font-size:2.8cqw}.jr-footer .jr-turn{width:7.1cqw;height:7.1cqw}
  .jr-toc-scroll button{font-size:3.1cqw}.jr-contents header button{font-size:3cqw}
}
@media(prefers-reduced-motion:reduce){.jr-page-motion{display:none}.jr-footer button,.jr-contents button{transition:none}}
.jr-abstract-frame {position:relative;padding:1.6cqw 2.3cqw;background:var(--selected-bg);color:var(--selected-ink);border-inline-start:.55cqw solid var(--focus)}
.jr-abstract-frame p {font-size:2.72cqw;line-height:1.72}
.jr-abstract-frame button {display:inline-flex;align-items:center;gap:1cqw;border:0;padding:0;color:var(--selected-ink);background:transparent;font-size:2.95cqw;font-weight:800}
.jr-abstract-frame button::after {content:"";position:absolute;inset:0}
.jr-abstract-frame button svg{width:1em;height:1em;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}
.jr-abstract-frame:has(button:hover){outline:1px solid var(--focus)}
.jr-cover-columns {display:grid;grid-template-columns:1fr 1fr;border:0;margin-top:2cqw;gap:2.35cqw}
.jr-page-start .jr-cover-columns .jr-entry{display:block;border:0;padding:0}
.jr-page-start .jr-cover-columns .jr-entry + .jr-entry{border-inline-start:1px solid var(--line);padding-inline-start:2.35cqw}
.jr-page-next .jr-entry:first-child dd {font-weight:700;color:var(--heading-accent)}

.jr-page-criteria .jr-entry{padding-block:.78cqw;grid-template-columns:minmax(0,23%) minmax(0,1fr)}
.jr-page-criteria .jr-entry dd{font-size:2.53cqw;line-height:1.57}
@container (max-width:480px){.jr-page-criteria .jr-entry dd{font-size:2.94cqw}}
.jr-sheet .jr-corner{position:absolute;top:0;width:6.5cqw;height:6.5cqw;display:block;padding:0;border:0;background:transparent;cursor:pointer}
.jr-corner-next{left:0}.jr-corner-prev{right:0;transform:scaleX(-1)}
.jr-corner::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,var(--line) 4%,var(--surface) 24%,var(--border) 47%,var(--line) 50%,transparent 53%);clip-path:polygon(0 0,67% 0,0 67%);transition:clip-path .16s ease-out}
.jr-corner:hover::before,.jr-corner:focus-visible::before{clip-path:polygon(0 0,100% 0,0 100%)}
