/* Performance font fallback. */
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

/* The restored theme reserves a full banner via this pseudo-element. */
#tfm-hero .article.cover.has-post-media::before {
    display: none;
    content: none;
}

/* Keep the hero content without the archived gradient image. */
#tfm-hero .thumbnail-wrapper {
    display: none;
}

#tfm-hero .article.cover.has-post-media,
#tfm-hero .article.cover.has-post-media .post-inner,
#tfm-hero .article.cover.has-post-media .entry-wrapper {
    background: transparent;
}

#tfm-hero .article.cover.has-post-media .entry-wrapper,
#tfm-hero .article.cover.has-post-media .entry-wrapper a,
#tfm-hero .article.cover.has-post-media .entry-title {
    color: #1c1c1e;
    text-shadow: none;
}

/* Native layout for the former visual-builder intro and rating block. */
.kms-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, .55fr);
    gap: 28px;
    align-items: center;
    padding: 24px;
    background: #f1f0f0;
    box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}

.kms-intro-grid__table {
    min-width: 0;
}

.kms-intro-grid__table .tablepress {
    width: 100%;
    margin: 0;
}

.kms-rating {
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 12px;
    text-align: center;
}

.kms-rating__label,
.kms-rating__score {
    margin: 0;
    color: #f10000;
    font-size: 1.3rem;
    font-weight: 700;
}

.kms-rating__stars {
    display: flex;
    gap: 3px;
    color: #f0ad4e;
    font-family: Arial, sans-serif;
    font-size: 2.35rem;
    line-height: 1;
}

.kms-rating__stars span {
    display: block;
}

.kms-rating__stars .is-half {
    color: transparent;
    background: linear-gradient(90deg, #f0ad4e 50%, #fcfcfc 50%);
    background-clip: text;
}

.kms-intro-grid__download {
    margin: 28px 0 0;
    line-height: 0;
}

.kms-intro-grid__download a {
    display: inline-block;
    cursor: pointer;
}

.kms-intro-grid__download img {
    display: block;
    width: 156px;
    height: auto;
}

.kms-faq {
    display: grid;
    gap: 10px;
    margin: 36px 0;
}

.kms-faq__item {
    border: 1px solid #dedede;
    border-radius: 5px;
    background: #fff;
}

.kms-faq__item summary {
    position: relative;
    padding: 16px 48px 16px 18px;
    cursor: pointer;
    color: #1c1c1e;
    font-weight: 700;
    list-style: none;
}

.kms-faq__item summary::-webkit-details-marker {
    display: none;
}

.kms-faq__item summary::after {
    position: absolute;
    top: 50%;
    right: 19px;
    content: '+';
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-50%);
}

.kms-faq__item[open] summary::after {
    content: '−';
}

.kms-faq__item > p {
    margin: 0;
    padding: 0 18px 18px;
}

/* Responsive safeguards for the restored homepage content. */
html,
body {
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
}

pre {
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 760px) {

    .kms-faq {
        margin: 28px 0;
    }

    .kms-intro-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 16px;
    }

    .kms-intro-grid__download {
        margin-top: 18px;
    }
    .tfm-hero-wrapper,
    .wrap {
        padding-right: 16px;
        padding-left: 16px;
    }

    #tfm-hero .entry-wrapper {
        padding: 20px;
    }

    #tfm-hero .entry-title {
        font-size: clamp(1.75rem, 9vw, 2.35rem);
        line-height: 1.1;
    }

    #page-2 .entry-header {
        gap: 1.25rem;
    }

    #page-2 .single-entry-title {
        font-size: clamp(1.7rem, 8vw, 2.4rem);
        line-height: 1.15;
    }

    #page-2 .entry-content {
        overflow-wrap: anywhere;
    }

    #page-2 .tablepress {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .kms-header__inner {
        min-height: 76px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .kms-menu {
        padding-right: 8px;
    }

    .kms-menu__toggle {
        width: 36px;
        height: 36px;
    }

    .kms-header__logo {
        margin-left: 12px;
    }

    .kms-header__logo img {
        width: 155px;
    }

    .kms-search {
        padding-left: 8px;
    }

    .kms-search button {
        width: 44px;
        height: 40px;
        flex-basis: 44px;
    }

    .tfm-hero-wrapper,
    .wrap {
        padding-right: 12px;
        padding-left: 12px;
    }

    #tfm-hero .entry-wrapper {
        padding: 18px 14px;
    }

    #page-2 .entry-header,
    #page-2 .single-content-wrapper {
        padding-right: 0;
        padding-left: 0;
    }

    .kms-intro-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .kms-rating__stars {
        font-size: 1.95rem;
    }
}

@media (max-width: 360px) {
    .kms-header__logo img {
        width: 138px;
    }

    .kms-header__logo {
        margin-left: 8px;
    }

    .kms-search button {
        width: 40px;
        flex-basis: 40px;
    }

    .kms-rating__stars {
        font-size: 1.8rem;
    }
}

@media (min-width: 1280px) {
    .kms-header__inner {
        padding-right: 48px;
        padding-left: 48px;
    }

    .tfm-hero-wrapper,
    .wrap {
        padding-right: max(32px, calc((100vw - 1500px) / 2));
        padding-left: max(32px, calc((100vw - 1500px) / 2));
    }
}

.kms-header {
    position: relative;
    z-index: 300;
    width: 100%;
    margin: 0;
    color: #fff;
    background: linear-gradient(105deg, #89216b 0%, #a02570 34%, #dc4055 100%);
    border-radius: 0;
    box-shadow: 0 4px 10px rgba(50, 25, 45, .22);
}

.kms-header__inner {
    display: flex;
    align-items: center;
    min-height: 132px;
    padding: 0 40px;
}

.kms-menu {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
    padding-right: 19px;
    border-right: 1px solid rgba(255, 255, 255, .24);
}

.kms-menu__toggle {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
}

.kms-menu__toggle::-webkit-details-marker { display: none; }
.kms-menu__toggle:hover,
.kms-menu__toggle:focus-visible { background: rgba(255, 255, 255, .12); outline: none; }

.kms-menu__toggle svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
}

.kms-menu__panel {
    position: absolute;
    z-index: 301;
    top: calc(100% - 28px);
    left: -14px;
    display: grid;
    min-width: 235px;
    padding: 10px;
    background: #8e236b;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 10px 22px rgba(42, 15, 34, .25);
}

.kms-menu:not([open]) .kms-menu__panel {
    display: none;
}

.kms-menu__panel a {
    padding: 10px 13px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
}

.kms-menu__panel a:hover,
.kms-menu__panel a:focus-visible { background: rgba(255, 255, 255, .15); outline: none; }

.kms-header__logo {
    display: flex;
    align-items: center;
    margin-left: 34px;
    text-decoration: none;
}

.kms-header__logo img {
    display: block;
    width: 260px;
    height: auto;
}

.kms-header__nav {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    gap: 18px;
    min-width: 0;
    margin-left: 30px;
}

.kms-header__nav a {
    color: #fff;
    font-size: .94rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.kms-header__nav a:hover,
.kms-header__nav a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.kms-search {
    display: flex;
    align-items: center;
    width: min(390px, 38vw);
    margin-left: auto;
    padding-left: 26px;
    border-left: 1px solid rgba(255, 255, 255, .24);
}

.kms-search input {
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    color: #3d2540;
    background: #fff;
    border: 0;
    border-radius: 4px 0 0 4px;
    box-shadow: none;
}

.kms-search input::placeholder { color: #856f80; }
.kms-search input:focus { outline: 2px solid rgba(255, 255, 255, .82); outline-offset: -2px; }

.kms-search button {
    display: grid;
    width: 47px;
    height: 42px;
    flex: 0 0 47px;
    padding: 0;
    place-items: center;
    color: #fff;
    background: #c62e58;
    border: 0;
    border-radius: 0 4px 4px 0;
}

.kms-search button:hover,
.kms-search button:focus-visible { background: #ad2349; outline: none; }

.kms-search button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}

@media (max-width: 760px) {
    .kms-header { width: 100%; margin-top: 0; border-radius: 0; }
    .kms-header__inner { min-height: 82px; padding: 0 16px; }
    .kms-menu { padding-right: 12px; }
    .kms-header__logo { margin-left: 16px; }
    .kms-header__logo img { width: 177px; }
    .kms-search { width: auto; margin-left: auto; padding-left: 12px; }
    .kms-search input { width: 0; padding: 0; opacity: 0; pointer-events: none; }
    .kms-search button { border-radius: 4px; }
    .kms-header__nav { display: none; }
}

@media (max-width: 410px) {
    .kms-header__logo img { width: 145px; }
    .kms-header__inner { padding: 0 10px; }
    .kms-header__logo { margin-left: 10px; }
}
