/* free-music-sheets.com — "package leaflet" look: paper white, ink blue, pharmacy teal, orange roots */
:root {
  --ink: #1d2a3a; --ink-2: #44546a; --muted: #6b7a8c; --line: #dfe5ec; --line-2: #eef2f6;
  --paper: #ffffff; --bg: #f6f8fa; --teal: #0b7a75; --teal-2: #0e9a93; --teal-bg: #e6f4f3;
  --orange: #e8590c; --orange-bg: #fff1e8; --radius: 10px; --wrap: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Noto Serif", Georgia, serif;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.05);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
html, body { overflow-x: clip; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--orange); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 1.6em 0 .55em; }
h1 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); margin-top: .2em; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
h3 { font-size: 1.12rem; }
p, li, dd, td { overflow-wrap: anywhere; }
code { font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--line-2); padding: .05em .35em; border-radius: 4px; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 48px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 16px 48px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: #fff; padding: 6px 10px; }
.ic { width: 1.1em; height: 1.1em; vertical-align: -.18em; flex: none; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); }
.topbar::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--teal) 0 70%, var(--orange) 70%); }
.topbar-in { max-width: var(--wrap); margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; }
.brand small { color: var(--muted); font-weight: 500; }
.logo { width: 34px; height: 34px; }
.mainnav { display: flex; gap: 2px; flex: 1; justify-content: center; flex-wrap: wrap; }
.mainnav a { white-space: nowrap; color: var(--ink-2); text-decoration: none; padding: 6px 8px; border-radius: 7px; font-size: .93rem; font-weight: 550; }
.mainnav a:hover { background: var(--teal-bg); color: var(--teal); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-search input { width: 170px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: .9rem; background: var(--bg); }
.langmenu { position: relative; }
.langmenu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; font-weight: 650; color: var(--ink-2); }
.langmenu summary::-webkit-details-marker { display: none; }
.langlist { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; display: grid; min-width: 160px; z-index: 50; }
.langlist a { padding: 7px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.langlist a:hover, .langlist a[aria-current] { background: var(--teal-bg); color: var(--teal); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--ink); cursor: pointer; }
.btn-pdf { display: inline-flex; align-items: center; gap: 7px; background: var(--orange); color: #fff; border: 0; border-radius: 8px;
  padding: 9px 14px; font-weight: 700; text-decoration: none; font-size: .95rem; cursor: pointer; }
.btn-pdf:hover { background: #c94d0a; color: #fff; }
.btn-pdf.top { padding: 7px 11px; font-size: .85rem; }
.btn, .btn-ghost { display: inline-flex; align-items: center; gap: 7px; border-radius: 8px; padding: 9px 14px; font: inherit; font-weight: 650;
  cursor: pointer; text-decoration: none; font-size: .95rem; }
.btn { background: var(--teal); color: #fff; border: 0; }
.btn:hover { background: var(--teal-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.linkbtn { background: none; border: 0; color: var(--teal); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
@media (max-width: 1360px) {
  .mainnav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; padding: 8px 16px 14px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 10px 6px; font-size: 1rem; }
  .menu-toggle { display: inline-flex; }
  .topbar-in { justify-content: space-between; }
}
@media (max-width: 720px) {
  .top-search { display: none; }
  .brand span { font-size: .95rem; }
  .brand small { display: none; }
  .btn-pdf.top span { display: none; }
}

/* ---------- breadcrumbs, heads ---------- */
.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 12px 16px 0; font-size: .85rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: #b3bdc8; }
.crumbs a { color: var(--muted); text-decoration: none; }
.page-head { padding: 18px 0 10px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--teal); margin: 0 0 .4em; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 70ch; }
.pdfbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cards > * { min-width: 0; }
.card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; color: var(--ink-2); text-decoration: none; box-shadow: var(--shadow); font-size: .93rem; }
a.card:hover { border-color: var(--teal); transform: translateY(-1px); color: var(--ink-2); }
.card-title { color: var(--ink); font-weight: 700; font-size: 1.02rem; text-decoration: none; }
a.card-title:hover { color: var(--teal); }
.card-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--orange); }
.chord-card { flex-direction: row; align-items: center; gap: 12px; }
.chord-card img { width: 110px; height: auto; flex: none; }
.notes { margin: 2px 0 6px; color: var(--ink-2); }
.sec-card .count { font-size: 1.8rem; font-weight: 800; color: var(--teal); line-height: 1; }
.linklist { list-style: none; padding: 0; margin: .4em 0 1em; display: grid; gap: 4px; }
.linklist.cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 18px; }
.linklist li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: .9rem;
  text-decoration: none; color: var(--ink); font-weight: 600; }
a.chip:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- home ---------- */
.hero { background: linear-gradient(180deg, #fff, var(--bg)); border-bottom: 1px solid var(--line); padding: 34px 0 30px; margin-bottom: 26px; }
.hero h1 { max-width: 20ch; }
.hero-search { display: flex; gap: 8px; max-width: 640px; margin: 18px 0 10px; }
.hero-search input { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; }
.hero-search input:focus { outline: none; border-color: var(--teal); }
.hero-search button { font: inherit; font-weight: 700; padding: 0 18px; border-radius: 10px; border: 0; background: var(--teal); color: #fff; cursor: pointer; }
.hero-points { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; padding: 0; margin: 10px 0 0; color: var(--ink-2); font-size: .95rem; }
.hero-points li::before { content: "✓ "; color: var(--teal); font-weight: 800; }
.home-sec { margin: 34px 0; }
.home-sec.two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.home-sec.two h2:first-child { margin-top: 0; }
.about-strip { background: var(--teal-bg); border-radius: var(--radius); padding: 6px 22px 14px; }
@media (max-width: 860px) { .home-sec.two { grid-template-columns: minmax(0, 1fr); } }
.chooser { text-align: center; padding-top: 10vh; }
.brand-big { font-size: 1.3rem; font-weight: 800; color: var(--teal); }
.chooser-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.chooser-list a { display: block; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; font-weight: 650; }

/* ---------- leaflet ---------- */
.leaflet { max-width: 960px; margin: 14px auto 50px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow); padding: 0 34px 26px; position: relative; }
.leaflet::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: repeating-linear-gradient(90deg, var(--teal) 0 40px, #fff 40px 44px, var(--orange) 44px 52px, #fff 52px 56px); }
.lf-head { padding-top: 30px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; }
.lf-kicker { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 0; }
.lf-head h1 { margin: .25em 0 .2em; font-family: var(--serif); font-weight: 700; }
.lf-sub { font-size: 1.08rem; color: var(--ink-2); margin: 0 0 10px; max-width: 75ch; }
.lf-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 14px; }
.lf-badges li { border: 1px solid var(--ink); border-radius: 3px; padding: 1px 8px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.lf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-toc ol { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 14px 0 0; list-style: none; counter-reset: t; font-size: .88rem; }
.lf-toc li { counter-increment: t; }
.lf-toc li::before { content: counter(t) ". "; color: var(--muted); }
.lf-sec { border-bottom: 1px solid var(--line); padding: 4px 0 16px; }
.lf-sec h2 { display: flex; align-items: center; gap: 12px; font-size: 1.22rem; margin: 1.1em 0 .6em; }
.lf-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .95rem; }
.lf-sec h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 1.3em 0 .5em; }
.lf-foot { font-size: .8rem; color: var(--muted); border-top: 2px solid var(--ink); margin-top: 18px; padding-top: 10px; }
.lead-notes { font-size: 1.45rem; font-weight: 750; letter-spacing: .02em; margin: .2em 0 .5em; color: var(--ink); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 0 0 14px; font-size: .95rem; }
.facts dt { font-weight: 700; color: var(--ink-2); }
.facts dd { margin: 0; }
.note-box { background: var(--orange-bg); border-left: 4px solid var(--orange); padding: 8px 12px; border-radius: 4px; }
.seealso { font-weight: 650; }
.hint { color: var(--muted); font-size: .88rem; }
@media (max-width: 640px) { .leaflet { padding: 0 16px 20px; border-radius: 0; border-left: 0; border-right: 0; } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: .6em 0 1.2em; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; background: #fff; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: middle; }
thead th { background: var(--line-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
td.num { font-weight: 750; white-space: nowrap; }
table.matrix th[scope=row] { white-space: nowrap; background: var(--line-2); font-weight: 650; position: sticky; left: 0; }
table.matrix td { text-align: center; padding: 6px 7px; white-space: nowrap; }
table.matrix a { text-decoration: none; font-weight: 600; }

/* ---------- interactive figures ---------- */
.fx { margin: 12px 0 18px; }
.fx figcaption { font-size: .84rem; color: var(--muted); margin-top: 4px; }
.fx-r { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fx-r svg { display: block; max-width: none; }
.fx-staff .fx-r svg { max-width: 100%; height: auto; }
.fx-fretboard .fx-r { padding-bottom: 2px; }
.fx-piano .fx-r svg { max-width: 100%; height: auto; }
.fx-circle .fx-r svg { width: 100%; max-width: 520px; height: auto; display: block; margin: 0 auto; }
.fx-circle .ci-info { text-align: center; min-height: 3.2em; font-size: .95rem; }
.fx-play { display: inline-flex; align-items: center; gap: 6px; background: var(--teal); color: #fff; border: 0; border-radius: 99px;
  padding: 7px 14px 7px 11px; font: inherit; font-weight: 650; font-size: .9rem; cursor: pointer; }
.fx-play:hover { background: var(--teal-2); }
.fx-play.big { padding: 9px 16px 9px 13px; font-size: .97rem; border-radius: 8px; }
.fx-play.ghost { background: #fff; color: var(--teal); border: 1px solid var(--teal); border-radius: 8px; }
.fx-play.mini { padding: 4px 9px; font-size: .8rem; }
.fx-play.playing { background: var(--orange); color: #fff; }
.play-row { margin: 10px 0 16px; }
.fx-prog { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; background: #fff; }
.prog-label { margin: 0 0 6px; font-weight: 700; }
.prog { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 10px; }
.prog li { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.prog .num { font-size: .8rem; color: var(--muted); font-weight: 700; }
.prog li.on .chip { background: var(--orange); color: #fff; border-color: var(--orange); }
.cboxes { display: flex; flex-wrap: wrap; gap: 10px; }
.cbox { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 6px 6px; text-align: center; width: 156px; }
.cbox img { width: 132px; height: auto; display: block; margin: 0 auto; }
.cbox figcaption { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.cboxes.chart .cbox { width: 140px; }
.card.scale-card .fx-play, .card.chord-card .fx-play { align-self: flex-start; }
.harm .fx-play.mini { padding: 3px 8px; }

/* ---------- prose / lessons ---------- */
.prose { font-size: 1.04rem; }
.prose h2 { border-bottom: 2px solid var(--line); padding-bottom: .25em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.tip { background: var(--teal-bg); border-left: 4px solid var(--teal); padding: 4px 14px; border-radius: 4px; margin: 1em 0; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px; margin: 8px 0 20px; font-size: .94rem; }
.toc p { margin: .2em 0; font-weight: 700; }
.toc ol { margin: .3em 0; padding-left: 1.2em; columns: 2; column-gap: 28px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 34px 0 10px; }
.prevnext a { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; background: #fff; font-weight: 650; }
.prevnext a.next { text-align: right; grid-column: 2; }
.prevnext small { display: block; color: var(--muted); font-weight: 500; }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { margin: 6px 0; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--teal); flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.progress { margin: 10px 0 0; }
.progress .bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; max-width: 420px; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .3s; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .cols2 { grid-template-columns: 1fr; } }

/* ---------- glossary ---------- */
.gl-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.gl-tools input, .gl-tools select { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.gl-tools input { flex: 1; min-width: 200px; }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 20px; }
.az a { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-decoration: none; font-weight: 700; }
.glossary dl { margin: 0; }
.term { border-bottom: 1px solid var(--line); padding: 8px 0; }
.term dt { font-weight: 750; }
.term dd { margin: 2px 0 0; color: var(--ink-2); }
.tag { font-size: .7rem; font-weight: 600; color: var(--teal); background: var(--teal-bg); border-radius: 99px; padding: 1px 8px; vertical-align: 2px; }
.term:target { background: var(--orange-bg); }

/* ---------- worksheets / printables ---------- */
.sheet { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 26px 30px; margin: 18px 0; border-radius: 3px; }
.sheet-head h2 { margin-top: 0; }
.sheet-meta { color: var(--ink-2); }
.instr { font-style: italic; }
.blanks { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px 10px; padding-left: 0; list-style: none; counter-reset: b var(--start, 0); margin: 0 0 22px; }
.blanks li { border-bottom: 1px solid var(--ink); height: 28px; font-size: .75rem; color: var(--muted); }
.blanks li::before { content: counter(list-item) "."; }
.tasks li { margin: 12px 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tasks .line { flex: 1; border-bottom: 1px solid var(--ink); min-width: 160px; height: 1.2em; }
.answers { columns: 2; column-gap: 30px; font-size: .92rem; }
.answer-key details summary { cursor: pointer; font-weight: 700; color: var(--teal); }
.perms { font-family: ui-monospace, Menlo, Consolas, monospace; line-height: 2; }
.sheet-title { font-weight: 800; font-size: 1.1rem; margin: 0 0 8px; }
.sheet-foot { text-align: right; color: var(--muted); font-size: .75rem; margin: 6px 0 0; }
.sheet-svg { width: 100%; height: auto; display: block; }
.poster svg { width: 100%; max-width: 640px; display: block; margin: 0 auto; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.chart-table td, .chart-table th { padding: 5px 8px; }
table.nv td:first-child, table.nv td:nth-child(2) { width: 90px; }
.nv .fx { margin: 0; }
@media (max-width: 640px) { .sheet { padding: 16px 12px; } .blanks { grid-template-columns: repeat(4, 1fr); } .answers { columns: 1; } }

/* ---------- tools ---------- */
.tool-app { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 10px 0 26px; min-height: 220px; }
.tool-text { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 30px; }
.howto { background: var(--teal-bg); border-radius: var(--radius); padding: 4px 18px 10px; align-self: start; }
.howto h2 { font-size: 1.1rem; }
@media (max-width: 860px) { .tool-text { grid-template-columns: minmax(0, 1fr); } }
.t-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin: 0 0 14px; }
.t-field { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 650; color: var(--ink-2); }
.t-field select, .t-field input[type=number], .t-field input[type=text] { font: inherit; font-size: 1rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; }
.t-out { font-size: 1.2rem; font-weight: 700; margin: 6px 0; }
.t-big { font-size: clamp(2.6rem, 9vw, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.t-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.t-seg button { font: inherit; font-size: .9rem; border: 0; background: #fff; padding: 8px 12px; cursor: pointer; border-right: 1px solid var(--line); }
.t-seg button:last-child { border-right: 0; }
.t-seg button.on { background: var(--teal); color: #fff; }
.t-answers { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.t-answers button { font: inherit; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; }
.t-answers button.ok { background: #d3f2e3; border-color: #2f9e6b; }
.t-answers button.ko { background: #fde2e0; border-color: #d9534f; }
.t-score { color: var(--muted); }
.t-beats { display: flex; gap: 10px; margin: 16px 0; }
.t-beats span { width: 26px; height: 26px; border-radius: 50%; background: var(--line); transition: background .05s; }
.t-beats span.acc { box-shadow: inset 0 0 0 3px var(--orange); }
.t-beats span.on { background: var(--teal); }
.t-beats span.acc.on { background: var(--orange); }
.t-needle { position: relative; height: 54px; max-width: 520px; margin: 8px auto; }
.t-scale { position: absolute; inset: 22px 0 auto; height: 10px; background: linear-gradient(90deg, #f6c9c4, #fff3d6 35%, #c9efdc 47% 53%, #fff3d6 65%, #f6c9c4); border-radius: 99px; }
.t-pointer { position: absolute; top: 6px; left: 50%; width: 4px; height: 42px; background: var(--ink); border-radius: 2px; transition: left .12s; }
.center { text-align: center; }
.chips-sel button { font: inherit; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; cursor: pointer; font-weight: 600; }
.chips-sel button.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.chips-sel { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- search ---------- */
.results { padding-left: 1.2em; }
.results li { margin: 10px 0; }
.results small { color: var(--muted); display: block; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #cfd8e3; margin-top: 40px; font-size: .9rem; }
.footer a { color: #e7eef6; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-in { max-width: var(--wrap); margin: 0 auto; padding: 34px 16px 12px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
.footer .brand { color: #fff; }
.footer .brand small { color: #a6b4c4; }
.f-links { display: grid; gap: 6px; align-content: start; }
.f-langs, .f-legal { max-width: var(--wrap); margin: 0 auto; padding: 8px 16px; }
.f-legal { color: #93a3b5; font-size: .8rem; padding-bottom: 26px; }
@media (max-width: 760px) { .footer-in { grid-template-columns: 1fr; } }

/* ---------- print / PDF (A4) ---------- */
@page { size: A4; margin: 12mm 12mm 14mm; }
@media print {
  :root { --bg: #fff; }
  body { font-size: 10.5pt; background: #fff; }
  .topbar, .footer, .crumbs, .skip, .pdfbar, .lf-actions, .fx-play, .prevnext, .toc, .lf-toc, .menu-toggle,
  .gl-tools, .az, .hero-search, .answer-key summary, .progress button, .t-row, .howto, .tool-app, .js-print { display: none !important; }
  a { color: var(--ink); text-decoration: none; }
  .leaflet, .sheet { box-shadow: none; border: 0; margin: 0; padding: 0; max-width: none; }
  .leaflet::before { position: static; display: block; margin-bottom: 4mm; }
  .lf-head { padding-top: 0; }
  .fx, .cbox, .term, tr, .fx-prog, .card, .facts { break-inside: avoid; }
  .lf-sec { padding-bottom: 6px; }
  .lf-sec h2 { margin: .7em 0 .4em; font-size: 13pt; }
  .lf-n { width: 22px; height: 22px; font-size: 10pt; }
  .fx-r svg { max-width: 100% !important; height: auto !important; }
  .fx-piano .fx-r svg { max-width: 70% !important; }
  .cbox { width: 112px; padding: 4px; }
  .cbox img { width: 96px; }
  .cbox figcaption { font-size: 8pt; }
  .lead-notes { font-size: 15pt; }
  th, td { padding: 4px 8px; }
  .fx { margin: 6px 0 10px; }
  h2, h3 { break-after: avoid; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card { box-shadow: none; }
  .k-printable .page-text, .k-exercise .page-text, .noprint-text { display: none; }
  .k-printable .sheet-svg, .k-printable .poster svg { max-height: 248mm; width: auto !important; max-width: 100%; height: auto; display: block; margin: 0 auto; }
  .answer-key { break-before: page; }
  .answer-key details > *:not(summary) { display: block; }
  .answer-key details { display: block; }
  .fx-r { overflow: visible; }
  .linklist.cols { grid-template-columns: repeat(3, 1fr); }
  .table-wrap { overflow: visible; }
  .wrap, .wrap-narrow { padding: 0; max-width: none; }
}
input[type=range] { accent-color: var(--teal); }

/* ---------- cookie banner (js/consent.js) ---------- */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: none; align-items: center;
  justify-content: space-between; gap: 16px; background: var(--ink); color: #e7eef6; border-radius: 12px; padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25); font-size: .9rem; max-width: 980px; margin: 0 auto; }
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; }
.cookie-banner a { color: #fff; }
.cookie-actions { display: flex; gap: 8px; flex: none; }
.cookie-banner .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
@media (max-width: 640px) { .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; } .cookie-actions { justify-content: center; } }
@media print { .cookie-banner { display: none !important; } }
