/* KerBy overview, guides and reference. Served directly, like the page's JavaScript. */
.kerby-content { min-width: 0; }
.kerby-page, .kerby-signup {
    --kb-ink: #91344e;
    --kb-accent: #ff6f91;
    --kb-accent-line: #e7c1cc;
    --kb-panel: #fff0f5;
    --kb-line: rgba(23, 23, 23, .5);
    --kb-muted: #5d5759;
}
.kerby-page {
    position: relative;
    z-index: 1;
    margin: 0 1rem;
    font-weight: 300;
    line-height: 1.65;
}
.kerby-header {
    --kb-ink: #91344e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.75rem 1rem .8rem;
}
.kerby-brand { font-size: 2rem; line-height: 1; white-space: nowrap; }
.kerby-header .kerby-nav { padding: 0; font-weight: 300; }
.kerby-header :is(a):focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.kerby-header .kerby-nav a:not([aria-current]):hover { opacity: .7; }
@media (max-width: 767px) {
    .kerby-header { gap: .5rem; padding: 1.5rem .5rem .8rem; }
    .kerby-brand { font-size: 1.7rem; }
}
.kerby-hero { padding: 2.6rem 0 2.5rem; }
.kerby-hero h1 {
    min-width: 0;
    margin: .8rem 0 1.2rem;
    color: var(--kb-ink);
    font-size: clamp(4.5rem, 9vw, 6.5rem);
    font-weight: 500;
    line-height: 1;
}
.kerby-eyebrow {
    color: var(--kb-ink);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.kerby-lead {
    font-size: clamp(1.6rem, 3.3vw, 2.35rem);
    font-weight: 300;
    line-height: 1.25;
    letter-spacing: -.025em;
}
.kerby-intro { max-width: 37rem; margin-top: 1.2rem; font-size: 1.125rem; }
.kerby-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.5rem; margin-top: 1.7rem; }
.kerby-button {
    display: inline-flex;
    align-items: center;
    gap: 1.3rem;
    border: 1px solid var(--kb-ink);
    border-radius: .35rem;
    padding: .65rem 1rem;
    background: var(--kb-ink);
    color: var(--kb-panel);
    font-size: .9rem;
    font-weight: 500;
    transition: transform .18s ease, box-shadow .18s ease;
}
.kerby-button:disabled { opacity: .6; }
.kerby-signup .kerby-email {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--kb-accent-line);
    border-radius: .35rem;
    padding: .65rem .75rem;
    background: var(--kb-panel);
    color: var(--kb-ink);
    font-size: 1rem;
    font-weight: 300;
}
.kerby-email::placeholder { color: var(--kb-muted); }
/* The hero's "Get notified at launch" button jumps here, so leave the form some air
   above it rather than landing it hard against the top of the viewport. */
.kerby-signup { scroll-margin-top: 2rem; }
.kerby-signup :is(input, button):focus-visible {
    outline: 2px solid var(--kb-ink);
    outline-offset: 4px;
}
.kerby-button:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--kb-accent-line); }
.kerby-text-link { font-size: 1rem; }
.kerby-availability { margin-top: 1.1rem; color: var(--kb-muted); font-size: .78rem; }
.kerby-availability span:last-child { display: block; margin-top: .2rem; }
.kerby-preview { margin: .4rem 0 0; }
.kerby-section .kerby-preview { margin-top: 1.6rem; }
.kerby-preview a { display: block; border-radius: .6rem; }
.kerby-preview img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--kb-accent-line);
    border-radius: .6rem;
}
.kerby-preview figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; padding-top: .7rem; color: var(--kb-muted); font-size: .75rem; }
.kerby-section { padding: 2.7rem 0; border-bottom: .5px solid var(--kb-line); }
.kerby-section h2 { margin: .45rem 0 1rem; font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 300; line-height: 1.25; letter-spacing: -.02em; }
.kerby-section p:not(.kerby-eyebrow):not(.kerby-aside) { max-width: 39rem; font-size: 1.0625rem; }
.kerby-play-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 1.5rem 0; }
.kerby-play-modes h3 { margin-bottom: .6rem; font-size: .95rem; font-weight: 500; }
.kerby-mode-label { display: inline-block; margin-right: .4rem; padding: .1rem .45rem; border: 1px solid var(--kb-accent-line); border-radius: .2rem; color: var(--kb-ink); font-size: .75rem; text-transform: uppercase; }
.kerby-aside { margin-top: 1.2rem; color: var(--kb-muted); font-size: .92rem; }
.kerby-sound p + p:not(.kerby-aside) { margin-top: .9rem; }
.kerby-duck { margin-top: 1.6rem; padding: .75rem 1rem 1rem; border: 1px solid var(--kb-accent-line); border-radius: .6rem; background: var(--kb-panel); }
.kerby-duck svg { display: block; width: 100%; height: auto; overflow: visible; }
.kerby-diagram-grid { stroke: var(--kb-accent-line); fill: none; }
.kerby-diagram-label { fill: var(--kb-ink); font-size: 16px; font-weight: 500; }
.kerby-kick-shape { fill: var(--kb-ink); }
.kerby-bass-fill { fill: var(--kb-accent); fill-opacity: .2; }
.kerby-bass-curve { fill: none; stroke: var(--kb-ink); stroke-width: 2.5; stroke-linejoin: round; }
.kerby-duck-control { display: flex; align-items: center; gap: .8rem; color: var(--kb-ink); font-size: .8rem; }
.kerby-duck-control[hidden] { display: none; }
.kerby-duck-control label { margin-right: auto; font-weight: 500; }
.kerby-duck-control input { width: 35%; height: 2rem; min-width: 4rem; margin: 0; filter: none; accent-color: var(--kb-ink); cursor: ew-resize; }
.kerby-duck-control input:hover { filter: none; }
.kerby-duck-control input::-webkit-slider-thumb { background: var(--kb-ink); box-shadow: none; }
.kerby-duck-control input::-webkit-slider-runnable-track { background: var(--kb-accent-line); }
.kerby-duck-control input::-moz-range-thumb { background: var(--kb-ink); box-shadow: none; }
.kerby-duck-control input::-moz-range-track { background: var(--kb-accent-line); }
.kerby-duck figcaption { margin-top: .6rem; color: var(--kb-muted); font-size: .75rem; }
.kerby-page :is(a, input):focus-visible { outline: 2px solid var(--kb-ink); outline-offset: 5px; }
@media (max-width: 767px) {
    .kerby-page { margin: 0 .5rem; }
    .kerby-hero { padding-top: 1.8rem; }
}
@media (max-width: 540px) {
    .kerby-play-modes { grid-template-columns: 1fr; gap: 1.3rem; }
    .kerby-duck { padding: .5rem .65rem .75rem; }
    .kerby-duck-control { gap: .5rem; flex-wrap: wrap; }
    .kerby-duck-control label { flex-basis: 100%; }
    .kerby-duck-control input { flex: 1; }
    .kerby-section { padding: 2.1rem 0; }
}
@media (prefers-color-scheme: dark) {
    .kerby-header { --kb-ink: #ffc2d1; }
    .kerby-page, .kerby-signup { --kb-ink: #ffc2d1; --kb-accent: #ff7d9c; --kb-accent-line: #63434f; --kb-panel: #2b2226; --kb-line: rgba(230, 231, 227, .5); --kb-muted: #bbb2b5; }
}

/* Any on-screen label quoted in running text - a knob, tab, button, switch or menu
   command, written with the plugin's own capitalisation ("the Duck tab", "Untick
   Goes home"). The name of a control, not what it's set to: values stay plain,
   whether numbers or words ("Rate at 1/4", "Key on MIDI", "Free", "Init").
   Headings, <dt> terms, links and the signal-flow diagram stay plain too.
   Body weight, so a sentence full of them doesn't turn bold. */
.kerby-ui {
    padding: .05em .35em;
    border: 1px solid var(--kb-accent-line);
    border-radius: .3em;
    background: var(--kb-panel);
    white-space: nowrap;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* The same compact brand/navigation row precedes the divider on every KerBy page. */
.kerby-nav { display: flex; align-items: center; justify-content: flex-start; gap: 1rem; padding: 1rem 0 0; font-size: .9rem; }
.kerby-nav > div { display: flex; gap: 1.2rem; }
.kerby-nav :is(a, span[aria-current]) { padding: .5rem 0; }
.kerby-nav a:hover { color: var(--kb-ink); }
.kerby-nav [aria-current] { color: var(--kb-ink); text-decoration: underline 1.5px; text-underline-offset: .5rem; }
.kerby-next { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2rem 0; }
.kerby-next a { display: flex; flex-direction: column; gap: .5rem; font-size: .92rem; }
.kerby-next strong { color: var(--kb-ink); font-size: 1.12rem; font-weight: 500; line-height: 1.4; }
.kerby-next a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.kerby-doc-header { padding: 1.5rem 0 1rem; }
.kerby-doc-header .kerby-doc-title { min-width: 0; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 300; line-height: 1.15; letter-spacing: -.025em; margin: .6rem 0 1rem; }
.kerby-doc-header .kerby-lead { font-size: clamp(1.15rem, 2.5vw, 1.45rem); line-height: 1.45; letter-spacing: 0; max-width: 36rem; }
.kerby-doc-header p + p { margin-top: .8rem; }
.kerby-back { display: inline-block; margin-bottom: 1.5rem; font-size: .85rem; color: var(--kb-muted); }
.kerby-back:hover { text-decoration: underline; }
.kerby-doc-meta { font-size: .75rem; color: var(--kb-muted); }
.kerby-guide-list { display: grid; border-top: .5px solid var(--kb-line); border-bottom: .5px solid var(--kb-line); }
.kerby-guide-list a { display: grid; gap: .35rem; padding: 1.25rem 0; }
.kerby-guide-list a + a { border-top: .5px solid var(--kb-line); }
.kerby-guide-list a > span:first-child { color: var(--kb-ink); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.kerby-guide-list strong { font-weight: 500; font-size: 1.2rem; }
.kerby-guide-list a > span:last-child { color: var(--kb-muted); font-size: .9rem; }
.kerby-guide-list a:hover strong { color: var(--kb-ink); text-decoration: underline; text-underline-offset: 4px; }
.kerby-prose { font-size: 1.0625rem; }
.kerby-prose p { margin: .85rem 0; }
.kerby-prose h2 { margin: 0 0 1.1rem; font-size: 1.65rem; line-height: 1.25; font-weight: 300; letter-spacing: normal; }
.kerby-prose h3 { font-size: 1.05rem; font-weight: 500; margin: 1rem 0; }
.kerby-prose strong { font-weight: 500; }
.kerby-prose section { padding: 2.3rem 0; border-bottom: .5px solid var(--kb-line); }
.kerby-doc :is(section[id], article[id], h2[id]) { scroll-margin-top: 5rem; }
.kerby-prose a:not(.kerby-map-node) { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--kb-line); }
.kerby-prose a:hover { text-decoration-color: currentColor; }
.kerby-article-heading { margin-top: 2.8rem; }
.kerby-article-heading .kerby-eyebrow { margin-bottom: .6rem; }
.kerby-explained { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 1.7rem; }
.kerby-explainer { margin: 1rem 0; }
.kerby-explainer svg { display: block; width: 100%; height: auto; }
.kerby-explainer figcaption { margin-top: .6rem; color: var(--kb-muted); font-size: .8rem; line-height: 1.5; }
.kerby-related { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; padding-top: .5rem; font-size: .9rem; color: var(--kb-ink); }
.kerby-standfirst { font-size: 1.2rem; line-height: 1.5; }
.kerby-recipe { list-style: decimal; padding-left: 1.5rem; }
.kerby-recipe li { padding: 1.3rem 0 1rem .6rem; }
.kerby-recipe li::marker { font-size: .9rem; color: var(--kb-ink); font-weight: 500; }
.kerby-recipe h2 { margin-bottom: .8rem; font-size: 1.4rem; }
.kerby-callout { margin: 1.8rem 0; padding: 1.2rem 1.4rem; border-left: 3px solid var(--kb-ink); background: var(--kb-panel); }
.kerby-callout h2 { color: var(--kb-ink); font-size: 1.1rem; font-weight: 500; margin: 0 0 .6rem; }
.kerby-callout p { margin: .6rem 0; font-size: 1rem; }
.kerby-callout a { text-decoration: underline; text-underline-offset: 3px; }
.kerby-end-link { padding: 1.5rem 0; border-top: .5px solid var(--kb-line); color: var(--kb-ink); }
.kerby-prose section + .kerby-end-link { border-top: 0; }
.kerby-reference-map { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.4rem; border: 1px solid var(--kb-accent-line); border-radius: .4rem; background: var(--kb-panel); }
.kerby-reference-map strong { font-weight: 500; font-size: 1.25rem; }
.kerby-reference-map > span:last-child { font-size: .95rem; }
.kerby-reference-map:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.kerby-search { padding-top: 1.8rem; }
.kerby-search label { display: block; margin-bottom: .4rem; font-size: .85rem; font-weight: 500; }
.kerby-search > div { display: flex; gap: .7rem; }
.kerby-search input { min-width: 0; width: 100%; border: 1px solid var(--kb-accent-line); border-radius: .3rem; padding: .6rem .75rem; background: var(--kb-panel); color: inherit; font-size: 1rem; }
.kerby-search input::placeholder { color: var(--kb-muted); }
.kerby-search button { padding: .5rem .7rem; font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; }
.kerby-search p { min-height: 1.5rem; margin-top: .5rem; font-size: .8rem; color: var(--kb-muted); }
.kerby-topic-index { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; padding: 1.2rem 0; border-bottom: .5px solid var(--kb-line); font-size: .85rem; }
.kerby-topic-index a { padding: .3rem 0; text-decoration: underline; text-underline-offset: 3px; }
.kerby-reference-entries h2 a { text-decoration: none; }
.kerby-reference-entries h2 a:hover::after { content: ' #'; color: var(--kb-ink); }
.kerby-prose dl { display: grid; grid-template-columns: minmax(7rem, 1fr) 3fr; gap: .9rem 1.3rem; margin: 1.1rem 0; }
.kerby-prose dt { font-weight: 500; font-size: .95rem; }
.kerby-prose dd { margin: 0; }
.kerby-search[hidden], .kerby-reference-entries section[hidden] { display: none; }
.kerby-map-hint { font-size: .85rem; color: var(--kb-muted); }
.kerby-signal-map { margin: 1.2rem 0; border: 1px solid var(--kb-accent-line); border-radius: .6rem; background: var(--kb-panel); }
.kerby-map-scroll { overflow-x: auto; overscroll-behavior-x: contain; border-radius: .6rem; }
.kerby-map-scroll svg { display: block; width: 100%; min-width: 660px; }
.kerby-signal-map figcaption { padding: .8rem 1rem; border-top: 1px solid var(--kb-accent-line); color: var(--kb-muted); font-size: .8rem; }
.kerby-map-node rect { fill: var(--kb-panel); stroke: var(--kb-ink); stroke-width: 1; }
.kerby-map-node text { fill: var(--kb-ink); text-anchor: middle; font-size: 14px; font-weight: 500; }
.kerby-map-node:hover rect, .kerby-map-node:focus rect { stroke-width: 3; }
.kerby-audio-wire { fill: none; stroke: var(--kb-ink); stroke-width: 1.5; }
.kerby-control-wire { fill: none; stroke: var(--kb-ink); stroke-width: 1.5; stroke-dasharray: 5 4; }
.kerby-map-label { fill: var(--kb-muted); font-size: 12px; }
.kerby-map-sum { fill: var(--kb-panel); stroke: var(--kb-ink); }
.kerby-map-plus { text-anchor: middle; fill: var(--kb-ink); }
.kerby-flow-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--kb-ink); }
.kerby-flow-branches > div { display: flex; flex-direction: column; }
.kerby-flow-branches h3 { text-align: center; }
.kerby-flow-path { display: flex; flex-direction: column; flex: 1; gap: 1.5rem; list-style: none; padding: 0; text-align: center; }
.kerby-flow-path li { position: relative; display: flex; flex-direction: column; justify-content: center; flex: 1; gap: .3rem; border: 1px solid var(--kb-accent-line); border-radius: .35rem; padding: .6rem .7rem; background: var(--kb-panel); font-size: .9rem; }
.kerby-flow-path li:not(:last-child)::after { content: '↓'; position: absolute; left: calc(50% - .3rem); bottom: -1.5rem; line-height: 1.5rem; color: var(--kb-ink); }
.kerby-flow-path li > a { font-weight: 500; }
.kerby-flow-path span { font-size: .8rem; line-height: 1.4; color: var(--kb-muted); }
.kerby-flow-join { position: relative; width: 65%; margin: 1.6rem auto 1.8rem; }
.kerby-flow-join::before { content: '↓'; position: absolute; top: -1.6rem; left: calc(50% - .3rem); line-height: 1.5rem; color: var(--kb-ink); }
.kerby-bass-chain { max-width: 28rem; margin: 1.5rem auto; }
.kerby-page :is(button, summary, [tabindex]):focus-visible { outline: 2px solid var(--kb-ink); outline-offset: 4px; }
@media (max-width: 1080px) {
    .kerby-explained { grid-template-columns: 1fr; gap: 0; }
    .kerby-explainer { max-width: 26rem; width: 100%; margin: 1rem auto; }
}
@media (max-width: 540px) {
    .kerby-nav { gap: .5rem; font-size: .8rem; }
    .kerby-nav > div { gap: .8rem; }
    .kerby-next { grid-template-columns: 1fr; gap: 1.7rem; }
    .kerby-prose section { padding: 1.8rem 0; }
    .kerby-prose dl { display: block; }
    .kerby-prose dt { margin: 1.2rem 0 .3rem; }
    .kerby-flow-branches { gap: .7rem; }
    .kerby-flow-path li { padding: .6rem .4rem; }
    .kerby-flow-join { width: 85%; }
}

/* Shared link treatment takes precedence over diagram and article presentation. */
.kerby-page a.link-underline {
    text-decoration: underline 1.5px;
    text-decoration-color: currentColor;
    text-underline-offset: 3px;
    transition: text-underline-offset .2s ease;
}
.kerby-page a.link-underline:hover { text-underline-offset: 6px; }
/* Whole-row destinations use their layout and hover title as the link cue. */
.kerby-page :is(.kerby-next a, .kerby-guide-list a, .kerby-reference-map) { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    .kerby-page a.link-underline, .kerby-page a strong, .kerby-button, .kerby-nav a { transition: none; }
    .kerby-button:hover { transform: none; }
}
