/* Public Toolkit page (views/external/toolkit.html, toolkit.js; PLAN-DEALS.md Part 5). Follows the external pages'
   look: tokens in page-template-external.css, base rules as in page-pricing.css. Page classes use the tk- prefix.
   Sections (one per category) with their intro, then cards: 3 across on desktop, 2 on tablets, 1 on phones. */

/* ─── Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: #0a0e1a;
    color: #e8eaf2;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3 {
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.3px;
}

a {
    color: #3b9eff;
    text-decoration: none;
}

a:hover {
    color: #6db8ff;
    text-decoration: none;
}

.bb-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 26px;
    cursor: pointer;
    padding: 0;
}

.bb-nav-mobile {
    display: none;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
}

.bb-nav-mobile.open {
    display: block;
}

.bb-nav-mobile a {
    display: block;
    padding: 10px 0;
    color: var(--muted);
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}

.bb-nav-mobile a:last-child {
    border-bottom: none;
}

.bb-nav-mobile .btn-bb-primary {
    margin-top: 14px;
    width: 100%;
    text-align: center;
}

/* ─── Buttons ───────────────────────────────────────── */
.btn-bb-primary {
    display: inline-block;
    background: var(--blue);
    color: #fff !important;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s;
    cursor: pointer;
}

.btn-bb-primary:hover {
    background: #2e8eef;
}

/* ─── Page ──────────────────────────────────────────── */
.bb-page-body {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px 72px;
}

/* ─── Header ────────────────────────────────────────── */
.tk-header {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 36px;
}

.tk-header h1 {
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}

.tk-sub {
    font-size: 16px;
    color: #e8eaf2;
    line-height: 1.68;
    margin-bottom: 12px;
}

/* Icon inline with the text, so it stays next to the first word when the centred line wraps */
.tk-disclosure {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

.tk-disclosure .ti {
    margin-right: 4px;
    vertical-align: -2px;
}

/* ─── Chips + search ────────────────────────────────── */
.tk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 16px 0;
    margin-bottom: 12px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tk-chip {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tk-chip:hover {
    color: #fff;
}

.tk-chip.is-active {
    background: var(--blue-dim);
    border-color: var(--blue-bdr);
    color: var(--blue);
}

.tk-chip:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}

.tk-chip-count {
    color: var(--faint);
    font-weight: 400;
    margin-left: 2px;
}

.tk-chip.is-active .tk-chip-count {
    color: var(--blue);
}

.tk-search {
    width: 260px;
    max-width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #e8eaf2;
    font-family: inherit;
    font-size: 14px;
    padding: 8px 12px;
}

.tk-search:focus {
    outline: none;
    border-color: var(--blue-bdr);
    box-shadow: 0 0 0 3px var(--blue-dim);
}

/* ─── Sections ──────────────────────────────────────── */
.tk-group {
    margin-top: 36px;
}

.tk-group-title {
    font-size: 24px;
    margin: 0 0 8px;
}

.tk-group-count {
    font-size: 15px;
    font-weight: 400;
    color: var(--faint);
    margin-left: 4px;
}

.tk-group-intro {
    max-width: 880px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 18px;
}

.tk-hidden {
    display: none !important;
}

/* ─── Cards ─────────────────────────────────────────── */
.tk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 14px;
}

.tk-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.tk-card.is-featured {
    border-color: var(--blue-bdr);
    box-shadow: 0 0 0 1px var(--blue-bdr), 0 0 40px 2px var(--blue-glow), 0 12px 28px rgba(0, 0, 0, 0.35);
}

.tk-picture {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--surface2);
}

.tk-picture-none {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-size: 48px;
}

.tk-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    padding: 18px 20px 20px;
}

.tk-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.tk-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    overflow-wrap: anywhere;
}

.tk-tag {
    font-size: 12px;
    padding: 1px 9px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--muted);
    white-space: nowrap;
}

.tk-tag-featured,
.tk-tag-offer {
    border-color: var(--blue-bdr);
    color: var(--blue);
}

.tk-headline {
    font-size: 15px;
    font-weight: 500;
    color: #e8eaf2;
    margin: 0;
}

.tk-description {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.tk-code {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.tk-code-label {
    color: var(--muted);
}

.tk-code-value {
    font-family: monospace;
    color: #fff;
    border: 1px dashed var(--blue-bdr);
    border-radius: 6px;
    padding: 1px 8px;
}

/* The button sits at the bottom of every card, so a row of cards lines up */
.tk-visit {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
}

.tk-empty {
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
}

/* ─── Closing line ──────────────────────────────────── */
.tk-cta {
    text-align: center;
    margin-top: 72px;
}

.tk-cta h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.tk-cta h2 span {
    color: var(--blue);
}

.tk-cta p {
    color: var(--muted);
    margin-bottom: 22px;
}

/* ─── Footer (as on the other external pages) ───────── */
.bb-footer-bottom {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
    flex-shrink: 0;
}

.bb-footer-bottom p {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 991px) {
    .tk-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .bb-navbar {
        padding: 0 20px;
    }

    .bb-nav-links {
        display: none;
    }

    .bb-nav-toggle {
        display: block;
    }

    .bb-page-body {
        padding: 40px 16px 56px;
    }

    .tk-header h1 {
        font-size: 28px;
    }

    .tk-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tk-search {
        width: 100%;
    }

    .tk-group-title {
        font-size: 21px;
    }

    .tk-cta h2 {
        font-size: 24px;
    }
}
