/* ============================================================
   LCNTech News — site stylesheet
   Brand: Navy (#03112e) + Orange (#f97316) — matches lcntech.com
   Theme: light default; dark via <html data-theme="dark">
   ============================================================ */

:root {
    /* Light theme (default) — LCNTech brand palette */
    --bg-0:        #ffffff;
    --bg-1:        #f7f8fb;
    --bg-2:        #ffffff;
    --bg-3:        #eef0f5;
    --bg-soft:     #fafbfc;
    --bg-hover:    #f0f2f8;
    --bg-deep:     #f7f8fb;

    --text-0:      #03112e;
    --text-1:      #03112e;
    --text-2:      #5a6a85;
    --text-dim:    #8a9ab5;
    --text-dimer:  #b0bccf;

    --border:      #dde3ef;
    --border-soft: #e8ecf5;

    --cyan:        #03112e;
    --cyan-bright: #f97316;
    --on-cyan:     #ffffff;

    --green:       #00873d;
    --orange:      #f97316;
    --yellow:      #b88600;
    --red:         #c93030;

    --st-approved-bg: #d4f5e5;
    --st-approved-fg: #00753f;
    --st-synth-bg:    #d6ecf5;
    --st-synth-fg:    #006a8a;
    --st-rejected-bg: #fde0e0;
    --st-rejected-fg: #b91c1c;
    --st-pending-bg:  #fdf4d1;
    --st-pending-fg:  #835400;
    --st-error-bg:    #fde6d3;
    --st-error-fg:    #a13503;

    --staging-bg:     #fef3c7;
    --staging-fg:     #92400e;

    --code-fg:        #00753f;
    --textarea-bg:    #ffffff;
    --textarea-border:#c8cad0;
    --shadow-card:    0 1px 2px rgba(0,0,0,0.04);

    --serif: Georgia, "Times New Roman", serif;
    --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --mono:  ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

    color-scheme: light;

    /* ----- Layout tokens (theme-agnostic) ----- */
    --maxw:        2200px;          /* effectively full-bleed on all common displays */
    --pad-x:       clamp(16px, 4vw, 56px);
    --gap:         clamp(16px, 1.6vw, 28px);
    --radius:      14px;
    --radius-sm:   9px;
    --radius-pill: 999px;
    --nav-h:       60px;
    --measure:     74ch;            /* readable article column */
    --accent:      var(--cyan-bright);
    --shadow-1:    0 1px 2px rgba(15,23,42,.05), 0 2px 8px rgba(15,23,42,.04);
    --shadow-2:    0 6px 24px rgba(15,23,42,.10);
    --ring:        color-mix(in srgb, var(--accent) 40%, transparent);
}

html[data-theme="dark"] {
    --bg-0:        #03112e;
    --bg-1:        #071e4a;
    --bg-2:        #0a1f4e;
    --bg-3:        #0e2558;
    --bg-soft:     #051628;
    --bg-hover:    #0d2252;
    --bg-deep:     #020e24;

    --text-0:      #ffffff;
    --text-1:      #e8edf6;
    --text-2:      #a8bad4;
    --text-dim:    #7090b8;
    --text-dimer:  #4a6a9a;

    --border:      #1a3060;
    --border-soft: #152848;

    --cyan:        #4a7ab5;
    --cyan-bright: #f97316;
    --on-cyan:     #ffffff;

    --green:       #00cc66;
    --orange:      #f97316;
    --yellow:      #ffaa00;
    --red:         #ff6b6b;

    --st-approved-bg: #0d3d2d;
    --st-approved-fg: #00ff88;
    --st-synth-bg:    #0d3d4d;
    --st-synth-fg:    #00d4ff;
    --st-rejected-bg: #4d0d0d;
    --st-rejected-fg: #ff6b6b;
    --st-pending-bg:  #3d3d0d;
    --st-pending-fg:  #e0c200;
    --st-error-bg:    #4d2d0d;
    --st-error-fg:    #ff8855;

    --staging-bg:     #4d2d0d;
    --staging-fg:     #ffaa00;

    --code-fg:        #00ff88;
    --textarea-bg:    #252529;
    --textarea-border:#444444;
    --shadow-card:    none;

    --shadow-1:    0 1px 2px rgba(0,0,0,.4);
    --shadow-2:    0 10px 34px rgba(0,0,0,.55);

    color-scheme: dark;
}

/* ===== Base ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font: 16px/1.65 var(--sans);
    background: var(--bg-0);
    color: var(--text-1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .2s ease, color .2s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--text-0); line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 .5em; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code {
    background: var(--bg-3);
    padding: 2px 6px;
    border-radius: 5px;
    font: 0.88em/1.5 var(--mono);
    color: var(--code-fg);
}

/* ===== Layout ========================================== */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--pad-x);
}
.site-main { flex: 1 0 auto; padding-block: clamp(22px, 3vw, 44px); }

/* ===== Top navigation ================================== */
.site-nav {
    position: sticky; top: 0; z-index: 50;
    background: #03112e;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-inner {
    display: flex; align-items: center; gap: 18px;
    min-height: var(--nav-h);
}
.site-logo { display: inline-flex; align-items: center; margin-right: auto; }
.site-logo-text {
    font-weight: 800; font-size: 1.18rem; letter-spacing: -0.03em;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: #ffffff;
}
.site-logo-text span { color: #f97316; -webkit-text-fill-color: #f97316; }
.site-nav nav { display: flex; gap: 4px; }
.site-nav nav a {
    color: rgba(255,255,255,0.65); font-weight: 600; font-size: .92rem;
    padding: 7px 12px; border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}
.site-nav nav a:hover { color: #ffffff; background: rgba(255,255,255,0.08); text-decoration: none; }
.site-nav nav a.active { color: #f97316; background: rgba(249,115,22,0.12); }
.theme-toggle {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px; flex: none;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg-2); color: var(--text-2); cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.ti-sun { display: none; }
html[data-theme="dark"] .ti-moon { display: none; }
html[data-theme="dark"] .ti-sun  { display: block; }

/* ===== Buttons & chips ================================= */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font: 600 .92rem/1 var(--sans);
    padding: 11px 18px; border-radius: var(--radius-pill);
    background: var(--accent); color: var(--on-cyan);
    border: 1px solid transparent; cursor: pointer;
    transition: transform .12s ease, box-shadow .15s, filter .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.05); box-shadow: var(--shadow-2); }
.btn-secondary { background: var(--bg-2); color: var(--text-0); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.btn-sm { padding: 7px 13px; font-size: .85rem; }

.pill {
    display: inline-flex; align-items: center;
    font: 700 .66rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
    padding: 4px 8px; border-radius: var(--radius-pill); vertical-align: middle;
}
.pill-preview { background: var(--st-synth-bg); color: var(--st-synth-fg); }

/* ===== Home: hero ====================================== */
.home-container { display: flex; flex-direction: column; gap: clamp(30px, 4vw, 56px); }

.home-hero {
    display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(18px, 2.5vw, 40px);
    align-items: stretch;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-1);
    transition: border-color .15s, box-shadow .2s, transform .2s;
}
.home-hero:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-2); }
.home-hero-img { position: relative; min-height: 100%; }
.home-hero-img img { width: 100%; height: 100%; aspect-ratio: 16/10; object-fit: cover; }
.home-hero-body { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(22px, 3vw, 48px); }
.home-hero-eyebrow {
    font: 700 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent);
}
.home-hero-title { font-size: clamp(1.7rem, 3.4vw, 3rem); font-weight: 800; color: var(--text-0); margin: 0; }
.home-hero-lede { font-size: clamp(1rem, 1.2vw, 1.18rem); color: var(--text-2); margin: 0; max-width: 60ch; }
.home-hero-meta { font: 600 .82rem/1 var(--mono); color: var(--text-dim); letter-spacing: .02em; margin-top: 4px; }

/* ===== Home: sections & grid =========================== */
.home-section { display: flex; flex-direction: column; gap: var(--gap); }
.home-section-title {
    font-size: 1.05rem; font-weight: 700; color: var(--text-0); margin: 0;
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.home-section-title::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }

.home-grid {
    display: grid;
    /* Dense grid: ~6 cols at 1440px, ~8 at 1920px, more on ultrawide. */
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: var(--gap);
}

.home-card {
    display: flex; flex-direction: column;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .16s ease, border-color .16s, box-shadow .2s;
    content-visibility: auto; contain-intrinsic-size: 360px;
}
.home-card:hover { text-decoration: none; transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-2); }
.home-card-img { overflow: hidden; background: var(--bg-3); }
.home-card-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .35s ease; }
.home-card:hover .home-card-img img { transform: scale(1.04); }
.home-card-img-empty { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--bg-3), var(--bg-1)); }
.home-card-title { font-size: 1rem; font-weight: 700; color: var(--text-0); margin: 13px 13px 0; line-height: 1.25; }
.home-card-lede { color: var(--text-2); font-size: .85rem; line-height: 1.45; margin: 7px 13px 0; flex: 1 0 auto;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.home-card-meta { font: 600 .72rem/1 var(--mono); color: var(--text-dim); margin: 12px 13px 13px; letter-spacing: .02em; }
.home-card-pinned { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }

/* "Even more" compact list */
.home-section-more .home-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.home-list li {
    display: flex; align-items: baseline; gap: 14px; justify-content: space-between;
    padding: 12px 4px; border-bottom: 1px solid var(--border-soft);
}
.home-list li a { color: var(--text-0); font-weight: 600; }
.home-list-meta { font: 600 .76rem/1 var(--mono); color: var(--text-dim); flex: none; }
.home-archive-link { margin-top: 8px; }

/* ===== Article ========================================= */
.article-wrap { max-width: var(--measure); margin-inline: auto; }
.article-preview-banner {
    background: var(--st-synth-bg); color: var(--st-synth-fg);
    border: 1px solid color-mix(in srgb, var(--st-synth-fg) 30%, transparent);
    border-radius: var(--radius-sm); padding: 12px 16px; font-size: .9rem; margin-bottom: 22px;
}
.article-preview-banner a { color: inherit; font-weight: 700; text-decoration: underline; }
.article-meta-line { font: 600 .8rem/1 var(--mono); color: var(--text-dim); letter-spacing: .04em; text-transform: uppercase; }
.article-title { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 800; margin: 12px 0 14px; }
.article-lede { font-size: 1.2rem; line-height: 1.55; color: var(--text-2); margin: 0 0 26px; }
.article-hero { margin: 0 0 28px; }
.article-hero img { width: 100%; border-radius: var(--radius); }
.article-hero figcaption { font-size: .82rem; color: var(--text-dim); margin-top: 8px; text-align: center; }

.article-body { font-size: 1.075rem; line-height: 1.78; color: var(--text-1); }
.article-body > * + * { margin-top: 1.15em; }
.article-body h2 { font-size: 1.5rem; font-weight: 800; margin-top: 1.8em; }
.article-body h3 { font-size: 1.2rem; font-weight: 700; margin-top: 1.5em; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li { margin-top: .4em; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body blockquote {
    margin: 1.5em 0; padding: 6px 0 6px 20px; border-left: 3px solid var(--accent);
    color: var(--text-2); font-style: italic;
}
.article-body img { border-radius: var(--radius-sm); margin-block: 1.4em; }

.article-pageviews { font: 600 .8rem/1 var(--mono); color: var(--text-dim); margin-top: 28px; }
.article-videos { margin-top: 32px; }
.article-video { margin: 0 0 18px; }
.article-video video { width: 100%; border-radius: var(--radius); background: #000; }
.article-video figcaption { font-size: .82rem; color: var(--text-dim); margin-top: 6px; }

.article-foot {
    margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border);
    font-size: .9rem; color: var(--text-dim);
}
.article-entities { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.article-entities-label { font: 700 .74rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.entity-tag {
    display: inline-flex; align-items: center; font-size: .82rem; font-weight: 600;
    padding: 5px 11px; border-radius: var(--radius-pill);
    background: var(--bg-3); color: var(--text-1); border: 1px solid var(--border);
}
.entity-tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.article-side-section { max-width: var(--maxw); margin: 48px auto 0; }
.article-side-title {
    font-size: 1.05rem; font-weight: 700; margin: 0 0 var(--gap);
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.article-side-title::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }

/* ===== Archive ========================================= */
/* ===== Search form ==================================== */
.search-form { display: flex; gap: 10px; margin: 0 0 26px; }
.search-form input[type="search"] {
    flex: 1 1 auto; min-width: 0;
    font: 400 1rem/1.2 var(--sans);
    padding: 11px 16px;
    color: var(--text-0); background: var(--bg-2);
    border: 1px solid var(--border); border-radius: var(--radius-pill);
    transition: border-color .15s, box-shadow .15s;
}
.search-form input[type="search"]::placeholder { color: var(--text-2, #8a8a92); }
.search-form input[type="search"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.search-form .btn { flex: 0 0 auto; }
.home-search { margin-top: 4px; }

.archive-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 26px; }
.archive-list { display: flex; flex-direction: column; gap: 4px; }
.archive-row {
    display: grid; grid-template-columns: 168px 1fr; gap: 20px; align-items: center;
    padding: 16px; border: 1px solid transparent; border-radius: var(--radius);
    transition: background .15s, border-color .15s;
}
.archive-row:hover { background: var(--bg-1); border-color: var(--border); text-decoration: none; }
.archive-row-img { border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-3); }
.archive-row-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.archive-row-img-empty { aspect-ratio: 16/10; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--bg-3), var(--bg-1)); }
.archive-row-title { font-size: 1.18rem; font-weight: 700; color: var(--text-0); margin: 0 0 6px; }
.archive-row-lede { color: var(--text-2); font-size: .94rem; margin: 0; }
.archive-row-meta { font: 600 .76rem/1 var(--mono); color: var(--text-dim); margin-top: 10px; letter-spacing: .02em; }
.archive-row-pin { color: var(--accent); }

/* ===== Entity hub ====================================== */
.entity-head { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.entity-eyebrow { font: 700 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.entity-name { font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-weight: 800; margin: 10px 0 6px; }
.entity-subline { color: var(--text-2); margin: 0; }
.entity-pager { margin-top: 28px; }

/* ===== Pagination ====================================== */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 36px; }
.page-link {
    display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-1); font-weight: 600; background: var(--bg-2);
    transition: border-color .15s, color .15s, background .15s;
}
.page-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.page-link-active { background: var(--accent); color: var(--on-cyan); border-color: var(--accent); }
.page-gap { display: inline-grid; place-items: center; min-width: 28px; color: var(--text-dim); }

/* ===== Footer ========================================== */
.site-footer { flex: none; border-top: 1px solid var(--border); background: var(--bg-1); margin-top: clamp(40px, 6vw, 80px); }
.site-footer .container { padding-block: clamp(32px, 4vw, 52px); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer-col strong { display: block; color: var(--text-0); font-size: .95rem; margin-bottom: 12px; }
.footer-col p { color: var(--text-2); font-size: .9rem; margin: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col ul a { color: var(--text-2); font-size: .9rem; }
.footer-col ul a:hover { color: var(--accent); }
.footer-bar {
    margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border);
    font-size: .84rem; color: var(--text-dim);
}

/* ===== Utilities ======================================= */
.text-dim { color: var(--text-dim); }
.empty { text-align: center; padding: clamp(48px, 10vw, 120px) 20px; color: var(--text-2); }
.empty h1 { font-size: 1.6rem; }

/* ===== Responsive ====================================== */
@media (max-width: 860px) {
    .home-hero { grid-template-columns: 1fr; }
    .home-hero-img img { aspect-ratio: 16/9; }
    .archive-row { grid-template-columns: 110px 1fr; gap: 14px; }
}
@media (max-width: 560px) {
    body { font-size: 15px; }
    /* Two compact columns on phones rather than one giant stack. */
    .home-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .home-card-title { font-size: .9rem; margin: 10px 10px 0; }
    .home-card-lede { -webkit-line-clamp: 3; font-size: .8rem; margin: 6px 10px 0; }
    .home-card-meta { margin: 10px 10px 10px; }
    .archive-row { grid-template-columns: 1fr; }
    .archive-row-img, .archive-row-img-empty { max-width: 100%; }
    .site-nav nav a { padding: 7px 9px; }
    .site-logo-text { font-size: 1.05rem; }
}
@media (max-width: 380px) {
    .home-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .home-card:hover { transform: none; }
    .home-card:hover .home-card-img img { transform: none; }
}

/* ===== House banner slots (rendered by lib/banners.php) ===== */
.ad-slot { margin: clamp(18px, 3vw, 30px) auto; text-align: center; line-height: 0; }
.ad-slot::before {
    content: "Sponsored"; display: block; line-height: 1.2; text-align: left;
    font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-2); margin-bottom: 4px;
}
.ad-slot a, .ad-slot img { display: inline-block; }
.ad-slot img { max-width: 100%; height: auto; border-radius: 8px; }

/* A zone can hold multiple banners. .ad-stack arranges them: stacked by default
   (sidebar / rectangle zones), side-by-side for the wide leaderboard zones. */
.ad-stack { display: flex; flex-direction: column; gap: 18px; align-items: center; margin: clamp(18px, 3vw, 30px) auto; }
.ad-stack .ad-slot { margin: 0; }
.ad-stack-home_top, .ad-stack-home_bottom,
.ad-stack-article_top, .ad-stack-article_bottom { flex-direction: row; flex-wrap: wrap; justify-content: center; }

.ad-home_top, .ad-article_top, .ad-home_bottom, .ad-article_bottom { max-width: 728px; }
.ad-home_infeed, .ad-article_inline, .ad-sidebar_top, .ad-sidebar_tall { max-width: 300px; }
.ad-article_inline { margin-inline: auto; }

/* Article + sidebar rail — the grid only engages when sidebar inventory exists
   (article.php adds .has-rail), so an empty rail never leaves a blank gutter. */
.article-layout.has-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(24px, 3vw, 40px);
    align-items: start;
}
.article-rail { display: flex; flex-direction: column; gap: 24px; }
.article-rail-sticky { position: sticky; top: 78px; }
@media (max-width: 980px) {
    .article-layout.has-rail { grid-template-columns: 1fr; }
    .article-rail { flex-direction: row; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
    .ad-sidebar_tall { display: none; } /* skip the 600px-tall unit on mobile */
}

/* ===== Engagement: AI reactions + comments ===== */
.engagement { margin: 40px 0 8px; max-width: 760px; }
.eng-reactions { display: flex; gap: 10px; margin-bottom: 26px; }
.eng-react {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
    border: 1px solid var(--border-soft); background: var(--bg-2, #16181f); color: var(--text-1);
}
.eng-like { color: #2ecc71; } .eng-dislike { color: #e0457b; }
.eng-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-2);
    border-top: 1px solid var(--border-soft); padding-top: 22px; margin: 0 0 18px; font-weight: 700; }
.eng-count { color: var(--text-dim, #888); margin-left: 4px; }
.eng-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.eng-item { display: flex; gap: 12px; align-items: flex-start; }
.eng-avatar { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.eng-bubble { flex: 1 1 auto; min-width: 0; }
.eng-meta { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 3px; }
.eng-author { font-weight: 700; font-size: 14px; color: var(--text-0); }
.eng-role { font-size: 11px; color: var(--text-2); background: var(--bg-3, #1a1d25);
    padding: 1px 7px; border-radius: 4px; }
.eng-time { font-size: 12px; color: var(--text-dim, #888); margin-left: auto; }
.eng-body { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-1); }

/* Byline */
.article-author { color: var(--text-1); font-weight: 700; }

/* ============================================================
   Member accounts, forms, comments, advertising, press releases
   (added 2026-06-18)
   ============================================================ */

/* --- Generic forms / cards --- */
.narrow-wrap { max-width: 560px; margin: 0 auto; }
.form-card {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: clamp(22px, 3vw, 34px);
    box-shadow: var(--shadow-card); margin: 0 auto 26px;
}
.form-card h1 { margin-top: 0; }
.field { display: block; margin-bottom: 16px; }
.field > .field-label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; color: var(--text-1); }
.field .hint { font-weight: 400; color: var(--text-dim); font-size: .82rem; }
.field input[type="text"], .field input[type="email"], .field input[type="url"],
.field input[type="password"], .field textarea, .field input[type="file"] {
    width: 100%; box-sizing: border-box;
    background: var(--textarea-bg); color: var(--text-0);
    border: 1px solid var(--textarea-border); border-radius: var(--radius-sm);
    padding: 11px 13px; font: 400 .96rem/1.4 var(--sans);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.form-foot { margin-top: 18px; font-size: .9rem; color: var(--text-2); }
.form-foot a { font-weight: 600; }
/* Honeypot — visually hidden, off-screen, not display:none (bots skip those). */
.hp-field { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: var(--radius-sm); padding: 13px 16px; margin: 0 0 20px; font-size: .95rem; line-height: 1.5; border: 1px solid transparent; }
.alert-error   { background: var(--st-rejected-bg); color: var(--st-rejected-fg); border-color: color-mix(in srgb, var(--st-rejected-fg) 25%, transparent); }
.alert-success { background: var(--st-approved-bg); color: var(--st-approved-fg); border-color: color-mix(in srgb, var(--st-approved-fg) 25%, transparent); }
.alert-info    { background: var(--st-synth-bg);    color: var(--st-synth-fg);    border-color: color-mix(in srgb, var(--st-synth-fg) 25%, transparent); }
.alert-warn    { background: var(--st-pending-bg);  color: var(--st-pending-fg);  border-color: color-mix(in srgb, var(--st-pending-fg) 25%, transparent); }

.page-lead { font-size: 1.05rem; color: var(--text-2); max-width: 720px; line-height: 1.6; }
.page-h1 { margin-bottom: 6px; }

/* --- Account chip in nav --- */
.nav-account { font-size: .85rem; }

/* --- Real reader comments --- */
.eng-role.eng-reader { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.eng-author-link { color: var(--text-0); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.eng-author-link:hover { color: var(--accent); }
.comment-box { max-width: 760px; margin: 30px 0 8px; }
.comment-box .field textarea { min-height: 110px; }
.comment-reminder { font-size: .85rem; color: var(--text-dim); margin: 4px 0 14px; display: flex; gap: 8px; align-items: flex-start; }
.comment-signin-prompt {
    max-width: 760px; margin: 30px 0 8px; padding: 18px 20px;
    background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius);
    font-size: .96rem; color: var(--text-1);
}
.comment-signin-prompt a { font-weight: 700; }

/* --- Advertising rate card --- */
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 28px 0; }
.adv-tier { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-card); position: relative; }
.adv-tier.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-2); }
.adv-tier .adv-flag { position: absolute; top: -11px; left: 18px; background: var(--accent); color: var(--on-cyan); font-size: .68rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.adv-tier h3 { margin: 0 0 4px; font-size: 1.08rem; }
.adv-size { font-family: ui-monospace, monospace; font-size: .82rem; color: var(--text-dim); }
.adv-where { font-size: .9rem; color: var(--text-2); margin: 8px 0 14px; line-height: 1.5; }
.adv-price { font-size: 1.8rem; font-weight: 800; color: var(--text-0); }
.adv-price small { font-size: .8rem; font-weight: 600; color: var(--text-dim); }
.adv-quarter { font-size: .85rem; color: var(--green); font-weight: 700; margin-top: 4px; }
.adv-table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: .92rem; }
.adv-table th, .adv-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border-soft); }
.adv-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .6px; color: var(--text-2); }
.adv-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adv-cta { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); text-align: center; margin: 34px 0; }
.adv-cta h2 { margin-top: 0; }
.adv-cta .big-email { font-size: 1.3rem; font-weight: 800; }

/* --- Press release backlink snippet --- */
.pr-snippet { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; font-family: ui-monospace, monospace; font-size: .82rem; line-height: 1.5; word-break: break-all; color: var(--text-1); margin: 10px 0; }
.copy-btn { margin-left: auto; }
.pr-success-box { background: var(--st-approved-bg); border: 1px solid color-mix(in srgb, var(--st-approved-fg) 25%, transparent); color: var(--st-approved-fg); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; }
.pr-success-box h2 { margin-top: 0; color: inherit; }
