/* =========================================================
   Design tokens — change these to re-theme the whole site
   ========================================================= */
:root {
    --text: #6b6459;
    --text-strong: #2b2620;
    --link: #111111;
    --body-bg: #f3f3f3;
    --wrap-bg: #93c193;
    --wrap-bg-dark: #5f8a5f;
    --surface: #ffffff;
    --surface-alt: #f7f5f0;
    --border: #ececec;
    --accent: #5a8f3c;
    --accent-dark: #45702c;
    --accent-soft: #e8f2e0;
    --footer-bg: #171717;
    --footer-text: #999999;
    --meta-color: #9a9488;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 3px rgba(20, 20, 10, 0.08);
    --shadow-md: 0 8px 24px rgba(20, 20, 10, 0.12);
    --shadow-lg: 0 16px 40px rgba(20, 20, 10, 0.18);

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;

    --max-width: 1080px;
    --sidebar-width: 340px;
    --top-row-height: 5.25rem; /* shared by the post-nav card and the search widget so they always match */
    --transition: 0.2s ease;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Lato, -apple-system, "system-ui", "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--body-bg);
    font-size: 18px;
    line-height: 1.55;
}

a { color: var(--link); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--text-strong); line-height: 1.25; margin: 0; }

/* =========================================================
   Reusable primitives
   ========================================================= */

/* Card: base elevated surface used for posts, widgets, admin blocks, etc. */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.card--hover { transition: transform var(--transition), box-shadow var(--transition); }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Eyebrow: small caps label used above section headings */
.eyebrow {
    display: inline-block;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin: 0 0 var(--space-2);
}

/* Badge: small pill, used for categories/tags anywhere */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25em 0.75em;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.badge-list a { color: inherit; }
.badge--on-dark { background: rgba(255,255,255,0.12); color: #fff; }

/* Button: pill CTA used for read-more, pagination, forms */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0.6em 1.3em;
    border-radius: var(--radius-pill);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { background: transparent; color: var(--text-strong); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn--sm { padding: 0.4em 0.9em; font-size: 0.75rem; }
.btn[disabled], .btn--disabled { opacity: 0.4; pointer-events: none; }

/* Meta row: small muted text with middot separators, used for dates/authors/cats */
.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
    color: var(--meta-color);
}
.meta-row .sep { opacity: 0.6; }

/* Avatar */
.avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}
.avatar--lg { width: 140px; height: 140px; }

/* Link list: simple vertical list of links, reused in widgets/footer */
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 0.5em 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.link-list li:last-child { border-bottom: none; }
.link-list a { color: var(--text-strong); transition: color var(--transition); }
.link-list a:hover { color: var(--accent-dark); }
.link-list--dark li { border-color: rgba(255,255,255,0.08); }
.link-list--dark a { color: #ccc; }
.link-list--dark a:hover { color: #fff; }

/* Panel heading used inside widgets/cards: icon + title */
.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1.02rem;
    margin: 0 0 var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--accent-soft);
}

/* =========================================================
   Hero header (fixed full-viewport background)
   ========================================================= */
.header {
    position: relative;
    overflow: visible;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
    max-height: 100%;
    min-height: 200px;
    min-width: 300px;
    color: #eee;
}
.header.header-compact {
    height: 76px;
    min-height: 0;
    background: var(--accent-soft);
    border-bottom: 1px solid var(--border);
}
.header:after {
    content: "";
    width: 100%;
    height: 40%;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #1b2030 100%);
}
.header.header-compact:after { display: none; }
.header a { color: #fff; }
.header.header-compact a { color: var(--text-strong); }

.image-creativeily-header {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #222;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -2;
    animation: hero-zoom 30s ease-in-out infinite;
}
@keyframes hero-zoom {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .image-creativeily-header { animation: none; }
}

.header-top {
    position: absolute;
    overflow: visible;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 9;
    padding-bottom: 20px;
}
.header.header-compact .header-top {
    position: relative;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
}
.logo {
    text-decoration: none;
    display: inline-block;
    margin-left: 20px;
    margin-top: 20px;
    padding: 5px 10px;
    color: #fff;
    font-weight: 700;
    font-size: 30px;
}
.header.header-compact .logo { color: var(--accent-dark); font-size: 22px; margin: 0 0 0 20px; }

/* Guaranteed-readable hero text: a dark scrim behind the text itself
   (rather than trying to react to the photo's colors, which goes wrong on
   busy/colorful images) so white text stays legible over any photo, any
   crop. Shared shape/opacity between the header logo and the hero
   title/subtitle so both read the same way. */
.header:not(.header-compact) .logo {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    backdrop-filter: blur(3px);
}

.info {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    max-width: 90%;
    text-align: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 2rem;
    border-radius: 20px;
}
.info h1 { margin: 0; font-size: 55px; font-weight: 700; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.meta p.site-description { font-size: 20px; font-style: italic; margin-top: 10px; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }

#section06 {
    position: absolute;
    bottom: 1.5em;
    left: 50%;
    transform: translateX(-50%);
    height: 60px;
    width: 60px;
    z-index: 5;
}
#section06 span {
    position: absolute;
    bottom: 30px;
    left: 50%;
    width: 22px;
    height: 22px;
    margin-left: -11px;
    border-left: 1px solid #fff;
    border-bottom: 1px solid #fff;
    transform: rotate(-45deg);
    box-sizing: border-box;
    animation: bounce-arrow 2s infinite;
}
@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0) rotate(-45deg); opacity: 1; }
    50% { transform: translateY(10px) rotate(-45deg); opacity: 0.6; }
}

/* Hamburger + fullscreen menu (pure CSS checkbox toggle) */
.menu-toggle { display: none; }
.mobile-bar {
    /* absolute (not fixed) so it scrolls away with the header/logo instead
       of floating over the page content indefinitely - only visible at the
       top, same as the logo. */
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 5px 12px;
    background-color: rgba(255,255,255,0.85);
    height: 40px;
    border-radius: var(--radius-sm);
    z-index: 10;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}
.menu-icon { display: block; position: relative; width: 25px; height: 20px; cursor: pointer; }
.menu-icon > span,
.menu-icon > span:before,
.menu-icon > span:after {
    display: block; position: absolute; width: 100%; height: 2px;
    border-radius: 1px; background-color: #252525; content: "";
}
.menu-icon > span { top: 50%; margin-top: -1px; }
.menu-icon > span:before { transform: translateY(-8px); }
.menu-icon > span:after { transform: translateY(8px); }

.header-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.92);
    text-align: center; color: #eee;
    visibility: hidden; opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 20;
    overflow-y: auto;
}
#menu-toggle:checked ~ .header-menu { visibility: visible; opacity: 1; }
.menu-close {
    position: absolute; top: 20px; right: 25px;
    font-size: 2.2rem; line-height: 1; color: #fff; cursor: pointer;
}
.header-menu .top-navigation { padding-top: 7em; padding-bottom: 3em; }
.header-menu .top-navigation ul { list-style: none; margin: 0; padding: 0; }
.header-menu .top-navigation li { margin: 0.9em 0; }
.header-menu .top-navigation a { color: #fff; font-size: 1.15rem; font-weight: 600; }
.header-menu .top-navigation a:hover { text-decoration: underline; }

/* =========================================================
   Content layout
   ========================================================= */
.site-content-contain {
    background: linear-gradient(180deg, var(--wrap-bg) 0%, var(--wrap-bg-dark) 100%);
    padding: var(--space-6) 1rem;
}
.wrapmain {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
}
#primary { flex: 1 1 auto; min-width: 0; }
#secondary { flex: 0 0 var(--sidebar-width); display: flex; flex-direction: column; gap: var(--space-4); }

.page-heading { margin-bottom: var(--space-4); }
.page-heading h1 { font-size: 2rem; color: #fff; }
.page-heading .eyebrow { color: #eafbe0; }

/* =========================================================
   Post grid (modern 2-column layout)
   ========================================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

.post-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.post-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card--hover:hover .post-card__media img { transform: scale(1.05); }
.post-card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: 0.6em; flex: 1; }
.post-card__body .entry-title { font-size: 1.35rem; }
.post-card__body .entry-title a:hover { color: var(--accent-dark); }
.post-card__excerpt { flex: 1; margin: 0; }
.post-card__footer { margin-top: 0.4em; }

/* Featured card: first post on page 1 spans full width, image + text side by side */
.post-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
}
.post-card--featured .post-card__media { flex: 0 0 48%; aspect-ratio: auto; }
.post-card--featured .post-card__body { flex: 1; justify-content: center; padding: var(--space-5); }
.post-card--featured .entry-title { font-size: 1.9rem; }
.post-card--featured .post-card__excerpt { font-size: 1.02rem; }

.entry-title { font-weight: 700; line-height: 1.25; margin: 0; }
.entry-title a { color: var(--text-strong); }

/* =========================================================
   Single post / page
   ========================================================= */
article.single-post {
    background: var(--surface);
    padding: var(--space-5);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.entry-content p { margin: 0 0 1.2rem; }
.entry-content h2, .entry-content h3 { margin: 1.8em 0 0.6em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.entry-content li { margin: 0.3em 0; }
.entry-content blockquote {
    margin: 1.5rem 0;
    padding: 0.2rem 1.5rem;
    border-left: 3px solid var(--accent);
    color: var(--text-strong);
    font-style: italic;
}

/* Any image dropped directly in content: contained, rounded, shadowed - never
   "bare", and never upscaled past its real pixel size (the img itself gets
   an inline max-width:min(Npx, 100%) at build time - see content-figure). */
.entry-content figure.wp-block-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.entry-content figcaption {
    font-size: 0.85rem;
    color: var(--meta-color);
    text-align: center;
    padding: 0.6em 0.8em;
    background: var(--surface-alt);
}

/* Old WordPress [caption] shortcodes, converted to real <figure> markup on
   save (see clean_pasted_content() / scripts/fix_caption_shortcodes.py) -
   same treatment as a block image, but sized to and centered on its photo
   (the WP width="N" attribute survives on the <img> itself). */
.entry-content figure.wp-caption {
    max-width: 100%;
    width: fit-content;
    margin: 1.75rem auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.entry-content figure.wp-caption img {
    display: block;
    max-width: 100%;
    height: auto;
}
.entry-content figure.wp-caption .wp-caption-text {
    font-size: 0.85rem;
    color: var(--meta-color);
    text-align: center;
    padding: 0.6em 0.8em;
    background: var(--surface-alt);
}

/* Standalone content images (outside a gallery grid) */
.entry-content { display: flow-root; } /* contains floated figures without clipping */
.content-figure--block { margin: 1.75rem 0; }
.content-figure--block img { margin: 0 auto; }
.content-figure--float-left,
.content-figure--float-right {
    max-width: 45%;
    margin-bottom: 1.2rem;
}
.content-figure--float-left { float: left; margin-right: 1.5rem; }
.content-figure--float-right { float: right; margin-left: 1.5rem; }
@media (max-width: 700px) {
    /* text wrap is a desktop-only nicety - stack full width on mobile */
    .content-figure--float-left,
    .content-figure--float-right {
        float: none;
        max-width: 100%;
        margin: 1.5rem auto;
    }
}

/* Reusable responsive gallery grid: wraps runs of consecutive images so
   they read as a clean set instead of stacking full-width down the page. */
.image-gallery {
    display: grid;
    gap: var(--space-3);
    margin: 1.75rem 0;
}
.image-gallery--2 { grid-template-columns: repeat(2, 1fr); }
.image-gallery--3 { grid-template-columns: repeat(3, 1fr); }
.image-gallery figure.wp-block-image {
    margin: 0;
    aspect-ratio: 1 / 1;
}
.image-gallery figure.wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 700px) {
    .image-gallery--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .image-gallery { grid-template-columns: 1fr !important; }
    .image-gallery figure.wp-block-image { aspect-ratio: 4 / 3; }
}

.featured-thumb { margin: 0 0 1rem; border-radius: var(--radius-md); overflow: hidden; }
.featured-thumb img { width: 100%; }

/* =========================================================
   Sidebar widgets
   ========================================================= */
.widget { padding: var(--space-4); }
.widget-bio { text-align: center; }
.widget-bio .avatar { margin: 0 auto var(--space-3); }
.widget-bio p { font-size: 0.9rem; margin: 0.4em 0 0; }
.widget-bio .name { font-weight: 700; color: var(--text-strong); font-size: 1.05rem; }

/* Promo widget: title + linked image, reused for any "come visit X" banner */
.widget-promo { text-align: center; }
.widget-promo .panel-title { border: none; padding: 0; font-size: 0.95rem; justify-content: center; }
.widget-promo img { border-radius: var(--radius-sm); margin-top: 0.6em; }

/* Compact stacked form, reused for newsletter/subscribe-style widgets */
.mini-form { display: flex; flex-direction: column; gap: 0.6em; margin-top: 0.75em; }
.mini-form label { display: flex; flex-direction: column; gap: 0.3em; font-size: 0.78rem; font-weight: 700; color: var(--text-strong); }
.mini-form input {
    padding: 0.5em 0.8em;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    width: 100%;
}

/* Search widget - form component, reusable anywhere (sidebar, mobile menu, etc.) */
.search-form { display: flex; gap: 0.5em; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.55em 0.9em;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.9rem;
}
.search-form input[type="search"]:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.search-form button {
    border: none;
    background: var(--accent);
    color: #fff;
    width: 2.4em;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    flex: none;
}
.search-form button:hover { background: var(--accent-dark); }

/* =========================================================
   Pagination
   ========================================================= */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    margin-top: var(--space-5);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.pagination .meta-row { margin: 0 auto; }

/* =========================================================
   Post-to-post navigation (chronological prev/next) - a card
   above the article, sized/padded/spaced exactly like a sidebar
   widget so its top edge and the gap below it line up with the
   sidebar's own cards (Search, Subscribe, ...) at a glance.
   ========================================================= */
.post-nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    background: var(--surface);
    padding: 0 var(--space-4);
    min-height: var(--top-row-height);
    box-sizing: border-box;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-4); /* matches the sidebar's inter-card gap */
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
}
/* The search widget shares the same fixed height so the two cards read as
   a matched pair, whatever their (different) content naturally needs. */
.widget-search {
    display: flex;
    align-items: center;
    min-height: var(--top-row-height);
    box-sizing: border-box;
}
.post-nav-top a { display: flex; align-items: center; gap: 0.35em; color: var(--accent-dark); min-width: 0; }
.post-nav-top a:hover { color: var(--accent); }
/* Wrap onto a second line rather than truncating - text that wraps can
   never force its container wider than the available space, so this is a
   more robust guard against overflow than nowrap+ellipsis+min-width:0 was. */
.post-nav-top a span { min-width: 0; overflow-wrap: anywhere; }
.post-nav-top .post-nav--next { margin-left: auto; text-align: right; }

.post-nav {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-5);
}
.post-nav a {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    min-width: 0;
    background: var(--surface);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.post-nav a.post-nav--next { text-align: right; align-items: flex-end; }
.post-nav-label {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-dark);
}
/* Wraps instead of truncating with ellipsis - see .post-nav-top a span. */
.post-nav-title { color: var(--text-strong); font-weight: 700; max-width: 100%; min-width: 0; overflow-wrap: anywhere; }

/* =========================================================
   Social sharing (same feature set as the original site's "Share this:"
   widget - Facebook/X/LinkedIn/Pinterest/Email/Print - in this site's own
   pill-button style)
   ========================================================= */
.share-widget { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.share-widget-title { font-size: 1rem; font-weight: 700; color: var(--text-strong); margin: 0 0 0.8rem; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; margin: 0; padding: 0; }
.share-btn { gap: 0.5em; font-weight: 700; border-color: transparent; color: #fff; }
.share-btn svg { flex: none; }
.share-btn--facebook { background: #1877f2; }
.share-btn--facebook:hover { background: #1465d1; color: #fff; }
.share-btn--x { background: #111; }
.share-btn--x:hover { background: #000; color: #fff; }
.share-btn--linkedin { background: #0a66c2; }
.share-btn--linkedin:hover { background: #0954a0; color: #fff; }
.share-btn--pinterest { background: #e60023; }
.share-btn--pinterest:hover { background: #c3001d; color: #fff; }
.share-widget .share-buttons li:nth-last-child(-n+2) .share-btn { background: var(--accent); color: #fff; border-color: transparent; }
.share-widget .share-buttons li:nth-last-child(-n+2) .share-btn:hover { filter: brightness(0.9); color: #fff; }

/* Compact variant: small round icon-only buttons for the top of a single
   post and for post-card thumbnails in listings (homepage/category/search),
   echoing the original site's inline share row but subtler. */
.share-buttons--compact { gap: 0.4rem; }
.share-btn--compact {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    opacity: 0.85;
}
.share-btn--compact:hover { opacity: 1; transform: translateY(-1px); }
.post-top-share { margin: 0.6rem 0 1rem; }
.post-card__share { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; }
.post-card__media { position: relative; }
.post-card__media > a { display: block; width: 100%; height: 100%; }

/* =========================================================
   Comments (imported from the original WordPress site)
   ========================================================= */
.comments-section { background: var(--surface); padding: var(--space-5); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-top: 1.5rem; }
.comments-title { font-size: 1.2rem; font-weight: 700; color: var(--text-strong); margin: 0 0 1.2rem; }
.comments-empty { color: var(--meta-color); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list--nested { flex: 0 0 calc(100% - 2.6rem); margin: 0 0 0 2.6rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.comment { display: flex; flex-wrap: wrap; gap: 0.9rem; padding: 1.1rem 0; border-top: 1px solid var(--border); }
.comment-list > .comment:first-child { border-top: none; padding-top: 0; }
.comment-avatar {
    flex: none;
    width: 2.2rem; height: 2.2rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
}
.comment-body { min-width: 0; flex: 1; }
.comment-meta { font-size: 0.8rem; color: var(--meta-color); margin-bottom: 0.3rem; }
.comment-author { font-weight: 700; color: var(--text-strong); }
.comment-author a { color: inherit; }
.comment-meta .sep { margin: 0 0.4em; }
.comment-content { color: var(--text); overflow-wrap: anywhere; }
.comment-content p { margin: 0 0 0.8em; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: var(--space-6) 1rem var(--space-4);
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    justify-content: space-between;
}
.footer-widget { flex: 1 1 260px; }
.footer-widget .panel-title { color: #fff; border-color: rgba(255,255,255,0.12); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-bottom { text-align: center; margin-top: var(--space-5); font-size: 0.8rem; color: #666; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
    .wrapmain { flex-direction: column; }
    #secondary { flex-basis: auto; width: 100%; }
    #primary { width: 100%; max-width: 100%; }
    .posts-grid { grid-template-columns: 1fr; }
    .post-card--featured { flex-direction: column; }
    .post-card--featured .post-card__media { flex-basis: auto; aspect-ratio: 16 / 10; }
    .info h1 { font-size: 34px; }

    /* The sidebar moves below the content at this width, so the post-nav
       cards no longer need to height-match the search widget - let them
       stack full-width instead of forcing two titles into one narrow row
       (which was overflowing the viewport). */
    .post-nav { flex-direction: column; }
    .post-nav a {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .post-nav a.post-nav--next { text-align: left; align-items: flex-start; }
    .post-nav-top { flex-wrap: wrap; height: auto; min-height: 0; padding: var(--space-3) var(--space-4); }
    .post-nav-top a {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .post-nav-top .post-nav--next { margin-left: 0; text-align: left; }
}

@media (max-width: 640px) {
    /* A full 100vh hero is overkill on a phone, where it just pushes the
       actual post out of view. Shrink it to fit the logo/title/subtitle
       text plus breathing room, then let the page start right after.
       Stacking the logo/title/arrow in normal document flow (instead of
       absolute/centered over a tall box) also means the logo scrolls away
       with the rest of the header, same as before - it only "shows" until
       the page is scrolled. */
    .header:not(.header-compact) {
        height: auto;
        min-height: 0;
        padding: 20px 0 1.25rem; /* same top offset as the hamburger button, so they share a row */
    }
    .header:not(.header-compact) .header-top { position: static; padding-bottom: 0; }
    /* The background photo was position:fixed, sized to the FULL viewport
       (100vh) regardless of this now-short box - "cover" scaled it to fill
       that tall phantom height, which on a narrow phone crops most of the
       width too, then only the top sliver of that oversized render was ever
       visible: a double crop (sun cut off at top, roofline cut off at
       bottom, AND most of the sides gone). Scoping it to the header's own
       actual (shrunk) height fixes that - "cover" now only needs to crop
       ONE axis to fill this box, never both. */
    .header:not(.header-compact) .image-creativeily-header {
        position: absolute;
        height: 100%;
    }
    .header:not(.header-compact) .logo {
        margin-top: 0; /* the header's own padding above already provides the top offset */
        font-size: 20px;
        max-width: calc(100vw - 110px); /* leaves room for the hamburger sharing this row */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .header:not(.header-compact) .info {
        position: static;
        transform: none;
        width: 90%;
        max-width: none;
        margin: 1rem auto 0;
        padding: 1.25rem;
    }
    .info h1 { font-size: 24px; }
    .meta p.site-description { font-size: 14px; margin-top: 6px; }
    .header:not(.header-compact) #section06 {
        /* stays position:relative (not static) - its arrow span inside is
           absolutely positioned against *this* box, not the header */
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin: 0 auto;
    }
}

/* =========================================================
   Recipe display (server-rendered from structured recipe_data)
   ========================================================= */
.recipe__author { font-size: 0.85rem; color: var(--meta-color); margin: 0 0 0.5rem; }
.recipe__summary { font-size: 1.05rem; color: var(--text-strong); }
.recipe__group { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; color: var(--accent-dark); }
.recipe__meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: var(--space-3);
    background: var(--surface-alt);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin: 1.5rem 0;
    text-align: center;
}
.recipe__meta-grid > div { display: flex; flex-direction: column; gap: 0.2em; }
.recipe__meta-label {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-dark);
}
.recipe__meta-value { font-weight: 700; color: var(--text-strong); }
.recipe__section { margin: 2rem 0; }
.recipe__section h2 { font-size: 1.3rem; margin: 0 0 0.75rem; padding-bottom: 0.4em; border-bottom: 2px solid var(--accent-soft); }
.recipe__ingredients { list-style: none; margin: 0; padding: 0; }
.recipe__ingredients li {
    padding: 0.6em 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}
.recipe__ingredients li:last-child { border-bottom: none; }
.recipe__ingredients .amt { font-weight: 700; color: var(--text-strong); white-space: nowrap; }
.recipe__note { color: var(--meta-color); font-size: 0.9em; }
.recipe__instructions { margin: 0; padding-left: 1.4rem; }
.recipe__instructions li { padding: 0.5em 0; line-height: 1.6; }
.recipe__notes { background: var(--surface-alt); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.recipe__video-frame { aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); background: #000; }
.recipe__video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* =========================================================
   Recipe editor (admin) - repeatable rows, mobile-first
   ========================================================= */
.recipe-row-group { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; }
.recipe-row {
    display: grid;
    grid-template-columns: 70px 70px 1.2fr 1.2fr auto;
    gap: 0.5rem;
    align-items: center;
    background: var(--surface-alt);
    padding: 0.6rem;
    border-radius: var(--radius-sm);
}
.recipe-row input { padding: 0.5em; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; width: 100%; }
.recipe-row--instruction { grid-template-columns: 2.2rem 1fr auto; }
.recipe-row--equipment { grid-template-columns: 90px 1.2fr 1.2fr auto; }
.recipe-row--instruction .recipe-row-num {
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--accent-dark); font-size: 0.9rem;
}
.recipe-row--instruction textarea {
    padding: 0.5em; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.9rem; width: 100%; min-height: 2.6em; resize: vertical;
}
.recipe-row-remove {
    background: none; border: none; color: #b23a3a; font-size: 1.3rem;
    cursor: pointer; line-height: 1; padding: 0.2em 0.5em;
}
.recipe-row-add { margin-top: 0.6rem; }
@media (max-width: 640px) {
    .recipe-row { grid-template-columns: 1fr 1fr; grid-template-areas: "amt unit" "name name" "notes notes" "remove remove"; }
    .recipe-row input:nth-child(1) { grid-area: amt; }
    .recipe-row input:nth-child(2) { grid-area: unit; }
    .recipe-row input:nth-child(3) { grid-area: name; }
    .recipe-row input:nth-child(4) { grid-area: notes; }
    .recipe-row .recipe-row-remove { grid-area: remove; justify-self: end; }

    .recipe-row--equipment { grid-template-columns: 1fr; grid-template-areas: "amt" "name" "notes" "remove"; }
    .recipe-row--equipment input:nth-child(1) { grid-area: amt; }
    .recipe-row--equipment input:nth-child(2) { grid-area: name; }
    .recipe-row--equipment input:nth-child(3) { grid-area: notes; }
    .recipe-row--equipment .recipe-row-remove { grid-area: remove; justify-self: end; }
}

/* =========================================================
   Print (recipes and posts) - one click via window.print()
   ========================================================= */
@media print {
    .header, .site-footer, #secondary, .pagination, .mobile-bar { display: none !important; }
    .site-content-contain { background: none; padding: 0; }
    .wrapmain { display: block; }
    article.single-post { box-shadow: none; padding: 0; }
    .print-link { display: none; }
}

/* =========================================================
   Auth pages (admin login / setup) - centered branded card
   ========================================================= */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--wrap-bg) 0%, var(--wrap-bg-dark) 100%);
    padding: 2rem 1rem;
}
.auth-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-5);
    max-width: 380px;
    width: 100%;
    text-align: center;
}
.auth-card .site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.2rem;
}
.auth-card .auth-subtitle {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-dark);
    margin-bottom: 1.75rem;
}
.auth-card .admin-form { text-align: left; }
.auth-card .admin-form button { width: 100%; justify-content: center; }
.auth-card .auth-footer {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--meta-color);
}
.auth-card .auth-footer a { color: var(--accent-dark); font-weight: 700; }

/* =========================================================
   Visual content editor (lightweight - no JS framework, just
   contenteditable + execCommand) with a raw-HTML fallback tab
   for pasting embeds like InLinkz that need real <script> tags.
   ========================================================= */
.editor-tabs { display: flex; gap: 0.4rem; margin: 0.25rem 0 0.5rem; }
.editor-tab {
    padding: 0.4em 1em;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    border-radius: var(--radius-pill);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
}
.editor-tab.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: 0.5rem;
}
.editor-toolbar button {
    min-width: 2.2em;
    padding: 0.4em 0.6em;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
}
.editor-toolbar button:hover { background: var(--accent-soft); }
.editor-canvas {
    min-height: 320px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--surface);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
}
.editor-canvas:focus { outline: 2px solid var(--accent-soft); }
.editor-canvas img { max-width: 100%; border-radius: var(--radius-sm); }
.editor-img-wrap { position: relative; display: inline-block; max-width: 100%; }
.editor-img-wrap img { display: block; }
.editor-img-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}
.editor-img-remove:hover { background: #b23a3a; }
.editor-img-bar {
    position: absolute; top: 6px; left: 6px; display: flex; gap: 2px;
    background: rgba(0, 0, 0, 0.65); border-radius: var(--radius-sm); overflow: hidden;
}
.editor-img-bar button {
    border: none; background: transparent; color: #fff; width: 26px; height: 26px; cursor: pointer; font-size: 13px;
}
.editor-img-bar button:hover { background: rgba(255, 255, 255, 0.25); }
.editor-canvas p { margin: 0 0 1em; }
.editor-html {
    width: 100%;
    min-height: 320px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: Menlo, monospace;
    font-size: 0.85rem;
}
.editor-hidden { display: none !important; }

/* =========================================================
   Admin
   ========================================================= */
.admin-wrap { max-width: var(--max-width); margin: 0 auto; padding: var(--space-5) 1rem; }
.admin-form { display: flex; flex-direction: column; gap: var(--space-3); max-width: 700px; }
.admin-form--wide { max-width: 860px; }
.admin-form h3 { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.admin-form h3:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.admin-form label { font-weight: bold; font-size: 0.9rem; }
.admin-form input[type=text], .admin-form input[type=password], .admin-form textarea {
    width: 100%; padding: 0.6rem; font-family: inherit; font-size: 1rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.admin-form textarea { min-height: 300px; font-family: Menlo, monospace; font-size: 0.9rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: var(--surface); }
.admin-table th, .admin-table td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border); }
.flash { padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: var(--space-3); font-size: 0.9rem; }
.flash-ok { background: var(--accent-soft); color: var(--accent-dark); }
.flash-error { background: #f5dede; color: #7a2b2b; }
.admin-wrap--wide { max-width: 1200px; }

/* =========================================================
   Media library
   ========================================================= */
.media-toolbar { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.media-toolbar input[type=search] { flex: 1; min-width: 220px; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; }
.media-toolbar select { padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.media-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; display: flex; flex-direction: column; }
.media-card__thumb { aspect-ratio: 4/3; background: #f2f0ec; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-card__body { padding: 0.6rem 0.7rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.82rem; }
.media-card__meta { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.media-card__path { font-family: Menlo, monospace; font-size: 0.72rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card__usage summary, .media-card__replace summary { cursor: pointer; color: var(--accent-dark); font-size: 0.8rem; }
.media-card__usage ul { margin: 0.3rem 0 0; padding-left: 1.1rem; font-size: 0.78rem; }
.media-card__replace form { display: flex; gap: 0.4rem; margin-top: 0.4rem; align-items: center; flex-wrap: wrap; }
.media-card__action { margin: 0; }
.media-cluster { display: flex; gap: 1rem; flex-wrap: wrap; }
.media-cluster__member { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; font-size: 0.78rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem; width: 160px; }
.media-cluster__member img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); }

/* =========================================================
   Rich editor additions (admin canvas + matching public rendering)
   ========================================================= */
.editor-toolbar { flex-wrap: wrap; }
.editor-toolbar .editor-toolbar-sep { width: 1px; background: var(--border); margin: 0 0.3rem; align-self: stretch; }
.editor-toolbar select.editor-size-select { padding: 0.2rem 0.3rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; }
.editor-toolbar input[type=color] { width: 2em; height: 2em; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.editor-canvas table, .entry-content table, .recipe__notes table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.editor-canvas table td, .editor-canvas table th,
.entry-content table td, .entry-content table th,
.recipe__notes table td, .recipe__notes table th { border: 1px solid var(--border); padding: 0.5em 0.7em; vertical-align: top; }
.editor-canvas table th, .entry-content table th, .recipe__notes table th { background: var(--accent-soft); }
.editor-columns, .entry-content .editor-columns, .recipe__notes .editor-columns {
    display: grid; gap: 1.5rem; margin: 1em 0;
}
.editor-columns[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.editor-columns[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.editor-column { min-height: 1.5em; }
.editor-column:focus { outline: 2px solid var(--accent-soft); }
@media (max-width: 640px) {
    .editor-columns[data-cols="2"], .editor-columns[data-cols="3"] { grid-template-columns: 1fr; }
}
.editor-img-wrap.align-left { float: left; margin: 0 1.2rem 0.6rem 0; max-width: 45%; }
.editor-img-wrap.align-right { float: right; margin: 0 0 0.6rem 1.2rem; max-width: 45%; }
.editor-img-wrap.align-center { display: block; margin: 0.6rem auto; float: none; }
.editor-img-wrap.align-full { display: block; width: 100%; margin: 0.6rem 0; float: none; }
.entry-content img.align-left, .recipe__notes img.align-left { float: left; margin: 0 1.2rem 0.6rem 0; max-width: 45%; }
.entry-content img.align-right, .recipe__notes img.align-right { float: right; margin: 0 0 0.6rem 1.2rem; max-width: 45%; }
.entry-content img.align-center, .recipe__notes img.align-center { display: block; margin: 0.6rem auto; }
.entry-content img.align-full, .recipe__notes img.align-full { display: block; width: 100%; }
.editor-media-picker__overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1.5rem; }
.editor-media-picker { background: var(--surface); border-radius: var(--radius-md); max-width: 900px; width: 100%; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.editor-media-picker__header { padding: 1rem; border-bottom: 1px solid var(--border); display: flex; gap: 0.75rem; align-items: center; }
.editor-media-picker__header input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.editor-media-picker__grid { padding: 1rem; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; }
.editor-media-picker__grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; }
.editor-media-picker__grid img:hover { border-color: var(--accent); }
.editor-video-embed, .entry-content .editor-video-embed, .recipe__notes .editor-video-embed {
    aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); background: #000; margin: 1em 0;
}
.editor-video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* =========================================================
   Design switcher (floating pill, shared by every theme so it
   looks identical whichever design is active)
   ========================================================= */
.theme-switcher {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: rgba(22, 24, 20, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    font: 600 13px/1 -apple-system, "system-ui", "Segoe UI", Helvetica, Arial, sans-serif;
}
.theme-switcher__label {
    padding: 0 8px 0 12px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.theme-switcher a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #fff;
    transition: background 0.2s ease, color 0.2s ease;
}
.theme-switcher a:hover { background: rgba(255, 255, 255, 0.12); }
.theme-switcher a.is-active { background: #fff; color: #1d2a1b; }
@media print { .theme-switcher { display: none !important; } }
