/* ============================================================
   Sigma Guard — NEW blog theme (from scratch)
   Modern, clean, content-first. Dark by default.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #0A0A0C;
    --bg-1: #101013;
    --bg-2: #16161A;
    --line: #212127;
    --line-2: #2C2C34;
    --fg: #F4F4F6;
    --fg-2: #9EA0AA;
    --fg-3: #6A6C76;
    --accent: #7C7CF6;         /* iris */
    --accent-2: #9A9AFB;
    --accent-ink: #0A0A0C;
    --font: 'Onest', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-read: 'Onest', 'Inter', system-ui, sans-serif;
    --maxw: 1120px;
    --read: 680px;
    --r: 14px;
    --r-sm: 10px;
    --ease: cubic-bezier(.2,.6,.2,1);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; background: var(--bg); color: var(--fg);
    font-family: var(--font);
    font-size: 16px; line-height: 1.6; letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(124,124,246,.3); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10,10,12,.72); backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em; }
.brand .dot { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; display: block; flex-shrink: 0; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--fg-2); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: 8px; transition: color .18s, background .18s; }
.nav a:hover { color: var(--fg); }
.nav a.is-active { color: var(--fg); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--fg-2); border: 1px solid transparent; cursor: pointer; transition: .18s; background: none; }
.icon-btn:hover { color: var(--fg); background: var(--bg-2); }
.btn {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
    border-radius: 10px; font-weight: 600; font-size: 14.5px; cursor: pointer; border: 1px solid transparent;
    transition: transform .16s var(--ease), background .18s, border-color .18s;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--fg-3); }

/* ---------- Home hero (featured) ---------- */
.home-head { padding: 56px 0 8px; }
.eyebrow { color: var(--accent-2); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.home-title { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; margin: 12px 0 10px; }
.home-sub { color: var(--fg-2); font-size: 17px; max-width: 56ch; }

.featured {
    display: grid; grid-template-columns: 1.15fr 1fr; gap: 4px; align-items: stretch;
    margin: 34px 0 8px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-1);
}
.featured .media { background: linear-gradient(135deg, #23233A, #12222A); position: relative; min-height: 320px; }
.featured .media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.featured .body { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.featured .k { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.chip { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-2); background: none; border: none; padding: 0; border-radius: 0; }
.meta { color: var(--fg-3); font-size: 13px; }
.featured .body h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.18; margin: 0 0 12px; }
.featured .body p { color: var(--fg-2); margin: 0 0 20px; font-size: 15.5px; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 40px 0 22px; border-bottom: 1px solid var(--line); }
.filter { color: var(--fg-2); font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: .18s; }
.filter:hover { color: var(--fg); }
.filter.is-active { color: var(--fg); background: var(--bg-2); border-color: var(--line-2); }

/* ---------- Article list ---------- */
.list { display: grid; gap: 2px; }
.post {
    display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: center;
    padding: 26px 0; border-bottom: 1px solid var(--line); transition: none;
}
.post .thumb { aspect-ratio: 16/10; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-2); }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post:hover .thumb img { transform: scale(1.04); }
.post .info .k { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.post .info h3 { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.28; margin: 0 0 8px; transition: color .18s; }
.post:hover .info h3 { color: var(--accent-2); }
.post .info p { color: var(--fg-2); font-size: 14.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.load-more { text-align: center; padding: 40px 0 80px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 44px 0 84px; }
.pager-info { color: var(--fg-3); font-size: 14px; }

/* ---------- Article ---------- */
.article-layout { display: grid; grid-template-columns: 232px minmax(0, var(--read)); gap: 0 60px; justify-content: center; padding: 30px 0 0; }
.article-col { grid-column: 2; grid-row: 1; }
.a-back { color: var(--fg-2); font-size: 14px; font-weight: 500; display: inline-flex; gap: 7px; align-items: center; }
.a-back:hover { color: var(--fg); }
.a-title { font-family: var(--font-read); font-size: clamp(31px, 4.1vw, 46px); font-weight: 700; letter-spacing: -0.028em; line-height: 1.08; margin: 0 0 18px; }
.a-meta { display: flex; gap: 18px; align-items: center; color: var(--fg-3); font-size: 14px; padding-bottom: 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.a-meta .cat { color: var(--accent-2); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 12.5px; }
.a-bottomnav { grid-column: 2; margin-top: 34px; }
.a-meta .author { display: flex; gap: 10px; align-items: center; color: var(--fg-2); }
.a-meta .avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #56C7A8); }
.a-hero { margin: 30px 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/8; background: var(--bg-2); }
.a-hero img { width: 100%; height: 100%; object-fit: cover; }

.prose { font-family: var(--font-read); font-size: 18.5px; line-height: 1.75; color: #D7D8DE; letter-spacing: -0.006em; }
.prose > p { margin: 0 0 24px; }
.prose h2 { font-family: var(--font-read); font-size: 27px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.22; color: var(--fg); margin: 48px 0 16px; }
.prose h3 { font-family: var(--font-read); font-size: 21px; font-weight: 650; letter-spacing: -0.01em; color: var(--fg); margin: 34px 0 12px; }
.prose a { color: var(--accent-2); text-decoration: underline; text-decoration-color: rgba(154,154,251,.4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent-2); }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 22px; }
.prose li { margin-bottom: 9px; }
.prose li::marker { color: var(--fg-3); }
.prose img { border-radius: var(--r); border: 1px solid var(--line); margin: 30px 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 44px 0; }
.prose blockquote { margin: 30px 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); color: var(--fg); font-size: 20px; line-height: 1.6; }
.prose pre { background: #060608; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 26px 0; }
.prose :not(pre) > code { background: var(--bg-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; font-size: .9em; color: #C7C8FF; }
.prose table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 15px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.prose th, .prose td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { background: var(--bg-2); font-weight: 600; }
.callout { background: var(--bg-1); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-sm); padding: 18px 20px; margin: 28px 0; color: var(--fg-2); }

/* TOC (sticky, right of reading column on desktop) */
.toc { grid-column: 1; grid-row: 1; position: sticky; top: 96px; align-self: start; padding: 4px 0 0; max-width: none; margin: 0; }
.toc .t { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 12px; }
.toc a { display: block; color: var(--fg-3); font-size: 13.5px; line-height: 1.4; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); transition: color .18s, border-color .18s; }
.toc a:hover, .toc a.is-active { color: var(--fg); border-left-color: var(--accent); }

/* article footer */
.a-foot { grid-column: 2; margin: 44px 0 0; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 13px; color: var(--fg-2); background: var(--bg-2); border: 1px solid var(--line); padding: 5px 11px; border-radius: 8px; transition: .18s; }
.tag:hover { color: var(--fg); border-color: var(--line-2); }
.share { display: flex; gap: 8px; }

/* related */
.related { grid-column: 2; margin: 56px 0 90px; padding-top: 34px; border-top: 1px solid var(--line); }
.related h4 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 20px; }
.rel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.rel-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-1); transition: border-color .2s, transform .2s var(--ease); }
.rel-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.rel-card .rt { aspect-ratio: 16/9; background: var(--bg-2); }
.rel-card .rt img { width: 100%; height: 100%; object-fit: cover; }
.rel-card .rc { padding: 16px 18px; }
.rel-card .rc .meta { margin-bottom: 8px; }
.rel-card h5 { font-size: 16px; font-weight: 600; line-height: 1.35; margin: 0; }

/* stats (views / comments) on cards */
.stat { display: inline-flex; align-items: center; gap: 5px; color: var(--fg-3); font-size: 13px; }
.stat svg { width: 15px; height: 15px; opacity: .7; }

/* ---------- Comments ---------- */
.comments { grid-column: 2; margin-top: 52px; padding-top: 34px; border-top: 1px solid var(--line); }
.comments-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 24px; }
.comments-head h4 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.comments-head .count { color: var(--fg-3); font-size: 15px; }
.composer { display: flex; gap: 14px; margin-bottom: 14px; }
.composer .avatar, .comment .avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.composer .box { flex: 1; }
.composer textarea {
    width: 100%; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px;
    color: var(--fg); font-family: inherit; font-size: 15px; line-height: 1.5; padding: 14px 16px;
    resize: vertical; min-height: 96px; transition: border-color .18s, box-shadow .18s;
}
.composer textarea::placeholder { color: var(--fg-3); }
.composer textarea:focus { outline: none; border-color: var(--line-2); box-shadow: 0 0 0 3px rgba(124,124,246,.14); }
.composer .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.composer .hint { color: var(--fg-3); font-size: 13px; }

.comment-list { display: flex; flex-direction: column; }
.comment { display: flex; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line); }
.comment .c-body { flex: 1; min-width: 0; }
.comment .c-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.comment .c-name { font-weight: 600; font-size: 14.5px; }
.comment .c-badge { font-size: 11px; font-weight: 600; color: var(--accent-2); background: rgba(124,124,246,.12); border-radius: 5px; padding: 1px 6px; }
.comment .c-time { color: var(--fg-3); font-size: 13px; margin-left: auto; }
.comment .c-text { color: #C7C9D2; font-size: 15.5px; line-height: 1.62; margin: 0 0 10px; }
.comment .c-actions { display: flex; gap: 18px; }
.comment .c-actions button { background: none; border: none; color: var(--fg-3); font-family: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 0; transition: color .18s; }
.comment .c-actions button svg { width: 15px; height: 15px; }
.comment .c-actions button:hover { color: var(--fg); }
.comment .c-actions button.liked { color: var(--accent-2); }
.comment .replies { margin-top: 16px; padding-left: 18px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.comment .replies .comment { border-top: none; padding: 12px 0; }

/* ---------- Outage monitor (service status poll) ---------- */
.outage {
    --ok: #35C08A; --bad: #F0616B; --warn: #F2A93B;
    margin: 30px 0; padding: 22px 24px; background: var(--bg-1);
    border: 1px solid var(--line); border-radius: var(--r);
}
.outage-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.outage-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.outage-eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(53,192,138,.5); animation: opulse 2s infinite; }
@keyframes opulse { 0%{box-shadow:0 0 0 0 rgba(53,192,138,.45)} 70%{box-shadow:0 0 0 7px rgba(53,192,138,0)} 100%{box-shadow:0 0 0 0 rgba(53,192,138,0)} }
.outage-live { color: var(--fg-3); font-size: 12px; }
.outage-q { font-family: var(--font-read); font-size: 20px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 6px; color: var(--fg); }
.outage-sub { color: var(--fg-2); font-size: 14px; margin: 0 0 18px; }

.outage-vote { display: flex; gap: 10px; margin-bottom: 18px; }
.ov { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 11px; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg); transition: transform .14s var(--ease), border-color .18s, background .18s, color .18s; }
.ov svg { width: 18px; height: 18px; }
.ov:hover { transform: translateY(-1px); }
.ov-yes:hover, .ov-yes.active { border-color: var(--ok); color: #0B0D11; background: var(--ok); }
.ov-no:hover, .ov-no.active { border-color: var(--bad); color: #0B0D11; background: var(--bad); }

.outage-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg-2); }
.outage-bar .ok { background: var(--ok); }
.outage-bar .bad { background: var(--bad); }
.outage-legend { display: flex; align-items: center; gap: 16px; margin-top: 11px; font-size: 13px; color: var(--fg-2); flex-wrap: wrap; }
.outage-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.outage-legend .ok-l i { background: var(--ok); }
.outage-legend .bad-l i { background: var(--bad); }
.outage-legend .tot { margin-left: auto; color: var(--fg-3); }

.outage-regions { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 4px; }
.outage-regions summary { cursor: pointer; list-style: none; color: var(--fg-2); font-size: 14px; font-weight: 500; padding: 12px 0; display: flex; align-items: center; gap: 8px; }
.outage-regions summary::-webkit-details-marker { display: none; }
.outage-regions summary .chev { width: 16px; height: 16px; transition: transform .2s; color: var(--fg-3); }
.outage-regions[open] summary .chev { transform: rotate(180deg); }
.region-row { display: grid; grid-template-columns: 12px 130px 1fr auto; align-items: center; gap: 12px; padding: 8px 0; font-size: 13.5px; }
.rdot { width: 9px; height: 9px; border-radius: 50%; }
.rdot.ok { background: var(--ok); } .rdot.warn { background: var(--warn); } .rdot.bad { background: var(--bad); }
.rname { color: var(--fg); font-weight: 500; }
.rbar { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.rbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--warn), var(--bad)); }
.rval { color: var(--fg-3); font-size: 12.5px; white-space: nowrap; }
.outage-thanks { display: none; margin-bottom: 16px; padding: 12px 14px; border-radius: 10px; background: rgba(53,192,138,.1); border: 1px solid rgba(53,192,138,.25); color: #8CE0BE; font-size: 14px; }

@media (max-width: 560px) {
    .outage { padding: 18px; }
    .outage-vote { flex-direction: column; }
    .region-row { grid-template-columns: 12px 1fr auto; }
    .region-row .rbar { display: none; }
}

/* outage — compact variant */
.outage--compact { padding: 15px 18px; margin: 26px 0; }
.oc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.oc-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.oc-q { font-family: var(--font-read); font-size: 16px; font-weight: 650; letter-spacing: -0.01em; color: var(--fg); }
.outage--compact .outage-vote { margin: 0; flex: 0 0 auto; }
.outage--compact .ov { height: 38px; padding: 0 15px; flex: 0 0 auto; font-size: 13.5px; border-radius: 9px; }
.outage--compact .ov svg { width: 16px; height: 16px; }
.oc-bottom { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.outage--compact .outage-bar { flex: 1; height: 7px; }
.oc-stat { color: var(--fg-3); font-size: 12.5px; white-space: nowrap; }
.outage--compact .outage-regions { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 0; }
.outage--compact .outage-regions summary { padding: 9px 0; font-size: 13px; }
@media (max-width: 620px) {
    .outage--compact .oc-top { flex-direction: column; align-items: stretch; gap: 12px; }
    .outage--compact .outage-vote { display: flex; }
    .outage--compact .ov { flex: 1; }
    .oc-bottom { flex-wrap: wrap; gap: 8px 14px; }
}

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--fg-3); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--fg-2); }
.site-footer a:hover { color: var(--fg); }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
    .post, .rel-card, .featured { animation: rise .55s var(--ease) both; }
    .list .post:nth-child(2){animation-delay:.05s} .list .post:nth-child(3){animation-delay:.1s}
    .list .post:nth-child(4){animation-delay:.15s} .list .post:nth-child(n+5){animation-delay:.2s}
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

/* responsive */
@media (max-width: 1000px) {
    .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 20px; }
    .article-col, .a-foot, .related, .a-bottomnav, .comments { grid-column: 1; min-width: 0; max-width: var(--read); width: 100%; margin-left: auto; margin-right: auto; }
    .toc { display: none; }
}
@media (max-width: 768px) {
    .wrap { padding: 0 18px; }
    .site-header .wrap { gap: 12px; height: 58px; }
    .nav { display: none; }
    .header-right { gap: 8px; }
    .btn { height: 38px; padding: 0 14px; font-size: 14px; }

    .home-head { padding: 34px 0 4px; }
    .home-title { font-size: clamp(26px, 7.6vw, 34px); line-height: 1.08; }
    .home-title br { display: none; }
    .home-sub { font-size: 15.5px; }

    .featured { grid-template-columns: 1fr; margin-top: 22px; }
    .featured .media { min-height: 190px; }
    .featured .body { padding: 22px; }
    .featured .body h2 { font-size: 21px; }

    .filters { padding: 26px 0 14px; gap: 6px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .filters::-webkit-scrollbar { display: none; }
    .filter { font-size: 13.5px; padding: 7px 12px; white-space: nowrap; }

    .post { grid-template-columns: 1fr; gap: 12px; padding: 20px 0; }
    .post .thumb { aspect-ratio: 16/9; }
    .post .info h3 { font-size: 18.5px; }
    .post .info p { -webkit-line-clamp: 3; }

    .a-title { font-size: clamp(26px, 7.2vw, 34px); }
    .a-meta { gap: 8px 14px; font-size: 13px; }
    .a-hero { margin: 22px 0; }
    .prose { font-size: 17px; line-height: 1.72; }
    .prose h2 { font-size: 23px; margin-top: 36px; }
    .prose h3 { font-size: 19px; }
    .prose blockquote { font-size: 18px; }
    .a-foot { flex-direction: column; align-items: flex-start; gap: 14px; }
    .rel-grid { grid-template-columns: 1fr; }
    .related { margin-bottom: 60px; }
}
@media (max-width: 400px) {
    .brand span:not(.dot) { }
    .header-right .btn-primary { padding: 0 12px; }
    .home-title { font-size: 25px; }
}

/* ---------- Server-rendered comments (.cm) ---------- */
.toc a.lvl3 { padding-left: 22px; font-size: 12.5px; }
.composer .box { flex: 1; }
.composer .cm-av, .cm-av { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; color: #0B0D11; font-weight: 700; font-size: 15px; }
.cm-input { width: 100%; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); font-family: inherit; font-size: 15px; padding: 11px 14px; margin-bottom: 10px; transition: border-color .18s; }
.cm-input::placeholder { color: var(--fg-3); }
.cm-input:focus { outline: none; border-color: var(--line-2); }
.linkbtn { background: none; border: none; color: var(--accent-2); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.form-message { margin: 12px 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.form-message.ok { background: rgba(53,192,138,.1); border: 1px solid rgba(53,192,138,.25); color: #8CE0BE; }
.form-message.err { background: rgba(240,97,107,.1); border: 1px solid rgba(240,97,107,.25); color: #F7A6AB; }
.cm { display: flex; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line); }
.cm-body { flex: 1; min-width: 0; }
.cm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.cm-name { font-weight: 600; font-size: 14.5px; color: var(--fg); }
.cm-time { color: var(--fg-3); font-size: 13px; }
.cm-text { color: #C7C9D2; font-size: 15.5px; line-height: 1.62; }
.cm-actions { margin-top: 8px; }
.cm-reply { background: none; border: none; color: var(--fg-3); font-family: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; padding: 0; }
.cm-reply:hover { color: var(--fg); }
.cm-replies { margin-top: 14px; padding-left: 18px; border-left: 1px solid var(--line); }
.cm-replies .cm { padding: 14px 0; border-top: none; }
.cm-empty { color: var(--fg-3); padding: 20px 0; }

/* ---------- Safety styles for legacy content blocks inside .prose ---------- */
.prose .call-to-action, .prose .conclusion-checklist, .prose .vpn-review, .prose .faq-section > div { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin: 26px 0; color: var(--fg-2); }
.prose .call-to-action { text-align: left; }
.prose .call-to-action h3, .prose .vpn-review h3 { color: var(--fg); margin-top: 0; }
.prose .tip-block { background: var(--bg-1); border: 1px solid var(--line); border-left: 3px solid #F2A93B; border-radius: var(--r-sm); padding: 16px 18px; margin: 24px 0; }
.prose .comparison-table, .prose .price-table { overflow-x: auto; margin: 24px 0; }
.prose .cta-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.prose .cta-buttons a, .prose .btn { background: var(--accent); color: #fff; border-radius: 10px; padding: 11px 20px; font-weight: 600; text-decoration: none; display: inline-block; }

/* ---------- Overflow safety: wide content must never break mobile layout ---------- */
.article-col { min-width: 0; }
.prose { overflow-wrap: break-word; word-break: break-word; }
.prose table { max-width: 100%; }
.prose pre { max-width: 100%; overflow-x: auto; }
.prose img, .prose iframe, .prose video { max-width: 100%; height: auto; }
.cm-text { overflow-wrap: break-word; word-break: break-word; }

/* ---------- Comment avatars: animal image (transparent) over hidden initial fallback ---------- */
.cm-av { position: relative; overflow: hidden; }
.cm-av .cm-ini { position: absolute; inset: 0; display: none; place-items: center; }
.cm-av.noimg .cm-ini { display: grid; }
.cm-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Responsive tables: horizontal-scroll wrapper (desktop/tablet) + card stack (mobile) ---------- */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 26px 0; }
.tbl-scroll table { margin: 0; }
/* wide tables (no header detected) still scroll instead of crushing */
@media (max-width: 620px) {
  .prose table:not(.has-labels) { min-width: 520px; }

  /* card stack: each row becomes a card, first cell is the title, others are label:value */
  .prose table.has-labels { min-width: 0; border: none; background: none; }
  .prose table.has-labels thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose table.has-labels tbody,
  .prose table.has-labels tr,
  .prose table.has-labels td { display: block; width: auto; }
  .prose table.has-labels tr {
    background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px;
    padding: 4px 15px 6px; margin: 0 0 14px;
  }
  .prose table.has-labels td {
    display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
    padding: 10px 0; border: 0; border-top: 1px solid var(--line); text-align: right;
    font-size: 15px; color: var(--fg);
  }
  .prose table.has-labels td::before {
    content: attr(data-label); flex: 0 0 44%; text-align: left;
    color: var(--fg-3); font-weight: 500; font-size: 13.5px;
  }
  /* first cell = card title (full width, no label) */
  .prose table.has-labels td:first-child {
    display: block; text-align: left; padding: 6px 0 10px;
    border-top: 0; font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em;
  }
  .prose table.has-labels td:first-child::before { content: none; }
}

/* ---------- Source video (extracted from article/Telegram) ---------- */
.prose figure { margin: 26px 0; }
.prose .post-video { margin: 26px 0; }
.prose .post-video video { width: 100%; max-height: 520px; border-radius: var(--r); border: 1px solid var(--line); background: #000; display: block; }
.prose figcaption { color: var(--fg-3); font-size: 13.5px; margin-top: 8px; text-align: center; }

/* ---------- Бургер-меню (мобильный) ---------- */
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 9px 6px; flex-direction: column; gap: 5px; border-radius: 8px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .22s var(--ease), opacity .18s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-home-m { display: none; }
@media (max-width: 768px) {
    .nav-burger { display: inline-flex; }
    .hide-m { display: none !important; }
    .nav { display: none; position: absolute; top: 58px; left: 0; right: 0; margin: 0; flex-direction: column; gap: 2px; padding: 10px 16px 14px; background: var(--bg-1); border-bottom: 1px solid var(--line-2); box-shadow: 0 18px 34px rgba(0,0,0,.5); z-index: 60; }
    .nav.open { display: flex; }
    .nav a { padding: 11px 12px; font-size: 15px; }
    .nav-home-m { display: block; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 13px !important; }
}

/* ---------- Автоподгрузка ленты ---------- */
.list-loader { display: flex; justify-content: center; padding: 26px 0 34px; opacity: 0; transition: opacity .2s; }
.list-loader.on { opacity: 1; }
.list-loader .spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: sg-spin .7s linear infinite; }
@keyframes sg-spin { to { transform: rotate(360deg); } }

/* ---------- «Читать следующую» — карточка сразу после статьи (до комментариев) ---------- */
.read-next { display: flex; align-items: center; gap: 16px; margin: 28px 0 8px; padding: 12px 16px 12px 12px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color .18s, background .18s, transform .18s var(--ease); }
.read-next:hover { border-color: var(--accent); background: var(--bg-2); transform: translateY(-1px); }
.rn-thumb { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-2); }
.rn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rn-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rn-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.rn-title { font-weight: 650; font-size: 16px; line-height: 1.35; color: var(--fg); }
.rn-arrow { color: var(--fg-3); margin-left: auto; flex-shrink: 0; transition: transform .18s var(--ease), color .18s; }
.read-next:hover .rn-arrow { color: var(--accent); transform: translateX(3px); }
@media (max-width: 560px) {
    .rn-thumb { width: 58px; height: 58px; }
    .rn-title { font-size: 14.5px; }
}

/* ---------- Вопрос читателям (блок в конце ИИ-статьи, разметка из aiSaveDraft) ---------- */
.sga { background: var(--bg-1, #101013); border: 1px solid var(--line, #212127); border-radius: 14px; padding: 18px 20px; margin: 30px 0; }
.sga-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-2, #9EA0AA); margin-bottom: 10px; }
.sga-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #7C7CF6); box-shadow: 0 0 0 3px rgba(124, 124, 246, .18); }
.sga-q { font-size: 16.5px; font-weight: 600; line-height: 1.4; margin: 0 0 14px; color: var(--fg, #F4F4F6); }
.prose .sga-btn, .sga-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-2, #2C2C34); background: transparent; color: var(--fg, #F4F4F6); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: transform .16s var(--ease, ease), border-color .18s; }
.prose .sga-btn:hover, .sga-btn:hover { border-color: var(--fg-3, #6A6C76); transform: translateY(-1px); text-decoration: none; color: var(--fg, #F4F4F6); }
