:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --surface: #fffefb;
  --ink: #263932;
  --muted: #52635a;
  --border: #e3e5dd;
  --line: #cbd1c6;
  --forest: #2f5143;
  --accent: #b85d40;
  --accent-text: #8f452e;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--sans);
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
}

button, input, select {
  font: inherit;
}

a {
  color: var(--forest);
  text-underline-offset: .2em;
}

a:hover {
  text-decoration-thickness: .12em;
}

:focus-visible {
  outline: .16rem solid var(--accent-text);
  outline-offset: .23rem;
}

.skip-link {
  position: fixed;
  z-index: 2;
  inset: .65rem auto auto .65rem;
  max-inline-size: calc(100% - 1.3rem);
  overflow-wrap: anywhere;
  padding: .5rem .9rem;
  transform: translateY(-160%);
  border-radius: .2rem;
  background: var(--surface);
}

.skip-link:focus {
  transform: none;
}

.site-shell {
  width: min(calc(100% - 2 * clamp(1rem, 5vw, 5rem)), 78rem);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner, .footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 2rem;
}

.header-inner {
  padding-block: .9rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font: 600 1.32rem/1.1 var(--serif);
  text-decoration: none;
}

.brand-detail {
  display: block;
  margin-top: .28rem;
  color: var(--muted);
  font: 650 .68rem/1.12 var(--sans);
  letter-spacing: .13em;
  text-transform: uppercase;
}

.studio-mark {
  display: block;
  flex: none;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(1rem, 2.7vw, 2.15rem);
}

.site-nav a {
  display: block;
  padding-block: .65rem;
  color: var(--muted);
  font-size: .91rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover, .site-nav a[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: .12em;
  text-underline-offset: .45em;
}

.eyebrow {
  margin: 0 0 .96rem;
  color: var(--accent-text);
  font-size: .76rem;
  font-weight: 720;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7em;
  min-height: 2.75rem;
  padding: .57em .93em;
  border: 1px solid transparent;
  border-radius: .26rem;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
}

.action-primary {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--surface);
}

.action-primary:hover {
  border-color: var(--ink);
  background: var(--ink);
}

.action-secondary {
  border-color: var(--line);
}

.action-secondary:hover {
  border-color: var(--forest);
  background: var(--surface);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}

.footer-inner {
  padding-block: 1.3rem;
}

.studio-home {
  --paper: #f7f4eb;
  --ink: #252e29;
  --line: #d7d3c7;
  --accent-text: #914e34;
  --forest: #274d3e;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(2rem, 5.4vw, 5.4rem);
  padding-block: clamp(2.35rem, 5.2vw, 5rem);
}

.hero-copy h1 {
  font-size: clamp(3.25rem, 2.2rem + 3.7vw, 6.1rem);
  letter-spacing: -.06em;
  line-height: .98;
}

.hero-copy h1 em { color: var(--accent-text); font-weight: 400; }
.hero-copy .eyebrow { margin-bottom: 1rem; }
.hero-intro { max-width: 38ch; margin: 1.3rem 0 1.6rem; color: var(--muted); font-size: clamp(1.04rem, .96rem + .35vw, 1.24rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.studio-home .action { border-radius: .3rem; }
.studio-home .action-secondary { border-color: #bbc2b5; }

.rhythm-plate {
  margin: 0;
  min-width: 0;
  padding: clamp(1rem, 2.6vw, 2.05rem);
  border: 1px solid #203d32;
  border-radius: .55rem;
  background: #254a3c;
  color: #fff7df;
}
.plate-top, .plate-key, .plate-link { display: flex; align-items: center; flex-wrap: wrap; }
.plate-top { justify-content: space-between; gap: .4rem 1rem; color: #d8e6d5; font-size: .75rem; letter-spacing: .065em; font-weight: 650; }
.rhythm-plate h2 { margin: .6rem 0 .55rem; font-size: clamp(1.6rem, 1.15rem + 1.3vw, 2.4rem); letter-spacing: -.03em; }
.dial-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(.35rem, 2vw, 1.6rem); align-items: center; padding: .6rem 0 .9rem; }
.pulse-dial { position: relative; width: 100%; max-width: 14.4rem; aspect-ratio: 1; justify-self: center; color: #eadfbd; }
.dial-ticks, .dial-ring, .pulse-mark { position: absolute; display: block; }
.dial-ticks {
  inset: 10%;
  border-radius: 50%;
  background: repeating-conic-gradient(from -.4deg, #c4cbaa 0deg .8deg, transparent .8deg 15deg);
  mask-image: radial-gradient(circle closest-side, transparent 89%, #000 90%);
}
.dial-ring { inset: 14%; border: 1px solid #b0ba9a; border-radius: 50%; }
.dial-ring::before, .dial-ring::after { position: absolute; content: ""; border: 1px solid #759079; border-radius: inherit; }
.dial-ring::before { inset: 7%; opacity: .7; }
.dial-ring::after { inset: 15%; opacity: .5; }
.pulse-mark { inset: 0; transform: rotate(calc(var(--pulse) * 15deg)); }
.pulse-mark::after {
  position: absolute;
  top: 14%; left: 50%;
  width: 4.8%; aspect-ratio: 1;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: #fff0c9;
  content: "";
}
.pulse-mark.is-possible::after {
  width: 6%; border-radius: 0; background: #ffae81;
  transform: translate(-50%,-50%) rotate(calc(45deg - var(--pulse) * 15deg));
}
.dial-axis { position: absolute; z-index: 1; font: 650 clamp(.64rem, .72vw, .84rem)/1 var(--sans); color: #d2dcc5; }
.axis-zero, .axis-twelve { left: 50%; transform: translateX(-50%); }
.axis-zero { top: 0; }
.axis-twelve { bottom: 0; }
.axis-six, .axis-eighteen { top: 50%; transform: translateY(-50%); }
.axis-six { right: 0; }
.axis-eighteen { left: 0; }
.dial-number { position: absolute; inset: 0; display: grid; place-content: center; color: #ffbb93; font: italic clamp(1.7rem,4.4vw,4.2rem)/1 var(--serif); }
.plate-key { gap: .35rem 1.15rem; padding: .55rem 0; border-block: 1px solid #698372; font-size: .78rem; }
.plate-key > span { display: inline-flex; gap: .42rem; align-items: center; }
.plate-key i { flex: none; width: .6rem; height: .6rem; background: #fff0c9; }
.plate-key .known-key { border-radius: 50%; }
.plate-key .possible-key { width: .52rem; height: .52rem; background: #ffae81; transform: rotate(45deg); }
.rhythm-plate figcaption { max-width: 58ch; margin: .65rem 0 .3rem; color: #e4e9dc; font-size: .92rem; }
.plate-link { gap: .6em; width: fit-content; min-height: 2.1rem; color: #fff3d7; font-weight: 680; text-decoration-color: #cca489; }
.plate-link:focus-visible { outline-color: #ffbd95; }

.experiment-shelf { padding-block: clamp(2rem, 3.5vw, 3.6rem); border-top: 1px solid var(--line); }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .65rem 1.2rem; margin-bottom: 1.4rem; }
.shelf-head h2 { font-size: clamp(1.85rem, 1.3rem + 1.8vw, 3.15rem); letter-spacing: -.045em; }
.shelf-rhythm { font-weight: 640; text-decoration-thickness: 1px; }
.study-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; }
.study-card {
  display: grid;
  grid-template-columns: minmax(7.4rem, .68fr) minmax(0,1.4fr) auto;
  align-items: stretch; gap: clamp(.75rem,1.4vw,1.15rem);
  min-width: 0; padding: .65rem .75rem .65rem .65rem;
  border: 1px solid var(--line); border-radius: .4rem;
  background: #fffdf7; color: var(--ink); text-decoration: none;
}
.study-card:hover, .study-card:focus-visible { border-color: var(--forest); }
.study-card:hover h3, .study-card:focus-visible h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; }
.study-copy { align-self: center; padding-block: .4rem; }
.study-copy .study-name { margin: 0 0 .28rem; font-size: .72rem; color: var(--accent-text); font-weight: 720; letter-spacing: .045em; }
.study-copy h3 { font-size: clamp(1.3rem,1.05rem + .7vw,1.9rem); letter-spacing: -.03em; }
.study-copy p { margin: .45rem 0 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.card-arrow { padding-top: .35rem; font-size: 1.1rem; color: var(--accent-text); }
.study-art { position: relative; min-height: 8.8rem; border-radius: .2rem; overflow: hidden; }
.art-baseline { position: absolute; inset: auto .25rem .65rem; text-align: center; font: 650 .68rem/1.1 var(--sans); }
.held-art { background: #dbe5d6; color: #35533e; }
.art-labels { position: absolute; inset: .6rem 14% auto; display: flex; justify-content: space-between; font: 650 .7rem/1 var(--sans); }
.mini-staff { position: absolute; inset: 23% 13% 26%; background: repeating-linear-gradient(0deg,transparent 0 calc(25% - 1px),#a7bca4 calc(25% - 1px) 25%); }
.mini-staff i { position: absolute; left: 4%; right: 4%; border-top: 2px solid currentColor; transform-origin: left center; }
.mini-staff i::before, .mini-staff i::after { content: ""; position: absolute; top: -4px; width: 8px; height: 6px; border-radius: 60%; background: currentColor; }
.mini-staff i::before { left: -2px; } .mini-staff i::after { right: -2px; }
.staff-held { top: 88%; color: #85442d; } .staff-middle { top: 61%; transform: rotate(-8deg); } .staff-high { top: 29%; transform: rotate(-8deg); }
.cycle-art { background: #e5e6d1; color: #505d3c; display: grid; place-items: center; }
.cycle-track { position: absolute; height: 62%; aspect-ratio: 1; top: 9%; border: 1px solid #839172; border-radius: 50%; transform: rotate(-18deg); }
.cycle-track i { position: absolute; width: .37rem; aspect-ratio: 1; border-radius: 100%; background: currentColor; }
.cycle-track i:nth-child(1) { left: 24%; top: 2%; } .cycle-track i:nth-child(2) { right: -2%; top: 38%; }
.cycle-track i:nth-child(3) { right: 23%; bottom: 2%; } .cycle-track i:nth-child(4) { left: 2%; bottom: 21%; }
.cycle-ratio, .register-meter { font: italic clamp(1.45rem,1.8vw,2rem)/1 var(--serif); }
.cycle-ratio { margin-bottom: 1rem; } .cycle-ratio span { color: #8c6441; }
.register-art { background: #e5e7e3; color: #38545a; }
.register-rule { position: absolute; inset: 32% 12% auto; height: .8rem; border-top: 2px dashed #526b6d; background: repeating-linear-gradient(90deg,transparent 0 calc(12.5% - 1px),#849999 calc(12.5% - 1px) 12.5%); }
.register-rule i { position: absolute; inset: -.45rem 22% auto auto; width: .8rem; aspect-ratio: 1; border: 2px solid #38545a; border-radius: 50%; background: #e5e7e3; }
.register-meter { position: absolute; inset: 48% 0 auto; text-align: center; }
.register-meter small { font: 650 .72rem var(--sans); }
.leap-art { background: #efdfce; color: #854932; }
.leap-from, .leap-to { position: absolute; font: italic 1.55rem/1 var(--serif); }
.leap-from { left: 14%; top: 14%; } .leap-to { right: 13%; bottom: 28%; }
.leap-stroke { position: absolute; left: 29%; right: 28%; top: 37%; border-top: 2px solid currentColor; transform: rotate(22deg); }
.leap-stroke::before, .leap-stroke::after { position: absolute; content: ""; top: -.21rem; width: .5rem; height: .33rem; background: currentColor; border-radius: 60%; }
.leap-stroke::before { left: 0; } .leap-stroke::after { right: 0; }

.exchange-art, .bridge-art { display: grid; place-items: center; padding: .4rem .2rem 1.45rem; }
.exchange-art { background: #dfe8e5; color: #305955; }
.swap-notes { display: grid; grid-template-columns: auto auto auto auto; align-items: baseline; gap: .22rem .32rem; line-height: 1; }
.swap-notes span { font: 650 .66rem/1 var(--sans); }
.swap-notes b, .bridge-shapes b { font: italic 1.3rem/1 var(--serif); }
.swap-notes i, .bridge-shapes i { color: inherit; font: .82rem/1 var(--sans); }
.bridge-art { background: #e9e0cc; color: #614b32; }
.bridge-shapes { display: flex; align-items: baseline; justify-content: center; gap: .15rem; }

.quarter-art, .channel-art { display: grid; place-items: center; padding: .4rem .25rem 1.45rem; }
.quarter-art { color: #2f5946; background: #dce9df; }
.step-ruler { display: flex; align-items: end; height: 1.7rem; border-bottom: 1px solid currentColor; }
.step-ruler i { width: .55rem; height: .55rem; border-left: 1px solid currentColor; }
.step-ruler i:nth-child(odd) { height: .85rem; }
.step-ruler b { font: italic 1.7rem/1 var(--serif); }
.channel-art { color: #673d32; background: #f0dfd4; }
.channel-bits { display: flex; align-items: baseline; gap: .02em; font: 1.05rem/1.2 monospace; }
.channel-bits b { border-bottom: 2px solid currentColor; }
.channel-bits span { margin-inline: .15em; }

.rhythm-chapters { display: flex; flex-wrap: wrap; gap: .45rem .65rem; align-items: center; }
.rhythm-chapters a {
  display: inline-block; max-width: 100%; padding: .33em .75em;
  border: 1px solid var(--line); border-radius: .32rem; text-decoration: none;
}
.rhythm-chapters a:hover { border-color: var(--forest); }
.rhythm-chapters a[aria-current] { background: var(--forest); color: white; border-color: var(--forest); }

.seam-art, .sample-art { display: grid; place-items: center; padding: .45rem .35rem 1.5rem; }
.seam-art { color: #3b645f; background: #dfeae4; }
.seam-sketch { width: min(90%, 6rem); display: grid; gap: .45rem; position: relative; }
.seam-sketch::before { content: ""; position: absolute; inset: -.3rem auto -.3rem 50%; border-left: 1px dashed currentColor; }
.seam-sketch i { height: .25rem; border-inline: 2px solid currentColor; border-bottom: 1px solid currentColor; }
.seam-sketch i:nth-child(1) { margin-inline: 32% 50%; }
.seam-sketch i:nth-child(2) { margin-inline: 41% 5%; }
.seam-sketch i:nth-child(3) { margin-inline: 14% 32%; }
.sample-art { color: #754b38; background: #efe1d2; }
.sample-quartet { display: grid; grid-template-columns: repeat(2, .95rem); gap: .32rem; transform: rotate(45deg); }
.sample-quartet i { width: .95rem; height: .95rem; border: 1px solid currentColor; border-radius: 50%; }
.sample-quartet i:first-child { background: currentColor; }

@media (max-width: 56rem) {
  .home-hero { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.5rem; }
  .study-card { grid-template-columns: minmax(0,1fr) auto; gap: .4rem .6rem; }
  .study-art { grid-column: 1 / -1; min-height: 6.25rem; }
  .mini-staff, .register-rule { max-width: 7rem; margin-inline: auto; }
  .leap-from { left: 32%; } .leap-to { right: 32%; } .leap-stroke { left: 40%; right: 40%; }
}
@media (max-width: 44rem) {
  .home-hero { grid-template-columns: 1fr; }
  .hero-copy h1 br { display: none; }
  .hero-copy h1 { max-width: 13ch; }
  .study-grid { grid-template-columns: 1fr; }
  .study-card { grid-template-columns: minmax(5rem,.65fr) minmax(0,1.5fr) auto; gap: .65rem; }
  .study-art { grid-column: auto; }
  .leap-from { left: 14%; } .leap-to { right: 13%; } .leap-stroke { left: 29%; right: 28%; }
}
@media (max-width: 24rem) {
  .study-card { grid-template-columns: minmax(0,1fr) auto; }
  .study-art { grid-column: 1 / -1; }
  .leap-from { left: 32%; } .leap-to { right: 32%; } .leap-stroke { left: 40%; right: 40%; }
}

.studio-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 3rem;
  padding-block: clamp(1.65rem, 3vw, 3rem);
  border-top: 1px solid var(--line);
}

.studio-next > div {
  flex: 1 1 24rem;
  min-width: 0;
}

.studio-next h2 {
  font-size: clamp(1.55rem, 1.3rem + 1vw, 2.3rem);
}

.studio-next p {
  max-width: 60ch;
  margin: .6rem 0 0;
  color: var(--muted);
}

.home-paper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2rem, 5vw, 4.4rem);
  border-top: 1px solid var(--line);
}

.home-paper > div, .paper-routes {
  flex: 1 1 22rem;
  min-width: 0;
}

.home-paper h2 {
  font-size: clamp(1.9rem, 1.5rem + 1.45vw, 3rem);
  letter-spacing: -.025em;
}

.home-paper h2 cite {
  font-style: normal;
}

.paper-credit {
  margin: .45rem 0 0;
  color: var(--accent-text);
  font-weight: 650;
}

.paper-intro {
  max-width: 43ch;
  margin: .9rem 0 1.15rem;
  color: var(--muted);
}

.paper-routes {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.paper-routes li {
  padding-block: .8rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.paper-routes p {
  margin: .35rem 0 0;
  color: var(--muted);
}

.paper-routes .paper-locator {
  margin: 0 0 .35rem;
  font-size: .79rem;
  font-weight: 650;
  letter-spacing: .035em;
}

.paper-routes h3 {
  font-size: clamp(1.25rem, 1.07rem + .56vw, 1.7rem);
}

.paper-routes h3 a span {
  font: .71em var(--sans);
}

@media (max-width: 34rem) {
  .header-inner {
    padding-bottom: .4rem;
  }

  .site-nav {
    flex-basis: 100%;
  }

  .hero-intro {
    margin-block: 1.03rem;
  }
}

/* The two score studies have their own listening entrance. */
.score-shelf { padding-block:clamp(1.7rem,3.2vw,3.1rem); border-top:1px solid var(--line); }
.score-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.15rem; }
.score-feature { display:grid; grid-template-columns:minmax(8rem,.85fr) minmax(0,1.35fr); align-items:stretch; min-width:0; overflow:hidden; border:1px solid #c6cdbf; border-radius:.4rem; background:var(--surface); text-decoration:none; }
.score-feature:hover h3 { text-decoration:underline; text-underline-offset:.14em; }
.score-feature-copy { align-self:center; padding:1.15em; }
.score-feature-copy h3 { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:.25em; font-size:clamp(1.25rem,2vw,1.85rem); }
.score-feature-copy h3 span { font:500 .64em var(--sans); }
.score-feature-copy p { margin:.4em 0 0; color:var(--muted); font-size:.94em; }
.score-print { display:flex; flex-direction:column; justify-content:space-between; gap:1.2em; min-height:10rem; padding:1em .85em; background:#294c3c; color:#f8efcd; }
.score-print > span,.score-print small { font-size:.75em; line-height:1.35; font-weight:650; }
.passing-print small b { font-weight:500; padding:0 .12em; }
.home-voice-line { position:relative; display:flex; align-items:center; height:1.9rem; background:repeating-linear-gradient(to bottom,transparent 0 6px,#76907e 6px 7px); }
.home-voice-line i { position:relative; top:.3rem; display:block; width:46%; height:2px; background:#f7d290; }
.home-voice-line i+i { top:-.13rem; background:#ffc396; }
.home-voice-line i::before,.home-duet i::before { position:absolute; left:0; top:-.18rem; content:""; width:.63rem; height:.44rem; border-radius:50%; transform:rotate(-16deg); background:inherit; }
.choir-print { background:#783d30; color:#fff0d9; }
.home-duet { display:grid; grid-template-columns:auto 1fr; gap:.28rem .48rem; align-items:center; }
.home-duet b { font:italic 1rem/1 var(--serif); }
.home-duet i { position:relative; height:2px; background:#f7c78b; width:90%; }
.home-duet i:nth-child(2) { width:60%; margin-left:30%; }
.score-related { padding:1rem 0; border-top:1px solid var(--line); max-width:74ch; color:var(--muted); }
@media(max-width:58rem) { .score-feature { grid-template-columns:minmax(0,1fr); } .score-print { min-height:8rem; } }
@media(max-width:40rem) { .score-pair { grid-template-columns:minmax(0,1fr); } .score-print { min-height:6.5rem; } }

.reader-footlinks { display:flex; flex-wrap:wrap; gap:.2rem 1.1rem; align-items:center; }
.reader-footlinks a { padding-block:.3rem; }
.reader-return { margin:1rem 0; font-weight:650; }
html.reader-large { font-size:200%; }
