.guide-page {
  --book-navy: #16354a;
  --book-ink: #142e42;
  --book-ice: #edf6fa;
  --book-page: #f5fbfc;
  --book-mint: #9de8c9;
  --book-rule: #aac8d5;
  margin: 0;
  background: var(--book-ice);
  color: var(--book-ink);
}
.fieldbook { width: min(91%, 1190px); margin: 0 auto; padding: clamp(24px, 3.5vw, 54px) 0 clamp(56px, 7vw, 96px); font: 400 var(--text-size)/var(--leading-body) var(--font-village); font-synthesis: none; }
.fieldbook, .fieldbook * { box-sizing: border-box; }
.fieldbook :where(h1, h2, figure, ul, dl, dd) { margin: 0; }
.fieldbook :where(h1, h2) { font-family: inherit; font-style: normal; font-weight: 400; color: inherit; }
html[data-guide] [data-guide-article],
html:not([data-guide]) .book-jacket [data-guide-article]:not([data-guide-article="overview"]) { display: none; }
html[data-guide="overview"] [data-guide-article="overview"],
html[data-guide="registration"] [data-guide-article="registration"],
html[data-guide="village"] [data-guide-article="village"],
html[data-guide="actions"] [data-guide-article="actions"] { display: block; }
.book-jacket { display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; background: var(--book-navy); border: 3px solid var(--book-navy); box-shadow: 0 4px 0 #7aa2b8; }
.jacket-copy { position: relative; align-content: center; padding: clamp(25px, 3.4vw, 46px) clamp(23px, 4.2vw, 66px); color: var(--book-page); }
.jacket-copy::before { content: ''; position: absolute; top: 0; bottom: 0; left: 7px; border-left: 1px solid #446575; border-right: 2px solid #446575; width: 4px; }
.jacket-series { display: inline-block; margin: 0 0 15px; color: #adebd7; font-size: var(--detail-size); text-decoration: none; }
.jacket-series:hover { text-decoration: underline; text-underline-offset: 3px; }
.jacket-copy h1 { font-size: var(--page-title-size); line-height: var(--leading-title); }
.jacket-copy p { max-width: 41ch; margin: 17px 0 0; color: #d8edf1; font-size: var(--text-size); }
.jacket-art { position: relative; min-height: 280px; overflow: hidden; border-left: 3px solid var(--book-navy); }
.jacket-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 48%; }
.jacket-art.jacket-bakery > img { object-position: center 37%; image-rendering: pixelated; }
html[data-guide="registration"] .jacket-portraits { display: flex; isolation: isolate; align-items: flex-end; justify-content: center; background-color: #acd3de; background-image: repeating-linear-gradient(0deg, transparent 0 28px, #6899ab65 28px 29px); padding: 24px 18px 0; }
.jacket-portraits > img { position: relative; inset: auto; width: 35%; height: auto; max-height: 250px; object-fit: contain; object-position: bottom; image-rendering: pixelated; }
.jacket-portraits > img + img { margin-left: -8%; }
.jacket-portraits > img:nth-child(2) { z-index: 1; width: 44%; }
.guide-layout { margin-top: clamp(28px, 4vw, 51px); display: grid; grid-template-columns: minmax(175px, 238px) minmax(0, 1fr); gap: clamp(28px, 6.2vw, 88px); align-items: start; }
.guide-index { position: sticky; top: 22px; min-width: 0; }
.guide-index h2 { padding: 0 0 10px; font-size: var(--panel-title-size); line-height: var(--leading-title); color: var(--book-navy); }
.guide-index h2 img { vertical-align: -.08em; width: .83em; height: .83em; margin-right: .35em; }
.guide-index ul { border-block: 2px solid var(--book-navy); list-style: none; padding: 5px 0; }
.guide-index li + li { border-top: 1px solid var(--book-rule); }
.guide-index a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; text-decoration: none; color: var(--book-navy); font-size: var(--control-size); }
.guide-index a::before { content: ''; flex: 0 0 7px; height: 7px; border: 1px solid #6a8c9b; }
.guide-index a:hover { background: #d3eaf1; }
.guide-index a[aria-current="page"] { background: var(--book-navy); color: #f3fbff; }
.guide-index a[aria-current="page"]::before { border-color: var(--book-mint); background: var(--book-mint); }
.guide-reading { max-width: 770px; min-width: 0; }
.guide-section + .guide-section { margin-top: clamp(30px, 4.5vw, 50px); }
.guide-section h2 { font-size: var(--section-title-size); line-height: var(--leading-title); color: var(--book-navy); }
.guide-section p { max-width: 63ch; margin: 12px 0 0; color: var(--book-ink); }
.guide-section p + p { margin-top: .8em; }
.guide-terms { border-top: 2px solid var(--book-navy); margin: 20px 0 0; }
.guide-terms > div { display: grid; grid-template-columns: minmax(108px, 22%) minmax(0, 1fr); gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--book-rule); }
.guide-terms dt { color: var(--book-navy); }
.guide-terms dd { max-width: 63ch; }
.guide-section :not(pre) > code { font: 500 var(--detail-size)/var(--leading-body) var(--font-code); }
.guide-section strong { font-weight: 400; color: #174f52; background-color: #d9eeeb; }
.guide-section :not(pre) > code { background: #d4e9f2; padding: 1px 4px; overflow-wrap: anywhere; }
.field-folds { border-block: 2px solid var(--book-navy); margin-top: 22px; }
.field-folds details { background: var(--book-page); }
.field-folds details + details { border-top: 1px solid var(--book-rule); }
.field-folds details[open] { background: #d9f0ee; }
.field-folds summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; font-size: var(--panel-title-size); line-height: var(--leading-title); }
.field-folds summary::-webkit-details-marker { display: none; }
.field-folds summary img { width: 41px; height: 41px; flex: none; border: 1px solid #86aeb6; background: #b4d7df; object-fit: cover; image-rendering: pixelated; }
.field-folds summary:hover { background-color: #cde9e7; }
.fold-state { flex: none; margin-left: auto; color: #335267; font-size: var(--detail-size); line-height: var(--leading-body); }
.fold-state::after { content: 'Open'; }
[open] > summary .fold-state::after { content: 'Close'; }
.fold-copy { padding: 0 18px 17px 68px; }
.fold-copy p { margin: 0; }
.fold-copy a, .guide-end a:not(.guide-action) { display: inline-block; padding-block: 8px 4px; color: var(--book-navy); font-size: var(--control-size); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.field-folds details::details-content { overflow: clip; }
@supports (interpolate-size: allow-keywords) {
  .field-folds { interpolate-size: allow-keywords; }
  .field-folds details::details-content { block-size: 0; opacity: 0; transition: block-size .2s ease, opacity .17s ease, content-visibility .2s allow-discrete; }
  .field-folds details[open]::details-content { block-size: auto; opacity: 1; }
}
.guide-snippet { margin: 19px 0; border: 2px solid var(--book-navy); background: #101e30; color: #edfcff; }
.snippet-label { display: flex; justify-content: space-between; padding: 7px 16px; background: #b5d9e3; color: var(--book-navy); font-size: var(--detail-size); line-height: var(--leading-body); }
.guide-snippet pre { overflow: auto; font: 500 var(--detail-size)/var(--leading-body) var(--font-code); padding: 15px 16px; margin: 0; }
.guide-snippet code { font: inherit; }
.guide-end { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin: 29px 0 0; }
.guide-action { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 19px; border: 2px solid var(--book-navy); box-shadow: 2px 3px 0 var(--book-navy); background: var(--book-mint); color: var(--book-navy); text-decoration: none; font-size: var(--control-size); }
.guide-action:hover { background-color: #b6f4d9; }
.fieldbook :where(a, summary, pre):focus-visible { outline: 3px solid #126b82; outline-offset: 3px; position: relative; z-index: 2; }
.book-jacket a:focus-visible { outline-color: #9de8c9; }
@media (max-width: 800px) {
  .fieldbook { width: min(92%, 720px); }
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .guide-index { position: static; }
  .guide-index h2 { padding-bottom: 8px; }
  .guide-index ul { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; border-block: 1px solid #98b6c5; }
  .guide-index li + li { border-top: none; }
  .guide-index a { justify-content: center; min-height: 44px; gap: 8px; padding: 7px; }
  .jacket-art { min-height: 255px; }
}
@media (max-width: 550px) {
  .fieldbook { width: calc(100% - 28px); padding-top: 18px; }
  .book-jacket { grid-template-columns: minmax(0, 1fr); }
  .jacket-copy { padding: 23px 21px 23px 29px; }
  .jacket-copy h1 br { display: none; }
  .jacket-series { margin-bottom: 10px; }
  .jacket-copy p { margin-top: 11px; }
  .jacket-art { height: clamp(100px, 29vw, 140px); min-height: 0; border-left: none; border-top: 2px solid var(--book-navy); }
  html[data-guide="registration"] .jacket-portraits { padding-top: 0; }
  .jacket-portraits > img { height: 100%; width: 26%; }
  .jacket-portraits > img:nth-child(2) { height: 110%; width: 32%; }
  .jacket-portraits > img + img { margin-left: -2%; }
  .guide-layout { margin-top: 24px; gap: 23px; }
  .guide-index ul { display: flex; flex-wrap: wrap; border-left: 1px solid #98b6c5; border-right: 1px solid #98b6c5; }
  .guide-index li { flex: 1 1 45%; }
  .guide-index li:nth-child(n+3) { border-top: 1px solid #98b6c5; }
  .guide-index a { justify-content: start; padding-left: 11px; }
  .guide-terms > div { grid-template-columns: minmax(min-content, 28%) minmax(0, 1fr); gap: 10px; }
  .field-folds summary { gap: 9px; padding: 8px 9px; }
  .field-folds summary img { width: 36px; height: 36px; }
  .fold-copy { padding: 0 12px 12px 54px; }
  .guide-end { margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) { .field-folds details::details-content { transition: none; } }

@media (prefers-reduced-motion: no-preference) {
  .chapter-in-view:not(:focus-within) > h2 { animation: guide-section-entry .32s ease-out both; }
  @keyframes guide-section-entry { from { transform: translateY(6px); opacity: .87; } to { transform: translateY(0); opacity: 1; } }
}
