/* The essay leads; The Experiment is a compact, image-anchored supporting piece. */
#details .master-teaser:has(.perspective-header) .master-teaser-inside {padding:14px var(--portfolio-gutter,24px) 18px;}
#details .master-teaser:has(.perspective-header) .perspective-header > .perspective-main-title {display:block;margin:8px 28px 0 0;padding:0 0 12px;font:400 32px/1.1 Bodoni,Georgia,serif;border-bottom:1px solid #c8c3b9;text-transform:none;letter-spacing:-.3px;}
#details .master-teaser:has(.perspective-header) .perspective-main-title::before {display:none;}
#details .master-teaser:has(.perspective-header) .master-essay-scroll {padding-left:0;padding-right:22px;}
#details .perspective-reader-body {container-type:inline-size;display:flow-root;}
#details .perspective-reader-body > .experiment-feature {
 --experiment-thumb:12.5cqw;container-type:normal;position:relative;float:right;
 display:grid;grid-template-columns:fit-content(17ch) var(--experiment-thumb);grid-template-rows:auto auto;
 font:400 11px/1.4 Montserrat,Arial,sans-serif;width:max-content;max-width:none;min-width:0;gap:7px 10px;align-items:start;
 box-sizing:border-box;margin:0 0 18px 16px;padding:0 0 13px 10px;
}
#details .perspective-reader-body > .experiment-feature::before {content:'';position:absolute;left:0;top:0;bottom:10px;width:1px;background:#a9ada9;}
#details .perspective-reader-body > .experiment-feature::after {content:'';position:absolute;left:18px;right:0;bottom:0;height:1px;background:#a9ada9;}
#details .perspective-reader-body > .experiment-feature .experiment-visual {grid-column:2;grid-row:1;float:none;display:block;width:var(--experiment-thumb);max-width:none;margin:0;padding:0;}
#details .perspective-reader-body > .experiment-feature .experiment-preview > img {display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;}
#details .perspective-reader-body > .experiment-feature .experiment-caption {grid-column:1;grid-row:1;display:block;width:max-content;max-width:17ch;min-width:0;font:400 11px/1.4 Montserrat,Arial,sans-serif;}
#details .perspective-reader-body > .experiment-feature .experiment-caption h4 {margin:0 0 5px;font:400 16px/1.15 Bodoni,Georgia,serif;}
#details .perspective-reader-body > .experiment-feature .experiment-caption p {display:block;margin:0 0 6px;font:400 11px/1.4 Montserrat,Arial,sans-serif;}
#details .perspective-reader-body > .experiment-feature .experiment-visual .experiment-credit {margin:0 0 3px;padding:0;text-align:right;font:400 9px/1.2 Montserrat,Arial,sans-serif;color:var(--accent-red);}
#details .perspective-reader-body > .experiment-feature .experiment-open-link {display:block;width:max-content;max-width:100%;margin:2px 0 0;padding:0 0 2px;font:500 10px/1.4 Montserrat,Arial,sans-serif;}
#details .perspective-reader-body > .experiment-feature > .experiment-provenance {grid-column:1 / -1;grid-row:2;clear:none;display:block;margin:0;padding:0;max-width:100%;font:400 9px/1.35 Montserrat,Arial,sans-serif;color:#535b5e;}
#details .perspective-reader-body .dependence-brain {float:left;width:26%;max-width:190px;height:auto;margin:0 16px 12px 0;}
#details .master-teaser:has(.perspective-header) .reader-scrollbar::before {background:#53616a26;}
#details .master-teaser:has(.perspective-header) .reader-scroll-thumb {background:linear-gradient(90deg,#8d9aa2,#3e4c55);}
@media(min-width:501px) and (orientation:portrait) {
 #details .master-teaser:has(.perspective-header) .perspective-header > .perspective-main-title {font-size:30px;}
 #details .perspective-reader-body > .experiment-feature {
  --experiment-thumb:38%;display:flow-root;float:none;width:100%;max-width:100%;
  margin:0 0 12px;padding:0 0 12px 12px;
 }
 #details .perspective-reader-body > .experiment-feature .experiment-visual {
  float:right;width:var(--experiment-thumb);margin:0 0 8px 16px;
 }
 #details .perspective-reader-body > .experiment-feature .experiment-caption {
  width:auto;max-width:none;
 }
 #details .perspective-reader-body > .experiment-feature > .experiment-provenance {
  clear:both;padding-top:4px;
 }
}
@media(max-width:500px) {
 #details .master-teaser:has(.perspective-header) .perspective-header > .perspective-main-title {font-size:28px;}
 #details .perspective-reader-body > .experiment-feature {--experiment-thumb:25cqw;float:none;margin:0 0 18px auto;}
 #details .perspective-reader-body .dependence-brain {width:32%;margin-right:12px;}
 #experiment-afterthought .experiment-toolbar {flex-wrap:wrap;}
 #experiment-afterthought .experiment-toolbar h2 {font-size:21px;}
}
/* On phones, use the available row so there is no vacant column beside the support. */
@media(max-width:500px) {
 #details .perspective-reader-body > .experiment-feature {width:100%;grid-template-columns:minmax(0,1fr) var(--experiment-thumb);margin-left:0;}
 #details .perspective-reader-body > .experiment-feature .experiment-caption {width:auto;max-width:none;}
}

/* Bring the first essay section closer to its opening and support piece. */
#details .master-teaser:has(.perspective-header) .perspective-reader-body > .dependence-heading {margin-top:12px;}
#details .perspective-reader-body > .experiment-feature {margin-bottom:10px;}

/* The supplied stress-brain sits beside the opening Cost of Doubt paragraphs. */
#details .perspective-reader-body .cost-of-doubt-brain {
 float:right;width:42%;max-width:280px;height:auto;margin:0 0 14px 18px;
}

/* The calm view lives within The Illusion of Understanding's reading flow. */
#details .perspective-reader-body > .experiment-perspective {
 float:right;display:block;width:58%;max-width:none;box-sizing:border-box;
 margin:0 24px 14px 20px;padding:0;
}
.experiment-perspective-heading { display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:6px; }
#details .experiment-perspective-heading h4 { margin:0;font:400 20px/1.15 Bodoni,Georgia,serif; }
.experiment-perspective-heading > span { font:400 9px/1.3 Montserrat,Arial,sans-serif;color:var(--accent-red);white-space:nowrap; }
#details .experiment-perspective .experiment-preview > img { width:100%;height:auto;aspect-ratio:3 / 2;object-fit:contain; }
#details .experiment-perspective .experiment-open-link { margin:7px 0 0;font-size:11px; }
#details .perspective-reader-body > .experiment-reflection {
 margin-left:0;text-align:left;text-indent:0;hyphens:manual;
}

/* Both views retain their complete framing; the explanation belongs here. */
#experiment-viewer .experiment-comparison { display:block;padding:18px;background:var(--paper-surface);color:var(--ink); }
.experiment-perspectives { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }
.experiment-perspectives > figure { min-width:0;margin:0;padding-bottom:12px;border-bottom:1px solid #c8c3b9; }
#experiment-viewer .experiment-perspectives img { display:block;width:100%;height:auto;aspect-ratio:3 / 2;object-fit:contain; }
.experiment-perspectives figcaption { margin-top:10px;padding-left:10px;border-left:1px solid var(--accent-red);font:400 15px/1.4 Montserrat,Arial,sans-serif; }
.experiment-viewer-explanation { margin-top:22px;max-width:72ch;padding-left:12px;border-left:1px solid var(--accent-red);font:400 16px/1.6 Montserrat,Arial,sans-serif; }
.experiment-viewer-explanation > p { margin:0 0 12px; }
#experiment-viewer[open] { grid-template-rows:auto minmax(0,1fr) auto; }
#experiment-viewer .experiment-viewer-provenance {
 margin:0;padding:12px 18px;border-top:1px solid #c8c3b9;
 background:var(--paper-surface);color:#5c6060;font:400 10px/1.5 Montserrat,Arial,sans-serif;
}
#experiment-viewer.is-zoomed .experiment-perspectives { width:200%; }
#experiment-viewer.is-zoomed .experiment-image-frame .experiment-perspectives img { width:100%;height:auto; }
@media(orientation:portrait) {
 .experiment-perspectives { grid-template-columns:minmax(0,1fr);gap:22px; }
}
@media(max-width:500px) {
 #details .perspective-reader-body .cost-of-doubt-brain { width:43%;margin-left:12px; }
 #details .perspective-reader-body > .experiment-perspective { width:50%;margin:0 12px 12px 12px; }
 #details .experiment-perspective-heading { display:block; }
 #details .experiment-perspective-heading h4 { font-size:17px; }
 .experiment-perspective-heading > span { display:block;margin-top:3px;text-align:right; }
 #details .master-teaser:has(.perspective-header) .perspective-quote-list { margin-left:12px; }
 #details .perspective-reader-body > .experiment-reflection { margin-left:0; }
 #experiment-viewer .experiment-comparison { padding:14px; }
}
