/* Content pages (pieces, learn, 404). Tokens match the home page. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --paper: #EAE9E5; --paper-2: #F4F3EF; --surface: #FFFFFF; --border: #D9D7D0;
    --ink: #16150F; --muted: #6B6A63; --accent: #BC4A1C;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
html, body { background: var(--paper); }
body { font-family: var(--font-sans); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.nav { position: sticky; top: 0; z-index: 10; background: rgba(234, 233, 229, 0.88);
       backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
         font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px var(--border); }
.nav-cta { background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600;
           font-size: 15px; padding: 9px 16px; border-radius: 999px; }

.doc { max-width: 820px; padding-top: 20px; padding-bottom: 72px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 6px; opacity: .6; }

.doc h1 { font-size: clamp(34px, 6.4vw, 56px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04; margin-bottom: 14px; }
.doc h1 em, .cta-card h2 em { font-style: normal; color: var(--accent); }
.doc h2 { font-size: clamp(23px, 3.6vw, 29px); letter-spacing: -0.025em; line-height: 1.2; margin: 48px 0 12px; }
.doc p, .doc li { font-size: 17.5px; }
.doc p + p { margin-top: 12px; }
.doc ul:not([class]), .doc ol:not([class]) { padding-left: 22px; margin-top: 10px; }
.doc ul:not([class]) li + li { margin-top: 6px; }
.byline { color: var(--muted); font-size: 15px !important; margin-bottom: 18px; }
.lead { font-size: clamp(18px, 2.4vw, 20px) !important; color: var(--muted); }

.score { margin: 32px 0 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
         padding: 12px; overflow: hidden; }
.score img { width: 100%; border-radius: 8px; }
.score figcaption, .diagram figcaption { color: var(--muted); font-size: 14px; padding: 10px 4px 2px; }

.bars { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 16px; }
.bars li { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px;
           font-weight: 700; font-size: 18px; letter-spacing: 0.04em; display: flex; gap: 12px; align-items: baseline; }
.bar-no { color: var(--muted); font-size: 12px; font-weight: 600; min-width: 14px; letter-spacing: 0; }
.plain { color: var(--muted); font-size: 15px !important; margin-top: 14px; overflow-wrap: anywhere; }
.plain span { font-weight: 700; }

.cta-card { display: flex; gap: 20px; align-items: flex-start; margin: 48px 0 0; padding: 24px;
            background: var(--paper-2); border: 1px solid var(--border); border-radius: 20px; }
.cta-card > img { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 0 0 1px var(--border); flex-shrink: 0; }
.cta-card h2 { margin: 0 0 6px; font-size: 22px; }
.cta-card p { color: var(--muted); font-size: 16px !important; margin-bottom: 16px; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 12px;
         background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 17px; line-height: 1.2; }
.store svg { width: 22px; height: 22px; }
.store small { display: block; font-size: 11px; font-weight: 400; opacity: .75; }

.links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.links a { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
           background: var(--surface); text-decoration: none; font-size: 15px; font-weight: 600; }

.cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 16px; }
.cards a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
           padding: 10px 10px 14px; text-decoration: none; }
.cards img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: left top; border-radius: 8px; margin-bottom: 10px; }
.cards strong { display: block; font-size: 16px; line-height: 1.3; padding: 0 4px; }
.cards span { display: block; color: var(--muted); font-size: 14px; padding: 2px 4px 0; }

.guide-list { list-style: none; display: grid; gap: 12px; margin-top: 28px; }
.guide-list a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; text-decoration: none; }
.guide-list strong { display: block; font-size: 19px; }
.guide-list span { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }

.diagram { margin: 18px 0 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 10px 8px; }
.staff { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; }
.staff .sl { stroke: var(--ink); stroke-width: 1.3; }
.staff .clef { font-family: 'Noto Music', serif; fill: var(--ink); }
.staff .nh { fill: var(--ink); }
.staff .nl { fill: #fff; font: 800 11.5px var(--font-sans); text-anchor: middle; }
.staff .acc { font-family: "Noto Music", serif; font-size: 30px; fill: var(--ink); }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin-top: 8px; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 8px; font-size: 16px; }

footer { border-top: 1px solid var(--border); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--muted); }

@media (max-width: 600px) {
    .cta-card { flex-direction: column; padding: 20px; }
    .bars { grid-template-columns: 1fr 1fr; }
    .bars li { font-size: 16px; }
}

/* FAQ page, press kit, metronome */
.faq-page { margin-top: 24px; }
.press-assets { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.press-assets a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; text-decoration: none; height: 100%; }
.press-assets img { width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: 8px; }
.press-assets span { font-size: 14px; font-weight: 600; }
.metro { margin-top: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px 20px; text-align: center; }
.metro-bpm output { font-size: 72px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.metro-bpm span { font-weight: 700; color: var(--muted); margin-left: 6px; }
.metro-term { color: var(--accent); font-weight: 700; margin: 4px 0 16px; }
.metro input[type=range] { width: 100%; max-width: 480px; accent-color: var(--ink); }
.metro-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin-top: 16px; }
.metro-btn, .metro-start { font: inherit; font-weight: 700; border: 1px solid var(--border); background: var(--paper-2); color: var(--ink);
    border-radius: 999px; padding: 10px 16px; min-width: 56px; cursor: pointer; }
.metro-btn.wide { min-width: 130px; }
.metro-start { background: var(--ink); color: var(--paper); border-color: var(--ink); min-width: 130px; }
.metro-start.on { background: var(--accent); border-color: var(--accent); }
.metro label { font-size: 15px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.metro select { font: inherit; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.metro-dots { display: flex; gap: 10px; justify-content: center; margin-top: 22px; min-height: 22px; }
.metro-dots span { width: 18px; height: 18px; border-radius: 50%; background: var(--border); transition: background .05s; }
.metro-dots span.on { background: var(--ink); }
.metro-dots span:first-child.on { background: var(--accent); }
.metro-hint { color: var(--muted); font-size: 13px !important; margin-top: 14px; }
.tempo { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 16px; background: var(--surface); border-radius: 14px; overflow: hidden; }
.tempo th, .tempo td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.tempo th { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
