/* Detail pages share the homepage palette. */
:root {
  --paper: #f2f0e9;
  --ink: #192a60;
  --accent: #cce512;
  --muted: #53607e;
  --detail-rule: rgba(25, 42, 96, .22);
}

*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--ink);background:var(--paper);font-family:Georgia,"Times New Roman",serif}.page{max-width:1440px;padding:38px 80px 0;margin:auto}a{color:inherit;text-decoration:none}a:focus-visible{outline:3px solid var(--ink);outline-offset:5px}.back{font:14px Arial,sans-serif;color:var(--muted)}.heading{display:flex;justify-content:space-between;gap:32px;margin:48px 0 42px}h1{font-weight:400;font-size:54px;line-height:1.14;letter-spacing:-.025em;margin:0 0 20px}.credit{font-size:18px;margin:0}.shares{align-self:flex-start;margin-top:8px}.label{font:11px Arial,sans-serif;color:var(--muted);letter-spacing:.14em;text-transform:uppercase;margin:0 0 24px}.icons{display:flex;gap:16px}.share{width:46px;height:46px;border:1.5px solid var(--ink);border-radius:50%;display:grid;place-items:center;font:24px Arial,sans-serif}.share svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5}figure{margin:0;min-width:0}figure img{width:100%;height:auto;display:block}figcaption{font:13px/1.5 Arial,sans-serif;color:var(--muted);margin-top:18px}.intro{display:grid;grid-template-columns:280px 1fr;gap:40px;margin:88px 0 80px}.intro .label{margin-top:6px}.lead{font-size:30px;line-height:1.4;margin:0 0 26px}.copy{font-size:21px;line-height:1.52;margin:0 0 18px}.category{font:10px/1.7 Arial,sans-serif;letter-spacing:.13em;color:var(--muted);margin-top:33px}.gallery-label{display:flex;justify-content:space-between;border-top:1px solid var(--detail-rule);padding-top:20px;margin-bottom:32px}.gallery-label .label{margin:0}.pair{display:grid;grid-template-columns:1fr 1fr;gap:24px}.gallery>figure,.gallery>.pair{margin-bottom:80px}.ending{border-top:1px solid var(--detail-rule);padding:35px 0 45px;display:flex;justify-content:space-between;font:16px Arial,sans-serif;color:var(--muted)}@media(max-width:800px){.page{padding:28px 24px 0}h1{font-size:clamp(32px,6vw,48px)}.heading{flex-wrap:wrap;margin-top:36px}.shares{margin-top:8px}.intro{grid-template-columns:1fr;gap:18px;margin:52px 0}.lead{font-size:26px}.copy{font-size:19px}.pair{grid-template-columns:1fr;gap:36px}.gallery>figure,.gallery>.pair{margin-bottom:48px}.credit{font-size:16px}figcaption{font-size:12px}.category{font-size:10px}.ending{font-size:14px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

button{color:inherit;font:inherit;cursor:pointer}.share{background:var(--ink);color:var(--accent);padding:0;flex:0 0 auto;transition:background-color .2s,color .2s,border-color .2s}.share:hover{background:var(--accent);color:var(--ink);border-color:var(--ink)}.share:focus-visible{outline:3px solid var(--ink);outline-offset:4px}.share:active{transform:translateY(1px)}.share-status{font:12px/1.4 Arial,sans-serif;color:var(--muted);max-width:260px;margin:12px 0 0}.credit-note{font:14px/1.5 Arial,sans-serif;color:var(--muted);margin:12px 0 0}.heading>div:first-child{min-width:0}h1{overflow-wrap:break-word}.ending{gap:24px;align-items:flex-start}.ending a{min-height:44px;display:flex;align-items:center}.ending a:hover{text-decoration:underline;text-underline-offset:5px}.ending .other-book{max-width:45%;text-align:right;justify-content:flex-end}.ending .nav-label{display:block;font:10px/1.5 Arial,sans-serif;letter-spacing:.12em;text-transform:uppercase;margin-bottom:8px}.ending .nav-title{display:block;font:22px/1.2 Georgia,serif;color:var(--ink)}.back:hover{text-decoration:underline;text-underline-offset:4px}.hero-photo img{height:auto}.gallery img{height:auto}.top-link{margin-top:12px;display:inline-block;font:12px Arial,sans-serif;color:var(--muted)}@media(max-width:480px){.icons{gap:12px}.ending{flex-wrap:wrap}.ending .other-book{max-width:100%;text-align:left;justify-content:flex-start}.ending .nav-title{font-size:20px}.intro .label{font-size:11px}.page{padding-left:20px;padding-right:20px}}@media(prefers-reduced-motion:reduce){.share{transition:none}}

.client-contributors-heading{font:18px/1.5 Arial,sans-serif;margin:32px 0 16px}.copy{overflow-wrap:break-word}.category{text-transform:none;letter-spacing:0;font-size:13px}

/* Yellow accents connect the reading pages to the homepage controls. */
.back,
.ending a[href="../books.html"],
.ending .top-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 4px;
  text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
.back:hover,
.ending a[href="../books.html"]:hover,
.ending .top-link:hover { text-decoration-color: var(--ink); }
.ending .other-book:hover { text-decoration: none; }
.ending .other-book:hover .nav-title {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 4px;
  text-underline-offset: 5px;
}
.gallery-label .label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 4px;
  margin-right: 12px;
  background: var(--accent);
  vertical-align: middle;
}
@media (prefers-reduced-motion: reduce) {
  .back, .ending a { transition: none; }
}
@media (forced-colors: active) {
  .share { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
  .share:hover { background: Highlight; color: HighlightText; border-color: Highlight; }
  .back, .ending a, .ending .other-book:hover .nav-title { text-decoration-color: LinkText; }
}

/* The top link stays in the viewport, outside the publication footer. */
.back-to-top {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 50;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--accent);
  box-shadow: 0 3px 14px rgba(25, 42, 96, .13);
  transition: background-color .2s, color .2s;
}
.back-to-top:hover { color: var(--accent); background: var(--ink); }
.back-to-top svg, .share-dialog-close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.ending { padding-bottom: 104px; }
.share { text-decoration: none; }
.share-dialog {
  width: min(560px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 28px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
}
.share-dialog::backdrop { background: rgba(25, 42, 96, .4); }
.share-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.share-dialog h2 { font: 400 30px/1.2 Georgia, serif; margin: 0; }
.share-dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--accent);
}
.share-dialog-book { font: 20px/1.4 Georgia, serif; margin: 24px 0 16px; }
#share-dialog-note { font: 15px/1.6 Arial, sans-serif; color: var(--muted); }
.share-dialog label { display: block; font: 13px/1.5 Arial, sans-serif; margin: 20px 0 8px; }
.share-dialog textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 Georgia, serif;
}
.share-dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.share-dialog-actions button, .share-dialog-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  background: var(--accent);
  color: var(--ink);
  font: 14px/1.4 Arial, sans-serif;
}
.share-dialog-actions [hidden] { display: none; }
.share-dialog-actions button:hover, .share-dialog-actions a:hover, .share-dialog-close:hover {
  background: var(--ink);
  color: var(--accent);
}
.share-dialog button:focus-visible, .share-dialog textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
.share-dialog-status { font: 13px/1.5 Arial, sans-serif; margin-bottom: 0; }
@media (max-width: 800px) {
  .back-to-top { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
  .share-dialog { padding: 20px; }
  .share-dialog h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }
@media (forced-colors: active) {
  .back-to-top { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
}

.publication-support{font-style:italic;font-size:18px;}.publication-voices{max-width:900px;margin:64px auto 80px;}.publication-voices blockquote{margin:0;padding:28px 0;border-top:1px solid var(--detail-rule);}.publication-voices blockquote p{font:400 clamp(21px,2vw,29px)/1.45 Georgia,serif;margin:0 0 18px;}.publication-voices blockquote footer{font:13px/1.6 Arial,sans-serif;color:var(--muted);max-width:650px;}

/* D49: outline-only sharing controls, retaining blue/lemon states. */
@media(forced-colors:none){.share{background:transparent;color:var(--ink);border-color:var(--ink);}.share:hover,.share:focus-visible{background:transparent;color:var(--accent);border-color:var(--accent);}}
