/* =========================================================
   SmallSEOTools — design system
   System fonts only (no webfont download blocking render).
   ========================================================= */

:root {
    --bg: #F7F7F4;
    --surface: #FFFFFF;
    --surface-2: #F1F0EC;
    --ink: #14171F;
    --ink-soft: #565C6B;
    --ink-faint: #8A8F9B;
    --border: #E7E5DF;
    /* Matched to the site's existing logo/favicon (sampled directly from
       those assets): a teal-blue primary with a lime-green secondary
       accent, replacing the earlier placeholder teal/purple pairing so
       the new site reads as the same brand as the old one. */
    --accent: #0E7090;
    --accent-dark: #0B5A73;
    --accent-2: #7C9A1E;
    --accent-soft: #E3F1F5;
    --brand-lime: #B0C020; /* true sampled logo green - decorative use only, not for white-on-top text (low contrast) */
    /* Same two-tone treatment as the logo mark (.site-logo__mark), so
       primary buttons visually match the logo instead of using a flat
       single colour. */
    --brand-gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
    --warn-bg: #FFF4E5;
    --warn-ink: #92400E;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(20,23,31,0.06);
    --shadow-md: 0 8px 24px rgba(20,23,31,0.08);
    --max-width: 1180px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -999px; top: 0;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 999;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons & form controls ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: inherit; font-size: 0.95rem; font-weight: 600;
    padding: 11px 20px; border-radius: var(--radius-sm);
    border: 1px solid transparent; cursor: pointer;
    background: var(--brand-gradient); color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.18);
    transition: transform .08s ease, box-shadow .15s ease, filter .15s ease;
    text-decoration: none;
}
.btn:hover { filter: brightness(0.92); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--outline:hover { background: var(--surface-2); }
.btn--sm { padding: 7px 14px; font-size: 0.85rem; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=search], input[type=number], textarea, select {
    font-family: inherit; font-size: 0.95rem; color: var(--ink);
    padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); width: 100%;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label { font-weight: 600; font-size: 0.85rem; color: var(--ink-soft); display: block; margin-bottom: 6px; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.site-header__inner { display: flex; align-items: center; gap: 24px; padding: 14px 20px; }
.site-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.site-logo__mark {
    width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 1rem;
}
/* Echoes the original logo's word treatment: "SEO" picked out in the
   brand's lime-green between the teal "Small"/"Tools" either side. */
.site-logo__highlight { color: var(--brand-lime); }
.site-logo__image { height: 32px; width: auto; display: block; }
.main-nav { flex: 1; }
/* Right-align within the flexible nav column so the menu sits in the open
   whitespace next to the language switcher, instead of hugging the logo. */
.main-nav__list { display: flex; justify-content: flex-end; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav__link {
    display: inline-block; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.92rem;
    color: var(--ink); background: none; border: none; cursor: pointer; font-family: inherit;
}
.main-nav__link:hover, .main-nav__toggle[aria-expanded="true"] { background: var(--surface-2); text-decoration: none; }
.main-nav__item--has-dropdown { position: relative; }
.main-nav__dropdown {
    display: none; position: absolute; top: 100%; left: 0; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    padding: 10px; width: 320px; grid-template-columns: 1fr; gap: 2px;
}
.main-nav__item--has-dropdown:hover .main-nav__dropdown,
.main-nav__item--has-dropdown:focus-within .main-nav__dropdown { display: grid; }
.main-nav__dropdown-link { display: flex; flex-direction: column; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink); }
.main-nav__dropdown-link:hover { background: var(--accent-soft); text-decoration: none; }
.main-nav__dropdown-link strong { font-size: 0.9rem; }
.main-nav__dropdown-link span { font-size: 0.8rem; color: var(--ink-faint); }

.site-search { display: flex; align-items: center; background: var(--surface-2); border-radius: var(--radius-sm); padding: 2px; }
.site-search input { background: transparent; border: none; width: 190px; padding: 8px 10px; }
.site-search input:focus { outline: none; }
.site-search button { background: none; border: none; padding: 8px 10px; cursor: pointer; color: var(--ink-soft); }

.mobile-nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: 8px; cursor: pointer; }
.mobile-nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Language switcher ---------- */
.lang-switcher { position: relative; flex-shrink: 0; }
.lang-switcher__toggle {
    display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface); font-family: inherit; font-weight: 600;
    font-size: 0.85rem; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.lang-switcher__toggle:hover { background: var(--surface-2); }
.lang-switcher__flag { font-size: 1.05rem; line-height: 1; }
.lang-switcher__code { text-transform: uppercase; }
.lang-switcher__caret { color: var(--ink-faint); font-size: 0.7rem; }
.lang-switcher__menu {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 8px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    padding: 10px; width: 300px; max-height: 70vh; overflow-y: auto; z-index: 150;
    grid-template-columns: 1fr 1fr; gap: 2px;
}
.lang-switcher.is-open .lang-switcher__menu { display: grid; }
.lang-switcher__item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--ink); font-size: 0.85rem; font-weight: 600;
}
.lang-switcher__item:hover { background: var(--accent-soft); text-decoration: none; }
.lang-switcher__item.is-active { background: var(--accent); color: #fff; }
[dir="rtl"] .lang-switcher__menu { right: auto; left: 0; }
@media (max-width: 860px) {
    .lang-switcher__menu { right: -60px; }
}

/* ---------- Admin: WYSIWYG editor (articles + tool content) ---------- */
.wysiwyg-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.wysiwyg-toolbar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.wysiwyg-toolbar__btn { border: 1px solid transparent; background: none; padding: 5px 9px; border-radius: 6px; font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--ink); font-family: inherit; }
.wysiwyg-toolbar__btn:hover { background: var(--surface); border-color: var(--border); }
.wysiwyg-editable { min-height: 220px; max-height: 520px; overflow-y: auto; padding: 14px 16px; font-size: 0.95rem; line-height: 1.6; }
.wysiwyg-editable:focus { outline: none; }
.wysiwyg-editable h2 { font-size: 1.2rem; margin: 0.8em 0 0.4em; }
.wysiwyg-editable h3 { font-size: 1.05rem; margin: 0.7em 0 0.3em; }
.wysiwyg-editable p { margin: 0 0 0.8em; }
.wysiwyg-editable ul, .wysiwyg-editable ol { padding-left: 1.3em; margin: 0 0 0.8em; }

/* ---------- Admin: tool-content editor ---------- */
.faq-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.faq-row textarea { min-height: 44px; }
.admin-filter { width: 100%; max-width: 320px; margin-bottom: 14px; }
.lang-pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.lang-pill { padding: 6px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.lang-pill:hover { background: var(--surface-2); text-decoration: none; }
.lang-pill.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.content-status { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.03em; }
.content-status--translated { background: var(--accent-soft); color: var(--accent-dark); }
.content-status--fallback { background: var(--surface-2); color: var(--ink-faint); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 760px; margin: 0 auto 0.5em; }
.hero p.lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 600px; margin: 0 auto 28px; }
.hero-search-wrap { max-width: 560px; margin: 0 auto; position: relative; }
.hero-search { display: flex; gap: 8px; }
.hero-search input { padding: 14px 16px; border-radius: var(--radius-md); }
.hero-search-suggest {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    box-shadow: var(--shadow-md); padding: 6px; text-align: left; max-height: 320px; overflow-y: auto;
}
.hero-search-suggest a {
    display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
    color: var(--ink); font-size: 0.9rem; font-weight: 600;
}
.hero-search-suggest a:hover, .hero-search-suggest a.is-active { background: var(--accent-soft); text-decoration: none; }
.hero-search-suggest a span { color: var(--ink-faint); font-weight: 500; font-size: 0.78rem; white-space: nowrap; }
.hero-search-suggest__empty { padding: 10px; font-size: 0.85rem; color: var(--ink-faint); }

/* Homepage hero — same soft gradient-band treatment as .category-hero/
   .blog-hero, full-bleed (edge to edge, outside .container) rather than a
   rounded card, since the hero now sits on its own above the sidebar grid
   instead of sharing a row with it - see .hero.tool-hero's own .container
   wrapper in index.php. */
.tool-hero { background: linear-gradient(135deg, #E3F1F5, #F0F5D8); padding: 44px 0 36px; }
.tool-topics { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; }
.tool-topic { padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-size: .85rem; text-decoration: none; color: var(--ink); }
.tool-topic span { color: var(--ink-faint); margin-left: 4px; }
.tool-topic.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tool-topic.is-active span { color: #cfd3dc; }

/* Category page — small matching gradient band behind the breadcrumb/title,
   so "View All" from the homepage lands somewhere visually consistent. */
.category-hero { background: linear-gradient(135deg, #E3F1F5, #F0F5D8); padding: 22px 0 28px; margin-bottom: 8px; }
.category-hero h1 { margin: 10px 0 8px; }
.category-hero .lead { margin: 0; max-width: 680px; }

/* ---------- Category / tool grid ---------- */
.section { padding: 36px 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.section__head h2 { font-size: 1.35rem; }
.section__head p { color: var(--ink-faint); margin: 0; font-size: 0.9rem; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tool-card {
    display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 16px; color: var(--ink); position: relative;
    transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.tool-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.tool-card__icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--radius-sm); background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.tool-card__name { font-weight: 700; display: block; font-size: 0.95rem; }
.tool-card__desc { font-size: 0.82rem; color: var(--ink-faint); display: block; margin-top: 2px; line-height: 1.4; }
.tool-card--soon { opacity: 0.72; }
.tool-card__badge {
    position: absolute; top: 10px; right: 10px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    background: var(--warn-bg); color: var(--warn-ink); padding: 3px 7px; border-radius: 20px; letter-spacing: 0.03em;
}
.tool-card__pro {
    display: inline-block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; margin-left: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; padding: 2px 6px;
    border-radius: 6px; vertical-align: middle; position: relative; top: -1px;
}

.category-chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.category-chip {
    padding: 8px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
    font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
}
.category-chip:hover, .category-chip--active { background: var(--ink); color: #fff; border-color: var(--ink); text-decoration: none; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 18px; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs span[aria-hidden] { margin: 0 6px; }

/* ---------- Tool page ---------- */
.tool-page-head { padding: 32px 0 8px; text-align: center; }
.tool-page-head .breadcrumbs { display: none; }
.tool-page-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.tool-page-head p.lead { color: var(--ink-soft); max-width: 680px; margin: 0 auto; }

.tool-panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; box-shadow: var(--shadow-sm); margin: 20px 0 36px;
}
.tool-panel__row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.tool-panel__result {
    background: var(--surface-2); border-radius: var(--radius-md); padding: 16px; margin-top: 16px;
    font-size: 0.92rem;
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.stat-box { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.stat-box strong { display: block; font-size: 1.3rem; color: var(--accent-dark); }
.stat-box span { font-size: 0.75rem; color: var(--ink-faint); }

/* ---------- Sidebar (homepage + tool pages: Popular Tools / Blog / Categories) ---------- */
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: start; }
.layout-with-sidebar__main { min-width: 0; }
.sidebar {
    display: flex; flex-direction: column; gap: 16px;
    /* Deliberately NOT position:sticky - a sticky sidebar (and the ad
       inside it) used to follow the visitor down the page while scrolling,
       which looked spammy. It now just starts where the tool/category
       content starts and scrolls normally with the rest of the page. */
}
.sidebar-widget {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 16px; box-shadow: var(--shadow-sm);
}
.sidebar-widget__title {
    font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--accent-dark); margin: 0 0 12px; padding-left: 10px; border-left: 3px solid var(--accent);
}
.sidebar-widget__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.sidebar-widget__list li { font-size: 0.88rem; line-height: 1.35; }
.sidebar-widget__list a { color: var(--accent-dark); font-weight: 600; }
.sidebar-widget__list a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 880px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { flex-direction: row; flex-wrap: wrap; }
    .sidebar-widget { flex: 1 1 220px; }
}

.coming-soon-box {
    background: var(--warn-bg); border: 1px solid #F3DCB3; color: var(--warn-ink);
    border-radius: var(--radius-md); padding: 18px 20px; margin: 20px 0;
}

/* ---------- Contact form ---------- */
.contact-form { display: grid; gap: 16px; margin-top: 20px; }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .contact-form__row { grid-template-columns: 1fr; } }
.contact-form__flash { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.9rem; font-weight: 600; }
.contact-form__flash.is-ok { background: #E9F6EC; color: #1E6B35; }
.contact-form__flash.is-err { background: var(--warn-bg); color: var(--warn-ink); }

.article-body { max-width: 720px; margin: 0 auto; font-size: 1rem; }
.article-body h2 { font-size: 1.3rem; margin-top: 1.6em; }
.article-body h3 { font-size: 1.1rem; margin-top: 1.3em; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.faq-item { border-top: 1px solid var(--border); padding: 16px 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 1rem; }
.faq-item p { margin: 0; color: var(--ink-soft); }

/* ---------- Ad slots ---------- */
.ad-slot { margin: 24px auto; text-align: center; }
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--in-article { min-height: 120px; }
.ad-slot--sidebar { min-height: 250px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #D7DAE0; margin-top: 40px; padding-top: 44px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 24px; padding-bottom: 32px; }
.site-footer__brand p { color: #9BA1B0; font-size: 0.88rem; margin-top: 10px; }
.site-footer .site-logo { color: #fff; }
.site-footer__col h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: #8B92A3; margin-bottom: 10px; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.site-footer__col a { color: #C7CBD6; font-size: 0.88rem; }
.site-footer__col a:hover { color: #fff; }
.site-footer__bottom { border-top: 1px solid #272C38; padding: 16px 20px; font-size: 0.8rem; color: #747A8A; }

/* Newsletter signup bar (includes/footer.php, newsletter-subscribe.php) */
.site-footer__newsletter { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px 20px 24px; border-bottom: 1px solid #272C38; }
.site-footer__newsletter-text h3 { margin: 0 0 4px; font-size: 1rem; color: #fff; }
.site-footer__newsletter-text p { margin: 0; font-size: 0.86rem; color: #9BA1B0; max-width: 420px; }
.site-footer__newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.site-footer__newsletter-form input[type="email"] { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid #39404F; background: #1B2029; color: #fff; font-size: 0.9rem; min-width: 220px; }
.site-footer__newsletter-form input[type="email"]::placeholder { color: #747A8A; }
.site-footer__newsletter-form button { padding: 10px 18px; border-radius: var(--radius-sm); border: none; background: var(--accent); color: #fff; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.site-footer__newsletter-form button:hover { background: var(--accent-dark); }
.site-footer__newsletter-captcha { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: #C7CBD6; }
.site-footer__newsletter-captcha input { width: 54px; padding: 8px; border-radius: var(--radius-sm); border: 1px solid #39404F; background: #1B2029; color: #fff; }
.site-footer__newsletter-flash { flex-basis: 100%; margin: 0; font-size: 0.82rem; }
.site-footer__newsletter-flash.is-ok { color: #7FE0A8; }
.site-footer__newsletter-flash.is-err { color: #F3A1A1; }
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .main-nav, .site-search { display: none; }
    .mobile-nav-toggle { display: flex; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .site-footer__grid { grid-template-columns: 1fr; }
    .hero-search { flex-direction: column; }
    .site-footer__newsletter { flex-direction: column; align-items: flex-start; }
    .site-footer__newsletter-form { width: 100%; }
    .site-footer__newsletter-form input[type="email"] { flex: 1; min-width: 0; }
}

/* =========================================================
   Blog — unique layout, AdSense-friendly (reserved ad heights,
   labelled ads, no ads above the headline)
   ========================================================= */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; z-index: 100; }

.post-hero { --h: 200; background: linear-gradient(135deg, hsl(var(--h) 55% 94%), hsl(calc(var(--h) + 40) 60% 90%)); border-bottom: 1px solid var(--border); padding: 28px 0 36px; }
.post-hero__inner { max-width: 820px; }
.post-hero .breadcrumbs { font-size: .85rem; color: var(--ink-soft); margin-bottom: 14px; }
.post-hero .breadcrumbs span { margin: 0 6px; }
.post-chip { display: inline-block; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; text-decoration: none; }
.post-title { font-size: clamp(1.8rem, 4.2vw, 2.8rem); line-height: 1.15; margin: 14px 0 12px; letter-spacing: -.02em; }
.post-deck { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 16px; line-height: 1.5; }
.post-meta { font-size: .9rem; color: var(--ink-soft); margin: 0; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-top: 36px; padding-bottom: 48px; align-items: start; }
.post-main { min-width: 0; max-width: 760px; }
.post-body { font-size: 1.0625rem; line-height: 1.75; }
.post-body h2 { margin: 2.2em 0 .6em; font-size: 1.55rem; line-height: 1.25; padding-left: 14px; border-left: 4px solid var(--accent); scroll-margin-top: 80px; }
.post-body h3 { margin: 1.8em 0 .5em; font-size: 1.2rem; scroll-margin-top: 80px; }
.post-body p { margin: 0 0 1.1em; }
.post-body a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); display: block; margin: 1.4em auto; }
.post-body blockquote { margin: 1.5em 0; padding: 12px 18px; border-left: 4px solid var(--brand-lime); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.post-body li { margin-bottom: .4em; }
.blog-table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.blog-table-wrap table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.blog-table-wrap th, .blog-table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.blog-table-wrap th { background: var(--surface-2); }

.blog-ad { margin: 2em 0; text-align: center; clear: both; }
.blog-ad__label { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.blog-ad--in-article { min-height: 280px; }
.blog-ad--sidebar { min-height: 600px; margin-top: 0; }
.blog-ad--leaderboard { min-height: 100px; }
.blog-ad__preview { display: flex; align-items: center; justify-content: center; min-height: 250px; height: 100%; border: 2px dashed var(--border); color: var(--ink-faint); border-radius: var(--radius-sm); }
.blog-ad--sidebar .blog-ad__preview { min-height: 600px; }

.blog-promo { margin: 2em 0; padding: 18px 20px; background: var(--accent-soft); border: 1px solid #C5E1EA; border-radius: var(--radius-md); }
.blog-promo__kicker { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-dark); }
.blog-promo__title { display: block; font-size: 1.2rem; font-weight: 700; margin: 4px 0; color: var(--ink) !important; text-decoration: none !important; }
.blog-promo__desc { margin: 0 0 12px !important; color: var(--ink-soft); font-size: .95rem; line-height: 1.5; }
.btn--sm { padding: 7px 14px; font-size: .9rem; }

.post-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 20px; }
.post-toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; }
.post-toc__title, .post-side-card__title { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.post-toc ol { margin: 0; padding-left: 18px; font-size: .92rem; line-height: 1.4; }
.post-toc li { margin-bottom: 6px; }
.post-toc a { color: var(--ink); text-decoration: none; }
.post-toc a:hover { color: var(--accent); }
.post-side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; }
.post-side-card a { font-weight: 700; color: var(--accent-dark); }
.post-side-card p { font-size: .9rem; color: var(--ink-soft); margin: 6px 0 0; }
.post-toc-mobile { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 20px; }
.post-toc-mobile summary { cursor: pointer; font-weight: 700; }

.post-section-title { font-size: 1.3rem; margin: 2.4em 0 .8em; }
.post-tools__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.post-tool { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.post-tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); text-decoration: none; }
.post-tool:hover .post-tool__go { text-decoration: underline; }
.post-tool__name { font-weight: 700; }
.post-tool__desc { font-size: .88rem; color: var(--ink-soft); }
.post-tool__go { font-size: .85rem; font-weight: 700; color: var(--accent-dark); margin-top: auto; }

/* Listing */
.blog-hero { background: linear-gradient(135deg, #E3F1F5, #F0F5D8); border-bottom: 1px solid var(--border); padding: 44px 0 28px; }
.blog-hero h1 { margin: 0 0 8px; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.02em; }
.blog-hero__lead { margin: 0 0 20px; color: var(--ink-soft); font-size: 1.1rem; }
.blog-search { display: flex; gap: 8px; max-width: 520px; margin-bottom: 18px; }
.blog-search input { flex: 1; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; background: #fff; }
.blog-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-topic { padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-size: .88rem; text-decoration: none; color: var(--ink); }
.blog-topic span { color: var(--ink-faint); margin-left: 4px; }
.blog-topic.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.blog-topic.is-active span { color: #cfd3dc; }
.blog-list { padding-top: 32px; padding-bottom: 48px; }
.blog-empty { padding: 40px 0; color: var(--ink-soft); }

.blog-cover { --h: 200; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, hsl(var(--h) 60% 52%), hsl(calc(var(--h) + 45) 65% 40%)); position: relative; overflow: hidden; }
.blog-cover::after { content: ""; position: absolute; width: 60%; aspect-ratio: 1; right: -12%; bottom: -35%; border-radius: 50%; background: rgba(255,255,255,.14); }
.blog-cover__topic { position: absolute; left: 14px; bottom: 12px; color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; z-index: 1; }
.blog-cover--photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.blog-cover--photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), transparent 55%); z-index: 1; }
.blog-cover--photo::after { display: none; }

.post-hero__image { max-width: 820px; margin: 0 auto 20px; border-radius: var(--radius-lg); overflow: hidden; }
.post-hero__image img { width: 100%; max-height: 420px; object-fit: cover; display: block; }

.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.blog-grid__ad { grid-column: 1 / -1; }
.blog-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.blog-card:hover .blog-card__more { text-decoration: underline; }
.blog-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.blog-card__meta { font-size: .78rem; color: var(--ink-faint); }
.blog-card__title { font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.blog-card__excerpt { font-size: .92rem; color: var(--ink-soft); line-height: 1.5; }
.blog-card__more { margin-top: auto; font-size: .85rem; font-weight: 700; color: var(--accent-dark); }
.blog-card--feature { flex-direction: row; margin-bottom: 26px; }
.blog-card--feature .blog-cover { flex: 0 0 48%; aspect-ratio: auto; min-height: 280px; }
.blog-card--feature .blog-card__title { font-size: 1.6rem; }
.blog-card--feature .blog-card__body { padding: 28px; justify-content: center; }
.blog-pager { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 34px; }
.blog-pager a { padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; text-decoration: none; color: var(--ink); font-weight: 600; }

@media (max-width: 960px) {
    .post-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .post-side { position: static; }
    .post-side .post-toc, .blog-ad--sidebar { display: none; }
    .post-toc-mobile { display: block; }
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .blog-grid { grid-template-columns: minmax(0, 1fr); }
    .blog-card--feature { flex-direction: column; }
    .blog-card--feature .blog-cover { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
    .post-body { font-size: 1rem; }
}
