/* Fretboard King — shared styles. One file, no build step. */
:root {
  --paper: #ffffff;
  --ink: #241a14;
  --ink-2: #62564d;
  --line: #e8e1da;
  --link: #7a5210;
  --rose: #3b2519;      /* rosewood fingerboard */
  --rose-deep: #2b1a11;
  --bone: #efe6d4;      /* nut */
  --pearl: #d9d2c4;     /* inlays */
  --nickel: #b9bec4;    /* frets */
  --steel: #dfe3e7;     /* plain strings */
  --brass: #d9a441;     /* wound strings */
  --note: #2e9e68;      /* a correct answer in the app */
  --on-rose: #f6efe7;
  --wrap: 1120px;
  --measure: 62ch;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a120d; --ink: #f2ebe4; --ink-2: #b8aca2; --line: #3a2b22; --link: #e6b75a;
  }
}
:root[data-theme="dark"] {
  --paper: #1a120d; --ink: #f2ebe4; --ink-2: #b8aca2; --line: #3a2b22; --link: #e6b75a;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.62 "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: "Bricolage Grotesque", system-ui, sans-serif; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); font-weight: 800; letter-spacing: -0.028em; max-width: 13ch; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 750; letter-spacing: -0.018em; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.005em; }
p { margin: 0; max-width: var(--measure); }
a { color: var(--link); text-underline-offset: 0.18em; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--note); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font: 800 1.15rem/1 "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: -0.01em; }
.brand img { width: 40px; height: 40px; }
.site-head nav { display: flex; gap: 22px; font-size: 0.98rem; }
.site-head nav a { color: var(--ink-2); text-decoration: none; }
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }

/* Hero */
.hero { padding-top: clamp(28px, 6vw, 72px); padding-bottom: clamp(28px, 4vw, 44px); }
.hero .sub { margin-top: 20px; font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--ink-2); max-width: 34ch; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.badges a { display: inline-block; line-height: 0; border-radius: 9px; }
.badges img { height: 48px; width: auto; }

/* The neck — the page's one bold element */
.hero-cta { display: flex; align-items: center; gap: 28px; margin-top: 30px; }
.hero-cta .badges { margin-top: 0; }
.hero-neck { margin: 0; flex: none; }
.hero-neck svg { display: block; width: 120px; height: auto; }
@media (max-width: 600px) { .hero-cta .badges { flex-direction: column; align-items: flex-start; } .hero-neck svg { width: 104px; } }
.hero-neck figcaption { color: var(--ink-2); font-size: 0.85rem; margin-top: 8px; text-align: center; max-width: 120px; }
.neck-lbl { font: 700 15px/1 "Atkinson Hyperlegible", system-ui, sans-serif; fill: var(--ink-2); }
.note circle { fill: var(--note); stroke: var(--rose); stroke-width: 3; }
.note text { font: 700 15px/1 "Atkinson Hyperlegible", system-ui, sans-serif; fill: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .hero-neck .note { transform-box: fill-box; transform-origin: center; animation: pop 0.42s cubic-bezier(.2,1.4,.4,1) both; animation-delay: var(--d, 0s); }
  @keyframes pop { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }
}

/* Sections */
.section { padding-top: clamp(56px, 9vw, 104px); }
.section > h2 + p, .section .lede { margin-top: 14px; color: var(--ink-2); font-size: 1.12rem; }

.proof { display: grid; gap: 36px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .proof { grid-template-columns: 1fr 1.1fr; } }
.proof p { margin-top: 14px; }
.meter { width: 100%; height: auto; }
.meter .tick { font: 400 13px "Atkinson Hyperlegible", system-ui, sans-serif; fill: var(--ink-2); }
.meter .big { font: 800 34px "Bricolage Grotesque", system-ui, sans-serif; fill: var(--ink); }
.meter .cap { font: 400 14px "Atkinson Hyperlegible", system-ui, sans-serif; fill: var(--ink-2); }
.fine { font-size: 0.9rem; color: var(--ink-2); margin-top: 16px; }

.steps { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 30px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 16px; }
.steps li::before { content: counter(step); display: block; font: 800 1rem/1 "Bricolage Grotesque", system-ui, sans-serif; color: var(--ink-2); margin-bottom: 12px; }
.steps p { margin-top: 8px; color: var(--ink-2); }

.features { display: grid; gap: 30px 44px; margin-top: 34px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.features div { padding-left: 18px; border-left: 3px solid var(--brass); }
.features p { margin-top: 6px; color: var(--ink-2); }
.tag { font: 700 0.75rem/1 "Atkinson Hyperlegible", system-ui, sans-serif; border: 1.5px solid currentColor; border-radius: 99px; padding: 3px 7px; margin-left: 8px; vertical-align: 3px; color: var(--ink-2); }

.faq { margin-top: 26px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font: 700 1.1rem/1.35 "Bricolage Grotesque", system-ui, sans-serif; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; font-weight: 400; color: var(--ink-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 20px; color: var(--ink-2); }

/* Closing band */
.closer { margin-top: clamp(64px, 10vw, 120px); background: var(--rose); color: var(--on-rose); padding: clamp(48px, 8vw, 88px) 0; }
.closer h2 { max-width: 18ch; }
.closer-icon { display: block; width: 96px; height: 96px; margin-bottom: 24px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.closer .leverage { margin-top: 16px; opacity: 0.86; }

/* Footer */
.site-foot { padding-top: 28px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; color: var(--ink-2); font-size: 0.95rem; }
.site-foot nav { display: flex; gap: 22px; }
.site-foot a { color: var(--ink-2); }

/* Text pages (privacy, support) */
.doc { padding-top: clamp(24px, 5vw, 56px); padding-bottom: 40px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 18ch; }
.doc .updated { color: var(--ink-2); margin-top: 10px; }
.doc h2 { font-size: 1.45rem; margin-top: 40px; }
.doc h3 { margin-top: 26px; }
.doc p, .doc ul { margin-top: 10px; max-width: var(--measure); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.contact { margin-top: 26px; padding: 20px 22px; border-left: 3px solid var(--note); background: color-mix(in srgb, var(--note) 8%, transparent); max-width: var(--measure); }

/* 404 */
.lost { padding-top: clamp(24px, 6vw, 72px); }
.lost .note circle { fill: #c8483b; }
.lost-neck { margin-top: 36px; max-width: 200px; }
.lost-neck svg { display: block; width: 100%; height: auto; }

/* Buttons */
.btn-row { margin-top: 20px; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700;
  padding: 13px 22px; border-radius: 10px; }
.btn:hover { background: var(--rose); color: var(--on-rose); }

/* Cookie choice */
.consent { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  max-width: 560px; margin: 0 auto; background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px; box-shadow: 0 10px 30px rgba(43,26,17,.18); }
.consent p { font-size: 0.97rem; }
.consent-btns { display: flex; gap: 10px; margin-top: 14px; }
.consent .btn { padding: 10px 20px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

/* Learn pages */
.site-head nav { gap: 18px; }
.learn .crumbs { color: var(--ink-2); font-size: 0.92rem; margin-bottom: 14px; }
.learn .crumbs a { color: var(--ink-2); }
.chart-wrap { margin-top: 28px; margin-bottom: 8px; }
.chart-wrap svg { display: block; width: 100%; min-width: 880px; height: auto; }
.chart-fret { font: 700 13px "Atkinson Hyperlegible", system-ui, sans-serif; fill: var(--ink-2); }
.cn-n circle { fill: var(--note); stroke: var(--rose); stroke-width: 2; }
.cn-n text { font: 700 14px "Atkinson Hyperlegible", system-ui, sans-serif; fill: #fff; }
.cn-s circle { fill: var(--bone); stroke: var(--rose); stroke-width: 2; }
.cn-s text { font: 700 9.5px "Atkinson Hyperlegible", system-ui, sans-serif; fill: #3b2519; }
.learn.doc { padding-top: 0; }
main.learn.doc, .learn-top { padding-top: clamp(24px, 5vw, 56px) !important; }
.learn.doc { padding-bottom: 0; }
.learn.doc:last-child { padding-bottom: 40px; }
.btn-2 { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); margin-left: 8px; }
.table-scroll { overflow-x: auto; margin-top: 22px; }
.learn table { border-collapse: collapse; min-width: 560px; font-size: 0.98rem; }
.learn caption { text-align: left; color: var(--ink-2); font-size: 0.92rem; padding-bottom: 8px; }
.learn th, .learn td { text-align: left; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.learn thead th { font-size: 0.85rem; color: var(--ink-2); }
.learn .fret { color: var(--ink-2); font-size: 0.85em; }
.practice { margin-top: 56px; padding: 28px 28px 30px; background: var(--rose); color: var(--on-rose); border-radius: 16px; max-width: 760px; }
.practice h2 { margin-top: 0 !important; color: var(--on-rose); }
.practice p { margin-top: 12px; color: var(--on-rose); opacity: .9; }
.practice .badges { margin-top: 22px; }
.guide-list { list-style: none; padding: 0 !important; margin-top: 30px !important; }
.guide-list li { border-top: 3px solid var(--ink); padding-top: 16px; max-width: var(--measure); }
.guide-list a { color: var(--ink); text-decoration: none; }
.guide-list a:hover h2 { text-decoration: underline; }
.guide-list h2 { margin-top: 0 !important; }
.guide-list p { color: var(--ink-2); }
@media print { .site-head, .site-foot, .consent, .practice, .btn-row { display: none !important; } }
.neck-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
