/* Main page (main_new): keep H1 styling isolated to the hero only. */
.new-main-content-inner h1.new-main-page-header {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: normal;
    color: #E60000;
    padding-left: 0;
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.new-main-content-inner .new-main-title-row--sub > h1.new-main-page-header {
    font-size: 1.25rem;
    max-width: 320px;
}

/* Title + logo: horizontal flex; wrap used on narrow screens instead of column layout */
.new-main-title-row {
    display: flex;
    /* First row: fish column stretches to REDFISH BAY column height (see > .new-logo img) */
    align-items: stretch;
    /* Keep the same left column width as the design */
    --new-main-hero-title-col: calc(50vw - var(--new-main-hero-center-offset) - var(--new-main-hero-gutter));
}

/* Main hero: left “REDFISH BAY” SVG column */
.new-main-content-inner .new-main-title-row > .new-main-page-header {
    flex: 0 0 var(--new-main-hero-title-col);
    width: var(--new-main-hero-title-col);
    max-width: var(--new-main-hero-title-col);
    margin: 0;
    min-width: 0;
}

/* redfish_bay.svg viewBox 0 0 672 67 — lock ratio so height tracks column width */
.new-main-content-inner .new-main-title-row > .new-main-page-header img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 672 / 67;
}

/* Fish logo: same rendered height as REDFISH BAY at this breakpoint (title column × 67/672) */
.new-main-content-inner .new-main-title-row:not(.new-main-title-row--sub) > .new-logo {
    flex: 0 0 calc(var(--new-main-hero-title-col) / 2);
    width: calc(var(--new-main-hero-title-col) / 2);
    max-width: calc(var(--new-main-hero-title-col) / 2);
    margin-left: var(--new-main-hero-logo-gap-fixed);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    line-height: 0;
}

.new-main-title-row .new-logo {
    flex-shrink: 0;
    margin-left: var(--new-main-hero-logo-gap-fixed);
}

.new-main-content-inner .new-main-title-row:not(.new-main-title-row--sub) > .new-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: calc(var(--new-main-hero-title-col) * 67 / 672);
    object-fit: contain;
    object-position: left center;
}

@media (max-width: 767.98px) {
    /* Keep baseline alignment */
    .new-main-content-inner .new-main-title-row {
        align-items: center;
    }
}

/* Sub hero row: two columns aligned like the mock (left subtitle + right tagline) */
.new-main-content-inner .new-main-title-row--sub {
    display: flex;
    align-items: flex-start;
    margin-top: clamp(0.5rem, 1.5vw, 1rem);
}

@media (min-width: 992px) {
    .new-main-content-inner .new-main-title-row--sub {
        margin-top: 40px;
    }
}

.new-main-content-inner .new-main-title-row--sub > .new-main-page-subtitle {
    flex: 0 0 var(--new-main-hero-title-col);
    width: var(--new-main-hero-title-col);
    max-width: var(--new-main-hero-title-col);
    margin: 0;
}

/* main_new: `vadim_kalinin_sait.svg` must be exactly half of `redfish_bay.svg` width */
.new-main-content-inner .new-main-title-row--sub > .new-main-page-subtitle img {
    width: 50% !important;
    height: auto !important;
}

/* main_new: desktop/mobile logo switch */
.new-main-content-inner .new-logo--mobile {
    display: none !important;
}

/* main_new: mobile/narrow — stack all hero logos/text into one full-width column */
@media (max-width: 767.98px) {
    /* Cover image edge-to-edge; content inset via --new-main-hero-gutter on children below */
    .new-main-content-inner {
        overflow-x: hidden;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 0;
        --new-main-hero-gutter: 1rem;
    }

    .new-main-content-inner .new-main-hero-menu,
    .new-main-content-inner .new-main-title-row {
        padding-left: var(--new-main-hero-gutter);
        padding-right: var(--new-main-hero-gutter);
        box-sizing: border-box;
    }

    .new-main-content-inner .new-main-title-row,
    .new-main-content-inner .new-main-title-row--sub {
        flex-direction: column;
        align-items: flex-start;
    }

    .new-main-content-inner .new-main-title-row > .new-main-page-header,
    .new-main-content-inner .new-main-title-row > .new-logo,
    .new-main-content-inner .new-main-title-row--sub > .new-main-page-subtitle {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .new-main-content-inner .new-main-title-row > .new-logo {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .new-main-content-inner .new-main-title-row > .new-logo img,
    .new-main-content-inner .new-main-title-row--sub > .new-main-page-subtitle img {
        width: 100% !important;
        height: auto !important;
    }

    /* vadim_kalinin_sait.svg: 2/3 of redfish_bay.svg */
    .new-main-content-inner .new-main-title-row--sub > .new-main-page-subtitle img {
        width: 66.6667% !important;
        margin-left: 0 !important;
    }

    /* Move main_new_logo under vadim svg on mobile */
    .new-main-content-inner .new-logo--desktop {
        display: none !important;
    }
    .new-main-content-inner .new-logo--mobile {
        display: inline-flex !important;
        align-items: flex-start;
        justify-content: flex-start;
        align-self: flex-start;
        margin-left: 0 !important;
        margin-top: 0.5rem;
        width: 44.4444% !important;
    }
    /* main_new_logo: 2/3 of vadim svg => 4/9 of full width */
    .new-main-content-inner .new-logo--mobile img {
        display: block;
        width: 100% !important;
        height: auto !important;
    }

    /* Safety: never inherit desktop logo spacing rules on mobile */
    .new-main-content-inner .new-main-title-row--sub > .new-logo--mobile {
        margin-left: 0 !important;
        max-width: none !important;
    }

    /* H1: bottom of hero; left edge aligned with .new-logo--mobile (same inset as subtitle + fish) */
    .new-main-content-inner .new-main-title-row--sub > h1.new-main-page-header {
        position: absolute;
        left: var(--new-main-hero-gutter);
        right: var(--new-main-hero-gutter);
        bottom: 60px;
        width: auto;
        max-width: 320px;
        margin-left: 0 !important;
        flex: none;
        box-sizing: border-box;
        z-index: 1;
    }
}

/*
 * Pin H1 to the bottom of .new-main-content-inner (60px from cover bottom).
 * Left edge matches the fish logo (.new-logo--desktop row 1 / .new-logo--mobile):
 * gutter + REDFISH BAY column + gap — same as first-row .new-logo margin box.
 */
@media (min-width: 768px) {
    .new-main-content-inner {
        padding-bottom: 0;
    }

    .new-main-content-inner .new-main-title-row--sub > h1.new-main-page-header {
        position: absolute;
        left: calc(
            var(--new-main-hero-gutter) + var(--new-main-hero-title-col) +
                var(--new-main-hero-logo-gap-fixed)
        );
        right: var(--new-main-hero-gutter);
        bottom: 60px;
        width: auto;
        max-width: 320px;
        margin-left: 0;
        flex: none;
        box-sizing: border-box;
        z-index: 1;
    }
}

.new-main-page-subtitle {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: normal;
    color: #E60000;
    padding-left: 0;
}
.top-menu-cont .top-menu-item a {
    color: #E60000;
    text-decoration: none;
    font-family: Inter, sans-serif;
    font-weight: normal;
}

/* Search button in hero menu (opens modal) — match link look */
.top-menu-cont .top-menu-search__btn {
    color: #E60000;
    font-family: Inter, sans-serif;
    font-weight: normal;
    background: transparent;
    border: 0;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.top-menu-cont .top-menu-search__btn:hover {
    color: #580101;
    text-decoration: underline;
}

.top-menu-cont .top-menu-search__btn:focus-visible {
    outline: 2px solid #E60000;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Larger search icon on big screens */
@media (min-width: 992px) {
    .top-menu-cont .top-menu-search__btn svg {
        width: 20px;
        height: 20px;
    }
}
.new-main-content{
    background-color: #FFFFFF;
    width: 100%;
}

/* Full viewport width — break out of #app_container.container-fluid gutters (same pattern as .new-main-page-footer).
   Single full-bleed layer: width 100vw + centering margins. Inner uses width:100% only (no second calc — avoids scrollbar gap). */
#app_container > .new-main-content {
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
}

/* Mobile: full-bleed hero/footer to viewport edges (same vw trick as desktop; html overflow-x: hidden) */
@media (max-width: 767.98px) {
    #app_container > .new-main-content {
        width: 100vw;
        max-width: none;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }

    .new-main-content-inner {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    #app_container > .new-main-page-footer {
        width: 100vw;
        max-width: none;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }
}

/* Hero: fills .new-main-content (already 100vw full-bleed). */
.new-main-content-inner {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    /* Base proportions @ 1440px: 40 / 1200 / 40 / (logo) */
    --new-main-hero-gutter: calc(100vw * 40 / 1440);
    --new-main-hero-title: calc(100vw * 1200 / 1440);
    --new-main-hero-gap: calc(100vw * 40 / 1440);
    /* Fixed designer anchors */
    --new-main-hero-center-offset: 20px;
    --new-main-hero-logo-gap-fixed: 40px;
    position: relative;
    height: 730px;
    padding-top: clamp(0.75rem, calc(1.5vw + 0.35rem), 1.5rem);
    padding-left: var(--new-main-hero-gutter);
    padding-right: var(--new-main-hero-gutter);
    padding-bottom: clamp(2.75rem, 6vw, 4rem);
    text-align: left;
    background-image: url("/static/img/fishfone.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Main page: menu scrolls with hero (not fixed). */
.new-main-hero-menu {
    width: 100%;
    margin-bottom: 0.15rem;
}

.new-main-hero-menu .top-menu-cont .top-menu-item a {
    text-transform: lowercase;
}

/* main_new hero menu: white pill items */
.new-main-content-inner .new-main-hero-menu .top-menu-cont {
    gap: 0.5rem 1rem;
}

/* Large screens: wider spacing between pills (hero flex gap; sticky uses margin on links below) */
@media (min-width: 992px) {
    .new-main-content-inner .new-main-hero-menu .top-menu-cont {
        gap: 0.5rem 2.75rem;
    }
}

.new-main-content-inner .new-main-hero-menu .top-menu-item {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 9999px;
    padding: 0.2rem 0.6rem;
    display: inline-flex;
    align-items: center;
}

.new-main-content-inner .new-main-hero-menu .top-menu-item > a,
.new-main-content-inner .new-main-hero-menu .top-menu-search__btn {
    margin-right: 0 !important;
    padding: 0;
    background: transparent;
}

.new-main-content-inner .new-main-hero-menu .top-menu-search--hero {
    margin-left: auto;
}

.new-main-content-inner .new-main-hero-menu .top-menu-user--hero {
    margin-left: 0 !important;
}

.new-main-content-inner .new-main-hero-menu .top-menu-user--hero .user-block.container-fluid {
    padding-left: 0;
    padding-right: 0;
    width: auto;
}

/* Remove extra left inset before "Войти" */
.new-main-content-inner .new-main-hero-menu .top-menu-user--hero .user-block.container-fluid > * {
    margin-left: 0 !important;
}

/* Make the search item match pill sizing */
.new-main-content-inner .new-main-hero-menu .top-menu-search__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5rem;
    padding: 0.25rem 0.5rem;

}

.new-main-content-inner .new-main-hero-menu .top-menu-search__btn svg {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
}

/* Clickable down arrow: bottom center of hero, scrolls to featured block */
.new-main-scroll-down {
    position: absolute;
    left: 50%;
    bottom: 150px;
    z-index: 2;
    transform: translateX(-50%);
    line-height: 0;
    text-decoration: none;
    display: block;
}

.new-main-scroll-down img {
    display: block;
    width: clamp(28px, 5vw, 40px);
    height: auto;
}

.new-main-scroll-down:hover img,
.new-main-scroll-down:focus-visible img {
    opacity: 0.82;
}

.new-main-scroll-down:focus-visible {
    outline: 2px solid #E60000;
    outline-offset: 4px;
    border-radius: 2px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

html {
    font-size: 16px;
    /* Prevent ~15px horizontal scroll from full-bleed sections using width:100vw (scrollbar not in vw). */
    overflow-x: hidden;
}

/* Same column width as hero; directly under the hero — no top gap */
.new-main-content-inner-last-stared {
    /* Taller image column only in this block (featured + stared cards); lists elsewhere stay :root 400px */
    --rfb-card-media-height: 800px;
    box-sizing: border-box;
    max-width: 1440px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    padding: 1.5rem;
}

/* All stared text parts (grid of cards below featured); same max-width rhythm as last-stared */
.new-main-content-inner-all-stared {
    box-sizing: border-box;
    max-width: 1440px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    padding: 0 0 1rem;
}

@media (min-width: 768px) {
    .new-main-content-inner-all-stared {
        padding-bottom: 1.75rem;
    }
}

/* Red strip under main_new; full viewport width (no gaps from .container-fluid padding) */
#app_container > .new-main-page-footer {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
    min-height: 100px;
    background-color: #E60000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 clamp(0.75rem, 2vw, 1.5rem);
    margin-top: 0;
}

.new-main-page-footer__link {
    color: #fff;
    text-decoration: none;
    font-family: Inter, sans-serif;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
}

.new-main-page-footer__link:hover,
.new-main-page-footer__link:focus {
    color: #fff;
    text-decoration: underline;
}

.new-main-all-stared-heading {
    margin: 0;
    padding-left: 1.5rem;
}

.new-main-all-stared-heading__title {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 2rem;
    font-weight: normal;
    color: #0B6977;
    margin: 0;
    padding: 0;
}

.new-main-all-stared {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 991.98px) {
    .new-main-all-stared {
        grid-template-columns: 1fr;
    }
}

.new-main-all-stared__card {
    margin-top: 0;
}

.rfb-card {
    margin: 0;
    box-sizing: border-box;
}

/* Card lists: simple flex layout, max 2 per row */
:is(.rfb-cards-flex, .new-main-all-stared) {
    --rfb-card-width: 700px;
    --rfb-cards-gap-x: 2rem;
    --rfb-cards-gap-y: 1rem;

    display: flex;
    flex-wrap: wrap;
    /* flex-start: last row with a single card stays in the first column, not centered */
    justify-content: flex-start;
    gap: var(--rfb-cards-gap-y) var(--rfb-cards-gap-x);

    /* Never allow more than two cards per row */
    max-width: calc((2 * var(--rfb-card-width)) + var(--rfb-cards-gap-x));
    margin-left: auto;
    margin-right: auto;
}

:is(.rfb-cards-flex > .rfb-card, .new-main-all-stared > .new-main-all-stared__card) {
    flex: 0 0 var(--rfb-card-width);
    max-width: var(--rfb-card-width);
}

@media (max-width: 640px) {
    :is(.rfb-cards-flex, .new-main-all-stared) {
        --rfb-card-width: 100%;
        max-width: 100%;
    }
}

.rfb-card__surface {
    background: #fff;
    color: #222;
    padding: 1.5rem;
    border-radius: 2px;
    box-sizing: border-box;
    /* Card lists typography (do not affect single text pages) */
    font-size: 0.875rem;
}

.rfb-card__surface .new-main-featured__title {
    /* Override global `.new-main-featured__title` sizing for list cards */
    font-size: 1.75rem !important;
    line-height: 1.2;
}

.rfb-card__surface .new-main-featured__author,
.rfb-card__surface .new-main-featured__author-link {
    font-size: 1.225rem !important;
    line-height: 1.3;
}

.rfb-card__surface .new-main-featured__text-body {
    /* Override `:is(article, .new-main-featured__text-body)` baseline */
    font-size: 0.875rem !important;
    line-height: 1.5;
}

/* main_new: all-stared block uses legacy card markup; keep same 0.875rem body text as list cards */
.new-main-content-inner-all-stared .new-main-featured__text-body {
    font-size: 0.875rem !important;
    line-height: 1.5;
}

.new-main-content-inner-all-stared .new-main-featured__title {
    font-size: 1.75rem !important;
    line-height: 1.2;
}

.new-main-content-inner-all-stared .new-main-featured__author,
.new-main-content-inner-all-stared .new-main-featured__author-link {
    font-size: 1.225rem !important;
    line-height: 1.3;
}

.rfb-card__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.rfb-card__grid--text-only {
    grid-template-columns: 1fr;
}

@media (max-width: 575.98px) {
    .rfb-card__grid {
        grid-template-columns: 1fr;
    }

    .rfb-card__media {
        order: -1;
    }
}

.rfb-card__media-inner {
    width: 100%;
    background: #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.rfb-card .rfb-list__placeholder {
    width: 100%;
    flex: 1;
    min-height: 12rem;
    aspect-ratio: 3 / 4;
    border-radius: 2px;
    overflow: hidden;
}

.rfb-card .rfb-list__placeholder-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.rfb-card .rfb-card__media-inner :is(img, .img-thumbnail) {
    /* Fill the media column without cropping. */
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    display: block;
    object-fit: contain;
    box-sizing: border-box;
}

/*
 * Card lists (rfb-cards-flex) + featured / stared grids: shared media height, cover fill (crop).
 */
:root {
    --rfb-card-media-height: 400px;
}

.rfb-cards-flex .rfb-card__media {
    width: 100%;
    min-width: 0;
    height: var(--rfb-card-media-height);
    box-sizing: border-box;
    align-self: stretch;
}

.rfb-cards-flex .rfb-card__media-inner {
    height: 100%;
    min-height: 0;
}

.rfb-cards-flex .rfb-card__media-inner .image-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    display: block;
    overflow: hidden;
}

.rfb-cards-flex .rfb-card .rfb-list__placeholder {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    aspect-ratio: unset;
}

.rfb-cards-flex .rfb-card__media-inner :is(img, .img-thumbnail) {
    width: 100% !important;
    max-width: none;
    height: 100% !important;
    min-height: 0;
    display: block;
    object-fit: cover;
    object-position: center;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-sizing: border-box;
}

.bg_seacolor{
    background-color: #99CDD6
}


/* Top menu links: fixed px (avoids rem/root surprises vs 20px target) */
:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-cont .top-menu-item a {
    font-size: 20px;
    margin-right: 1.25rem;
}

/* Mobile / small: smaller menu type (1rem = 16px with html 16px) */
@media (max-width: 767.98px) {
    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-cont .top-menu-item a {
        font-size: 1rem;
    }

    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-user--hero .user-block .text-light {
        font-size: 1rem;
    }

    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-user--hero .user-block .btn-outline-light {
        font-size: 1rem;
    }
}

/* User / «Войти» lives inside .top-menu-item — do not apply nav link margin to it */
:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-cont .top-menu-user--hero a {
    margin-right: 0 !important;
}

/* Sticky top bar: make brand→menu gap equal to menu item spacing (desktop/tablet). */
@media (min-width: 768px) {
    .site-top-bar.site-top-bar--sticky .site-top-bar__brand {
        margin-right: 1.25rem !important;
    }
}

/* Large screens: match wide pill spacing (see hero .top-menu-cont gap); .top-menu-user--hero a stays 0 (see rule above) */
@media (min-width: 992px) {
    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-cont .top-menu-item a {
        margin-right: 2.75rem;
    }

    .site-top-bar.site-top-bar--sticky .site-top-bar__brand {
        margin-right: 2.75rem !important;
    }
}

/* Hero main_new search only — narrow strip + red outline (#E60000); do not reuse on other pages */
:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-search--hero {
    /* Keep search proportional: do not stretch to fill leftover space */
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(22rem / 3);
    margin-right: 0;
}

/* Tablet only: modest width — avoid a bar that spans most of the hero (phones use full-width row below) */
@media (min-width: 768px) and (max-width: 991.98px) {
    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-search--hero {
        align-self: flex-start;
        max-width: min(100%, 10.5rem);
    }
}

/* Mobile: no push-right on search; wrap naturally into two rows (do not force a full-width third row) */
@media (max-width: 767.98px) {
    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-cont {
        align-items: flex-start;
    }

    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-search--hero {
        flex: 0 1 auto;
        align-self: flex-start;
        min-width: 0;
        max-width: none;
        margin-left: 0 !important;
        justify-content: flex-start;
        gap: 0.35rem 0.65rem;
    }

    /* Tighter pill rhythm so five links + login + search fit in two flex rows on typical phone widths */
    .new-main-content-inner .new-main-hero-menu .top-menu-cont {
        gap: 0.4rem 0.55rem;
    }

    .new-main-content-inner .new-main-hero-menu .top-menu-item {
        padding: 0.2rem 0.45rem;
    }

    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-cont .top-menu-item a {
        margin-right: 0.55rem;
    }

    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-cont .top-menu-search__btn svg {
        width: 1rem;
        height: 1rem;
    }

    .new-main-content-inner .new-main-hero-menu .top-menu-search__btn {
        line-height: 1;
        padding: 0.2rem 0;
        font-size: 1rem;
    }

    .new-main-content-inner .new-main-hero-menu .top-menu-search__btn svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Small phones: inline search field full width (hero pages that show it) */
@media (max-width: 575.98px) {
    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    :is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-user--hero {
        margin-left: 0;
        align-self: flex-start;
    }
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .new-main-top-search__group {
    max-width: 100%;
    /* Bootstrap .input-group uses flex-wrap: wrap — on narrow heroes the button drops to a second row */
    flex-wrap: nowrap;
    align-items: stretch;
    min-width: 0;
}

/* Direct .form-control + .btn (no .input-group-append): same height as BS input-group-sm on both */
:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .input-group-sm.new-main-top-search__group > .new-main-top-search__input,
:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .input-group-sm.new-main-top-search__group > .new-main-top-search__submit {
    box-sizing: border-box;
    font-size: 0.875rem;
    line-height: 1.5;
    height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .new-main-top-search__input {
    min-width: 0;
    flex: 1 1 auto;
    width: 1%;
    background: rgba(255, 255, 255, 0.92);
    border-color: #E60000;
    color: #111;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .new-main-top-search__input:focus {
    border-color: #E60000;
    box-shadow: 0 0 0 0.2rem rgba(230, 0, 0, 0.2);
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .new-main-top-search__submit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E60000;
    color: #fff;
    background: #E60000;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .new-main-top-search__submit svg {
    fill: #fff;
    color: #fff;
    width: 16px;
    height: 16px;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .new-main-top-search__submit:hover {
    background: #c40000;
    color: #fff;
    border-color: #c40000;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .new-main-top-search__submit:hover svg {
    fill: #fff;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .new-main-top-search--hero .new-main-top-search__submit:focus {
    box-shadow: 0 0 0 0.2rem rgba(230, 0, 0, 0.25);
}

/* user-block in hero top menu (navbar uses light text on dark bg; here we match red menu links) */
:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-user--hero {
    align-self: center;
    min-width: 0;
    /* same horizontal rhythm as .top-menu-item a margin-right */
    margin-left: 1.25rem;
}

/* Sticky menu (base.html): don't double the gap before user-block on desktop.
   The previous menu item already has the right margin. */
@media (min-width: 768px) {
    .site-top-bar.site-top-bar--sticky .top-menu-user--hero {
        margin-left: 0;
    }
}

/* Sticky bar only: gap between login and search (desktop row). Targets base.html block with d-md-inline-flex — not hero main_new menu. */
@media (min-width: 768px) {
    .site-top-bar.site-top-bar--sticky .top-menu-cont .top-menu-search--hero.d-md-inline-flex {
        margin-left: 1rem;
    }
}

@media (min-width: 992px) {
    .site-top-bar.site-top-bar--sticky .top-menu-cont .top-menu-search--hero.d-md-inline-flex {
        margin-left: 1.5rem;
    }
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-user--hero .user-block.container-fluid {
    width: auto;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    justify-content: flex-end;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-user--hero .user-block .text-light {
    color: #E60000 !important;
    font-family: Inter, sans-serif;
    font-weight: normal;
    font-size: 20px;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-user--hero .user-block .btn-outline-light {
    font-size: 20px;
    border: 1px solid #E60000;
    color: #fff;
    background: #E60000;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-user--hero .user-block .btn-outline-light:hover {
    background: #c40000;
    border-color: #c40000;
    color: #fff;
}

:is(.new-main-content-inner, .site-top-bar.site-top-bar--sticky) .top-menu-user--hero .user-block .btn-outline-light:focus {
    box-shadow: 0 0 0 0.2rem rgba(230, 0, 0, 0.25);
}

.new-main-content-inner .new-main-title-row {
    line-height: 1;
    width: 100%;
}

/* First hero row (REDFISH BAY + fish): space below menu — 24px mobile, 60px large screens */
.new-main-content-inner .new-main-title-row:not(.new-main-title-row--sub) {
    margin-top: 24px;
}

@media (min-width: 992px) {
    .new-main-content-inner .new-main-title-row:not(.new-main-title-row--sub) {
        margin-top: 60px;
    }
}

.new-main-content-inner .new-main-page-subtitle {
    font-size: clamp(1.125rem, calc(2.2vw + 0.5rem), 2.5rem);
    margin-top: clamp(1rem, 2.5vw, 1.5rem);
    text-align: left;
}

/* Featured stared part (below hero on main_new) */
.new-main-featured {
    background: #fff;
    color: #222;
    margin-top: 0;
    padding: 0;
    border-radius: 2px;
    width: 100%;
    box-sizing: border-box;
}

/* Card padding for list cards ("all stared") */
.new-main-featured.new-main-all-stared__card {
    padding: 1.5rem;
}

/* Featured block on main_new: add same vertical rhythm as the "Stared texts" heading */
.new-main-content-inner-last-stared .new-main-featured {
    margin-top: 1.25rem;
}

.new-main-featured__tabs {
    font-family: Inter, sans-serif;
    font-size: 1rem;
    margin-bottom: 0.85rem;
}

.new-main-featured__tab {
    margin-right: 1.25rem;
    font-weight: bold;
    display: inline-block;
}

.new-main-featured__tab--active {
    color: #0B6977;
}

.new-main-featured__tab--muted {
    color: #8ecbd3;
}

.new-main-featured__grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.new-main-featured__grid--has-image {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.new-main-featured__grid--text-only {
    grid-template-columns: 1fr;
}

@media (max-width: 767.98px) {
    .new-main-featured__grid--has-image {
        grid-template-columns: 1fr;
    }
}

.new-main-featured__image-inner {
    width: 100%;
    background: #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
}

/* Featured / stared grids: fixed media box; image fills (crop) — same height as .rfb-cards-flex cards */
.new-main-featured__grid--has-image .new-main-featured__image-inner {
    position: relative;
    height: var(--rfb-card-media-height);
    box-sizing: border-box;
    min-height: 0;
}

.new-main-featured__grid--has-image .new-main-featured__img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.new-main-featured__tags {
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}

/* Tags: single rule for the whole project */
:is(
    .new-main-featured__tag,
    .tag-list-interface .tag-list-interface__chip,
    .tag-list-interface .badge,
    .tag-list-interface .badge-pill,
    .tag-list-interface .badge-secondary,
    .tag-list-interface a.badge-secondary
) {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1.2;
    color: #555 !important;
    background: #efefef !important;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px !important;
    text-decoration: none;
    border: 0;
    box-shadow: none;
}

/* Staff tag editor: same chip as main, with remove — force over any .badge / cached markup */
.tag-list-interface .new-main-featured__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}

.tag-list-interface .tag-list-interface__chip .new-main-featured__tag {
    background: transparent !important;
    padding: 0 !important;
    color: #555 !important;
    font-family: Inter, sans-serif !important;
    font-weight: normal !important;
    font-size: 0.75rem !important;
    border-radius: 0 !important;
}

.tag-list-interface .tag-list-interface__chip-remove {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1;
    cursor: pointer;
    color: #555 !important;
    display: inline-flex;
    align-items: center;
    font-weight: normal !important;
    box-shadow: none !important;
}

.tag-list-interface .tag-list-interface__chip-remove:hover {
    color: #111 !important;
}

.new-main-featured__author {
    margin: 0 0 0.65rem 0;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.5rem;
    line-height: 1.3;
}

.new-main-featured__author-link {
    color: #0B6977;
    text-decoration: none;
    font-size: 1.5rem;
}

.new-main-featured__author-link:hover {
    text-decoration: underline;
    color: #084a54;
}

.new-main-featured__title {
    font-family: Inter, sans-serif;
    font-size: 2rem;
    font-weight: normal;
    color: #0B6977;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

/* List cards: keep titles larger than body text even when base font is increased */
.redfisbay .new-main-all-stared__card .new-main-featured__title {
    font-size: 2rem;
    line-height: 1.2;
}

.new-main-featured__title-link {
    color: inherit;
    text-decoration: none;
}

.new-main-featured__title-link:hover .new-main-featured__title {
    text-decoration: underline;
}

.new-main-featured__title-arrow {
    vertical-align: -0.125em;
    margin-left: 0.15rem;
}

.new-main-featured__text-body {
    color: #111;
}

.new-main-featured__body-arrow {
    display: inline-block;
    margin-left: 0.2em;
    vertical-align: 0.05em;
    color: #111;
    text-decoration: none;
    line-height: 1;
}

.new-main-featured__body-arrow:hover {
    color: #0B6977;
}

.new-main-featured__body-arrow:focus-visible {
    outline: 2px solid #0B6977;
    outline-offset: 2px;
}

.new-main-featured__body-arrow-icon {
    vertical-align: -0.12em;
}

/*
 * Site-wide headings: same font and color as featured block (.new-main-featured__title).
 * Excludes main hero brand (h1.new-main-page-header) — stays red.
 */
.redfisbay h1.book-list-header,
.redfisbay h2.book-list-header,
.redfisbay h1.main-page-header:not(.new-main-page-header),
.redfisbay h1.search-page-header,
.redfisbay h1.part-header,
.redfisbay h4.contents-header,
.redfisbay h2.main-widget_header,
.redfisbay .widget-header h2,
.redfisbay h2.nav-headers {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: normal;
    color: #0B6977;
    line-height: 1.25;
}

.redfisbay h1.book-list-header,
.redfisbay h1.main-page-header:not(.new-main-page-header),
.redfisbay h1.search-page-header,
.redfisbay h1.part-header {
    /* Site H1 (non-main page): must be larger than widget titles */
    font-size: clamp(1.25rem, 2.5vw, 1.85rem);
}

/* Mobile: keep non-main H1 larger than body text */
@media (max-width: 575.98px) {
    .redfisbay h1.book-list-header,
    .redfisbay h1.main-page-header:not(.new-main-page-header),
    .redfisbay h1.search-page-header,
    .redfisbay h1.part-header {
        font-size: 1.25rem;
        line-height: 1.2;
    }
}

.redfisbay h2.book-list-header,
.redfisbay h2.main-widget_header,
.redfisbay .widget-header h2 {
    /* Use em so it scales with the base text size */
    font-size: 1.5rem;
    line-height: 1.2;
}

.redfisbay h2.book-list-header.page-header {
    font-size: 2rem;
}

.redfisbay h4.contents-header {
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
}

/* Text page (text.html / text_in_book.html): chapter + TOC headings — fixed sizes, no clamp */
.redfisbay .text-content h1.part-header {
    font-family: Inter, sans-serif;
    font-size: 2rem;
}

.redfisbay .text-content h4.contents-header {
    font-size: 1.25rem;
}

.redfisbay .book-info-block,
.redfisbay .author-info-block {
    font-family: Inter, sans-serif;
    font-size: 1.25rem;
}

.redfisbay .book-info-block small,
.redfisbay .author-info-block small {
    font-size: 1.25rem;
}

.redfisbay .book-info-block a,
.redfisbay .author-info-block a {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.225rem;
    color: #0B6977;
}

.redfisbay .book-info-block a:visited,
.redfisbay .author-info-block a:visited {
    color: #084a54;
}

.redfisbay .book-info-block a:hover,
.redfisbay .author-info-block a:hover {
    color: #084a54;
}

/* Old main.html widgets: card titles (h3 inside .widget-title) */
.redfisbay .widget-title h3 {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: normal;
    color: #0B6977;
    line-height: 1.25;
    /* Use em so it scales with the base text size */
    font-size: 1.25rem;
    margin: 0;
}

.redfisbay h2.nav-headers {
    font-size: clamp(1.1rem, 1.9vw, 1.5rem);
}

/* Root / structure admin pages (body.structure-body — no .redfisbay on #app_container) */
body.structure-body h1.root-page-header,
body.structure-body h2.structure-header,
body.structure-body h3.structure-header {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: normal;
    color: #0B6977;
    line-height: 1.25;
}

body.structure-body h1.root-page-header {
    font-size: clamp(1.1rem, 1.9vw, 1.5rem);
}

body.structure-body h2.structure-header,
body.structure-body h3.structure-header {
    font-size: clamp(1.15rem, 2vw, 1.65rem);
}

/* Authors / books / texts list pages: list heading color */
.authors-list-page__title,
.books-list-page__title,
.texts-list-page__title {
    color: #0B6977;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: normal;
    line-height: 1.25;
    /* Use em so it scales with the base text size */
    font-size: 2rem;
}

/* Card meta: author name should match page header font */
.new-main-featured__author,
.new-main-featured__author-link {
    font-family: Georgia, 'Times New Roman', Times, serif;
}

/* Books / texts list: author link in H1 — global `a` rules would otherwise force black */
.books-list-page__title a,
.texts-list-page__title a {
    color: #0B6977;
}
.books-list-page__title a:hover,
.texts-list-page__title a:hover {
    color: #084a54;
}
.books-list-page__title a:visited,
.texts-list-page__title a:visited {
    color: #084a54;
}
.books-list-page__title a:focus-visible,
.texts-list-page__title a:focus-visible {
    outline: 2px solid #0B6977;
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    /* List cards: image on top when stacked */
    .new-main-all-stared__card .new-main-featured__image-col {
        order: -1;
    }
}

.new-main-all-stared__card {
    border: 0;
    margin: 0;
}

.new-main-all-stared__card .new-main-featured__grid {
    align-items: stretch;
}

.new-main-all-stared__card .rfb-list__card-actions {
    margin: 0 0 0.75rem 0;
}

.texts-page__title-icon {
    display: inline-block;
    vertical-align: -0.15em;
    margin-left: 0.35rem;
}

.top-menu-cont .top-menu-item a:hover {
    color: #580101;
    text-decoration: underline;
}
.top-menu-cont .top-menu-item a:visited {
    color: #E60000;
    text-decoration: underline;
}

h3, h4 {
    font-size: 1.2rem;
    padding-left: 0;
}

a {
    color: black;
}


a:hover {
    color: #580101;
}
a.card-link:hover {
    color: #580101;
    text-decoration: underline;
}

a:visited {
    color: black;
}

a.link-in-text {
    color: darkred;
    text-decoration: underline;
}
a.link-in-text:hover {
    color: red;
}
a.link-in-text:visited {
    color: darkred;
}

.bg-redfisbay {
    background-color: #411F1F;
    color: whitesmoke;
}

/* Sticky nav in base.html: mint background */
.site-top-bar.site-top-bar--sticky {
    background-color: #efefef;
    color: #222;
}

/* Footer in base.html: brand red */
.footer.footer--brand {
    background-color: #E60000;
    color: whitesmoke;
}

/* Page body: same teal as main_new hero / new-main-content */
.redfisbay-body {
    margin: 0;
    background-color: #ffffff;
    /* Base text size across the site */
    font-size: 1rem;
}

.redfisbay{
    min-height: 1000px;
    max-width: none;
}

/*
 * Sidebar table of contents (text parts / book texts + chapters).
 * Inactive: Inter, black, underlined. Current book text (L1): Inter, red. Active part (L2): Inter, red, no underline.
 */
.redfisbay .book-toc {
    --book-toc-teal: #0B6977;
    /* Accent for active chapter; #0B6977 is teal — use a true red here (see mockup). */
    --book-toc-red: #C41E3A;
    /* One size for all TOC labels/links (rem is root-based; links had no size and were ~1rem). */
    --book-toc-text-size: 1.25rem;
}

.book-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Nested chapter list under the current book text */
.book-toc__list--chapters {
    margin-top: 0.5rem;
    padding-left: 2.5rem;
}

.book-toc__item {
    margin-bottom: 0.85rem;
}

.book-toc__item:last-child {
    margin-bottom: 0;
}

.book-toc__link {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: var(--book-toc-text-size, 1.25rem);
    color: #111;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
    line-height: 1.5;
}

.book-toc__link:hover {
    color: #000;
}

.book-toc__link:focus-visible {
    outline: 2px solid var(--book-toc-teal);
    outline-offset: 2px;
}

/* Level 1: .book-toc__link--text uses the same font-size as .book-toc__link. */

/* Current text title in book TOC (level 1, active): Inter, red, no underline */
.book-toc__current-text {
    display: block;
    font-family: Inter, sans-serif;
    font-weight: normal;
    color: var(--book-toc-red);
    line-height: 1.5;
    font-size: var(--book-toc-text-size, 1.25rem);
}

/* Active chapter / part (level 2): Inter, red, no underline */
.book-toc__link--chapter.is-active {
    color: var(--book-toc-red);
    text-decoration: none;
    font-family: Inter, sans-serif;
}

/* Mobile: TOC drawer under sticky top bar */
.toc-drawer__toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    :root {
        /* Set by JS from actual .site-top-bar--sticky height; fallback is safe. */
        --site-sticky-top: var(--site-top-bar-height, 92px);
    }

    .toc-drawer__ear {
        position: fixed;
        right: 0;
        top: calc(var(--site-sticky-top) + 10px);
        /* Must not cover sticky header */
        z-index: 1000;
        width: 34px;
        height: 104px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #E60000;
        color: #fff;
        border-radius: 12px 0 0 12px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
        cursor: pointer;
        user-select: none;
        padding: 8px 6px;
    }

    .toc-drawer__ear-text {
        font-family: Inter, sans-serif;
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        line-height: 1;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        /* Make text read top-to-bottom on the right edge */
        transform: rotate(180deg);
    }

    .toc-drawer__ear:focus-visible {
        outline: 2px solid #0B6977;
        outline-offset: 2px;
    }

    .toc-drawer__backdrop {
        position: fixed;
        inset: 0;
        z-index: 1080;
        background: rgba(0, 0, 0, 0.28);
        display: none;
    }

    .toc-drawer {
        position: fixed;
        right: 0;
        top: var(--site-sticky-top);
        z-index: 1090;
        width: min(92vw, 420px);
        height: calc(100vh - var(--site-sticky-top));
        background: #fff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
        transform: translateX(105%);
        transition: transform 180ms ease-out;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.75rem 0.9rem 1rem;
    }

    .toc-drawer__header {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #fff;
        padding: 0.25rem 0 0.6rem;
        border-bottom: 1px solid #e9ecef;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .toc-drawer__title {
        font-family: Georgia, 'Times New Roman', Times, serif;
        font-size: 1.35rem;
        font-weight: normal;
        color: #0B6977;
        line-height: 1.2;
    }

    .toc-drawer__close {
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        cursor: pointer;
        color: #111;
        background: #f3f5f7;
    }

    .toc-drawer__close:hover {
        background: #e9ecef;
    }

    /* Open state via checkbox hack */
    .toc-drawer__toggle:checked ~ .toc-drawer {
        transform: translateX(0);
    }
    .toc-drawer__toggle:checked ~ .toc-drawer__backdrop {
        display: block;
    }

    /* Reduce spacing inside drawer */
    .toc-drawer .parts-list {
        margin-bottom: 0;
    }
    .toc-drawer .contents-header {
        /* Avoid duplicate "Book contents" heading (drawer has its own title) */
        display: none;
    }
}

.list-group .list-group-item.active {
    background-color: #580101;
    color: white;
    border-color: #580101;
}

.list-group .list-group-item.active a, .copyright a {
    color: white;
}

.list-group .list-group-item.active a:hover, .copyright a:hover {
    color: wheat;
}

.list-group .list-group-item.active a:visited, .copyright a:visited {
    color: white;
}

.nav-menu-cont {
    position: fixed;
    width: 100%;
    bottom: 10px;
    left: 0;
}

.book-nav-panel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #efefef;
    border-radius: 6px;
    color: #0B6977;
}

.book-nav-panel__nav,
.book-nav-panel__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.book-nav-panel__gap {
    width: 14px;
    height: 1px;
}

.book-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    line-height: 1;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 120ms ease, opacity 120ms ease;
}

.book-nav-btn:hover {
    background: rgba(11, 105, 119, 0.10);
    color: inherit;
    text-decoration: none;
}

.book-nav-btn:active {
    background: rgba(11, 105, 119, 0.18);
}

.book-nav-btn:focus {
    outline: none;
}

.book-nav-btn:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(11, 105, 119, 0.25);
}

.book-nav-btn.disabled,
.book-nav-btn[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.book-nav-panel a,
.book-nav-panel button,
.book-nav-panel .btn {
    color: #0B6977;
}

/* Override Bootstrap "secondary" look inside the nav panel */
.book-nav-panel .btn-secondary,
.book-nav-panel .btn.btn-secondary,
.book-nav-panel .btn-outline-secondary,
.book-nav-panel .btn.btn-outline-secondary {
    color: #0B6977 !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

.book-nav-panel .btn-secondary:hover,
.book-nav-panel .btn.btn-secondary:hover,
.book-nav-panel .btn-outline-secondary:hover,
.book-nav-panel .btn.btn-outline-secondary:hover {
    background-color: rgba(11, 105, 119, 0.10) !important;
    color: #0B6977 !important;
}

.book-nav-panel .btn-secondary:active,
.book-nav-panel .btn.btn-secondary:active,
.book-nav-panel .btn-outline-secondary:active,
.book-nav-panel .btn.btn-outline-secondary:active {
    background-color: rgba(11, 105, 119, 0.18) !important;
}

.book-nav-panel .btn-secondary:focus-visible,
.book-nav-panel .btn.btn-secondary:focus-visible,
.book-nav-panel .btn-outline-secondary:focus-visible,
.book-nav-panel .btn.btn-outline-secondary:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(11, 105, 119, 0.25) !important;
}

.book-nav-panel .btn-secondary.disabled,
.book-nav-panel .btn.btn-secondary.disabled,
.book-nav-panel .btn-secondary:disabled,
.book-nav-panel .btn.btn-secondary:disabled {
    opacity: 0.45 !important;
}

.text-meta-icon {
    color: #0B6977;
}

.text-meta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 3px 6px;
    line-height: 1;
    background: #ffffff;
    color: #0B6977;
    border: 0;
    border-radius: 4px;
    vertical-align: middle;
}

.text-meta-badge:hover {
    background: rgba(11, 105, 119, 0.06);
}

/* Tag add form responsiveness (staff tag-list-interface) */
.tag-list-interface .input-group.input-group-sm {
    width: 100%;
    max-width: 100%;
}

.tag-list-interface .list-group {
    max-width: 100%;
}

@media (min-width: 768px) {
    .tag-list-interface .input-group.input-group-sm,
    .tag-list-interface .list-group {
        max-width: 50vw;
    }
}

@media (min-width: 992px) {
    .tag-list-interface .input-group.input-group-sm,
    .tag-list-interface .list-group {
        max-width: 25vw;
    }
}
.redfisbay .site-top-bar__brand img {
    width: 90px;
    height: 30px;
}

/* Home arrow in mobile sticky header (shown only when brand is hidden). */
.site-top-bar.site-top-bar--sticky .top-menu-home-mobile {
    display: none;
}
.site-top-bar.site-top-bar--sticky .top-menu-home-mobile > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #E60000;
    margin-right: 1.1rem;
}
.site-top-bar.site-top-bar--sticky .top-menu-home-mobile > a:hover {
    color: #c40000;
}
.site-top-bar.site-top-bar--sticky .top-menu-home-mobile svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
}

.top-space {
    /* Sticky header uses .fixed-top, so content must reserve its real height. */
    margin-top: 0;
    padding-top: var(--site-top-bar-height, 4rem);
}

@media (max-width: 767.98px) {
    /* On small screens give content a bit more breathing room below sticky header */
    .top-space {
        padding-top: calc(var(--site-top-bar-height, 4rem) + 0.75rem);
    }
}

@media (max-width: 767.98px) {
    /* Mobile sticky header: less crowded */
    .site-top-bar.site-top-bar--sticky .site-top-bar__brand {
        display: none;
    }

    .site-top-bar.site-top-bar--sticky .top-menu-home-mobile {
        display: block;
    }

    .site-top-bar.site-top-bar--sticky > .container-fluid {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .site-top-bar.site-top-bar--sticky .top-menu-cont {
        row-gap: 0.45rem;
    }

    .site-top-bar.site-top-bar--sticky .top-menu-cont .top-menu-item a {
        line-height: 1.5;
    }
}

@media (max-width: 575.98px) {
    .site-top-bar.site-top-bar--sticky .top-menu-cont .top-menu-item a {
        margin-right: 0.85rem;
    }
}

.authors_content {
    max-width: 600px;
}

.card.author-body {
    min-width: 150px;
}

img.book_image {
    max-width: 300px;
}

img.book_image.book_image_in_list {
    width: 100%;
}

.card.book-body {
    max-width: 250px;
}

img.text-part-image {
    max-width: 300px;
}

img.text-part-small-image {
    max-width: 100px;
}

img.img-red-fish.img_xl{
    max-width: 300px;
}
img.img-red-fish.img_l{
    max-width: 300px;
}
img.img-red-fish.img_m{
    max-width: 200px;
}
img.img-red-fish.img_s{
    max-width: 100px;
}
img.img-red-fish.img_xs{
    max-width: 100px;
}

.text-part-image-cont {
    min-width: 300px;
    margin-bottom: 1.5rem;
}

.text-part-image-cont .lead {
    font-family: Inter, sans-serif;
    font-size: 1.25rem;
}

.text-part-image-cont .image-second-comment {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    font-style: normal;
}

.footer {
    width: 100%;
    min-height: 100px;
}

/* Main text baseline: list cards + article blocks (independent from .redfisbay container class) */
:is(article, .new-main-featured__text-body) {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    line-height: 1.5;
}

.part-content {
    min-width: 300px;
    max-width: 600px;
}

.subtitle {
    font-size: 1.5rem;
    color: gray;
}

.image_container {
    max-width: 300px;
}

.image_container img {
    width: 100%;
}

.spinner-container {
    margin-top: 200px;
}

.waite-screen_spinner {
    width: 4em;
    height: 4em;
}

.img-cont {
    width: 150px;
    height: 200px;
    background-color: #411F1F;
    overflow: hidden;
    text-align: center;
}

.widget-texts-cont {
    height: 200px;
    width: 300px;
    overflow: hidden;
}

.widget-title {
    width: 100%;
}

.text-widget img {
    width: auto;
    max-height: 100%;
}

.parts-list {
    max-width: 300px;
}

/* Text page: sidebar 1/3 + main 2/3 — drop fixed widths that fight the grid */
.text-content.row .col-md-4 .text-part-image-cont {
    min-width: 0;
    width: 100%;
}

.text-content.row .col-md-4 .text-part-image-cont .image-container {
    width: 100%;
    max-width: 100%;
}

/* Override global img.img-red-fish.img_* max-width so image fills the column */
.text-content.row .col-md-4 .text-part-image-cont img.img-red-fish {
    width: 100%;
    max-width: 100%;
    height: auto;
}
.text-content.row .col-md-4 .parts-list {
    max-width: none;
}
.text-content.row .col-md-8 .part-content {
    max-width: none;
    min-width: 0;
}

.about-cont {
    max-width: 400px;
}

.card.author-body {
    width: 250px
}

.card.text-body {
    width: 250px
}

.card.author-body-single {
    max-width: 500px;
}

.structure-body H1, .structure-body H2, .structure-body H3, .structure-body H4, .structure-body strong {
    color: #343543;
}

/* Babylon structure: heading font/color — body.structure-body rules above */

.footer-structure {
    padding: 30px;
    background-color: #0B6977
}

.container-fluid.structure {
    padding-right: 0;
    padding-left: 0;
}

.structure .content {
    min-height: 1000px;
}

.root-part.declaration {
    position: relative;
    float: right;
    width: 60%;
    z-index: 102;
}

.logo-prize {
    position: relative;
    width: 100%;
    z-index: 102;
}

.logo-prize-cont{
    width: 40%;
    float: left;
}

.inner-global-container, .inner-global-container-author {
    max-width: 1100px;
    width: 100%;
}

.inner-global-container-text {
    max-width: 700px;
    width: 100%;
}
.maine-text-image{
    overflow: hidden;
    width: 300px;
}

.str-current-author-image-container img {
    width: 300px;
    border-radius: 150px;
    background-color: #343543;
    padding: 0;
    border: 0;
}

.img-thumbnail.structure-img-thumb {
    border-radius: 150px;
    background-color: #343543;
    padding: 0;
    border: 0;
    max-height: 100%;
}
.list-image{
    max-width: 200px;
    max-height: 200px;
}

.list-thumb {
    width: 30%;
    min-width: 200px;
}

.w-30 {
    width: 30%
}

h3.str-current-author-data-cont {
    color: #343543;
}

.fon-order {
    color: #BBF1EC;
    position: absolute;
    font-weight: bold;
    font-size: 300px;
    height: 200px;
    line-height: 30px;
}

.last-author-body {
    position: relative;
}

.middle-container {
    position: relative;
}

.bottom-container {
    position: relative;
}

.top-container {
    position: relative;
}

.last-author-list-cont {
    position: relative;
}

.author-btn-arrow {
    position: relative;
    top: 80px;
    left: -70px;
}

.text-in-list {
    max-height: 300px;
}

.random-element, .statement-cont {
    min-width: 350px ;
}
.random-element h3, .statement-cont h3 {
    border-top: 2px solid #343543;
}

.search-input {
    background-color: #fff;
    color: #111;
}

.row.form-image-area{
    border-top: 1px solid #ced4da ;
    border-bottom: 1px solid #ced4da ;
}
.extendable{
    cursor: nwse-resize;
}
.gallery-card-cont {
    width: 320px;
}
.logo-prize-cont-mobile{
    max-width: 200px;
}
.str-authors-list{
    position: relative;
    min-width: 320px;
}
.str-authors-list .str-current-author-data-cont{
    display: block;
    width: 30%;
}

.str-authors-list .str-current-author-image-container img{
    width: 200px;
}

.str-authors-list .author-btn-arrow{
    position: relative;
    top: 60px;
    left: -70px;
}

/* ---------------------------------------------------------------------------
   Global Bootstrap button theme: pill shape, light gray fill, brand red text.
   Scoped to body.redfisbay-body. Book reader nav panel keeps teal toolbar below.
   --------------------------------------------------------------------------- */
body.redfisbay-body {
    --rfb-btn-pill-bg: #eeeeee;
    --rfb-btn-pill-bg-hover: #e4e4e4;
    --rfb-btn-pill-bg-active: #dcdcdc;
    --rfb-btn-pill-fg: #e60000;
    --rfb-btn-pill-fg-hover: #c40000;
}

body.redfisbay-body .btn {
    border-radius: 50px;
    text-transform: lowercase;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    box-shadow: none;
    padding: 0.5rem 1.25rem;
    border-width: 1px;
}

body.redfisbay-body .btn-sm {
    padding: 0.35rem 1rem;
    font-size: 0.875rem;
}

body.redfisbay-body .btn-lg {
    padding: 0.65rem 1.5rem;
    font-size: 1.125rem;
}

body.redfisbay-body .btn:focus,
body.redfisbay-body .btn.focus {
    box-shadow: 0 0 0 0.2rem rgba(230, 0, 0, 0.2);
}

body.redfisbay-body .btn-group {
    gap: 0.35rem;
}

body.redfisbay-body .btn-group > .btn {
    margin-left: 0 !important;
    flex: 0 1 auto;
    border-radius: 50px !important;
}

body.redfisbay-body .btn-group > .btn:not(:last-child):not(.dropdown-toggle),
body.redfisbay-body .btn-group > .btn-group:not(:last-child) > .btn,
body.redfisbay-body .btn-group > .btn:not(:first-child),
body.redfisbay-body .btn-group > .btn-group:not(:first-child) > .btn {
    border-top-left-radius: 50px !important;
    border-bottom-left-radius: 50px !important;
    border-top-right-radius: 50px !important;
    border-bottom-right-radius: 50px !important;
}

/* Secondary / outline-secondary: default “content” actions (read, epub, etc.) */
body.redfisbay-body .btn-outline-secondary,
body.redfisbay-body .btn-secondary:not(.dropdown-toggle) {
    color: var(--rfb-btn-pill-fg);
    background-color: var(--rfb-btn-pill-bg);
    border-color: transparent;
}

body.redfisbay-body .btn-secondary.dropdown-toggle {
    color: var(--rfb-btn-pill-fg);
    background-color: var(--rfb-btn-pill-bg);
    border-color: transparent;
}

body.redfisbay-body .btn-outline-secondary:hover,
body.redfisbay-body .btn-secondary:hover {
    color: var(--rfb-btn-pill-fg-hover);
    background-color: var(--rfb-btn-pill-bg-hover);
    border-color: transparent;
}

body.redfisbay-body .btn-outline-secondary:active,
body.redfisbay-body .btn-secondary:active,
body.redfisbay-body .btn-outline-secondary.active,
body.redfisbay-body .btn-secondary.active {
    color: var(--rfb-btn-pill-fg-hover);
    background-color: var(--rfb-btn-pill-bg-active);
    border-color: transparent;
}

body.redfisbay-body .btn-outline-secondary:disabled,
body.redfisbay-body .btn-secondary:disabled,
body.redfisbay-body .btn-outline-secondary.disabled,
body.redfisbay-body .btn-secondary.disabled {
    opacity: 0.5;
}

/* Primary / danger: keep solid semantics, same pill radius */
body.redfisbay-body .btn-primary:not(.btn-secondary):not(.btn-danger) {
    color: #fff;
    background-color: #e60000;
    border-color: #e60000;
}

body.redfisbay-body .btn-primary:not(.btn-secondary):not(.btn-danger):hover {
    color: #fff;
    background-color: #c40000;
    border-color: #c40000;
}

body.redfisbay-body .btn-primary:not(.btn-secondary):not(.btn-danger):active,
body.redfisbay-body .btn-primary:not(.btn-secondary):not(.btn-danger).active {
    color: #fff;
    background-color: #b00000;
    border-color: #b00000;
}

body.redfisbay-body .btn-danger {
    border-color: #dc3545;
}

body.redfisbay-body .btn-danger:hover {
    border-color: #bd2130;
}

body.redfisbay-body .btn-light {
    color: var(--rfb-btn-pill-fg);
    background-color: var(--rfb-btn-pill-bg);
    border-color: transparent;
}

body.redfisbay-body .btn-light:hover {
    color: var(--rfb-btn-pill-fg-hover);
    background-color: var(--rfb-btn-pill-bg-hover);
    border-color: transparent;
}

/* Book reader side panel: restore teal minimal buttons (overrides global theme) */
body.redfisbay-body .book-nav-panel .btn {
    border-radius: 4px;
    text-transform: none;
    font-weight: normal;
    padding: 0.375rem 0.75rem;
}

body.redfisbay-body .book-nav-panel .btn-secondary,
body.redfisbay-body .book-nav-panel .btn.btn-secondary,
body.redfisbay-body .book-nav-panel .btn-outline-secondary,
body.redfisbay-body .book-nav-panel .btn.btn-outline-secondary {
    color: #0B6977 !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

body.redfisbay-body .book-nav-panel .btn-secondary:hover,
body.redfisbay-body .book-nav-panel .btn.btn-secondary:hover,
body.redfisbay-body .book-nav-panel .btn-outline-secondary:hover,
body.redfisbay-body .book-nav-panel .btn.btn-outline-secondary:hover {
    background-color: rgba(11, 105, 119, 0.10) !important;
    color: #0B6977 !important;
}

body.redfisbay-body .book-nav-panel .btn-secondary:active,
body.redfisbay-body .book-nav-panel .btn.btn-secondary:active,
body.redfisbay-body .book-nav-panel .btn-outline-secondary:active,
body.redfisbay-body .book-nav-panel .btn.btn-outline-secondary:active {
    background-color: rgba(11, 105, 119, 0.18) !important;
}

body.redfisbay-body .book-nav-panel .btn-secondary:focus-visible,
body.redfisbay-body .book-nav-panel .btn.btn-secondary:focus-visible,
body.redfisbay-body .book-nav-panel .btn-outline-secondary:focus-visible,
body.redfisbay-body .book-nav-panel .btn.btn-outline-secondary:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(11, 105, 119, 0.25) !important;
}

body.redfisbay-body .book-nav-panel .btn-secondary.disabled,
body.redfisbay-body .book-nav-panel .btn.btn-secondary.disabled,
body.redfisbay-body .book-nav-panel .btn-secondary:disabled,
body.redfisbay-body .book-nav-panel .btn.btn-secondary:disabled {
    opacity: 0.45 !important;
}
