/* colemanirby.com
   Lab-paper grey and blue-black ink; the Club King's transparent orange as the one accent; a Dimir-dark panel for the
   deck. STIX Two Text throughout: the face physics journals set papers in. */

@font-face { font-family: "STIX Two Text"; src: url(fonts/stix-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "STIX Two Text"; src: url(fonts/stix-400i.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "STIX Two Text"; src: url(fonts/stix-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "STIX Two Math"; src: url(fonts/stix-math.woff2) format("woff2"); font-display: swap; }

:root {
    --paper: #e9edf0;
    --paper-2: #dce2e7;
    --ink: #17202a;
    --muted: #4f5b67;
    --rule: #c3ccd4;
    --orange: #e2570f;
    --orange-ink: #b8430a; /* the accent where it has to carry text: 4.6:1 on paper */
    --blue: #2a5f9e; /* mismatch spins: Dimir blue, 5.4:1 on paper */
    --accent-fill: #b8430a; /* filled accent buttons, white text on them: the same in both themes */
    --blue-fill: #2a5f9e;
    --field: #fff;
    --dip: #d2dce7; /* the spin chain below the horizon */
    --bar: #17202a; /* the player bar: dark in both themes */
    --bar-ink: #e9edf0;
    color-scheme: light;
    --dimir: #111925;
    --dimir-2: #1b2736;
    --dimir-ink: #d8e0e9;
    --dimir-muted: #93a3b5;

    --serif: "STIX Two Text", "STIX Two", "Times New Roman", serif;
    --step--1: 0.875rem;
    --step-0: 1.1875rem;
    --step-1: 1.5rem;
    --step-2: 2.25rem;
    --step-3: clamp(3.25rem, 9vw, 7rem);
    --gutter: clamp(1.25rem, 5vw, 4rem);
    --measure: 64ch;
}

/* Dark: the visitor's system setting, unless they picked light with the toggle; or their pick of dark. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
    --paper: #131a22;
    --paper-2: #1c2530;
    --ink: #e2e7ec;
    --muted: #9aa6b2;
    --rule: #2b3642;
    --orange: #ef6a24;
    --orange-ink: #f2894f;
    --blue: #86b4ea;
    --dimir: #0b1118;
    --dimir-2: #18222e;
    --field: #0f151c;
    --dip: #22344a;
    --bar: #0a0f15;
    color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --paper: #131a22;
    --paper-2: #1c2530;
    --ink: #e2e7ec;
    --muted: #9aa6b2;
    --rule: #2b3642;
    --orange: #ef6a24;
    --orange-ink: #f2894f;
    --blue: #86b4ea;
    --dimir: #0b1118;
    --dimir-2: #18222e;
    --field: #0f151c;
    --dip: #22344a;
    --bar: #0a0f15;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 var(--step-0)/1.6 var(--serif);
    font-variant-numeric: oldstyle-nums proportional-nums;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-color: var(--orange); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--orange-ink); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { top: 1rem; }

/* ---- hero: the name, and a spin chain drawn as its Dyck path ---------------------------------------------- */

.hero { padding: clamp(3rem, 10vh, 7rem) var(--gutter) 0; max-width: 84rem; margin: 0 auto; }
.hero h1 { font-size: var(--step-3); letter-spacing: -0.02em; line-height: 0.95; }
.tagline { font-size: var(--step-1); font-style: italic; color: var(--muted); margin-top: 0.75rem; }

.chain-fig { margin: clamp(2rem, 6vh, 4rem) 0 0; }
.chain { width: 100%; height: auto; max-height: 15rem; overflow: visible; }
.chain-fill { fill: var(--paper-2); }
.chain-base { stroke: var(--rule); stroke-width: 1; }
.chain-path { fill: none; stroke: var(--orange); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.chain-fill-below { fill: var(--dip); }
.chain-spins use { stroke: var(--muted); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
/* unmatched spins: up-canted in the accent, mismatches in Dimir blue; the caption's words match */
.chain-spins .k-cant { stroke: var(--orange); stroke-width: 1.9; }
.chain-spins .k-mismatch { stroke: var(--blue); stroke-width: 1.9; }
.k-cant { color: var(--orange-ink); font-style: normal; }
.k-mismatch { color: var(--blue); font-style: normal; }
.chain-path.drawn { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chain-fig figcaption { min-height: 3.2em; font-size: 1rem; font-style: italic; color: var(--muted); max-width: 70ch; margin-top: 0.75rem; }
/* the Generate buttons: each in the color of the spins it produces; the last one used stays pressed */
.chain-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; margin-top: 0.9rem; font-size: 1rem; }
.chain-controls[hidden] { display: none; }
.gen-label { color: var(--muted); margin-right: 0.15rem; }
.chain-controls button { background: transparent; border: 1px solid var(--rule); border-radius: 2px; padding: 0.3rem 0.8rem; cursor: pointer; }
.chain-controls button:hover { border-color: var(--ink); }
.chain-controls button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chain-controls .gen-ups { color: var(--orange-ink); }
.chain-controls .gen-ups:hover, .chain-controls .gen-ups[aria-pressed="true"] { border-color: var(--orange-ink); }
.chain-controls .gen-ups[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.chain-controls .gen-downs { color: var(--blue); }
.chain-controls .gen-downs:hover, .chain-controls .gen-downs[aria-pressed="true"] { border-color: var(--blue); }
.chain-controls .gen-downs[aria-pressed="true"] { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.gen-note { color: var(--muted); font-size: var(--step--1); font-style: italic; }

.toc { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; margin-top: 2.5rem; padding: 1rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.toc a { text-decoration: none; }
.theme-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; background: none; border: 1px solid var(--rule); border-radius: 2px; padding: 0.15rem 0.7rem; cursor: pointer; color: var(--muted); font-size: var(--step--1); }
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle svg { width: 1rem; height: 1rem; fill: currentColor; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--orange); }

/* ---- about ------------------------------------------------------------------------------------------------- */

main > * { max-width: 84rem; margin-inline: auto; padding-inline: var(--gutter); }
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(3rem, 8vh, 5rem); align-items: start; }
.portrait { margin: 0; }
.portrait img { width: 100%; border-radius: 3px; }
.portrait figcaption { font-size: var(--step--1); font-style: italic; color: var(--muted); margin-top: 0.6rem; }
.bio { max-width: var(--measure); font-size: 1.3125rem; line-height: 1.6; }
.bio .now { margin-top: 1.5em; padding-left: 1rem; border-left: 3px solid var(--orange); }

/* ---- sections: heading in the margin, content in the column ----------------------------------------------- */

/* the rule above each section spans the text column, not the padding */
.sec { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 3rem; padding-block: clamp(3rem, 8vh, 5rem);
    background: linear-gradient(var(--rule), var(--rule)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px; }
.magic + .sec { background: none; }
.sec > h2 { font-size: var(--step-2); position: sticky; top: 1.5rem; align-self: start; }
.sec-body { min-width: 0; }
.intro { max-width: var(--measure); margin-bottom: 2.25rem; font-size: 1.3125rem; }
.sub { font-size: var(--step-1); margin: 2.5rem 0 0.75rem; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li + li { margin-top: 0.35rem; }

.timeline { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.timeline li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.timeline .when { color: var(--muted); font-size: var(--step--1); padding-top: 0.3rem; }
.timeline h3 { font-size: var(--step-1); }
.timeline .at { color: var(--muted); }
.timeline .where { color: var(--muted); font-style: italic; margin: 0.2rem 0 0.6rem; }
/* skills: a category per row, its skills as a loose wrapped list */
.skills { margin: 0; max-width: 52rem; }
.skill-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; padding: 0.85rem 0; border-top: 1px solid var(--rule); }
.skill-row dt { color: var(--muted); font-size: var(--step--1); padding-top: 0.2rem; }
.skill-row dd { margin: 0; }
.skill-row ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; }

/* physics */
.paper { max-width: var(--measure); }
.kind { color: var(--muted); font-style: italic; }
.paper-title { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.15; margin: 0.25rem 0 1.5rem; }
.abstract details { margin-top: 1em; }
.abstract summary { cursor: pointer; color: var(--muted); }
.abstract summary:hover { color: var(--ink); }
.abstract details[open] summary { margin-bottom: 1em; }
.formulas { margin: 2.5rem 0 0; padding: 1.75rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.formulas figcaption { margin-bottom: 1.25rem; }
.formula { padding: 0.6rem 0; overflow-x: auto; }
.formula p { color: var(--muted); font-style: italic; font-size: var(--step--1); margin: 0 0 0.35rem; }
/* inline, so it sits flush left like the text; display="block" keeps the full-size (display-style) fractions */
.formula math { display: inline math; font-family: "STIX Two Math", math; font-size: 1.4rem; }
.formula-note { color: var(--muted); font-size: var(--step--1); margin-top: 1rem; }
.keywords { font-size: var(--step--1); color: var(--muted); margin-top: 1.5rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 1.75rem; }
.btn { display: inline-block; padding: 0.55rem 1.1rem; background: var(--ink); color: var(--paper); text-decoration: none; border-radius: 2px; }
.btn:hover { background: var(--accent-fill); color: #fff; }

/* code */
.repos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); column-gap: 3rem; }
.repos li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.repo-name { font-weight: 600; }
.repo-meta { color: var(--muted); font-size: var(--step--1); margin-left: 0.6rem; }
.repos p { margin: 0.25rem 0 0; color: var(--muted); font-size: 1.0625rem; }
.repo-group { margin-top: 0; }
.repos + .repo-group { margin-top: 2.25rem; }
.more { margin-top: 1.5rem; }

/* guitar */
.guitar { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.guitar-photo { width: 100%; border-radius: 3px; }
.guitar h3 { font-size: var(--step-2); margin-bottom: 1.25rem; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.5rem; margin: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }

/* ---- magic: the deck on a Dimir-dark panel ---------------------------------------------------------------- */

main > .magic { max-width: none; padding: 0; background: var(--dimir); color: var(--dimir-ink); }
.magic-inner { max-width: 84rem; margin: 0 auto; padding: clamp(3.5rem, 9vh, 6rem) var(--gutter); }
.magic a { text-decoration-color: var(--orange); }
.magic a:hover { color: #fff; }
.magic-head { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; margin-bottom: 3.5rem; }
.cmd-art { margin: 0; }
.cmd-art img { width: 100%; border-radius: 3px; }
.cmd-art figcaption { font-size: var(--step--1); font-style: italic; color: var(--dimir-muted); margin-top: 0.6rem; }
.magic-copy h2 { font-size: var(--step-2); margin-bottom: 1.25rem; }
.magic-copy p { max-width: var(--measure); }
.deck-line { color: var(--dimir-muted); }
.deck-line strong { color: var(--dimir-ink); font-weight: 600; }
.magic-copy { margin-top: 2rem; }
.cmd { margin: 0; }
.cmd figcaption { font-size: var(--step--1); font-style: italic; color: var(--dimir-muted); margin-top: 0.6rem; }

.group { display: flex; align-items: baseline; gap: 0.6rem; font-size: var(--step-1); margin: 2.5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--dimir-2); }
.group .count { font-size: var(--step--1); color: var(--dimir-muted); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.25rem, 1fr)); gap: 0.75rem; }
.card { display: block; position: relative; width: 100%; padding: 0; border: 0; background: var(--dimir-2); cursor: pointer; border-radius: 4.75% / 3.4%; overflow: hidden; aspect-ratio: 488 / 680; }
.card img { width: 100%; height: 100%; object-fit: contain; }
.card:hover img { filter: brightness(1.08); }
.card:focus-visible { outline-offset: 2px; }
.qty { position: absolute; right: 0.4rem; bottom: 0.4rem; min-width: 1.6rem; padding: 0 0.35rem; border-radius: 0.8rem; background: var(--orange); color: #fff; font-size: var(--step--1); line-height: 1.6rem; text-align: center; font-variant-numeric: lining-nums; }
.hint { margin-top: 2rem; color: var(--dimir-muted); font-size: var(--step--1); font-style: italic; }

.mana { display: inline-flex; gap: 0.15em; margin-left: 0.5em; vertical-align: 0.05em; }
.m { display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; border-radius: 50%; font-style: normal; font-size: 0.8em; font-variant-numeric: lining-nums; line-height: 1; color: #111; background: #cbc2bf; }
.m-w { background: #f8f1d6; } .m-u { background: #a9d5ee; } .m-b { background: #b9b0ab; } .m-r { background: #f3a68a; } .m-g { background: #9ccfa9; } .m-c { background: #d6d1cf; }

.card-dialog { border: 0; padding: 0; max-width: min(56rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); background: var(--dimir); color: var(--dimir-ink); border-radius: 6px; }
.card-dialog::backdrop { background: rgb(9 13 19 / 0.82); }
.cd-inner { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 2rem; padding: 2rem; }
.cd-img { width: 100%; border-radius: 4.75% / 3.4%; background: var(--dimir-2); }
.cd-text h2 { font-size: var(--step-2); margin-bottom: 0.75rem; }
.cd-text h3 { font-size: var(--step-1); margin: 1.25rem 0 0.25rem; }
.cd-type { color: var(--dimir-muted); font-style: italic; }
.cd-rules p { margin-bottom: 0.6em; }
.cd-rules .mana { margin-left: 0; }
.cd-pt { font-weight: 600; }
.cd-credit { font-size: var(--step--1); color: var(--dimir-muted); margin-top: 1.5rem; }
.cd-actions { display: flex; gap: 0.75rem; margin-top: 1.75rem; }
.cd-actions button { background: var(--dimir-2); border: 1px solid #2c3b4f; padding: 0.45rem 1rem; border-radius: 2px; cursor: pointer; }
.cd-actions button:hover { border-color: var(--orange); }

/* ---- search ------------------------------------------------------------------------------------------------ */

.search-form { display: flex; gap: 0.5rem; max-width: 40rem; }
.search-form input { flex: 1; min-width: 0; font: inherit; padding: 0.6rem 0.9rem; background: var(--field); color: var(--ink); border: 1px solid var(--rule); border-radius: 2px; }
.search-form input:focus-visible { outline-offset: 0; }
.search-form button { padding: 0.6rem 1.2rem; background: var(--ink); color: var(--paper); border: 0; border-radius: 2px; cursor: pointer; }
.search-form button:hover { background: var(--accent-fill); color: #fff; }
.tries { margin-top: 1rem; color: var(--muted); font-size: var(--step--1); }
.tries button { background: none; border: 0; padding: 0 0.15rem; cursor: pointer; text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 0.18em; }
.tries button + button { margin-left: 0.6rem; }
.results { margin-top: 1.5rem; max-width: 40rem; }
.status { color: var(--muted); font-style: italic; }
.hits { list-style: none; margin: 0; padding: 0; }
.hit { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; width: 100%; padding: 0.6rem 0; border: 0; border-top: 1px solid var(--rule); background: none; text-align: left; text-decoration: none; cursor: pointer; }
.hit:hover .hit-title { text-decoration: underline; text-decoration-color: var(--orange); }
.hit-kind { color: var(--muted); font-size: var(--step--1); padding-top: 0.15rem; }

/* ---- music: the catalog search, and the player bar fixed to the bottom ------------------------------------ */

.music-form { display: flex; gap: 0.5rem; max-width: 40rem; }
.music-form input[type="search"] { flex: 1; min-width: 0; font: inherit; padding: 0.6rem 0.9rem; background: var(--field); color: var(--ink); border: 1px solid var(--rule); border-radius: 2px; }
.music-form button { padding: 0.6rem 1.2rem; background: var(--ink); color: var(--paper); border: 0; border-radius: 2px; cursor: pointer; }
.music-form button:hover { background: var(--accent-fill); color: #fff; }
.tries button[data-mq] { background: none; border: 0; padding: 0 0.15rem; cursor: pointer; text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 0.18em; }
.music-results { margin-top: 1.5rem; max-width: 44rem; }
.mr { list-style: none; margin: 0; padding: 0; }
.mr li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.6rem 0; border-top: 1px solid var(--rule); }
.mr img { width: 48px; height: 48px; object-fit: cover; border-radius: 2px; background: var(--paper-2); }
.mr-meta { display: flex; flex-direction: column; min-width: 0; }
.mr-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-sub { color: var(--muted); font-size: var(--step--1); }
.mr-play { background: transparent; border: 1px solid var(--rule); border-radius: 2px; padding: 0.3rem 0.9rem; cursor: pointer; }
.mr-play:hover { border-color: var(--orange-ink); }
.mr-play[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }

.player {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 2fr) minmax(0, 1fr); gap: 1.5rem; align-items: center;
    padding: 0.55rem var(--gutter); background: var(--bar); color: var(--bar-ink); font-size: 1rem;
}
.player[hidden] { display: none; }
body.has-player { padding-bottom: 5.25rem; }
.pl-now { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.pl-art { flex: none; width: 48px; height: 48px; object-fit: cover; border-radius: 2px; background: #2a3542; }
.pl-meta { display: flex; flex-direction: column; min-width: 0; }
.pl-title { color: var(--bar-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration-color: var(--orange); }
.pl-title:hover { color: #fff; }
.pl-artist { color: #a9b4c0; font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pl-center { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; min-width: 0; }
.pl-controls { display: flex; align-items: center; gap: 0.6rem; }
.pl-btn { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #c9d2db; cursor: pointer; }
.pl-btn svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.pl-btn:hover { color: #fff; }
.pl-play { width: 2.6rem; height: 2.6rem; background: var(--bar-ink); color: #17202a; }
.pl-play:hover { background: #fff; color: #17202a; }
.pl-play svg { width: 1.35rem; height: 1.35rem; }
/* cued: the browser held back autoplay, so the play button asks to be pressed */
.player.cued .pl-play { background: var(--orange); color: #fff; box-shadow: 0 0 0 4px rgb(226 87 15 / 0.3); }

.pl-scrub { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem; align-items: center; gap: 0.6rem; width: 100%; max-width: 34rem; }
.pl-time, .pl-dur { color: #a9b4c0; font-size: 0.8rem; font-variant-numeric: lining-nums tabular-nums; }
.pl-time { text-align: right; }

/* the scrubber and volume: a thin track, filled to --p in the accent, with a round thumb */
.pl-seek, .pl-volume { -webkit-appearance: none; appearance: none; width: 100%; height: 1rem; margin: 0; background: transparent; cursor: pointer; --p: 0%; }
.pl-seek::-webkit-slider-runnable-track, .pl-volume::-webkit-slider-runnable-track {
    height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--orange) var(--p), #3a4756 var(--p)); }
.pl-seek::-moz-range-track, .pl-volume::-moz-range-track { height: 4px; border-radius: 2px; background: #3a4756; }
.pl-seek::-moz-range-progress, .pl-volume::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--orange); }
.pl-seek::-webkit-slider-thumb, .pl-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; border: 0; }
.pl-seek::-moz-range-thumb, .pl-volume::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.pl-seek:hover::-webkit-slider-thumb, .pl-volume:hover::-webkit-slider-thumb { transform: scale(1.15); }

.pl-side { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; min-width: 0; }
.pl-volume { width: 6.5rem; flex: none; }
.pl-find { color: #a9b4c0; font-size: var(--step--1); white-space: nowrap; margin-left: 0.75rem; }
.pl-find:hover { color: #fff; }
.player :focus-visible { outline-color: var(--orange); outline-offset: 2px; }

/* ---- about this site ------------------------------------------------------------------------------------- */

.diagram { margin: 0 0 2.5rem; max-width: 40rem; }
.diagram a { display: block; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.diagram img { width: 100%; background: #fff; padding: 0.75rem; }
/* the diagram is black lines on white: inverted (hue kept) in dark mode */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .diagram img { filter: invert(0.88) hue-rotate(180deg); } }
:root[data-theme="dark"] .diagram img { filter: invert(0.88) hue-rotate(180deg); }
.diagram figcaption { font-size: var(--step--1); font-style: italic; color: var(--muted); margin-top: 0.6rem; max-width: 60ch; }
.about-site .sec-body > p { max-width: var(--measure); }
.about-lede { color: var(--muted); }
.repo-table { border-collapse: collapse; width: 100%; max-width: 46rem; margin: 0.5rem 0 2rem; font-size: 1.0625rem; }
.repo-table th { text-align: left; font-weight: 400; color: var(--muted); font-size: var(--step--1); padding: 0 1rem 0.5rem 0; border-bottom: 1px solid var(--rule); }
.repo-table td { padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.repo-table td:first-child { white-space: nowrap; }
.repo-table td:last-child, .repo-table th:last-child { text-align: right; padding-right: 0; font-variant-numeric: lining-nums tabular-nums; }
.built-with { color: var(--muted); font-size: var(--step--1); margin-top: 1.5rem; }

/* ---- footer ------------------------------------------------------------------------------------------------ */

.foot { border-top: 1px solid var(--rule); margin-top: 2rem; }
.foot-inner { max-width: 84rem; margin: 0 auto; padding: 3rem var(--gutter) 2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; font-size: 1.0625rem; }
.foot h2 { font-size: var(--step-1); margin-bottom: 0.75rem; }
.mcp code { font-size: 0.85em; word-break: break-all; background: var(--paper-2); padding: 0.15rem 0.35rem; border-radius: 2px; }
.copy { margin-left: 0.4rem; background: none; border: 1px solid var(--rule); padding: 0.1rem 0.6rem; border-radius: 2px; cursor: pointer; font-size: var(--step--1); }
.copy:hover { border-color: var(--orange); }
.notices { max-width: 84rem; margin: 0 auto; padding: 1.5rem var(--gutter) 3rem; background: linear-gradient(var(--rule), var(--rule)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px; font-size: var(--step--1); color: var(--muted); }
.notices p { max-width: 90ch; }

/* ---- small screens and preferences ------------------------------------------------------------------------- */

@media (max-width: 52rem) {
    .about, .sec, .guitar, .magic-head, .foot-inner { grid-template-columns: minmax(0, 1fr); }
    .sec { gap: 1.25rem; }
    .sec > h2 { position: static; }
    .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
    .skill-row { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
    .repo-table td:first-child { white-space: normal; }
    .formula math { font-size: 1.15rem; }
    /* phones: track and controls on one row, the scrubber across the full width below */
    .player { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "now center" "scrub scrub"; gap: 0.35rem 0.75rem; padding-top: 0.5rem; padding-bottom: 0.45rem; }
    .pl-now { grid-area: now; }
    .pl-center { display: contents; }
    .pl-controls { grid-area: center; }
    .pl-scrub { grid-area: scrub; max-width: none; grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem; }
    .pl-art { width: 40px; height: 40px; }
    .pl-side { display: none; }
    body.has-player { padding-bottom: 6.5rem; }
    .mr li { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 0.75rem; }
    .mr img { width: 40px; height: 40px; }
    .cd-inner { grid-template-columns: minmax(0, 1fr); padding: 1.25rem; }
    .cd-img { max-width: 20rem; margin: 0 auto; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .chain-path.drawn { animation: none; stroke-dashoffset: 0; }
}
