/*
 Theme Name:   Harmonic Framework
 Theme URI:    https://harmonic-framework.com
 Description:  Child theme for Harmonic Framework site
 Author:       William Christopher Anderson
 Template:     generatepress
 Version:      3.0.6
 Text Domain:  harmonic-framework
*/

/* ── Brand tokens ── */
:root {
    --hf-blue:    #4361ee;
    --hf-teal:    #06d6a0;
    --hf-orange:  #ff6b35;
    --hf-red:     #e94560;
    --hf-purple:  #9b59b6;

    --hf-bg:      #ffffff;
    --hf-surface: #f8f9fa;
    --hf-text:    #2d3436;
    --hf-muted:   #636e72;
    --hf-border:  #dfe6e9;
    --hf-code-bg: #f5f6f8;

    --hf-accent:  var(--hf-blue);
}

/* ── Brand accent bar ── */
@keyframes hf-bar-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.site-header::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--hf-blue),
        var(--hf-teal),
        var(--hf-orange),
        var(--hf-red),
        var(--hf-blue)
    );
    background-size: 200% 100%;
    animation: hf-bar-shift 6s ease infinite;
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--hf-bg);
    border-bottom: 1px solid var(--hf-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.inside-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.site-branding-container { order: 1; flex-shrink: 0; }
.hf-header-search { order: 2; flex: 1; min-width: 0; max-width: 480px; }
.main-navigation { order: 3; flex-shrink: 0; }

/* Keep logo + search + hamburger on one row at all viewport widths */
.has-inline-mobile-toggle .inside-header {
    flex-wrap: nowrap !important;
    align-items: center;
}

/* ── Header search ── */
.hf-header-search__form {
    display: flex;
    align-items: center;
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: 24px;
    padding: 0 0.5rem 0 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hf-header-search__form:focus-within {
    border-color: var(--hf-blue);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}
.hf-header-search__input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: var(--hf-text);
    padding: 0.5rem 0;
    outline: none;
    min-width: 0;
}
.hf-header-search__input::placeholder {
    color: var(--hf-muted);
}
.hf-header-search__btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hf-muted);
    padding: 0.4rem;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}
.hf-header-search__btn:hover {
    color: var(--hf-blue);
    background: rgba(67, 97, 238, 0.08);
}
.hf-header-search__btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ── Search results page ── */
.search-results .entry-title a,
.search-no-results h1 {
    color: var(--hf-text);
}
.search-results .entry-summary {
    color: var(--hf-muted);
}
mark {
    background: rgba(67, 97, 238, 0.15);
    color: var(--hf-blue);
    border-radius: 2px;
    padding: 0 2px;
}

/* ── Header logo ── */
.site-logo img {
    max-height: 50px;
    width: auto;
}
/* Hide the text title when logo is present */
.wp-custom-logo .site-branding .main-title {
    display: none;
}

/* ── Navigation ── */
.main-navigation {
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.main-navigation .main-nav ul li a {
    color: var(--hf-muted);
    padding: 0.5em 0.9em;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.main-navigation .main-nav ul li a:hover {
    color: var(--hf-blue);
    background: rgba(67, 97, 238, 0.06);
}
.main-navigation .current-menu-item a {
    color: var(--hf-blue) !important;
    font-weight: 600;
}

/* ── Hide redundant page titles (content provides its own headings) ── */
.page .entry-title {
    display: none;
}

/* ── Links ── */
a {
    color: var(--hf-blue);
    transition: color 0.2s ease;
}
a:hover {
    color: var(--hf-teal);
}

/* ── Methodology cards ── */
.hf-method-card {
    background: var(--hf-bg);
    border: 1px solid var(--hf-border);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 0.75rem 0;
    transition: border-color 0.2s ease;
}
.hf-method-card:hover {
    border-color: var(--hf-muted);
}
.hf-method-icon {
    margin-bottom: 0.75rem;
    color: var(--hf-muted);
}
.hf-method-card--vbd .hf-method-icon { color: var(--hf-blue); }
.hf-method-card--ebd .hf-method-icon { color: var(--hf-teal); }
.hf-method-card--bdt .hf-method-icon { color: var(--hf-orange); }
.hf-method-card--pd  .hf-method-icon { color: var(--hf-red); }
.hf-method-card h3 { margin-top: 0; }
.hf-method-card p { color: var(--hf-muted); margin-bottom: 0; }
.hf-method-card--vbd { border-left: 4px solid var(--hf-blue); }
.hf-method-card--ebd { border-left: 4px solid var(--hf-teal); }
.hf-method-card--bdt { border-left: 4px solid var(--hf-orange); }
.hf-method-card--pd  { border-left: 4px solid var(--hf-red); }
.hf-method-card--ccr { border-left: 4px solid var(--hf-purple); }

/* ── Tables ── */
.entry-content table,
table {
    border-collapse: collapse;
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
}
th, td {
    border: 1px solid var(--hf-border);
    padding: 0.6em 0.9em;
    text-align: left;
    white-space: nowrap;
}
th {
    background: var(--hf-surface);
    font-weight: 600;
}

/* ── Code ── */
pre {
    max-width: 100%;
    overflow-x: auto;
    background: var(--hf-code-bg);
    border: 1px solid var(--hf-border);
    border-radius: 4px;
    padding: 1em;
    font-size: 0.9em;
    line-height: 1.5;
}
pre code {
    background: none;
    border: none;
    padding: 0;
    white-space: pre;
}
pre[class*="language-"],
code[class*="language-"] {
    border: 1px solid var(--hf-border);
    border-radius: 4px;
    font-size: 0.9em;
}
:not(pre) > code {
    background: var(--hf-code-bg);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* ── Content overflow ── */
.entry-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.entry-content img {
    max-width: 100%;
    height: auto;
}

/* ── Mermaid diagrams ── */
.mermaid {
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5em 0;
    text-align: center;
    max-width: 100%;
    overflow-x: auto;
}
.mermaid svg {
    max-width: 100%;
    height: auto;
}

/* ── Blockquotes ── */
blockquote {
    border-left: 4px solid var(--hf-blue);
    background: var(--hf-surface);
    padding: 1rem 1.5rem;
    margin: 1.5em 0;
    border-radius: 0 6px 6px 0;
}

/* ── Reading time badge ── */
.hf-reading-time {
    display: inline-block;
    background: var(--hf-surface);
    color: var(--hf-muted);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-bottom: 1.5em;
    border-left: 3px solid var(--hf-blue);
}

/* ── Category badges ── */
.hf-cat-badge {
    display: inline-block;
    background: var(--hf-surface);
    color: var(--hf-blue);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-decoration: none;
    margin-right: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--hf-border);
    transition: background-color 0.2s, border-color 0.2s;
}
.hf-cat-badge:hover {
    background: var(--hf-blue);
    color: #ffffff;
    border-color: var(--hf-blue);
}
.hf-post-meta-badges {
    margin-bottom: 0.75em;
}

/* ── Archive description ── */
.hf-archive-description {
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-left: 4px solid var(--hf-blue);
    border-radius: 0 6px 6px 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.95em;
    line-height: 1.6;
}

/* ── Blog archive grid ── */
.blog .site-main,
.archive .site-main,
.search .site-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .blog .site-main,
    .archive .site-main {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Post cards on archive ── */
.blog .inside-article,
.archive .inside-article {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.blog .post-image,
.archive .post-image {
    margin: -2rem -2rem 1.5rem -2rem;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}
.blog .post-image img,
.archive .post-image img,
.hf-default-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.blog .entry-summary,
.archive .entry-summary {
    flex: 1;
    color: var(--hf-muted);
    font-size: 0.95em;
    line-height: 1.6;
}

/* ── Influence cards ── */
.hf-influence-card {
    display: flex;
    gap: 1.5rem;
    background: var(--hf-bg);
    border: 1px solid var(--hf-border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.hf-influence-card h3 {
    margin-top: 0;
}
.hf-influence-photo {
    flex-shrink: 0;
    width: 120px;
}
.hf-influence-photo img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    background: var(--hf-surface);
}
.hf-influence-content {
    flex: 1;
}
.hf-influence-role {
    color: var(--hf-muted);
    font-style: italic;
    margin-top: -0.5em;
}
.hf-influence-card--compact {
    padding: 1.25rem;
}
.hf-influence-card--compact h3 {
    margin-bottom: 0.25em;
}
@media (max-width: 600px) {
    .hf-influence-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ── Post navigation ── */
.post-navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--hf-border);
}
.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}
.post-navigation a {
    display: block;
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}
.post-navigation a:hover {
    border-color: var(--hf-blue);
}

/* ── Methodology taxonomy badges ── */
.hf-methodology-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}
.hf-methodology-badge--vbd { background: rgba(67,97,238,0.1); color: var(--hf-blue); border: 1px solid var(--hf-blue); }
.hf-methodology-badge--ebd { background: rgba(6,214,160,0.1); color: var(--hf-teal); border: 1px solid var(--hf-teal); }
.hf-methodology-badge--bdt { background: rgba(255,107,53,0.1); color: var(--hf-orange); border: 1px solid var(--hf-orange); }
.hf-methodology-badge--pd  { background: rgba(233,69,96,0.1); color: var(--hf-red); border: 1px solid var(--hf-red); }
.hf-methodology-badge--ccr { background: rgba(155,89,182,0.1); color: var(--hf-purple); border: 1px solid var(--hf-purple); }

/* ── Pagination ── */
.page-numbers.current {
    background: var(--hf-blue);
    border-color: var(--hf-blue);
    color: #ffffff;
}

/* ── Breadcrumbs ── */
.hf-breadcrumbs {
    font-size: 0.85em;
    color: var(--hf-muted);
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
}
.hf-breadcrumbs a {
    color: var(--hf-muted);
}
.hf-breadcrumbs a:hover {
    color: var(--hf-blue);
}
.hf-breadcrumbs .separator {
    margin: 0 0.5em;
    color: var(--hf-border);
}

/* ── Homepage: Hero ── */
.hf-hero {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--hf-border);
    margin-bottom: 0;
}
.hf-hero__heading {
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--hf-text);
}
.hf-hero__lede {
    color: var(--hf-text);
    line-height: 1.6;
    max-width: 960px;
    margin-bottom: 1rem;
}
.hf-hero__lede strong {
    color: var(--hf-blue);
    font-weight: 600;
}
.hf-hero__body {
    color: var(--hf-muted);
    line-height: 1.7;
    max-width: 960px;
}

/* ── Homepage: Sections ── */
.hf-section {
    padding: 3rem 0;
    border-bottom: none;
    position: relative;
}
.hf-section::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        to right,
        var(--hf-blue),
        var(--hf-teal),
        var(--hf-orange),
        var(--hf-red),
        var(--hf-blue)
    );
    background-size: 200% 100%;
    animation: hf-bar-shift 6s ease infinite;
    opacity: 0.4;
}
.hf-section__heading {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    color: var(--hf-text);
}
.hf-section__intro {
    color: var(--hf-muted);
    max-width: 900px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ── Homepage: Methodology cards (enhanced) ── */
.hf-section--methods .hf-method-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.hf-section--methods .hf-method-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.hf-section--methods .hf-method-card p {
    font-size: 0.92rem;
    line-height: 1.6;
    flex: 1;
}
.hf-section--methods .hf-method-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ── Homepage: Isomorphism table ── */
.hf-table-wrap {
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}
.hf-iso-table table {
    margin: 0;
}
.hf-iso-table th {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hf-muted);
    background: transparent;
    border-bottom: 2px solid var(--hf-border);
    border-top: none;
    border-left: none;
    border-right: none;
}
.hf-iso-table td {
    font-size: 0.92em;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--hf-border);
}
.hf-iso-table tr:last-child td {
    border-bottom: none;
}
.hf-iso-table td:first-child {
    font-weight: 600;
    color: var(--hf-text);
}
.hf-iso-consequence {
    color: var(--hf-text);
    font-style: italic;
    line-height: 1.6;
    margin-top: 1.25rem;
    padding-left: 1rem;
    border-left: 3px solid var(--hf-blue);
}

/* ── Homepage: CTA ── */
.hf-cta {
    padding: 3rem 0 2rem;
    text-align: center;
}
.hf-cta__heading {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    color: var(--hf-text);
}
.hf-cta__body {
    color: var(--hf-muted);
    max-width: 520px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}
.hf-cta__buttons {
    justify-content: center;
}

/* ── Dropdown submenus ── */
.main-navigation .main-nav ul ul {
    background: var(--hf-bg);
    border: 1px solid var(--hf-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0.4rem 0;
    min-width: 180px;
}
.main-navigation .main-nav ul ul li a {
    padding: 0.5em 1.2em;
    font-size: 0.9em;
    border-radius: 0;
}
.main-navigation .main-nav ul ul li a:hover {
    background: rgba(67, 97, 238, 0.06);
    color: var(--hf-blue);
}
.main-navigation .main-nav ul li.menu-item-has-children > a::after {
    content: '\25BE';
    margin-left: 0.35em;
    font-size: 0.75em;
    opacity: 0.5;
}

/* ── Single post styling ── */
.single .entry-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hf-border);
}
.single .entry-title {
    font-size: 2rem;
    line-height: 1.25;
    color: var(--hf-text);
    margin-bottom: 0.5rem;
}
.single .entry-meta {
    color: var(--hf-muted);
    font-size: 0.88em;
}
.single .entry-meta a {
    color: var(--hf-muted);
    text-decoration: none;
}
.single .entry-meta a:hover {
    color: var(--hf-blue);
}
.single .entry-content {
    font-size: 1.05em;
    line-height: 1.75;
    color: var(--hf-text);
}
.single .entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--hf-border);
    color: var(--hf-text);
}
.single .entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--hf-text);
}
.single .entry-content p {
    margin-bottom: 1.25em;
}
.single .entry-content ul,
.single .entry-content ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}
.single .entry-content li {
    margin-bottom: 0.4em;
    line-height: 1.65;
}
.single .entry-content img {
    border-radius: 6px;
    border: 1px solid var(--hf-border);
}
.single .entry-content figure {
    margin: 2em 0;
}
.single .entry-content figcaption {
    text-align: center;
    color: var(--hf-muted);
    font-size: 0.88em;
    margin-top: 0.5em;
}

/* Author box */
.hf-author-box {
    display: flex;
    gap: 1.25rem;
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 2.5rem;
}
.hf-author-box img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hf-author-box .author-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.hf-author-box .author-bio {
    color: var(--hf-muted);
    font-size: 0.9em;
    line-height: 1.5;
}

/* Tags in single posts */
.single .entry-content .post-tags,
.single .cat-links,
.single .tags-links {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hf-border);
    font-size: 0.88em;
    color: var(--hf-muted);
}
.single .tags-links a,
.single .cat-links a {
    display: inline-block;
    background: var(--hf-surface);
    color: var(--hf-blue);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.88em;
    text-decoration: none;
    border: 1px solid var(--hf-border);
    margin: 2px;
    transition: background 0.2s, border-color 0.2s;
}
.single .tags-links a:hover,
.single .cat-links a:hover {
    background: var(--hf-blue);
    color: #ffffff;
    border-color: var(--hf-blue);
}

/* ── Archive / category page cards (enhanced) ── */
.blog article,
.archive article,
.search article {
    background: var(--hf-bg);
    border: 1px solid var(--hf-border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.blog article:hover,
.archive article:hover,
.search article:hover {
    border-color: var(--hf-blue);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.08);
}
.blog .inside-article,
.archive .inside-article,
.search .inside-article {
    padding: 1.5rem;
}
.blog .entry-title,
.archive .entry-title,
.search .entry-title {
    font-size: 1.15em;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}
.blog .entry-title a,
.archive .entry-title a,
.search .entry-title a {
    color: var(--hf-text);
    text-decoration: none;
}
.blog .entry-title a:hover,
.archive .entry-title a:hover,
.search .entry-title a:hover {
    color: var(--hf-blue);
}
.blog .entry-meta,
.archive .entry-meta {
    font-size: 0.82em;
    color: var(--hf-muted);
    margin-bottom: 0.75rem;
}

/* Archive page header spans full grid */
.blog .page-header,
.archive .page-header,
.search .page-header {
    grid-column: 1 / -1;
}
.archive .archive-title,
.search .page-title {
    font-size: 1.5rem;
    color: var(--hf-text);
    margin-bottom: 0.5rem;
}
.archive .archive-description p {
    color: var(--hf-muted);
    font-size: 0.95em;
}

/* Pagination spans full grid */
.blog nav.navigation,
.archive nav.navigation,
.search nav.navigation {
    grid-column: 1 / -1;
}
.nav-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5em;
    border: 1px solid var(--hf-border);
    border-radius: 4px;
    color: var(--hf-muted);
    text-decoration: none;
    font-size: 0.9em;
    transition: border-color 0.2s, color 0.2s;
}
.page-numbers:hover {
    border-color: var(--hf-blue);
    color: var(--hf-blue);
}

/* Default thumbnail for posts without featured images */
.hf-default-thumb {
    background: linear-gradient(135deg, var(--hf-surface) 0%, var(--hf-border) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hf-muted);
    font-size: 0.85em;
}

/* ── Sidebar / widget styling ── */
.sidebar .widget {
    background: var(--hf-bg);
    border: 1px solid var(--hf-border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sidebar .widget-title {
    font-size: 0.95em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hf-text);
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--hf-blue);
}
.sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar .widget ul li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--hf-border);
}
.sidebar .widget ul li:last-child {
    border-bottom: none;
}
.sidebar .widget ul li a {
    color: var(--hf-text);
    text-decoration: none;
    font-size: 0.92em;
    transition: color 0.2s;
}
.sidebar .widget ul li a:hover {
    color: var(--hf-blue);
}

/* Widget: search */
.sidebar .widget_search .search-form {
    display: flex;
    gap: 0;
}
.sidebar .widget_search .search-field {
    flex: 1;
    border: 1px solid var(--hf-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 0.5em 0.75em;
    font-size: 0.9em;
    background: var(--hf-surface);
    color: var(--hf-text);
    transition: border-color 0.2s;
}
.sidebar .widget_search .search-field:focus {
    outline: none;
    border-color: var(--hf-blue);
}
.sidebar .widget_search .search-submit {
    background: var(--hf-blue);
    color: #ffffff;
    border: 1px solid var(--hf-blue);
    border-radius: 0 4px 4px 0;
    padding: 0.5em 1em;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s;
}
.sidebar .widget_search .search-submit:hover {
    background: #3451d1;
}

/* Widget: tag cloud */
.sidebar .tagcloud a {
    display: inline-block;
    background: var(--hf-surface);
    color: var(--hf-muted) !important;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.82em !important;
    text-decoration: none;
    border: 1px solid var(--hf-border);
    margin: 2px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.sidebar .tagcloud a:hover {
    background: var(--hf-blue);
    color: #ffffff !important;
    border-color: var(--hf-blue);
}

/* Widget: recent posts */
.sidebar .widget_recent_entries li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.sidebar .widget_recent_entries .post-date {
    color: var(--hf-muted);
    font-size: 0.8em;
}

/* Widget: categories with counts */
.sidebar .widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── Search results styling ── */
.search .site-main {
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .search .site-main {
        grid-template-columns: 1fr 1fr;
    }
}
.search .entry-summary {
    color: var(--hf-muted);
    font-size: 0.93em;
    line-height: 1.6;
    margin-top: 0.5rem;
}
.search .entry-summary .search-excerpt mark,
.search mark {
    background: rgba(67, 97, 238, 0.12);
    color: var(--hf-blue);
    padding: 1px 3px;
    border-radius: 2px;
}

/* Search page form */
.search-form {
    display: flex;
    gap: 0;
    max-width: 500px;
}
.search-form .search-field {
    flex: 1;
    border: 1px solid var(--hf-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 0.6em 1em;
    font-size: 0.95em;
    background: var(--hf-surface);
    color: var(--hf-text);
}
.search-form .search-field:focus {
    outline: none;
    border-color: var(--hf-blue);
}
.search-form .search-submit {
    background: var(--hf-blue);
    color: #ffffff;
    border: 1px solid var(--hf-blue);
    border-radius: 0 4px 4px 0;
    padding: 0.6em 1.25em;
    cursor: pointer;
    transition: background 0.2s;
}
.search-form .search-submit:hover {
    background: #3451d1;
}
.search-no-results .page-content {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--hf-muted);
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--hf-border);
    background: var(--hf-surface);
}
.site-footer .widget {
    margin-bottom: 1.5rem;
}
.site-footer .widget-title {
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    color: var(--hf-text);
}
