body .site-header.pilot-header {
  border-radius: 12px;
  border-top: 1px solid var(--gold);
}
.site-header.pilot-header::before {
  left: 4px;
  bottom: 4px;
}
.site-header.pilot-header::after {
  right: 4px;
  bottom: 4px;
}
body .pilot-breadcrumb-box,
body .r-breadcrumb.pilot-breadcrumb-box {
  width: min(94%, 1804px);
  max-width: 1804px;
  margin: 10px auto 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
}
body .pilot-breadcrumb-box .breadcrumbs {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  gap: 6px 9px;
}
.pilot-breadcrumb-box .breadcrumbs > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.storage-protection {
  margin: 0 0 14px;
}
.storage-protection > p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--green);
}
.storage-protection > .button {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
}
@media (max-width: 1100px) {
  body .pilot-breadcrumb-box,
  body .r-breadcrumb.pilot-breadcrumb-box {
    width: 96%;
  }
}
@media (max-width: 760px) {
  body .site-header.pilot-header {
    width: calc(100% - 16px) !important;
    border-radius: 10px;
  }
  body .pilot-breadcrumb-box,
  body .r-breadcrumb.pilot-breadcrumb-box {
    width: calc(100% - 16px);
    margin: 8px auto 12px;
    padding: 10px 12px;
    border-radius: 10px;
  }
  body .pilot-breadcrumb-box .breadcrumbs {
    font-size: 12px;
    gap: 4px 7px;
  }
}

body.pilot-layout {
  --pilot-width: min(96vw, 1980px);
}
body.pilot-layout .site-header.pilot-header,
body.pilot-layout .pilot-breadcrumb-box,
body.pilot-layout .r-breadcrumb.pilot-breadcrumb-box {
  width: var(--pilot-width) !important;
  max-width: 1980px;
  margin-inline: calc((100% - var(--pilot-width)) / 2);
}
body.pilot-layout:not(.reader-page) .page-width,
body.pilot-layout:not(.reader-page) .wide-width,
body.pilot-layout:not(.reader-page) main.page-width,
body.pilot-layout:not(.reader-page) main.wide-width {
  width: var(--pilot-width);
  max-width: 1980px;
  margin-inline: auto;
}
body.pilot-layout:not(.reader-page):not([data-page=home]) {
  isolation: isolate;
  background: var(--paper);
}
body.pilot-layout:not(.reader-page):not([data-page=home])::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #d4c4a8 url('../backgrounds/reader-room-hd.png') center top / cover no-repeat;
}
body.pilot-layout:not(.reader-page):not([data-page=home]) .scene {
  min-height: 0;
  background: none !important;
  border: 0 !important;
}
body.pilot-layout:not(.reader-page):not([data-page=home]) main {
  margin: 0 auto 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised) url('../textures/paper.webp');
}
body.pilot-layout .pilot-page-title {
  grid-column: 1 / -1;
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 14px;
  font-weight: 400;
}
body.pilot-layout .search-hero {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  padding: 0 0 12px;
}
body.pilot-layout .mobile-menu:not([hidden]) {
  width: var(--pilot-width);
  max-width: 1980px;
  left: calc((100% - var(--pilot-width)) / 2);
  border-radius: 10px;
}
.r-tool[data-r-action=bookmark][aria-pressed=true] {
  color: var(--r-accent);
  background: var(--r-selected);
  border-color: var(--r-accent);
}
.r-tool[data-r-action=bookmark][aria-pressed=true] .r-icon {
  fill: currentColor;
}
@media (max-width: 760px) {
  body.pilot-layout {
    --pilot-width: calc(100vw - 16px);
  }
  body.pilot-layout:not(.reader-page):not([data-page=home]) main {
    padding: 12px;
    border-radius: 10px;
  }
  body.pilot-layout .pilot-page-title {
    font-size: 26px;
    margin-bottom: 12px;
  }
  body.pilot-layout.reader-page:not(.r-focused) .r-layout-frame {
    width: var(--pilot-width);
    margin-inline: auto;
  }
}
@media print {
  body.pilot-layout::before {
    display: none;
  }
}

body.pilot-layout .motto {
  width: var(--pilot-width);
  max-width: 1980px;
  margin: 18px auto 14px;
  border: 1px solid var(--r-border, var(--line));
  border-radius: 12px;
  background: var(--r-panel, var(--paper-raised));
}
@media (max-width: 760px) {
  body.pilot-layout .motto {
    margin-bottom: 12px;
    border-radius: 10px;
  }
}

body.pilot-layout.reader-page {
  --pilot-width: min(var(--r-page-width, 96%), 1980px);
}
body.pilot-layout.reader-page .r-layout-frame {
  width: var(--pilot-width);
  max-width: 1980px;
  margin-inline: auto;
}
body.pilot-layout .site-footer {
  width: var(--pilot-width);
  max-width: 1980px;
  margin: 0 auto 14px;
  border-radius: 12px;
}
body.pilot-layout .site-header {
  container-type: inline-size;
  container-name: navigation;
}
@container navigation (max-width: 1040px) {
  .site-header .desktop-nav {
    display: none !important;
  }
  .site-header .menu-toggle {
    display: flex !important;
  }
}
body.pilot-layout .r-toc-tabs button {
  display: flex;
  align-items: center;
  gap: 4px;
}
body.pilot-layout .r-nav-scroll a {
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
}
@media (max-width: 760px) {
  body.pilot-layout.reader-page {
    --pilot-width: calc(100% - 16px);
  }
  body.pilot-layout .site-footer {
    border-radius: 10px;
  }
}
@media (max-height: 420px) {
  body.pilot-layout.reader-page {
    --r-tool-bottom: 68px;
    padding-bottom: var(--r-tool-bottom);
  }
  body.pilot-layout.reader-page .r-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  body.pilot-layout.reader-page .r-sidebar {
    display: none !important;
  }
  body.pilot-layout.reader-page .r-rail {
    position: fixed;
    z-index: 50;
    bottom: 8px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: var(--pilot-width);
    max-width: 1980px;
    padding: 6px;
    border: 1px solid var(--r-border);
    border-radius: 6px;
  }
  body.pilot-layout.reader-page .r-tools {
    position: static;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 0;
    border: 0;
  }
  body.pilot-layout.reader-page .r-paper {
    grid-column: 1;
    grid-row: 1;
  }
  body.pilot-layout.reader-page .r-tool {
    min-height: 44px;
    height: 44px;
  }
  body.pilot-layout.reader-page .r-tool [data-r-label] {
    display: none;
  }
  body.pilot-layout.reader-page .r-dialog {
    top: 8px !important;
    bottom: auto !important;
    max-height: calc(100dvh - 16px) !important;
  }
  body.pilot-layout.reader-page .r-mini-player {
    bottom: calc(var(--r-tool-bottom) + 12px);
  }
}
@media (max-height: 420px) and (max-width: 359px) {
  body.pilot-layout.reader-page { --r-tool-bottom: 116px; }
  body.pilot-layout.reader-page .r-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.pilot-layout[data-page=info] .editorial-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.pilot-layout[data-page=info] .editorial-panel::before,
body.pilot-layout[data-page=info] .editorial-panel::after {
  display: none;
}
body.pilot-layout[data-page=info] .editorial-panel :is(p, ul, ol, h2, h3) {
  max-width: 75ch;
}
body.pilot-layout[data-page=info] .editorial-panel p {
  font-size: 18px;
  line-height: 1.65;
  margin: 0 0 16px;
}
body.pilot-layout[data-page=catalog] > .motto {
  margin-top: 18px;
}
@media (max-width: 760px) {
  body.pilot-layout[data-page=info] .editorial-panel p {
    font-size: 16px;
  }
}

body.pilot-layout .r-sidebar [data-r-chapters] a {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.4;
  text-decoration: none;
}
body.pilot-layout .r-sidebar [data-r-chapters] a[aria-current="page"],
body.pilot-layout .r-sidebar [data-r-chapters] a:hover {
  font-weight: 400;
  text-decoration: none;
}

body.pilot-layout:not(.reader-page):not([data-page=home]) main .page-width,
body.pilot-layout:not(.reader-page):not([data-page=home]) main .wide-width {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
body.pilot-layout.reader-page .pilot-breadcrumb-box {
  background: var(--r-panel);
  border-color: var(--r-border);
}
body.pilot-layout .directory-author-portrait {
  aspect-ratio: 1;
  align-self: center;
}
body.pilot-layout .directory-author-portrait > img,
body.pilot-layout .directory-author-portrait > .author-monogram {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}
body.pilot-layout .author-line img.avatar,
body.pilot-layout .search-result[data-result-author] > a > img {
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

body.pilot-layout .mobile-menu:not([hidden]) {
  display: flex;
  position: absolute;
  flex-direction: column;
  top: var(--nav-height);
  left: calc((100% - var(--pilot-width)) / 2);
  width: var(--pilot-width);
  max-width: 1980px;
  max-height: min(70dvh, 440px);
  margin: 0;
  padding: 12px 16px;
  gap: 10px;
  overflow-y: auto;
  z-index: 50;
  background: var(--paper-raised);
  border: 1px solid var(--gold);
  border-radius: 10px;
  box-shadow: 0 6px 18px #26180025;
}
body.pilot-layout .site-header .menu-toggle {
  margin-left: auto;
}
body.pilot-layout .mobile-menu .nav-library-group,
body.pilot-layout .mobile-menu .nav-personal-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 6px 12px;
}
body.pilot-layout .mobile-menu .nav-personal-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
body.pilot-layout .mobile-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.pilot-layout[data-page=author] .author-intro,
body.pilot-layout[data-page=book] .book-intro {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  padding: 0 0 20px;
  gap: 24px;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) minmax(220px, 25%);
}
body.pilot-layout[data-page=author][data-author-group=true] .author-intro {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 25%);
}
body.pilot-layout .author-heading,
body.pilot-layout .book-summary {
  padding-top: 0;
}
body.pilot-layout .author-heading h1,
body.pilot-layout .book-summary h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
}
body.pilot-layout .author-heading h1 strong {
  font: inherit;
}
body.pilot-layout .book-summary .main-author {
  font-size: 22px;
  line-height: 1.3;
}
body.pilot-layout[data-page=book] .large-cover img {
  height: auto;
  max-height: 300px;
  object-position: center top;
}
body.pilot-layout[data-page=book] .book-below {
  padding: 20px 0 0;
}

@media (max-width: 1100px) {
  body.pilot-layout[data-page=author] .author-intro,
  body.pilot-layout[data-page=book] .book-intro {
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  }
  body.pilot-layout[data-page=author] .author-reading-route,
  body.pilot-layout[data-page=book] .book-facts {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  body.pilot-layout[data-page=author] .author-intro,
  body.pilot-layout[data-page=author][data-author-group=true] .author-intro,
  body.pilot-layout[data-page=book] .book-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  body.pilot-layout[data-page=book] .large-cover {
    width: 160px;
    margin-inline: auto;
  }
  body.pilot-layout .book-summary .main-author {
    font-size: 19px;
  }
  body.pilot-layout .mobile-menu a {
    font-size: 15px;
  }
}
@media (min-width: 761px) and (min-height: 421px) and (max-height: 560px) {
  body.pilot-layout.reader-page:not(.r-focused) .r-sidebar {
    display: none;
  }
  body.pilot-layout.reader-page:not(.r-focused):not(.r-panel-reserve) .r-shell {
    grid-template-columns: minmax(0, 1fr) 80px;
    gap: 12px;
  }
}

body.pilot-layout[data-page=reader] { --r-size: 18px; --r-text-width: 820px; }
body.pilot-layout[data-page=reader] .r-paper {
  padding-inline: clamp(48px, 6cqw, 96px);
}
body.pilot-layout[data-page=reader] :is(.r-sidebar, #r-toc-dialog) [data-r-chapters] a,
body.pilot-layout[data-page=reader] :is(.r-sidebar, #r-toc-dialog) [data-r-chapters] a[aria-current=page],
body.pilot-layout[data-page=reader] :is(.r-sidebar, #r-toc-dialog) [data-r-chapters] a:hover {
  font: 400 14px/1.5 "Times New Roman", Georgia, serif;
  text-transform: none;
  text-decoration: none;
  padding: 10px 10px;
}
@media (max-width: 760px) {
  body.pilot-layout[data-page=reader] .r-paper { padding-inline: 20px; }
}
@media print {
  body.pilot-layout[data-page=reader] .r-paper { padding-inline: 0; }
}

body.pilot-layout[data-page=reader] .r-chapter-nav [aria-disabled=true]{opacity:.45;pointer-events:none}
body.pilot-layout[data-page=info] main.content-section{padding-inline:clamp(32px,6vw,112px)}
body.pilot-layout[data-page=info] main.content-section>:is(.pilot-page-title,.editorial-panel,details){width:100%;max-width:900px;margin-inline:auto}
body.pilot-layout[data-page=info] .editorial-panel :is(p,ul,ol,h2,h3){max-width:none}
@media(max-width:760px){body.pilot-layout[data-page=info] main.content-section{padding-inline:24px}}
@media(max-width:360px){
  body.pilot-layout[data-page=info] main.content-section{padding-inline:20px}
  body.pilot-layout[data-page=reader] .r-chapter-nav{flex-wrap:nowrap}
  body.pilot-layout[data-page=reader] .r-chapter-nav .button{padding-inline:8px}
  body.pilot-layout[data-page=reader] .r-chapter-nav .r-icon{display:none}
}

/* One gap owner between content and motto panels. */
body.pilot-layout:not(.reader-page)>main:has(+.motto){margin-bottom:0}

body.pilot-layout[data-page=book] .book-below {
  row-gap: 24px;
}
body.pilot-layout[data-page=book] .book-below > .edition {
  grid-column: 1 / -1;
  margin: 4px 0 8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
body.pilot-layout[data-page=book] .edition > summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
}
body.pilot-layout[data-page=book] .edition[open] > summary {
  margin-bottom: 12px;
}
body.pilot-layout[data-page=book] .edition > :last-child {
  margin-bottom: 0;
}

/* Author context and work history use the existing book-room typography. */
body.pilot-layout[data-page=book] .book-facts > h2 { text-align: center; }
body.pilot-layout[data-page=author] .author-context-text { max-width: 55rem; overflow-wrap: anywhere; }
.author-context-text h3, .work-history h3 { font-size: 1.45rem; line-height: 1.35; margin: 1.5em 0 .6em; }
.author-context-text p, .work-history p { font-size: 1.15rem; line-height: 1.8; margin: 0 0 1em; }
.author-context-text ul, .work-history ul { padding-left: 1.4em; line-height: 1.65; }
.author-context-text figure { max-width: 100%; margin: 1.4em 0; }
.author-context-text img { max-width: 100%; height: auto; }
.portrait-attribution { font-size: 12px; line-height: 1.45; margin-top: 10px; }
.portrait-attribution > summary { cursor: pointer; padding: 6px 0; color: var(--muted); }
.portrait-attribution p { overflow-wrap: anywhere; margin: 8px 0; }
.portrait-frame > img[data-portrait-fit="contain"] { object-fit: contain; }
.author-context-text .editorial-sources, .work-history .editorial-sources {
  font-size: .82em; line-height: 1.5; color: var(--muted); margin-top: 1.4em;
}
body.pilot-layout[data-page=book] .book-below > .work-history {
  grid-column: 1 / -1; padding: 24px 28px; border: 1px solid var(--line);
}
.work-history > h2 { margin: 0 0 1em; }
.work-history .history-copy { max-width: 55rem; }
@media (max-width: 600px) {
  body.pilot-layout[data-page=book] .book-below > .work-history { padding: 18px 16px; }
}

/* Comfortable author copy and a full-width book contents section. */
body.pilot-layout[data-page=author] :is(#biography, #creativity) {
  box-sizing: border-box;
  width: 100%;
  max-width: 62rem;
  margin-inline: auto;
  padding: 20px clamp(18px, 5vw, 64px) 8px;
}
body.pilot-layout[data-page=author] .author-context-text {
  max-width: none;
}
body.pilot-layout[data-page=book] .book-below {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
body.pilot-layout[data-page=book] .book-below > div + div {
  margin-top: 0;
}
body.pilot-layout[data-page=book] .toc-preview {
  border: 0;
  overflow: visible;
  column-gap: 24px;
}
body.pilot-layout[data-page=book] .toc-preview > a {
  break-inside: avoid;
  min-height: 44px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: .2rem;
}
@media (min-width: 761px) {
  body.pilot-layout[data-page=book] .toc-preview:has(> a:nth-child(7)) {
    column-count: 2;
  }
}
@media (min-width: 1280px) {
  body.pilot-layout[data-page=book] .toc-preview:has(> a:nth-child(13)) {
    column-count: 3;
  }
}
body.pilot-layout[data-page=catalog] .catalog-layout {
  padding-top: 14px;
}
body.pilot-layout[data-page=catalog] .pilot-page-title {
  margin-bottom: 10px;
}
body.pilot-layout .motto {
  position: relative;
}
.site-back-top {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #c2a265;
  border-radius: 5px;
  background: #fcf9f1;
  color: #164333;
  font: 16px/1.25 "Times New Roman", Georgia, serif;
  text-decoration: none;
  box-shadow: 0 2px 6px #3323130c;
}
.site-back-top svg {
  flex: none;
  width: 18px;
  height: 18px;
}
.site-back-top:hover {
  background: #f4ecd9;
  border-color: #a6813b;
}
.site-back-top:focus-visible {
  outline: 2px solid #164333;
  outline-offset: 4px;
}
@media (max-width: 760px) {
  body.pilot-layout[data-page=catalog] .catalog-layout { padding-top: 12px; }
  body.pilot-layout[data-page=catalog] .pilot-page-title { margin-bottom: 8px; }
  .site-back-top {
    position: static;
    transform: none;
    width: max-content;
    min-height: 44px;
    margin: 16px auto 0;
    font-size: 15px;
  }
}
@media print {
  .site-back-top { display: none !important; }
}

body.reader-page .r-backdrop {
  --pilot-room-width: max(116vw, 133.333333vh);
  background-size: var(--pilot-room-width) auto !important;
  background-position: calc(50% + var(--pilot-room-width) * .06285) top;
}
body.pilot-layout.reader-page .r-tools .r-toolbar-top {
  text-decoration: none;
}
@media (min-width: 761px) and (min-height: 421px) {
  body.pilot-layout.reader-page .r-tools > .r-tool {
    height: clamp(46px, calc((100dvh - 120px) / 8), 64px);
  }
}
@media (max-width: 760px) {
  body.pilot-layout.reader-page { --r-tool-bottom: 132px; }
  body.pilot-layout.reader-page .r-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  body.pilot-layout.reader-page { --r-tool-bottom: 116px; }
}
@media (max-height: 420px) {
  body.pilot-layout.reader-page { --r-tool-bottom: 68px; }
  body.pilot-layout.reader-page .r-tools { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-height: 420px) and (max-width: 429px) {
  body.pilot-layout.reader-page { --r-tool-bottom: 116px; }
  body.pilot-layout.reader-page .r-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
