/* tp-riven home */

body {
    box-sizing: border-box;
    min-height: 100vh;
    letter-spacing: 0;
    background-image: none;
    padding-top: 18px;
}

body::before {
    content: "";
    position: fixed;
    inset: -4px;
    z-index: 0;
    pointer-events: none;
    background-color: var(--bg-page);
    background-image: none;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% 100%;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--bg-soft) 50%, transparent);
    opacity: .18;
    background-size: auto, 28px 28px, 34px 34px;
}

.main_screen {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(var(--page-width), calc(100% - 64px));
    max-width: none;
    min-height: 100vh;
    box-sizing: border-box;
    margin: 0 auto;
    padding-bottom: 30px;
}

main {
    width: 100%;
    margin: 0 auto;
    flex: 1 0 auto;
}

a {
    color: var(--text-primary);
    transition: color .22s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}

a:hover {
    text-shadow: none;
    text-decoration: none;
}

.cat_menu.tp-header {
    position: static;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 0 17px;
    border: 0;
    border-bottom: 1px solid var(--line-primary);
    border-radius: 0;
    box-shadow: none !important;
    background: transparent;
    overflow: visible;
}

.tp-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    width: fit-content;
    min-width: max-content;
    color: #1F1A17;
    white-space: nowrap;
}

.tp-brand:hover {
    color: #1F1A17;
}

.tp-brand-text {
    color: #1F1A17;
    font-family: var(--font-logo);
    font-size: 40px;
    font-weight: 600;
    line-height: 1;
}

.tp-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    color: var(--text-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 26px;
    white-space: nowrap;
}

.tp-nav-item {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}

.tp-nav-link {
    position: relative;
    color: var(--text-body);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 9px;
    transition: background-color .2s ease, color .2s ease;
}

.tp-nav-link.is-active {
    color: var(--accent-brown);
}

.tp-nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent-brown);
    transform: translateX(-50%);
}

.tp-nav-caret {
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    transition: transform .22s ease;
}

.tp-subnav {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 30;
    min-width: 132px;
    padding: 8px 9px;
    border: 1px solid var(--line-secondary);
    border-radius: 8px;
    background: var(--bg-card);
    box-shadow: 0 14px 30px rgba(62, 57, 52, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 6px);
    transition: opacity .18s ease, transform .18s ease;
}

.tp-subnav::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
}

.tp-subnav-link {
    position: relative;
    display: block;
    margin: 2px 0;
    padding: 8px 13px;
    border-radius: 8px;
    color: var(--text-body);
    font-size: 13px;
    line-height: 20px;
    text-align: left;
}

.tp-subnav-link.is-active {
    color: var(--accent-brown);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-brown) 13%, var(--bg-card)), color-mix(in srgb, var(--accent-gold) 12%, var(--bg-soft)));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-brown) 8%, transparent);
}

.tp-nav-item.has-children:hover .tp-subnav,
.tp-nav-item.has-children:focus-within .tp-subnav,
.tp-nav-item.has-children.is-open .tp-subnav {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.tp-nav-item.has-children:hover .tp-nav-caret,
.tp-nav-item.has-children:focus-within .tp-nav-caret,
.tp-nav-item.has-children.is-open .tp-nav-caret {
    transform: rotate(225deg) translate(-2px, -2px);
}

.site-search {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: 32px;
    line-height: 1;
    margin-left: 0;
}

.search-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #5F5750;
    border-radius: 50%;
    line-height: 1;
}

.search-toggle svg {
    display: block;
    width: 16px;
    height: 16px;
}

.tp-nav-link:hover,
.tp-nav-link.is-active:hover,
.search-toggle:hover {
    color: var(--accent-brown);
}

:root[data-theme="dark"] .search-toggle {
    color: var(--text-body);
}

:root[data-theme="dark"] .search-toggle:hover {
    color: var(--accent-brown);
    background: rgba(51, 51, 51, .78);
}

.tp-subnav-link:hover {
    background: var(--bg-soft);
    color: var(--accent-brown);
}

.tp-subnav-link.is-active:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-brown) 13%, var(--bg-card)), color-mix(in srgb, var(--accent-gold) 12%, var(--bg-soft)));
}

.tp-nav-more {
    display: inline-flex;
}

.tp-nav-more[hidden] {
    display: none !important;
}

.tp-nav-more-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.tp-nav-more.is-open .tp-subnav {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.home-posts {
    position: relative;
    border: 1px solid var(--line-secondary);
    border-radius: 8px;
    background: var(--bg-card);
    box-shadow: 0 8px 22px rgba(62, 57, 52, 0.025);
    overflow: hidden;
    backdrop-filter: blur(1px);
}

.home-posts.is-first-home-block {
    margin-top: 20px;
}

.home-posts::before {
    content: "";
    position: absolute;
    left: clamp(22px, 3.2vw, 28px);
    top: 22px;
    bottom: 22px;
    width: 1px;
    background: color-mix(in srgb, var(--text-secondary) 42%, transparent);
}

.home-post {
    position: relative;
    min-height: clamp(66px, 9vw, 72px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    align-items: center;
    padding: 0 clamp(10px, 2.8vw, 22px) 0 0;
    border-bottom: 0;
    transition: background-color .22s ease;
}

.home-post::after {
    content: "";
    position: absolute;
    left: clamp(94px, 14.5vw, 116px);
    right: clamp(10px, 2.8vw, 22px);
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--line-secondary), color-mix(in srgb, var(--line-secondary) 44%, transparent));
}

.home-post:last-child {
    border-bottom: 0;
}

.home-post:last-child::after {
    display: none;
}

.home-post:hover {
    background: color-mix(in srgb, var(--bg-card) 36%, transparent);
}

.home-post::before {
    content: "";
    position: absolute;
    left: clamp(15px, 2.4vw, 21px);
    top: 50%;
    z-index: 1;
    width: 10px;
    height: 10px;
    border: 3px solid var(--text-secondary);
    border-radius: 50%;
    background: var(--bg-card);
    transform: translateY(-50%);
    box-shadow: 0 0 0 2px var(--bg-page), inset 0 0 0 2px var(--bg-card);
}

.home-post-link {
    min-width: 0;
    display: grid;
    grid-template-columns: clamp(94px, 14.5vw, 116px) minmax(0, 1fr);
    align-items: center;
    color: var(--text-primary);
}

.home-post-date {
    display: grid;
    justify-items: start;
    padding-left: clamp(40px, 6vw, 50px);
    color: #6E6258;
    line-height: 1;
}

.home-post-date span {
    color: #332B25;
    font-size: clamp(21px, 3vw, 24px);
    line-height: 1;
    font-weight: 400;
}

.home-post-date small {
    margin-top: 4px;
    color: #8B7C6E;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
}

.home-post-title {
    min-width: 0;
    overflow: hidden;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: clamp(0px, 1vw, 6px);
    font-size: clamp(14px, 2.1vw, 16px);
    font-weight: 600;
    line-height: clamp(22px, 3.2vw, 26px);
}

.home-post-link:hover .home-post-title {
    color: #5D4630;
}

.home-post-comments {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    min-width: 42px;
    color: #87786a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 16px;
    transition: color .22s ease;
}

.home-post:hover .home-post-comments {
    color: var(--accent-brown);
}

:root[data-theme="dark"] .home-posts {
    border-color: rgba(58, 58, 58, .95);
    background: #242424;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

:root[data-theme="dark"] .home-posts::before {
    background: rgba(215, 164, 107, .34);
}

:root[data-theme="dark"] .home-post {
    background: #242424;
}

:root[data-theme="dark"] .home-post:hover {
    background: #2B2B2B;
}

:root[data-theme="dark"] .home-post::after {
    background: linear-gradient(90deg, rgba(68, 68, 68, .9), rgba(68, 68, 68, .28));
}

:root[data-theme="dark"] .home-post::before {
    border-color: rgba(215, 164, 107, .55);
    background: #2B2B2B;
    box-shadow: 0 0 0 2px #1E1E1E, inset 0 0 0 2px #242424;
}

:root[data-theme="dark"] .home-post-link {
    color: var(--text-body);
}

:root[data-theme="dark"] .home-post-title,
:root[data-theme="dark"] .home-post-date,
:root[data-theme="dark"] .home-post-date span,
:root[data-theme="dark"] .home-post-date small,
:root[data-theme="dark"] .home-post-comments {
    color: var(--text-body);
}

:root[data-theme="dark"] .home-post:hover .home-post-title,
:root[data-theme="dark"] .home-post-link:hover .home-post-title {
    color: var(--accent-brown);
}

:root[data-theme="dark"] .home-post:hover .home-post-comments {
    color: var(--accent-brown);
}

.home-comment-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    background-color: currentColor;
    -webkit-mask: url("../static/images/comment.svg") center / contain no-repeat;
    mask: url("../static/images/comment.svg") center / contain no-repeat;
    opacity: .82;
    transform: translateY(1px);
}

.home-comment-icon::after {
    display: none;
    content: none;
}

.home-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 38px 0 50px 0;
}

.home-pagination li a,
.home-pagination-jump {
    display: inline-flex;
    align-items: center;
    height: 28px;
    border: 1px solid var(--line-primary);
    border-radius: 5px;
    background: #f9f9f9;
    box-shadow: none;
}

.home-pagination li a {
    justify-content: center;
    min-width: 28px;
    padding: 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1;
}

.home-pagination li.prev a,
.home-pagination li.next a {
    min-width: 58px;
    padding: 0 8px;
    background: #f9f9f9;
    text-align: center;
}

.home-page-text {
    display: inline;
}

.home-page-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-pagination li a[href]:hover {
    border-color: color-mix(in srgb, var(--accent-brown) 42%, var(--line-primary));
    background: color-mix(in srgb, var(--accent-brown) 10%, var(--bg-soft));
    color: var(--accent-brown);
}

.home-pagination li.active a {
    border-color: var(--accent-brown);
    background: var(--accent-brown);
    box-shadow: none;
    color: #fff;
}

.home-pagination li:not(.active) a:not([href]) {
    border-color: var(--line-primary);
    background: transparent;
    color: var(--text-muted);
    cursor: not-allowed;
}

.home-pagination-jump {
    width: 52px;
    background: var(--bg-soft);
    overflow: hidden;
    transition: width .22s ease, background-color .18s ease;
}

.home-pagination-jump:hover,
.home-pagination-jump:focus-within {
    border-color: color-mix(in srgb, var(--accent-brown) 42%, var(--line-primary));
    background: color-mix(in srgb, var(--accent-brown) 10%, var(--bg-soft));
}

.home-pagination-jump input {
    width: 0;
    min-width: 0;
    height: 15px;
    border: 0;
    outline: 0;
    padding: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    line-height: 20px;
    text-align: left;
    opacity: 0;
    transform: translateX(8px);
    transition: width .24s ease, padding .24s ease, opacity .18s ease, transform .24s ease;
}

.home-pagination-jump input::-webkit-outer-spin-button,
.home-pagination-jump input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.home-pagination-jump:hover input,
.home-pagination-jump:focus-within input {
    width: 34px;
    padding: 0 4px;
    opacity: 1;
    transform: translateX(0);
}

.home-pagination-jump button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 52px;
    flex: 0 0 52px;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    transition: background-color .18s ease, color .18s ease, opacity .18s ease;
}

.home-pagination-jump:hover button,
.home-pagination-jump:focus-within button {
    width: 26px;
    flex-basis: 26px;
}

.home-pagination-jump:hover button span,
.home-pagination-jump:focus-within button span {
    display: none;
}

.home-pagination-jump button:disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

.home-pagination-jump button:not(:disabled):hover {
    color: var(--accent-brown);
}

.home-pagination-jump button:not(:disabled):hover .home-page-icon {
    stroke-width: 3;
    transform: translateX(1px);
}

.home-pagination-jump button:not(:disabled):active {
    color: var(--accent-brown);
}

:root[data-theme="dark"] .home-pagination li a,
:root[data-theme="dark"] .home-pagination-jump {
    border-color: var(--line-primary);
    background: color-mix(in srgb, var(--bg-soft) 86%, #000);
    color: var(--text-secondary);
}

:root[data-theme="dark"] .home-pagination li.prev a,
:root[data-theme="dark"] .home-pagination li.next a,
:root[data-theme="dark"] .home-pagination-jump {
    background: color-mix(in srgb, var(--bg-soft) 88%, #000);
}

:root[data-theme="dark"] .home-pagination li a[href]:hover,
:root[data-theme="dark"] .home-pagination-jump:hover,
:root[data-theme="dark"] .home-pagination-jump:focus-within {
    border-color: color-mix(in srgb, var(--accent-brown) 48%, var(--line-primary));
    background: color-mix(in srgb, var(--accent-brown) 12%, var(--bg-soft));
    color: var(--accent-brown);
}

:root[data-theme="dark"] .home-pagination li.active a {
    border-color: var(--accent-brown);
    background: var(--accent-brown);
    color: #111;
}

:root[data-theme="dark"] .home-pagination li:not(.active) a:not([href]) {
    border-color: var(--line-primary);
    background: transparent;
    color: var(--text-muted);
}

:root[data-theme="dark"] .home-pagination-jump input {
    color: var(--text-body);
}

:root[data-theme="dark"] .home-pagination-jump button {
    color: var(--text-body);
}

:root[data-theme="dark"] .home-pagination-jump button:not(:disabled):hover,
:root[data-theme="dark"] .home-pagination-jump button:not(:disabled):active {
    color: var(--text-body);
}

:root[data-theme="dark"] .home-pagination-jump:hover input,
:root[data-theme="dark"] .home-pagination-jump:focus-within input,
:root[data-theme="dark"] .home-pagination-jump:hover button,
:root[data-theme="dark"] .home-pagination-jump:focus-within button {
    color: var(--text-body);
}

:root[data-theme="dark"] .home-pagination-jump:hover .home-page-icon,
:root[data-theme="dark"] .home-pagination-jump:focus-within .home-page-icon {
    color: var(--text-body);
    stroke: currentColor;
}

.float-right {
    z-index: 1500;
    right: 28px;
    bottom: 72px;
    display: grid;
    gap: 10px;
}

.operator-button {
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--float-border);
    border-radius: 12px;
    background: var(--float-bg);
    box-shadow: var(--float-shadow);
    color: var(--float-icon);
    transition: all .22s ease;
}

.operator-button:hover {
    border-color: var(--float-hover-border);
    background: var(--float-hover-bg);
    box-shadow: var(--float-hover-shadow);
    color: var(--float-hover-icon);
}

#backToTopBtn,
#postTocBtn,
#goToCommentsBtn {
    display: none;
    border-radius: 50%;
    background: var(--float-bg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(.96);
    transition: opacity .22s ease, transform .22s ease, border-color .22s ease, background-color .22s ease, color .22s ease;
}

#backToTopBtn.is-visible,
#postTocBtn.is-visible,
#goToCommentsBtn.is-visible {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#backToTopBtn:hover,
#postTocBtn:hover,
#goToCommentsBtn:hover {
    transform: translateY(-2px) scale(1);
    cursor: pointer;
}

#postTocBtn.is-active {
    border-color: var(--float-active-border);
    background: var(--float-active-bg);
    box-shadow: var(--float-active-shadow);
    color: var(--float-active-icon);
    transform: translateY(-2px) scale(1);
}

.tp-icon {
    display: block;
    width: 20px;
    height: 20px;
    color: currentColor;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

.tp-icon-top::before {
    display: none;
    content: none;
}

.tp-icon-top::after {
    display: none;
    content: none;
}

.tp-icon-comment {
    width: 22px;
    height: 22px;
    background-color: currentColor;
    stroke: none;
    -webkit-mask: url("../static/images/comment.svg") center / contain no-repeat;
    mask: url("../static/images/comment.svg") center / contain no-repeat;
}

.footer.ink-footer {
    flex: 0 0 auto;
    padding: 0;
    color: #93887E;
    font-size: 13px;
    line-height: 22px;
}

.footer-content {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.footer-content>span:not(:last-child)::after {
    content: "|";
    margin: 0 14px;
    color: #B8AEA2;
}

.footer-content>span:last-child {
    color: #8D8176;
    font-weight: 400;
}

.footer-content a {
    color: inherit;
}

.footer-rss-text::after {
    display: none;
    content: none;
}

.footer-rss a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #8D8176;
    line-height: 22px;
    text-decoration: none;
    transition: color .2s ease;
}

.footer-rss a:hover {
    color: #6D5641;
}

.footer-rss svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-rss svg circle {
    fill: currentColor;
    stroke: none;
}

.footer-rss-text {
    font-size: 13px;
}

:root[data-theme="dark"] .footer.ink-footer,
:root[data-theme="dark"] .footer-content,
:root[data-theme="dark"] .footer-content>span,
:root[data-theme="dark"] .footer-content a,
:root[data-theme="dark"] .footer-rss a {
    color: var(--text-body);
}

:root[data-theme="dark"] .footer-content a:hover,
:root[data-theme="dark"] .footer-rss a:hover {
    color: var(--accent-brown);
}

:root[data-theme="dark"] .footer-rss svg {
    color: currentColor;
    stroke: currentColor;
}

:root[data-theme="dark"] .footer-rss svg circle {
    fill: currentColor;
}

@media (max-width: 800px) {
    body::before {
        inset: -8px;
        background-position: center top;
        background-size: cover;
        filter: blur(1.35px);
        opacity: 0.78;
    }
    body::after {
        background: color-mix(in srgb, var(--bg-page) 28%, transparent);
    }
    .cat_menu.tp-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        min-height: auto;
        padding: 4px 0 16px;
    }
    .tp-brand {
        grid-column: 1;
        grid-row: 1;
    }
    .site-search {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
    .tp-brand-text {
        font-size: 38px;
    }
    .tp-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        gap: 10px;
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 10px;
        scrollbar-width: none;
    }
    .tp-nav::-webkit-scrollbar {
        display: none;
    }
    .tp-nav-more {
        display: none !important;
    }
    .tp-nav-item {
        position: relative;
    }
    .tp-subnav {
        position: fixed;
        left: var(--tp-subnav-left, 16px);
        top: var(--tp-subnav-top, 120px);
        right: auto;
        min-width: 140px;
        max-width: calc(100vw - 32px);
        z-index: 100;
        transform: translateY(6px);
    }
    .tp-nav-item.has-children:hover .tp-subnav,
    .tp-nav-item.has-children:focus-within .tp-subnav {
        opacity: 0;
        pointer-events: none;
        transform: translateY(6px);
    }
    .tp-nav-item.has-children.is-open .tp-subnav,
    .tp-subnav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .tp-nav-item.has-children.is-closing .tp-subnav {
        opacity: 0;
        pointer-events: none;
        transform: translateY(6px);
    }
    .home-posts::before {
        top: 20px;
        bottom: 20px;
    }
    .float-right {
        right: 16px;
        bottom: 32px;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 0;
        background-position: center top;
    }
    .tp-nav {
        gap: 10px;
        font-size: 14px;
    }
    .home-posts::before {
        top: 20px;
        bottom: 20px;
    }
    .home-post-date small {
        margin-top: 4px;
    }
    .home-comment-icon {
        width: 12px;
        height: 12px;
    }
    .home-post-comments {
        justify-content: flex-end;
        gap: 3px;
        font-size: 12px;
        line-height: 14px;
    }
    .home-pagination li.prev a,
    .home-pagination li.next a {
        min-width: 35px;
        width: 35px;
        padding: 0;
    }
    .home-pagination li.prev .home-page-text,
    .home-pagination li.next .home-page-text {
        display: none;
    }
    .footer-content {
        display: grid;
        gap: 4px;
    }
    .footer-content>span::after,
    .footer-rss-text::after {
        content: "" !important;
        margin: 0 !important;
    }
}

body.tp-home-layout {
    min-height: 100vh;
    background: var(--bg-page);
    padding-top: 58px;
}

body.tp-home-layout::before,
body.tp-home-layout::after {
    display: none;
}

body.tp-home-layout .main_screen {
    width: min(900px, calc(100% - 40px));
    max-width: 900px;
    min-height: calc(100vh - 58px);
    margin: 0 auto;
    padding: 0;
    background: var(--bg-card);
    border-radius: 8px 8px 0 0;
    box-shadow: none;
    overflow: visible;
}

body.tp-home-layout .footer.ink-footer {
    flex: 0 0 auto;
    margin: 0;
    padding: 18px 0 20px;
    border-top: 1px solid var(--line-primary);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.8;
}

body.tp-home-layout .footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: none;
    min-height: 12px;
    gap: 0 12px;
}

body.tp-home-layout .footer-content>span::after {
    display: none;
    content: none;
}

body.tp-home-layout .footer-content>span+span::before {
    content: "|";
    margin-right: 12px;
    color: var(--line-soft);
}

body.tp-home-layout .footer-content a {
    color: inherit;
    text-decoration: none;
}

body.tp-home-layout .footer-content a:hover {
    color: var(--accent-brown);
    text-decoration: none;
}

body.tp-home-layout .cat_menu.tp-header.tp-home-hero {
    position: static;
    top: auto;
    display: block;
    position: relative;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: var(--bg-card);
    border: 0;
    border-radius: 8px 8px 0 0;
    box-shadow: none;
}

body.tp-home-layout .cat_menu.tp-header.tp-home-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--line-primary);
    pointer-events: none;
}

.tp-home-hero-media {
    position: relative;
    display: grid;
    place-items: center;
    height: 380px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background-color: var(--bg-page);
    background-image: var(--tp-bg);
    background-position: center;
    background-size: cover;
}

.tp-home-hero-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .28);
}

.tp-home-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 13px;
    color: #fff;
    text-align: center;
}

.tp-home-title {
    color: #fff;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
}

.tp-home-title:hover {
    color: #fff;
}

.tp-home-description {
    margin: 0;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
}

.tp-home-search-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
}

.tp-home-search-hint svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tp-home-search-hint:hover {
    color: #fff;
    text-decoration: underline;
}

.tp-home-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 17px;
    margin-top: 12px;
}

.tp-home-socials a {
    display: inline-flex;
    width: 20px;
    height: 20px;
    color: #fff;
    opacity: 1;
    transition: color .18s ease, opacity .18s ease;
}

.tp-home-socials a:hover {
    color: #fff;
    opacity: 1;
}

.tp-home-socials svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tp-home-socials svg:not([fill="none"]),
.tp-home-socials svg:has([fill-rule]) {
    fill: currentColor;
    stroke: none;
    opacity: 1;
}

body.tp-home-layout .tp-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    height: 48px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line-primary);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
}

body.tp-home-layout .tp-nav-link {
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    line-height: 48px;
}

body.tp-home-layout .tp-nav-link:hover,
body.tp-home-layout .tp-nav-link.is-active {
    color: var(--text-primary);
    background: transparent;
}

body.tp-home-layout main {
    width: 100%;
    background: var(--bg-card);
}

.tp-home-feed {
    padding: 42px 60px 0;
    background: var(--bg-card);
}

.tp-home-entry {
    margin: 0 0 43px;
    padding: 0 0 46px;
}

.tp-home-entry:last-child {
    margin-bottom: 0;
}

.tp-home-entry-header {
    text-align: center;
}

.tp-home-entry-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 25px;
    font-weight: 400;
    line-height: 1.35;
}

.tp-home-entry-title a {
    color: inherit;
    text-decoration: none;
}

.tp-home-entry-title a:hover {
    color: var(--accent-brown);
}

.tp-home-entry-date {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.tp-home-entry-excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 25px 0 0;
    color: var(--text-body);
    font-size: 16px;
    line-height: 1.85;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.tp-home-readmore {
    display: inline-flex;
    margin-top: 15px;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tp-home-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 25px;
    padding-left: 12px;
    border-left: 1px solid var(--line-primary);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.tp-home-entry-meta span+span::before {
    content: "·";
    margin-right: 6px;
    color: var(--text-muted);
}

:root[data-theme="dark"] body.tp-home-layout .main_screen,
:root[data-theme="dark"] body.tp-home-layout .cat_menu.tp-header.tp-home-hero,
:root[data-theme="dark"] body.tp-home-layout .tp-nav,
:root[data-theme="dark"] body.tp-home-layout main,
:root[data-theme="dark"] body.tp-home-layout .tp-home-feed {
    background: var(--bg-card);
}

:root[data-theme="dark"] body.tp-home-layout .tp-home-entry-title,
:root[data-theme="dark"] body.tp-home-layout .tp-home-entry-title a,
:root[data-theme="dark"] body.tp-home-layout .tp-home-entry-excerpt,
:root[data-theme="dark"] body.tp-home-layout .tp-home-entry-date,
:root[data-theme="dark"] body.tp-home-layout .tp-home-readmore,
:root[data-theme="dark"] body.tp-home-layout .tp-home-entry-meta,
:root[data-theme="dark"] body.tp-home-layout .tp-nav-link {
    color: var(--text-body);
}

.tp-categories-page main,
.tp-tags-page main,
.tp-devices-page main {
    background: var(--bg-card);
}

.tp-categories-wrap {
    padding: 48px 60px 58px;
}

.tp-categories-head {
    margin-bottom: 28px;
    text-align: center;
}

.tp-categories-head h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.35;
}

.tp-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.tp-category-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line-primary);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tp-category-card:hover {
    border-color: rgba(15, 115, 12, .28);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tp-category-image {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--bg-soft);
}

.tp-category-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tp-category-body {
    display: block;
    padding: 17px 18px 18px;
}

.tp-category-body strong {
    display: block;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.tp-category-body span {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.tp-category-body em {
    display: block;
    margin-top: 12px;
    color: #0f730c;
    font-size: 13px;
    font-style: normal;
    line-height: 1.4;
}

.tp-tags-wrap {
    min-height: 310px;
    padding: 42px 70px 58px;
}

.tp-tags-wrap h1 {
    margin: 0 0 28px;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
}

.tp-tags-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 22px;
}

.tp-tag-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 15px;
    border-radius: 8px;
    background: #f9f9f9;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.tp-tag-item:hover {
    background: rgba(15, 115, 12, .08);
    color: #0f730c;
    transform: translateY(-1px);
}

.tp-devices-wrap {
    min-height: 560px;
    padding: 42px 60px 58px;
}

.tp-devices-wrap h1 {
    margin: 0 0 50px;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
}

.tp-devices-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tp-device-card {
    display: flex;
    min-height: 248px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-soft);
}

.tp-device-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 184px;
    padding: 18px 16px 10px;
}

.tp-device-image img {
    display: block;
    max-width: 90%;
    max-height: 150px;
    object-fit: contain;
}

.tp-device-info {
    display: block;
    padding: 0 10px 12px;
}

.tp-device-info span {
    display: block;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-device-info strong {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-devices-empty {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.tp-archive-page main {
    background: var(--bg-card);
}

.tp-archive-wrap {
    min-height: 560px;
    padding: 42px 60px 70px;
}

.tp-archive-wrap h1 {
    margin: 0 0 62px;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
}

.tp-archive-years {
    display: grid;
    gap: 78px;
}

.tp-archive-year {
    position: relative;
    display: grid;
    gap: 34px;
}

.tp-archive-year-mark {
    position: absolute;
    top: -14px;
    right: 18px;
    z-index: 0;
    color: color-mix(in srgb, var(--text-primary) 5%, transparent);
    font-size: 118px;
    font-weight: 700;
    font-style: italic;
    line-height: .9;
    pointer-events: none;
    user-select: none;
}

.tp-archive-month {
    position: relative;
    z-index: 1;
}

.tp-archive-month h2 {
    margin: 0 0 20px;
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.tp-archive-posts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 36px;
}

.tp-archive-posts a {
    display: block;
    overflow: hidden;
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.7;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-archive-posts a:hover {
    color: #0f730c;
}

.tp-archive-posts em {
    color: var(--text-secondary);
    font-style: italic;
}

.tp-archive-empty {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

:root[data-theme="dark"] .tp-categories-page main,
:root[data-theme="dark"] .tp-tags-page main,
:root[data-theme="dark"] .tp-devices-page main,
:root[data-theme="dark"] .tp-archive-page main {
    background: var(--bg-card);
}

:root[data-theme="dark"] .tp-categories-head h1,
:root[data-theme="dark"] .tp-tags-wrap h1,
:root[data-theme="dark"] .tp-devices-wrap h1,
:root[data-theme="dark"] .tp-archive-wrap h1 {
    color: var(--text-primary);
}

:root[data-theme="dark"] .tp-category-card {
    border-color: var(--line-primary);
    background: var(--bg-float);
    color: var(--text-primary);
}

:root[data-theme="dark"] .tp-category-card:hover {
    border-color: rgba(15, 115, 12, .55);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
    color: var(--text-primary);
}

:root[data-theme="dark"] .tp-category-image,
:root[data-theme="dark"] .tp-device-card,
:root[data-theme="dark"] .tp-tag-item {
    background: var(--bg-soft);
}

:root[data-theme="dark"] .tp-category-body strong,
:root[data-theme="dark"] .tp-device-info strong,
:root[data-theme="dark"] .tp-tag-item {
    color: var(--text-primary);
}

:root[data-theme="dark"] .tp-category-body span,
:root[data-theme="dark"] .tp-device-info span,
:root[data-theme="dark"] .tp-archive-month h2,
:root[data-theme="dark"] .tp-archive-posts a,
:root[data-theme="dark"] .tp-archive-posts em,
:root[data-theme="dark"] .tp-devices-empty,
:root[data-theme="dark"] .tp-archive-empty {
    color: var(--text-secondary);
}

:root[data-theme="dark"] .tp-tags-wrap {
    border-bottom-color: var(--line-primary);
}

:root[data-theme="dark"] .tp-tag-item:hover {
    background: rgba(15, 115, 12, .18);
    color: #8fd98b;
}

:root[data-theme="dark"] .tp-archive-posts a:hover,
:root[data-theme="dark"] .tp-category-body em {
    color: #8fd98b;
}

:root[data-theme="dark"] .tp-archive-year-mark {
    color: rgba(255, 255, 255, .055);
}

@media (max-width: 900px) {
    .tp-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tp-archive-posts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tp-devices-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    body.tp-home-layout {
        padding-top: 0;
    }
    body.tp-home-layout .main_screen {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        border-radius: 0;
    }
    .tp-home-hero-media {
        height: 300px;
        border-radius: 0;
    }
    body.tp-home-layout .tp-nav {
        justify-content: center;
        gap: 18px;
        width: 100%;
        padding: 0 18px 0;
        border-bottom: 1px solid var(--line-primary);
        overflow-x: auto;
        scrollbar-width: none;
    }
    body.tp-home-layout .tp-nav::-webkit-scrollbar {
        display: none;
    }
    .tp-home-feed {
        padding: 34px 16px 0;
    }
    .tp-categories-wrap {
        padding: 34px 16px 44px;
    }
    .tp-categories-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .tp-tags-wrap {
        min-height: 260px;
        padding: 34px 16px 44px;
    }
    .tp-tags-list {
        gap: 14px 12px;
    }
    .tp-devices-wrap {
        min-height: 420px;
        padding: 34px 16px 44px;
    }
    .tp-devices-wrap h1 {
        margin-bottom: 34px;
    }
    .tp-devices-grid {
        gap: 10px;
    }
    .tp-archive-wrap {
        min-height: 420px;
        padding: 34px 16px 48px;
    }
    .tp-archive-wrap h1 {
        margin-bottom: 38px;
    }
    .tp-archive-years {
        gap: 52px;
    }
    .tp-archive-year {
        gap: 26px;
    }
    .tp-archive-year-mark {
        top: -4px;
        right: 0;
        font-size: 72px;
    }
}

@media (max-width: 480px) {
    body.tp-home-layout {
        padding-top: 0;
    }
    body.tp-home-layout .main_screen {
        width: 100%;
        border-radius: 0;
    }
    body.tp-home-layout .cat_menu.tp-header.tp-home-hero,
    .tp-home-hero-media {
        border-radius: 0;
    }
    .tp-home-hero-media {
        height: 250px;
    }
    .tp-home-title {
        font-size: 28px;
    }
    .tp-home-socials {
        gap: 14px;
    }
    .tp-home-feed {
        padding: 30px 14px 0;
    }
    body.tp-home-layout .tp-nav {
        border-bottom: 1px solid var(--line-primary);
    }
    .tp-home-entry {
        margin-bottom: 36px;
        padding-bottom: 38px;
    }
    .tp-home-entry-title {
        font-size: 23px;
    }
    .tp-home-entry-excerpt {
        margin-top: 22px;
        font-size: 15px;
        -webkit-line-clamp: 5;
        line-clamp: 5;
    }
    .tp-categories-wrap {
        padding: 30px 14px 40px;
    }
    .tp-categories-head {
        margin-bottom: 22px;
    }
    .tp-categories-head h1 {
        font-size: 24px;
    }
    .tp-tags-wrap {
        padding: 30px 14px 40px;
    }
    .tp-tags-wrap h1 {
        margin-bottom: 24px;
        font-size: 24px;
    }
    .tp-tag-item {
        min-height: 32px;
        padding: 0 13px;
        font-size: 13px;
    }
    .tp-devices-wrap {
        padding: 30px 14px 40px;
    }
    .tp-devices-wrap h1 {
        margin-bottom: 28px;
        font-size: 24px;
    }
    .tp-device-card {
        min-height: 212px;
    }
    .tp-device-image {
        height: 150px;
        padding: 16px 10px 8px;
    }
    .tp-device-image img {
        max-width: 92%;
        max-height: 120px;
    }
    .tp-device-info span,
    .tp-device-info strong {
        font-size: 13px;
    }
    .tp-archive-wrap {
        padding: 30px 14px 42px;
    }
    .tp-archive-wrap h1 {
        margin-bottom: 32px;
        font-size: 24px;
    }
    .tp-archive-posts {
        grid-template-columns: 1fr;
        gap: 13px;
    }
    .tp-archive-month h2 {
        margin-bottom: 14px;
        font-size: 17px;
    }
    .tp-archive-year-mark {
        font-size: 54px;
    }
}
