:root {
    --sidebar-width: 160px;
    --toc-width: 160px;
    --content-padding: 1.0rem;
}

article[role="main"] {
    max-width: none;
}

.main {
    max-width: none;
}

table.docutils {
    width: 100%;
}

table.docutils td,
table.docutils th {
    padding: 0.5rem 0.75rem;
    vertical-align: top;
}


table.docutils td code,
table.docutils th code {
    white-space: normal;
    overflow-wrap: anywhere;
}


table.docutils td > p > code:only-child,
table.docutils td > p > strong:only-child > code:only-child {
    white-space: nowrap;
}

.abt-ba-figure {
    margin: 1.5rem auto;
    max-width: 560px;
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-background-secondary);
}

.abt-ba-head {
    padding: 9px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--color-background-border);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-foreground-muted);
}

.abt-ba-head .abt-ba-hint {
    color: var(--color-brand-primary);
    font-size: 10px;
}

.abt-ba {
    position: relative;
    --pos: 50%;
    aspect-ratio: 414 / 434;
    overflow: hidden;
    background: #000;
    /* pan-y lets a vertical swipe scroll the page while a horizontal drag is
       left to the pointer handlers in compare_slider.js. */
    touch-action: pan-y;
    cursor: ew-resize;
    -webkit-user-select: none;
    user-select: none;
}

.abt-ba-pane {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.abt-ba-pane img {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    max-width: none;
    margin: 0;
    display: block;
}

.abt-ba-pane--with {
    clip-path: inset(0 0 0 var(--pos));
}

.abt-ba-pane--with img {
    left: -100%;
}

.abt-ba-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 2px;
    margin-left: -1px;
    background: var(--color-brand-primary);
    pointer-events: none;
}

.abt-ba-grip {
    position: absolute;
    top: 50%;
    left: var(--pos);
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 1px solid var(--color-brand-primary);
    border-radius: 50%;
    background: var(--color-background-primary);
    color: var(--color-brand-primary);
    display: grid;
    place-items: center;
    font-size: 11px;
    letter-spacing: -0.08em;
    pointer-events: none;
}

.abt-ba-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: ew-resize;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.abt-ba-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 40px;
    height: 100%;
}

.abt-ba-range::-moz-range-thumb {
    width: 40px;
    height: 100%;
    border: 0;
    opacity: 0;
}

.abt-ba-tag {
    position: absolute;
    top: 10px;
    padding: 4px 9px;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--color-background-primary);
    border: 1px solid var(--color-background-border);
    pointer-events: none;
    line-height: 1.2;
}

.abt-ba-tag--l { left: 10px; color: #e05252; }
.abt-ba-tag--r { right: 10px; color: #2fa96b; }

.abt-ba-row {
    position: absolute;
    left: 10px;
    padding: 3px 7px;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-foreground-muted);
    background: var(--color-background-primary);
    pointer-events: none;
    line-height: 1.2;
}

.abt-ba-row--src { top: 50%; margin-top: -30px; }
.abt-ba-row--out { bottom: 10px; }

.abt-ba-caption {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-foreground-secondary);
}
