/* Crawls.bar Phase 1 */
:root {
    --cb-dark: #101820;
    --cb-accent: #e63946;
    --cb-gold: #f4a261;
    --cb-light: #f6f7f9;
}
body { background: var(--cb-light); color: #1f2933; }
.cb-nav { background: var(--cb-dark); }
.cb-site-brand { text-transform: uppercase; letter-spacing: .01em; }
.cb-site-brand .cb-brand-main { color: #ffffff !important; }
.cb-site-brand .cb-brand-suffix { color: #0d6efd !important; }
.cb-hero {
    background: linear-gradient(135deg, #101820 0%, #243447 100%);
    color: #fff;
    padding: 5.5rem 0 5rem;
}
.cb-hero h1 { font-weight: 800; letter-spacing: -.03em; }
.cb-hero .lead { max-width: 700px; }
.cb-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.08);
}
.cb-action {
    min-height: 160px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.cb-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 .75rem 1.75rem rgba(0,0,0,.12);
}
.cb-auth { max-width: 560px; margin: 4rem auto; }
.cb-footer { background: var(--cb-dark); color: #cbd5e1; margin-top: 4rem; }
.cb-kicker {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
    font-weight: 700;
    color: var(--cb-accent);
}
.cb-status { min-height: 1.5rem; }

/* Public visitor experience */
html, body { min-height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
.cb-footer { flex-shrink: 0; }
.cb-home-hero { min-height: auto; padding: 0 0 4rem; display: flex; align-items: flex-start; }
.cb-home-hero .lead { max-width: 760px; color: rgba(255,255,255,.82); }
.cb-discovery-card { min-height: 260px; transition: transform .15s ease, box-shadow .15s ease; }
.cb-discovery-card:hover, .cb-discovery-card:focus-visible { transform: translateY(-3px); box-shadow: 0 .75rem 1.75rem rgba(0,0,0,.12); }
.cb-discovery-icon { font-size: 2.25rem; line-height: 1; }
.cb-card-link { color: var(--cb-accent); font-weight: 700; }
.cb-info-card { min-height: 270px; display: flex; flex-direction: column; }
.cb-info-card p { flex: 1 1 auto; }
.cb-home-cta { background: linear-gradient(135deg, #fff 0%, #f8fafc 100%); }
.cb-home-cta-copy { max-width: 720px; }

.cb-crawl-date-filter .form-control {
    width: 190px;
    min-width: 190px;
    padding-right: 2.75rem;
}


.cb-filter-panel[hidden], .cb-desktop-filter-panel[hidden] { display: none !important; }
.cb-desktop-filter-panel {
    margin-top: .75rem;
    padding-top: .85rem;
    border-top: 1px solid #e9ecef;
}
.cb-desktop-filter-toggle {
    white-space: nowrap;
}


@media (max-width: 767.98px) {
    .cb-desktop-filter-toggle, .cb-desktop-filter-panel { display: none !important; }
    .cb-hero { padding: 4rem 0 3.5rem; }
    .cb-home-hero { min-height: auto; padding: 0 0 3.5rem; }
    .cb-home-hero h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
    .cb-home-hero .btn { width: 100%; }
    .cb-discovery-card, .cb-info-card { min-height: auto; }
}
.cb-list-card { display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.cb-list-card:hover, .cb-list-card:focus-visible { transform: translateY(-3px); box-shadow: 0 .75rem 1.75rem rgba(0,0,0,.12); }
.cb-page-heading { max-width: 900px; }
.cb-info-hero { max-width: 900px; }
.cb-step { width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--cb-dark); color: #fff; font-weight: 800; }
@media (max-width: 767.98px) {
    .cb-list-card { min-height: auto; }
}


/* Compact breadcrumb navigation */
.cb-breadcrumb {
    background: transparent;
    padding: .2rem 0 .15rem;
    line-height: 1.2;
}
.cb-breadcrumb-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
    margin: 0 !important;
    padding: 0 !important;
    font-size: .78rem;
    color: #64748b;
}
.cb-breadcrumb-list > span {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}
.cb-breadcrumb-list .cb-breadcrumb-sep {
    color: #94a3b8;
}
.cb-breadcrumb-list a {
    color: #64748b;
    text-decoration: none;
}
.cb-breadcrumb-list a:hover,
.cb-breadcrumb-list a:focus-visible {
    color: var(--cb-accent);
    text-decoration: underline;
}
.cb-breadcrumb + main > .container.py-5:first-child,
.cb-breadcrumb + main > .container.pt-5:first-child {
    padding-top: .5rem !important;
}

/* Keep page content tight beneath the breadcrumb. */
main.cb-has-breadcrumb > .container.py-5:first-child,
main.cb-has-breadcrumb > .container.pt-5:first-child {
    padding-top: 0 !important;
}

.cb-home-topic-card { min-height: 300px; display: flex; flex-direction: column; }
.cb-home-topic-card p { flex: 1 1 auto; }
.cb-feature-item { height: 100%; padding: 1rem; border: 1px solid rgba(16,24,32,.10); border-radius: .75rem; background: #fff; }
.cb-feature-item strong { display: block; margin-bottom: .25rem; }
.cb-feature-item span { display: block; color: #6b7280; font-size: .95rem; }
.cb-home-trust { background: linear-gradient(135deg, #fff 0%, #f8fafc 100%); }
.cb-home-trust p { max-width: 820px; }

@media (max-width: 767.98px) {
    .cb-home-topic-card { min-height: auto; }
    .cb-home-trust .btn { width: 100%; margin-right: 0 !important; }
}

/* Small, quiet indicator for Bars that have not been claimed. Official Bars use the full badge. */
.cb-unclaimed-symbol {
    display: inline-block;
    color: #6c757d;
    font-size: .85em;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}


@media (max-width: 767.98px) {
    /* When the longer Crawl filter is expanded, release the sticky search wrapper so the entire
       filter remains in normal document flow and the page can scroll all the way to Apply Filters. */
    .cb-search-sticky-wrap.cb-filter-open {
        position: static !important;
    }

    /* Mobile filters are a simple push-down/collapse panel. It stays in normal
       document flow so the entire page can scroll naturally. */
    .cb-filter-panel {
        position: static !important;
        display: block !important;
        width: auto;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        margin-top: .75rem;
        padding: 1rem !important;
        border: 1px solid #dee2e6;
        border-radius: .75rem;
        background: #fff;
        box-shadow: none;
    }
    .cb-filter-scroll {
        max-height: none !important;
        overflow: visible !important;
        padding: 0;
    }
    .cb-filter-option {
        position: relative;
        display: flex !important;
        align-items: center;
        gap: .5rem;
        padding: .7rem .75rem !important;
        margin: 0 !important;
        border: 1px solid #e1e5e9;
        border-radius: .5rem;
        background: #fff;
    }
    .cb-filter-option .form-check-input {
        position: static !important;
        float: none !important;
        margin: 0 !important;
        flex: 0 0 auto;
    }
    .cb-filter-apply-wrap {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #dee2e6;
    }
    .cb-filter-apply-wrap .btn { min-height: 3rem; }
}

/* Compact Field Settings table */
.cb-field-settings-table-wrap {
    width: 100%;
}
@media (max-width: 1199.98px) {
    .cb-field-settings-table-wrap {
        overflow-x: auto;
    }
    .cb-field-settings-table-wrap table {
        min-width: 980px;
    }
}

/* Public Crew view panels (including Crew details loaded into the Find Crew modal). */
.public-crew-view .cb-crew-panel {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: 1rem;
    background: var(--bs-body-bg);
}
.public-crew-view .cb-crew-panel + .cb-crew-panel { margin-top: 1rem; }
.public-crew-view .cb-crew-panel-label { color: var(--bs-secondary-color); font-size: .82rem; margin-bottom: .2rem; }
.public-crew-view .cb-crew-panel-value { font-weight: 600; }
.public-crew-view .cb-field-group { max-width: 900px; margin-left: auto; margin-right: auto; }
.public-crew-view .cb-field-group-label { font-weight: 600; }

/* Shared Field Settings renderer */
.cb-field-group {
    width: 100%;
}
.cb-field-group-label {
    color: #495057;
    font-weight: 700;
    letter-spacing: .01em;
}
.cb-field-list {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}
.cb-field {
    min-width: 0;
}
.cb-field-label {
    margin-bottom: .2rem;
    color: #6c757d;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
}
.cb-field-value {
    color: #212529;
    overflow-wrap: anywhere;
}
.cb-field--title .cb-field-value {
    font-size: 1.2rem;
    color: #6c757d;
}
.cb-field--description .cb-field-value {
    line-height: 1.6;
}
.cb-field--slogan .cb-field-value {
    font-weight: 600;
}
.cb-field--visibility .cb-field-value {
    display: inline-flex;
}
.cb-field-badge {
    font-size: .8rem;
}
.cb-field-link {
    overflow-wrap: anywhere;
}
.cb-field-list--compact {
    gap: .65rem;
}
.cb-field-list--compact .cb-field--title .cb-field-value {
    font-size: .95rem;
}
.cb-field-list--compact .cb-field--description .cb-field-value {
    color: #6c757d;
    font-size: .875rem;
    line-height: 1.45;
}
.cb-field-list--compact .cb-field--slogan .cb-field-value {
    color: #6c757d;
    font-size: .875rem;
}
.cb-field--listing {
    width: auto;
    flex: 0 1 auto;
    min-width: 0;
}
.cb-field-list--compact .cb-field--listing-title .cb-field-value {
    color: #6c757d;
    font-size: .95rem;
    line-height: 1.35;
}
.cb-field-list--compact .cb-field--listing-slogan .cb-field-value {
    color: #6c757d;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.45;
}
.cb-field-list--compact .cb-field--listing-description .cb-field-value {
    color: #64748b;
    font-size: .875rem;
    line-height: 1.5;
}
.cb-field--listing-badge {
    display: inline-flex;
    width: auto;
    flex: 0 0 auto;
}
.cb-field--listing-domain .cb-field-value {
    font-size: .875rem;
}
.cb-field--view-title .cb-field-value {
    font-size: 1.25rem;
    color: #6c757d;
}
.cb-field--view-slogan .cb-field-value {
    font-weight: 600;
}
.cb-field--view-description .cb-field-value {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    color: #6c757d;
    line-height: 1.6;
}
.cb-field--view-domain .cb-field-value {
    font-size: .875rem;
}
.cb-field--view-badge .cb-field-value {
    display: inline-flex;
}
.cb-entity-icon {
    flex-shrink: 0;
}

/* Standard list header hierarchy. Page Layout controls field membership/order;
   these rules provide the shared visual treatment for list headers without
   depending on entity names, field names, or field position. All configured
   header fields stay on one horizontal line. */
.cb-page-type-list .cb-page-section-header {
    text-align: left;
}
.cb-page-type-list .cb-page-section-header > .cb-page-fields-list {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: left;
}
.cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin: 0;
    text-align: left;
}
.cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field .cb-field-value {
    display: inline-flex;
    align-items: center;
}
.cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field--emoji .cb-field-value {
    font-size: 2rem;
    line-height: 1;
}
.cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field--text .cb-field-value,
.cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field--title .cb-field-value {
    font-size: 1.5rem;
    line-height: 1.15;
    font-weight: 600;
}
.cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field--badge .cb-field-value,
.cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field--visibility .cb-field-value {
    display: inline-flex;
}


/* Center full Crew view field content while keeping compact listings left-aligned. */
.cb-field-list:not(.cb-field-list--compact) {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.cb-field-list:not(.cb-field-list--compact) .cb-field-label {
    text-align: center;
}
.cb-field-group:has(.cb-field-list:not(.cb-field-list--compact)) .cb-field-group-label {
    text-align: center;
}

/* Standard Page Layout section styling. Page Layout controls membership/order;
   these classes control the visual treatment of each section. */
.cb-page-section {
    width: 100%;
}

.cb-page-section-header {
    padding: .35rem 0 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--bs-border-color);
}
.cb-page-section-header .cb-kicker {
    margin: 0 0 .75rem;
}

.cb-page-section-body {
    padding: 1.5rem 0 1rem;
}
.cb-page-section-body .cb-field-list {
    gap: .9rem;
}
.cb-page-section-body .cb-field-value {
    font-size: 1rem;
}
.cb-page-section-body .cb-field--title .cb-field-value,
.cb-page-section-body .cb-field--view-title .cb-field-value {
    font-size: 1.35rem;
    color: var(--bs-body-color);
    font-weight: 500;
}
.cb-page-section-body .cb-field--slogan .cb-field-value,
.cb-page-section-body .cb-field--view-slogan .cb-field-value {
    font-size: 1.05rem;
    color: var(--bs-secondary-color);
    font-weight: 600;
}

.cb-page-section-description {
    margin-top: .5rem;
    padding: 1.5rem 0 .5rem;
    border-top: 1px solid var(--bs-border-color);
}
.cb-page-section-description .cb-field-list {
    gap: .5rem;
}
.cb-page-section-description .cb-field-value,
.cb-page-section-description .cb-field--description .cb-field-value,
.cb-page-section-description .cb-field--view-description .cb-field-value {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    color: var(--bs-secondary-color);
    font-size: 1rem;
    line-height: 1.7;
}

.cb-page-section-location {
    margin-top: 1rem;
    padding: 1.5rem 0 .5rem;
    border-top: 1px solid var(--bs-border-color);
}

.cb-page-section-footer {
    margin-top: 1rem;
    padding: 1.25rem 0 .25rem;
    border-top: 1px solid var(--bs-border-color);
}
.cb-page-section-footer .cb-field-label {
    font-size: .72rem;
}
.cb-page-section-footer .cb-field-value {
    font-size: .9rem;
}

@media (max-width: 767.98px) {
    .cb-page-section-header {
        padding-bottom: 1.25rem;
    }
}

/* -------------------------------------------------------------------------
   Page System: shared page-type and section-type presentation
   Page definitions determine what is rendered; these classes determine how
   every list, view, and form is presented consistently.
   ------------------------------------------------------------------------- */
.cb-page-record {
    width: 100%;
}

.cb-page-type-list .cb-page-fields-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.cb-page-type-view .cb-page-section-header .cb-page-fields-view {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: .8rem;
    row-gap: .45rem;
}

.cb-page-type-view .cb-page-section-header .cb-field {
    flex: 0 0 auto;
}

.cb-page-type-list .cb-field-label {
    display: inline;
    margin-right: .3rem;
    margin-bottom: 0;
}

.cb-page-type-list .cb-field-value {
    display: inline;
}

.cb-page-type-list .cb-field--title .cb-field-value,
.cb-page-type-list .cb-field--listing-title .cb-field-value {
    font-size: .95rem;
}

.cb-page-type-list .cb-field--description .cb-field-value,
.cb-page-type-list .cb-field--listing-description .cb-field-value {
    line-height: 1.45;
}

.cb-page-type-list .cb-page-record-nested {
    padding: .7rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.cb-page-type-list .cb-page-record-nested:last-child {
    border-bottom: 0;
}

.cb-page-type-view .cb-page-fields-view {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.cb-page-type-form .cb-page-fields-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cb-page-section-tab {
    width: 100%;
}

.cb-page-layout-tabs {
    margin-top: 1.5rem;
}

.cb-page-layout-tabs .nav-link,
.cb-crew-tabs .nav-link {
    color: #495057;
    font-weight: 600;
}

.cb-page-layout-tabs .nav-link.active,
.cb-crew-tabs .nav-link.active {
    color: #212529;
}

.cb-crew-view-section {
    scroll-margin-top: 90px;
}

.cb-page-type-list.cb-list-card {
    /* Crew List cards use the same list field treatment as all other list pages. */
}

/* List records rendered inside a tab are still list records, but the tab
   presentation is a compact list rather than a stack of cards. The page
   layout/section type supplies the context; no entity or subpage name is
   hardcoded here. */
.cb-page-section-tab .cb-page-type-list.cb-list-record {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
}
.cb-page-section-tab .cb-page-type-list.cb-list-record + .cb-page-type-list.cb-list-record {
    border-top: 1px solid var(--bs-border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}
.cb-page-section-tab .cb-page-type-list.cb-list-record .cb-page-section-body {
    padding: 0;
}
.cb-page-section-tab .cb-page-type-list.cb-list-record .cb-page-section-header,
.cb-page-section-tab .cb-page-type-list.cb-list-record .cb-page-section-description,
.cb-page-section-tab .cb-page-type-list.cb-list-record .cb-page-section-location,
.cb-page-section-tab .cb-page-type-list.cb-list-record .cb-page-section-footer {
    border-top: 0;
    border-bottom: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.cb-page-section-tab .cb-page-type-list.cb-list-record .cb-page-fields-list {
    gap: .25rem;
}
.cb-page-section-tab .cb-page-type-list.cb-list-record .cb-page-section-body,
.cb-page-section-tab .cb-page-type-list.cb-list-record .cb-page-section-location {
    padding-top: .25rem;
    padding-bottom: .25rem;
}
.cb-page-section-tab .cb-page-type-list.cb-list-record .cb-page-section-location {
    margin-top: .5rem;
}

/* Every configured list record uses the same card/section treatment, including
   list pages rendered inside a parent page tab. */
.cb-list-record {
    padding: 1.5rem;
}
.cb-list-record + .cb-list-record {
    margin-top: 1rem;
}
.cb-list-record .cb-list-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}
.cb-list-record .cb-list-card-title-group {
    width: 100%;
}
.cb-list-record .cb-page-section-header {
    padding: 0 0 1rem;
}
.cb-list-record .cb-page-section-header .cb-page-fields-list {
    width: 100%;
    text-align: left;
}
.cb-list-record .cb-page-section-body {
    padding: .75rem 0 .5rem;
}
.cb-list-record .cb-page-section-description,
.cb-list-record .cb-page-section-location {
    margin-top: .75rem;
    padding-top: .75rem;
}
.cb-list-record .cb-page-section-footer {
    margin-top: .75rem;
    padding-top: .75rem;
}
.cb-list-record .cb-page-fields-list {
    gap: .65rem;
}

/* Bar List cards render directly inside their own card template, so they do
   not receive the compact section rhythm used by the Crew and Crawl lists.
   Keep the card and section dividers, but avoid stacking large default
   section padding at every boundary. */
#bar-card-list .cb-page-section-header {
    padding: .35rem 0 .45rem;
    text-align: left;
}
#bar-card-list .cb-page-section-body {
    margin: 0;
    padding: .35rem 0;
}
#bar-card-list .cb-page-section-footer {
    margin-top: .4rem;
    padding: .4rem 0 .1rem;
}
#bar-card-list .cb-page-fields-list {
    gap: .25rem;
}
#bar-card-list .cb-page-layout-row {
    gap: .25rem;
    margin-block: 0;
    padding-block: 0;
    min-height: 0;
}
#bar-card-list .cb-page-layout-group {
    gap: .25rem;
}

/* Bar Stats subpage: present each configured stat like the Crew/Crawl card
   counters, with the number above and its label underneath, centered. */
#bar-card-list .cb-page-layout-subpage .cb-field--stat {
    display: flex;
    flex: 1 1 0;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-end;
    min-width: 4.5rem;
    max-width: 8rem;
    text-align: center;
    gap: .15rem;
    white-space: normal;
}
#bar-card-list .cb-page-layout-subpage .cb-field--stat .cb-field-label {
    display: block;
    margin: 0;
    color: var(--bs-secondary-color, #6c757d);
    font-weight: 400;
    line-height: 1.25;
}
#bar-card-list .cb-page-layout-subpage .cb-field--stat .cb-field-value {
    display: block;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: normal;
}
#bar-card-list .cb-page-layout-subpage .cb-page-layout-group:has(> .cb-field--stat) {
    display: flex;
    flex: 1 1 100%;
    justify-content: center;
    align-items: flex-start;
    gap: .75rem;
    width: 100%;
}
#bar-card-list .cb-page-layout-subpage .cb-page-layout-row:has(.cb-field--stat) {
    width: 100%;
}

/* A nested list record is layout content inside the parent Bar card, not a
   second card. Remove its duplicate card padding while retaining configured
   section borders and a small separation if a subpage returns multiple rows. */
#bar-card-list .cb-list-record {
    padding: 0;
}
#bar-card-list .cb-list-record + .cb-list-record {
    margin-top: .35rem;
}
#bar-card-list .cb-list-record .cb-page-section-header {
    padding: 0 0 .35rem;
}
#bar-card-list .cb-list-record .cb-page-section-body {
    padding: .1rem 0;
}
#bar-card-list .cb-list-record .cb-page-section-footer {
    margin-top: .35rem;
    padding: .35rem 0 .1rem;
}

@media (max-width: 767.98px) {
    .cb-page-type-list .cb-page-section-header > .cb-page-fields-list,
    .cb-page-type-view .cb-page-section-header .cb-page-fields-view {
        column-gap: .55rem;
    }
    .cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field--emoji .cb-field-value {
        font-size: 1.75rem;
    }
    .cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field--text .cb-field-value,
    .cb-page-type-list .cb-page-section-header > .cb-page-fields-list > .cb-field--title .cb-field-value {
        font-size: 1.35rem;
    }
}

/* Generic page-layout rows. Keep configured placement/alignment, but allow
   content to wrap instead of forcing long descriptions beyond the card edge. */
.cb-page-layout-row {
    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
    gap: .5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.cb-page-layout-row-start { justify-content: flex-start; }
.cb-page-layout-row-center { justify-content: center; }
.cb-page-layout-row-end { justify-content: flex-end; }
.cb-page-layout-row-space-between { justify-content: space-between; }
.cb-page-layout-group {
    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
    gap: .45rem;
    max-width: 100%;
    min-width: 0;
}
.cb-page-layout-group-main { flex: 1 1 auto; }
.cb-page-layout-group-start,
.cb-page-layout-group-end { flex: 0 1 auto; min-width: 0; }
.cb-page-layout-row .cb-field {
    min-width: 0;
    max-width: 100%;
}
.cb-page-layout-row .cb-field-value,
.cb-page-layout-row .cb-field-value > * {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}
.cb-page-layout-row .cb-field--description,
.cb-page-layout-row .cb-field--listing-description,
.cb-page-layout-row .cb-field--slogan,
.cb-page-layout-row .cb-field--listing-slogan {
    flex: 1 1 100%;
    width: 100%;
}
.cb-page-layout-row .cb-field--description .cb-field-value,
.cb-page-layout-row .cb-field--listing-description .cb-field-value,
.cb-page-layout-row .cb-field--slogan .cb-field-value,
.cb-page-layout-row .cb-field--listing-slogan .cb-field-value {
    display: block;
    white-space: normal;
}
.cb-page-action { white-space: normal; }

/* Crew View header: make the crew identity prominent. */
.cb-page-type-view .cb-page-section-header .cb-field[data-field-name="crew_name"] .cb-field-value {
    font-size: 1.5rem;
    font-weight: 600;
}
.cb-page-type-view .cb-page-section-header .cb-field[data-field-name="icon_emoji"] .cb-field-value {
    font-size: 1.8rem;
    line-height: 1;
}
.cb-page-type-view .cb-page-section-header .cb-page-fields-view {
    column-gap: 1rem;
    row-gap: .6rem;
}

/* -------------------------------------------------------------------------
   Crew View polish
   Visual-only treatment for the public Crew View and its configured tabs.
   Page layout, field order, actions, tabs, and navigation behavior remain
   controlled by the existing page system.
   ------------------------------------------------------------------------- */
.public-crew-view .cb-page-section-header {
    padding: 1.35rem 1.25rem 1.45rem;
    border: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%);
    box-shadow: inset 0 0 0 1px rgba(13,110,253,.08);
}
.public-crew-view .cb-page-section-header .cb-page-fields-view {
    min-height: 4.25rem;
}
.public-crew-view .cb-page-section-header .cb-field[data-field-name="icon_emoji"] .cb-field-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: .35rem;
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 .2rem .7rem rgba(16,24,32,.10);
    font-size: 1.8rem;
}
.public-crew-view .cb-page-section-header .cb-field[data-field-name="crew_name"] .cb-field-value {
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -.025em;
    color: var(--cb-dark);
}

.public-crew-view .cb-page-section-body {
    padding: 1.75rem 1rem 1.15rem;
}
.public-crew-view .cb-page-section-body .cb-page-fields-view {
    gap: .7rem;
}
.public-crew-view .cb-page-section-body .cb-field--visibility .cb-field-value,
.public-crew-view .cb-page-section-body .cb-field--view-badge .cb-field-value {
    filter: drop-shadow(0 .1rem .15rem rgba(0,0,0,.05));
}
.public-crew-view .cb-page-section-body .cb-field--title .cb-field-value,
.public-crew-view .cb-page-section-body .cb-field--view-title .cb-field-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cb-dark);
}
.public-crew-view .cb-page-section-body .cb-field--slogan .cb-field-value,
.public-crew-view .cb-page-section-body .cb-field--view-slogan .cb-field-value {
    font-size: 1.05rem;
    color: #475569;
}
.public-crew-view .cb-page-section-body .cb-field--domain .cb-field-value,
.public-crew-view .cb-page-section-body .cb-field--view-domain .cb-field-value {
    font-size: .95rem;
    font-weight: 600;
}

.public-crew-view .cb-page-section-description {
    margin-top: .35rem;
    padding: 1.15rem 1rem .65rem;
    border-top: 1px solid #e2e8f0;
    border-bottom: 0;
    background: #fbfcfe;
    border-radius: .75rem;
}

/* Tabs become a clear navigation control without changing their behavior. */
.public-crew-view .cb-page-section-tab {
    margin-top: 1.25rem;
}
.public-crew-view .cb-page-layout-tabs {
    margin-top: 0;
}
.public-crew-view .cb-page-layout-tabs .nav-tabs {
    border-bottom: 2px solid #dbe3ec;
}
.public-crew-view .cb-page-layout-tabs .nav-link {
    padding: .8rem 1rem;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: .75rem .75rem 0 0;
    color: #64748b;
    font-size: 1rem;
    font-weight: 700;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.public-crew-view .cb-page-layout-tabs .nav-link:hover,
.public-crew-view .cb-page-layout-tabs .nav-link:focus-visible {
    color: var(--cb-dark);
    background: #f8fafc;
}
.public-crew-view .cb-page-layout-tabs .nav-link.active {
    color: var(--cb-dark);
    background: #fff;
    border-color: #dbe3ec;
    box-shadow: 0 -2px 0 var(--bs-primary) inset;
}
.public-crew-view .cb-page-layout-tabs .tab-content {
    padding: 1rem .25rem .25rem !important;
}

/* Crawl/member records inside Crew tabs become distinct, lightweight cards. */
.public-crew-view .cb-page-section-tab .cb-page-type-list.cb-list-record {
    padding: 1.15rem 1.25rem;
    margin: 0 0 .8rem;
    border: 1px solid #e2e8f0;
    border-radius: .85rem;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 .2rem .7rem rgba(16,24,32,.045);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.public-crew-view .cb-page-section-tab .cb-page-type-list.cb-list-record:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 .45rem 1rem rgba(16,24,32,.08);
}
.public-crew-view .cb-page-section-tab .cb-page-type-list.cb-list-record + .cb-page-type-list.cb-list-record {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.15rem;
    margin-top: 0;
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-page-section-header {
    padding: 0 0 .55rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-page-section-header .cb-field-value {
    color: var(--cb-dark);
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-page-section-header .cb-field--emoji .cb-field-value {
    font-size: 1.35rem;
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-page-section-header .cb-field--title .cb-field-value,
.public-crew-view .cb-page-section-tab .cb-list-record .cb-page-section-header .cb-field--listing-title .cb-field-value {
    font-size: 1.05rem;
    font-weight: 700;
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-page-section-body {
    padding: .25rem 0 .15rem;
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-page-fields-list {
    gap: .45rem;
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-field-value {
    color: #334155;
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-field-label {
    color: #64748b;
    font-size: .68rem;
    letter-spacing: .08em;
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-page-section-location {
    margin-top: .55rem;
    padding: .65rem 0 .05rem;
    border-top: 1px dashed #dbe3ec;
}
.public-crew-view .cb-page-section-tab .cb-list-record .cb-page-section-footer {
    margin-top: .65rem;
    padding-top: .65rem;
    border-top: 1px dashed #dbe3ec;
}

/* Keep the return control visually tied to the Crew View. */
.public-crew-view ~ .cb-page-section-actions {
    margin-top: -1.5rem;
    padding-bottom: 1rem;
}
.public-crew-view ~ .cb-page-section-actions .btn {
    padding: .55rem 1rem;
    border-radius: .65rem;
    font-weight: 600;
    box-shadow: 0 .15rem .4rem rgba(16,24,32,.06);
}

/* Breadcrumbs read more like navigation than metadata. */
.cb-breadcrumb-list {
    font-size: .9rem;
    font-weight: 600;
    gap: .4rem;
}
.cb-breadcrumb-list a {
    color: #526273;
}
.cb-breadcrumb-list span[aria-current="page"] {
    color: var(--cb-dark);
}

@media (max-width: 767.98px) {
    .public-crew-view .cb-page-section-header {
        padding: 1rem .75rem 1.15rem;
    }
    .public-crew-view .cb-page-section-header .cb-field[data-field-name="icon_emoji"] .cb-field-value {
        width: 2.65rem;
        height: 2.65rem;
    }
    .public-crew-view .cb-page-section-body {
        padding-left: .25rem;
        padding-right: .25rem;
    }
    .public-crew-view .cb-page-layout-tabs .nav-link {
        padding: .7rem .6rem;
        font-size: .92rem;
    }
    .public-crew-view .cb-page-section-tab .cb-page-type-list.cb-list-record {
        padding: 1rem;
    }
}


/* -------------------------------------------------------------------------
   Public Crews list
   Scoped only to #crew-card-list so Crew View styling is untouched.
   ------------------------------------------------------------------------- */
#crew-card-list .cb-list-card {
    padding: 1.25rem !important;
    overflow: hidden;
    border: 1px solid #d4e0ee;
    border-left: 4px solid #3b82f6;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .35rem 1rem rgba(15,23,42,.07);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

#crew-card-list .cb-list-card:hover {
    transform: translateY(-2px);
    border-color: #b7cbe2;
    border-left-color: #2563eb;
    box-shadow: 0 .7rem 1.5rem rgba(15,23,42,.11);
}

/* Crew identity/action header */
#crew-card-list .cb-list-card-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem;
    width: auto;
    margin: -.25rem -.25rem .9rem;
    padding: .8rem .9rem !important;
    background: linear-gradient(135deg, #f1f7ff 0%, #f8fbff 100%);
    border: 1px solid #d8e5f3;
    border-radius: .7rem;
}

#crew-card-list .cb-list-card-title-group {
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0;
    padding: 0 !important;
}

#crew-card-list .cb-page-section-header {
    padding: 0 !important;
    border: 0;
    background: transparent;
}

#crew-card-list .cb-page-section-header .cb-page-fields-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: .65rem;
    row-gap: .25rem;
    width: auto;
    min-width: 0;
}

#crew-card-list .cb-page-section-header .cb-field {
    margin: 0;
}

#crew-card-list .cb-page-section-header .cb-field--emoji .cb-field-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: .2rem;
    border-radius: .55rem;
    background: #fff;
    box-shadow: 0 .2rem .55rem rgba(15,23,42,.09);
    font-size: 1.35rem;
    line-height: 1;
}

/* Match the Crawl List icon tile to the established Crew List treatment. */
#crawl-card-list .cb-page-section-header .cb-field--emoji .cb-field-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: .2rem;
    border-radius: .55rem;
    background: #fff;
    box-shadow: 0 .2rem .55rem rgba(15,23,42,.09);
    font-size: 1.35rem;
    line-height: 1;
}

#crew-card-list .cb-page-section-header .cb-field--title .cb-field-value,
#crew-card-list .cb-page-section-header .cb-field[data-field-name="crew_name"] .cb-field-value,
#crew-card-list .cb-page-section-header .cb-field--text .cb-field-value {
    font-size: 1.3rem;
    line-height: 1.25;
    font-weight: 700;
    color: var(--cb-dark);
}

#crew-card-list .cb-list-card-actions {
    flex: 0 0 auto;
    margin: 0 !important;
}

#crew-card-list .cb-list-card-actions .btn {
    border-color: #64748b;
    border-radius: .5rem;
    padding: .42rem .8rem;
    background: #fff;
    color: #1e293b;
    font-weight: 600;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

#crew-card-list .cb-list-card-actions .btn:hover,
#crew-card-list .cb-list-card-actions .btn:focus-visible {
    transform: translateY(-1px);
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 .25rem .6rem rgba(37,99,235,.14);
}

/* Main crew information */
#crew-card-list .cb-page-section-body {
    margin-top: .5rem !important;
    padding: .05rem .25rem .15rem !important;
}

#crew-card-list .cb-page-section-body .cb-page-fields-list {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

#crew-card-list .cb-page-section-body .cb-field {
    margin: 0;
}

#crew-card-list .cb-page-section-body .cb-field-value {
    line-height: 1.25;
}

#crew-card-list .cb-page-section-body .cb-field--domain .cb-field-value,
#crew-card-list .cb-page-section-body .cb-field--website .cb-field-value {
    font-weight: 600;
}

#crew-card-list .cb-page-section-body .cb-crew-slogan,
#crew-card-list .cb-page-section-body .cb-field--slogan .cb-field-value {
    color: #334155;
}

/* Created-by/footer metadata */
#crew-card-list .cb-layout-section--footer {
    margin-top: .5rem !important;
    padding: .45rem .25rem .1rem !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-size: .84rem;
}

#crew-card-list .cb-layout-section--footer .cb-field-value {
    color: #475569;
}

/* Crew counts */
#crew-card-list .cb-list-card > .border-top:last-child {
    margin-top: .5rem !important;
    padding: .45rem .25rem .02rem !important;
    border-top-color: #dbe5ef !important;
    color: #64748b;
    font-size: .86rem;
}

#crew-card-list .cb-list-card > .border-top:last-child span {
    display: inline-flex;
    align-items: center;
    padding: .2rem .45rem;
    border-radius: .35rem;
    background: #f5f8fb;
    color: #475569;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    #crew-card-list .cb-list-card {
        padding: 1rem !important;
        border-left-width: 3px;
    }

    #crew-card-list .cb-list-card-top {
        margin: 0 0 .7rem;
        padding: .7rem !important;
    }

    #crew-card-list .cb-page-section-header .cb-page-fields-list {
        column-gap: .5rem;
    }

    #crew-card-list .cb-page-section-header .cb-field--title .cb-field-value,
    #crew-card-list .cb-page-section-header .cb-field[data-field-name="crew_name"] .cb-field-value,
    #crew-card-list .cb-page-section-header .cb-field--text .cb-field-value {
        font-size: 1.15rem;
    }

    #crew-card-list .cb-page-section-body {
        padding-left: .1rem !important;
        padding-right: .1rem !important;
    }

    #crew-card-list .cb-layout-section--footer,
    #crew-card-list .cb-list-card > .border-top:last-child {
        padding-left: .1rem !important;
        padding-right: .1rem !important;
    }

    #crew-card-list .cb-list-card > .border-top:last-child span {
        padding: .18rem .35rem;
    }
}

/* Crew stats: keep the stats footer compact and use a single divider. */
#crew-card-list .cb-list-card .cb-page-section-footer {
    margin-top: .5rem !important;
    padding: .4rem .25rem .05rem !important;
    border-top: 1px solid #dbe5ef !important;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-record {
    width: 100%;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-section-body {
    padding: 0 !important;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-fields-view {
    gap: 0 !important;
}

/* Footer rows use layout metadata, not field-name-specific selectors. */
#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-row {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    min-height: 0 !important;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group {
    gap: .35rem !important;
    min-height: 0 !important;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-field {
    display: inline-flex;
    align-items: baseline;
    gap: .25rem;
    margin: 0 !important;
    line-height: 1.1;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-field-label,
#crew-card-list .cb-list-card .cb-page-section-footer .cb-field-value {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.1;
}


/* Mobile layout corrections: wrap configured Crew content instead of clipping it. */
@media (max-width: 767.98px) {
    .public-crew-view,
    .public-crew-view * {
        box-sizing: border-box;
    }

    .public-crew-view,
    .public-crew-view .cb-page-section,
    .public-crew-view .cb-page-layout-tabs,
    .public-crew-view .tab-content,
    .public-crew-view .tab-pane,
    .public-crew-view .cb-page-type-list,
    .public-crew-view .cb-list-record,
    .public-crew-view .cb-list-card-top,
    .public-crew-view .cb-list-card-title-group {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .public-crew-view {
        overflow-x: hidden;
    }

    .public-crew-view .cb-page-layout-row,
    .public-crew-view .cb-page-layout-group,
    .public-crew-view .cb-page-fields-view,
    .public-crew-view .cb-page-fields-list,
    .public-crew-view .cb-list-card-top,
    .public-crew-view .cb-list-card-title-group {
        display: flex;
        flex-wrap: wrap !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .public-crew-view .cb-page-layout-group-main,
    .public-crew-view .cb-page-layout-group-start,
    .public-crew-view .cb-page-layout-group-end {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .public-crew-view .cb-field,
    .public-crew-view .cb-field-value,
    .public-crew-view .cb-page-section-location,
    .public-crew-view .cb-page-section-description,
    .public-crew-view .cb-page-type-list,
    .public-crew-view .cb-list-record * {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-wrap: break-word;
    }

    .public-crew-view .cb-page-layout-tabs .nav-tabs {
        display: flex;
        flex-wrap: wrap;
    }

    .public-crew-view .cb-page-layout-tabs .nav-item {
        flex: 1 1 0;
        min-width: 0;
    }

    .public-crew-view .cb-page-layout-tabs .nav-link {
        width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        padding-left: .4rem;
        padding-right: .4rem;
    }

    .public-crew-view .cb-page-section-tab .cb-page-type-list.cb-list-record {
        width: 100% !important;
        padding: .85rem !important;
        overflow: hidden;
    }

    .public-crew-view .cb-page-section-tab .cb-list-card-top {
        justify-content: flex-start !important;
        gap: .5rem;
    }

    .public-crew-view .cb-list-card-actions {
        flex: 0 0 auto !important;
        margin-left: 0 !important;
    }

    #crew-card-list .cb-list-card-top {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: .5rem;
    }

    #crew-card-list .cb-list-card-title-group {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    #crew-card-list .cb-list-card-actions {
        display: flex !important;
        flex: 1 1 100% !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    #crew-card-list .cb-list-card-actions .btn,
    #crew-card-list .cb-list-card-actions .badge {
        white-space: normal !important;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

/* Mobile Crews listing: keep the visibility badge pinned inside the card's
   upper-right corner instead of letting it extend past the card edge. */
@media (max-width: 767.98px) {
    #crew-card-list .cb-list-card-top {
        position: relative !important;
        display: block !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: .7rem !important;
        overflow: hidden;
    }

    #crew-card-list .cb-list-card-title-group {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 0 0 0 0 !important;
    }

    #crew-card-list .cb-page-section-header .cb-page-fields-list {
        display: flex !important;
        align-items: flex-start !important;
        flex-wrap: wrap !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding-right: 0 !important;
    }

    #crew-card-list .cb-page-section-header .cb-field--visibility {
        position: absolute !important;
        top: .7rem !important;
        right: .7rem !important;
        z-index: 2;
        max-width: 42% !important;
        margin: 0 !important;
    }

    #crew-card-list .cb-page-section-header .cb-field--visibility .cb-field-value,
    #crew-card-list .cb-page-section-header .cb-field--visibility .badge {
        display: inline-block;
        max-width: 100% !important;
        box-sizing: border-box;
        white-space: normal !important;
        overflow-wrap: anywhere;
        text-align: center;
    }

    #crew-card-list .cb-list-card-actions {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
        margin-top: .45rem !important;
        box-sizing: border-box !important;
    }

    #crew-card-list .cb-list-card-actions .btn {
        max-width: 100% !important;
        white-space: nowrap !important;
    }
}

/* Shared typography scale for all data-driven page layouts.
   Layout structure and field selection remain controlled by Page Layouts;
   these rules standardize type only, without relying on individual field names. */
:root {
    --cb-font-family: inherit;
    --cb-font-size-body: 1rem;
    --cb-font-size-page-title: 2rem;
    --cb-font-size-section-title: 1.25rem;
    --cb-font-size-record-title: 1.25rem;
    --cb-font-size-body-secondary: .95rem;
    --cb-font-size-label: .8rem;
    --cb-font-size-badge: .75rem;
    --cb-line-height-body: 1.5;
    --cb-line-height-heading: 1.25;
}

body,
.cb-page-layout,
.cb-page-type-list,
.cb-page-type-view,
.cb-page-type-form,
.cb-page-section,
.cb-page-section-tab,
.cb-page-record-nested {
    font-family: var(--cb-font-family);
    font-size: var(--cb-font-size-body);
    line-height: var(--cb-line-height-body);
}

/* Main page headings and section headings use one consistent scale. */
.page-title,
.page-header h1,
.cb-page-title {
    font-size: var(--cb-font-size-page-title);
    line-height: var(--cb-line-height-heading);
}

.cb-page-section-title,
.cb-page-section-heading,
.cb-page-section-tab-title {
    font-size: var(--cb-font-size-section-title);
    line-height: var(--cb-line-height-heading);
}

/* Generic list-record titles, including nested records such as crawls. */
.cb-page-type-list .cb-page-section-header .cb-field--title .cb-field-value,
.cb-page-type-list .cb-page-section-header .cb-field--listing-title .cb-field-value,
.cb-page-type-list .cb-page-section-header .cb-field--text .cb-field-value,
.cb-list-card-title,
.cb-list-card-title-group .cb-field-value {
    font-size: var(--cb-font-size-record-title) !important;
    line-height: var(--cb-line-height-heading) !important;
    font-weight: 700;
}

/* Body and descriptive content. */
.cb-page-type-list .cb-field--description .cb-field-value,
.cb-page-type-list .cb-field--listing-description .cb-field-value,
.cb-page-section-description,
.cb-page-section-body,
.cb-page-section-location,
.cb-page-record-nested {
    font-size: var(--cb-font-size-body);
    line-height: var(--cb-line-height-body);
}

/* Field labels, metadata, creator lines, and card statistics/footers. */
.cb-field-label,
.cb-page-section-footer,
.cb-page-section-meta,
.cb-list-card-footer,
.cb-list-card-stats,
.cb-page-type-list .cb-field--created-by .cb-field-value,
.cb-page-type-list .cb-field--timestamp .cb-field-value {
    font-size: var(--cb-font-size-label);
    line-height: 1.4;
}

/* Visibility and other badges share the same typography everywhere. */
.badge,
.cb-field--visibility .cb-field-value {
    font-size: var(--cb-font-size-badge);
    line-height: 1.25;
    font-weight: 700;
}

/* Keep buttons readable and consistent without changing their dimensions. */
.btn {
    font-size: .9rem;
    line-height: 1.4;
}

@media (max-width: 767.98px) {
    :root {
        --cb-font-size-page-title: 1.75rem;
        --cb-font-size-section-title: 1.15rem;
        --cb-font-size-record-title: 1.1rem;
        --cb-font-size-body-secondary: .92rem;
    }
}


/* GLOBAL visibility design system: used by every renderer and future page. */
:root {
    --cb-visibility-limited-bg: #E5E7EB;
    --cb-visibility-limited-accent: #9CA3AF;
    --cb-visibility-limited-text: #374151;
    --cb-visibility-public-bg: #D1FAE5;
    --cb-visibility-public-accent: #10B981;
    --cb-visibility-public-text: #065F46;
    --cb-visibility-members-bg: #DBEAFE;
    --cb-visibility-members-accent: #3B82F6;
    --cb-visibility-members-text: #1D4ED8;
    --cb-visibility-admins-bg: #FEE2E2;
    --cb-visibility-admins-accent: #DC2626;
    --cb-visibility-admins-text: #991B1B;
}
.cb-visibility-badge,
.cb-field--visibility .badge,
.cb-field--visibility .cb-field-badge {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    border: 0 !important;
    font-weight: 700;
}
.cb-visibility-limited { background: var(--cb-visibility-limited-bg) !important; color: var(--cb-visibility-limited-text) !important; }
.cb-visibility-public { background: var(--cb-visibility-public-bg) !important; color: var(--cb-visibility-public-text) !important; }
.cb-visibility-members { background: var(--cb-visibility-members-bg) !important; color: var(--cb-visibility-members-text) !important; }
.cb-visibility-admins { background: var(--cb-visibility-admins-bg) !important; color: var(--cb-visibility-admins-text) !important; }
.cb-list-record.cb-visibility-card-limited,
.cb-list-card.cb-visibility-card-limited { border-left: 4px solid var(--cb-visibility-limited-accent) !important; }
.cb-list-record.cb-visibility-card-public,
.cb-list-card.cb-visibility-card-public { border-left: 4px solid var(--cb-visibility-public-accent) !important; }
.cb-list-record.cb-visibility-card-members,
.cb-list-card.cb-visibility-card-members { border-left: 4px solid var(--cb-visibility-members-accent) !important; }
.cb-list-record.cb-visibility-card-admins,
.cb-list-card.cb-visibility-card-admins { border-left: 4px solid var(--cb-visibility-admins-accent) !important; }
.cb-access-indicator-listing { display: inline-flex; align-items: center; vertical-align: middle; margin-inline-start: .35rem; line-height: 1; }
.cb-page-layout-tabs .nav-link,
.public-crew-view .cb-page-layout-tabs .nav-link { border-top: 2px solid transparent !important; }
.cb-page-layout-tabs .nav-link.active,
.public-crew-view .cb-page-layout-tabs .nav-link.active { box-shadow: none !important; border-top-color: transparent !important; }
.cb-tab-label { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }

/* Global visibility accents: tabs and listing indicators must remain inline. */
.cb-page-layout-tabs .nav-link.cb-tab-visibility-limited,
.cb-page-layout-tabs .nav-link.cb-tab-visibility-limited.active { border-top: 4px solid var(--cb-visibility-limited-accent) !important; }
.cb-page-layout-tabs .nav-link.cb-tab-visibility-public,
.cb-page-layout-tabs .nav-link.cb-tab-visibility-public.active { border-top: 4px solid var(--cb-visibility-public-accent) !important; }
.cb-page-layout-tabs .nav-link.cb-tab-visibility-members,
.cb-page-layout-tabs .nav-link.cb-tab-visibility-members.active { border-top: 4px solid var(--cb-visibility-members-accent) !important; }
.cb-page-layout-tabs .nav-link.cb-tab-visibility-admins,
.cb-page-layout-tabs .nav-link.cb-tab-visibility-admins.active { border-top: 4px solid var(--cb-visibility-admins-accent) !important; }
.cb-tab-label { display: inline-flex !important; flex-flow: row nowrap !important; align-items: center; justify-content: center; white-space: nowrap; gap: .4rem; }
.cb-access-indicator,
.cb-access-indicator-listing { display: inline-flex !important; flex: 0 0 auto; align-items: center; justify-content: center; white-space: nowrap !important; vertical-align: middle; line-height: 1; margin-inline-start: .35rem; }
.cb-field--visibility .cb-field-value { display: inline-flex; align-items: center; flex-flow: row nowrap; gap: .35rem; white-space: nowrap; }

/* Shared Crew detail tab visibility accents and inline access indicators. */
.public-crew-view .cb-page-layout-tabs .nav-link { min-width: 0; }
.public-crew-view .cb-page-layout-tabs .cb-tab-label {
    display: inline-flex !important;
    flex-flow: row nowrap !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    gap: .4rem;
}
.public-crew-view .cb-page-layout-tabs .cb-access-indicator,
.public-crew-view .cb-field--visibility .cb-access-indicator,
.public-crew-view .cb-field--visibility .cb-access-indicator-listing {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    white-space: nowrap !important;
}
.public-crew-view .cb-page-layout-tabs .nav-link.cb-tab-visibility-limited,
.public-crew-view .cb-page-layout-tabs .nav-link.cb-tab-visibility-limited.active { border-top: 4px solid var(--cb-visibility-limited-accent) !important; }
.public-crew-view .cb-page-layout-tabs .nav-link.cb-tab-visibility-public,
.public-crew-view .cb-page-layout-tabs .nav-link.cb-tab-visibility-public.active { border-top: 4px solid var(--cb-visibility-public-accent) !important; }
.public-crew-view .cb-page-layout-tabs .nav-link.cb-tab-visibility-members,
.public-crew-view .cb-page-layout-tabs .nav-link.cb-tab-visibility-members.active { border-top: 4px solid var(--cb-visibility-members-accent) !important; }
.public-crew-view .cb-page-layout-tabs .nav-link.cb-tab-visibility-admins,
.public-crew-view .cb-page-layout-tabs .nav-link.cb-tab-visibility-admins.active { border-top: 4px solid var(--cb-visibility-admins-accent) !important; }

/* Sequential navigation for the public information guide */
.cb-info-navigation { background: linear-gradient(135deg, #fff 0%, #f8fafc 100%); }
.cb-info-navigation .btn { white-space: normal; }
@media (max-width: 575.98px) {
    .cb-info-navigation .btn { width: 100%; }
}

/* Keep learning-page navigation actions grouped by purpose. */
.cb-info-navigation-account { width: 100%; }
.cb-info-navigation-account .btn { min-width: 10rem; }
@media (max-width: 575.98px) {
 .cb-info-navigation-primary, .cb-info-navigation-account { flex-direction: column; align-items: stretch; }
 .cb-info-navigation-primary .btn, .cb-info-navigation-account .btn { width: 100%; }
}


/* Consistent button sizing for all four learning-page navigation panels. */
.cb-info-navigation .cb-info-navigation-primary,
.cb-info-navigation .cb-info-navigation-account {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: .75rem;
}
.cb-info-navigation .cb-info-navigation-primary > .btn,
.cb-info-navigation .cb-info-navigation-account > .btn {
    box-sizing: border-box;
    flex: 0 1 13.5rem;
    width: 13.5rem;
    max-width: 100%;
    min-height: 2.9rem;
    padding: .65rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
    white-space: normal;
}
.cb-info-navigation .cb-info-navigation-account {
    margin-top: .75rem;
}
@media (max-width: 575.98px) {
    .cb-info-navigation .cb-info-navigation-primary,
    .cb-info-navigation .cb-info-navigation-account {
        flex-direction: column;
        align-items: center;
    }
    .cb-info-navigation .cb-info-navigation-primary > .btn,
    .cb-info-navigation .cb-info-navigation-account > .btn {
        flex: 0 1 auto;
        width: min(100%, 22rem);
    }
}



/* Responsive configured tabs: wrap into additional rows instead of compressing labels. */
.cb-page-layout-tabs .nav-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch;
}
.cb-page-layout-tabs .nav-tabs > .nav-item {
    flex: 1 1 8rem;
    min-width: 0;
}
.cb-page-layout-tabs .nav-tabs > .nav-item > .nav-link {
    display: flex;
    width: 100%;
    min-width: 0;
    height: 100%;
    align-items: center;
    justify-content: center;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: center;
}
.cb-page-layout-tabs .nav-tabs > .nav-item > .nav-link .cb-tab-label {
    display: inline-flex !important;
    flex-flow: row wrap !important;
    justify-content: center;
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
}
@media (max-width: 767.98px) {
    .public-crew-view .cb-page-layout-tabs .nav-tabs > .nav-item {
        flex: 1 1 6.5rem !important;
    }
}

/* Active tab selection uses a neutral fill; the top stripe remains visibility-coded. */
.cb-page-layout-tabs .nav-link.active,
.public-crew-view .cb-page-layout-tabs .nav-link.active {
    color: #111827 !important;
    background-color: #F3F4F6 !important;
    font-weight: 700;
    box-shadow: none !important;
}
.cb-page-layout-tabs .nav-link:not(.active),
.public-crew-view .cb-page-layout-tabs .nav-link:not(.active) {
    background-color: #FFFFFF;
}


/* Final Crews list refinement: keep presentation generic and labels configuration-driven. */
#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) {
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: .45rem !important;
    row-gap: .25rem !important;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: .2rem;
    white-space: nowrap;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field > .cb-field-value {
    order: 0;
    font-weight: 600;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field > .cb-field-label {
    order: 1;
    display: inline !important;
    visibility: visible !important;
    margin: 0 !important;
    font-size: inherit;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: lowercase;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field > .cb-field-label::first-letter {
    text-transform: uppercase;
}

/* Stat items have their own centered value/label; do not add separators. */
#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field::after {
    content: none !important;
    display: none !important;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:not(:has(> .cb-field:nth-child(3))) .cb-field-label {
    display: inline !important;
    visibility: visible !important;
}

@media (max-width: 767.98px) {
    #crew-card-list .cb-list-card {
        padding: .85rem !important;
    }

    #crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) {
        column-gap: .35rem !important;
        row-gap: .3rem !important;
    }
}

/* Global typography refinement: improve readability across all data-driven pages.
   Content, labels, and field selection remain controlled by page_layouts and field_settings. */
:root {
    --cb-font-size-body: 1.0625rem;
    --cb-font-size-page-title: 2.125rem;
    --cb-font-size-section-title: 1.375rem;
    --cb-font-size-record-title: 1.375rem;
    --cb-font-size-body-secondary: 1rem;
    --cb-font-size-label: .9rem;
    --cb-font-size-badge: .8125rem;
    --cb-line-height-body: 1.55;
    --cb-line-height-heading: 1.25;
}

/* Apply the shared scale consistently, including labels that previously used tiny fixed sizes. */
body,
.cb-page-layout,
.cb-page-type-list,
.cb-page-type-view,
.cb-page-type-form,
.cb-page-section,
.cb-page-section-tab,
.cb-page-record-nested {
    font-size: var(--cb-font-size-body);
    line-height: var(--cb-line-height-body);
}

.cb-field-label,
.cb-page-section-footer,
.cb-page-section-meta,
.cb-list-card-footer,
.cb-list-card-stats,
.cb-page-type-list .cb-field--created-by .cb-field-value,
.cb-page-type-list .cb-field--timestamp .cb-field-value {
    font-size: var(--cb-font-size-label);
    line-height: 1.4;
}

.cb-field-value {
    font-size: var(--cb-font-size-body);
}

.cb-field--badge .cb-field-value,
.cb-field--visibility .cb-field-value,
.cb-field--membership .cb-field-value,
.badge {
    font-size: var(--cb-font-size-badge);
    line-height: 1.25;
}

@media (max-width: 767.98px) {
    :root {
        --cb-font-size-body: 1rem;
        --cb-font-size-page-title: 1.875rem;
        --cb-font-size-section-title: 1.25rem;
        --cb-font-size-record-title: 1.25rem;
        --cb-font-size-body-secondary: .95rem;
        --cb-font-size-label: .8125rem;
        --cb-font-size-badge: .75rem;
        --cb-line-height-body: 1.5;
    }
}

/* Distinguish slogan from description using the configured semantic field type.
   This remains reusable across layouts and does not depend on a field name or text value. */
.cb-page-type-list .cb-field--slogan .cb-field-value,
.cb-page-type-list .cb-field--listing-slogan .cb-field-value,
.cb-page-section-body .cb-field--slogan .cb-field-value,
.cb-page-section-body .cb-field--view-slogan .cb-field-value {
    display: block;
    margin-bottom: .3rem !important;
    color: #64748b;
    font-style: italic;
    font-weight: 500;
    line-height: 1.45;
}

.cb-page-type-list .cb-field--description .cb-field-value,
.cb-page-type-list .cb-field--listing-description .cb-field-value,
.cb-page-section-body .cb-field--description .cb-field-value,
.cb-page-section-body .cb-field--view-description .cb-field-value {
    font-style: normal;
    font-weight: 400;
    line-height: var(--cb-line-height-body, 1.55);
}


/* Crew listing refinements: modestly tighten field rhythm without changing
   typography, card structure, visibility colors, or configured page layout. */
#crew-card-list .cb-page-section-body > .cb-field,
#crew-card-list .cb-page-section-body .cb-page-layout-group > .cb-field,
#crew-card-list .cb-page-section-body .cb-page-layout-row > .cb-field {
    margin-block: .1rem !important;
}

#crew-card-list .cb-page-section-body .cb-field-value {
    overflow-wrap: anywhere;
}

#crew-card-list .cb-page-section-body .cb-field.crew_slogan .cb-field-value {
    display: block !important;
    margin-top: .1rem !important;
    margin-bottom: .35rem !important;
    color: #64748b !important;
    font-style: italic !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
}

#crew-card-list .cb-page-section-body .cb-field.crew_description .cb-field-value {
    color: var(--bs-body-color, #212529);
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

/* Keep header content from colliding with actions when names are long. */
#crew-card-list .cb-list-card-title-group,
#crew-card-list .cb-page-section-header .cb-page-fields-list,
#crew-card-list .cb-page-section-header .cb-field {
    min-width: 0;
}

#crew-card-list .cb-page-section-header .cb-field-value {
    overflow-wrap: anywhere;
}

/* Statistics: slightly tighter gaps and readable wrapping on narrow screens. */
#crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group {
    column-gap: .3rem !important;
    row-gap: .2rem !important;
}

#crew-card-list .cb-list-card .cb-page-section-footer .cb-field {
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    #crew-card-list .cb-list-card {
        padding: .9rem !important;
    }

    #crew-card-list .cb-page-section-body {
        line-height: 1.48;
    }

    #crew-card-list .cb-page-section-body > .cb-field,
    #crew-card-list .cb-page-section-body .cb-page-layout-group > .cb-field,
    #crew-card-list .cb-page-section-body .cb-page-layout-row > .cb-field {
        margin-block: .08rem !important;
    }

    #crew-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group {
        column-gap: .25rem !important;
        row-gap: .2rem !important;
    }
}


/* Generic stacked statistics: parent row positions the complete stats group;
   each stat keeps its value and label centered together. */
#crew-card-list .cb-list-card .cb-page-section-footer
.cb-page-layout-group:has(> .cb-field:nth-child(3)) {
    display: flex !important;
    flex: 0 1 auto !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    width: max-content !important;
    max-width: 100% !important;
    min-width: 0 !important;
    column-gap: .65rem !important;
    row-gap: .45rem !important;
}

/* The Main group must not grow to fill the parent row when it contains stats. */
.cb-page-layout-row > .cb-page-layout-group-main:has(> .cb-page-layout-group:has(> .cb-field:nth-child(3))),
.cb-page-layout-row > .cb-page-layout-group-main:has(> .cb-page-record .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3))) {
    flex: 0 1 auto !important;
    width: max-content !important;
    max-width: 100% !important;
}

#crew-card-list .cb-list-card .cb-page-section-footer
.cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field {
    display: flex !important;
    flex: 0 0 4.75rem !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .2rem !important;
    min-width: 0 !important;
    text-align: center !important;
}
#crew-card-list .cb-list-card .cb-page-section-footer
.cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field > .cb-field-value {
    order: 0 !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    font-weight: 600;
}
#crew-card-list .cb-list-card .cb-page-section-footer
.cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field > .cb-field-label {
    order: 1 !important;
    display: block !important;
    visibility: visible !important;
    width: max-content !important;
    max-width: none !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    margin: 0 !important;
    font-size: inherit;
    font-weight: 400;
    line-height: 1.2 !important;
    text-align: center !important;
    text-transform: none !important;
}
#crew-card-list .cb-list-card .cb-page-section-footer
.cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field::after {
    content: none !important;
    display: none !important;
}

/* Inline subpages are positioned as a single unit by the parent row.
   Existing direct records keep their compact sizing for backwards
   compatibility. */
.cb-page-layout-row > .cb-page-layout-group-main:has(> .cb-page-record),
.cb-page-layout-row > .cb-page-layout-group-start:has(> .cb-page-record),
.cb-page-layout-row > .cb-page-layout-group-end:has(> .cb-page-record) {
    flex: 0 1 auto !important;
    width: max-content !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.cb-page-layout-row > .cb-page-layout-group-main:has(> .cb-page-record) > .cb-page-record,
.cb-page-layout-row > .cb-page-layout-group-start:has(> .cb-page-record) > .cb-page-record,
.cb-page-layout-row > .cb-page-layout-group-end:has(> .cb-page-record) > .cb-page-record {
    width: max-content !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

/* A wrapper separates subpages from adjacent fields in the group's flex flow.
   Give their containing group a full row so the wrapped subpage begins at the
   configured row alignment regardless of the width of preceding fields. */
.cb-page-layout-row > .cb-page-layout-group-main:has(> .cb-page-layout-subpage),
.cb-page-layout-row > .cb-page-layout-group-start:has(> .cb-page-layout-subpage),
.cb-page-layout-row > .cb-page-layout-group-end:has(> .cb-page-layout-subpage) {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

/* Inline subpages start on their own flex line, independent of preceding
   fields, while retaining the configured row's horizontal alignment. */
.cb-page-layout-subpage {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.cb-page-layout-subpage > .cb-page-record {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Keep nested subpage layout rules intact on mobile. The compact sizing rule
   above is for positioning the subpage as a unit; it must not shrink the
   subpage's own internal Main groups or override its row alignment. */
@media (max-width: 767.98px) {
    #crew-card-list .cb-page-record .cb-page-layout-row.cb-page-layout-row-start {
        justify-content: flex-start !important;
    }
    #crew-card-list .cb-page-record .cb-page-layout-row.cb-page-layout-row-center {
        justify-content: center !important;
    }
    #crew-card-list .cb-page-record .cb-page-layout-row.cb-page-layout-row-end {
        justify-content: flex-end !important;
    }
    #crew-card-list .cb-page-record .cb-page-layout-row.cb-page-layout-row-space-between {
        justify-content: space-between !important;
    }

    /* Restore the configured group sizing inside the subpage. Keep the outer
       group containing the nested record compact for parent positioning. */
    #crew-card-list .cb-page-record .cb-page-layout-row > .cb-page-layout-group-main:not(:has(> .cb-page-record)) {
        /* Let the row's configured justify setting position this group. A
           full-width flexing Main group makes wrapped children appear
           left-aligned regardless of Start/Center/End. */
        flex: 0 1 auto !important;
        width: max-content !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    #crew-card-list .cb-page-record .cb-page-layout-row > .cb-page-layout-group-start,
    #crew-card-list .cb-page-record .cb-page-layout-row > .cb-page-layout-group-end {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}


/* Keep wrapped content aligned by its configured layout row at every viewport.
   The row positions its groups; wrapped children within a group use the same
   alignment instead of falling back to the browser's default left alignment. */
.cb-page-layout-row-start > .cb-page-layout-group,
.cb-page-layout-row-start > .cb-page-layout-group > .cb-page-record {
    text-align: left;
}
.cb-page-layout-row-center > .cb-page-layout-group,
.cb-page-layout-row-center > .cb-page-layout-group > .cb-page-record {
    text-align: center;
}
.cb-page-layout-row-end > .cb-page-layout-group,
.cb-page-layout-row-end > .cb-page-layout-group > .cb-page-record {
    text-align: right;
}

/* A wrapped flex group must align each wrapped line according to its row. */
.cb-page-layout-row-start > .cb-page-layout-group {
    justify-content: flex-start;
}
.cb-page-layout-row-center > .cb-page-layout-group {
    justify-content: center;
}
.cb-page-layout-row-end > .cb-page-layout-group {
    justify-content: flex-end;
}

/* Keep these rules identical on mobile and desktop. In particular, don't
   force nested Main groups to a different width/alignment at the breakpoint. */
@media (max-width: 767.98px) {
    .cb-page-layout-row > .cb-page-layout-group {
        text-align: inherit;
    }
    .cb-page-layout-row-start > .cb-page-layout-group {
        justify-content: flex-start !important;
    }
    .cb-page-layout-row-center > .cb-page-layout-group {
        justify-content: center !important;
    }
    .cb-page-layout-row-end > .cb-page-layout-group {
        justify-content: flex-end !important;
    }
    .cb-page-layout-row-start > .cb-page-layout-group .cb-page-layout-group {
        justify-content: flex-start;
    }
    .cb-page-layout-row-center > .cb-page-layout-group .cb-page-layout-group {
        justify-content: center;
    }
    .cb-page-layout-row-end > .cb-page-layout-group .cb-page-layout-group {
        justify-content: flex-end;
    }
}

/* Shared public-listing utilities used by the Crawls discovery page. The
   component classes remain reusable; the page root limits filter/modal rules
   to this page so existing Crew layouts are not affected. */
.cb-crawls-list-page .cb-search-sticky-wrap {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-top: .25rem;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
}
.cb-crawls-list-page .cb-search-sticky-wrap.cb-filter-open {
    position: relative;
    top: auto;
}
.cb-crawls-list-page .cb-search-card {
    box-shadow: 0 .25rem .9rem rgba(0,0,0,.08);
}
.cb-crawls-list-page .cb-record-card .cb-entity-name {
    overflow-wrap: anywhere;
    word-break: normal;
}
.cb-crawls-list-page .cb-mobile-filter { display: none; }
.cb-crawls-list-page .cb-filter-panel {
    margin-top: .75rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.08);
}
.cb-crawls-list-page .cb-filter-section + .cb-filter-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}
.cb-crawls-list-page .cb-filter-option {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    padding: .6rem .7rem;
    border: 1px solid #e9ecef;
    border-radius: .5rem;
    cursor: pointer;
}
.cb-crawls-list-page .cb-filter-option:has(input:checked) {
    border-color: #212529;
    background: #f8f9fa;
}
.cb-crawls-list-page .cb-record-card-meta { overflow-wrap: anywhere; }
.cb-record-card-stats.cb-stats-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: .65rem;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid #dbe5ef;
    color: #64748b;
}
.cb-stats-group .cb-stat-item {
    display: flex;
    flex: 0 0 4.75rem;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: .15rem;
    min-width: 0;
    text-align: center;
}
.cb-stats-group .cb-stat-value {
    color: var(--cb-color-text, #172033);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.cb-stats-group .cb-stat-label {
    color: var(--cb-color-muted, #64748b);
    font-size: var(--cb-font-size-label, .8rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.cb-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
}
.cb-detail-modal.is-open { display: block; }
.cb-detail-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.58);
}
.cb-detail-modal-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(960px,calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.25);
}
.cb-detail-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}
.cb-detail-modal-body { overflow: auto; padding: 0; }
.cb-detail-modal-body > .container {
    width: 100%;
    max-width: none;
    padding: 1rem 1rem 0 !important;
}
.cb-detail-modal-body .cb-card { margin-bottom: 0 !important; }
body.cb-modal-open { overflow: hidden; }
@media (max-width: 991.98px) {
    .cb-crawls-list-page .cb-desktop-filter { display: none; }
    .cb-crawls-list-page .cb-mobile-filter { display: block; }
}
@media (max-width: 767.98px) {
    .cb-crawls-list-page .cb-search-sticky-wrap { top: 0; }
    .cb-crawls-list-page .cb-search-card { padding: .85rem !important; }
    .cb-crawls-list-page .cb-record-card { padding: 1rem !important; }
    .cb-crawls-list-page .cb-entity-name { font-size: 1.15rem; line-height: 1.3; }
    .cb-crawls-list-page .cb-record-card-stats > span { padding: .18rem .35rem; }
}
@media (max-width: 576px) {
    .cb-detail-modal-panel {
        width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
}

/* Keep the configured crawl stats inline, but preserve enough vertical rhythm
   for headings, visibility badges, metadata and section dividers to breathe. */
#crawl-card-list > .cb-list-card > .cb-page-record {
    margin-top: .45rem !important;
    margin-bottom: 0 !important;
}
#crawl-card-list > .cb-list-card > .cb-page-record > .cb-page-section {
    margin-block: 0 !important;
    padding-block: .25rem !important;
}
#crawl-card-list .cb-page-record .cb-page-section-header,
#crawl-card-list .cb-page-record .cb-page-section-body,
#crawl-card-list .cb-page-record .cb-page-section-footer {
    margin-block: 0 !important;
    padding-block: .25rem !important;
}
#crawl-card-list .cb-page-record .cb-page-layout-row {
    margin-block: .1rem !important;
    padding-block: .1rem !important;
    min-height: 0 !important;
}
#crawl-card-list .cb-page-record .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) {
    column-gap: .4rem !important;
    row-gap: .25rem !important;
}
#crawl-card-list .cb-page-record .cb-page-section-footer .cb-field {
    margin-block: .05rem !important;
    padding-block: .05rem !important;
}
@media (max-width: 767.98px) {
    #crawl-card-list > .cb-list-card { padding: .9rem !important; }
    #crawl-card-list .cb-page-record .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) {
        column-gap: .3rem !important;
        row-gap: .25rem !important;
    }
}


/* Crawl List stats use the same stacked value-over-label treatment as Crew List stats. */
#crawl-card-list .cb-list-card .cb-page-section-footer {
    margin-top: .5rem !important;
    padding: .4rem .25rem .05rem !important;
    border-top: 1px solid #dbe5ef !important;
}
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-record { width: 100%; }
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-section-body { padding: 0 !important; }
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-fields-view { gap: 0 !important; }
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-row {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    min-height: 0 !important;
}
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group { gap: .35rem !important; min-height: 0 !important; }
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) {
    display: flex !important;
    flex: 0 1 auto !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    width: max-content !important;
    max-width: 100% !important;
    min-width: 0 !important;
    column-gap: .65rem !important;
    row-gap: .45rem !important;
}
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field {
    display: flex !important;
    flex: 0 0 4.75rem !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .2rem !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 1.1;
}
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field > .cb-field-value {
    order: 0 !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-weight: 600;
}
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field > .cb-field-label {
    order: 1 !important;
    display: block !important;
    visibility: visible !important;
    width: max-content !important;
    max-width: none !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit;
    font-weight: 400;
    line-height: 1.2 !important;
    text-align: center !important;
    text-transform: none !important;
}
#crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) > .cb-field::after {
    content: none !important;
    display: none !important;
}
@media (max-width: 767.98px) {
    #crawl-card-list .cb-list-card .cb-page-section-footer .cb-page-layout-group:has(> .cb-field:nth-child(3)) {
        column-gap: .3rem !important;
        row-gap: .25rem !important;
    }
}


/* Discovery card titles link to the owning Crew Domain. */
.cb-entity-name-link{color:inherit;text-decoration:none;cursor:pointer}
.cb-entity-name-link:hover{text-decoration:underline;text-underline-offset:.12em}
.cb-entity-name-link:focus-visible{outline:2px solid currentColor;outline-offset:3px;border-radius:2px}


/* Restore each Bar List row's configured justification. Counter styling must
   not force unrelated fields (such as location and property details) to center. */
#bar-card-list .cb-page-layout-row.cb-page-layout-row-start {
    justify-content: flex-start !important;
}
#bar-card-list .cb-page-layout-row.cb-page-layout-row-center {
    justify-content: center !important;
}
#bar-card-list .cb-page-layout-row.cb-page-layout-row-end {
    justify-content: flex-end !important;
}
#bar-card-list .cb-page-layout-row.cb-page-layout-row-space-between {
    justify-content: space-between !important;
}

/* Keep the Bar Stats row itself centered, without changing the alignment of
   other configured rows in the Bar card. */
#bar-card-list .cb-page-layout-subpage .cb-page-layout-row.cb-page-layout-row-center {
    justify-content: center !important;
}
