
/* =========================================================
   CALC SITE TEMPLATES 1.4
   ========================================================= */

.cst-single-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Breadcrumb: deliberately separated from the header */
.cst-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 28px 0 34px;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
}

.cst-breadcrumbs a {
    color: #2563d9;
    text-decoration: none;
}

.cst-breadcrumbs a:hover {
    text-decoration: underline;
}

.cst-breadcrumbs strong {
    color: #334155;
    font-weight: 600;
}

.cst-crumb-sep {
    color: #a7b0bd;
    font-size: 19px;
}

.cst-crumb-chip {
    color: #2563d9 !important;
}

/* EXACTLY TWO VISUAL CONTAINERS */
.cst-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    align-items: start;
}

.cst-main-container,
.cst-sidebar-container {
    background: #ffffff;
    border: 1px solid #e4e9f1;
    border-radius: 18px;
    box-shadow: 0 7px 25px rgba(28, 45, 75, 0.055);
}

.cst-main-container {
    min-width: 0;
    padding: 34px;
}

.cst-sidebar-container {
    padding: 24px;
}

/* Main heading */
.cst-calculator-header {
    margin-bottom: 26px;
}

.cst-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #1554d1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .15em;
    line-height: 1.3;
    text-transform: uppercase;
}

.cst-calculator-header h1 {
    margin: 0 0 14px;
    color: #173f7a;
    font-size: clamp(38px, 4.2vw, 58px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.08;
}

.cst-calculator-intro {
    max-width: 850px;
    margin: 0;
    color: #536174;
    font-size: 17px;
    line-height: 1.7;
}

/* Content area: your calculator + SEO content */
.cst-content {
    color: #334155;
    font-size: 16px;
    line-height: 1.75;
}

.cst-content > :first-child {
    margin-top: 0;
}

.cst-content h2 {
    margin-top: 38px;
    color: #17233b;
    font-size: 30px;
    line-height: 1.25;
}

.cst-content h3 {
    margin-top: 30px;
    color: #17233b;
    font-size: 22px;
}

.cst-content img {
    max-width: 100%;
    height: auto;
}

.cst-content table {
    width: 100%;
    border-collapse: collapse;
}

.cst-content th,
.cst-content td {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
}

/* Sidebar */
.cst-sidebar-container {
    position: sticky;
    top: 24px;
}

.cst-sidebar-title {
    margin: 0 0 17px;
    color: #173f7a;
    font-size: 20px;
    line-height: 1.3;
}

.cst-ad-section {
    padding-bottom: 25px;
    border-bottom: 1px solid #e7ebf1;
}

.cst-widget {
    width: 100%;
    margin: 0;
}

.cst-widget-title {
    display: none;
}

/* 300x250 placeholder for when no widget/ad is configured */
.cst-ad-placeholder {
    width: 300px;
    max-width: 100%;
    height: 250px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 600;
}

.cst-categories-section {
    padding-top: 0;
}

.cst-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cst-category-list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #edf0f4;
}

.cst-category-list li:last-child {
    border-bottom: 0;
}

.cst-category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 2px;
    color: #27364a;
    font-size: 15px;
    text-decoration: none;
}

.cst-category-list a:hover {
    color: #1554d1;
}

.cst-category-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cst-folder-icon {
    color: #1554d1;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.cst-category-count {
    min-width: 27px;
    height: 24px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f1f4f8;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.cst-no-category {
    color: #64748b;
    font-size: 13px;
}

/* Related calculators at bottom of LEFT container */
.cst-related-section {
    margin-top: 48px;
    padding-top: 30px;
    border-top: 1px solid #e7ebf1;
}

.cst-related-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.cst-related-heading h2 {
    margin: 0;
    color: #17233b;
    font-size: 28px;
    line-height: 1.2;
}

.cst-view-category {
    color: #1554d1;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.cst-view-category:hover {
    text-decoration: underline;
}

.cst-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cst-related-card {
    min-width: 0;
    min-height: 175px;
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #17233b;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.cst-related-card:hover {
    transform: translateY(-2px);
    border-color: #cbd8ed;
    box-shadow: 0 9px 22px rgba(30, 52, 88, .08);
}

.cst-related-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #edf3ff;
    color: #1554d1;
    font-size: 19px;
    font-weight: 800;
}

.cst-related-title {
    color: #17233b;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.35;
}

.cst-related-desc {
    margin-top: 6px;
    color: #718096;
    font-size: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cst-related-link {
    margin-top: auto;
    padding-top: 12px;
    color: #1554d1;
    font-size: 12px;
    font-weight: 750;
}

/* =========================================================
   CATEGORY PAGE
   ========================================================= */

.cst-category-hero {
    border-bottom: 1px solid #e3e9f2;
    background: linear-gradient(135deg, #f4f8ff, #eef5ff 55%, #eaf8f4);
}

.cst-category-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 58px;
}

.cst-category-hero .cst-breadcrumbs {
    margin-bottom: 45px;
}

.cst-category-hero h1 {
    margin: 0 0 15px;
    color: #173f7a;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.cst-category-description {
    max-width: 800px;
    color: #536174;
    font-size: 17px;
    line-height: 1.75;
}

.cst-category-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 55px 24px 80px;
}

.cst-category-section-head {
    margin-bottom: 25px;
}

.cst-category-section-head h2 {
    margin: 0 0 7px;
    color: #17233b;
    font-size: 31px;
}

.cst-category-section-head p {
    margin: 0;
    color: #667386;
}

.cst-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cst-pagination {
    margin-top: 35px;
}

.cst-pagination ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cst-pagination a,
.cst-pagination span {
    display: block;
    padding: 9px 13px;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    text-decoration: none;
}

.cst-pagination .current {
    border-color: #1554d1;
    background: #1554d1;
    color: #fff;
}

.cst-category-info {
    margin-top: 60px;
    padding: 35px;
    border-radius: 16px;
    background: #f7f9fc;
}

.cst-category-info h2 {
    margin-top: 0;
    color: #17233b;
}

.cst-category-info p {
    color: #526174;
    line-height: 1.75;
}

.cst-empty {
    padding: 35px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
    text-align: center;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
    .cst-two-column {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .cst-main-container {
        padding: 28px;
    }

    .cst-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cst-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .cst-two-column {
        grid-template-columns: 1fr;
    }

    .cst-sidebar-container {
        position: static;
        display: grid;
        grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
        gap: 25px;
    }

    .cst-ad-section {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .cst-categories-section {
        padding-top: 0;
        border-left: 1px solid #e7ebf1;
        padding-left: 25px;
    }
}

@media (max-width: 640px) {
    .cst-single-wrap {
        padding: 0 15px 55px;
    }

    .cst-breadcrumbs {
        margin-top: 22px;
        margin-bottom: 24px;
        font-size: 13px;
    }

    .cst-two-column {
        gap: 18px;
    }

    .cst-main-container,
    .cst-sidebar-container {
        border-radius: 14px;
    }

    .cst-main-container {
        padding: 20px;
    }

    .cst-sidebar-container {
        display: block;
        padding: 20px;
    }

    .cst-calculator-header h1 {
        font-size: 36px;
    }

    .cst-calculator-intro {
        font-size: 15px;
    }

    .cst-related-heading {
        display: block;
    }

    .cst-view-category {
        display: inline-block;
        margin-top: 10px;
    }

    .cst-related-grid {
        grid-template-columns: 1fr;
    }

    .cst-category-grid {
        grid-template-columns: 1fr;
    }

    .cst-category-hero-inner {
        padding: 20px 15px 45px;
    }

    .cst-category-hero .cst-breadcrumbs {
        margin-bottom: 35px;
    }

    .cst-category-hero h1 {
        font-size: 36px;
    }

    .cst-category-content {
        padding: 42px 15px 55px;
    }

    .cst-category-info {
        padding: 25px 20px;
        margin-top: 45px;
    }
}


/* =========================================================
   ALL CALCULATORS PAGE
   ========================================================= */

.cst-all-calculators-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 55px 24px 80px;
}

.cst-all-hero {
    margin-bottom: 48px;
    padding: 48px;
    border: 1px solid #e1e8f2;
    border-radius: 20px;
    background: linear-gradient(135deg, #f4f8ff, #eef5ff 60%, #effaf6);
}

.cst-all-hero h1 {
    margin: 0 0 14px;
    color: #173f7a;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.cst-all-hero p {
    max-width: 760px;
    margin: 0;
    color: #536174;
    font-size: 17px;
    line-height: 1.7;
}

.cst-all-category {
    margin-bottom: 42px;
    padding: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(28,45,75,.045);
}

.cst-all-category-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.cst-all-category-heading h2 {
    margin: 0;
    color: #17233b;
    font-size: 29px;
    line-height: 1.2;
}

.cst-all-calculator-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cst-no-calculators {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 850px) {
    .cst-all-calculator-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .cst-all-calculators-page {
        padding: 35px 15px 55px;
    }

    .cst-all-hero {
        padding: 30px 22px;
        border-radius: 15px;
    }

    .cst-all-category {
        padding: 20px;
        border-radius: 14px;
    }

    .cst-all-category-heading {
        display: block;
    }

    .cst-all-category-heading .cst-view-category {
        display: inline-block;
        margin-top: 10px;
    }

    .cst-all-calculator-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   FULL-WIDTH CATEGORY ARCHIVE
   ========================================================= */

body.taxonomy-calculator-category .site-content,
body.tax-calculator-category .site-content,
body:has(.cst-category-page) .site-content {
    width: 100%;
    max-width: 100%;
}

body:has(.cst-category-page) .content-area {
    width: 100%;
    max-width: none;
    float: none;
}

.cst-category-page {
    width: 100%;
}

.cst-category-hero,
.cst-category-content {
    width: 100%;
}

.cst-category-hero-inner,
.cst-category-content {
    box-sizing: border-box;
}

.cst-category-info {
    display: none !important;
}


/* =========================================================
   FORCE TRUE FULL-WIDTH CATEGORY ARCHIVE
   GeneratePress can keep the content area at ~66% even when
   the sidebar is disabled by a layout/Element setting.
   Force the outer grid itself to one column.
   ========================================================= */

body:has(.cst-category-page) .site-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
}

body:has(.cst-category-page) .site-content,
body:has(.cst-category-page) .content-area,
body:has(.cst-category-page) .site-main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    float: none !important;
    flex: 0 0 100% !important;
}

body:has(.cst-category-page) .site-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body:has(.cst-category-page) .inside-article {
    width: 100% !important;
    max-width: none !important;
}

body:has(.cst-category-page) .cst-category-page {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Keep the actual content nicely centered instead of stretching text
   edge-to-edge. */
body:has(.cst-category-page) .cst-category-hero-inner,
body:has(.cst-category-page) .cst-category-content {
    width: min(1180px, calc(100% - 48px)) !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 600px) {
    body:has(.cst-category-page) .cst-category-hero-inner,
    body:has(.cst-category-page) .cst-category-content {
        width: calc(100% - 30px) !important;
    }
}


/* =========================================================
   v2.3 - OVERRIDE GENERATEPRESS SIDEBAR WIDTH
   ========================================================= */

/* New GeneratePress grid layout */
body.cst-full-width-calculators .site.grid-container,
body.cst-full-width-calculators .site-grid {
    grid-template-columns: minmax(0, 1fr) !important;
}

/* Classic GeneratePress layout */
body.cst-full-width-calculators .site-content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body.cst-full-width-calculators #primary,
body.cst-full-width-calculators .content-area,
body.cst-full-width-calculators .site-main {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Hide GeneratePress sidebars completely on these pages. */
body.cst-full-width-calculators #right-sidebar,
body.cst-full-width-calculators #left-sidebar,
body.cst-full-width-calculators .widget-area,
body.cst-full-width-calculators .is-right-sidebar,
body.cst-full-width-calculators .is-left-sidebar {
    display: none !important;
    width: 0 !important;
    flex: 0 0 0 !important;
}

/* Prevent old theme CSS from limiting the category wrapper. */
body.cst-full-width-calculators .inside-article,
body.cst-full-width-calculators .entry-content,
body.cst-full-width-calculators .cst-category-page {
    width: 100% !important;
    max-width: none !important;
}

/* Keep the actual category content centered and readable. */
body.cst-full-width-calculators .cst-category-hero-inner,
body.cst-full-width-calculators .cst-category-content {
    width: min(1180px, calc(100% - 48px)) !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 600px) {
    body.cst-full-width-calculators .cst-category-hero-inner,
    body.cst-full-width-calculators .cst-category-content {
        width: calc(100% - 30px) !important;
    }
}


/* =========================================================
   v2.4 - CLEAN CALCULATOR DETAIL PAGES
   ========================================================= */

.cst-calculator-header h1,
body.single-calculator .cst-calculator-header h1 {
    font-size: 38px !important;
    line-height: 1.15 !important;
    margin-top: 8px !important;
    margin-bottom: 18px !important;
}

/* Related calculator cards: remove all icons. */
.cst-related-icon {
    display: none !important;
}

.cst-related-card {
    min-height: 190px;
}

.cst-related-card .cst-related-title {
    display: block;
    margin-top: 0 !important;
    margin-bottom: 10px;
}

.cst-related-card .cst-related-desc {
    display: block;
    color: #58708f;
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .cst-calculator-header h1,
    body.single-calculator .cst-calculator-header h1 {
        font-size: 34px !important;
        line-height: 1.15 !important;
    }
}

@media (max-width: 480px) {
    .cst-calculator-header h1,
    body.single-calculator .cst-calculator-header h1 {
        font-size: 32px !important;
    }
}


/* =========================================================
   v2.5 - CALCULATOR H1 SIZE
   ========================================================= */

.cst-calculator-header h1,
body.single-calculator .cst-calculator-header h1 {
    font-size: 2.2vw !important;
    line-height: 1.15 !important;
}

@media (max-width: 900px) {
    .cst-calculator-header h1,
    body.single-calculator .cst-calculator-header h1 {
        font-size: 32px !important;
    }
}

@media (max-width: 480px) {
    .cst-calculator-header h1,
    body.single-calculator .cst-calculator-header h1 {
        font-size: 30px !important;
    }
}


/* =========================================================
   v2.6 - FINAL CALCULATOR H1 OVERRIDE
   ========================================================= */

/* The previous stylesheet used clamp(38px, 4.2vw, 58px).
   This rule deliberately overrides that value. */
html body .cst-single-wrap .cst-calculator-header h1,
html body.single-calculator .cst-single-wrap .cst-calculator-header h1 {
    font-size: 2.2vw !important;
    line-height: 1.15 !important;
    max-width: 100% !important;
}

@media (max-width: 900px) {
    html body .cst-single-wrap .cst-calculator-header h1,
    html body.single-calculator .cst-single-wrap .cst-calculator-header h1 {
        font-size: 32px !important;
    }
}

@media (max-width: 480px) {
    html body .cst-single-wrap .cst-calculator-header h1,
    html body.single-calculator .cst-single-wrap .cst-calculator-header h1 {
        font-size: 30px !important;
    }
}


/* =========================================================
   v2.7 - COMPACT CALCULATOR LIBRARY CARDS
   Applies to:
   - /calculators/
   - every calculator category page
   - Related Calculators on calculator detail pages

   These cards are designed for the short 1–2 line excerpts.
   ========================================================= */

.cst-related-card,
.cst-all-calculator-grid .cst-related-card,
.cst-category-grid .cst-related-card {
    min-height: 150px !important;
    height: auto !important;
    padding: 18px !important;
    box-sizing: border-box !important;
}

/* No icon on any of these library/related cards. */
.cst-related-card .cst-related-icon {
    display: none !important;
}

.cst-related-card .cst-related-title {
    display: block !important;
    margin: 0 0 7px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
}

.cst-related-card .cst-related-desc {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    margin: 0 !important;
    color: #718096 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.cst-related-card .cst-related-link {
    display: block !important;
    margin-top: 14px !important;
    padding-top: 0 !important;
    color: #1554d1 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
}

/* Remove the old flex behavior that was pushing the link to the
   bottom and creating a large blank area. */
.cst-related-card {
    justify-content: flex-start !important;
}

@media (max-width: 640px) {
    .cst-related-card,
    .cst-all-calculator-grid .cst-related-card,
    .cst-category-grid .cst-related-card {
        min-height: 145px !important;
        padding: 17px !important;
    }
}


/* =========================================================
   v2.8 - REMOVE EXCESS CARD SPACE
   The screenshot shows .cst-related-link still receiving
   margin-top:auto from the original card flex layout.
   ========================================================= */

/* Do not stretch cards to the height of the tallest card in a row. */
.cst-category-grid,
.cst-all-calculators-grid,
.cst-related-grid {
    align-items: start !important;
}

/* Compact cards: content determines height. */
.cst-category-grid .cst-related-card,
.cst-all-calculators-grid .cst-related-card,
.cst-related-grid .cst-related-card,
.cst-related-card {
    min-height: 0 !important;
    height: auto !important;
    padding: 18px !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Remove the original margin-top:auto that creates the large blank area. */
.cst-category-grid .cst-related-card .cst-related-link,
.cst-all-calculators-grid .cst-related-card .cst-related-link,
.cst-related-grid .cst-related-card .cst-related-link,
.cst-related-card .cst-related-link {
    margin-top: 14px !important;
    padding-top: 0 !important;
    display: block !important;
}

/* Two-line excerpt only. */
.cst-category-grid .cst-related-card .cst-related-desc,
.cst-all-calculators-grid .cst-related-card .cst-related-desc,
.cst-related-grid .cst-related-card .cst-related-desc,
.cst-related-card .cst-related-desc {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* Keep cards visually consistent without artificial blank height. */
.cst-category-grid .cst-related-card .cst-related-title,
.cst-all-calculators-grid .cst-related-card .cst-related-title,
.cst-related-grid .cst-related-card .cst-related-title,
.cst-related-card .cst-related-title {
    margin: 0 0 7px !important;
    display: block !important;
}

@media (max-width: 640px) {
    .cst-category-grid .cst-related-card,
    .cst-all-calculators-grid .cst-related-card,
    .cst-related-grid .cst-related-card,
    .cst-related-card {
        padding: 16px !important;
    }
}


/* =========================================================
   v2.9 - DEFINITIVE CARD COMPACT FIX
   ========================================================= */

/* The previous build was still being served as templates.css?ver=2.6.0.
   v2.9 changes the enqueue version to 2.9.0, forcing a fresh stylesheet. */

html body .cst-category-grid,
html body .cst-all-calculator-grid,
html body .cst-related-grid {
    align-items: start !important;
    grid-auto-rows: max-content !important;
}

/* Override the original flex card completely. */
html body .cst-category-grid > .cst-related-card,
html body .cst-all-calculator-grid > .cst-related-card,
html body .cst-related-grid > .cst-related-card {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 18px !important;
    margin: 0 !important;
    align-self: start !important;
    box-sizing: border-box !important;
}

/* Title */
html body .cst-category-grid > .cst-related-card .cst-related-title,
html body .cst-all-calculator-grid > .cst-related-card .cst-related-title,
html body .cst-related-grid > .cst-related-card .cst-related-title {
    display: block !important;
    margin: 0 0 8px !important;
    line-height: 1.35 !important;
}

/* Excerpt: exactly up to two lines */
html body .cst-category-grid > .cst-related-card .cst-related-desc,
html body .cst-all-calculator-grid > .cst-related-card .cst-related-desc,
html body .cst-related-grid > .cst-related-card .cst-related-desc {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* IMPORTANT: kill margin-top:auto from the original stylesheet */
html body .cst-category-grid > .cst-related-card .cst-related-link,
html body .cst-all-calculator-grid > .cst-related-card .cst-related-link,
html body .cst-related-grid > .cst-related-card .cst-related-link {
    display: block !important;
    margin: 14px 0 0 !important;
    padding: 0 !important;
    position: static !important;
}

/* No icon */
html body .cst-category-grid > .cst-related-card .cst-related-icon,
html body .cst-all-calculator-grid > .cst-related-card .cst-related-icon,
html body .cst-related-grid > .cst-related-card .cst-related-icon {
    display: none !important;
}
