/* Archive overrides.
 *
 * bor.css is vendored pristine from the live site; mirror tweaks live here.
 * The mirror renders vote/share buttons inert (disabled), but bor.css paints
 * disabled buttons pale as if already voted. Restore the enabled colors so
 * the archive looks like the live site, with a not-allowed cursor instead.
 */
[theme=light] button.quote__button[disabled] {
    color: #827e7c !important;
    cursor: not-allowed;
}
[theme=dark] button.quote__button[disabled] {
    color: #9e9b98 !important;
    cursor: not-allowed;
}

/* Page body (dark): match bash-card. */
html[theme=dark] body {
    background-color: #252422;
}
html[theme=dark] .header {
    background-color: #252422;
}
html[theme=dark] .quote__frame {
    background-color: #252422;
}

/* Inline <code> (faq prose, webmaster prose, empty-archive hints): the vendored
 * rule paints every code element as a full-width block (display:block,
 * pale yellow, no dark variant), which splits sentences and stretches
 * chips. Keep the vendor look, but scope it back to inline. */
.quote__body code,
html[theme=dark] code {
    display: inline;
    margin: 0;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    white-space: nowrap;
}
html[theme=light] .quote__body code {
    border: 1px solid #e6e5e0;
}
html[theme=dark] .quote__body code {
    background-color: #252323;
    border: 1px solid #42413d;
    color: #e0deda;
}

/* Search page: sort toggle row under the stats line. */
.searchsort {
    margin: 0 0 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
}
.searchsort__link.active {
    font-weight: bold;
    text-decoration: none;
    color: inherit;
    pointer-events: none;
}

/* Text selection: lime-tinted to match the site chrome (both themes),
 * instead of the browser-default blue. */
::selection {
    background-color: rgba(132, 184, 44, 0.35);
}
html[theme=light] ::selection {
    background-color: rgba(95, 134, 31, 0.28);
}

/* Triple-state theme button: in auto mode show a small dot marking
 * that the icon reflects the OS choice, not an explicit override. */
html[data-mode="auto"] .header__title_item.theme,
html[data-mode="auto"] .nav__item.theme {
    position: relative;
}
html[data-mode="auto"] .header__title_item.theme::after,
html[data-mode="auto"] .nav__item.theme::after {
    content: "";
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #859900;
}

/* Title row + domain chip (башорг.рф / bash.im).
 * Plain-CSS translation of the Tailwind chip:
 * text-xs font-mono px-2 py-0.5 rounded bg-[#2a2a2a]
 * text-neutral-400 border border-neutral-700/70. */
.header__title_row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.domain-chip {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.4;
    padding: 2px 8px;
    border-radius: 6px;
    background-color: #2a2a2a;
    color: #a3a3a3;
    border: 1px solid rgba(64, 64, 64, 0.7);
    white-space: nowrap;
}
html[theme=light] .domain-chip {
    background-color: #ecebe8;
    color: #6f6e6a;
    border-color: rgba(180, 179, 172, 0.7);
}

/* Era switch РФ / IM: darker pill holding labels + track, horizontal.
 * Plain-CSS translation of the original Tailwind pill:
 * outer px-3 py-1.5 rounded-xl bg-[#191919] border-[#2f2f2f] mx-1,
 * inner button gap-2, labels 11.5px bold tracking-wide
 * (active #85a626, inactive neutral-500), IM in mono,
 * track w-10 h-5 bg-[#2a2a2a] border-neutral-700, thumb 14px #85a626.
 * Links keep no-JS navigation; the track click flips era via cookie. */
.bash-era-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin: 0 4px;
    border-radius: 12px;
    background-color: #191919;
    border: 1px solid #2f2f2f;
    cursor: default;
    white-space: nowrap;
}
.bash-era-switch .bash-era-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.025em;
    line-height: 1.4;
    text-decoration: none;
    color: #737373;
    transition: color 0.2s;
}
.bash-era-switch .bash-era-label--im {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bash-era-switch .bash-era-label.active {
    color: #85a626;
}
.bash-era-switch .switch-track {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 40px;
    height: 20px;
    border-radius: 999px;
    background-color: #2a2a2a;
    border: 1px solid #404040;
    padding: 2px;
    position: relative;
    cursor: pointer;
}
.bash-era-switch .switch-thumb {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #85a626;
    transform: translateX(0);
    transition: transform 0.2s;
}
.bash-era-switch[data-era="old"] .switch-thumb {
    transform: translateX(20px);
}
html[theme=light] .bash-era-switch {
    background-color: #ecebe8;
    border-color: #d5d4cf;
}
html[theme=light] .bash-era-switch .bash-era-label {
    color: #8a8a8a;
}
html[theme=light] .bash-era-switch .bash-era-label.active {
    color: #85a626;
}
html[theme=light] .bash-era-switch .switch-track {
    background-color: #d8d7d3;
    border-color: #c2c1bc;
}
.bash-era-switch.mobile {
    width: fit-content;
    margin: 6px auto 2px;
}

/* Archive notice (eula page): plain-CSS translation of the Tailwind
 * museum card: rounded card with lime tint gradient, 4px left rail,
 * 40px icon tile, title + read-only badge, body, divider pills row.
 * Dark palette first (reference), light variant below. */
.archive-notice {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(132, 184, 44, 0.25);
    background: linear-gradient(90deg, rgba(132, 184, 44, 0.08), #2c2b28 45%, #292825);
    padding: 20px;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.archive-notice::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background-color: #84b82c;
}
.archive-notice__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(132, 184, 44, 0.15);
    border: 1px solid rgba(132, 184, 44, 0.25);
    color: #84b82c;
    display: flex;
    align-items: center;
    justify-content: center;
}
.archive-notice__icon svg {
    width: 20px;
    height: 20px;
}
.archive-notice__content {
    flex: 1;
    min-width: 0;
}
.archive-notice__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.archive-notice__title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0;
}
.archive-notice__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 500;
    background-color: rgba(132, 184, 44, 0.15);
    color: #84b82c;
    border: 1px solid rgba(132, 184, 44, 0.25);
    white-space: nowrap;
}
.archive-notice__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #84b82c;
}
.archive-notice__body {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #c4c1b9;
    max-width: 48em;
}
.archive-notice__pills {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    font-size: 12px;
    color: #9e9b98;
}
.archive-notice__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.archive-notice__pill svg {
    width: 14px;
    height: 14px;
    color: #8a8784;
}
@media (min-width: 640px) {
    .archive-notice {
        flex-direction: row;
        align-items: flex-start;
        padding: 20px 24px;
    }
}
html[theme=light] .archive-notice {
    background: linear-gradient(90deg, rgba(132, 184, 44, 0.12), #f4f5ec 45%, #ffffff);
}
html[theme=light] .archive-notice__icon,
html[theme=light] .archive-notice__badge {
    color: #5f861f;
}
html[theme=light] .archive-notice__dot {
    background-color: #5f861f;
}
html[theme=light] .archive-notice__body {
    color: #57534e;
}
html[theme=light] .archive-notice__pills {
    border-top-color: rgba(0, 0, 0, 0.08);
    color: #8a8784;
}

/* Origin divider: "Справка из оригинала" bubble between the archive
 * notice and the historical text it introduces (faq + eula). */
.origin-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
}
.origin-note::before,
.origin-note::after {
    content: "";
    height: 1px;
    flex: 1;
    background-color: rgba(132, 184, 44, 0.25);
}
.origin-note__bubble {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    padding: 2px 10px;
    border-radius: 999px;
    white-space: nowrap;
    color: #84b82c;
    background-color: rgba(132, 184, 44, 0.1);
    border: 1px solid rgba(132, 184, 44, 0.35);
}
html[theme=light] .origin-note__bubble {
    color: #5f861f;
}

/* FAQ redesign (plain-CSS translation of ./faq.html Tailwind draft).
 * New archive intro (hero + sections + cards + alive block) lives above
 * the "Справка из оригинала" divider; the historical text below it stays
 * verbatim. Dark palette first (reference), light variant below. */
.faq-hero {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(132, 184, 44, 0.25);
    background: linear-gradient(90deg, rgba(132, 184, 44, 0.09), #292825 45%, #252422);
    padding: 20px;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.faq-hero::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background-color: #84b82c;
}
.faq-hero__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(132, 184, 44, 0.15);
    border: 1px solid rgba(132, 184, 44, 0.25);
    color: #84b82c;
    display: flex;
    align-items: center;
    justify-content: center;
}
.faq-hero__icon svg {
    width: 20px;
    height: 20px;
}
.faq-hero__content {
    flex: 1;
    min-width: 0;
}
.faq-hero__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.faq-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 500;
    background-color: rgba(132, 184, 44, 0.15);
    color: #84b82c;
    border: 1px solid rgba(132, 184, 44, 0.25);
    white-space: nowrap;
}
.faq-hero__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #84b82c;
}
.faq-hero__mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #9e9b98;
    background-color: #252422;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #42413d;
    white-space: nowrap;
}
.faq-hero__title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
}
.faq-hero__body {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #c7c5be;
}
.faq-hero__body code {
    display: inline;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #84b82c;
    background-color: #252422;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #42413d;
    white-space: nowrap;
}
html[theme=light] .faq-hero {
    background: linear-gradient(90deg, rgba(132, 184, 44, 0.12), #f4f5ec 45%, #ffffff);
}
html[theme=light] .faq-hero__icon,
html[theme=light] .faq-hero__badge {
    color: #5f861f;
}
html[theme=light] .faq-hero__dot {
    background-color: #5f861f;
}
html[theme=light] .faq-hero__mono {
    color: #6f6e6a;
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #d5d4cf;
}
html[theme=light] .faq-hero__body {
    color: #57534e;
}
html[theme=light] .faq-hero__body code {
    color: #5f861f;
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #d5d4cf;
}
@media (min-width: 640px) {
    .faq-hero {
        flex-direction: row;
        align-items: flex-start;
        padding: 20px 24px;
    }
}

/* FAQ sections: "# Заголовок" head + left-bordered lead / grid / alive. */
.faq-section {
    margin: 0 0 20px;
}
.faq-section__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
}
.faq-section__head--split {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}
.faq-section__head-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.faq-section__hash {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: #84b82c;
    user-select: none;
}
.faq-section__title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
}
.faq-section__tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #9e9b98;
    background-color: #252422;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #42413d;
    white-space: nowrap;
}
html[theme=light] .faq-section__tag {
    color: #6f6e6a;
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #d5d4cf;
}
.faq-section__quote {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    padding-left: 16px;
    border-left: 2px solid #42413d;
}
@media (min-width: 640px) {
    .faq-section__quote {
        font-size: 15px;
    }
}

/* FAQ cards grid: 1 col mobile, 2 col from 640px, era card spans both. */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 640px) {
    .faq-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.faq-card {
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid #42413d;
    padding: 16px;
}
.faq-card:hover {
    border-color: #6f6e6a;
}
html[theme=light] .faq-card {
    background-color: rgba(0, 0, 0, 0.02);
    border-color: #d5d4cf;
}
html[theme=light] .faq-card:hover {
    border-color: #a8a7a1;
}
.faq-card--wide {
    grid-column: auto;
}
@media (min-width: 640px) {
    .faq-card--wide {
        grid-column: span 2;
    }
}
.faq-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.faq-card__title {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
}
.faq-card__meta {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #9e9b98;
    white-space: nowrap;
}
.faq-card__meta--code {
    display: inline-block;
    font-size: 11px;
    line-height: 1.4;
    color: #84b82c;
    background-color: #252422;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #42413d;
}
.faq-card__meta--ok {
    color: #84b82c;
}
html[theme=light] .faq-card__meta--code,
html[theme=light] .faq-card__meta--ok {
    color: #5f861f;
}
html[theme=light] .faq-card__meta--code {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #d5d4cf;
}
.faq-card__era {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
}
.faq-card__era-label {
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.4;
    background-color: #252422;
    border: 1px solid #42413d;
    color: #9e9b98;
}
.faq-card__era-label--active {
    color: #84b82c;
}
.faq-card__era-sep {
    color: #9e9b98;
}
html[theme=light] .faq-card__era-label {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #d5d4cf;
}
html[theme=light] .faq-card__era-label--active {
    color: #5f861f;
}
.faq-card__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}
.faq-card__text code {
    display: inline;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}
.faq-card__link {
    color: #84b82c;
    text-underline-offset: 2px;
}
html[theme=light] .faq-card__link {
    color: #5f861f;
}

/* FAQ alive block: amber dot + text + button link. */
.faq-alive {
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #42413d;
    padding: 20px;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
html[theme=light] .faq-alive {
    background-color: rgba(0, 0, 0, 0.03);
}
.faq-alive__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
}
.faq-alive__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(251, 191, 36, 0.9);
    flex-shrink: 0;
}
.faq-alive__title {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
}
.faq-alive__text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}
.faq-alive__text a {
    color: #84b82c;
    font-weight: 500;
    text-underline-offset: 2px;
}
html[theme=light] .faq-alive__text a {
    color: #5f861f;
}
.faq-alive__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid #42413d;
    transition: background-color 0.2s;
}
.faq-alive__btn svg {
    width: 14px;
    height: 14px;
    color: #84b82c;
}
html[theme=light] .faq-alive__btn svg {
    color: #5f861f;
}
@media (min-width: 640px) {
    .faq-alive {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .faq-alive__btn {
        align-self: center;
    }
}

/* FAQ vendor overrides: bor.css `.info .quote__body p/h2/h3/svg/code`
 * (0,2,1) beats plain `.faq-*` (0,1,0), so re-assert the draft values
 * with stronger selectors. No markup changes. */
.info .quote__body .faq-hero__title {
    margin: 0 0 6px;
    padding: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}
.info .quote__body .faq-section__title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}
.info .quote__body .faq-card__title {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
.info .quote__body .faq-alive__title {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}
.info .quote__body .faq-hero__body,
.info .quote__body .faq-section__quote,
.info .quote__body .faq-card__text,
.info .quote__body .faq-alive__text p {
    margin: 0;
    line-height: 1.625;
}
.info .quote__body .faq-section__quote,
.info .quote__body .faq-card__text,
.info .quote__body .faq-alive__text p {
    color: #9e9b98;
}
html[theme=light] .info .quote__body .faq-section__quote,
html[theme=light] .info .quote__body .faq-card__text,
html[theme=light] .info .quote__body .faq-alive__text p {
    color: #57534e;
}
html[theme=light] .info .quote__body .faq-section__quote {
    border-left-color: #d5d4cf;
}
/* Era labels: plain mono tokens, not chips (./faq.html:108-112). */
.info .quote__body .faq-card__text code {
    color: inherit;
    background: none;
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
}
/* Card header chip: beat the generic inline-code rule (0,1,1) so the
 * 11px mono metrics match the other labels. */
.info .quote__body .faq-card__meta--code {
    display: inline-block;
    font-size: 11px;
    line-height: 1.4;
    padding: 2px 6px;
}
.info .quote__body .faq-hero__icon svg,
.info .quote__body .faq-alive__btn svg {
    margin: 0;
}
.info .quote__body .faq-alive__text a {
    text-decoration: underline;
}
.info .quote__body a.faq-alive__btn,
.info .quote__body a.faq-alive__btn:hover {
    color: #e0deda;
}
html[theme=light] .info .quote__body a.faq-alive__btn,
html[theme=light] .info .quote__body a.faq-alive__btn:hover {
    color: #252323;
}
.faq-card--wide .faq-card__top {
    flex-wrap: wrap;
}
.faq-alive__text {
    flex: 1;
    min-width: 0;
}
html[theme=light] .faq-alive,
html[theme=light] .faq-alive__btn {
    border-color: #d5d4cf;
}
html[theme=light] .faq-alive__btn {
    background-color: rgba(0, 0, 0, 0.02);
}
.faq-alive__btn:hover {
    background-color: #42413d;
}
html[theme=light] .faq-alive__btn:hover {
    background-color: #d5d4cf;
}

/* Historical reference text ("Справка из оригинала", faq + eula).
 * Editorial typography over the vendored .info rules; the wording stays
 * verbatim. All selectors beat vendor (0,2,1). */
.info .quote__body .origin-text {
    min-width: 0;
}
.info .quote__body .origin-text .origin-note {
    margin: 0 0 20px;
}
.info .quote__body .origin-text h2 {
    margin: 24px 0 10px;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}
.info .quote__body .origin-text > .origin-note + h2 {
    margin-top: 4px;
}
.info .quote__body .origin-text h3 {
    margin: 22px 0 8px;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}
.info .quote__body .origin-text h4 {
    margin: 18px 0 6px;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}
.info .quote__body .origin-text p {
    margin: 0 0 10px;
    line-height: 1.6;
}
.info .quote__body .origin-text ol,
.info .quote__body .origin-text ul {
    margin: 0 0 12px;
    padding-left: 22px;
}
.info .quote__body .origin-text li {
    margin: 0 0 6px;
    line-height: 1.6;
}
.info .quote__body .origin-text li::marker {
    color: #84b82c;
}
html[theme=light] .info .quote__body .origin-text li::marker {
    color: #5f861f;
}
.info .quote__body .origin-text abbr[title] {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: help;
}
.info .quote__body .origin-text strike,
.info .quote__body .origin-text s {
    opacity: 0.6;
}

/* Mobile header (plain-CSS translation of ./mobile_header.html Tailwind draft).
 * 3 rows: brand + domain + era + search/info/theme, Цитаты/Комиксы tabs,
 * sort bar (quote sections only, hidden elsewhere by the template).
 * Dark palette first (reference), light variant below. Desktop (1024px+)
 * keeps the vendored bor.css header/nav; .mhead only shows below that,
 * and the legacy .header__title row only shows on desktop. */
@media (max-width: 1023px) {
    .header__title {
        display: none;
    }
}
.mhead {
    display: block;
    background-color: #262523;
    color: #e5e5e5;
    border-bottom: 1px solid #363532;
}
@media (min-width: 1024px) {
    .mhead {
        display: none;
    }
}
.mhead__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 48px;
    padding: 0 12px;
    border-bottom: 1px solid #33322f;
}
.mhead__brand {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.mhead__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mhead__domain {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    line-height: 1.4;
    padding: 2px 6px;
    border-radius: 6px;
    background-color: #1e1d1b;
    color: #9e9d99;
    border: 1px solid #3c3b38;
    white-space: nowrap;
    flex-shrink: 0;
}
.mhead__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
/* Compact era pill for the mobile top row: overrides the default
 * .bash-era-switch padding/radius to match the draft. Thumb positioning
 * (left = РФ, right = IM) comes from the shared data-era rule. */
.bash-era-switch.mhead__era {
    gap: 6px;
    padding: 4px 8px;
    margin: 0;
    border-radius: 999px;
    background-color: #1e1d1b;
    border-color: #3c3b38;
    font-size: 10px;
}
.bash-era-switch.mhead__era .bash-era-label {
    font-size: 10px;
}
.bash-era-switch.mhead__era .switch-track {
    width: 20px;
    height: 12px;
    padding: 2px;
}
.bash-era-switch.mhead__era .switch-thumb {
    width: 8px;
    height: 8px;
}
.bash-era-switch.mhead__era[data-era="old"] .switch-thumb {
    transform: translateX(8px);
}
.mhead__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s;
}
.mhead__icon:hover {
    background-color: #33322f;
}
.mhead__icon--dim {
    color: #9e9d99;
}
.mhead__icon svg {
    width: 18px;
    height: 18px;
}
.mhead__icon.theme .header__title_icon,
.mhead__icon.theme svg {
    width: 18px;
    height: 18px;
}
/* Theme icon svg reuses the site moon/sun toggle (visibility handled by
 * bor.css); the auto-mode dot mirrors .header__title_item.theme. */
.mhead__icon.theme g {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}
.mhead__icon.theme g.sun,
html[theme="light"] .mhead__icon.theme g.moon {
    visibility: visible;
    opacity: 1;
}
html[data-mode="auto"] .mhead__icon.theme {
    position: relative;
}
html[data-mode="auto"] .mhead__icon.theme::after {
    content: "";
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #859900;
}
.mhead__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 12px 0;
}
.mhead__tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    text-decoration: none;
    color: #9e9d99;
    border: 1px solid transparent;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.mhead__tab:hover {
    color: #e5e5e5;
}
.mhead__tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.mhead__tab.active {
    background-color: #1e1d1b;
    border-color: #84a81e;
    color: #84a81e;
    font-weight: 600;
}
.mhead__sort {
    padding: 8px 12px;
}
.mhead__sortrow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 2px;
    border-radius: 8px;
    background-color: #3c3b38;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}
.mhead__sortlink {
    display: block;
    padding: 4px 2px;
    border-radius: 6px;
    color: rgba(229, 229, 229, 0.85);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.15s, color 0.15s;
}
.mhead__sortlink:hover {
    color: #fff;
}
.mhead__sortlink.active {
    background-color: #1e1d1b;
    color: #fff;
    font-weight: 600;
}
/* Light theme: derived from existing archive.css tokens. */
html[theme="light"] .mhead {
    background-color: #fff;
    color: #252323;
    border-bottom-color: #e6e5e0;
}
html[theme="light"] .mhead__top {
    border-bottom-color: #e6e5e0;
}
html[theme="light"] .mhead__domain {
    background-color: #ecebe8;
    color: #6f6e6a;
    border-color: rgba(180, 179, 172, 0.7);
}
html[theme="light"] .bash-era-switch.mhead__era {
    background-color: #ecebe8;
    border-color: #d5d4cf;
}
html[theme="light"] .mhead__icon:hover {
    background-color: #ecebe8;
}
html[theme="light"] .mhead__icon--dim {
    color: #6f6e6a;
}
html[theme="light"] .mhead__tab {
    color: #6f6e6a;
}
html[theme="light"] .mhead__tab:hover {
    color: #252323;
}
html[theme="light"] .mhead__tab.active {
    background-color: #ecebe8;
    border-color: #5f861f;
    color: #5f861f;
}
html[theme="light"] .mhead__sortrow {
    background-color: #edece8;
}
html[theme="light"] .mhead__sortlink {
    color: #57534e;
}
html[theme="light"] .mhead__sortlink:hover {
    color: #252323;
}
html[theme="light"] .mhead__sortlink.active {
    background-color: #fff;
    color: #252323;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Error panel (plain-CSS translation of the 404 draft), rendered inside
 * the original quote frame so the border stays like it was before.
 * Used by error.html for 404s and 500s; the eyebrow code is dynamic
 * (Ошибка • 404/500) and the "Страница не найдена" hint renders on
 * 404s only. Dark palette first (reference), light variant below. */
.err-panel__eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.err-panel__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8f9189;
}
.err-panel__dot {
    color: #4a4c44;
}
.err-panel__code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #84b82c;
}
.err-panel__title {
    margin: 0 0 8px;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #e5e5e5;
}
@media (min-width: 640px) {
    .err-panel__title {
        font-size: 24px;
    }
}
.err-panel__hint {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.625;
    color: #9e9b98;
    max-width: 32rem;
}
.err-panel__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}
.err-panel__link {
    color: #84b82c;
    text-decoration: underline;
    text-decoration-color: rgba(132, 184, 44, 0.4);
    text-underline-offset: 4px;
    transition: color 0.15s, text-decoration-color 0.15s;
}
.err-panel__link:hover {
    color: #a4bd00;
    text-decoration-color: #a4bd00;
}
.err-panel__sep {
    color: #5c5e56;
    user-select: none;
}
/* Light theme: derived from existing archive.css tokens. */
html[theme="light"] .err-panel__label {
    color: #8a8784;
}
html[theme="light"] .err-panel__dot,
html[theme="light"] .err-panel__sep {
    color: #c2c1bc;
}
html[theme="light"] .err-panel__code,
html[theme="light"] .err-panel__link {
    color: #5f861f;
}
html[theme="light"] .err-panel__title {
    color: #252323;
}
html[theme="light"] .err-panel__hint {
    color: #57534e;
}
html[theme="light"] .err-panel__link {
    text-decoration-color: rgba(95, 134, 31, 0.4);
}
html[theme="light"] .err-panel__link:hover {
    color: #4c6d18;
    text-decoration-color: #4c6d18;
}
