/* Full article layout stays scoped; fo-content-controls opts into reusable controls only. */
body.fo-article-layout .wrap {
    margin-top: 0;
}

body.fo-article-layout .site-main>article.post {
    padding-top: 28px;
    padding-bottom: 36px;
}

body.fo-article-layout .site-main>article.post>.entry-header {
    width: 100%;
    max-width: none;
    margin: 0 0 12px;
    padding: 0;
    text-align: left;
}

body.fo-article-layout .entry-header .cate-name {
    display: block;
    margin: 0 0 12px;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    text-transform: uppercase;
}

body.fo-article-layout .entry-header .cate-name a,
body.fo-article-layout .entry-header .single-authors a {
    color: #df0000;
    text-decoration: none;
}

body.fo-article-layout header.entry-header h1.entry-title {
    margin: 0 0 14px;
    max-width: none;
    font-size: clamp(32px, 3.45vw, 48px);
    font-size-adjust: none;
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -.025em;
    color: #191717;
    overflow-wrap: break-word;
}

body.fo-article-layout .entry-header .main-sub-title {
    min-height: 0;
    margin: 0 0 12px;
    font-size: 26px;
    line-height: 1.35;
}

body.fo-article-layout .entry-header .post-summary {
    min-height: 0;
    margin: 0 0 14px;
    padding: 0;
    color: #000;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.55;
}

body.fo-article-layout .entry-header .post-summary p {
    margin: 0;
}

body.fo-article-layout .entry-header .single-authors {
    margin: 0 0 16px;
    color: #df0000;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
    text-transform: uppercase;
}

body.fo-content-controls :is(.fo-article-related, .date-time-bookmark) :is(a, button):focus-visible,
body.fo-content-controls .fo-article-comments>summary:focus-visible {
    outline: 2px solid #df0000;
    outline-offset: 4px;
}

body.fo-article-layout .site-main>article.post>.post-thumbnail {
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
}

body.fo-article-layout .post-thumbnail>img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

body.fo-article-layout .post-thumbnail .caption {
    margin: 0;
    padding: 5px 0 0;
    color: #767676;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.45;
    font-family: var(--fo-label-font) !important;
}

body.fo-article-layout .content-row {
    display: block;
    margin: 20px 0 0;
    width: 100%;
}

body.fo-article-layout .content-row>.entry-meta {
    display: none !important;
}

body.fo-article-layout article .entry-content-right {
    float: none;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.fo-content-controls .date-time-bookmark {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 32px;
    padding: 0;
    border: 0;
}

body.fo-content-controls .date-time-bookmark .posted-on-single-post {
    margin: 0;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    text-transform: none;
}

body.fo-content-controls .new_icons_wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
}

body.fo-content-controls .new_icons_wrap>div {
    margin: 0;
}

/* Use the current CBX icon element instead of the legacy remote pseudo-icon. */
body.fo-content-controls :is(.new_icons_wrap, .fo-article-card__bookmark) .cbxwpbkmarktrig {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-width: 24px;
    min-height: 24px;
}

body.fo-content-controls :is(.new_icons_wrap, .fo-article-card__bookmark) .cbxwpbkmarktrig::before {
    content: none;
    display: none;
}

body.fo-content-controls :is(.new_icons_wrap, .fo-article-card__bookmark) .cbxwpbkmarktrig-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    background: url("../images/bookmark-off.svg") center / contain no-repeat;
    transition: background-image 160ms ease;
}

body.fo-content-controls :is(.new_icons_wrap, .fo-article-card__bookmark) .cbxwpbkmarktrig:not(.cbxwpbkmarktrig-marked):hover .cbxwpbkmarktrig-icon,
body.fo-content-controls :is(.new_icons_wrap, .fo-article-card__bookmark) .cbxwpbkmarktrig:not(.cbxwpbkmarktrig-marked):focus-visible .cbxwpbkmarktrig-icon {
    background-image: url("../images/bookmark-hover.svg");
}

body.fo-content-controls :is(.new_icons_wrap, .fo-article-card__bookmark) .cbxwpbkmarktrig-marked .cbxwpbkmarktrig-icon {
    background-image: url("../images/bookmark-on.svg");
}

body.fo-content-controls .nonmember-bookmark-tag a:hover img,
body.fo-content-controls .nonmember-bookmark-tag a:focus-visible img {
    content: url("../images/bookmark-hover.svg");
}

body.fo-article-layout .fo-article-card__bookmark .cbxwpbkmarktrig-icon {
    flex-basis: 14px;
    width: 14px;
    height: 17px;
}

body.fo-content-controls :is(.new_icons_wrap, .fo-article-card__bookmark) .cbxwpbkmarktrig-label {
    display: inline;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

body.fo-content-controls .article_comment_icon .tooltip {
    pointer-events: none;
}

body.fo-content-controls .new_icons_wrap img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

body.fo-article-layout .entry-content.full_post {
    display: flow-root;
    width: 100%;
    max-width: none;
    margin: 0;
    margin-right: 0px;
    margin-left: 0px;
    padding: 0;
    color: #191717;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

body.fo-article-layout .entry-content.full_post p {
    margin: 0 0 20px;
}

body.fo-article-layout .entry-content.full_post>p:first-child::first-letter {
    float: left;
    margin: 4px 10px 0 0;
    padding: 0;
    color: #df0000;
    font-weight: 400;
    font-size: 88px;
    line-height: .85;
}

body.fo-article-layout .entry-content.full_post :is(img, video, iframe) {
    max-width: 100%;
}

body.fo-article-layout .entry-content.full_post :is(figure, .wp-caption) {
    max-width: 100%;
    box-sizing: border-box;
}

body.fo-article-layout .entry-content.full_post :is(h2, h3, h4) {
    line-height: 1.3;
}

body.fo-article-layout .fo-article-related {
    margin: 42px 0 30px;
}

body.fo-article-layout .fo-article-related__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

body.fo-article-layout .fo-article-card {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

body.fo-article-layout .fo-article-card__image {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f1f1f1;
}

body.fo-article-layout .fo-article-card__image img {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

body.fo-article-layout .fo-article-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin: 6px 0 3px;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
}

body.fo-article-layout .fo-article-card a {
    color: #222;
    text-decoration: none;
}

body.fo-article-layout .fo-article-card a:hover {
    color: #df0000;
}

body.fo-article-layout .fo-article-card__bookmark {
    flex: 0 0 auto;
}

body.fo-article-layout .fo-article-card__bookmark :is(svg, img) {
    width: 14px;
    height: 17px;
}

body.fo-article-layout .fo-article-card h3 {
    margin: 0 0 8px;
    padding: 0;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.3;
}

body.fo-article-layout .fo-article-card__byline {
    font-family: var(--fo-label-font) !important;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
}

body.fo-article-layout .fo-article-card__byline a {
    font-weight: 400;
}

body.fo-content-controls .fo-article-comments {
    width: 100%;
    margin: 30px 0 0;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
}

body.fo-content-controls .fo-article-comments>summary {
    display: flex;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #dedede;
    border-radius: 10px;
    background: #fafafa;
    color: #222;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

body.fo-content-controls .fo-article-comments>summary::-webkit-details-marker {
    display: none;
}

body.fo-content-controls .fo-article-comments>summary::marker {
    content: '';
}

body.fo-content-controls .fo-article-comments>summary:hover,
body.fo-content-controls .fo-article-comments[open]>summary {
    border-color: #df0000;
    background: #fff7f7;
}

body.fo-content-controls .fo-article-comments__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 8px;
    background: #fff;
    color: #df0000;
}

body.fo-content-controls .fo-article-comments__icon svg {
    width: 23px;
    height: 23px;
}

body.fo-content-controls .fo-article-comments__label {
    flex: 1;
}

body.fo-content-controls .fo-article-comments__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    color: #666;
}

body.fo-content-controls .fo-article-comments__toggle svg {
    width: 18px;
    height: 18px;
    transform: rotate(90deg);
}

body.fo-content-controls .fo-article-comments[open] .fo-article-comments__toggle svg {
    transform: rotate(-90deg);
    color: #df0000;
}

body.fo-content-controls .fo-article-comments>.comments-wrapper {
    padding-top: 24px;
}

/* Discussion panel. The existing plugin still owns authentication and comments. */
body.fo-content-controls .fo-article-comments>.fo-article-comment-panel {
    box-sizing: border-box;
    margin: 16px 0 0;
    padding: 28px;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    background: #fff;
    scroll-margin-top: 145px;
}

body.fo-content-controls .fo-article-comment-panel--guest {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
}

body.fo-content-controls .fo-article-comment-panel--guest>.wpdiscuz_top_clearing {
    display: none;
}

body.fo-content-controls .fo-article-comment-panel--guest>#comments {
    grid-column: 2;
    grid-row: 1;
}

body.fo-content-controls .fo-article-comment-panel__intro {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

body.fo-content-controls .fo-article-comment-panel__intro>div {
    min-width: 0;
}

body.fo-content-controls .fo-article-comment-panel__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 50%;
    color: #df0000;
    background: #fff1f1;
}

body.fo-content-controls .fo-article-comment-panel__icon svg {
    width: 26px;
    height: 26px;
}

body.fo-content-controls .fo-article-comment-panel__intro h3 {
    margin: 0 0 6px;
    padding: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #222;
}

body.fo-content-controls .fo-article-comment-panel__intro p {
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #626262;
}

body.fo-content-controls .fo-article-comment-panel #comments,
body.fo-content-controls .fo-article-comment-panel #wpdcom {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

body.fo-content-controls .fo-article-comment-panel--guest #wpdcom .wpd-form-wrap,
body.fo-content-controls .fo-article-comment-panel--guest #wpdcom .wpd-form-head,
body.fo-content-controls .fo-article-comment-panel--guest #wpdcom .wpd-auth,
body.fo-content-controls .fo-article-comment-panel--guest #wpdcom .wpd-login {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
}

body.fo-content-controls .fo-article-comment-panel--guest #wpdcom .wpd-form-head {
    display: block;
    min-height: 0;
}

body.fo-content-controls .fo-article-comment-panel--guest #wpdcom .wpd-login-to-comment {
    display: none;
}

body.fo-content-controls .fo-article-comment-panel #wpdcom .wpd-auth .wpd-login .fo-article-comment-login {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid #df0000;
    border-radius: 8px;
    background: #df0000;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
}

body.fo-content-controls .fo-article-comment-panel #wpdcom .wpd-auth .wpd-login .fo-article-comment-login:hover {
    opacity: 1;
    background: #b90000;
    border-color: #b90000;
}

body.fo-content-controls .fo-article-comment-login svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

body.fo-content-controls .fo-article-comment-login:focus-visible {
    outline: 2px solid #222;
    outline-offset: 4px;
}

body.fo-content-controls .fo-article-comment-panel--member>.fo-article-comment-panel__intro {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e6e6e6;
}

body.fo-content-controls .fo-article-comment-panel--member #wpdcom .wpd-form-head {
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e6e6e6;
}

body.fo-content-controls .fo-article-comment-panel--member #wpdcom :is(.ql-toolbar, .ql-container, textarea, input[type="text"], input[type="email"]) {
    border-color: #d8d8d8;
}

body.fo-content-controls .fo-article-comment-panel--member #wpdcom .ql-toolbar {
    border-radius: 8px 8px 0 0;
    background: #fafafa;
}

body.fo-content-controls .fo-article-comment-panel--member #wpdcom .ql-container {
    border-radius: 0 0 8px 8px;
}

body.fo-content-controls .fo-article-comment-panel--member #wpdcom .wpd-prim-button {
    min-height: 44px;
    background-color: #df0000 !important;
    border-radius: 8px !important;
}

/* wpDiscuz controls show/fadeOut; keep its progress feedback clear of the header. */
body.fo-content-controls #wpdiscuz-loading-bar {
    display: none;
    position: fixed;
    top: auto;
    right: auto;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000000;
    box-sizing: border-box;
    width: auto;
    min-width: 190px;
    max-width: calc(100vw - 32px);
    height: auto;
    min-height: 54px;
    margin: 0;
    padding: 15px 22px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    color: #222;
    box-shadow: 0 6px 28px rgb(0 0 0 / 18%);
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

body.fo-content-controls #wpdiscuz-loading-bar::before {
    content: '';
    display: inline-block;
    box-sizing: border-box;
    width: 21px;
    height: 21px;
    margin: 0 12px 0 0;
    border: 3px solid #f6cccc;
    border-top-color: #df0000;
    border-radius: 50%;
    background: none;
    box-shadow: none;
    vertical-align: middle;
    animation: fo-comment-loading-spin .8s linear infinite;
}

@keyframes fo-comment-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.fo-content-controls #wpdiscuz-loading-bar::before {
        animation: none;
    }
}

@media (max-width: 768px) {
    body.fo-article-layout .site-main>article.post {
        padding-top: 22px;
        padding-bottom: 20px;
    }

    body.fo-article-layout header.entry-header h1.entry-title {
        font-size: 32px;
        line-height: 1.2;
        letter-spacing: -.015em;
        margin-bottom: 12px;
    }
    body.fo-article-layout .entry-header .post-summary{font-size:14px; line-height: 1.3;}
    body.fo-article-layout .entry-header .single-authors, body.fo-social-share .fo-article-share__label,
    body.fo-content-controls .date-time-bookmark .posted-on-single-post{font-size:14px;}

    body.fo-article-layout .entry-header .cate-name {
        font-size: 14px;
        margin-bottom: 10px;
    }

    body.fo-article-layout .entry-header .main-sub-title {
        font-size: 21px;
    }

    body.fo-article-layout .post-thumbnail .caption {
        font-size: 12px;
    }

    body.fo-article-layout .post-thumbnail>img {
        aspect-ratio: 3 / 2;
    }

    body.fo-article-layout .content-row {
        margin-top: 12px;
    }

    body.fo-content-controls .date-time-bookmark {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding-bottom: 10px;
        margin-bottom: 22px;
        border-bottom: 1px solid #d5d5d5;
    }

    body.fo-content-controls .new_icons_wrap {
        width: 100%;
        gap: 12px;
    }

    body.fo-content-controls .new_icons_wrap .cbxwpbkmarktrig {
        min-width: 32px;
        min-height: 44px;
    }

    body.fo-content-controls .new_icons_wrap .cbxwpbkmarktrig-icon {
        flex-basis: 20px;
        width: 20px;
        height: 20px;
    }

    body.fo-content-controls .new_icons_wrap :is(#scrollToComments, #printButton > a, .bookmarkspan > a) {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        min-width: 32px;
        min-height: 44px;
    }

    body.fo-content-controls .new_icons_wrap img {
        width: 20px;
        height: 20px;
    }

    body.fo-article-layout .entry-content.full_post p {
        margin-bottom: 18px;
    }

    body.fo-article-layout .entry-content.full_post>p:first-child::first-letter {
        font-size: 64px;
        margin-top: 5px;
        margin-right: 8px;
    }

    body.fo-article-layout .entry-content.full_post h2.wp-block-heading {
        font-size: 24px;
        margin: 24px 0 16px;
    }

    body.fo-article-layout .fo-article-related {
        margin-top: 30px;
    }

    body.fo-article-layout .fo-article-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
    }

    body.fo-article-layout .fo-article-related__heading a {
        font-size: 17px;
    }

    body.fo-article-layout .fo-article-card h3 {
        font-size: 14px;
    }

    body.fo-article-layout .fo-article-card__byline {
        font-size: 12px;
    }

    body.fo-content-controls .fo-article-comments>summary {
        padding: 12px;
        gap: 10px;
        font-size: 16px;
    }

    body.fo-content-controls .fo-article-comments__icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    body.fo-content-controls .fo-article-comments>.fo-article-comment-panel {
        padding: 20px 16px;
        scroll-margin-top: 85px;
    }

    body.fo-content-controls .fo-article-comment-panel--guest {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    body.fo-content-controls .fo-article-comment-panel--guest>#comments {
        grid-column: 1;
        grid-row: 2;
    }

    body.fo-content-controls .fo-article-comment-panel--guest #wpdcom .wpd-auth,
    body.fo-content-controls .fo-article-comment-panel--guest #wpdcom .wpd-login {
        display: block;
        width: 100%;
    }

    body.fo-content-controls .fo-article-comment-panel__intro {
        align-items: flex-start;
        gap: 12px;
    }

    body.fo-content-controls .fo-article-comment-panel__icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    body.fo-content-controls .fo-article-comment-panel__icon svg {
        width: 22px;
        height: 22px;
    }

    body.fo-content-controls .fo-article-comment-panel__intro h3 {
        font-size: 21px;
    }

    body.fo-content-controls .fo-article-comment-panel__intro p {
        font-size: 14px;
    }

    body.fo-content-controls .fo-article-comment-panel #wpdcom .wpd-auth .wpd-login .fo-article-comment-login {
        width: 100%;
    }
    body.fo-article-layout .entry-content.full_post{font-size:18px;}
}
@media (max-width: 479px) {
    body.fo-article-layout .entry-header .cate-name {
    font-size: 12px;
    }
body.fo-article-layout header.entry-header h1.entry-title {
    font-size: 24px;
    line-height: 1.2;
  }
   body.fo-article-layout .entry-header .single-authors, body.fo-social-share .fo-article-share__label, body.fo-content-controls .date-time-bookmark .posted-on-single-post {
    font-size: 12px;
  }
   body.fo-article-layout .entry-header .single-authors, body.fo-social-share .fo-article-share__label, body.fo-content-controls .date-time-bookmark .posted-on-single-post {
    font-size: 14px;
  }
  body.fo-article-layout .fo-article-card__meta{font-size:12px;}
    body.fo-article-layout .entry-content.full_post {
    font-size: 16px;
  }
}

@media (max-width: 359px) {
    body.fo-article-layout header.entry-header h1.entry-title {
        font-size: 25px;
    }

    body.fo-content-controls .date-time-bookmark .posted-on-single-post {
        width: 100%;
    }

    body.fo-article-layout .fo-article-related__grid {
        gap: 22px 12px;
    }

    body.fo-article-layout .fo-article-card h3 {
        font-size: 14px;
    }
}

@media print {
    body.fo-content-controls :is(.new_icons_wrap, .fo-article-related, .fo-article-comments) {
        display: none !important;
    }

    body.fo-article-layout .entry-content.full_post {
        font-size: 12pt;
        line-height: 1.5;
    }
}


