/* =========================================================================
   BidBridge public UI — legacy visual layer adapted to the 2026 design system
   -------------------------------------------------------------------------
   Loaded only by layout/public.blade.php, after design-system.css.
   Rules:
     * only .bb-* selectors (plus the shared footer legal strip);
     * only var(--ds-*) colours, radii, shadows, spacing and motion tokens;
     * no new @keyframes — reuse ds-* primitives;
     * responsive at 1200 / 991 / 760 / 520 and reduced-motion safe.
   ========================================================================= */

.bb-public {
    --bb-content: 1240px;
    --bb-header-height: 72px;
    --bb-section-gap: clamp(40px, 6vw, 76px);
    --bb-card-pad: clamp(18px, 2.2vw, 28px);
    min-height: 100vh;
    background-color: var(--ds-bg-base);
    background-image: radial-gradient(circle at 12% -12%, var(--ds-brand-soft), transparent 42%);
    background-repeat: no-repeat;
    background-size: 100% 760px;
}

.bb-public,
.bb-public button,
.bb-public input,
.bb-public select,
.bb-public textarea {
    font-family: var(--ds-font-sans);
}

.bb-public a { text-decoration: none; }

/* Единый базовый размер для SVG-иконок: компонент <x-bidbridge.icon>
   используется и внутри карточек, и в кнопках, и в пустых состояниях. */
.bb-public .bb-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.bb-public h1,
.bb-public h2,
.bb-public h3,
.bb-public h4 {
    text-wrap: balance;
}

.bb-container {
    width: 100%;
    max-width: var(--bb-content);
    margin-inline: auto;
    padding-inline: clamp(18px, 3.2vw, 32px);
}

.bb-main {
    display: block;
    min-height: 50vh;
    outline: none;
}

/* Accessible skip link: hidden until keyboard focus. */
.bb-skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1200;
    padding: 10px 16px;
    border-radius: var(--ds-radius-sm);
    background: var(--ds-bg-surface);
    color: var(--ds-brand);
    border: 1px solid var(--ds-brand);
    box-shadow: var(--ds-shadow-md);
    font-weight: 600;
    transform: translateY(-160%);
    transition: transform var(--ds-anim-fast) var(--ds-ease);
}
.bb-skip-link:focus { transform: translateY(0); }

/* ------------------------------- Controls -------------------------------- */
.bb-public .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.72rem 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-sm);
    font-size: var(--ds-text-sm);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.bb-public .btn-lg {
    padding: 0.9rem 1.45rem;
    border-radius: var(--ds-radius-md);
    font-size: var(--ds-text-md);
}
.bb-public .btn-block { width: 100%; }
.bb-public .btn .bb-icon { width: 18px; height: 18px; }

.bb-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-sm);
    background: var(--ds-bg-surface);
    color: var(--ds-text-secondary);
    cursor: pointer;
    transition: color var(--ds-anim-fast) var(--ds-ease),
                background-color var(--ds-anim-fast) var(--ds-ease),
                border-color var(--ds-anim-fast) var(--ds-ease),
                transform var(--ds-anim-fast) var(--ds-ease);
}
.bb-icon-btn:hover,
.bb-icon-btn:focus-visible {
    color: var(--ds-brand);
    background: var(--ds-brand-soft);
    border-color: color-mix(in srgb, var(--ds-brand) 32%, var(--ds-border));
}
.bb-icon-btn:active { transform: scale(0.94); }
.bb-icon-btn svg { width: 21px; height: 21px; display: block; }

.bb-public .form-control,
.bb-public .form-select,
.bb-public select,
.bb-public input[type="text"],
.bb-public input[type="email"],
.bb-public input[type="search"],
.bb-public input[type="number"],
.bb-public input[type="tel"],
.bb-public textarea {
    width: 100%;
    padding: 0.68rem 0.82rem;
    font-size: var(--ds-text-sm);
    line-height: 1.35;
    border-radius: var(--ds-radius-sm);
}
.bb-public textarea { min-height: 138px; resize: vertical; }
.bb-public select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.2rem;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.bb-public .form-control:focus,
.bb-public .form-select:focus,
.bb-public select:focus,
.bb-public input:focus,
.bb-public textarea:focus {
    outline: none;
    border-color: var(--ds-brand);
    box-shadow: 0 0 0 3px var(--ds-brand-soft);
}
.bb-form__group { display: grid; gap: 6px; }
.bb-form__label {
    display: block;
    font-size: var(--ds-text-sm);
    font-weight: 600;
    color: var(--ds-text-primary);
}
.bb-form__hint {
    margin: 0;
    font-size: var(--ds-text-xs);
    color: var(--ds-text-muted);
}
.bb-form__error {
    margin: 0;
    font-size: var(--ds-text-xs);
    color: var(--ds-danger);
}
.bb-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.bb-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ds-space-4);
}
.bb-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--ds-text-sm);
    color: var(--ds-text-secondary);
    line-height: 1.45;
}
.bb-check input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: var(--ds-brand);
}
.bb-check a { color: var(--ds-brand); text-decoration: underline; text-underline-offset: 2px; }

/* -------------------------------- Header --------------------------------- */
.bb-header {
    position: sticky;
    top: 0;
    z-index: 1035;
    background: color-mix(in srgb, var(--ds-bg-surface) 88%, transparent);
    border-bottom: 1px solid var(--ds-border);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    transition: box-shadow var(--ds-anim-base) var(--ds-ease),
                background-color var(--ds-anim-base) var(--ds-ease);
}
.bb-header.is-scrolled { box-shadow: var(--ds-shadow-sm); }
html[data-theme="dark"] .bb-header {
    background: color-mix(in srgb, var(--ds-bg-elevated) 88%, transparent);
}

.bb-header__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--bb-header-height);
}

.bb-header .brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--ds-text-primary);
}
.bb-header .brand-logo img.logo-abbr,
.bb-header .brand-logo img.brand-title,
.bb-header .brand-logo img.logo-compact { display: none; }
.bb-header .brand-logo img.logo-abbr:first-child {
    display: block;
    height: 38px;
    width: auto;
    max-width: 168px;
    object-fit: contain;
}
.bb-header .brand-mark { width: 38px; height: 38px; }
.bb-header .brand-name { font-size: 20px; }
.bb-header .brand-tagline { font-size: 9px; }

.bb-header__nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: clamp(8px, 2vw, 26px);
}
.bb-header__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: var(--ds-radius-pill);
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    font-weight: 600;
    white-space: nowrap;
    transition: color var(--ds-anim-fast) var(--ds-ease),
                background-color var(--ds-anim-fast) var(--ds-ease);
}
.bb-header__link:hover,
.bb-header__link:focus-visible {
    color: var(--ds-brand);
    background: var(--ds-brand-soft);
}
.bb-header__link.is-active {
    color: var(--ds-brand);
    background: var(--ds-brand-soft);
}
.bb-header__link.is-active::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--ds-brand);
    transform-origin: left;
    animation: ds-underline var(--ds-anim-base) var(--ds-ease-out) both;
}

.bb-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.bb-lang {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-pill);
    background: var(--ds-bg-subtle);
}
.bb-lang__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 30px;
    padding: 0 8px;
    border-radius: var(--ds-radius-pill);
    color: var(--ds-text-secondary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: color var(--ds-anim-fast) var(--ds-ease),
                background-color var(--ds-anim-fast) var(--ds-ease);
}
.bb-lang__item:hover,
.bb-lang__item:focus-visible { color: var(--ds-brand); background: var(--ds-brand-soft); }
.bb-lang__item.is-active {
    color: var(--ds-brand-contrast);
    background: var(--ds-brand);
}
.bb-header__auth { display: flex; align-items: center; gap: 10px; }
.bb-header__login {
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    font-weight: 600;
    padding: 8px 4px;
}
.bb-header__login:hover,
.bb-header__login:focus-visible { color: var(--ds-brand); }
.bb-header__cta { min-height: 40px; }

.bb-menu-toggle { display: none; }
.bb-menu-toggle__close { display: none; }
.bb-header.is-open .bb-menu-toggle__open { display: none; }
.bb-header.is-open .bb-menu-toggle__close { display: block; }

.bb-mobile {
    display: none;
    border-top: 1px solid var(--ds-border);
    background: var(--ds-bg-surface);
}
.bb-header.is-open .bb-mobile { display: block; }
.bb-mobile__inner {
    display: grid;
    gap: 4px;
    padding-block: 12px 18px;
}
.bb-mobile__link {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: var(--ds-radius-sm);
    color: var(--ds-text-primary);
    font-weight: 600;
}
.bb-mobile__link:hover,
.bb-mobile__link:focus-visible,
.bb-mobile__link.is-active {
    color: var(--ds-brand);
    background: var(--ds-brand-soft);
}
.bb-mobile__divider { height: 1px; margin: 8px 0; background: var(--ds-border); }
.bb-mobile__lang {
    display: flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-pill);
    background: var(--ds-bg-subtle);
    align-self: flex-start;
}
.bb-mobile__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.bb-mobile__actions .btn:only-child { grid-column: 1 / -1; }

/* --------------------------------- Hero ---------------------------------- */
/* Decorative SVG layers are anchored to the block they decorate and always
   sit behind the real content (see .bb-art-* rules below). */
.bb-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: clamp(26px, 4vw, 56px);
    align-items: center;
    padding-block: clamp(38px, 6vw, 82px) clamp(26px, 4vw, 54px);
}
.bb-hero > :not(.bb-hero-art) { position: relative; z-index: 1; }
.bb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid color-mix(in srgb, var(--ds-brand) 26%, var(--ds-border));
    border-radius: var(--ds-radius-pill);
    background: var(--ds-brand-soft);
    color: var(--ds-brand-hover);
    font-size: var(--ds-text-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
}
html[data-theme="dark"] .bb-eyebrow { color: var(--ds-brand-hover); }
.bb-eyebrow__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ds-success);
    box-shadow: 0 0 0 3px var(--ds-success-soft);
    animation: ds-pulse-dot 2s ease-in-out infinite;
}
.bb-hero__title {
    margin: 18px 0 16px;
    font-size: clamp(2.05rem, 1.1rem + 3.25vw, 3.7rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: var(--ds-text-primary);
}
.bb-hero__lead {
    max-width: 62ch;
    margin: 0;
    color: var(--ds-text-secondary);
    font-size: clamp(15px, 1.15vw, 18px);
    line-height: 1.6;
}
.bb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}
.bb-hero__note {
    display: flex;
    gap: 10px;
    max-width: 64ch;
    margin: 22px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    background: color-mix(in srgb, var(--ds-bg-surface) 72%, transparent);
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    line-height: 1.5;
}
.bb-hero__note .bb-icon { flex: 0 0 auto; color: var(--ds-brand); margin-top: 2px; }

.bb-workflow {
    position: relative;
    overflow: hidden;
    padding: var(--bb-card-pad);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-md);
}
.bb-workflow::before {
    content: "";
    position: absolute;
    inset: -40% -30% auto auto;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--ds-brand-soft), transparent 68%);
    pointer-events: none;
}
.bb-workflow__head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
}
.bb-workflow__title { margin: 0; font-size: var(--ds-text-xl); }
.bb-flow {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 15px 0;
    border-top: 1px dashed var(--ds-border);
}
.bb-flow__num {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: var(--ds-radius-md);
    background: var(--ds-brand-soft);
    color: var(--ds-brand);
    font-family: var(--ds-font-mono);
    font-size: 12px;
    font-weight: 700;
}
.bb-flow__title { margin: 0 0 3px; font-size: var(--ds-text-md); font-weight: 700; }
.bb-flow__text { margin: 0; color: var(--ds-text-secondary); font-size: var(--ds-text-sm); line-height: 1.5; }
.bb-workflow__foot {
    position: relative;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--ds-border);
    color: var(--ds-text-muted);
    font-size: var(--ds-text-xs);
    line-height: 1.5;
}

/* --------------------------------- Stats --------------------------------- */
.bb-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--ds-space-4);
    padding-bottom: clamp(12px, 2vw, 22px);
}
.bb-stat {
    display: grid;
    gap: 4px;
    padding: 18px 20px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
}
.bb-stat__value {
    font-family: var(--ds-font-display);
    font-size: clamp(26px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ds-text-primary);
    font-variant-numeric: tabular-nums;
}
.bb-stat__label { font-size: var(--ds-text-sm); font-weight: 600; color: var(--ds-text-primary); }
.bb-stat__note { font-size: var(--ds-text-xs); color: var(--ds-text-muted); }

/* ------------------------- Stat tiles animated icons ---------------------- */
.bb-stat__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    border-radius: var(--ds-radius-sm);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--ds-brand) 12%, transparent) 0%,
        color-mix(in srgb, var(--ds-info) 8%, transparent) 100%);
}
.bb-stat__icon-svg {
    width: 24px;
    height: 24px;
    color: var(--ds-brand);
}
.bb-stat__icon-svg path {
    transition: opacity 0.3s;
}
.bb-stat__icon-svg circle {
    transition: transform 0.3s, opacity 0.3s;
}

/* Tender icon: check pulse */
@keyframes bb-stat-tender-check {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.bb-stat__icon--tender .bb-stat__icon-svg path:last-of-type {
    animation: bb-stat-tender-check 2.4s ease-in-out infinite;
}

/* Suppliers icon: smoke rise */
@keyframes bb-stat-smoke {
    0%   { opacity: 0; transform: translateY(0); }
    30%  { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-6px); }
}
.bb-stat__icon--suppliers .bb-stat__icon-svg path[opacity=".7"] {
    animation: bb-stat-smoke 3.2s ease-out infinite;
}

/* Offers icon: price circle pulse */
@keyframes bb-stat-offers-pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.12); opacity: 1; }
}
.bb-stat__icon--offers .bb-stat__icon-svg circle:first-of-type {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-stat-offers-pulse 2.8s ease-in-out infinite;
}

/* Cities icon: pin pulse */
@keyframes bb-stat-cities-pin {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}
.bb-stat__icon--cities .bb-stat__icon-svg circle {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-stat-cities-pin 2.2s ease-in-out infinite;
}
.bb-stat__icon--cities .bb-stat__icon-svg circle:nth-of-type(2) {
    animation-delay: 1.1s;
}

html[data-theme="dark"] .bb-stat__icon {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--ds-brand) 20%, transparent) 0%,
        color-mix(in srgb, var(--ds-info) 12%, transparent) 100%);
}

@media (prefers-reduced-motion: reduce) {
    .bb-stat__icon--tender .bb-stat__icon-svg path,
    .bb-stat__icon--suppliers .bb-stat__icon-svg path,
    .bb-stat__icon--offers .bb-stat__icon-svg circle,
    .bb-stat__icon--cities .bb-stat__icon-svg circle {
        animation: none;
    }
}

/* -------------------------------- Sections ------------------------------- */
.bb-section { padding-block: var(--bb-section-gap); }
.bb-section--tight { padding-block: clamp(30px, 4vw, 54px); }
.bb-section--paper {
    border-block: 1px solid var(--ds-border);
    background: color-mix(in srgb, var(--ds-bg-surface) 54%, transparent);
}
.bb-section__head {
    max-width: 760px;
    margin-bottom: clamp(22px, 3vw, 38px);
}
.bb-section__title {
    margin: 0;
    font-size: clamp(1.65rem, 1.1rem + 1.7vw, 2.5rem);
    letter-spacing: -0.025em;
}
.bb-section__lead {
    margin: 10px 0 0;
    color: var(--ds-text-secondary);
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.55;
}
.bb-grid { display: grid; gap: var(--ds-space-5); position: relative; }
.bb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bb-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bb-mb-5 { margin-bottom: var(--ds-space-5); }
.bb-mt-5 { margin-top: var(--ds-space-5); }

.bb-tile {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: var(--bb-card-pad);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
    transition: transform var(--ds-anim-base) var(--ds-ease),
                box-shadow var(--ds-anim-base) var(--ds-ease),
                border-color var(--ds-anim-base) var(--ds-ease);
}
.bb-tile__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--ds-radius-md);
    background: var(--ds-bg-subtle);
    color: var(--ds-brand);
    font-family: var(--ds-font-mono);
    font-size: 12px;
    font-weight: 700;
}
.bb-tile__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--ds-radius-md);
    background: var(--ds-brand-soft);
    color: var(--ds-brand);
}
.bb-tile__icon .bb-icon { width: 22px; height: 22px; }

/* Role card: icon → badge gap */
.bb-role-card .bb-tile__icon {
    margin-bottom: 10px;
}
.bb-tile__title { margin: 2px 0 0; font-size: var(--ds-text-lg); }
.bb-tile__text { margin: 0; color: var(--ds-text-secondary); font-size: var(--ds-text-sm); line-height: 1.55; }

.bb-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-5); }
.bb-role-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: clamp(22px, 3vw, 36px);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
}
.bb-role-card--accent {
    background:
        radial-gradient(circle at 100% 0%, var(--ds-brand-soft), transparent 45%),
        var(--ds-bg-surface);
    border-color: color-mix(in srgb, var(--ds-brand) 26%, var(--ds-border));
}
.bb-role-card__title { margin: 14px 0 8px; font-size: clamp(1.35rem, 1rem + 1vw, 1.85rem); }
.bb-role-card__lead { margin: 0; color: var(--ds-text-secondary); font-size: var(--ds-text-sm); line-height: 1.55; }
.bb-role-card__list {
    display: grid;
    gap: 0;
    margin: 20px 0 24px;
    padding: 0;
    list-style: none;
}
.bb-role-card__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ds-border);
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    line-height: 1.45;
}
.bb-role-card__list li:last-child { border-bottom: 0; }
.bb-role-card__list .bb-icon { flex: 0 0 auto; margin-top: 2px; color: var(--ds-success); }
.bb-role-card__actions { margin-top: auto; }

/* ---------------------- Role card decorative art ------------------------ */
.bb-role-card__art {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: clamp(200px, 55%, 320px);
    height: auto;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
}

/* Ensure content stays above art */
.bb-role-card > :not(.bb-role-card__art) {
    position: relative;
    z-index: 1;
}

/* Route line dash animation */
@keyframes bb-role-dash-flow {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -24; }
}
.bb-role-art__route {
    animation: bb-role-dash-flow 6s linear infinite;
}

/* Cargo container travelling along the route */
@keyframes bb-role-cargo-buyer {
    0%    { transform: translate(60px, 50px); opacity: 0; }
    5%    { opacity: 0.55; }
    25%   { transform: translate(150px, 74px); }
    50%   { transform: translate(210px, 94px); }
    75%   { transform: translate(250px, 104px); }
    95%   { opacity: 0.55; }
    100%  { transform: translate(290px, 118px); opacity: 0; }
}
@keyframes bb-role-cargo-supplier {
    0%    { transform: translate(68px, 110px); opacity: 0; }
    5%    { opacity: 0.5; }
    25%   { transform: translate(140px, 100px); }
    50%   { transform: translate(200px, 110px); }
    75%   { transform: translate(250px, 96px); }
    95%   { opacity: 0.5; }
    100%  { transform: translate(300px, 95px); opacity: 0; }
}
.bb-role-card--accent .bb-role-art__route { animation: bb-role-dash-flow 7s linear infinite; }

/* Cargo per card type */
.bb-role-card .bb-role-art__cargo { animation: bb-role-cargo-buyer 8s linear infinite; }
.bb-role-card--accent .bb-role-art__cargo { animation: bb-role-cargo-supplier 8s linear infinite; }

/* Document pulse */
@keyframes bb-role-doc-pulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.35; }
}
.bb-role-art__doc {
    animation: bb-role-doc-pulse 4s ease-in-out infinite;
}

/* Smoke rise */
@keyframes bb-role-smoke {
    0%   { opacity: 0; transform: translateY(0); }
    40%  { opacity: 0.15; }
    100% { opacity: 0; transform: translateY(-8px); }
}
.bb-role-art__smoke {
    animation: bb-role-smoke 3.5s ease-out infinite;
    transform-box: fill-box;
    transform-origin: bottom;
}

/* Factory building subtle pulse */
@keyframes bb-role-factory-pulse {
    0%, 100% { opacity: 0.18; }
    50% { opacity: 0.3; }
}
.bb-role-art__factory {
    animation: bb-role-factory-pulse 5s ease-in-out infinite;
}

/* Pin pulse */
@keyframes bb-role-pin-pulse {
    0%, 100% { transform: scale(1); opacity: 0.25; }
    50% { transform: scale(1.2); opacity: 0.4; }
}
.bb-role-art__pin {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-role-pin-pulse 3s ease-in-out infinite;
}
.bb-role-art__pin-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-role-pin-pulse 3s ease-in-out infinite;
}

html[data-theme="dark"] .bb-role-card__art { opacity: 0.65; }

@media (prefers-reduced-motion: reduce) {
    .bb-role-art__route,
    .bb-role-art__cargo,
    .bb-role-art__doc,
    .bb-role-art__smoke,
    .bb-role-art__factory,
    .bb-role-art__pin,
    .bb-role-art__pin-dot { animation: none !important; }
}

.bb-cta-band {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(24px, 4vw, 44px);
    border: 1px solid color-mix(in srgb, var(--ds-brand) 30%, var(--ds-border));
    border-radius: var(--ds-radius-lg);
    background:
        radial-gradient(circle at 0% 100%, var(--ds-brand-soft), transparent 50%),
        var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-md);
}
.bb-cta-band__title {
    margin: 0;
    font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem);
    position: relative;
    z-index: 1;
}
.bb-cta-band__lead {
    margin: 8px 0 0;
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    position: relative;
    z-index: 1;
}

/* ---------------------------- Home unified background ----------------------
   Full-page animated SVG spanning all sections. Theme: CN↔RU trade route
   with pulsing nodes, flowing threads, and floating data particles.
   ------------------------------------------------------------------------- */
.bb-home-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.bb-home-bg__svg {
    width: 100%;
    height: 100%;
    display: block;
}
/* Ensure all sections sit above the background */
.bb-section {
    position: relative;
    z-index: 1;
}

/* Main route dash animation */
@keyframes bb-bg-route-dash {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -40; }
}
.bb-home-bg__route {
    animation: bb-bg-route-dash 12s linear infinite;
}
.bb-home-bg__route-dash {
    animation: bb-bg-route-dash 18s linear infinite;
}
.bb-home-bg__route-secondary {
    animation: bb-bg-route-dash 25s linear infinite;
}

/* Major node pulse */
@keyframes bb-bg-node-pulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.15); opacity: 0.35; }
}
.bb-home-bg__node {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-bg-node-pulse 5s ease-in-out infinite;
}
.bb-home-bg__node--cn-dot,
.bb-home-bg__node--ru-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-bg-node-pulse 5s ease-in-out infinite;
}
.bb-home-bg__node--ru,
.bb-home-bg__node--ru-dot {
    animation-delay: 2.5s;
}

/* Waypoint pulse */
@keyframes bb-bg-waypoint-pulse {
    0%, 100% { transform: scale(1); opacity: 0.12; }
    50% { transform: scale(1.25); opacity: 0.25; }
}
.bb-home-bg__waypoint {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-bg-waypoint-pulse 4s ease-in-out infinite;
}
.bb-home-bg__waypoint:nth-of-type(2) { animation-delay: 1s; }
.bb-home-bg__waypoint:nth-of-type(3) { animation-delay: 2s; }
.bb-home-bg__waypoint:nth-of-type(4) { animation-delay: 3s; }

/* Floating particles */
@keyframes bb-bg-float {
    0%, 100% { transform: translate(0, 0); opacity: 0.1; }
    25% { transform: translate(15px, -20px); opacity: 0.18; }
    50% { transform: translate(25px, -10px); opacity: 0.12; }
    75% { transform: translate(10px, -25px); opacity: 0.15; }
}
.bb-home-bg__particle {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-bg-float 10s ease-in-out infinite;
}
.bb-home-bg__particle:nth-of-type(2) { animation-delay: 1.5s; animation-duration: 12s; }
.bb-home-bg__particle:nth-of-type(3) { animation-delay: 3s; animation-duration: 14s; }
.bb-home-bg__particle:nth-of-type(4) { animation-delay: 4.5s; animation-duration: 11s; }
.bb-home-bg__particle:nth-of-type(5) { animation-delay: 6s; animation-duration: 13s; }
.bb-home-bg__particle:nth-of-type(6) { animation-delay: 7.5s; animation-duration: 15s; }
.bb-home-bg__particle:nth-of-type(7) { animation-delay: 9s; animation-duration: 12s; }
.bb-home-bg__particle:nth-of-type(8) { animation-delay: 10.5s; animation-duration: 14s; }

/* Connection lines fade */
@keyframes bb-bg-connection-fade {
    0%, 100% { opacity: 0.04; }
    50% { opacity: 0.1; }
}
.bb-home-bg__connection {
    animation: bb-bg-connection-fade 6s ease-in-out infinite;
}
.bb-home-bg__connection:nth-of-type(2) { animation-delay: 1.5s; }
.bb-home-bg__connection:nth-of-type(3) { animation-delay: 3s; }
.bb-home-bg__connection:nth-of-type(4) { animation-delay: 4.5s; }
.bb-home-bg__connection:nth-of-type(5) { animation-delay: 6s; }
.bb-home-bg__connection:nth-of-type(6) { animation-delay: 7.5s; }

/* Dark theme adjustments */
html[data-theme="dark"] .bb-home-bg__svg { opacity: 0.6; }
html[data-theme="dark"] .bb-home-bg__route { opacity: 0.18; }
html[data-theme="dark"] .bb-home-bg__route-dash { opacity: 0.15; }
html[data-theme="dark"] .bb-home-bg__route-secondary { opacity: 0.1; }
html[data-theme="dark"] .bb-home-bg__node { opacity: 0.25; }
html[data-theme="dark"] .bb-home-bg__node--cn-dot,
html[data-theme="dark"] .bb-home-bg__node--ru-dot { opacity: 0.4; }
html[data-theme="dark"] .bb-home-bg__waypoint { opacity: 0.2; }
html[data-theme="dark"] .bb-home-bg__particle { opacity: 0.15; }
html[data-theme="dark"] .bb-home-bg__connection { opacity: 0.08; }

@media (prefers-reduced-motion: reduce) {
    .bb-home-bg__route,
    .bb-home-bg__route-dash,
    .bb-home-bg__route-secondary,
    .bb-home-bg__node,
    .bb-home-bg__node--cn-dot,
    .bb-home-bg__node--ru-dot,
    .bb-home-bg__waypoint,
    .bb-home-bg__particle,
    .bb-home-bg__connection {
        animation: none !important;
    }
}

/* ----------------------------- Tender cards ------------------------------ */
.bb-tender-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.bb-tender-list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.bb-tender-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    min-height: 260px;
    padding: clamp(18px, 2.2vw, 24px);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
    color: var(--ds-text-primary);
    transition: transform var(--ds-anim-base) var(--ds-ease),
                box-shadow var(--ds-anim-base) var(--ds-ease),
                border-color var(--ds-anim-base) var(--ds-ease);
}
a.bb-tender-card:hover,
a.bb-tender-card:focus-visible {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--ds-brand) 34%, var(--ds-border));
    box-shadow: var(--ds-shadow-md);
    color: var(--ds-text-primary);
}
.bb-tender-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.bb-tender-card__id {
    color: var(--ds-text-muted);
    font-family: var(--ds-font-mono);
    font-size: 11px;
    letter-spacing: 0.02em;
}
.bb-tender-card__title {
    margin: 0;
    font-size: var(--ds-text-lg);
    line-height: 1.28;
}
.bb-tender-card__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    line-height: 1.5;
}
.bb-tender-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--ds-border);
}
.bb-meta {
    display: grid;
    grid-template-columns: 26px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    min-width: 0;
}
.bb-meta__icon { grid-column: 1; grid-row: 1 / span 2; }
.bb-meta__label { grid-column: 2; grid-row: 1; }
.bb-meta__value { grid-column: 2; grid-row: 2; }
.bb-meta__label {
    color: var(--ds-text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.bb-meta__value {
    overflow: hidden;
    color: var(--ds-text-primary);
    font-size: var(--ds-text-sm);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Meta icon wrapper */
.bb-meta__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--ds-radius-sm);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--ds-info) 10%, transparent) 0%,
        color-mix(in srgb, var(--ds-brand) 8%, transparent) 100%);
    margin-bottom: 2px;
}
.bb-meta__icon-svg {
    width: 16px;
    height: 16px;
    color: var(--ds-info);
}

/* Tender card decorative art */
.bb-tender-card__art {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: clamp(160px, 50%, 260px);
    height: auto;
    z-index: 0;
    pointer-events: none;
    opacity: 0.75;
}
.bb-tender-card > :not(.bb-tender-card__art) {
    position: relative;
    z-index: 1;
}

/* Route dash animation */
@keyframes bb-tender-dash-flow {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -24; }
}
.bb-tender-art__route {
    animation: bb-tender-dash-flow 5s linear infinite;
}

/* Pulse rings */
@keyframes bb-tender-pulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.25); opacity: 0.4; }
}
.bb-tender-art__pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-tender-pulse 3s ease-in-out infinite;
}
.bb-tender-art__pulse-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-tender-pulse 3s ease-in-out infinite;
}
.bb-tender-art__pulse-dot:nth-of-type(2) { animation-delay: 1.5s; }

html[data-theme="dark"] .bb-tender-card__art { opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
    .bb-tender-art__route,
    .bb-tender-art__pulse,
    .bb-tender-art__pulse-dot { animation: none !important; }
}
.bb-tender-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 2px;
}
.bb-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ds-brand);
    font-size: var(--ds-text-sm);
    font-weight: 700;
}
.bb-link-arrow .bb-icon { width: 16px; height: 16px; transition: transform var(--ds-anim-fast) var(--ds-ease); }
a.bb-tender-card:hover .bb-link-arrow .bb-icon { transform: translateX(3px); }

/* -------------------------------- Badges --------------------------------- */
.bb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-pill);
    font-size: var(--ds-text-xs);
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}
.bb-badge--open {
    background: var(--ds-success-soft);
    border-color: color-mix(in srgb, var(--ds-success) 30%, transparent);
    color: var(--ds-success);
}
.bb-badge--closed {
    background: var(--ds-bg-subtle);
    border-color: var(--ds-border);
    color: var(--ds-text-secondary);
}
.bb-badge--soft {
    background: var(--ds-brand-soft);
    border-color: color-mix(in srgb, var(--ds-brand) 28%, transparent);
    color: var(--ds-brand-hover);
}
.bb-badge--warning {
    background: var(--ds-warning-soft);
    border-color: color-mix(in srgb, var(--ds-warning) 30%, transparent);
    color: var(--ds-warning);
}
.bb-badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: ds-pulse-dot 2s ease-in-out infinite;
}

/* ------------------------------ Page header ------------------------------ */
.bb-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-block: clamp(26px, 4vw, 52px) clamp(16px, 2.4vw, 28px);
}
.bb-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    color: var(--ds-text-muted);
    font-size: var(--ds-text-xs);
}
.bb-breadcrumb a { color: var(--ds-text-secondary); font-weight: 600; }
.bb-breadcrumb a:hover,
.bb-breadcrumb a:focus-visible { color: var(--ds-brand); }
.bb-breadcrumb li + li::before { content: "/"; margin-right: 7px; color: var(--ds-text-muted); }
.bb-page-head__title {
    margin: 0;
    font-size: clamp(1.8rem, 1.25rem + 2vw, 2.9rem);
    letter-spacing: -0.03em;
}
.bb-page-head__lead {
    max-width: 72ch;
    margin: 10px 0 0;
    color: var(--ds-text-secondary);
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.55;
}

/* -------------------------------- Catalog -------------------------------- */
.bb-catalog {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    gap: var(--ds-space-5);
    align-items: start;
    padding-bottom: var(--bb-section-gap);
}
.bb-filter {
    position: sticky;
    top: calc(var(--bb-header-height) + 16px);
    display: grid;
    gap: var(--ds-space-4);
    padding: 20px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
}
.bb-filter__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bb-filter__title { margin: 0; font-size: var(--ds-text-md); }
.bb-filter__reset { font-size: var(--ds-text-xs); font-weight: 600; color: var(--ds-text-secondary); }
.bb-filter__reset:hover,
.bb-filter__reset:focus-visible { color: var(--ds-brand); }
.bb-filter__actions { display: grid; gap: 8px; }
.bb-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: var(--ds-space-4);
}
.bb-toolbar__title { margin: 0; font-size: var(--ds-text-lg); }
.bb-toolbar__count { color: var(--ds-text-muted); font-size: var(--ds-text-sm); }
.bb-toolbar__sort { display: flex; align-items: center; gap: 9px; }
.bb-toolbar__sort label { margin: 0; color: var(--ds-text-muted); font-size: var(--ds-text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.bb-toolbar__sort select { width: auto; min-width: 190px; }
.bb-filter-note {
    display: flex;
    gap: 10px;
    margin-top: var(--ds-space-4);
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--ds-info) 26%, var(--ds-border));
    border-radius: var(--ds-radius-md);
    background: var(--ds-info-soft);
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-xs);
    line-height: 1.5;
}
.bb-filter-note .bb-icon { flex: 0 0 auto; color: var(--ds-info); margin-top: 1px; }

.bb-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: var(--ds-space-6);
}
.bb-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-sm);
    background: var(--ds-bg-surface);
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    font-weight: 600;
    transition: color var(--ds-anim-fast) var(--ds-ease),
                background-color var(--ds-anim-fast) var(--ds-ease),
                border-color var(--ds-anim-fast) var(--ds-ease);
}
.bb-pagination__item:hover,
.bb-pagination__item:focus-visible {
    color: var(--ds-brand);
    background: var(--ds-brand-soft);
    border-color: var(--ds-brand);
}
.bb-pagination__item.is-active {
    color: var(--ds-brand-contrast);
    background: var(--ds-brand);
    border-color: var(--ds-brand);
}
.bb-pagination__item.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}
.bb-pagination__gap { padding: 0 4px; color: var(--ds-text-muted); }

/* --------------------------------- Empty --------------------------------- */
.bb-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: clamp(34px, 6vw, 64px) 24px;
    border: 1px dashed var(--ds-border-strong);
    border-radius: var(--ds-radius-lg);
    background: color-mix(in srgb, var(--ds-bg-surface) 60%, transparent);
    text-align: center;
}
.bb-empty__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: var(--ds-radius-lg);
    background: var(--ds-brand-soft);
    color: var(--ds-brand);
}
.bb-empty__icon .bb-icon { width: 30px; height: 30px; }
.bb-empty__title { margin: 6px 0 0; font-size: var(--ds-text-lg); }
.bb-empty__text { max-width: 46ch; margin: 0; color: var(--ds-text-secondary); font-size: var(--ds-text-sm); line-height: 1.5; }

/* ----------------------------- Tender detail ----------------------------- */
.bb-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.8fr);
    gap: var(--ds-space-5);
    align-items: start;
    padding-bottom: var(--bb-section-gap);
}
.bb-detail__hero {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: clamp(22px, 3vw, 36px);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background:
        radial-gradient(circle at 100% 0%, var(--ds-brand-soft), transparent 48%),
        var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
}
.bb-detail__hero-title {
    margin: 10px 0 8px;
    font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.65rem);
    letter-spacing: -0.03em;
}
.bb-detail__hero-lead {
    max-width: 70ch;
    margin: 0;
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    line-height: 1.55;
}
.bb-detail__hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.bb-detail__col { display: grid; gap: var(--ds-space-5); min-width: 0; }

.bb-panel {
    padding: clamp(20px, 2.6vw, 30px);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
}
.bb-panel__title { margin: 0 0 14px; font-size: var(--ds-text-xl); }
.bb-panel__lead { margin: -6px 0 16px; color: var(--ds-text-secondary); font-size: var(--ds-text-sm); line-height: 1.55; }
.bb-prose { color: var(--ds-text-secondary); font-size: var(--ds-text-sm); line-height: 1.7; }
.bb-prose p { margin: 0 0 12px; }
.bb-prose p:last-child { margin-bottom: 0; }

.bb-summary { display: grid; gap: 0; }
.bb-summary__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 0;
    border-bottom: 1px solid var(--ds-border);
    font-size: var(--ds-text-sm);
}
.bb-summary__row:last-child { border-bottom: 0; padding-bottom: 0; }
.bb-summary__row dt { color: var(--ds-text-muted); font-weight: 500; }
.bb-summary__row dd {
    margin: 0;
    color: var(--ds-text-primary);
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.bb-gated {
    padding: 20px;
    border: 1px dashed color-mix(in srgb, var(--ds-brand) 38%, var(--ds-border));
    border-radius: var(--ds-radius-md);
    background: var(--ds-brand-soft);
}
.bb-gated__head { display: flex; gap: 12px; align-items: flex-start; }
.bb-gated__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: var(--ds-radius-md);
    background: var(--ds-bg-surface);
    color: var(--ds-brand);
    box-shadow: var(--ds-shadow-sm);
}
.bb-gated__icon .bb-icon { width: 21px; height: 21px; }
.bb-gated__title { margin: 0 0 4px; font-size: var(--ds-text-lg); }
.bb-gated__text { margin: 0; color: var(--ds-text-secondary); font-size: var(--ds-text-sm); line-height: 1.55; }
.bb-gated__list {
    display: grid;
    gap: 8px;
    margin: 16px 0 18px;
    padding: 0;
    list-style: none;
}
.bb-gated__list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    line-height: 1.45;
}
.bb-gated__list .bb-icon { flex: 0 0 auto; margin-top: 2px; color: var(--ds-success); }

.bb-protected {
    display: flex;
    gap: 12px;
    padding: 15px;
    border: 1px solid color-mix(in srgb, var(--ds-info) 28%, var(--ds-border));
    border-radius: var(--ds-radius-md);
    background: var(--ds-info-soft);
}
.bb-protected .bb-icon { flex: 0 0 auto; color: var(--ds-info); margin-top: 2px; }
.bb-protected__title { margin: 0 0 3px; font-size: var(--ds-text-sm); font-weight: 700; }
.bb-protected__text { margin: 0; color: var(--ds-text-secondary); font-size: var(--ds-text-xs); line-height: 1.5; }

.bb-steps { display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: bb-step; }
.bb-steps li {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 0 0 16px 38px;
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-sm);
    line-height: 1.45;
}
.bb-steps li::before {
    counter-increment: bb-step;
    content: counter(bb-step);
    position: absolute;
    left: 0;
    top: -2px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ds-brand-soft);
    color: var(--ds-brand);
    font-family: var(--ds-font-mono);
    font-size: 11px;
    font-weight: 700;
}
.bb-steps li::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 2px;
    width: 1px;
    background: var(--ds-border);
}
.bb-steps li:last-child { padding-bottom: 0; }
.bb-steps li:last-child::after { display: none; }

/* -------------------------------- Contacts ------------------------------- */
.bb-contact {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: var(--ds-space-5);
    align-items: start;
    padding-bottom: var(--bb-section-gap);
}
.bb-form { display: grid; gap: var(--ds-space-4); }
.bb-form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.bb-form__submit .bb-form__hint { flex: 1 1 220px; }
.bb-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    font-size: var(--ds-text-sm);
    line-height: 1.5;
}
.bb-alert--success {
    border-color: color-mix(in srgb, var(--ds-success) 30%, var(--ds-border));
    background: var(--ds-success-soft);
    color: var(--ds-success);
}
.bb-alert--error {
    border-color: color-mix(in srgb, var(--ds-danger) 30%, var(--ds-border));
    background: var(--ds-danger-soft);
    color: var(--ds-danger);
}
.bb-contact__list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.bb-contact__item { display: flex; gap: 12px; align-items: flex-start; }
.bb-contact__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--ds-radius-md);
    background: var(--ds-brand-soft);
    color: var(--ds-brand);
}
.bb-contact__icon .bb-icon { width: 20px; height: 20px; }
.bb-contact__label { color: var(--ds-text-muted); font-size: var(--ds-text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.bb-contact__value { color: var(--ds-text-primary); font-size: var(--ds-text-sm); font-weight: 600; overflow-wrap: anywhere; }
.bb-contact__value a { color: var(--ds-brand); }
.bb-quick {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}
.bb-quick a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    background: var(--ds-bg-subtle);
    color: var(--ds-text-primary);
    transition: border-color var(--ds-anim-fast) var(--ds-ease),
                background-color var(--ds-anim-fast) var(--ds-ease);
}
.bb-quick a:hover,
.bb-quick a:focus-visible {
    border-color: var(--ds-brand);
    background: var(--ds-brand-soft);
}
.bb-quick__title { display: block; font-size: var(--ds-text-sm); font-weight: 600; }
.bb-quick__note { display: block; color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
.bb-quick .bb-icon { color: var(--ds-brand); }

.bb-faq { display: grid; gap: 10px; }
.bb-faq details {
    padding: 0;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
}
.bb-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    cursor: pointer;
    color: var(--ds-text-primary);
    font-size: var(--ds-text-sm);
    font-weight: 600;
    list-style: none;
}
.bb-faq summary::-webkit-details-marker { display: none; }
.bb-faq summary .bb-icon { flex: 0 0 auto; color: var(--ds-text-muted); transition: transform var(--ds-anim-fast) var(--ds-ease), color var(--ds-anim-fast) var(--ds-ease); }
.bb-faq details[open] summary { color: var(--ds-brand); }
.bb-faq details[open] summary .bb-icon { transform: rotate(45deg); color: var(--ds-brand); }
.bb-faq__body { padding: 0 18px 16px; color: var(--ds-text-secondary); font-size: var(--ds-text-sm); line-height: 1.55; }

/* --------------------------------- Legal --------------------------------- */
.bb-legal {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: var(--ds-space-5);
    align-items: start;
    padding-bottom: var(--bb-section-gap);
}
.bb-legal__toc {
    position: sticky;
    top: calc(var(--bb-header-height) + 16px);
    padding: 18px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
}
.bb-legal__toc-title { margin: 0 0 10px; font-size: var(--ds-text-sm); }
.bb-legal__toc nav { display: grid; gap: 2px; }
.bb-legal__toc a {
    display: block;
    padding: 7px 9px;
    border-radius: var(--ds-radius-sm);
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-xs);
    line-height: 1.4;
}
.bb-legal__toc a:hover,
.bb-legal__toc a:focus-visible { color: var(--ds-brand); background: var(--ds-brand-soft); }
.bb-legal__body {
    padding: clamp(20px, 3vw, 36px);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg-surface);
    box-shadow: var(--ds-shadow-sm);
}
.bb-legal__section { padding: 22px 0; border-bottom: 1px solid var(--ds-border); scroll-margin-top: calc(var(--bb-header-height) + 20px); }
.bb-legal__section:first-child { padding-top: 0; }
.bb-legal__section:last-child { padding-bottom: 0; border-bottom: 0; }
.bb-legal__section h2 { margin: 0 0 12px; font-size: var(--ds-text-xl); }
.bb-legal__section ul { display: grid; gap: 7px; margin: 10px 0 0; padding-left: 20px; color: var(--ds-text-secondary); font-size: var(--ds-text-sm); line-height: 1.55; }
.bb-legal__section li::marker { color: var(--ds-brand); }
.bb-note {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--ds-warning) 30%, var(--ds-border));
    border-radius: var(--ds-radius-md);
    background: var(--ds-warning-soft);
    color: var(--ds-text-secondary);
    font-size: var(--ds-text-xs);
    line-height: 1.5;
}
.bb-note .bb-icon { flex: 0 0 auto; color: var(--ds-warning); margin-top: 1px; }

/* ------------------------------ Footer legal ----------------------------- */
.bb-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-top: 8px;
}
.bb-footer-legal a {
    color: var(--sf-muted, var(--ds-text-muted));
    font-size: 12px;
    font-weight: 600;
}
.bb-footer-legal a:hover,
.bb-footer-legal a:focus-visible { color: var(--sf-link-hover, var(--ds-brand-hover)); }

/* -------------------------------- Toasts --------------------------------- */
.bb-toasts {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
    pointer-events: none;
}
.bb-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    background: var(--ds-bg-elevated);
    box-shadow: var(--ds-shadow-lg);
    color: var(--ds-text-primary);
    font-size: var(--ds-text-sm);
    line-height: 1.45;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--ds-anim-base) var(--ds-ease-out),
                transform var(--ds-anim-base) var(--ds-ease-out);
    pointer-events: auto;
}
.bb-toast.is-visible { opacity: 1; transform: translateY(0); }
.bb-toast--success { border-color: color-mix(in srgb, var(--ds-success) 34%, var(--ds-border)); }
.bb-toast--error { border-color: color-mix(in srgb, var(--ds-danger) 34%, var(--ds-border)); }
.bb-toast .bb-icon { flex: 0 0 auto; margin-top: 1px; }

/* ------------------------------- Reveal ---------------------------------- */
[data-bb-reveal] {
    transition: opacity 550ms var(--ds-ease-out), transform 550ms var(--ds-ease-out);
}
.bb-reveal-init { opacity: 0; transform: translateY(14px); }
.bb-reveal-init.is-visible { opacity: 1; transform: translateY(0); }

/* ------------------------------ Responsive ------------------------------- */
@media (max-width: 1199.98px) {
    .bb-header__nav { display: none; }
    .bb-header__login { display: none; }
    .bb-menu-toggle { display: inline-flex; }
    .bb-lang { display: none; }
    .bb-hero { grid-template-columns: 1fr; }
    .bb-workflow { max-width: 640px; }
    .bb-tender-list--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bb-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .bb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bb-catalog,
    .bb-detail,
    .bb-contact,
    .bb-legal { grid-template-columns: 1fr; }
    .bb-filter,
    .bb-legal__toc { position: static; }
    .bb-detail__hero { grid-template-columns: 1fr; }
    .bb-detail__hero-actions { justify-content: flex-start; }
    .bb-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bb-role-grid { grid-template-columns: 1fr; }
    .bb-page-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
    .bb-header__inner { min-height: 64px; }
    .bb-header .brand-tagline { display: none; }
    .bb-header__auth .bb-header__cta { display: none; }
    .bb-hero { padding-block: 30px 24px; }
    .bb-hero__title { font-size: clamp(1.85rem, 1.1rem + 4.4vw, 2.6rem); }
    .bb-actions .btn { flex: 1 1 190px; }
    .bb-grid--2,
    .bb-grid--3,
    .bb-grid--4,
    .bb-tender-list,
    .bb-tender-list--3 { grid-template-columns: 1fr; }
    .bb-cta-band { flex-direction: column; align-items: flex-start; }
    .bb-form__row { grid-template-columns: 1fr; }
    .bb-toolbar { align-items: flex-start; flex-direction: column; }
    .bb-toolbar__sort { width: 100%; }
    .bb-toolbar__sort select { flex: 1 1 auto; min-width: 0; }
    .bb-mobile__actions { grid-template-columns: 1fr; }
    .bb-section { padding-block: clamp(32px, 8vw, 48px); }
}

@media (max-width: 520px) {
    .bb-container { padding-inline: 16px; }
    .bb-hero__note { flex-direction: column; }
    .bb-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .bb-stat { padding: 14px; }
    .bb-stat__value { font-size: 25px; }
    .bb-tender-card__meta { grid-template-columns: 1fr; }
    .bb-header .brand-name { font-size: 18px; }
    .bb-header .brand-mark { width: 34px; height: 34px; }
    .bb-header .bb-icon-btn { width: 38px; height: 38px; }
    .bb-pagination__item { min-width: 36px; min-height: 36px; padding: 0 9px; }
}

@media (hover: hover) and (pointer: fine) {
    .bb-tile:hover {
        transform: translateY(-3px);
        border-color: color-mix(in srgb, var(--ds-brand) 28%, var(--ds-border));
        box-shadow: var(--ds-shadow-md);
    }
}

/* ------------------------------ Hero route art -----------------------------
   Decorative CN → RU cargo route. Coordinates follow the SVG viewBox
   "0 0 1200 520", so the containers ride exactly along the drawn curve.
   ------------------------------------------------------------------------- */
@keyframes bb-art-cargo-cn-ru {
    0%    { transform: translate(40px, 62px); opacity: 0; }
    6%    { opacity: 1; }
    12.5% { transform: translate(183px, 43px); }
    25%   { transform: translate(320px, 58px); }
    37.5% { transform: translate(471px, 50px); }
    50%   { transform: translate(600px, 52px); }
    62.5% { transform: translate(765px, 37px); }
    75%   { transform: translate(880px, 26px); }
    87.5% { transform: translate(1024px, 27px); }
    94%   { opacity: 1; }
    100%  { transform: translate(1160px, 36px); opacity: 0; }
}
@keyframes bb-art-cargo-ru-cn {
    0%    { transform: translate(1160px, 36px); opacity: 0; }
    6%    { opacity: 1; }
    12.5% { transform: translate(1024px, 27px); }
    25%   { transform: translate(880px, 26px); }
    37.5% { transform: translate(765px, 37px); }
    50%   { transform: translate(600px, 52px); }
    62.5% { transform: translate(471px, 50px); }
    75%   { transform: translate(320px, 58px); }
    87.5% { transform: translate(183px, 43px); }
    94%   { opacity: 1; }
    100%  { transform: translate(40px, 62px); opacity: 0; }
}
@keyframes bb-art-dash-flow {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -228; }
}
@keyframes bb-art-breathe {
    0%, 100% { opacity: 0.10; transform: scale(1); }
    50%      { opacity: 0.20; transform: scale(1.08); }
}
@keyframes bb-art-ring {
    0%   { transform: scale(0.55); opacity: 0.85; }
    70%  { opacity: 0; }
    100% { transform: scale(2.1); opacity: 0; }
}
@keyframes bb-art-node-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.22); }
}
@keyframes bb-art-waypoint {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50%      { opacity: 1; transform: scale(1.15); }
}

.bb-hero-art {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(100px, 20%, 170px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    overflow: hidden;
}
.bb-hero-art__svg {
    width: 100%;
    height: 100%;
    display: block;
}
.bb-hero-art__route { opacity: 0.35; }
.bb-hero-art__lane {
    stroke-dasharray: 10 9;
    animation: bb-art-dash-flow 9s linear infinite;
}
.bb-hero-art__cargo { animation: bb-art-cargo-cn-ru 15s linear infinite; }
.bb-hero-art__cargo--back { animation: bb-art-cargo-ru-cn 15s linear infinite 7s; }
.bb-hero-art__ring {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-art-ring 3.6s ease-out infinite;
}
.bb-hero-art__ring--ru { animation-delay: 1.8s; }
.bb-hero-art__node {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-art-node-pulse 3.6s ease-in-out infinite;
}
.bb-hero-art__node--ru { animation-delay: 1.8s; }
.bb-hero-art__waypoint {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-art-waypoint 4.4s ease-in-out infinite;
}
.bb-hero-art__waypoint:nth-of-type(2) { animation-delay: 1.5s; }
.bb-hero-art__waypoint:nth-of-type(3) { animation-delay: 3s; }
.bb-hero-art__label {
    font-family: var(--ds-font-sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.4;
}

html[data-theme="dark"] .bb-hero-art { opacity: 0.7; }
html[data-theme="dark"] .bb-hero-art__route { opacity: 0.55; }

@media (max-width: 991.98px) {
    .bb-hero-art { opacity: 0.35; height: clamp(80px, 16%, 130px); }
    .bb-hero-art__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bb-hero-art__lane,
    .bb-hero-art__ring,
    .bb-hero-art__node,
    .bb-hero-art__waypoint { animation: none; }
    .bb-hero-art__cargo { animation: none; transform: translate(600px, 52px); opacity: 1; }
    .bb-hero-art__cargo--back { animation: none; transform: translate(320px, 58px); opacity: 1; }
}

/* ------------------------------- Route thread ------------------------------
    Sits in normal flow between the section head and the step tiles.
   ------------------------------------------------------------------------- */
.bb-how-art {
    margin-bottom: clamp(18px, 2.4vw, 30px);
    line-height: 0;
}
.bb-how-art__svg {
    width: 100%;
    height: 44px;
    display: block;
}
@keyframes bb-how-flow {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -320; }
}
@keyframes bb-how-anchor {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.3); }
}
.bb-how-art__flow { animation: bb-how-flow 9s linear infinite; }
.bb-how-art__anchor {
    transform-box: fill-box;
    transform-origin: center;
    animation: bb-how-anchor 4.5s ease-in-out infinite;
}
.bb-how-art__anchor:nth-of-type(2) { animation-delay: 1.5s; }
.bb-how-art__anchor:nth-of-type(3) { animation-delay: 3s; }

@media (max-width: 760px) {
    .bb-how-art { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bb-how-art__flow,
    .bb-how-art__anchor { animation: none; }
}

/* -------------------------------- CTA Art --------------------------------- */
.bb-cta-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
    overflow: hidden;
}
.bb-cta-art__svg {
    width: 100%;
    height: 100%;
    display: block;
}
.bb-cta-art__wave--1 {
    animation: bb-cta-wave 8s ease-in-out infinite;
}
.bb-cta-art__wave--2 {
    animation: bb-cta-wave 10s ease-in-out infinite reverse;
}
.bb-cta-art__wave--3 {
    animation: bb-cta-wave 12s ease-in-out infinite;
}

@keyframes bb-cta-wave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

@media (prefers-reduced-motion: reduce) {
    .bb-cta-art__wave--1,
    .bb-cta-art__wave--2,
    .bb-cta-art__wave--3 { animation: none; }
}

@media print {
    .bb-header,
    .bb-footer-legal,
    .bb-toasts,
    .bb-public .btn { display: none !important; }
    .bb-public { background: var(--ds-bg-surface); }
}
