/* Responsive layout refresh, 13 November 2026. Original CSS is backed up. */
:root {
    --ok-sidebar: 280px;
    --ok-gutter: clamp(20px, 2.2vw, 40px);
    --ok-ink: #202124;
    --ok-muted: #60656d;
    --ok-line: #e2e4e8;
    --ok-accent: #8b202b;
}

body {
    color: var(--ok-ink);
    padding-left: var(--ok-sidebar);
}

.site-content .section-inner,
.site-content .section-inner.wide,
.full-width-template main .section-inner {
    width: calc(100% - var(--ok-gutter) * 2);
    max-width: none;
}

.site-content .section-inner .section-inner {
    width: 100%;
}

/* Compact sidebar: one flexible scrolling area, no nested scrollbar. */
.site-header {
    width: var(--ok-sidebar);
    margin: 0;
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
}

.site-header .site-title {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.site-header .site-description {
    flex-shrink: 0;
    color: #b8bbc3;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 8px;
}

.site-header .menu-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    width: 100%;
    margin: 20px 0 14px;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.site-header .menu-wrapper::-webkit-scrollbar {
    display: none;
}

.main-menu.desktop {
    height: auto;
    overflow: visible;
}

.main-menu {
    list-style: none;
    padding: 0;
}

.main-menu li {
    margin: 0;
    line-height: 1.4;
}

.main-menu a {
    display: block;
    padding: 7px 6px;
    border: 0;
    border-radius: 4px;
    color: #dedfe3;
    font-size: 14.5px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.main-menu ul {
    list-style: none;
    margin: 0 0 0 18px;
}

.main-menu a:hover,
.main-menu a:focus-visible,
.main-menu .current-menu-item > a {
    background: rgba(255, 255, 255, .08);
    border: 0;
    color: #ffcf6c;
}

.site-header .social-menu.desktop {
    flex-shrink: 0;
    position: static;
    padding: 0;
    margin-top: auto;
}

.social-menu-inner {
    gap: 10px;
    margin: 0;
}

.social-menu li {
    margin: 0;
}

/* Shared alignment and calmer spacing for archives and search results. */
.page-header {
    padding: 32px 0 24px;
}

.page-subtitle {
    color: var(--ok-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.page-title {
    color: var(--ok-accent);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.posts ul {
    margin: 0;
    padding: 0;
}

.posts:first-child {
    margin-top: 32px;
}

.posts > ul + ul {
    margin-top: 28px;
}

.posts .list-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.posts .list-title a {
    color: var(--ok-muted);
}

.home .posts .list-title,
.home .posts .list-title a {
    color: var(--ok-accent);
}

.post-preview {
    border-color: var(--ok-line);
}

.post-preview a {
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    min-height: 44px;
}

.post-preview a .title {
    min-width: 0;
    font-size: 17px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.post-preview time {
    display: block;
    flex-shrink: 0;
    color: var(--ok-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-left: 0;
}

.post-preview a:hover,
.post-preview a:focus-visible {
    color: var(--ok-accent);
    text-decoration: none;
}

.post-preview a:hover .title span {
    border-bottom-color: currentColor;
}

/* Articles retain all their content; long code scrolls within its own box. */
.entry-header {
    margin: 26px auto 22px;
}

.entry-title {
    font-size: clamp(21px, 1.8vw, 25px);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.entry-content {
    font-size: 16px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.entry-content p {
    line-height: 1.65;
    margin-bottom: 16px;
}

/* Center the readable article column inside the area beside the sidebar. */
.single .site-content .section-inner,
.page .site-content .section-inner {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.site-content .section-inner .section-inner {
    margin-left: 0;
    margin-right: 0;
}

.entry-header .meta {
    margin-top: 16px;
}

.entry-content h1 { font-size: 25px; }
.entry-content h2 { font-size: 22px; }
.entry-content h3 { font-size: 19px; }
.entry-content h4 { font-size: 17px; }

.entry-content .alignleft {
    float: left;
    max-width: 38%;
    margin: 4px 22px 16px 0;
}

.entry-content .alignright {
    float: right;
    max-width: 38%;
    margin: 4px 0 16px 22px;
}

.entry-content img.size-full.alignleft,
.entry-content img.size-full.alignright {
    display: block;
    float: none;
    width: auto;
    max-width: 100%;
    max-height: 460px;
    margin: 20px auto;
}

.entry-content pre {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    white-space: pre;
    overflow-wrap: normal;
}

code[class*="language-"],
pre[class*="language-"] {
    font-size: 14px;
    line-height: 1.65;
}

.entry-content :not(pre) > code {
    overflow-wrap: anywhere;
    white-space: normal;
}

.entry-content img,
.entry-content video {
    max-width: 100%;
    height: auto;
}

.entry-content iframe,
.entry-content object,
.entry-content embed,
.entry-content .wp-caption {
    max-width: 100%;
}

.entry-content .alignwide,
.entry-content .alignfull,
.entry-content .alignnone,
.entry-content .gallery {
    left: auto;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.entry-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.meta {
    color: var(--ok-muted);
    font-size: 13px;
    line-height: 1.6;
}

hr {
    margin: 20px auto;
    width: 100%;
}

.entry-content > hr.ok-entry-divider:first-child {
    width: 100%;
    margin: 0 0 22px;
    border: 0;
    border-top: 1px solid var(--ok-line);
}

.site-content > .site-footer {
    margin-top: 48px;
    padding: 20px 0 28px;
    gap: 12px 24px;
    flex-wrap: wrap;
    border-color: var(--ok-line);
    font-size: 13px;
    text-align: left;
}

.site-footer p {
    line-height: 1.6;
}

.site-footer .theme-by {
    color: var(--ok-muted);
    margin-left: 0;
}

.search-overlay.active {
    left: var(--ok-sidebar);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #b45118;
    outline-offset: 4px;
}

@media (max-width: 1000px) {
    body {
        padding-left: 0;
    }

    .site-header {
        display: block;
        position: relative;
        width: 100%;
        max-width: none;
        min-height: 88px;
        padding: 18px 80px 18px 20px;
    }

    .site-header .site-title {
        font-size: 17px;
        line-height: 1.4;
    }

    .site-header .site-description {
        display: block;
        font-size: 13px;
        margin-top: 5px;
    }

    .nav-toggle {
        width: 44px;
        height: 44px;
        right: 18px;
        top: calc(50% - 22px);
    }

    .nav-toggle:before {
        inset: 0;
    }

    .nav-toggle .bar {
        right: 8px;
    }

    .nav-toggle .bar:nth-last-child(2) {
        margin-top: -4px;
    }

    .nav-toggle .bar:last-child {
        margin-top: 4px;
    }

    .nav-toggle.active .bar:nth-last-child(2) {
        margin-top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle.active .bar:last-child {
        margin-top: 0;
        transform: rotate(-45deg);
    }

    .mobile-menu-wrapper {
        padding: 132px 20px 24px;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        overscroll-behavior: contain;
        overflow-y: auto;
    }

    .mobile-menu-wrapper .main-menu {
        height: auto;
        margin-top: 0;
        padding: 0;
        overflow: visible;
    }

    .mobile-menu-wrapper .main-menu a {
        min-height: 44px;
        padding: 11px 8px;
        font-size: 16px;
    }

    .mobile-menu-wrapper .social-menu {
        position: static;
        max-width: none;
        padding: 20px 0 0;
    }

    .mobile-search {
        top: 0;
        bottom: 0;
        padding: 116px 20px 24px;
        overflow-y: auto;
        max-height: 100dvh;
    }

    .untoggle-mobile-search {
        height: 44px;
        min-height: 44px;
        position: relative;
    }

    .untoggle-mobile-search:before,
    .untoggle-mobile-search:after {
        top: 20px;
    }

    .mobile-search .search-field {
        font-size: 18px;
        width: 100%;
    }

    .mobile-results {
        width: 100%;
        margin-top: 24px;
    }

    .mobile-results ul {
        list-style: none;
        margin: 12px 0 0;
        padding: 0;
    }

    .mobile-results li {
        list-style: none;
        margin: 0;
    }

    input, textarea, select {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    :root {
        --ok-gutter: 18px;
    }

    .site-header {
        padding-left: 18px;
    }

    .site-header .site-description {
        display: none;
    }

    .page-header {
        padding: 24px 0;
    }

    .page-title {
        font-size: 16px;
    }

    .posts > ul + ul {
        margin-top: 24px;
    }

    .post-preview a {
        gap: 10px;
    }

    .post-preview a .title {
        font-size: 16px;
    }

    .post-preview time {
        display: none;
    }

    .entry-header {
        margin: 24px auto;
    }

    .entry-content {
        font-size: 16px;
    }

    .entry-content .alignleft,
    .entry-content .alignright {
        display: block;
        float: none;
        width: auto;
        max-width: 100%;
        margin: 0 auto 18px;
    }

    .entry-content h1,
    .entry-content h2,
    .entry-content h3,
    .entry-content h4 {
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    code[class*="language-"],
    pre[class*="language-"] {
        font-size: 13px;
    }

    .site-content > .site-footer {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-top: 36px;
        padding-bottom: 24px;
        gap: 8px;
    }

    .site-footer .theme-by {
        text-align: left;
    }

    input:not([type="checkbox"]):not([type="radio"]),
    textarea,
    select {
        font-size: 16px;
    }
}
