/* Layout: a guitar teacher's chart pad. The page is one printed sheet, set in
   Atkinson Hyperlegible, that the teacher marks up in pen (Caveat): blue ticks on
   the chords you play, red circles round your answers, a highlighter on the song
   to start with, notes in blue ink. Question numbers sit in the left margin.
   Light only, on purpose: it's paper. */
:root {
  --paper: #FDFDFB;
  --print: #1C1D20;
  --print-2: #5A5E66;
  --rule: #DCDFE4;
  --rule-2: #B4BAC3;
  --margin-line: #E9A4A7;
  --pen: #2341A6;
  --pen-wash: rgba(35, 65, 166, .07);
  --red: #CF2730;
  --hl: rgba(255, 224, 70, .9);
  --binding: #232428;
  --bar-shadow: 0 -12px 26px -20px rgba(28, 29, 32, .55);
  --flyer-shadow: 0 12px 20px -16px rgba(28, 29, 32, .5);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --tick-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M5 22C8 25 12 29 15 33C20 22 27 12 36 4' fill='none' stroke='%232341A6' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --dash-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M7 21C15 19 25 22 33 19' fill='none' stroke='%235A5E66' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
  --cross-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M9 9C16 17 24 25 31 32M31 8C24 16 16 24 9 32' fill='none' stroke='%23CF2730' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");

  --f-print: "Atkinson Hyperlegible", Verdana, "Segoe UI", system-ui, sans-serif;
  --f-pen: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --mw: 2.6rem;   /* width of the left margin */
  --col: 46rem;
  color-scheme: light;
}

/* ---------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--print);
  font: 400 1.0625rem/1.55 var(--f-print);
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:focus-visible { outline: 2.5px solid var(--pen); outline-offset: 3px; border-radius: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }

.skip { position: absolute; left: -999px; top: 0; z-index: 60; padding: .5rem .75rem; background: var(--paper); }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }

/* ---------- the sheet: paper edge to edge, with the binding strip across the top */
body::before { content: ""; display: block; height: 12px; background: var(--binding); }
.pad {
  position: relative;
  max-width: var(--col);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.pad-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem 1rem;
  padding-block: .9rem .75rem;
  border-bottom: 2px dotted var(--rule-2);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { width: 1.35rem; height: 1.35rem; fill: none; stroke: var(--print); stroke-width: 1.5; }
.brand-mark circle { fill: var(--red); stroke: none; }
.head-nav { display: flex; gap: 1.1rem; font-size: .95rem; }
.head-nav a { color: var(--print-2); font-weight: 700; text-decoration: none; }
.head-nav a:hover { color: var(--print); text-decoration: underline; }

.pad-body { position: relative; padding-left: var(--mw); padding-bottom: 1.5rem; }
.pad-body::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(var(--mw) - .8rem);
  width: 1.5px;
  background: var(--margin-line);
}

.pad-foot { display: grid; gap: .55rem; padding: .5rem 0 2.2rem var(--mw); font-size: .88rem; color: var(--print-2); }
.foot-made { color: var(--print); font-weight: 700; }
.strings { display: block; width: 100%; height: 26px; margin-bottom: .5rem; }
.strings path { fill: none; stroke: var(--rule-2); vector-effect: non-scaling-stroke; }

/* ---------- pen marks */
.tick, .loop, .underline { pointer-events: none; overflow: visible; max-width: none; }
.tick path, .loop path, .underline path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1.1;
  stroke-dashoffset: 1.05;
}
.tick path { stroke: var(--pen); stroke-width: 4.5; transition: stroke-dashoffset .25s ease-out; }
.loop { position: absolute; left: -.45rem; top: -.3rem; width: calc(100% + .9rem); height: calc(100% + .6rem); }
.loop path { stroke: var(--red); stroke-width: 3.6; transition: stroke-dashoffset .4s ease-out; }
.underline { position: absolute; left: -.05em; bottom: -.2em; width: calc(100% + .15em); height: .34em; }
.underline path { stroke: var(--red); stroke-width: 3; stroke-dashoffset: 0; }

input:checked + .tile-face .tick path,
input:checked + .check-box .tick path,
input:checked + .opt-face .loop path { stroke-dashoffset: 0; }

/* ---------- chord diagrams */
.cd { display: block; width: 100%; height: auto; overflow: visible; }
.cd-fret { stroke: var(--rule-2); stroke-width: 1.2; }
.cd-string { stroke: var(--print-2); stroke-width: 1; }
.cd-nut { fill: var(--print); }
.cd-open { fill: none; stroke: var(--print); stroke-width: 1.4; }
.cd-mute { fill: none; stroke: var(--print-2); stroke-width: 1.6; stroke-linecap: round; }
.cd-dot, .cd-barre { fill: var(--print); }
.cd-num { fill: var(--paper); font: 700 9px/1 var(--f-print); }
.cd-pos { fill: var(--print-2); font: 700 9.5px/1 var(--f-print); }
.is-new .cd-dot, .is-new .cd-barre { fill: var(--red); }

/* ---------- buttons and small type */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 46px;
  padding: .55rem 1.15rem;
  border: 2px solid var(--print);
  border-radius: 3px;
  background: transparent;
  color: var(--print);
  font: 700 1rem/1.15 var(--f-print);
  text-decoration: none;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2.5px solid var(--pen); outline-offset: 3px; }
.btn-primary { background: var(--red); border-color: var(--red); color: var(--paper); }
.kicker { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--print-2); }
.lede { color: var(--print-2); font-size: 1.08rem; max-width: 34rem; }
.ad {
  display: inline-block; margin-left: .35rem; padding: .08rem .3rem;
  border: 1px solid currentColor; border-radius: 2px;
  font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  vertical-align: .12em;
}

/* ---------- home: intro and questions */
.intro { display: grid; gap: .55rem; padding-block: 1.25rem .8rem; }
.intro h1 { font-size: clamp(1.95rem, 7.6vw, 2.9rem); line-height: 1.06; letter-spacing: -.02em; }
.under { position: relative; white-space: nowrap; }
.intro-sub { color: var(--print-2); max-width: 33rem; }
.circled { position: relative; white-space: nowrap; color: var(--print); font-weight: 700; margin: 0 .3em 0 .12em; }
.circled .loop { left: -.3em; top: -.26em; width: calc(100% + .56em); height: calc(100% + .52em); }
.circled .loop path { stroke-width: 6; stroke-dashoffset: 0; }
.intro-cred { font-size: .9rem; font-weight: 700; }
.intro-cred::before {
  content: ""; display: inline-block;
  width: 1.05em; height: 1.05em; margin-right: .4rem; vertical-align: -.18em;
  background: var(--tick-img) center / contain no-repeat;
}

.q { position: relative; min-width: 0; margin: 0; padding: 1.15rem 0 1.35rem; border: 0; border-top: 1.5px dashed var(--rule); }
.q:first-of-type { border-top: 0; }
.q legend { display: block; width: 100%; padding: 0; margin-bottom: .45rem; font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.q-n, .entry-n {
  position: absolute;
  left: calc(-1 * var(--mw));
  width: calc(var(--mw) - 1rem);
  text-align: center;
  font: 700 2.1rem/1 var(--f-pen);
  color: var(--pen);
}
.q-n { top: .85rem; transform: rotate(-5deg); }
.pen-note { margin: -.2rem 0 .7rem; font: 600 1.3rem/1.15 var(--f-pen); color: var(--pen); }
.q-help { margin-bottom: .65rem; color: var(--print-2); font-size: .95rem; }

.tile, .opt, .check { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tile input, .opt input, .check input {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer;
}
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.3rem, 1fr)); gap: .5rem; }
.tile-face {
  position: relative;
  display: grid; justify-items: center;
  height: 100%;
  padding: .35rem .15rem .4rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: background-color .15s ease, border-color .15s ease;
}
.tile .cd { width: 3rem; }
.tile .cd-num { display: none; }
.tile-name { font-size: 1rem; font-weight: 700; line-height: 1.15; text-align: center; }
.tile-group .tile-name { font-size: .76rem; }
.tile .tick { position: absolute; top: -.6rem; right: -.45rem; width: 2rem; height: 2rem; }
.tile input:checked + .tile-face { background: var(--pen-wash); border-color: var(--pen); }
.tile input:checked + .tile-face .tile-name { color: var(--pen); }
.tile input:checked + .tile-face .cd-dot,
.tile input:checked + .tile-face .cd-barre { fill: var(--pen); }

.opts { display: grid; gap: .35rem; }
.opt-face { position: relative; display: grid; gap: .05rem; padding: .55rem 1.5rem .6rem 2rem; }
.opt .loop { left: -.35rem; top: -.25rem; width: calc(100% + .7rem); height: calc(100% + .5rem); }
.opt-face::before {
  content: ""; position: absolute; left: .45rem; top: .85rem;
  width: .9rem; height: .9rem;
  border: 1.6px solid var(--print-2); border-radius: 50%;
}
.opt input:checked + .opt-face::before { border-color: var(--red); background: radial-gradient(circle, var(--red) 0 38%, transparent 44%); }
.opt-label { font-weight: 700; }
.opt-help { color: var(--print-2); font-size: .92rem; line-height: 1.35; }

.checks { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.check { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .1rem; }
.check-box { position: relative; flex: none; width: 1.15rem; height: 1.15rem; border: 1.6px solid var(--print); border-radius: 2px; }
.check-box .tick { position: absolute; left: -.15rem; top: -.75rem; width: 1.9rem; height: 1.9rem; }
.check-label { font-weight: 700; }

.tile input:focus-visible + .tile-face,
.opt input:focus-visible + .opt-face,
.check input:focus-visible + .check-box { outline: 2.5px solid var(--pen); outline-offset: 3px; }

.love-search { display: grid; gap: .35rem; }
.love-row { display: flex; align-items: flex-end; gap: .6rem; }
.love-go { flex: none; min-height: 44px; padding-inline: 1rem; }
.love-go:disabled { opacity: .55; cursor: progress; }
#love-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: .4rem .15rem .3rem;
  border: 0;
  border-bottom: 2px solid var(--print);
  border-radius: 0;
  background: transparent;
  color: var(--pen);
  font: 600 1.6rem/1.2 var(--f-pen);
  -webkit-appearance: none;
  appearance: none;
}
#love-input::placeholder { color: var(--print-2); font: 400 1rem/1.2 var(--f-print); }
#love-input::-webkit-search-decoration { -webkit-appearance: none; }
#love-input:focus { outline: none; border-bottom-color: var(--pen); }
#love-input:focus-visible { outline: 2.5px solid var(--pen); outline-offset: 4px; }
.love-status { min-height: 1.3em; color: var(--print-2); font-size: .88rem; }
.love-suggest { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--rule-2); }
.love-suggest:empty { display: none; }
.love-suggest li + li { border-top: 1px dashed var(--rule); }
.sugg {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .05rem .7rem;
  width: 100%;
  min-height: 46px;
  padding: .55rem .75rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sugg:hover, .sugg:focus-visible { background: var(--pen-wash); outline: none; }
.sugg-title { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.sugg-meta { grid-column: 1; min-width: 0; color: var(--print-2); font-size: .88rem; }
.sugg-badge {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  padding: .15rem .35rem;
  border: 1px solid var(--pen); border-radius: 2px;
  color: var(--pen);
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
.sugg-typed .sugg-title { font-weight: 400; }
.love-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .2rem; }
.love-list:empty { display: none; }
.love-item { display: flex; align-items: center; gap: .55rem; }
.love-item::before {
  content: ""; flex: none;
  width: 1.15rem; height: 1.15rem;
  background: var(--tick-img) center / contain no-repeat;
}
.love-text { min-width: 0; font: 600 1.4rem/1.15 var(--f-pen); color: var(--pen); overflow-wrap: anywhere; }
.love-by { margin-left: .4rem; color: var(--print-2); font: 400 .9rem/1.2 var(--f-print); }
.love-remove {
  flex: none; margin-left: auto;
  min-width: 44px; min-height: 44px;
  border: 0; background: transparent;
  color: var(--red);
  font: 700 1.6rem/1 var(--f-pen);
  cursor: pointer;
}
.love-remove:focus-visible { outline: 2.5px solid var(--pen); outline-offset: 2px; }
.love-note { margin: .6rem 0 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.pen-box-link { display: inline-block; margin-top: .35rem; font: 700 1rem/1.3 var(--f-print); color: var(--print); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.pen-box.wide { grid-template-columns: minmax(0, 1fr); }

.quiz-end { padding-block: 1.1rem 1.5rem; border-top: 1.5px dashed var(--rule); }

@media (min-width: 40rem) {
  .opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- home: results */
.results { position: relative; padding-block: 1.4rem 1rem; border-top: 3px double var(--rule-2); scroll-margin-top: .5rem; }
.q { scroll-margin-top: .5rem; }
.results-h { font-size: 1.6rem; line-height: 1.1; }
.results-summary { margin-top: .3rem; color: var(--print-2); font-size: .95rem; }
#results-body { display: grid; margin-top: .6rem; }
.empty { padding: 1rem 1.1rem; border: 1.5px dashed var(--rule-2); color: var(--print-2); }

.entries { list-style: none; margin: 0; padding: 0; }
.entry {
  position: relative;
  display: grid; gap: .5rem;
  padding-block: 1rem 1.25rem;
  border-top: 1px solid var(--rule);
  animation: rise .35s ease both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.entry:first-child { border-top: 0; }
.entry-n { top: .95rem; }
.entry.top .entry-n { color: var(--red); }
.entry-flag { justify-self: start; margin-bottom: -.15rem; font: 700 1.4rem/1 var(--f-pen); color: var(--red); transform: rotate(-2deg); transform-origin: left; }
.entry-title { font-size: 1.45rem; line-height: 1.15; }
.entry.top .entry-title { font-size: 1.9rem; letter-spacing: -.015em; }
.entry-title a { text-decoration: none; }
.hl {
  margin: 0 -.2em;
  padding: 0 .2em;
  background-image: linear-gradient(100deg, transparent .8%, var(--hl) 2.5%, var(--hl) 96%, transparent 98.5%);
  background-repeat: no-repeat;
  background-size: 100% 76%;
  background-position: 0 72%;
  border-radius: .2em .5em .3em .45em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.entry-by { color: var(--print-2); font-size: .95rem; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--print-2); }
.entry-tags .tag-new { color: var(--red); }
.shapes { display: flex; flex-wrap: wrap; gap: .3rem .55rem; }
.shape { position: relative; margin: 0; display: grid; justify-items: center; width: 3rem; }
.shape .cd { width: 2.85rem; }
.shape .cd-num { display: none; }
.shape-name { font-size: .85rem; font-weight: 700; line-height: 1.1; }
.shape.is-new .shape-name { color: var(--red); }
.shape .loop { left: -.4rem; top: -.45rem; width: calc(100% + .8rem); height: calc(100% + .8rem); }
.shape.is-new .loop path { stroke-dashoffset: 0; stroke-width: 3.4; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .28rem; font-size: .95rem; line-height: 1.4; }
.ticks li { position: relative; padding-left: 1.55rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .08rem;
  width: 1.15rem; height: 1.15rem;
  background: var(--tick-img) center / contain no-repeat;
}
.ticks li.heads { color: var(--print-2); }
.ticks li.heads::before { background-image: var(--dash-img); }
.ticks li.blocker::before { background-image: var(--cross-img); }
.entry-open {
  justify-self: start; padding-block: .2rem;
  font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px;
}

.pen-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.pen-box .shape { width: 3.5rem; }
.pen-box .shape .cd { width: 3.3rem; }
.pen-box-text { font: 600 1.35rem/1.15 var(--f-pen); color: var(--pen); }
.pen-box-text strong { font-weight: 700; color: var(--red); }

.notyet { border-top: 1px solid var(--rule); }
.notyet summary { padding: .85rem 0; font-weight: 700; cursor: pointer; }
.notyet-list { list-style: none; margin: 0; padding: 0 0 .5rem; display: grid; }
.notyet-list li { display: grid; padding: .5rem 0 .55rem; border-top: 1px dashed var(--rule); }
.notyet-title { font-weight: 700; text-decoration: none; }
.notyet-why { font: 600 1.18rem/1.15 var(--f-pen); color: var(--red); }

/* ---------- home: the two-player example */
.how { display: grid; gap: .7rem; padding-block: 1.6rem .8rem; border-top: 3px double var(--rule-2); }
.how-h { font-size: 1.35rem; line-height: 1.15; }
.how-sub { color: var(--print-2); }
.slips { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: .2rem; }
.slip { display: grid; gap: .45rem; align-content: start; min-width: 0; padding: .85rem .95rem 1rem; background: var(--paper); border: 1px solid var(--rule-2); box-shadow: var(--flyer-shadow); }
.slip:nth-child(1) { transform: rotate(-.6deg); }
.slip:nth-child(2) { transform: rotate(.5deg); }
.slip-label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--print-2); }
.slip-traits { list-style: none; margin: 0; padding: 0; font: 600 1.25rem/1.15 var(--f-pen); color: var(--pen); }
.ex-result { display: grid; gap: .35rem; padding-top: .55rem; border-top: 1px dashed var(--rule); }
.ex-song { justify-self: start; font-size: 1.3rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
.ex-by { color: var(--print-2); font-size: .9rem; }
.ex-wait { color: var(--print-2); }
.how-foot { font-size: .95rem; }

/* ---------- sticky bar */
.page[data-page="home"] { padding-bottom: 4.8rem; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background-color: var(--paper);
  background-image: var(--grain);
  border-top: 2px dotted var(--rule-2);
  box-shadow: var(--bar-shadow);
  transition: transform .25s ease;
}
.actionbar.is-away { transform: translateY(110%); }
@media (min-width: 50rem) {
  .actionbar { left: 50%; right: auto; width: var(--col); transform: translateX(-50%); }
  .actionbar.is-away { transform: translate(-50%, 110%); }
}
.actionbar-inner {
  max-width: var(--col);
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  min-height: 3.6rem;
  padding-block: .45rem calc(.45rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bar-text { display: grid; min-width: 0; line-height: 1.2; }
.bar-main { display: flex; align-items: baseline; gap: .35rem; font-weight: 700; }
.bar-n { font: 700 2.1rem/1 var(--f-pen); color: var(--pen); }
.bar-sub { font-size: .82rem; color: var(--print-2); }
.actionbar .btn { flex: none; }

/* ---------- song page */
.back { padding-top: 1rem; font-size: .95rem; }
.back a { color: var(--print-2); font-weight: 700; text-decoration: none; }
.song-top { display: grid; gap: .55rem; padding-block: .8rem 1.1rem; }
.song-title { font-size: clamp(2.2rem, 9.5vw, 3.5rem); line-height: 1.02; letter-spacing: -.025em; }
.song-by { color: var(--print-2); }
.draft {
  justify-self: start;
  padding: .15rem .55rem .25rem;
  border: 2px solid var(--red); border-radius: 4px;
  font: 700 1.25rem/1 var(--f-pen); color: var(--red);
  transform: rotate(-2.5deg);
}
.fields { list-style: none; margin: .35rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.field { display: flex; align-items: baseline; gap: .45rem; }
.field-k { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--print-2); }
.field-v {
  min-width: 2.6rem; padding: 0 .3rem;
  border-bottom: 1.5px solid var(--print-2);
  text-align: center;
  font: 700 1.55rem/1.05 var(--f-pen); color: var(--pen);
}

.fit { display: grid; gap: .55rem; padding-block: 1rem 1.2rem; border-top: 1px solid var(--rule); }
.fit-h { font: 700 1.8rem/1 var(--f-pen); color: var(--pen); }
.fit-empty { color: var(--print-2); }
.fit-edit { justify-self: start; font-size: .95rem; font-weight: 700; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

.block { display: grid; gap: .65rem; padding-block: 1.2rem 1.3rem; border-top: 1px solid var(--rule); }
.block-h { font-size: 1.3rem; line-height: 1.15; }
.block-sub { margin-top: -.3rem; color: var(--print-2); font-size: .95rem; }
.block > p { max-width: 38rem; }

.chord-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); gap: .9rem .5rem; }
.chord-card { position: relative; margin: 0; display: grid; justify-items: center; gap: .05rem; padding: .25rem .1rem; }
.chord-card .cd { max-width: 6rem; }
.chord-name { font-size: 1.1rem; font-weight: 700; }
.chord-card.is-new .chord-name { color: var(--red); }
.chord-card .loop { left: -.25rem; top: -.35rem; width: calc(100% + .5rem); height: calc(100% + .7rem); }
.chord-card.is-new .loop path { stroke-dashoffset: 0; stroke-width: 2.8; }
.new-note { position: absolute; top: -1.2rem; right: -.55rem; font: 700 1.25rem/1 var(--f-pen); color: var(--red); transform: rotate(10deg); }
.swap { margin-top: .6rem; }
.swap { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: .9rem; align-items: center; padding: .5rem 0 .2rem; }
.swap-note { font: 600 1.35rem/1.15 var(--f-pen); color: var(--pen); }

.ways { display: grid; }
.way { position: relative; display: grid; gap: .2rem; padding: .95rem 1.2rem 1rem 1.35rem; }
.way .loop { left: -.3rem; top: -.35rem; width: calc(100% + .6rem); height: calc(100% + .7rem); }
.way + .way { border-top: 1px dashed var(--rule); }
.way-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .55rem; font-size: 1.05rem; }
.yours { font: 700 1.3rem/1 var(--f-pen); color: var(--red); }
.way .loop path { stroke-width: 2.6; }
.way.is-yours .loop path { stroke-dashoffset: 0; }

.note { display: grid; gap: .35rem; padding-block: 1.3rem 1.4rem; border-top: 1px solid var(--rule); }
.note-text { max-width: 30rem; font: 600 1.75rem/1.15 var(--f-pen); color: var(--pen); }
.note-by { font: 700 1.3rem/1 var(--f-pen); color: var(--pen); }
.note-by::before { content: "– "; }

.links { display: flex; flex-wrap: wrap; gap: .6rem; }
.gear { color: var(--print-2); font-size: .95rem; }
.auto-label {
  justify-self: start;
  padding: .15rem .5rem .2rem;
  border: 1.5px dashed var(--print-2); border-radius: 4px;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--print-2);
}
.auto-check { color: var(--print-2); font-size: .92rem; }
.auto-tip { margin-top: .4rem; padding: .7rem .85rem; border-left: 3px solid var(--rule-2); font-size: .97rem; }
.tag-auto { color: var(--print-2); }
.more-btn { justify-self: start; margin-top: .4rem; }
.love-note-small { margin-left: .4rem; font: 400 .85rem/1.2 var(--f-print); color: var(--print-2); }

/* ---------- go further: course links and the lesson flyer */
.further { display: grid; gap: 1rem; padding-block: 1.5rem .6rem; border-top: 3px double var(--rule-2); }
.further-h { font-size: 1.45rem; line-height: 1.1; }
.further-lede { max-width: 34rem; color: var(--print-2); }
.course { display: grid; gap: .5rem; }
.course h3, .flyer h3 { font-size: 1.1rem; }
.course p { max-width: 36rem; }
.course-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; }
.course-links a { font-weight: 700; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.flyer {
  position: relative;
  display: grid; gap: .65rem;
  margin: .9rem .25rem .6rem;
  padding: 1.1rem 1rem 0;
  background: var(--paper);
  border: 1.5px solid var(--print);
  border-bottom: 0;
  box-shadow: var(--flyer-shadow);
  transform: rotate(-.7deg);
}
.flyer-kicker { font-size: 2.05rem; font-weight: 700; line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
.flyer p { max-width: 34rem; }
.flyer .btn-primary { justify-self: start; margin-top: .2rem; }
.tabs { display: flex; list-style: none; margin: .55rem -1rem 0; padding: 0; border-top: 1.5px dashed var(--print); }
.tabs li { flex: 1 1 0; min-width: 0; border-right: 1.5px dashed var(--print); border-bottom: 1.5px solid var(--print); }
.tabs li:last-child { border-right: 0; }
.tabs li.torn { border-bottom-color: transparent; }
.tabs a {
  display: block;
  height: 8.4rem;
  margin-inline: auto;
  padding: .55rem 0;
  overflow: hidden;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: .72rem; font-weight: 700; white-space: nowrap;
  text-align: center; text-decoration: none;
}

/* ---------- list and prose pages */
.list-page, .prose { display: grid; gap: .85rem; padding-block: 1.5rem 1rem; }
.page-title { font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.05; letter-spacing: -.02em; }
.song-list { list-style: none; margin: .4rem 0 0; padding: 0; }
.song-list li { border-top: 1px solid var(--rule); }
.sl { display: grid; gap: .1rem; padding: .8rem 0 .85rem; text-decoration: none; }
.sl:hover .sl-title { text-decoration: underline; text-decoration-color: var(--red); }
.sl-title { font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.sl-meta { color: var(--print-2); font-size: .9rem; }
.sl-chords { font: 600 1.25rem/1.2 var(--f-pen); color: var(--pen); white-space: pre-wrap; }
.sl-auto { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.prose h2 { margin-top: .6rem; font-size: 1.25rem; }
.prose p { max-width: 38rem; }
.text-link { font-weight: 700; color: var(--print); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.facts { display: grid; gap: .85rem; margin: .4rem 0 .2rem; padding: 1rem 0 1.05rem; border-block: 1px solid var(--rule); max-width: 38rem; }
.facts div { display: grid; gap: .1rem; }
.facts dt { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--print-2); }
.facts dd { margin: 0; }
@media (min-width: 40rem) { .facts div { grid-template-columns: 9.5rem 1fr; gap: 1rem; } .facts dt { padding-top: .2rem; } }
.lessons-next { margin-top: .6rem; color: var(--print-2); }

/* ---------- motion */
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1.05; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .underline path { animation: draw .7s .35s ease-out both; }
  .circled .loop path { animation: draw .6s .45s ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  .entry { animation: none; }
  .tick path, .loop path { transition: none; }
  .actionbar { transition: none; }
}
