/* =========================================================
   EBOTNOTE.COM | BOOTSTRAP 5.3.9 EDITORIAL LIBRARY
   The current supplied HTML uses the Quietframe theme.
   Theme-first colors, compact spacing, original post links,
   960px publication workspace, no site-footer overrides.
   ========================================================= */

body.eb-editorial {
    --eb-width: 960px;
    --eb-radius: 6px;
    --eb-line: rgba(113, 113, 122, .22);
    --eb-soft: rgba(113, 113, 122, .07);
    --eb-focus: rgba(113, 113, 122, .30);
    --eb-surface: var(--bs-body-bg, #fff);
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-family: var(--bs-body-font-family);
    font-size: 13px;
    line-height: 1.55;
}
body.eb-editorial #page {
    width: 100%;
    max-width: none;
    min-width: 0;
}
body.eb-editorial :where(#masthead, .content-area, #primary) :where(
    h1, h2, h3, h4, h5, h6, p, a, button, input, label, textarea, select
) { font-family: inherit; }

/* --- Slim, inherited-color header ----------------------- */
body.eb-editorial #masthead {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    min-height: 42px;
    padding: 0;
    border-bottom: 1px solid var(--eb-line);
    box-shadow: 0 1px 1px rgba(0,0,0,.025);
    /* Inherit the page's neutral background; no branded color imposed. */
    background-color: var(--eb-surface);
}
body.admin-bar.eb-editorial #masthead { top: 32px; }
body.eb-editorial #masthead .site-header-inner {
    width: min(100%, var(--eb-width));
    max-width: var(--eb-width);
    min-height: 42px;
    margin-inline: auto;
    padding: 5px 15px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
body.eb-editorial #masthead .site-branding {
    display: flex;
    align-items: center;
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}
body.eb-editorial #masthead .custom-logo-link { display: inline-flex; align-items: center; }
body.eb-editorial #masthead .custom-logo {
    display: block;
    width: 118px;
    max-width: 118px;
    height: auto;
    max-height: 27px;
    object-fit: contain;
}
body.eb-editorial #masthead .site-branding-text { display: none; }
body.eb-editorial #site-navigation {
    min-width: 0;
    width: auto;
    margin-left: auto;
}
body.eb-editorial #site-navigation .menu-wrapper { margin: 0; }
body.eb-editorial #site-navigation ul.menu {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px;
    padding: 0;
    margin: 0;
    list-style: none;
}
body.eb-editorial #site-navigation ul.menu > li {
    margin: 0;
    padding: 0;
    float: none;
}
body.eb-editorial #site-navigation ul.menu > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 5px 9px;
    border-radius: var(--eb-radius);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    color: inherit;
    background: transparent;
    transition: background-color .15s ease;
}
body.eb-editorial #site-navigation ul.menu > li > a:hover,
body.eb-editorial #site-navigation ul.menu > li.current-menu-item > a {
    background-color: var(--eb-soft);
}

/* --- Header search: Bootstrap collapse ------------------ */
body.eb-editorial .eb-header-tools {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
body.eb-editorial .eb-search-trigger,
body.eb-editorial #site-navigation .menu-toggle {
    width: 32px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 1px solid var(--eb-line);
    border-radius: var(--eb-radius);
    box-shadow: none;
    cursor: pointer;
}
body.eb-editorial .eb-search-trigger svg { width: 15px; height: 15px; }
body.eb-editorial .eb-search-trigger:hover,
body.eb-editorial #site-navigation .menu-toggle:hover {
    background: var(--eb-soft);
}
body.eb-editorial .eb-header-search-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 9px);
    width: min(350px, calc(100vw - 24px));
    border: 1px solid var(--eb-line);
    background: var(--eb-surface);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    padding: 10px;
    z-index: 1100;
}
body.eb-editorial .eb-header-search-panel form {
    display: flex;
    gap: 6px;
    margin: 0;
}
body.eb-editorial .eb-header-search-panel input[type="search"] {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
}
body.eb-editorial .eb-header-search-panel button[type="submit"] {
    flex: 0 0 auto;
}

/* --- Standard editorial content width ------------------- */
body.eb-editorial .container.content-area {
    width: 100%;
    max-width: var(--eb-width);
    box-sizing: border-box;
    padding: 18px 15px 26px;
    margin-inline: auto;
}
body.eb-editorial .site-content-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    min-width: 0;
}
body.eb-editorial #primary,
body.eb-editorial #secondary {
    width: 100%;
    min-width: 0;
    max-width: none;
    float: none;
    margin: 0;
}
body.eb-editorial #primary { order: 1; }
body.eb-editorial #secondary { order: -1; }
/* Preserve a fallback search if JavaScript / Bootstrap is unavailable. */
body.eb-editorial.eb-search-ready #secondary { display: none; }
body.eb-editorial #secondary .widget { margin: 0; padding: 0; }
body.eb-editorial #secondary .wp-block-search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 8px;
}
body.eb-editorial #secondary .wp-block-search__label { margin: 0; font-size: 12px; }
body.eb-editorial #secondary .wp-block-search__inside-wrapper {
    display: flex;
    gap: 6px;
    flex: 1 1 240px;
}
body.eb-editorial #secondary .wp-block-search__input { min-width: 0; flex: 1; }

/* --- Compact publication rows: NOT cards --------------- */
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry {
    display: grid;
    grid-template-columns: 162px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: start;
    column-gap: 18px;
    row-gap: 3px;
    width: 100%;
    padding: 0 0 18px;
    margin: 0 0 18px;
    border: 0;
    border-bottom: 1px solid var(--eb-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry > .post-thumbnail {
    grid-column: 1;
    grid-row: 1 / span 3;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 162px;
    height: 120px;
    margin: 0;
    border: 1px solid var(--eb-line);
    border-radius: var(--eb-radius);
    overflow: hidden;
    background-color: var(--eb-soft);
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry > .post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry > .entry-header {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 0;
    margin: 0;
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry .entry-title {
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -.025em;
    font-weight: 600;
    margin: 0 0 4px;
    padding: 0;
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry .entry-title a {
    color: inherit;
    text-decoration: none;
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry .entry-title a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry .entry-meta {
    font-size: 11px;
    opacity: .68;
    line-height: 1.4;
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry .entry-meta .byline { display: none; }
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry > .entry-summary {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 12.5px;
    line-height: 1.55;
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry > .entry-summary p {
    margin: 2px 0 9px;
}
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry > .entry-footer {
    grid-column: 2;
    grid-row: 3;
    min-width: 0;
    margin: 3px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 11px;
    opacity: .78;
}
/* If a publication has no thumbnail, text spans the full row. */
body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry:not(:has(> .post-thumbnail)) > :is(.entry-header,.entry-summary,.entry-footer) {
    grid-column: 1 / -1;
}
body.eb-editorial #primary .read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--eb-line);
    border-radius: var(--eb-radius);
    background: transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,.035);
    color: inherit;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}
body.eb-editorial #primary .read-more:hover { background: var(--eb-soft); }

/* --- Publication pages and prose ------------------------ */
body.eb-editorial:is(.single,.page) #primary > article.entry {
    width: 100%;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
body.eb-editorial:is(.single,.page) #primary .entry-title {
    font-size: clamp(23px, 3vw, 32px);
    letter-spacing: -.04em;
    line-height: 1.2;
    font-weight: 650;
}
body.eb-editorial #primary .entry-content,
body.eb-editorial #primary .entry-summary {
    max-width: 100%;
    overflow-wrap: anywhere;
}
body.eb-editorial #primary .entry-content :is(img,video,iframe) {
    max-width: 100%;
    height: auto;
}
body.eb-editorial #primary .entry-content :is(table,pre) {
    max-width: 100%;
}
body.eb-editorial #primary .entry-content pre { overflow-x: auto; }
body.eb-editorial #primary .entry-content blockquote {
    padding: 8px 14px;
    border-left: 3px solid var(--eb-line);
    background: var(--eb-soft);
}

/* --- Shadcn-like shapes, retaining theme colors -------- */
body.eb-editorial :where(#masthead, .content-area) :is(
    input[type="search"], input[type="text"], input[type="email"],
    input[type="password"], input[type="number"], input[type="url"],
    input[type="tel"], textarea, select
) {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 32px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.4;
    color: inherit;
    background-color: var(--eb-surface);
    border: 1px solid var(--eb-line);
    border-radius: var(--eb-radius);
    box-shadow: 0 1px 2px rgba(0,0,0,.035);
}
body.eb-editorial :where(#masthead, .content-area) :is(
    button, input[type="submit"], input[type="button"],
    .wp-block-button__link, .wp-element-button, .woocommerce .button
) {
    box-sizing: border-box;
    min-height: 32px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--eb-radius);
    box-shadow: none;
}
body.eb-editorial :where(#masthead, .content-area) :is(
    a, button, input, textarea, select
):focus-visible {
    outline: 2px solid var(--eb-focus);
    outline-offset: 2px;
}
body.eb-editorial :where(#masthead, .content-area) :is(button,input[type="submit"]):hover {
    filter: brightness(.98);
}

/* --- Mobile: theme continues to control its menu ------- */
@media (max-width: 782px) {
    body.admin-bar.eb-editorial #masthead { top: 46px; }
}
@media (max-width: 767px) {
    body.eb-editorial #masthead .site-header-inner { padding-inline: 12px; gap: 7px; }
    body.eb-editorial #masthead .custom-logo { width: 100px; }
    body.eb-editorial #site-navigation ul.menu { flex-wrap: wrap; }
    /* Do not force the Quietframe .menu-wrapper visible: its own toggle handles it. */
    body.eb-editorial .container.content-area { padding: 12px 12px 20px; }
    body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry {
        grid-template-columns: 102px minmax(0,1fr);
        column-gap: 11px;
        padding-bottom: 13px;
        margin-bottom: 13px;
    }
    body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry > .post-thumbnail {
        width: 102px;
        height: 95px;
    }
    body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry .entry-title { font-size: 15px; }
    body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry > .entry-summary { font-size: 11.5px; }
    body.eb-editorial:is(.home,.blog,.archive,.search) #primary > article.entry > .entry-footer { font-size: 10px; }
}
@media (max-width: 600px) {
    body.admin-bar.eb-editorial #masthead { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    body.eb-editorial #site-navigation ul.menu > li > a { transition: none; }
}

/* No #colophon or .site-footer styling: footer inherits Quietframe. */
