/*
Theme Name: SecureCyberVM
Theme URI: https://securecybervm.com/
Author: Deepanshu Jha
Author URI: https://me.securecybervm.com/
Description: The original SecureCyberVM design: a dark, glass-styled, mobile-first news and threat-intelligence theme that installs like an app (PWA) on phones, with light and dark modes. No external fonts or tracking scripts.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
License: Proprietary - Copyright SecureCyberVM. All rights reserved.
Text Domain: securecybervm
*/

/* ===== Design tokens ===================================================== */
:root, [data-mode="dark"] {
	--bg: #1e1e1e;
	--bg-glow: rgba(67, 202, 255, .10);
	--surface: rgba(255, 255, 255, .045);
	--surface-2: rgba(255, 255, 255, .08);
	--line: rgba(255, 255, 255, .09);
	--text: rgba(255, 255, 255, .64);
	--head: rgba(255, 255, 255, .9);
	--strong: #ffffff;
	--accent: #43caff;
	--accent-ink: #04202c;
	--danger: #ff4d6d;
	--bar: rgba(30, 30, 30, .72);
	--inset: inset 0 1px 0 rgba(255, 255, 255, .08), 0 1px 0 rgba(0, 0, 0, .12);
	--shadow: 0 10px 30px rgba(0, 0, 0, .28);
	--r-sm: 12px;
	--r: 20px;
	--r-lg: 28px;
	--pill: 999px;
	--font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--tabbar-h: 64px;
	color-scheme: dark;
}
[data-mode="light"] {
	--bg: #f4f6f9;
	--bg-glow: rgba(10, 165, 224, .10);
	--surface: #ffffff;
	--surface-2: #eef2f6;
	--line: rgba(15, 23, 42, .08);
	--text: #4b5563;
	--head: #111827;
	--strong: #0b1220;
	--accent: #0aa5e0;
	--accent-ink: #ffffff;
	--bar: rgba(244, 246, 249, .8);
	--inset: 0 1px 2px rgba(15, 23, 42, .06);
	--shadow: 0 10px 30px rgba(15, 23, 42, .08);
	color-scheme: light;
}

/* ===== Base ============================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
	margin: 0; min-height: 100vh; min-height: 100dvh;
	background: radial-gradient(1100px 560px at 50% -120px, var(--bg-glow), transparent 70%), var(--bg);
	background-attachment: fixed;
	color: var(--text); font: 16px/1.65 var(--font);
	-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .25s ease, color .25s ease;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { color: var(--head); line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 700; }
p { margin: 0 0 1em; }
strong, b { color: var(--head); }
code, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); padding: .12em .4em; border-radius: 6px; color: var(--head); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.ic { flex: none; }

.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 20px; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--pill); }
.skip-link:focus { left: 12px; }

/* Surfaces */
.glass { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--inset); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* Controls */
.btn, button[type=submit], input[type=submit] {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
	background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--pill);
	padding: 10px 22px; font: 600 15px/1.2 var(--font); cursor: pointer; text-decoration: none;
	box-shadow: 0 6px 20px rgba(67, 202, 255, .22); transition: transform .15s ease, filter .15s ease;
}
.btn:hover, button[type=submit]:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active, .pill:active, .icon-btn:active { transform: scale(.97); }
.btn-block { width: 100%; }
.pill {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--pill);
	color: var(--head); font: 500 14px/1.2 var(--font); box-shadow: var(--inset); cursor: pointer; text-decoration: none;
}
.pill:hover { background: var(--surface-2); text-decoration: none; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
	background: var(--surface); border: 1px solid var(--line); border-radius: 50%; color: var(--head);
	box-shadow: var(--inset); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
input[type=email], input[type=search], input[type=text], input[type=url], input[type=tel], textarea, select {
	font: 16px var(--font); color: var(--head); background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--r-sm); padding: 11px 14px; min-height: 44px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67, 202, 255, .2); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 77, 109, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 77, 109, 0); } }

.sev { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: var(--pill); color: #fff; }
.sev-critical { background: #e11d48; } .sev-high { background: #ea580c; } .sev-medium { background: #ca8a04; } .sev-low { background: #16a34a; }

/* ===== App bar (header) =================================================== */
.appbar {
	position: sticky; top: 0; z-index: 50;
	background: var(--bar); border-bottom: 1px solid transparent;
	-webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
	padding-top: env(safe-area-inset-top);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.admin-bar .appbar { top: var(--wp-admin--admin-bar--height, 0px); }
.appbar.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, .16); }
.appbar-in { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--head); font-size: 19px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; }
.brand-name b { color: var(--accent); font-weight: 800; }
[data-mode="light"] .brand-logo, [data-mode="light"] .hero-badge img { filter: invert(1) hue-rotate(180deg) brightness(.35); }
.desk-nav { flex: 1; display: flex; justify-content: center; }
.desk-nav .menu { list-style: none; margin: 0; padding: 5px; display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--pill); box-shadow: var(--inset); }
.desk-nav .menu a { display: block; padding: 8px 15px; border-radius: var(--pill); color: var(--text); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.desk-nav .menu a:hover { color: var(--head); background: var(--surface-2); text-decoration: none; }
.desk-nav .current-menu-item > a, .desk-nav .current_page_item > a { color: var(--accent-ink); background: var(--accent); }
.appbar-actions { display: flex; align-items: center; gap: 10px; }

/* Light / dark switch */
.mode-switch {
	position: relative; display: inline-flex; align-items: center; justify-content: space-between;
	width: 74px; height: 40px; padding: 0 9px; border-radius: var(--pill); cursor: pointer;
	background: var(--surface); border: 1px solid var(--line); box-shadow: var(--inset); color: var(--text);
}
.mode-ic .ic { width: 17px; height: 17px; }
.mode-knob { position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); transform: translate(10px, -50%); transition: transform .25s ease; }
[data-mode="light"] .mode-knob { transform: translate(-24px, -50%); }

/* ===== Sheets (dialogs) ===================================================== */
dialog.sheet { border: 0; padding: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.sheet-search { width: min(720px, calc(100% - 28px)); margin: calc(env(safe-area-inset-top) + 80px) auto auto; }
.sheet-search-form { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--pill); box-shadow: var(--shadow); color: var(--text); }
.sheet-search-form input { border: 0; background: transparent; box-shadow: none; padding-left: 0; }
.sheet-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
dialog.sheet-menu { width: min(440px, 100%); margin: auto 0 auto auto; height: 100%; max-height: 100dvh; background: var(--bg); border-left: 1px solid var(--line); padding: calc(env(safe-area-inset-top) + 16px) 20px calc(env(safe-area-inset-bottom) + 20px); overflow-y: auto; }
dialog.sheet[open] { animation: sheet-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px); } }
.sheet-grab { display: none; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sheet-links { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 6px; }
.sheet-links a { display: flex; align-items: center; min-height: 52px; padding: 12px 18px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--head); font-weight: 600; font-size: 16px; }
.sheet-links a::after { content: "\203A"; margin-left: auto; color: var(--text); font-size: 22px; }
.sheet-links a:hover { text-decoration: none; background: var(--surface-2); }
.sheet-foot { display: grid; gap: 10px; }
.sheet-foot .pill { justify-content: center; }
.sheet-open { overflow: hidden; }

/* ===== Hero ================================================================ */
.hero { padding: 54px 0 20px; text-align: center; overflow: hidden; }
.hero-in { display: flex; flex-direction: column; align-items: center; }
.hero-badge { position: relative; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 26px; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03)); border: 1px solid var(--line); box-shadow: 0 0 0 10px rgba(255, 255, 255, .025), 0 0 60px rgba(67, 202, 255, .16), var(--inset); color: var(--head); }
.hero-badge img { width: 74%; height: 74%; object-fit: contain; }
.hero-badge .ic { width: 56px; height: 56px; }
.hero-badge span { position: absolute; inset: -18px; border-radius: 50%; border: 1px dashed rgba(67, 202, 255, .28); animation: orbit 30s linear infinite; }
.hero-badge span::before, .hero-badge span::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero-badge span::before { top: 12%; left: 8%; } .hero-badge span::after { bottom: 6%; right: 18%; }
.hero-badge-sm { width: 92px; height: 92px; margin: 0 auto 18px; }
@keyframes orbit { to { transform: rotate(360deg); } }
.hero-title { font-size: clamp(32px, 6vw, 60px); font-weight: 800; letter-spacing: -.03em; max-width: 14em; margin-bottom: 14px; }
.hero-sub { max-width: 640px; font-size: clamp(16px, 2vw, 18px); margin-bottom: 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Rail (horizontal snap carousel) */
.rail-wrap { margin-top: 42px; text-align: left; }
.rail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rail-head h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; margin: 0; color: var(--text); }
.rail-nav { display: flex; gap: 8px; }
.rail-nav .icon-btn:first-child .ic { transform: rotate(180deg); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 340px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 max(20px, calc((100vw - 1180px) / 2)); padding: 4px max(20px, calc((100vw - 1180px) / 2)) 18px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; min-height: 168px; padding: 18px 20px; color: var(--head); transition: transform .2s ease, background .2s ease; }
.rail-card:hover { text-decoration: none; background: var(--surface-2); transform: translateY(-2px); }
.rail-title { font-weight: 650; font-size: 16.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rail-card .card-date { margin-top: auto; }

/* Briefing highlight */
.brief-hl { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 22px 26px; margin: 18px 0 34px; border-color: rgba(67, 202, 255, .3); background: linear-gradient(120deg, rgba(67, 202, 255, .12), var(--surface) 60%); }
.brief-hl h2 { font-size: 21px; margin-bottom: 6px; } .brief-hl h2 a { color: var(--head); }
.brief-hl p { margin: 0; }
.brief-hl-ic { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--accent); color: var(--accent-ink); }
.brief-hl-ic .ic { width: 30px; height: 30px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--accent); margin-bottom: 4px !important; }

/* ===== Layout & cards ==================================================== */
.site-main { padding-bottom: 30px; }
.content-col, .article, .page-article, .entry-content { min-width: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.section { margin-bottom: 36px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; margin: 0; }
.card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--inset); transition: transform .2s ease, background .2s ease; }
.card:hover { transform: translateY(-2px); background: var(--surface-2); }
.card-media img, .card-ph { width: 100%; aspect-ratio: 40 / 21; object-fit: cover; }
.card-ph { display: grid; place-items: center; background: linear-gradient(135deg, rgba(67, 202, 255, .14), rgba(255, 255, 255, .02)); color: var(--accent); }
.card-ph .ic { width: 40px; height: 40px; opacity: .7; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.card-title { font-size: 18px; font-weight: 650; margin: 0 0 8px; }
.card-title a { color: var(--head); }
.card-excerpt { font-size: 15px; margin: 0 0 10px; }
.card-date { font-size: 13px; color: var(--text); opacity: .85; margin-top: auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-3 .card-title { font-size: 16.5px; }
.card-page { padding: 4px; }
.empty-state { text-align: center; padding: 40px 24px; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 96px; }
.widget { padding: 20px; }
.widget h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; }
.widget-note { font-size: 14px; margin-top: -4px; }
.widget-link { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 14px; }
.kev-list { list-style: none; margin: 0; padding: 0; }
.kev-list li { display: grid; gap: 1px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kev-list li:last-child { border-bottom: 0; }
.kev-list a { font-weight: 700; font-family: var(--mono); font-size: 13.5px; }
.kev-list span { color: var(--head); }
.kev-list small { font-size: 12.5px; }
.rw { color: var(--danger) !important; }
.box-sub { padding: 20px; background: linear-gradient(150deg, rgba(67, 202, 255, .16), var(--surface) 70%); }
.scvm-subscribe p { margin: 0 0 8px; }
.scvm-subscribe-title { font-size: 18px; color: var(--head); }
.scvm-subscribe-row { display: flex; gap: 8px; margin: 12px 0; }
.scvm-subscribe-row input { flex: 1; min-width: 0; }
.scvm-subscribe-consent { font-size: 12.5px; display: block; }
.scvm-subscribe-msg { font-weight: 700; color: var(--accent); }

/* ===== Article =========================================================== */
.article-head { padding-top: 28px; }
.crumbs { font-size: 13px; margin-bottom: 14px; } .crumbs a { color: var(--text); }
.article-title { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; letter-spacing: -.025em; margin: 8px 0 12px; }
.article-dek { font-size: clamp(17px, 2.2vw, 20px); margin: 0 0 18px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.meta-avatar { border-radius: 50%; width: 32px; height: 32px; }
.byline a { color: var(--head); font-weight: 600; }
.article-media { margin: 22px 0 26px; }
.article-media img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); }
.entry-content { font-size: 17.5px; line-height: 1.75; color: var(--text); }
.entry-content > * { max-width: 100%; }
.entry-content h2 { font-size: 25px; margin-top: 1.8em; }
.entry-content h3 { font-size: 20px; margin-top: 1.5em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(67, 202, 255, .4); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.entry-content figure { margin: 1.4em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.entry-content th { background: var(--surface-2); color: var(--head); font-weight: 650; }
.entry-content code { word-break: break-word; }
.entry-content img { border-radius: var(--r-sm); }
.scvm-takeaways { background: linear-gradient(140deg, rgba(67, 202, 255, .12), var(--surface)) !important; border: 1px solid rgba(67, 202, 255, .28) !important; border-radius: var(--r) !important; }
.scvm-threat, .scvm-cve { background: var(--surface); border-color: var(--line) !important; border-radius: var(--r) !important; }
.article-foot { margin-top: 30px; display: grid; gap: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { padding: 5px 13px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); color: var(--head); font-size: 13.5px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.author-box { display: flex; gap: 16px; padding: 18px; }
.author-box img { border-radius: 50%; flex: none; }
.author-box p { margin: 0 0 4px; font-size: 15px; }
.author-name a { color: var(--head); font-weight: 700; font-size: 17px; }
.related { margin-top: 38px; }

/* Pages */
.page-head { padding: 34px 0 20px; text-align: center; }
.page-head h1 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; letter-spacing: -.025em; }
.page-head p { max-width: 720px; margin: 0 auto; font-size: 18px; }
.page-article { max-width: 940px; margin: 0 auto; }
.page-article .entry-content { padding: 32px 38px; }
.scvm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 1.3em 0; }
.scvm-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--inset); }
.scvm-tile h3 { margin-top: 0 !important; font-size: 17px; }
.scvm-tile p { margin: 0; font-size: 15px; }
.scvm-cta { border-radius: var(--r); padding: 24px; margin: 1.6em 0; border: 1px solid rgba(67, 202, 255, .3); background: linear-gradient(140deg, rgba(67, 202, 255, .16), var(--surface)); }
.scvm-cta h3 { margin-top: 0 !important; }
.scvm-cta .btn { text-decoration: none; }
.scvm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 1.3em 0; }
.scvm-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; font-size: 14px; }
.scvm-stats strong { display: block; font-size: 26px; color: var(--accent); }
.scvm-kev input[type=search] { max-width: 440px; }
.search-form { display: flex; gap: 8px; max-width: 520px; margin: 16px auto; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 26px; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: grid; place-items: center; padding: 0 14px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); color: var(--head); }
.pagination .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.comments { margin-top: 34px; }
.comment-form textarea { width: 100%; }
.offline-box { text-align: center; padding: 18vh 20px; }

/* ===== Footer ============================================================ */
.site-footer { margin-top: 40px; padding: 10px 0 30px; border-top: 1px solid var(--line); }
.footer-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 30px; margin: 34px 0; }
.footer-cta h2 { font-size: 22px; margin-bottom: 4px; } .footer-cta p { margin: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--head); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer li a { color: var(--text); }
.site-footer li a:hover { color: var(--accent); }
.footer-brand p { font-size: 15px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 18px; text-align: center; font-size: 13.5px; }
.to-top { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: 24px; z-index: 40; opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .25s ease; background: var(--bar); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* ===== Mobile app shell =================================================== */
.tabbar { display: none; }
.install-tip { display: none; }

@media (max-width: 1080px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar { position: static; }
	.desk-nav { display: none; }
	.appbar-in { justify-content: space-between; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
	body { font-size: 15.5px; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); overscroll-behavior-y: none; }
	.appbar-in { min-height: 58px; gap: 10px; }
	.brand { font-size: 17px; } .brand-logo { width: 34px; height: 34px; }
	.mode-switch { width: 64px; height: 36px; padding: 0 7px; }
	[data-mode="light"] .mode-knob { transform: translate(-21px, -50%); } .mode-knob { transform: translate(7px, -50%); }
	.icon-btn { width: 40px; height: 40px; }

	.tabbar {
		display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
		height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 6px max(8px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-right));
		background: var(--bar); border-top: 1px solid var(--line);
		-webkit-backdrop-filter: saturate(170%) blur(20px); backdrop-filter: saturate(170%) blur(20px);
	}
	.tabbar a, .tabbar button {
		display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
		background: none; border: 0; color: var(--text); font: 600 11px/1 var(--font); text-decoration: none; cursor: pointer; border-radius: 14px; min-height: 48px;
	}
	.tabbar .ic { width: 23px; height: 23px; }
	.tabbar .is-active { color: var(--accent); }
	.tabbar .is-active .ic { filter: drop-shadow(0 0 6px rgba(67, 202, 255, .5)); }
	.to-top { display: none; }

	dialog.sheet-menu { margin: auto 0 0; width: 100%; height: auto; max-height: 88dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; padding-top: 10px; }
	.sheet-grab { display: block; }
	dialog.sheet-menu[open] { animation: sheet-up .32s cubic-bezier(.2, .8, .2, 1); }
	@keyframes sheet-up { from { transform: translateY(100%); } }
	dialog.sheet-search { margin-top: calc(env(safe-area-inset-top) + 12px); }

	.install-tip:not([hidden]) {
		display: flex; align-items: center; gap: 12px; position: fixed; z-index: 55;
		left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
		padding: 12px 12px 12px 16px; background: var(--bg); box-shadow: var(--shadow); animation: sheet-in .3s ease;
	}
	.install-tip p { margin: 0; flex: 1; font-size: 13.5px; display: grid; }
	.install-actions { display: flex; gap: 8px; align-items: center; }
	.install-actions .btn { min-height: 38px; padding: 8px 16px; }

	.hero { padding: 30px 0 6px; }
	.hero-badge { width: 104px; height: 104px; margin-bottom: 20px; }
	.hero-badge span { inset: -12px; }
	.rail { grid-auto-columns: 78%; padding-left: 20px; padding-right: 20px; scroll-padding: 0 20px; }
	.rail-nav { display: none; }
	.rail-wrap { margin-top: 28px; }
	.brief-hl { grid-template-columns: 1fr; text-align: left; padding: 20px; gap: 12px; }
	.brief-hl-ic { width: 46px; height: 46px; border-radius: 14px; }
	.grid-2, .grid-3 { grid-template-columns: 1fr; }
	.grid-2 .card, .grid-3 .card { flex-direction: row; }
	.grid-2 .card-media, .grid-3 .card-media { flex: 0 0 112px; }
	.grid-2 .card-media img, .grid-3 .card-media img, .grid-2 .card-ph, .grid-3 .card-ph { height: 100%; aspect-ratio: 1 / 1; }
	.grid-2 .card-body, .grid-3 .card-body { padding: 12px 14px; }
	.grid-2 .card-excerpt { display: none; }
	.card-title, .grid-3 .card-title { font-size: 15.5px; line-height: 1.35; }
	.card:hover { transform: none; }
	.section-head h2 { font-size: 19px; }
	.article-head { padding-top: 16px; }
	.entry-content { font-size: 16.5px; }
	.entry-content h2 { font-size: 21px; }
	.entry-content table { min-width: 0; font-size: 13.5px; }
	.entry-content th, .entry-content td { padding: 7px 8px; }
	.entry-content td code, .scvm-ioc code { word-break: break-all; white-space: normal; }
	.scvm-threat, .scvm-cve { padding: 12px 14px !important; }
	html, body { overflow-x: hidden; }
	.page-article .entry-content { padding: 20px; border-radius: var(--r); }
	.page-head { padding: 22px 0 14px; }
	.footer-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
	.footer-grid { grid-template-columns: 1fr; gap: 20px; }
	.site-footer { padding-bottom: 10px; }
	.share .pill { flex: 1; justify-content: center; }
	.author-box { flex-direction: column; }
	.is-app .appbar { padding-top: env(safe-area-inset-top); }
}

@media (max-width: 340px) {
	.brand-name { display: none; }
	.hero-title { font-size: 30px; }
	.tabbar a span, .tabbar button span { font-size: 10px; }
}

/* App-like page transitions (Chrome / Safari 18+; ignored elsewhere) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .18s ease both vt-out; }
::view-transition-new(root) { animation: .22s ease both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	@view-transition { navigation: none; }
}
@media (hover: none) { .card:hover, .rail-card:hover { transform: none; } }
@media print { .appbar, .tabbar, .sidebar, .site-footer, .share, .install-tip, dialog { display: none !important; } body { background: #fff; color: #000; } }
