/* Home and template catalog cards: quiet actions, with access colour intact. */
body .tb-dynamic-card {
    border-color: #e7ece9;
    box-shadow: 0 2px 12px rgba(16, 41, 58, .035);
}
body .tb-dynamic-card:hover { box-shadow: 0 7px 22px rgba(16, 41, 58, .09); }
body .tb-dynamic-card .tb-card-main { display: block; }
body .tb-dynamic-card .tb-card-actions {
    display: flex;
    align-items: stretch;
    gap: 7px;
    margin: 7px 7px 9px;
}
body .tb-dynamic-card .tb-customize-button {
    display: inline-flex !important;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    padding: 7px 8px !important;
    border: 1px solid #b9dfcd !important;
    border-radius: 7px !important;
    background: #eaf7f0 !important;
    color: #08784e !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.3;
    box-shadow: none !important;
    text-decoration: none;
    text-align: center;
    justify-content: center;
}
body .tb-dynamic-card.tb-access-pro .tb-customize-button {
    border-color: #ffd2b7 !important;
    background: #fff1e8 !important;
    color: #b44713 !important;
    box-shadow: none !important;
}
/* The older card stylesheet colors Pro buttons green. Match badge and action. */
body .tb-dynamic-card.tb-access-free .tb-customize-button {
    border-color: #b9dfcd !important;
    background: #eaf7f0 !important;
    color: #08784e !important;
}
body .tb-dynamic-card .tb-customize-button i { font-size: 12px; }
body .tb-dynamic-card .tb-card-details {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 5px 7px;
    border: 1px solid #e1e9e6;
    border-radius: 7px;
    background: #fff;
    color: #51626b;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
    margin: 0 !important;
    box-shadow: none !important;
}
body .tb-dynamic-card .tb-card-details:hover,
body .tb-dynamic-card .tb-card-details:focus-visible {
    border-color: #aebfb7;
    color: #10293a;
}
body .tb-dynamic-card .tb-template-free { background: #168b59; color: #fff; }
body .tb-dynamic-card .tb-template-pro { background: #f1873c; color: #fff; }
body .tb-dynamic-card .tb-template-access { box-shadow: 0 2px 8px rgba(16, 41, 58, .1); }

/* At a 1920px desktop viewport, six columns within 1600px make each
   template about 25% wider than the earlier eight-column layout. */
body.home .tb-dynamic-grid {
    width: min(1600px, 100%) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    columns: 6 210px !important;
    column-gap: 16px !important;
}
@media (max-width: 1599px) and (min-width: 1201px) {
    body.home .tb-dynamic-grid { columns: 5 190px !important; }
}
@media (max-width: 1200px) and (min-width: 768px) {
    body.home .tb-dynamic-grid { columns: 4 180px !important; }
}
@media (max-width: 767px) {
    body.home .tb-dynamic-grid { columns: 2 130px !important; column-gap: 10px !important; }
}

/* Palleon public detail: image left, title and action right, text underneath. */
body.single-palleontemplates .tb-detail-page.tb-app-page {
    width: min(1240px, calc(100% - 40px)) !important;
    max-width: 1240px !important;
    margin: 0 auto;
    padding: 48px 0 80px;
}
body.single-palleontemplates .tb-detail-top {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(30px, 5vw, 72px);
}
body.single-palleontemplates .tb-detail-top .tb-single-preview {
    width: 100%;
    min-width: 0;
    line-height: 0;
}
body.single-palleontemplates .tb-detail-top .tb-single-preview img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #edf0ed;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(16, 41, 58, .11);
}
body.single-palleontemplates .tb-detail-placeholder {
    display: grid;
    place-items: center;
    min-height: 340px;
    background: #f4f8f6;
    color: #52656b;
    border-radius: 12px;
    line-height: 1.5;
}
body.single-palleontemplates .tb-detail-info { min-width: 0; max-width: 670px; }
body.single-palleontemplates .tb-detail-eyebrow {
    display: inline-block;
    margin-right: 12px;
    color: #35715b;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .14em;
}
body.single-palleontemplates .tb-detail-access {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
}
body.single-palleontemplates .tb-detail-free { background: #eaf7f0; color: #08784e; }
body.single-palleontemplates .tb-detail-pro { background: #fff1e8; color: #b44713; }
body.single-palleontemplates .tb-detail-info h1 {
    margin: 18px 0;
    color: #10293a;
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.16;
    letter-spacing: -.025em;
}
body.single-palleontemplates .tb-detail-summary {
    max-width: 590px;
    margin: 0 0 26px;
    color: #536673;
    font-size: 16px;
    line-height: 1.65;
}
body.single-palleontemplates .tb-detail-customize {
    min-height: 46px;
    padding: 11px 18px;
    font-size: 14px;
}
body.single-palleontemplates .tb-detail-content {
    width: 100%;
    max-width: 1020px;
    margin: 56px auto 0;
    padding: 36px 0 0;
    border-top: 1px solid #e7ece9;
    color: #243846;
    font-size: 16px;
    line-height: 1.78;
}
body.single-palleontemplates .tb-detail-content h2 {
    margin: 30px 0 12px;
    color: #10293a;
    font-size: clamp(21px, 2vw, 26px);
    line-height: 1.3;
}
body.single-palleontemplates .tb-detail-content h2:first-child { margin-top: 0; }
body.single-palleontemplates .tb-detail-content p { margin: 0 0 17px; }

@media (max-width: 760px) {
    body.single-palleontemplates .tb-detail-page.tb-app-page {
        width: calc(100% - 32px) !important;
        padding: 28px 0 52px;
    }
    body.single-palleontemplates .tb-detail-top { grid-template-columns: 1fr; gap: 26px; }
    body.single-palleontemplates .tb-detail-info { order: -1; }
    body.single-palleontemplates .tb-detail-info h1 { font-size: clamp(27px, 7vw, 36px); }
    body.single-palleontemplates .tb-detail-top .tb-single-preview { max-width: 440px; margin: 0 auto; }
    body.single-palleontemplates .tb-detail-content { margin-top: 38px; padding-top: 28px; }
}
