/* Piccolo Reader site: sheet music on a quiet page.
   Colors are the app's own tokens (src/PiccoloReader/Resources/Styles/Colors.xaml). */

/* Music glyphs (SMuFL code points) from Bravura, SIL OFL 1.1: see assets/fonts/OFL.txt.
   The woff2 is a renamed subset; the original Bravura.otf is the fallback. */
@font-face {
  font-family: "Piccolo Music Glyphs";
  src: url("../fonts/piccolo-music-glyphs.woff2") format("woff2"),
       url("../fonts/Bravura.otf") format("opentype");
  font-display: block;
}

:root {
  color-scheme: light dark;

  --bg: #F6F6FA;
  --surface: #FFFFFF;
  --raised: #FFFFFF;
  --outline: #E3E3EC;
  --text: #15151F;
  --text-2: #5C5C70;
  --muted: #6B6B7E;
  --primary: #5B3FD9;
  --on-primary: #FFFFFF;
  --pc: #ECE7FF;
  --on-pc: #432BB0;
  --gold: #C98A12;
  --bar: #FFFFFF;

  --staff: color-mix(in srgb, var(--text) 13%, transparent);
  --staff-strong: color-mix(in srgb, var(--text) 26%, transparent);
  --shadow: 0 1px 2px rgb(21 21 31 / .06), 0 8px 24px -10px rgb(21 21 31 / .14);
  --device: #15151F;
  --paper-dim: none;

  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mark: "Pacifico", "Brush Script MT", cursive;
  --font-music: "Piccolo Music Glyphs";

  --measure: 72ch;
  --wide: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E16;
    --surface: #181824;
    --raised: #22222F;
    --outline: #2E2E3E;
    --text: #F3F3F8;
    --text-2: #A3A3B5;
    --muted: #7A7A8C;
    --primary: #8B6CFF;
    --on-primary: #0E0E16;
    --pc: #2A2340;
    --on-pc: #D3C8FF;
    --gold: #F5B544;
    --bar: #14141E;

    --staff: color-mix(in srgb, var(--text) 10%, transparent);
    --staff-strong: color-mix(in srgb, var(--text) 22%, transparent);
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .7);
    --device: #22222F;
    --paper-dim: brightness(.9);
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--primary); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.wordmark {
  font-family: var(--font-mark);
  font-weight: 400;
  color: var(--primary);
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 .75rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* ---------- Header ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--outline);
}

.masthead__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: .5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  min-height: 48px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}
.brand .wordmark { font-size: 1.6rem; line-height: 1; padding-bottom: .2rem; }
.brand__clef {
  font-family: var(--font-music);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--gold);
  transform: translateY(.18em);
  margin-right: -.1rem;
}
.brand__reader {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .02em;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: .5rem 1rem;
  flex-wrap: wrap;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: .125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .75rem;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
}
.nav__links a:hover { color: var(--text); background: var(--surface); }
.nav__links a[aria-current="page"] {
  color: var(--on-pc);
  background: var(--pc);
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: var(--surface);
}
.lang__opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 38px;
  padding: 0 .6rem;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-2);
  text-decoration: none;
}
.lang__opt:hover { color: var(--text); }
.lang__opt[aria-current] {
  background: var(--primary);
  color: var(--on-primary);
}

.brand { order: 0; }
.nav { order: 1; margin-left: auto; }
.lang { order: 2; }

@media (max-width: 720px) {
  .masthead { position: static; }
  .masthead__inner { padding-block: .5rem .375rem; gap: .25rem .75rem; }
  .lang { order: 1; margin-left: auto; }
  .nav { order: 2; width: 100%; margin-left: -.55rem; }
  .nav__links a { padding: 0 .55rem; }
}

/* ---------- Staff motifs ---------- */

/* Five lines, one staff space apart, with a clef at the start and a final barline at the end. */
.staff-rule,
.prose hr {
  --space: 6px;
  position: relative;
  overflow: visible;
  height: calc(var(--space) * 4 + 1px);
  border: 0;
  background:
    linear-gradient(var(--staff-strong), var(--staff-strong)) left / 1.5px 100% no-repeat,
    linear-gradient(var(--staff-strong), var(--staff-strong)) right / 4px 100% no-repeat,
    linear-gradient(var(--staff-strong), var(--staff-strong)) right 7px top / 1.5px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--staff) 0 1px, transparent 1px var(--space)) 0 0 / 100% 100% no-repeat;
}

.prose hr { margin: 3rem 0; }
.prose hr::after,
.staff-rule span {
  position: absolute;
  left: .6rem;
  top: calc(var(--space) * 3);
  font-family: var(--font-music);
  font-size: calc(var(--space) * 4);
  line-height: 0;
  color: var(--gold);
}
.prose hr::after { content: "\E050" / ""; }
.staff-rule span { top: var(--space); }

.staff-rule {
  max-width: var(--wide);
  margin: clamp(2.5rem, 6vw, 4.5rem) auto;
  width: calc(100% - 2 * var(--gutter));
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow-x: clip;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.hero__staff {
  position: absolute;
  inset: 0;
  pointer-events: none;
  --space: 14px;
  --lines: repeating-linear-gradient(to bottom, var(--staff) 0 1px, transparent 1px var(--space));
  background-image: var(--lines), var(--lines), var(--lines);
  background-size: 100% calc(var(--space) * 4 + 1px);
  background-repeat: no-repeat;
  background-position: 0 14%, 0 50%, 0 86%;
  opacity: .8;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 60%, transparent 92%);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 60%, transparent 92%);
}

.hero__inner {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .9rem;
  line-height: 1;
}
.hero__title .wordmark {
  font-size: clamp(3.75rem, 11vw, 6.75rem);
  line-height: 1.2;
}
.hero__reader {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  letter-spacing: .01em;
  color: var(--text);
}

.hero__pitch {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  line-height: 1.15;
  color: var(--text);
}
.hero__pitch::before {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-bottom: 1rem;
  border-radius: 2px;
  background: var(--gold);
}

.hero__lede {
  max-width: 36rem;
  margin: 1rem 0 0;
  font-size: 1.125rem;
  color: var(--text-2);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.hero__facts li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .8rem .3rem .6rem;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: var(--surface);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
}
.hero__facts li::before {
  content: "";
  width: 1rem;
  height: 1rem;
  flex: none;
  background: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 2rem 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.button--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--primary) 70%, transparent);
}
.button--primary:hover { transform: translateY(-1px); }
.button--ghost {
  border: 1.5px solid var(--outline);
  background: var(--surface);
  color: var(--text);
}
.button--ghost:hover { border-color: var(--primary); }

/* ---------- Sheet-on-a-tablet mock ---------- */

.mock {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 25rem);
}

.mock__device {
  filter: drop-shadow(0 30px 40px rgb(21 21 31 / .22));
  transform: rotate(2.2deg);
  transform-origin: 50% 60%;
}
.mock__svg { display: block; width: 100%; height: auto; }

.mock__bezel { fill: var(--device); }
.mock__screen { fill: var(--bar); }
.mock__icon { stroke: var(--text-2); }
.mock__accent { fill: var(--gold); }
.mock__bartitle {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  fill: var(--text);
}
.mock__paper { filter: var(--paper-dim); }
.mock__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  fill: #15151F;
}
.mock__tempo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 13px;
  fill: #15151F;
}
.mock__music .st { stroke: #15151F; stroke-width: .8; opacity: .75; }
.mock__music .bl { stroke: #15151F; stroke-width: 1; }
.mock__music .ink { fill: #15151F; }
.mock__music .g { font-family: var(--font-music); font-size: 28px; fill: #15151F; }
.mock__pencil { stroke: #5B3FD9; opacity: .9; }
.mock__ribbon { fill: var(--gold); }
.mock__page {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  fill: #6B6B7E;
}
.mock__badge rect { fill: #ECE7FF; stroke: #5B3FD9; stroke-width: 1; }
.mock__badge--selected rect { stroke-dasharray: 3 2.5; fill: #FFFFFF; }
.mock__badgeglyph { font-family: var(--font-music); font-size: 22px; fill: #432BB0; }
.mock__badgeglyph--lg { font-size: 36px; }
.mock__handle { fill: #FFFFFF; stroke: #5B3FD9; stroke-width: 1.5; }

.mock__tools {
  position: absolute;
  left: -1.25rem;
  bottom: 14%;
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .35rem;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: var(--raised);
  box-shadow: var(--shadow);
  color: var(--text-2);
  transform: rotate(-2deg);
}
.mock__tool {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
}
.mock__tool--glyph {
  font-family: var(--font-music);
  font-size: 1.5rem;
  line-height: 1;
}
.mock__tool--active { background: var(--primary); color: var(--on-primary); }
.mock__sep { width: 1px; height: 1.5rem; background: var(--outline); margin: 0 .15rem; }

@media (prefers-reduced-motion: no-preference) {
  .mock__pencil {
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    animation: draw 1.6s .6s cubic-bezier(.6, .1, .3, 1) forwards;
  }
  .mock__ribbon { animation: drop .7s .2s cubic-bezier(.2, .9, .3, 1.2) both; transform-origin: 300px 62px; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes drop { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .mock { width: min(100%, 22rem); margin-top: .5rem; }
}

@media (max-width: 480px) {
  .mock__tools { left: -.25rem; }
}

/* ---------- Movements ---------- */

.movements {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) var(--gutter) 0;
}

.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.005em;
}

.movements__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.movement {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.5rem 1.6rem;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(to bottom, var(--staff) 0 1px, transparent 1px 7px) 0 1.6rem / 100% 29px no-repeat,
    var(--surface);
  box-shadow: var(--shadow);
}
.movement__glyph {
  position: absolute;
  top: calc(1.6rem + var(--at, 3) * 7px);
  right: 1.25rem;
  font-family: var(--font-music);
  font-size: 28px;
  line-height: 0;
  color: var(--gold);
}
.movement__num {
  display: inline-block;
  margin: 0;
  padding: 0 .45rem;
  background: var(--surface);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.6;
  color: var(--primary);
  margin-left: -.45rem;
}
.movement__title {
  margin: 1.4rem 0 .4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.15;
}
.movement__text {
  margin: 0;
  color: var(--text-2);
}

/* ---------- Long-form pages ---------- */

.sheet {
  --sheet-bg: var(--surface);
  position: relative;
  max-width: calc(var(--measure) + 2 * clamp(1.25rem, 6vw, 4.5rem));
  margin: clamp(1.5rem, 4vw, 3rem) auto clamp(3rem, 6vw, 5rem);
  padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.25rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
@media (max-width: 600px) {
  .sheet { border-radius: 0; border-inline: 0; margin-top: 0; }
}

/* Gold bookmark ribbon on every document page. */
.sheet::before {
  content: "";
  position: absolute;
  top: -1px;
  right: clamp(1.25rem, 5vw, 3rem);
  width: 22px;
  height: 64px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
}

.sheet--home { margin-top: 0; }

.prose { max-width: var(--measure); margin: 0 auto; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text);
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}
.prose h1 {
  position: relative;
  margin: .5rem 0 1.75rem;
  padding-bottom: 1.6rem;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  letter-spacing: -.01em;
}
.prose h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(14rem, 60%);
  height: 25px;
  background: repeating-linear-gradient(to bottom, var(--staff-strong) 0 1px, transparent 1px 6px);
}
.prose h2 {
  margin: 2.75rem 0 .9rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}
.prose h3 {
  margin: 2rem 0 .6rem;
  font-size: 1.45rem;
}
.prose h4 { margin: 1.5rem 0 .5rem; font-size: 1.2rem; }

.prose p, .prose ul, .prose ol, .prose table { margin: 0 0 1.1rem; }
.prose strong { font-weight: 700; color: var(--text); }
.prose em { color: var(--text-2); }

/* The language link that opens each legal page becomes a small chip. */
.prose > p:first-child:has(> a:only-child) {
  margin: 0 0 1.25rem;
  font-size: .875rem;
}
.prose > p:first-child:has(> a:only-child) a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 36px;
  padding: 0 .85rem;
  border: 1px solid var(--outline);
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
}
.prose > p:first-child:has(> a:only-child) a::before {
  content: "\E050" / "";
  font-family: var(--font-music);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--gold);
  transform: translateY(.15em);
}
.prose > p:first-child:has(> a:only-child) a:hover { color: var(--text); border-color: var(--primary); }

/* "Last updated" style lines right after the title */
.prose h1 + p,
.prose h1 + p + p {
  margin-bottom: .35rem;
  color: var(--text-2);
}

/* Lists: a small notehead as the bullet. */
.prose ul { padding-left: 1.6rem; }
.prose ul > li { position: relative; margin: .3rem 0; padding-left: .15rem; }
.prose ul > li::marker { content: ""; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: -1.15rem;
  top: .62em;
  width: .5rem;
  height: .38rem;
  border-radius: 50%;
  background: var(--primary);
  transform: rotate(-22deg);
}
.prose ol { padding-left: 1.6rem; }
.prose ol > li { margin: .45rem 0; }
.prose ol > li::marker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15em;
  color: var(--primary);
}
.prose li > ul, .prose li > ol { margin: .3rem 0 .6rem; }

/* Do / don't lists keep their meaning with an icon, not color alone. */
.prose ul.checks > li::before,
.prose ul.crosses > li::before {
  top: .3em;
  left: -1.45rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0;
  transform: none;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.prose ul.checks > li::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background: var(--primary);
}
.prose ul.crosses > li::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background: var(--text-2);
}

/* Quick links on the home page become two cards. */
.prose ul.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: .75rem;
  padding: 0;
  list-style: none;
}
.prose ul.link-cards > li {
  margin: 0;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text-2);
  font-size: .975rem;
}
.prose ul.link-cards > li::before { display: none; }
.prose ul.link-cards strong { display: block; margin-bottom: .25rem; }
.prose ul.link-cards a {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.2;
  text-decoration: none;
}
.prose ul.link-cards a::after { content: " \2192"; font-family: var(--font-body); font-size: 1rem; }
.prose ul.link-cards a:hover { text-decoration: underline; }

/* Tables scroll inside themselves on narrow screens. */
.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: .9375rem;
  line-height: 1.45;
  border: 1px solid var(--outline);
  border-radius: 10px;
}
.prose th, .prose td {
  padding: .65rem .85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--outline);
  min-width: 8rem;
}
.prose thead th {
  background: var(--pc);
  color: var(--on-pc);
  font-weight: 700;
  border-bottom: 0;
}
.prose tbody tr:last-child td { border-bottom: 0; }

.prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .875em;
  padding: .1em .35em;
  border-radius: 5px;
  background: var(--pc);
  color: var(--on-pc);
}
.prose pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: var(--bg);
  font-size: .875rem;
  line-height: 1.5;
}
.prose pre code { padding: 0; background: none; color: var(--text); }

.prose blockquote {
  margin: 1.25rem 0;
  padding: .25rem 0 .25rem 1.1rem;
  border-left: 3px solid var(--gold);
  color: var(--text-2);
}

/* Plain URLs in the legal text should wrap rather than push the page. */
.prose a { word-break: break-word; }

/* ---------- Footer ---------- */

.colophon {
  margin-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--outline);
  background: var(--bar);
}
.colophon__staff {
  position: relative;
  height: 25px;
  margin: 2.5rem var(--gutter) 1.75rem;
  max-width: var(--wide);
  background: repeating-linear-gradient(to bottom, var(--staff) 0 1px, transparent 1px 6px);
}
@media (min-width: 77rem) {
  .colophon__staff { margin-inline: auto; }
}
.colophon__staff span {
  position: absolute;
  top: 18px;
  font-family: var(--font-music);
  font-size: 24px;
  line-height: 0;
  color: var(--gold);
}
.colophon__staff span:first-child { left: .25rem; }
.colophon__staff span:last-child { right: 0; top: 24px; color: var(--text-2); }

.colophon__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}
.colophon__brand { margin: 0; }
.colophon__brand .wordmark { font-size: 1.8rem; }
.colophon__tagline {
  margin: .25rem 0 1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text-2);
}
.colophon__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.colophon__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
.colophon__small { margin: 0; font-size: .875rem; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
