.history-product-img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin-bottom: 2px;
}

.buying-messages-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
@media (max-width: 900px) {
    .buying-messages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    .buying-messages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.buying-msg-row textarea {
    width: 100%;
    min-width: 0;
    font-size: 1.01em;
    background: #232f39;
    color: #e2e8f0;
    border-radius: 5px;
    border: 1px solid #34d399;
    padding: 6px 8px;
    margin-right: 4px;
    resize: none;
}
.buying-msg-row {
    background: #1a232a;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(16,185,129,0.07);
    padding: 10px 8px 8px 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
}
.buying-msg-row .copy-buying {
    transition: color 0.2s;
}
.buying-msg-row .copy-buying:hover {
    color: #2980b9;
}
.togglePrice.strike {
    text-decoration: line-through;
    color: #b00;
}

.analyze-results-container {
    background: linear-gradient(180deg, rgba(10, 15, 12, 0.96), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(52, 211, 153, 0.15);
    border-radius: 28px;
    box-shadow: 0 24px 64px rgba(8, 15, 13, 0.28);
    padding: 24px;
    margin: 0;
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
}

.buying-msg-row textarea {
    font-size: 1.01em;
    background: #f8f8ff;
    border-radius: 5px;
    border: 1px solid #d0d0d0;
    padding: 6px 8px;
    margin-right: 4px;
    color: #222;
}
.buying-msg-row .copy-buying {
    transition: color 0.2s;
}
.buying-msg-row .copy-buying:hover {
    color: #2980b9;
}
#togglePrice.strike {
    text-decoration: line-through;
    color: #b00;
}

@media (max-width: 700px) {
    .container {
        max-width: 98vw;
        padding: 10px 2vw;
        border-radius: 0;
        box-shadow: none;
    }
    h1 {
        font-size: 1.2rem;
        padding: 0 2vw;
    }
    label, .table-title {
        font-size: 1rem;
    }
    textarea {
        width: 100%;
        font-size: 0.98rem;
        min-width: 0;
        box-sizing: border-box;
    }
    #controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .team-section {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 6px 10px 6px;
        font-size: 0.98rem;
    }
    #tierSelects {
        flex-wrap: wrap;
        gap: 6px;
    }
    #tierSelects select {
        min-width: 54px;
        font-size: 0.97rem;
        padding: 5px 6px;
    }
    #analyzeBtn {
        width: 100%;
        margin: 0;
        padding: 12px 0;
        font-size: 1.05rem;
        align-self: stretch;
        margin-left: 0 !important;
    }
    .container {
        padding: 6vw 0.5vw;
    }
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        width: 100%;
        min-width: 650px;
        font-size: 0.97rem;
        margin-top: 10px;
        background: #fafafa;
        border-collapse: collapse;
        display: table;
    }
    th, td {
        word-break: break-word;
        font-size: 0.97rem;
        padding: 6px 4px;
    }
    .table-title {
        font-size: 1.08rem;
        margin-top: 18px;
    }
    .heatmap-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .heatmap-cell {
        min-height: 100px;
        padding: 12px 10px;
    }
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at 50% 0, rgba(16, 185, 129, 0.14) 0%, transparent 60%), #020705;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #e2e8f0;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.page-body, html, body {
    min-height: 100vh;
    height: 100%;
}

.container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#analysisSection {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-bottom: 24px;
}
.site-header {
    background: rgba(2, 7, 5, 0.96);
    border-bottom: 1px solid rgba(16, 185, 129, 0.18);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.nav-group {
    display: flex;
    gap: 20px;
    flex: 1 1 0;
    justify-content: center;
}
.nav-left {
    justify-content: flex-end;
}
.nav-right {
    justify-content: flex-start;
}
.header-lang-desktop {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}
.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.logo-link img {
    display: block;
    height: 44px;
    width: auto;
}
.nav-item,
.mobile-item {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-item:hover,
.mobile-item:hover {
    color: #34d399;
}
.lang-dropdown {
    position: relative;
}
.lang-flag-trigger {
    width: 72px;
    height: 42px;
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 12px;
    background: rgba(10, 15, 12, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    padding: 0 8px;
}
.lang-flag-trigger:focus {
    outline: none;
    border-color: rgba(74, 222, 128, 0.8);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
}
.lang-flag {
    width: 34px;
    height: 24px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}
.lang-caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #d1fae5;
    transition: transform 0.2s ease;
}
.lang-dropdown.is-open .lang-caret {
    transform: rotate(180deg);
}
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(7, 13, 10, 0.98);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 120;
}
.lang-dropdown.is-open .lang-dropdown-menu {
    display: flex;
}
.lang-option {
    width: 52px;
    height: 38px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.lang-option.is-active {
    border-color: rgba(74, 222, 128, 0.8);
}
.mobile-lang {
    margin-top: 8px;
    display: flex;
    justify-content: flex-start;
}
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    color: #cbd5e1;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 35px 18px 20px;
    background: rgba(2, 7, 5, 0.85);
    border-left: 1px solid rgba(16, 185, 129, 0.16);
    position: fixed;
    top: 0;
    right: 0;
    width: 50vw;
    height: 100dvh;
    z-index: 70;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.mobile-menu.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 7, 5, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 60;
}

.mobile-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.menu-open {
    overflow: hidden;
}

@media (min-width: 961px) {
    .mobile-menu,
    .mobile-menu-backdrop {
        display: none !important;
    }
}
@media (max-width: 960px) {
    .nav-left,
    .nav-right,
    .header-lang-desktop {
        display: none;
    }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .header-inner {
        justify-content: space-between;
    }
}
@media (max-width: 640px) {
    .header-inner {
        padding: 14px 18px;
    }
    .mobile-menu {
        width: 50vw;
        padding: 35px 18px 20px;
    }
}
.mobile-lang .lang-flag-trigger {
    width: 72px;
    height: 42px;
}
.hero-section {
    max-width: 980px;
    margin: 0 auto;
    padding: 120px 24px 44px;
    text-align: center;
}
.hero-title {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: #f8fafc;
    line-height: 1.05;
}
.hero-subtitle {
    max-width: 720px;
    margin: 0 auto;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 1.05rem;
}
.tools-section {
    max-width: 1180px;
    margin: 0 auto 80px;
    padding: 0 24px;
}
.section-header h2 {
    font-size: 2rem;
    color: #f8fafc;
    margin-bottom: 1.2rem;
}
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
@media (max-width: 1000px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 720px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}
.tool-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    padding: 32px;
    border: 1px solid rgba(16, 185, 129, 0.14);
    background: rgba(15, 23, 42, 0.92);
    border-radius: 28px;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
    text-decoration: none;
    color: inherit;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(8, 15, 21, 0.32);
    border-color: rgba(52, 211, 153, 0.28);
}
.tool-card h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #f8fafc;
}
.tool-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.75;
}
.tool-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #34d399;
    background: rgba(52, 211, 153, 0.09);
    border-radius: 18px;
}
.tool-icon svg,
.tool-icon span {
    width: 26px;
    height: 26px;
}
.tool-btn {
    align-self: flex-start;
    display: inline-flex;
    padding: 0.95rem 1.5rem;
    border-radius: 9999px;
    background: #10b981;
    color: #020617;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    transition: background 0.2s ease;
}
.tool-btn:hover {
    background: #22c55e;
}
.tool-card.disabled {
    opacity: 0.72;
    pointer-events: none;
}
.tool-card.disabled .tool-btn {
    background: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
}
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    background: #fafafa;
    border-collapse: collapse;
    margin-top: 18px;
    background: #fafafa;
}
.table-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 36px;
    margin-bottom: 0;
    color: #fff;
    padding-bottom: 15px;
}
.sticky-menu {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 10px 14px;
    background: #2980b9;
    color: #fff;
    border-radius: 999px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(41, 128, 185, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 10;
}
.sticky-menu:hover {
    transform: translateY(-2px);
    background: #1f5e85;
}
.hidden {
    display: none;
}
#historySection {
    margin-top: 0;
}
#historyContent {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.heatmap-summary {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.heatmap-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 999px;
    padding: 8px 14px;
    margin-top: 18px;
}
.heatmap-control-btn {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(15, 23, 35, 0.9);
    color: #e2e8f0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.heatmap-control-btn:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.18);
}
.heatmap-control-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.heatmap-page-label {
    font-weight: 700;
    color: #e2e8f0;
}
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(180px, auto);
    gap: 16px;
}
@media (max-width: 900px) {
    .heatmap-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-auto-rows: minmax(160px, auto);
    }
}
@media (max-width: 700px) {
    .heatmap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(150px, auto);
    }
    .heatmap-cell {
        padding: 12px 10px;
    }
}
@media (max-width: 520px) {
    .heatmap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(140px, auto);
    }
}
@media (max-width: 400px) {
    .heatmap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(135px, auto);
    }
}
.heatmap-cell {
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}
.heatmap-cell strong {
    font-size: 0.95rem;
    line-height: 1.25;
}
.heatmap-count {
    margin-top: 8px;
    font-size: 0.95rem;
    opacity: 0.88;
}
.history-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 12px 0 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}
.history-page-btn {
    border: 1px solid rgba(52, 211, 153, 0.18);
    background: rgba(15, 23, 35, 0.9);
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    min-width: 40px;
}
.history-page-btn:hover {
    background: rgba(16, 185, 129, 0.18);
}
.history-page-btn.active {
    background: #10b981;
    border-color: #0f766e;
    color: #020617;
}
.history-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    color: #7b8794;
    font-weight: 700;
}

.history-tabs-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 4px;
    gap: 8px;
    margin: 0 auto 14px;
    width: fit-content;
}

.history-card {
    width: 100%;
    max-width: none;
    min-height: 660px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 15, 12, 0.96));
    border: 1px solid rgba(52, 211, 153, 0.15);
    border-radius: 28px;
    box-shadow: 0 24px 64px rgba(8, 15, 13, 0.28);
    padding: 24px;
    margin: 0 auto;
}

.history-shell {
    padding-top: 0;
}

.history-hero {
    padding-bottom: 20px;
}

.history-tabs {
    display: none;
}

.history-tab {
    background: transparent;
    border: none;
    color: #cbd5e1;
    padding: 10px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
}

.history-tab.active,
.history-tab:hover {
    background: rgba(16, 185, 129, 0.12);
    color: #f8fafc;
}

.history-panel {
    width: 100%;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.history-panel.hidden {
    display: none;
}

.history-panel--heatmap .heatmap-grid {
    max-width: 100%;
}

@media (max-width: 700px) {
    .history-card {
        min-height: 0;
        padding: 16px;
        border-radius: 22px;
    }

    .history-tab {
        padding: 8px 14px;
    }
}

.executives-hero {
    box-sizing: border-box;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 92px 24px 28px;
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
}

.executives-hero__copy {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.executives-hero .eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #86efac;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.executives-hero h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(2.4rem, 4vw, 4rem);
    line-height: 1.04;
}

.executives-hero p {
    margin: 16px 0 0;
    color: #cbd5e1;
    max-width: 64ch;
    line-height: 1.8;
}

.executives-thresholds {
    display: none;
}

.executives-shell {
    box-sizing: border-box;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 84px;
    padding: 20px 24px;
    display: grid;
    gap: 22px;
}

.home-shell {
    padding-top: 0;
    margin-bottom: 0;
}

.home-hero {
    padding-bottom: 0;
    margin-bottom: 50px;
}

.home-shell .cards-grid {
    width: 100%;
    max-width: 1072px;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
}

.home-shell .tool-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 15, 12, 0.96));
    border: 1px solid rgba(52, 211, 153, 0.15);
    box-shadow: 0 24px 64px rgba(8, 15, 13, 0.28);
}

.site-footer {
    border-top: 1px solid rgba(16, 185, 129, 0.12);
    margin-top: 30px;
    box-sizing: border-box;
    flex: 0 0 45px;
    min-height: 45px;
    height: 45px;
    max-height: 45px;
    padding: 4px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: rgba(2, 7, 5, 0.96);
}

.site-footer__version {
    color: #e2e8f0;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 0.74rem;
    line-height: 1;
}

.site-footer__link {
    color: #86efac;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.72rem;
    line-height: 1;
}

.site-footer__link:hover {
    color: #bbf7d0;
}

body.page-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 0;
}

body.page-body main {
    flex: 1 0 auto;
}

.analyze-search-card {
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 15, 12, 0.96));
    border: 1px solid rgba(52, 211, 153, 0.15);
    border-radius: 28px;
    box-shadow: 0 24px 64px rgba(8, 15, 13, 0.28);
    padding: 24px;
}

.analyze-search-card .bid-input-row {
    margin-bottom: 0;
}

.analyze-search-card #controls-row {
    margin-top: 18px;
    justify-content: space-between;
    align-items: center;
}

.analyze-search-card #analyzeBtn {
    margin-left: 0;
    min-width: 180px;
}

.analyze-shell .table-title {
    text-align: center;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 24px;
    margin-bottom: 8px;
    color: #f8fafc;
    padding-bottom: 0;
}

.analyze-shell .table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.analyze-shell .table-responsive table {
    width: 100%;
    min-width: 720px;
}

.analyze-shell .table-responsive th,
.analyze-shell .table-responsive td {
    white-space: nowrap;
    word-break: normal;
}

.analyze-shell,
.analyze-results-container,
.analyze-results-container #results,
.analyze-results-container #distribution {
    min-width: 0;
    max-width: 1120px;
}

body[data-page="analyze"] {
    overflow-x: hidden;
}

@media (max-width: 700px) {
    .analyze-shell .table-responsive table {
        min-width: 620px;
    }

    .analyze-shell .table-responsive th,
    .analyze-shell .table-responsive td {
        white-space: nowrap;
        word-break: normal;
    }

    .analyze-results-container {
        padding: 18px 14px;
    }
}

.executives-search-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 15, 12, 0.96));
    border: 1px solid rgba(52, 211, 153, 0.15);
    border-radius: 28px;
    box-shadow: 0 24px 64px rgba(8, 15, 13, 0.28);
    padding: 24px;
}

.executives-label {
    margin: 0;
    font-size: 0.95rem;
    color: #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.executives-label--with-help {
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.help-icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    box-shadow: 0 8px 20px rgba(8, 15, 13, 0.18);
    flex: 0 0 auto;
}

.help-icon-btn:hover,
.help-icon-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(52, 211, 153, 0.55);
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
    outline: none;
}

.help-popup {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    z-index: 1200;
    background: transparent;
    transition: opacity 0.18s ease;
}

.help-popup.is-open {
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

.help-popup__dialog {
    position: relative;
    width: fit-content;
    max-width: calc(100vw - 32px);
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.help-popup__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 166px;
    max-height: 188px;
    object-fit: contain;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 8px;
    background: transparent;
}

.executives-label__tag,
.executive-skill-pill,
.executive-category-badge {
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
}

.executives-results-head {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    text-align: center;
}

.executives-results-head.is-visible {
    display: flex;
}

.executives-results-head h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.3rem;
    width: 100%;
}

.executives-label__tag.category-legend-title {
    background: rgba(100, 116, 139, 0.25);
    color: #cbd5e1;
    font-size: 0.85rem;
    order: -1;
}

.executives-results-legend {
    display: flex;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.executives-label__tag.category-perfect,
.executive-skill-pill.perfect,
.executive-category-badge.category-perfect {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
    font-size: 0.85rem;
}

.executives-label__tag.category-skilled,
.executive-skill-pill.skilled,
.executive-category-badge.category-skilled {
    background: rgba(251, 191, 36, 0.16);
    color: #fbbf24;
    font-size: 0.85rem;
}

.executives-label__tag.category-not-recommended,
.executive-skill-pill.not-recommended,
.executive-category-badge.category-not-recommended {
    background: rgba(220, 38, 38, 0.18);
    color: #f87171;
    font-size: 0.85rem;
}

.executives-textarea {
    width: 100%;
    min-height: 150px;
    max-height: 150px;
    resize: vertical;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 7, 5, 0.72);
    color: #f8fafc;
    padding: 18px 20px;
    font-size: 1rem;
    line-height: 1.7;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.executives-textarea:focus {
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.08);
}

.executives-actions {
    margin-top: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.tool-search-btn {
    border: none;
    border-radius: 999px;
    padding: 1rem 2.2rem;
    min-width: 180px;
    font-weight: 800;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #020617;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.28);
}

.executive-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    justify-items: center;
}

.executive-card {
    background: linear-gradient(180deg, rgba(10, 15, 12, 0.96), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(52, 211, 153, 0.12);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 18px 44px rgba(8, 15, 13, 0.24);
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    width: min(100%, 860px);
    margin: 0 auto;
}

.executive-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    text-align: center;
    width: 100%;
}

.executive-card h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.15rem;
    line-height: 1.8;
}

.executive-skill-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.executive-skill-pill {
    border-radius: 18px;
    padding: 14px 8px;
    background: rgba(2, 7, 5, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.14);
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
    text-align: center;
    min-width: 0;
    min-height: 92px;
}

.executive-skill-pill:not(.active) {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.1);
    color: rgba(203, 213, 225, 0.5);
    opacity: 0.7;
}

.executive-skill-pill.active {
    opacity: 1;
}

.executive-skill-pill span {
    color: inherit;
}

.executive-skill-pill strong {
    color: inherit;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.25;
}

.executive-skill-pill small {
    color: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.executive-skill-pill.active small {
    font-size: 1rem;
}

.executive-skill-pill.active.perfect {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(110, 231, 183, 0.42);
    color: #6ee7b7;
}

.executive-skill-pill.active.skilled {
    background: rgba(251, 191, 36, 0.16);
    border-color: rgba(251, 191, 36, 0.42);
    color: #fbbf24;
}

.executive-skill-pill.active.not-recommended {
    background: rgba(220, 38, 38, 0.18);
    border-color: rgba(248, 113, 113, 0.42);
    color: #f87171;
}

@media (max-width: 900px) {
    .executive-skill-grid {
        grid-template-columns: 1fr;
    }

    .help-icon-btn {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 700px) {
    .executives-hero {
        padding-top: 72px;
    }

    .executives-shell,
    .executives-hero {
        padding-left: 14px;
        padding-right: 14px;
    }

    .executives-search-card,
    .executive-card {
        padding: 18px;
        border-radius: 22px;
    }

    .executives-results-head {
        align-items: flex-start;
        flex-direction: column;
        text-align: left;
    }

    .executives-results-legend {
        justify-content: flex-start;
    }

    .tool-search-btn {
        width: 100%;
        min-width: 0;
    }
}

.history-list-table {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.history-list-table .table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.history-list-table table {
    width: 960px;
    table-layout: fixed;
    min-width: 960px;
    max-width: 960px;
    border-collapse: collapse;
}

.history-list-table th,
.history-list-table td {
    white-space: nowrap;
    word-break: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.history-list-table td.history-resource-cell {
    text-align: left;
}

.history-resource-list {
    max-height: 64px;
    overflow-y: auto;
    overflow-x: hidden;
}

.history-resource-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 4px;
}

.history-resource-item:last-child {
    margin-bottom: 0;
}

body[data-page="history"] {
    overflow-x: hidden;
}

@media (max-width: 700px) {
    .history-list-table table {
        width: 960px;
        min-width: 960px;
        max-width: 960px;
    }
}

label {
    font-weight: bold;
    display: block;
    margin-top: 9px;
    margin-bottom: 6px;
}

.bid-input-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    margin-bottom: 12px;
}
.bid-input-row textarea {
    width: 100%;
    min-width: 0;
    padding: 10px;
    font-size: 1rem;
    border-radius: 14px;
    border: 1px solid #ccc;
    resize: vertical;
    box-sizing: border-box;
    min-height: 150px;
    max-height: 150px;
    height: 150px;
}
#controls-row {
    display: flex;
    gap: 18px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.analyze-search-card #controls-row {
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.team-section {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    background: rgba(2, 7, 5, 0.72);
    border: 1px solid rgba(52, 211, 153, 0.18);
    border-radius: 16px;
    padding: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    margin: 0;
    color: #e2e8f0;
}
#tierSelects {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
#tierSelects select {
    min-width: 72px;
    font-size: 1rem;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #34d399;
    background: #232f39;
    color: #e2e8f0;
}

.tier-step-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(52, 211, 153, 0.38);
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    font-size: 0;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    text-align: center;
    vertical-align: middle;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.tier-step-btn::before {
    content: attr(data-symbol);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: block;
    transform: translateY(-1px);
}

#removeTierBtn {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(220, 38, 38, 0.18);
    color: #fecaca;
}

#removeTierBtn:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.28);
}

.tier-step-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(16, 185, 129, 0.28);
}

.tier-step-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
#analyzeBtn {
    margin-left: 0;
    margin-top: 0;
    align-self: center;
}
.spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #2980b9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 32px auto 18px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#results {
    margin-top: 36px;
}

table,
.table {
    background: #1a232a;
    color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 16px rgba(16,185,129,0.07);
}
th, td {
    border: 1px solid #26313a;
    padding: 8px 10px;
    text-align: center;
}
th {
    color: #34d399;
    font-weight: 700;
    letter-spacing: 0.03em;
    font-size: 1.08rem;
    border-bottom: 2px solid #34d399;
}
td {
    background: #1a232a;
    color: #e2e8f0;
}
td[contenteditable] {
    background: #232f39;
    outline: 1px solid #34d399;
    color: #e2e8f0;
}

textarea,
input[type="text"],
input[type="number"],
select {
    background: #232f39 !important;
    color: #e2e8f0 !important;
    border: 1px solid #34d399 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    transition: border 0.2s;
}
textarea:focus,
input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border: 1.5px solid #10b981 !important;
    outline: none !important;
}
::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

.bid-input-row textarea {
    background: #232f39 !important;
    color: #e2e8f0 !important;
    border: 1px solid #34d399 !important;
}

#tierSelects select {
    background: #232f39 !important;
    color: #e2e8f0 !important;
    border: 1px solid #34d399 !important;
}

@media (max-width: 900px) {
    .analyze-search-card #controls-row {
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    .team-section {
        width: auto;
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .team-section {
        flex-wrap: wrap;
    }

    #tierSelects {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    #removeTierBtn {
        order: 2;
    }

    #addTierBtn {
        order: 3;
    }
}
