/*
Theme Name: Polykum
Description: Polykum's block theme, built on Twenty Twenty-Five.
Author: Polykum
Template: twentytwentyfive
Version: 1.0.1
Requires at least: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: polykum
*/

/* Brown Pro: Polykum's headline typeface since 2022, formerly loaded by the Use Any Font plugin.
   Its web licence is unconfirmed. Body text and subheads stay Georgia. */
@font-face {
    font-family: 'Brown Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/brown-pro-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Brown Pro';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('assets/fonts/brown-pro-bold.woff2') format('woff2');
}
:root { --polykum-headline-font: 'Brown Pro', Arial, Helvetica, sans-serif; }

/* Header geometry: a masthead above the menu, then a compact reading bar. */
.polykum-header {
    --header-ink: #19201d;
    --header-paper: #fffefa;
    --header-rule: #dedfd8;
    --header-ease: cubic-bezier(.22, 1, .36, 1);
    color: var(--header-ink);
    background: var(--header-paper);
    border-bottom: 1px solid var(--header-rule);
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    z-index: 100;
}

/* Reserve the expanded height so shrinking never moves the article or scroll position. */
header.wp-block-template-part:has(> .polykum-header) {
    height: 160px;
    margin: 0;
}
header.wp-block-template-part > .polykum-header {
    position: fixed;
    inset: var(--wp-admin--admin-bar--height, 0px) 0 auto;
    width: 100%;
}
.polykum-header__inner {
    position: relative;
    height: 160px;
    max-width: 1180px;
    margin: 0 auto;
    width: calc(100% - 80px);
    transition: height 360ms var(--header-ease);
}
.polykum-brand {
    position: absolute;
    /* Centre the 170px expanded logo without a percentage transform on a
       changing-width box: Safari can otherwise snap when the transition ends. */
    left: calc(50% - 85px);
    top: 6px;
    width: max-content;
    text-align: center;
    transition: left 360ms var(--header-ease), top 360ms var(--header-ease);
}
.polykum-wordmark {
    width: 170px;
    margin: 0;
    line-height: 0;
    transition: width 360ms var(--header-ease);
}
.polykum-wordmark a { display: block; }
/* Image blocks in templates can't carry width/height attributes (the editor
   rejects them), so the aspect ratios reserve the logos' space before loading. */
.polykum-wordmark img { display: block; width: 100%; height: auto; aspect-ratio: 1773 / 954; }
.polykum-brand__caption {
    margin: 6px 0 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    line-height: 1;
    transition: opacity 180ms ease;
}
.polykum-header nav.polykum-navigation {
    position: absolute;
    inset: auto 0 0;
    min-height: 52px;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .075em;
    text-transform: uppercase;
    transition: left 360ms var(--header-ease), min-height 360ms var(--header-ease);
}
nav.polykum-navigation .wp-block-navigation__container { gap: 28px; font-size: 13px; }
nav.polykum-navigation a { text-decoration: none; }
nav.polykum-navigation a:hover { text-decoration: underline; text-underline-offset: 5px; }
.polykum-header a:focus-visible,
.polykum-header button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
nav.polykum-navigation .wp-block-navigation-item__content { padding-block: 12px; }
nav.polykum-navigation .wp-block-navigation-submenu__toggle { margin-left: 5px; }
nav.polykum-navigation .wp-block-navigation__submenu-container {
    background: var(--header-paper);
    border: 1px solid var(--header-rule);
    padding: 8px;
    min-width: 210px;
    box-shadow: 0 12px 24px #19201d0d;
    font-size: 12px;
    letter-spacing: .025em;
}
nav.polykum-navigation .wp-block-navigation__container > .wp-block-navigation-submenu:nth-last-child(-n+2) > .wp-block-navigation__submenu-container {
    left: auto;
    right: 0;
}
.polykum-header.is-scrolled { background: var(--header-paper); box-shadow: 0 4px 18px #19201d08; }
.polykum-header.is-scrolled .polykum-header__inner { height: 72px; }
.polykum-header.is-scrolled .polykum-brand { left: 0; top: 10px; }
.polykum-header.is-scrolled .polykum-wordmark { width: 94px; }
.polykum-header.is-scrolled .polykum-brand__caption { opacity: 0; }
.polykum-header.is-scrolled nav.polykum-navigation { left: 190px; min-height: 72px; justify-content: flex-end; }
.polykum-header.is-scrolled .wp-block-navigation__responsive-container-content { justify-content: flex-end; }

/* Subscription is a utility action, separate from the editorial sections. */
.polykum-header .polykum-header__actions {
    position: absolute;
    top: 36px;
    right: 0;
    margin: 0;
    transition: top 360ms var(--header-ease);
}
.polykum-header__actions .wp-block-button .wp-block-button__link {
    padding: 12px 18px;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid var(--header-ink);
    border-radius: 0;
    background: transparent;
    color: var(--header-ink);
    font: 600 12px/18px Arial, Helvetica, sans-serif;
    letter-spacing: .075em;
    text-transform: uppercase;
    text-decoration: none;
}
.polykum-header__actions .wp-block-button__link:hover {
    background: var(--header-ink);
    color: var(--header-paper);
}
nav.polykum-navigation .polykum-subscribe-mobile { display: none; }
.polykum-header.is-scrolled .polykum-header__actions { top: 14px; }
.polykum-header.is-scrolled nav.polykum-navigation { left: 120px; right: 205px; }
.polykum-header.is-scrolled nav.polykum-navigation .wp-block-navigation__container { gap: 20px; }

@media (max-width: 1000px) {
    .polykum-header .polykum-header__actions { display: none; }
    .polykum-header nav.polykum-navigation .polykum-subscribe-mobile {
        display: flex;
        border-top: 1px solid var(--header-rule);
        margin-top: 12px;
    }
    header.wp-block-template-part:has(> .polykum-header) { height: 80px; }
    .polykum-header__inner,
    .polykum-header.is-scrolled .polykum-header__inner { height: 80px; width: calc(100% - 40px); }
    .polykum-brand { left: calc(50% - 47px); top: 8px; }
    .polykum-wordmark { width: 94px; }
    .polykum-brand__caption { margin-top: 6px; font-size: 8px; }
    .polykum-header.is-scrolled .polykum-brand { top: 14px; }
    .polykum-header nav.polykum-navigation,
    .polykum-header.is-scrolled nav.polykum-navigation { inset: 0 0 auto auto; min-height: 80px; }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container-open { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container.is-menu-open {
        top: calc(80px + var(--wp-admin--admin-bar--height, 0px));
        padding: 12px 24px max(28px, env(safe-area-inset-bottom));
        background: var(--header-paper) !important;
        animation: none;
        transform: none;
        color: var(--header-ink);
        border-top: 1px solid var(--header-rule);
        overflow-y: auto;
    }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container-close {
        position: fixed;
        top: calc(18px + var(--wp-admin--admin-bar--height, 0px));
        right: 20px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--header-paper);
    }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding: 0; align-items: stretch; }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0; align-items: stretch; width: 100%; }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { align-items: stretch; width: 100%; }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: 16px 0; }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
        padding: 0 0 10px 20px;
        border: 0;
        box-shadow: none;
        font-weight: 400;
        text-transform: none;
    }
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 12px 0; }
}

/* In the Site Editor the header remains in document flow. */
.editor-styles-wrapper .polykum-header { position: relative; inset: auto; }
.editor-styles-wrapper .polykum-brand,
.editor-styles-wrapper .polykum-header nav.polykum-navigation { position: relative; inset: auto; transform: none; margin-inline: auto; }
.editor-styles-wrapper .polykum-header__inner { height: auto; padding-block: 20px; }
.editor-styles-wrapper .polykum-header .polykum-header__actions { position: relative; inset: auto; margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
    .polykum-header *, .polykum-header *::before, .polykum-header *::after { transition: none !important; animation: none !important; }
}

/* Article feeds (homepage and archives): shared tokens, meta line, list and pagination. The homepage adds two lead stories. */
.polykum-feed {
    --wp--style--global--content-size: 1180px;
    --feed-ink: #19201d;
    --feed-muted: #636964;
    --feed-rule: #d8dad4;
    box-sizing: border-box;
    color: var(--feed-ink);
    margin-block: 0;
    padding-block: clamp(36px, 4vw, 56px) clamp(72px, 9vw, 128px);
}
.polykum-feed a { color: inherit; }
.polykum-feed .wp-block-post-title a { text-decoration: none; }
.polykum-feed .wp-block-post-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }
.polykum-feed .wp-block-post-title a:focus-visible,
.polykum-feed .wp-block-post-featured-image a:focus-visible,
.polykum-feed__pagination a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.polykum-home__lead { width: 100%; }
.polykum-home__lead .wp-block-post-template {
    gap: clamp(32px, 5vw, 72px);
    margin: 0;
}
.polykum-home__lead .wp-block-post {
    border-top: 3px solid var(--feed-ink);
    margin: 0;
    padding-top: 18px;
}
.polykum-home__lead .wp-block-post-featured-image {
    margin: 0 0 22px;
    overflow: hidden;
}
.polykum-home__lead .wp-block-post-featured-image img { transition: transform 300ms ease; }
.polykum-home__lead .wp-block-post-featured-image:hover img { transform: scale(1.015); }
.polykum-home__lead-body { margin: 0; }
.polykum-home__lead .wp-block-post-title {
    font-family: var(--polykum-headline-font);
    font-size: clamp(2rem, 3.3vw, 3.25rem);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.02;
    margin: 18px 0 16px;
}
.polykum-home__lead .wp-block-post-excerpt { margin: 0; }
.polykum-home__lead .wp-block-post-excerpt__excerpt {
    color: var(--feed-muted);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.08rem;
    line-height: 1.55;
    margin: 0;
}
.polykum-feed .wp-block-post-excerpt__more-text { margin: 16px 0 0; }
.polykum-feed .wp-block-post-excerpt__more-link {
    font-family: Arial, Helvetica, sans-serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-transform: uppercase;
}
.polykum-feed__meta {
    color: var(--feed-muted);
    column-gap: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .69rem;
    font-weight: 600;
    letter-spacing: .075em;
    line-height: 1.45;
    margin: 0;
    text-transform: uppercase;
}
.polykum-feed__meta .wp-block-post-terms,
.polykum-feed__meta .wp-block-post-date { margin: 0; }
.polykum-feed__meta .wp-block-post-terms { color: var(--feed-ink); }
.polykum-feed__meta .wp-block-post-terms a { text-decoration: none; }
.polykum-feed__meta .wp-block-post-terms a:hover { text-decoration: underline; text-underline-offset: 3px; }
.polykum-feed__meta .wp-block-post-date::before { color: var(--feed-rule); content: '/'; margin-right: 12px; }

.polykum-home__latest { margin-top: clamp(64px, 9vw, 112px); }
.polykum-feed__section-title {
    border-bottom: 1px solid var(--feed-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .13em;
    margin: 0;
    padding-bottom: 12px;
    text-transform: uppercase;
}
.polykum-feed__list .wp-block-post-template { margin: 0; }
.polykum-feed__list .wp-block-post {
    border-bottom: 1px solid var(--feed-rule);
    display: grid;
    gap: clamp(22px, 3.5vw, 48px);
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
    padding-block: clamp(28px, 4vw, 42px);
}
.polykum-feed__list .wp-block-post:has(.wp-block-post-featured-image img) { grid-template-columns: minmax(170px, 270px) minmax(0, 1fr); }
.polykum-feed__list .wp-block-post-featured-image {
    align-self: start;
    margin: 0;
    overflow: hidden;
}
.polykum-feed__list-body { align-self: center; margin: 0; }
.polykum-feed__list .wp-block-post-title {
    font-family: var(--polykum-headline-font);
    font-size: clamp(1.55rem, 2.3vw, 2.15rem);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.08;
    margin: 12px 0 10px;
}
.polykum-feed__list .wp-block-post-excerpt { margin: 0; }
.polykum-feed__list .wp-block-post-excerpt__excerpt {
    color: var(--feed-muted);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: .95rem;
    line-height: 1.55;
    margin: 0;
}
.polykum-feed__list .wp-block-post-excerpt__more-text { margin-top: 12px; }
.polykum-feed__pagination {
    border-top: 1px solid var(--feed-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    margin-top: 40px;
    padding-top: 18px;
    text-transform: uppercase;
}
.polykum-feed__pagination .page-numbers { margin-inline: 7px; }
.polykum-feed__pagination .current { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

@media (max-width: 700px) {
    .polykum-feed { padding-block: 36px 80px; }
    .polykum-feed__meta { row-gap: 6px; }
    .polykum-feed__meta .wp-block-post-date { flex-basis: 100%; }
    .polykum-feed__meta .wp-block-post-date::before { content: none; margin: 0; }
    .polykum-home__lead .wp-block-post-template { grid-template-columns: 1fr; gap: 50px; }
    .polykum-home__lead .wp-block-post-title { font-size: clamp(2rem, 10vw, 2.75rem); }
    .polykum-home__latest { margin-top: 68px; }
    .polykum-feed__list .wp-block-post:has(.wp-block-post-featured-image img) { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; }
    .polykum-feed__list .wp-block-post-title { font-size: 1.45rem; }
    .polykum-feed__list .wp-block-post-excerpt__excerpt { display: none; }
    .polykum-feed__list .wp-block-post-excerpt__more-text { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .polykum-home__lead .wp-block-post-featured-image img { transition: none; }
}

/* Archives: category, issue, tag, author and date pages reuse the feed list above. */
.polykum-archive__header {
    border-bottom: 1px solid var(--feed-ink);
    margin-block: 0;
    padding-bottom: clamp(20px, 3vw, 28px);
}
.polykum-archive__kicker,
.polykum-archive__count {
    color: var(--feed-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    line-height: 1.4;
    margin: 0;
    text-transform: uppercase;
}
.polykum-archive__kicker { color: var(--feed-ink); }
.polykum-archive__kicker a { text-decoration: none; }
.polykum-archive__kicker a:hover { text-decoration: underline; text-underline-offset: 3px; }
.polykum-archive__heading {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    justify-content: space-between;
    margin-top: 14px;
}
.polykum-archive__title {
    font-family: var(--polykum-headline-font);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 600;
    letter-spacing: -.045em;
    line-height: 1;
    margin: 0;
}
.polykum-archive__description {
    color: var(--feed-muted);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    line-height: 1.55;
    margin-top: 18px;
    max-width: 640px;
}
.polykum-archive__description p { margin: 0; }

/* Issue index: every print issue as a compact table of contents. */
.polykum-issue-index { margin-top: clamp(64px, 9vw, 112px); }
.polykum-issue-index--top { margin-block: clamp(40px, 6vw, 64px) clamp(56px, 8vw, 96px); }
.polykum-issue-index > h2 {
    border-bottom: 1px solid var(--feed-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .13em;
    margin: 0;
    padding-bottom: 12px;
    text-transform: uppercase;
}
.polykum-issue-index__list {
    display: grid;
    gap: 0 30px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}
.polykum-issue-index__list a {
    align-items: baseline;
    border-bottom: 1px solid var(--feed-rule);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 16px 0 14px;
    text-decoration: none;
}
.polykum-issue-index__list a:hover .polykum-issue-index__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }
.polykum-issue-index__list a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.polykum-issue-index__list a[aria-current="page"] { border-bottom: 3px solid var(--feed-ink); padding-bottom: 12px; }
.polykum-issue-index__name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.polykum-issue-index__count {
    color: var(--feed-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .polykum-issue-index__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .polykum-archive__heading { display: block; }
    .polykum-archive__title { font-size: clamp(2.6rem, 13vw, 3.25rem); }
    .polykum-archive__count { margin-top: 12px; }
    .polykum-issue-index__list { gap: 0 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .polykum-issue-index__list a { flex-direction: column; gap: 4px; }
    .polykum-issue-index__name { font-size: 1.15rem; }
}

/* Footer: publication details on a light band, closed by the publisher line. */
footer.wp-block-template-part:has(> .polykum-footer) { margin-block-start: 0; }
.polykum-footer {
    --footer-ink: #19201d;
    --footer-muted: #636964;
    --footer-rule: #d8dad4;
    background: #f4f3ee;
    border-top: 3px solid var(--footer-ink);
    color: var(--footer-ink);
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
}
.polykum-footer a { color: inherit; }
.polykum-footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.polykum-footer__inner,
.polykum-footer__base {
    box-sizing: border-box;
    margin-inline: auto;
    width: min(1180px, 100% - 2 * var(--wp--style--root--padding-left, 30px));
}
.polykum-footer__inner {
    display: grid;
    gap: 40px;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    padding-block: clamp(48px, 6vw, 72px) clamp(40px, 5vw, 56px);
}
.polykum-footer__inner > *,
.polykum-footer__column > *,
.polykum-footer__publisher > * { margin-block: 0; }
.polykum-footer__logo { line-height: 0; margin: 0; width: 120px; }
.polykum-footer__logo img,
.polykum-footer__vseth img { display: block; height: auto; width: 100%; }
.polykum-footer__logo img { aspect-ratio: 1773 / 954; }
.polykum-footer__vseth img { aspect-ratio: 10 / 3; }
.polykum-footer .polykum-footer__about {
    color: var(--footer-muted);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.55;
    margin-top: 20px;
    max-width: 340px;
}
.polykum-footer .polykum-footer__label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    margin-bottom: 16px;
    text-transform: uppercase;
}
.polykum-footer .polykum-footer__nav { font-size: .95rem; }
.polykum-footer .polykum-footer__nav .wp-block-navigation__container { gap: 10px; }
.polykum-footer .polykum-footer__nav a { text-decoration: none; }
.polykum-footer .polykum-footer__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.polykum-footer__base {
    align-items: center;
    border-top: 1px solid var(--footer-rule);
    color: var(--footer-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .75rem;
    gap: 16px 32px;
    justify-content: space-between;
    padding-block: 18px 22px;
}
.polykum-footer__base p { margin: 0; }
.polykum-footer__publisher { align-items: center; display: flex; gap: 12px; }
.polykum-footer__vseth { line-height: 0; margin: 0; width: 84px; }

@media (max-width: 1000px) {
    .polykum-footer__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .polykum-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .polykum-footer__inner { gap: 32px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Search: the archive header, then a search field above the results. */
.polykum-feed__meta .wp-block-post-date:first-child::before { content: none; margin: 0; } /* Pages have no categories. */
.polykum-search__form { margin-block: clamp(28px, 4vw, 40px) 0; }
/* The constrained layout centres the form itself, so limit the field row inside it instead. */
.polykum-search__form .wp-block-search__inside-wrapper { border: 0; gap: 12px; max-width: 760px; padding: 0; }
.polykum-search__form .wp-block-search__input {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--feed-ink);
    border-radius: 0;
    color: var(--feed-ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    min-width: 0;
    padding: 10px 0;
}
.polykum-search__form .wp-block-search__input:focus-visible,
.polykum-search__form .wp-block-search__button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.polykum-search__form .wp-block-search__button {
    background: transparent;
    border: 1px solid var(--feed-ink);
    border-radius: 0;
    color: var(--feed-ink);
    font: 600 12px/18px Arial, Helvetica, sans-serif;
    letter-spacing: .075em;
    margin: 0;
    min-height: 44px;
    padding: 12px 18px;
    text-transform: uppercase;
}
.polykum-search__form .wp-block-search__button:hover { background: var(--feed-ink); color: #fffefa; }
.polykum-search .polykum-search__empty {
    color: var(--feed-muted);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    line-height: 1.55;
    margin-top: clamp(32px, 5vw, 48px);
    max-width: 640px;
}
.polykum-search__empty a { color: var(--feed-ink); text-underline-offset: 3px; }

/* Header search: core's icon-only Search block opens its field on click; Escape or leaving it closes. */
.polykum-header .polykum-header__actions { align-items: center; flex-wrap: nowrap; gap: 10px; z-index: 2; }
.polykum-header__actions > * { margin: 0; }
.polykum-header .polykum-header-search { margin: 0; }
.polykum-header-search .wp-block-search__inside-wrapper { align-items: center; border: 0; gap: 4px; padding: 0; }
.polykum-header-search .wp-block-search__input {
    background: var(--header-paper);
    border: 0;
    border-bottom: 1px solid var(--header-ink);
    border-radius: 0;
    box-sizing: border-box;
    color: var(--header-ink);
    font: 400 14px/20px Arial, Helvetica, sans-serif;
    height: 44px;
    padding: 12px 0;
}
.polykum-header-search:not(.wp-block-search__searchfield-hidden) .wp-block-search__input { width: clamp(160px, 18vw, 260px); }
.polykum-header .polykum-header-search .wp-block-search__button,
nav.polykum-navigation .polykum-search-mobile .wp-block-search__button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--header-ink);
    display: flex;
    height: 44px;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 44px;
}
.polykum-header .polykum-header-search .wp-block-search__button:hover { background: var(--header-rule); }
.polykum-header .wp-block-search__input:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
nav.polykum-navigation .polykum-search-mobile { display: none; }

@media (max-width: 1000px) {
    .polykum-header nav.polykum-navigation .wp-block-navigation__responsive-container.is-menu-open .polykum-search-mobile { display: block; margin: 4px 0 12px; width: 100%; }
    nav.polykum-navigation .polykum-search-mobile .wp-block-search__inside-wrapper { border: 0; border-bottom: 1px solid var(--header-ink); padding: 0; }
    nav.polykum-navigation .polykum-search-mobile .wp-block-search__input {
        background: transparent;
        border: 0;
        color: var(--header-ink);
        font: 400 16px/22px Arial, Helvetica, sans-serif;
        letter-spacing: 0;
        padding: 12px 0;
        text-transform: none;
    }
}

/* 404: archive-style heading, a search field and the latest articles. */
.polykum-404 .polykum-archive__title { margin-top: 14px; }
.polykum-404__latest { margin-top: clamp(56px, 8vw, 96px); }
