@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --night: #0e151d;
  --panel: #17222a;
  --ivory: #f5efe3;
  --muted: #bdc5c6;
  --gold: #edca8e;
  --sea: #a5ded1;
  --line: #344348;
  --max: 78rem;
  --gutter: clamp(1.15rem, 5.4vw, 5.75rem);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  font: 100%/1.55 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--night);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, figure, pre, blockquote { margin-block: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.04; }
img { max-width: 100%; height: auto; }
a { color: var(--sea); text-underline-offset: .23em; text-decoration-thickness: 1px; }
a:hover { color: #e5fff7; }
:focus-visible { outline: 3px solid #ffc879; outline-offset: 4px; }
::selection { background: #386960; color: white; }
.skip { position: absolute; left: 1rem; top: -10rem; z-index: 4; padding: .6rem 1rem; background: var(--night); }
.skip:focus { top: .5rem; }
.masthead { background: #101820; border-bottom: 1px solid #303e42; }
.mast-inner, .colophon-inner {
  width: min(100%, calc(var(--max) + var(--gutter) * 2));
  padding-inline: var(--gutter);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 2rem;
}
.mast-inner { min-height: 4.55rem; padding-block: .75rem; }
.brand, .footer-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ivory); font: 1.68rem/1 var(--serif); text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 50%; border: 1px solid #aa8550; width: 2.6rem; height: 2.6rem; object-fit: cover; }
.masthead nav, .colophon-inner > div { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.masthead nav { justify-content: end; font-size: .9rem; }
.masthead nav > a, .colophon a { color: #e0e2da; text-decoration: none; }
.masthead nav > a:hover, .colophon a:hover { color: var(--gold); text-decoration: underline; }
.masthead nav > span { color: var(--gold); padding-right: .75rem; border-right: 1px solid #485351; font-size: .85rem; }
.masthead nav a[aria-current="page"] { color: var(--gold); text-decoration: underline; text-underline-offset: .4em; }
.masthead .usb-link { color: var(--gold); border: 1px solid #846e4d; padding: .33rem .8rem; border-radius: .22rem; }

.hero {
  isolation: isolate;
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(29rem, 35.5vw, 37rem);
  overflow: hidden;
  background: #121d28 url("guide-hero.webp") center 42% / cover no-repeat;
  border-bottom: 1px solid #8d764d;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(6 15 22 / 91%) 0%, rgb(8 18 26 / 79%) 28%, rgb(9 17 24 / 25%) 49%, transparent 70%);
}
.hero-content { width: min(100%, calc(var(--max) + var(--gutter) * 2)); padding: 2.5rem var(--gutter) 2.9rem; margin: auto; }
.version { display: flex; align-items: center; gap: .65rem; color: #f0cf94; font: 600 .8rem/1.3 system-ui, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.version::before { content: ""; width: 2rem; height: 1px; background: var(--gold); }
.hero h1 { width: fit-content; margin: .95rem 0 1.05rem; color: #fff8e9; font-size: clamp(4.7rem, 6.9vw, 7.6rem); line-height: .88; letter-spacing: -.025em; }
.hero h1 em { color: #f0cf96; font-weight: 400; }
.hero-intro { max-width: 23.8rem; color: #e2e3db; font-size: clamp(1.02rem, 1.35vw, 1.17rem); line-height: 1.55; }
.hero-actions { margin-top: 1.65rem; display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.35rem; }
.primary, .secondary { min-height: 2.85rem; display: inline-flex; align-items: center; justify-content: center; font-size: .97rem; font-weight: 650; }
.primary { padding: .66rem 1.25rem; border-radius: .2rem; color: #1d1b17; background: #edca8e; text-decoration: none; }
.primary:hover { color: #191917; background: #ffdfa7; }
.secondary { color: #f6eddb; text-decoration-color: #b0956d; text-underline-offset: .35rem; }
.secondary:hover { color: white; }
.inset { padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); }
.table-guide { padding-block: 3.65rem 3.9rem; background: #16212a; background-image: radial-gradient(ellipse at 50% 100%, #1b2e31, transparent 70%); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 2rem; }
.section-heading h2, .references h2 { color: var(--ivory); font-size: clamp(2.8rem, 4.3vw, 4.25rem); letter-spacing: -.025em; }
.text-link { white-space: nowrap; text-underline-offset: .35rem; color: var(--gold); }
.dial-shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.3rem, 3.6vw, 3.7rem); }
.move {
  min-width: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 1.15rem;
  padding: 1.6rem .5rem 0;
  border-top: 1px solid #536260;
  text-align: center;
  text-decoration: none;
  color: var(--ivory);
}
.dial-well {
  display: block;
  width: min(100%, clamp(8.7rem, 14vw, 13rem)); aspect-ratio: 1;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from -40deg, #a18a60, #384953 19%, #111c21 34%, #556862 58%, #a38e62 77%, #26353b 90%, #a18a60);
  box-shadow: 0 .85rem 1.8rem -.65rem #060c12;
}
.dial-well img { display: block; width: 100%; border: 3px solid #10171c; border-radius: 50%; }
.move:hover { color: var(--gold); border-color: #b49460; }
.move:hover strong { text-decoration: underline; text-underline-offset: .16em; text-decoration-thickness: 1px; }
.move-text { display: grid; justify-items: center; gap: .38rem; }
.move strong { font: 400 clamp(1.9rem, 3vw, 2.6rem)/1.05 var(--serif); }
.move-text > span { max-width: 26ch; color: #c1cece; font-size: 1rem; line-height: 1.5; }
.references { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; padding-block: 3.4rem 4rem; border-top: 1px solid #33484a; }
.reference-version > p { max-width: 39rem; color: var(--muted); margin-block: .85rem; }
.version-list { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; }
.version-list a { display: block; color: var(--gold); border: 1px solid #655c46; border-radius: .2rem; padding: .45rem .75rem; text-decoration: none; font-size: .94rem; }
.version-list a:hover { border-color: var(--gold); }
.reference-links { padding-left: clamp(1rem, 4vw, 5rem); }
.reference-links a { display: block; padding: .78rem 0; border-bottom: 1px solid var(--line); color: #d2e7df; text-decoration: none; }
.reference-links a:hover { color: var(--gold); text-decoration: underline; }

.reading-layout {
  max-width: calc(var(--max) + var(--gutter) * 2);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
  align-items: start;
  gap: clamp(2rem, 5vw, 6rem);
  margin: auto;
  padding: clamp(2.5rem, 5vw, 4.8rem) var(--gutter) 5rem;
}
.reading { width: 100%; min-width: 0; color: #e8e5dc; overflow-wrap: anywhere; }
.reading > * + *, .reading li > * + * { margin-top: .9rem; }
.reading h1 { text-wrap: balance; max-width: 21ch; margin: -.12em 0 .85rem; color: #f5ebd4; font-size: clamp(3.1rem, 5.3vw, 5.9rem); letter-spacing: -.033em; }
.reading h2 { font-size: clamp(2.1rem, 3vw, 3.2rem); margin-top: 2.8rem; padding-top: 1.75rem; border-top: 1px solid #42514f; color: #f2deb5; }
.reading h3 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); margin-top: 1.85rem; color: #f0e7d7; }
.reading > p, .reading > ul, .reading > ol { max-width: 74ch; }
.reading p, .reading li { line-height: 1.66; }
.reading ul, .reading ol { padding-left: 1.48rem; }
.reading li + li { margin-top: .52rem; }
.reading ul > li::marker { color: var(--sea); }
.reading ol > li::marker { color: var(--gold); font-weight: 700; }
.reading strong { color: #f3eddf; }
.reading :is(h2, h3, h4) { scroll-margin-top: 1rem; }
.reading code { padding: .1rem .27rem; border-radius: .2rem; background: #253139; color: #e7dec9; font-size: .89em; }
.reading pre { max-width: 100%; padding: 1rem; overflow-x: auto; border-radius: .22rem; background: #17242b; border-left: 2px solid #a78852; color: #f0e6d0; }
.reading pre code { padding: 0; background: none; line-height: 1.6; }
.reading table { display: block; max-width: 100%; overflow-x: auto; border-spacing: 0; margin-block: 1.25rem; font-size: .97rem; }
.reading th, .reading td { vertical-align: top; text-align: left; padding: .75rem .9rem; border-bottom: 1px solid #3e4a48; min-width: 7.25rem; }
.reading th { background: #243138; color: #ebcf9a; font-weight: 650; }
.reading td { background: #172128; }
.reading td img { display: block; width: clamp(8rem, 18vw, 17rem); max-width: none; border-radius: .3rem; }
.reading > p > img, .reading li p img { border-radius: .3rem; }
.contents { position: sticky; top: 1.2rem; min-width: 0; border-top: 2px solid #b39157; background: #172128; }
.contents summary { cursor: pointer; padding: .8rem 1rem; color: #f0d196; font-size: .95rem; font-weight: 650; }
.contents nav { overflow: auto; max-height: calc(100vh - 6rem); padding: 0 1rem .8rem; border-top: 1px solid #36454a; }
.contents ul { list-style: none; padding: 0; }
.contents ul ul { padding-left: .68rem; }
.contents nav > ul > li:has(> ul) > a { display: none; }
.contents nav > ul > li > ul { padding: 0; }
.contents li { margin: .24rem 0; }
.contents a { display: block; padding: .23rem 0; color: #c7d4d3; line-height: 1.37; text-decoration: none; font-size: .95rem; }
.contents a:hover { color: var(--gold); text-decoration: underline; }
.colophon { border-top: 1px solid #364547; background: #0a1118; }
.colophon-inner { padding-block: 1.65rem; }
.independence { max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter) 1.5rem; color: var(--muted); font-size: .92rem; }
.reference-version summary { cursor: pointer; color: var(--sea); }
.colophon .footer-brand { color: #cfc9b9; font-size: 1.4rem; }
.colophon-inner > div { font-size: .88rem; }
@media (max-width: 58rem) {
  .mast-inner { flex-wrap: wrap; }
  .masthead nav { justify-content: start; gap: .5rem .95rem; }
  .reading-layout { display: flex; flex-direction: column; gap: 1.4rem; }
  .contents { order: -1; position: static; width: 100%; }
  .contents nav { max-height: 42vh; }
  .hero { min-height: 29rem; background-position: 57% 45%; }
  .hero::before { background: linear-gradient(90deg, rgb(6 15 22 / 91%), rgb(8 16 24 / 75%) 36%, rgb(9 17 24 / 8%) 77%); }
}
@media (max-width: 41rem) {
  .mast-inner { min-height: 4rem; padding-block: .62rem; }
  .brand { font-size: 1.4rem; }
  .brand img { width: 2.05rem; height: 2.05rem; }
  .masthead nav { gap: .32rem .85rem; font-size: .86rem; }
  .masthead nav > span { display: block; flex-basis: 100%; padding: 0; border: 0; }
  .masthead .usb-link { padding: .23rem .52rem; }
  .hero {
    min-height: 33rem; align-items: end;
    background-size: auto 69%; background-position: 73% 0;
  }
  .hero::before { background: linear-gradient(0deg, #111b25 0%, #111b25 31%, rgb(17 27 37 / 92%) 40%, rgb(17 27 37 / 20%) 65%, transparent 83%); }
  .hero-content { padding-block: 10rem 2rem; }
  .hero h1 { font-size: clamp(4rem, 15vw, 5.6rem); line-height: .89; margin-block: .78rem .85rem; }
  .hero-intro { max-width: 32ch; font-size: 1.02rem; }
  .hero-actions { gap: .5rem 1rem; margin-top: 1.3rem; }
  .hero-actions a { font-size: .94rem; }
  .table-guide { padding-block: 2.3rem 2rem; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; gap: .25rem; margin-bottom: 1.25rem; }
  .section-heading h2 { flex-basis: 100%; }
  .dial-shelf { display: block; }
  .move { grid-template-columns: minmax(5.6rem, 26%) 1fr; justify-items: start; align-items: center; padding: 1rem 0; gap: 1rem; text-align: left; }
  .dial-well { width: 100%; max-width: 7.8rem; }
  .move-text { justify-items: start; }
  .move-text > span { font-size: .95rem; max-width: 32ch; }
  .references { grid-template-columns: 1fr; gap: 1.4rem; padding-block: 2.2rem; }
  .reference-links { padding-left: 0; }
  .reading-layout { padding-block: 1.45rem 3rem; }
  .reading h2 { margin-top: 2.2rem; padding-top: 1.4rem; }
  .colophon-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 23rem) {
  .mast-inner { align-items: start; }
  .hero { min-height: 32rem; }
  .hero-actions { gap: .2rem .85rem; }
}
@media print {
  .masthead, .contents, .colophon, .skip { display: none; }
  .reading-layout { display: block; padding: 0; }
  .reading, .reading * { color: black; background: white; }
  .reading table, .reading pre { overflow: visible; }
  .reading table { display: table; }
  .reading h2, .reading h3, .reading figure { break-after: avoid; }
}

.archive-notice {
  max-width: var(--max);
  margin: 1.25rem var(--gutter) 0;
  padding: .7rem 1rem;
  border-inline-start: 2px solid #cd9c52;
  background: #1b2931;
}

.chapter{display:flex;align-items:center;justify-content:space-between;gap:clamp(1rem,4vw,4rem);padding:clamp(1.5rem,3.8vw,3.25rem) max(var(--gutter),calc((100% - var(--max))/2));background:linear-gradient(115deg,#1b2d33,#17242a 70%,#24343a);border-bottom:1px solid #455451}
.chapter p{color:var(--gold);font-size:.85rem;margin:0 0 .55rem}
.chapter h1{font-size:clamp(2.7rem,5.3vw,5.15rem);letter-spacing:-.027em;max-width:23ch}
.chapter img{width:clamp(4rem,10vw,7rem);height:auto;flex:none;object-fit:contain}
@media(max-width:41rem){.chapter{gap:.7rem}.chapter h1{font-size:clamp(2.38rem,8vw,3.15rem)}.chapter img{width:3.8rem}.masthead nav{justify-content:start}.contents{max-width:100%}}
@media print{.chapter{color:black;background:white;border:0;padding:0}.chapter p{color:black}.chapter img{display:none}}

.hero { grid-template-columns:minmax(0,.9fr) minmax(12rem,1.1fr);
  grid-template-rows:auto; gap:clamp(1.5rem,4vw,5rem);
  padding:clamp(2.8rem,6vw,5rem) max(var(--gutter),calc((100% - var(--max)) / 2)); }
.hero-content { padding:0; width:auto; margin:0; }
.hero-instrument { margin:0; justify-self:start; display:grid; justify-items:center; gap:.9rem; }
.hero-instrument img { width:clamp(10rem,20vw,17rem); border-radius:50%; border:5px solid #182124;
  outline:1px solid #a39170; box-shadow:0 .7rem 1.9rem #050c10a8; }
.hero-instrument figcaption { padding:.2rem .6rem; background:#101920e8; border-radius:.2rem; color:var(--ivory); font-size:.87rem; }
.hero-instrument span { color:var(--gold); margin:0 .15rem; }
.setup-path { display:flex; align-items:center; justify-content:space-between; gap:2rem; padding-block:2rem;
  border-bottom:1px solid var(--line); background:#17262d; }
.setup-path h2 { font-size:clamp(2rem,3vw,2.8rem); }
.setup-path p { max-width:53ch; color:var(--muted); margin-top:.45rem; }
.setup-routes { display:flex; align-items:center; flex-wrap:wrap; gap:.3rem 1.1rem; }
.setup-routes a { display:inline-flex; align-items:center; min-height:2.75rem; color:var(--sea); }
.reading figure img,.reading p img { height:auto; }
.contents a { padding-block:.35rem; }
@media(max-width:47rem){
  .hero { min-height:0; grid-template-columns:minmax(0,1fr) minmax(4rem,.45fr);
    padding-block:2.25rem; gap:.9rem; background-size:cover; background-position:62% center; }
  .hero::before { background:linear-gradient(90deg,#0d1720f2 0%,#0d1720d9 44%,#0d17206b 100%); }
  .hero h1 { font-size:clamp(3.35rem,10vw,5.2rem); }
  .hero-instrument img { width:clamp(5rem,20vw,9rem); border-width:3px; }
  .hero-instrument figcaption { font-size:.74rem; text-align:center; }
  .setup-path { align-items:start; flex-direction:column; gap:.55rem; padding-block:1.5rem; }
  .reading table { font-size:.92rem; }
  .reading :is(th,td) { min-width:0; padding:.55rem .6rem; }
  .reading td img { min-width:5.4rem; width:min(30vw,12rem); max-width:100%; }
}
@media(max-width:32rem){
  .hero { grid-template-columns:minmax(0,1fr) clamp(4.3rem,20vw,6.2rem); grid-template-rows:auto auto; gap:0 1rem; }
  .hero-content { display:contents; }
  .hero-content .version { grid-column:1/-1; margin:0; letter-spacing:.06em; font-size:.72rem; }
  .hero-content h1 { grid-column:1; grid-row:2; font-size:clamp(2.95rem,12vw,4.2rem); }
  .hero-instrument { grid-column:2; grid-row:2; align-self:center; }
  .hero-instrument figcaption { display:none; }
  .hero-content .hero-intro,.hero-content .hero-actions { grid-column:1/-1; }
}

.guide-menu>summary { display:none; }
@media(max-width:58rem){
  .mast-inner { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.5rem; align-items:center; }
  .guide-menu>summary { display:block; list-style:none; cursor:pointer; padding:.65rem .1rem .65rem .7rem; color:var(--gold); font-size:.92rem; }
  .guide-menu>summary::-webkit-details-marker { display:none; }
  .guide-menu>summary::after { content:""; display:inline-block; width:.4rem; height:.4rem; margin:0 .22rem .17rem .55rem;
    border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
  .guide-menu[open]>summary::after { transform:rotate(225deg); }
  .mast-inner:has(.guide-menu[open]) { grid-template-columns:1fr; }
  .guide-menu[open] nav { border-top:1px solid var(--line); padding:.4rem 0; }
  .guide-menu nav a { display:inline-flex; min-height:2.75rem; align-items:center; }
  .guide-menu[open]>summary { position:absolute; right:var(--gutter); top:.55rem; }
}
